summaryrefslogtreecommitdiff
path: root/drivers/media/pci/cx23885/cx23885-vbi.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-09-20 10:19:32 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-09-21 20:41:34 -0300
commit420b21761986dc16521e72951b9fc6e5d0a515df (patch)
tree058dffef4b1b55b6833e13451d2b7af8cdc5e5f3 /drivers/media/pci/cx23885/cx23885-vbi.c
parentf8789e6d9c824aeaeeb5b44b926dc8e960487cfe (diff)
[media] cx23885: fix VBI support
Tested VBI support and discovered that the wrong offset was used. After this change it is now working. Verified with CC/XDS for NTSC and WSS/Teletext on PAL. It also reported the wrong start lines for the second field. That's now fixed as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/cx23885/cx23885-vbi.c')
-rw-r--r--drivers/media/pci/cx23885/cx23885-vbi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/pci/cx23885/cx23885-vbi.c b/drivers/media/pci/cx23885/cx23885-vbi.c
index 67b71f9b41f4..a7c6ef8f3ea3 100644
--- a/drivers/media/pci/cx23885/cx23885-vbi.c
+++ b/drivers/media/pci/cx23885/cx23885-vbi.c
@@ -54,14 +54,14 @@ int cx23885_vbi_fmt(struct file *file, void *priv,
f->fmt.vbi.flags = 0;
if (dev->tvnorm & V4L2_STD_525_60) {
/* ntsc */
- f->fmt.vbi.start[0] = 10;
- f->fmt.vbi.start[1] = 272;
+ f->fmt.vbi.start[0] = V4L2_VBI_ITU_525_F1_START + 9;
+ f->fmt.vbi.start[1] = V4L2_VBI_ITU_525_F2_START + 9;
f->fmt.vbi.count[0] = VBI_NTSC_LINE_COUNT;
f->fmt.vbi.count[1] = VBI_NTSC_LINE_COUNT;
} else if (dev->tvnorm & V4L2_STD_625_50) {
/* pal */
- f->fmt.vbi.start[0] = 6;
- f->fmt.vbi.start[1] = 318;
+ f->fmt.vbi.start[0] = V4L2_VBI_ITU_625_F1_START + 5;
+ f->fmt.vbi.start[1] = V4L2_VBI_ITU_625_F2_START + 5;
f->fmt.vbi.count[0] = VBI_PAL_LINE_COUNT;
f->fmt.vbi.count[1] = VBI_PAL_LINE_COUNT;
}