cx88 NTSC VBI fixes (fwd)
- From: Trent Piepho <xyzzy (at) speakeasy.org>
- Date: Wed, 10 May 2006 14:59:05 -0700 (PDT)
Somehow an extra ) got stuck in that last patch. Fixed.
---------- Forwarded message ----------
Date: Tue, 9 May 2006 19:14:35 -0700 (PDT)
From: Trent Piepho <xyzzy (at) speakeasy.org>
To: Linux and Kernel Video <video4linux-list (at) redhat.com>
Subject: Re: [PATCH] cx88 NTSC VBI fixes
Here is another patch to fix VBI. The V4L2 VBI format reports an offset of
244, which is what the bt8x8 used. I've measured both PAL and NTSC, and the
cx88 should use an offset of about 220 to 224.
Rather than change the format to report an offset of 220, I adjusted the VBI
delay register to delay an extra 20 pixels, so that real offset about 244.
This way the cx88 will provide the same offset as the bttv driver, which some
programs expect.
There are still two unresolved issues with cx88 VBI capture.
The cx88 driver captures a fixed 17 lines per field. This is wasteful for
NTSC, which can only capture 12, leaving 5 blank lines per field. The
problem is that some software expects a VBI frame to be 64k (16
lines/field), which is the default for the bttv driver. The larger than
64k frame is what breaks tvtime. The driver should be changed to support
setting number of VBI lines to capture (like the bttv driver) and the
default line count changed to 16.
The VBI start lines for NTSC are 10, 273 for both the cx88 and bt8x8. For
PAL the bt8x8 start lines are 7, 320. The cx88 driver reports PAL start
lines 6, 318. This is probably wrong. I can't check it, as I don't have
any source with PAL VBI data at a known line.
# HG changeset patch
# User Trent Piepho <xyzzy@speakeasy.org>
# Node ID 999fc9c355f8ef08910201f5817edf4992505199
# Parent 38162695285b4fef3a2215966435ac3b4d9ee338
Adjust VBI offset to match value reported in VBI format
From: Trent Piepho <xyzzy@speakeasy.org>
The actual offset of the start of VBI data is incorrectly documented for both
the CX2388x and Bt8x8. For the cx2388x, it appears to be about 220 to 224 +
VBI_V_DEL*2. The driver has been incorrectly reporting an offset of 244.
This patch adjusts VBI_V_DEL to 10, so that the offset of 244 is correct.
This is the same offset as the bttv driver, and expected by some software.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
diff -r 38162695285b -r 999fc9c355f8 linux/drivers/media/video/cx88/cx88-core.c
--- a/linux/drivers/media/video/cx88/cx88-core.c Tue May 9 10:15:42 2006 -0300
+++ b/linux/drivers/media/video/cx88/cx88-core.c Wed May 10 14:46:50 2006 -0700
@@ -976,9 +976,9 @@ int cx88_set_tvnorm(struct cx88_core *co
htotal, cx_read(MO_HTOTAL), (u32)tmp64);
cx_write(MO_HTOTAL, htotal);
- // vbi stuff
- cx_write(MO_VBI_PACKET, ((1 << 11) | /* (norm_vdelay(norm) << 11) | */
- norm_vbipack(norm)));
+ // vbi stuff, set vbi offset to 10 (for 20 Clk*2 pixels), this makes
+ // the effective vbi offset ~244 samples, the same as the Bt8x8
+ cx_write(MO_VBI_PACKET, (10<<11) | norm_vbipack(norm));
// this is needed as well to set all tvnorm parameter
cx88_set_scale(core, 320, 240, V4L2_FIELD_INTERLACED);
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request (at) redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list