LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-14-2018, 12:08 PM   #16
mrapathy
Member
 
Registered: Nov 2005
Distribution: Slackware,Debian
Posts: 366

Original Poster
Rep: Reputation: 66

how do I go about patching the kernel? got one patch file not sure about another.
one I keep finding seems to be for raspberry pi.
I just upgraded to 4.14.13 kernel and my usb tuner still is not working. seems to be em28xx driver.

with modprobe em28xx I get some v4l2 stuff loaded

bash-4.3# lsmod
Module Size Used by
em28xx 94208 0
tveeprom 24576 1 em28xx
v4l2_common 16384 1 em28xx
videodev 200704 1 v4l2_common
media 40960 2 videodev,em28xx
rfcomm 53248 14

the other two drivers required for the tv tuner dont get loaded unless I manually load them but I still get no dev dvb installed

Last edited by mrapathy; 01-14-2018 at 02:22 PM.
 
Old 01-14-2018, 02:29 PM   #17
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
Quote:
Originally Posted by mrapathy View Post
how do I go about patching the kernel? got one patch file not sure about another.
one I keep finding seems to be for raspberry pi.
I just upgraded to 4.14.13 kernel and my usb tuner still is not working. seems to be em28xx driver.
Do not provide any links, keep the findings for yourself I've warned you that identifying, understanding and applying the patches will be the hard part.
Of course it's a driver issue, the driver is part of the kernel, specifically the media_tree part of the kernel. That's why I advised you to get the latest media_tree and patch your driver there (if not already patched), compile it and install it, instead of patching the kernel sources and maybe even ending up recompiling the whole kernel. The media_tree is the "bleeding edge" of the media (multimedia) drivers and all the developments there are finally merged into the kernel, but that can take some time and several kernel releases.

- the one engineer working for Hauppauge and continuously providing patches is Brad Love:
https://github.com/b-rad-NDi
- on your raspberry kernel findings, I guess you're referring to this libreelec post/thread:
https://forum.libreelec.tv/thread/28...uner/?pageNo=5
where there are several patches referenced (5):
https://github.com/CvH/LibreELEC.tv/...abf783b4b76920
- Brad's patches were apparently not accepted - as of Sept. 9, 2017:
https://patchwork.kernel.org/patch/8741651/
- none of them visible in the actual kernel:
https://github.com/torvalds/linux/co...dia/usb/em28xx
- and not even added to the media_tree:
https://git.linuxtv.org/media_tree.g...dia/usb/em28xx
- Brad Love is currently focusing with his development on the kernel 4.10.x
https://github.com/b-rad-NDi/Ubuntu-...u-zesty-4.10.0

ATM wait and look for any updates (patches) on:
https://www.linuxtv.org/wiki/index.p...dualHD#Drivers
and
https://git.linuxtv.org/media_tree.g...dia/usb/em28xx
Once you get them in media_tree, follow my instructions and build&install media_tree with the help of the media build.

Or, get in touch with Brad, get his latest work and patch yourself the media_tree drivers.

Lastly, wait for a kernel that has all the patches applied - it'll take some time.

Last edited by abga; 01-14-2018 at 02:31 PM. Reason: typo
 
Old 01-14-2018, 03:38 PM   #18
mrapathy
Member
 
Registered: Nov 2005
Distribution: Slackware,Debian
Posts: 366

Original Poster
Rep: Reputation: 66
would prefer to do it without rebuilding the media tree. seems to be a bit much.
 
Old 01-14-2018, 04:42 PM   #19
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
media tree is the simplest way and won't break anything if patched properly (maybe getting it already patched if Brad gets his stuff in order).
On your single driver approach, wishing you good luck then. Take a backup of your kernel / modules / firmware and go for the single driver patch and in tree recompilation/installation.
https://stackoverflow.com/questions/...-kernel-module
 
Old 01-14-2018, 06:32 PM   #20
mrapathy
Member
 
Registered: Nov 2005
Distribution: Slackware,Debian
Posts: 366

Original Poster
Rep: Reputation: 66
Sounds like Brad was busy as late as 11/22/17.

any idea how I go bout using .patch file? tried searching and havent found clear instructions.

Last edited by mrapathy; 01-14-2018 at 08:09 PM.
 
Old 01-14-2018, 09:29 PM   #21
mrapathy
Member
 
Registered: Nov 2005
Distribution: Slackware,Debian
Posts: 366

Original Poster
Rep: Reputation: 66
Think I will wait

just read this https://github.com/raspberrypi/linux/pull/2091
Quote:
6by9 commented 7 hours ago

Further movement upstream - https://www.spinics.net/lists/linux-...msg127060.html
According to b-rad-NDi/Ubuntu-media-tree-kernel-builder#27 he's got clearance from his bosses, so hopefully patches will be merged to linux-media soon.
 
Old 01-15-2018, 04:48 AM   #22
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
Quote:
Originally Posted by mrapathy View Post
Think I will wait

just read this https://github.com/raspberrypi/linux/pull/2091
It might take some time (months/years) before they make their way into the kernel tree. Usually it's the media_tree where they are first added and just then accepted/adopted (if ever) by the kernel. Keep an eye on the media_tree history (change) log at LinuxTV - links you'll find in my post above. Again, good luck!
 
1 members found this post helpful.
Old 01-29-2018, 11:33 PM   #23
mrapathy
Member
 
Registered: Nov 2005
Distribution: Slackware,Debian
Posts: 366

Original Poster
Rep: Reputation: 66
Well I bit the bullet and started working on getting V4L
I got media_build directory but running ./build or ./build --main-git
I got this error

Quote:
make[3]: *** No rule to make target '/home/kmfdm/Downloads/media_build/v4l/frame_vector.c', needed by '/home/kmfdm/Downloads/media_build/v4l/frame_vector.o'. Stop.
Makefile:1507: recipe for target '_module_/home/kmfdm/Downloads/media_build/v4l' failed
make[2]: *** [_module_/home/kmfdm/Downloads/media_build/v4l] Error 2
make[2]: Leaving directory '/usr/src/linux-4.14.13'
Makefile:51: recipe for target 'default' failed
make[1]: *** [default] Error 2
make[1]: Leaving directory '/home/kmfdm/Downloads/media_build/v4l'
Makefile:26: recipe for target 'all' failed
make: *** [all] Error 2
build failed at ./build line 526
 
Old 01-30-2018, 01:07 AM   #24
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
I was only compiling (patching my tuner drivers) media_tree under Slackware ARM 14.2 and -current on older kernels, the latest being 4.4.50, for the last years. Actually, the last time I did it was the end of summer 2017 and due to the kernel issues (USB drops on higher traffic) I stopped and glued a Raspberry Pi Zero with a patched tuner driver running the last healthy kernel (4.4.50) on my tuner, streaming through tvheadend.
https://www.linuxquestions.org/quest...6/#post5812054

Here you might find some clues / resolutions for your reported problem (it looks to be an issue with the latest media_tree builds):
https://github.com/ljalves/linux_media/issues/154
https://www.tbsdtv.com/forum/viewtopic.php?f=87&t=24789

Simply running the ./build script should get you going, no need to specify any arguments. If you own a multicore CPU and would like to compile the media tree a little faster, edit the build script and change the make related lines - add 4 make jobs - in:
Code:
system ("make -j 4 allyesconfig") == 0 or die "can't select all drivers";
system ("make -j 4") == 0 or die "build failed";
 
1 members found this post helpful.
Old 02-01-2018, 05:56 PM   #25
mrapathy
Member
 
Registered: Nov 2005
Distribution: Slackware,Debian
Posts: 366

Original Poster
Rep: Reputation: 66
Got that fixed though dont get driver installed either by plugging in or using modprobe
get this after modprobe em28xx
Quote:
media: Linux media interface: v0.10
[68838.170255] Linux video capture interface: v2.00
[68838.170258] WARNING: You are using an experimental version of the media stack.
As the driver is backported to an older kernel, it doesn't offer
enough quality for its usage in production.
Use it with care.
Latest git patches (needed if you report a bug to linux-media@vger.kernel.org):
273caa260035c03d89ad63d72d8cd3d9e5c5e3f1 media: v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs
a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic
d83a8243aaefe62ace433e4384a4f077bed86acb media: v4l2-compat-ioctl32.c: don't copy back the result for certain errors
[68838.199464] usbcore: registered new interface driver em28xx
 
Old 02-01-2018, 07:07 PM   #26
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
I just saw your involvement and help requests on:
https://github.com/raspberrypi/linux/pull/2091

What "6by9 commented Jan 30, 2018" instructed you to do should work and I'm afraid I can't be of any further help on this, because this is pure driver patchwork and I don't own your TV Tuner and cannot replicate/test the outcome.

EDIT>
Clean/backup your previous work and try to do exactly as 6by9 instructed you to do, the exact commands in the exact order. Disregard my previous instructions on how to start the media_build (run the ./build script)- that was the standard way - but in your case you are applying a lot of patches and he seems to have already gone through this and got a successful outcome.

I'm glad you made it this far and able now to compile and test on your own. I'd suggest to report your outcome (dmesg) on that github thread and ask for guidance. From my POV, the message you got in dmesg is a normal output of loading the driver, but the device is not recognized. It's interesting to know if you have some lines in dmesg showing that the usb device was connected/disconnected, go on the link below and take a look at the dmesg sample output:
https://www.linuxtv.org/wiki/index.p...e_WinTV-dualHD

Make sure you have the requested firmware available in /lib/firmware/ and use also lsusb for looking after your connected device, alternatively (although very unprofessional but simple) restart your system with the device connected and the newly patched drivers.
After reboot - check again the dmesg - look also for usb related messages. You might want to get the dmesg output in a file and be able to study it easier:
Code:
dmesg > study.txt
- then edit the study.txt file

Last edited by abga; 02-01-2018 at 07:32 PM. Reason: the = then, EDIT>, removed udev stuff - useless
 
Old 02-01-2018, 09:17 PM   #27
mrapathy
Member
 
Registered: Nov 2005
Distribution: Slackware,Debian
Posts: 366

Original Poster
Rep: Reputation: 66
6by9 gave good advice but it hasnt given me success yet. I am not toying with raspberry pi just Hauppauge usb tv tuner.
 
Old 02-02-2018, 12:17 AM   #28
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
Quote:
Originally Posted by mrapathy View Post
6by9 gave good advice but it hasnt given me success yet. I am not toying with raspberry pi just Hauppauge usb tv tuner.
6by9 is an engineer working for the Raspberry Foundation and as far as I remember from the Raspberry Forum he was knowledgeable and helpful.
You are toying with Slackware and he is toying with Raspbian (a Debian derivative), that's the main difference, but from the media_build perspective it shouldn't matter. The kernel source trees are the same, same version, the one he's using might contain some additional stuff for the Raspberry Platform, but that shouldn't matter either - he's confirming that if you read his reply on github carefully.
I was telling you to follow exactly his instructions, because that is the official way - developers approach - to patch a driver!
Here is the reference - take a look in the second column of the table - Developer's approach:
https://www.linuxtv.org/wiki/index.p...Device_Drivers

You should run his command sequence, change the make -j 4 in the ./build script and also issue his make commands as make -j 4 and verify if the line make -C ../ install will end in a depmod command - if not, do it as advised in my previous posts.
make -C .. rmmod is not necessary (it'll unload the old drivers) and instead of issuing it you should better restart your system.

I did all of these (copy/paste from github) until make -C ../ install and everything looks OK:
Code:
git clone --depth=1 git://linuxtv.org/media_build.git
cd media_build 
./build --main-git --depth 100
cd media
git remote add pi_patches https://github.com/6by9/linux.git
git fetch pi_patches  --depth 50
git format-patch -25 pi_patches/rpi-4.14.y-hauppauge
git am *.patch
make -j 4 -C ../v4l
make -j 4 -C ../ install
make -j 4 -C .. rmmod
Pleas note that in my previous post where I put all the instructions, I made a trivial mistake (wrong copy/paste) with respect to the required perl module and I cannot edit/correct that post anymore.

https://www.linuxquestions.org/quest...5/#post5798915
Correction:
3. perl module Proc::ProcessTable (try not to update cpan itself, it'll take ages )

Code:
perl -MCPAN -e shell
cpan> install Proc::ProcessTable
cpan> quit
 
1 members found this post helpful.
Old 02-12-2018, 11:10 PM   #29
mrapathy
Member
 
Registered: Nov 2005
Distribution: Slackware,Debian
Posts: 366

Original Poster
Rep: Reputation: 66
Got my tv tuner working. Installed patch I got from https://patchwork.kernel.org/project...bmitter=174585
Installed [5/9] em28xx: Add Hauppauge SoloHD/DualHD bulk models patch into 4.14.13 kernel.

Now just need to figure out how to get channels scanned for xine or get vlc going but thats another thread.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Finally Got my Tuner working...BUT hellmet Linux - Hardware 0 05-26-2006 06:33 AM
Please! Why my PCMCIA TV tuner not working?? OLEGHA Linux - Laptop and Netbook 0 02-17-2006 05:24 AM
WintvGo+ tuner not working pierre-luc Linux - Hardware 0 12-17-2005 11:37 PM
Is it possible to get a USB TV Tuner working? sw67 Linux - Hardware 2 07-15-2005 11:42 AM
HOW TO get All in Wonder 9000 TV tuner working in RH 9 manthis Linux - Hardware 18 07-11-2004 03:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration