[mythtv-users] Red bt8x8 capture?

Bruce Markey bjm at lvcm.com
Wed Nov 10 18:16:51 UTC 2004


Brian LeFevre wrote:
> nate s wrote:
> 
>> Good to know, my bttv was doing the same (before I broke down and
>> bought a 250 -- unrelated problems)
>>
>> -Nate
>>
>>
>> On Tue, 09 Nov 2004 14:37:47 -0800, Bruce Markey <bjm at lvcm.com> wrote:
>>
>>> Jonathan Markevich wrote:
>>>
>>>> Every few captures I do (1 in 5) doesn't work - the picture is 
>>>> EXTREMELY
>>>> dark with only red making up the picture.  If this happens when
>>>> switching to live TV, I just exit and re-enter, it seems to wake 
>>>> up.  If
>>>> this is on timer, though, it can be a problem.  I've missed a few shows
>>>> because of it.  Has anyone else come across that, and found a
>>>> solution/cause?
>>>
>>>
>>> It's come up many times and was the result of a bug in the
>>> bttv driver for about a year. It was fixed a couple months ago
>>> and the fix is included in the current video4linux snapshots
>>> at bytesex.org or with linux version 2.6.9.
>>>
> 
> Dang!  If I knew that I wouldn't have hacked my own myth source to fix 
> it.  I just made it reset the card (actaully swap inputs back and forth) 
> when it turned on.  The problem is I upgrade myth more often then bttv! 
>  So I had to remember to fix the problem every time.

That wouldn't have really fixed it anyway. The problem occurred
when the card reset which can happen when you start recording or
whenever certain errors happened which would case the card to
reset while recording. If there was a long recording of, say, four
to six hours, there was a higher probability that the colors
would be wrong by the time it was finished.

bttv release versions used to be rare but there were several in
short order from 0.9.11 thru 0.9.15 all with hacks and tweaks to
resetting the card. Someone finally figured out that it was caused
by the lumafilter being reset after the picture settings. Attached
is a diff against the 2.4.26 kraxel patch. Even if this patch
doesn't apply cleanly for other versions, one can easily look in
their bttv-driver.c file and move the four picture settings down
a few lines to be below the opt_lumafilter section.

--  bjm
-------------- next part --------------
--- /tmp/linux-2.4.26/drivers/media/video/bttv-driver.c	2004-11-10 09:51:23.000000000 -0800
+++ drivers/media/video/bttv-driver.c	2004-09-19 00:53:39.000000000 -0700
@@ -1044,11 +1044,6 @@
 	btwrite(whitecrush_upper, BT848_WC_UP);
 	btwrite(whitecrush_lower, BT848_WC_DOWN);
 
-	bt848_bright(btv,   btv->bright);
-	bt848_hue(btv,      btv->hue);
-	bt848_contrast(btv, btv->contrast);
-	bt848_sat(btv,      btv->saturation);
-
 	if (btv->opt_lumafilter) {
 		btwrite(0, BT848_E_CONTROL);
 		btwrite(0, BT848_O_CONTROL);
@@ -1057,6 +1052,11 @@
 		btwrite(BT848_CONTROL_LDEC, BT848_O_CONTROL);
 	}
 
+        bt848_bright(btv,   btv->bright);
+        bt848_hue(btv,      btv->hue);
+        bt848_contrast(btv, btv->contrast);
+        bt848_sat(btv,      btv->saturation);
+
         /* interrupt */
 	init_irqreg(btv);
 }


More information about the mythtv-users mailing list