summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-av-vbi.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2009-02-09 02:40:04 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 17:42:39 +0200
commit812b1f9d54a5f75066f8a5c92166a979c48c98c6 (patch)
treed04cdfdd80d0e2df825dbd22a6130434867233f0 /drivers/media/video/cx18/cx18-av-vbi.c
parentV4L/DVB (10445): cx18: Process Raw VBI on a whole frame basis; fix VBI buffer... (diff)
downloadlinux-812b1f9d54a5f75066f8a5c92166a979c48c98c6.tar.xz
linux-812b1f9d54a5f75066f8a5c92166a979c48c98c6.zip
V4L/DVB (10446): cx18: Finally get sliced VBI working - for 525 line 60 Hz systems at least
Sliced VBI, in the manner that ivtv implements it as a separate data stream, now works for 525 line 60 Hz systems like NTSC-M. It may work for 625 line 50 Hz systems, but I have more engineering work to do, to verify it is operating properly. Sliced data insertion into the MPEG PS should be working, but is untested. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-av-vbi.c')
-rw-r--r--drivers/media/video/cx18/cx18-av-vbi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/cx18/cx18-av-vbi.c b/drivers/media/video/cx18/cx18-av-vbi.c
index b5763372a316..43267d1afb92 100644
--- a/drivers/media/video/cx18/cx18-av-vbi.c
+++ b/drivers/media/video/cx18/cx18-av-vbi.c
@@ -182,7 +182,6 @@ int cx18_av_vbi(struct cx18 *cx, unsigned int cmd, void *arg)
case VIDIOC_S_FMT:
{
int is_pal = !(state->std & V4L2_STD_525_60);
- int vbi_offset = is_pal ? 1 : 0;
int i, x;
u8 lcr[24];
@@ -199,7 +198,7 @@ int cx18_av_vbi(struct cx18 *cx, unsigned int cmd, void *arg)
cx18_av_std_setup(cx);
/* VBI Offset */
- cx18_av_write(cx, 0x47f, vbi_offset);
+ cx18_av_write(cx, 0x47f, state->slicer_line_delay);
cx18_av_write(cx, 0x404, 0x2e);
break;
}
@@ -213,7 +212,7 @@ int cx18_av_vbi(struct cx18 *cx, unsigned int cmd, void *arg)
/* Sliced VBI */
cx18_av_write(cx, 0x404, 0x32); /* Ancillary data */
cx18_av_write(cx, 0x406, 0x13);
- cx18_av_write(cx, 0x47f, vbi_offset);
+ cx18_av_write(cx, 0x47f, state->slicer_line_delay);
/* Force impossible lines to 0 */
if (is_pal) {
@@ -261,7 +260,8 @@ int cx18_av_vbi(struct cx18 *cx, unsigned int cmd, void *arg)
}
cx18_av_write(cx, 0x43c, 0x16);
- cx18_av_write(cx, 0x474, is_pal ? 0x2a : 0x22);
+ /* FIXME - should match vblank set in cx18_av_std_setup() */
+ cx18_av_write(cx, 0x474, is_pal ? 0x2a : 26);
break;
}
@@ -286,7 +286,7 @@ int cx18_av_vbi(struct cx18 *cx, unsigned int cmd, void *arg)
did = anc->did;
sdid = anc->sdid & 0xf;
l = anc->idid[0] & 0x3f;
- l += state->vbi_line_offset;
+ l += state->slicer_line_offset;
p = anc->payload;
/* Decode the SDID set by the slicer */