aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-09-20 09:19:32 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-09-21 19:41:34 -0400
commit420b21761986dc16521e72951b9fc6e5d0a515df (patch)
tree058dffef4b1b55b6833e13451d2b7af8cdc5e5f3
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>
-rw-r--r--drivers/media/pci/cx23885/cx23885-core.c4
-rw-r--r--drivers/media/pci/cx23885/cx23885-vbi.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c
index cb94366b9504..331eddac7222 100644
--- a/drivers/media/pci/cx23885/cx23885-core.c
+++ b/drivers/media/pci/cx23885/cx23885-core.c
@@ -1228,11 +1228,11 @@ int cx23885_risc_vbibuffer(struct pci_dev *pci, struct cx23885_riscmem *risc,
1228 /* Sync to line 6, so US CC line 21 will appear in line '12' 1228 /* Sync to line 6, so US CC line 21 will appear in line '12'
1229 * in the userland vbi payload */ 1229 * in the userland vbi payload */
1230 if (UNSET != top_offset) 1230 if (UNSET != top_offset)
1231 rp = cx23885_risc_field(rp, sglist, top_offset, 6, 1231 rp = cx23885_risc_field(rp, sglist, top_offset, 0,
1232 bpl, padding, lines, 0, true); 1232 bpl, padding, lines, 0, true);
1233 1233
1234 if (UNSET != bottom_offset) 1234 if (UNSET != bottom_offset)
1235 rp = cx23885_risc_field(rp, sglist, bottom_offset, 0x207, 1235 rp = cx23885_risc_field(rp, sglist, bottom_offset, 0x200,
1236 bpl, padding, lines, 0, UNSET == top_offset); 1236 bpl, padding, lines, 0, UNSET == top_offset);
1237 1237
1238 1238
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,
54 f->fmt.vbi.flags = 0; 54 f->fmt.vbi.flags = 0;
55 if (dev->tvnorm & V4L2_STD_525_60) { 55 if (dev->tvnorm & V4L2_STD_525_60) {
56 /* ntsc */ 56 /* ntsc */
57 f->fmt.vbi.start[0] = 10; 57 f->fmt.vbi.start[0] = V4L2_VBI_ITU_525_F1_START + 9;
58 f->fmt.vbi.start[1] = 272; 58 f->fmt.vbi.start[1] = V4L2_VBI_ITU_525_F2_START + 9;
59 f->fmt.vbi.count[0] = VBI_NTSC_LINE_COUNT; 59 f->fmt.vbi.count[0] = VBI_NTSC_LINE_COUNT;
60 f->fmt.vbi.count[1] = VBI_NTSC_LINE_COUNT; 60 f->fmt.vbi.count[1] = VBI_NTSC_LINE_COUNT;
61 } else if (dev->tvnorm & V4L2_STD_625_50) { 61 } else if (dev->tvnorm & V4L2_STD_625_50) {
62 /* pal */ 62 /* pal */
63 f->fmt.vbi.start[0] = 6; 63 f->fmt.vbi.start[0] = V4L2_VBI_ITU_625_F1_START + 5;
64 f->fmt.vbi.start[1] = 318; 64 f->fmt.vbi.start[1] = V4L2_VBI_ITU_625_F2_START + 5;
65 f->fmt.vbi.count[0] = VBI_PAL_LINE_COUNT; 65 f->fmt.vbi.count[0] = VBI_PAL_LINE_COUNT;
66 f->fmt.vbi.count[1] = VBI_PAL_LINE_COUNT; 66 f->fmt.vbi.count[1] = VBI_PAL_LINE_COUNT;
67 } 67 }