Author: apatard
Date: Tue Jan 23 14:07:57 2007
New Revision: 112399
Added:
packages/updates/2007.0/kernel-2.6/current/PATCHES/patches/DV28_bttv_vbi_offset_fix.patch
Modified:
packages/updates/2007.0/kernel-2.6/current/SPECS/kernel-2.6.spec
Log:
Fix bttv vbi offset
Added:
packages/updates/2007.0/kernel-2.6/current/PATCHES/patches/DV28_bttv_vbi_offset_fix.patch
==============================================================================
--- (empty file)
+++
packages/updates/2007.0/kernel-2.6/current/PATCHES/patches/DV28_bttv_vbi_offset_fix.patch
Tue Jan 23 14:07:57 2007
@@ -0,0 +1,41 @@
+commit ddecbe112b057c333a8e055fb417451a02b9df78
+Author: Trent Piepho <[EMAIL PROTECTED]>
+Date: Wed Jul 26 17:08:29 2006 -0300
+
+ V4L/DVB (4380): Bttv: Revert VBI_OFFSET to previous value, it works better
+
+ A previous patch changed VBI_OFFSET to match what the datasheets say it
+ should be. However, the bt8x8 datasheets are wrong. The old value of
+ 244 is closer to what is actually observed. The real value appears to
+ not be constant and is different for different chip revisions.
+ Acked-by: Alan Cox <[EMAIL PROTECTED]>
+
+ Signed-off-by: Trent Piepho <[EMAIL PROTECTED]>
+ Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
+
+diff --git a/drivers/media/video/bt8xx/bttv-vbi.c
b/drivers/media/video/bt8xx/bttv-vbi.c
+index 8c9f0f7..63676e7 100644
+--- a/drivers/media/video/bt8xx/bttv-vbi.c
++++ b/drivers/media/video/bt8xx/bttv-vbi.c
+@@ -31,11 +31,16 @@ #include <linux/kdev_t.h>
+ #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
Modified: packages/updates/2007.0/kernel-2.6/current/SPECS/kernel-2.6.spec
==============================================================================
--- packages/updates/2007.0/kernel-2.6/current/SPECS/kernel-2.6.spec
(original)
+++ packages/updates/2007.0/kernel-2.6/current/SPECS/kernel-2.6.spec Tue Jan
23 14:07:57 2007
@@ -1041,6 +1041,7 @@
o Arnaud Patard <[EMAIL PROTECTED]>
- Add preliminary ICH9 support
- KVM update
+ - Fix bttv vbi offset
* Wed Dec 27 2006 Arnaud Patard <[EMAIL PROTECTED]> 2.6.17-9mdv2007.0
o Arnaud Patard <[EMAIL PROTECTED]>