diff options
author | Andy Walls <awalls@radix.net> | 2009-02-08 22:40:04 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 12:42:39 -0300 |
commit | 812b1f9d54a5f75066f8a5c92166a979c48c98c6 (patch) | |
tree | d04cdfdd80d0e2df825dbd22a6130434867233f0 /drivers/media/video/cx18/cx18-streams.c | |
parent | 466df46484aced005fa41706f87e18eaa86918ad (diff) |
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-streams.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-streams.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c index a8dcc0f171d..778aa0c0f9b 100644 --- a/drivers/media/video/cx18/cx18-streams.c +++ b/drivers/media/video/cx18/cx18-streams.c @@ -360,9 +360,16 @@ static void cx18_vbi_setup(struct cx18_stream *s) if (raw) { lines = cx->vbi.count * 2; } else { - lines = cx->is_60hz ? 24 : 38; - if (cx->is_60hz) - lines += 2; + /* + * For 525/60 systems, according to the VIP 2 & BT.656 std: + * The EAV RP code's Field bit toggles on line 4, a few lines + * after the Vertcal Blank bit has already toggled. + * Tell the encoder to capture 21-4+1=18 lines per field, + * since we want lines 10 through 21. + * + * FIXME - revisit for 625/50 systems + */ + lines = cx->is_60hz ? (21 - 4 + 1) * 2 : 38; } data[0] = s->handle; @@ -402,9 +409,13 @@ static void cx18_vbi_setup(struct cx18_stream *s) * * Since the V bit is only allowed to toggle in the EAV RP code, * just before the first active region line, these two - * are problematic and we have to ignore them: + * are problematic: * 0x90 (Task HorizontalBlank) * 0xd0 (Task EvenField HorizontalBlank) + * + * We have set the digitzer to consider the first active line + * as part of VerticalBlank as well so we don't have to look for + * these problem codes nor lose the last line of sliced data. */ data[4] = 0xB0F0B0F0; /* |