aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-streams.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2009-02-08 20:40:04 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:39 -0400
commit812b1f9d54a5f75066f8a5c92166a979c48c98c6 (patch)
treed04cdfdd80d0e2df825dbd22a6130434867233f0 /drivers/media/video/cx18/cx18-streams.c
parent466df46484aced005fa41706f87e18eaa86918ad (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.c19
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 a8dcc0f171d1..778aa0c0f9b5 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)
360 if (raw) { 360 if (raw) {
361 lines = cx->vbi.count * 2; 361 lines = cx->vbi.count * 2;
362 } else { 362 } else {
363 lines = cx->is_60hz ? 24 : 38; 363 /*
364 if (cx->is_60hz) 364 * For 525/60 systems, according to the VIP 2 & BT.656 std:
365 lines += 2; 365 * The EAV RP code's Field bit toggles on line 4, a few lines
366 * after the Vertcal Blank bit has already toggled.
367 * Tell the encoder to capture 21-4+1=18 lines per field,
368 * since we want lines 10 through 21.
369 *
370 * FIXME - revisit for 625/50 systems
371 */
372 lines = cx->is_60hz ? (21 - 4 + 1) * 2 : 38;
366 } 373 }
367 374
368 data[0] = s->handle; 375 data[0] = s->handle;
@@ -402,9 +409,13 @@ static void cx18_vbi_setup(struct cx18_stream *s)
402 * 409 *
403 * Since the V bit is only allowed to toggle in the EAV RP code, 410 * Since the V bit is only allowed to toggle in the EAV RP code,
404 * just before the first active region line, these two 411 * just before the first active region line, these two
405 * are problematic and we have to ignore them: 412 * are problematic:
406 * 0x90 (Task HorizontalBlank) 413 * 0x90 (Task HorizontalBlank)
407 * 0xd0 (Task EvenField HorizontalBlank) 414 * 0xd0 (Task EvenField HorizontalBlank)
415 *
416 * We have set the digitzer to consider the first active line
417 * as part of VerticalBlank as well so we don't have to look for
418 * these problem codes nor lose the last line of sliced data.
408 */ 419 */
409 data[4] = 0xB0F0B0F0; 420 data[4] = 0xB0F0B0F0;
410 /* 421 /*