summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx/bttv-vbi.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2006-08-04 14:24:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-08-04 14:24:15 -0400
commit71bfe47f023c55c322607939b786ce0a44627dfc (patch)
treef59c37feb00f1df2e0f4ec282ae9c80ad6bb0cdc /drivers/media/video/bt8xx/bttv-vbi.c
parent73c1ac1e3b6c989b9b5f7b2313ac590a1c3b6d6a (diff)
parentefe78cda3596f8a6d1c2d4a6b1a221bafa3e1a48 (diff)
Merge branch 'from-linus' into upstream
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-vbi.c')
-rw-r--r--drivers/media/video/bt8xx/bttv-vbi.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/media/video/bt8xx/bttv-vbi.c b/drivers/media/video/bt8xx/bttv-vbi.c
index 8c9f0f7cf46..63676e7bd63 100644
--- a/drivers/media/video/bt8xx/bttv-vbi.c
+++ b/drivers/media/video/bt8xx/bttv-vbi.c
@@ -31,11 +31,16 @@
#include <asm/io.h>
#include "bttvp.h"
-/* Offset from line sync pulse leading edge (0H) in 1 / sampling_rate:
- bt8x8 /HRESET pulse starts at 0H and has length 64 / fCLKx1 (E|O_VTC
- HSFMT = 0). VBI_HDELAY (always 0) is an offset from the trailing edge
- of /HRESET in 1 / fCLKx1, and the sampling_rate tvnorm->Fsc is fCLKx2. */
-#define VBI_OFFSET ((64 + 0) * 2)
+/* Offset from line sync pulse leading edge (0H) to start of VBI capture,
+ in fCLKx2 pixels. According to the datasheet, VBI capture starts
+ VBI_HDELAY fCLKx1 pixels from the tailing edgeof /HRESET, and /HRESET
+ is 64 fCLKx1 pixels wide. VBI_HDELAY is set to 0, so this should be
+ (64 + 0) * 2 = 128 fCLKx2 pixels. But it's not! The datasheet is
+ Just Plain Wrong. The real value appears to be different for
+ different revisions of the bt8x8 chips, and to be affected by the
+ horizontal scaling factor. Experimentally, the value is measured
+ to be about 244. */
+#define VBI_OFFSET 244
#define VBI_DEFLINES 16
#define VBI_MAXLINES 32