Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 242438 - media-tv/mythtv fails to access a bttv capture card under kernel 2.6.25, works fine on older kernels
Summary: media-tv/mythtv fails to access a bttv capture card under kernel 2.6.25, work...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Television related Applications in Gentoo's Portage
URL: http://svn.mythtv.org/trac/ticket/5608
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-17 06:58 UTC by Jeff Zepeda
Modified: 2008-11-17 16:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Zepeda 2008-10-17 06:58:53 UTC
The 2.6.25 kernel implements V4L1 in a compatibility layer (instead of the native V4L1 driver in 2.6.24 and prior).  Unfortunately, this appears to break mythtv because mythtv defaults to V4L1 instead of V4L2 for bttv cards.  According to several forums online, patching mythtv to use V4L2 with the bttv module solves this problem (see patch below).

Various forums online refer to this, one such is at:
http://linux-solved.com/post/Mythtv-bttv-and-2-6-25-SOLVED-23579.html

Reproducible: Always

Steps to Reproduce:
1. Compile kernel (any flavor) 2.6.25 with bttv module (or compile bttv into kernel)
2. Boot with 2.6.25 kernel and load bttv module
3. Run mythtv and attempt to either record or view live tv


Actual Results:  
Mythtv showed a blank image (reports indicate that the screen may be green or some other color).

Expected Results:  
Software should have shown/recorded video.

There is a patch for mythtv that has been reported to work.  I will test and report on its success or failure.  Here is the patch.

Some people have suggested simply adding: || driver == "bttv" 
to the if statement instead of commenting it out to retain compatibility with other cards that are not affected.  I will attempt to try this as well (may take a few days).

Index: libs/libmythtv/NuppelVideoRecorder.cpp
===================================================================
--- libs/libmythtv/NuppelVideoRecorder.cpp   (revision 17447)
+++ libs/libmythtv/NuppelVideoRecorder.cpp   (working copy)
@@ -985,7 +985,7 @@
             correct_bttv = true;

         QString driver = (char *)vcap.driver;
-        if (driver == "cx8800" || driver == "go7007" || driver == "em28xx")
+        //if (driver == "cx8800" || driver == "go7007" || driver == "em28xx")
         {
             channelfd = open(videodevice.ascii(), O_RDWR);
             if (channelfd < 0)
Comment 1 Cameron Fackler 2008-10-21 01:40:22 UTC
I can confirm the alternate solution (adding || driver == "bttv") worked for me.  I'm on gentoo-sources-2.6.27, with mythtv 0.21_p18501. All of my TV stuff is modular in the kernel. I just added an ATI TV-Wonder VE to my system, and found this bug when I experienced a green screen while attempting to watch TV on the new card. Both the new card and my existing PVR-150 are working after the fix.
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2008-10-21 17:42:18 UTC
I've just committed mythtv-0.21_p18812 which you'll want to try for this to be fixed. Let me know.
Comment 3 Cameron Fackler 2008-10-21 21:58:19 UTC
I installed the new mythtv-0.21_p18812.  Both my PVR-150 and the bttv card are working on kernel 2.6.27.
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2008-10-21 22:01:04 UTC
great. marking as fixed.
Comment 5 Jeff Zepeda 2008-10-25 00:45:10 UTC
Verified that mythtv-0.21_p18812 worked on my system as well (sorry for the delay in reporting back). Thanks for the quick response.
Comment 6 Jeff Zepeda 2008-11-15 08:09:16 UTC
ebuild  mythtv-0.21_p18812 posted on October 21, 2008 fixed this error, but this ebuild was pulled on Nov 11, 2008 and the remaining ebuilds do not support the patch.  Once again, mythtv does not work with bttv cards and kernels greater than 2.6.25.  Can you reapply the patch to newer ebuilds?

Thanks.
Comment 7 Doug Goldstein (RETIRED) gentoo-dev 2008-11-17 16:33:50 UTC
Re-added without a bump.