diff options
author | Andy Walls <awalls@radix.net> | 2008-12-12 18:00:29 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:38:33 -0500 |
commit | af009cf635141858642864a26602e379e97bf7d6 (patch) | |
tree | ab533c73375ed26f2575efe5ba12a3b3f9b22d4c /drivers/media/video/cx18/cx18-streams.c | |
parent | dd073434b5285121007860914a004320d644ee7e (diff) |
V4L/DVB (9806): cx18: Enable raw VBI capture
A combined authorship patch from Hans Verkuil and Andy Walls. Raw
VBI can now be captured but requires a video capture to be in progress as well.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
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 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c index c87cd5369a4f..985bad89f311 100644 --- a/drivers/media/video/cx18/cx18-streams.c +++ b/drivers/media/video/cx18/cx18-streams.c | |||
@@ -358,8 +358,7 @@ static void cx18_vbi_setup(struct cx18_stream *s) | |||
358 | cx18_av_cmd(cx, VIDIOC_S_FMT, &cx->vbi.in); | 358 | cx18_av_cmd(cx, VIDIOC_S_FMT, &cx->vbi.in); |
359 | 359 | ||
360 | /* determine number of lines and total number of VBI bytes. | 360 | /* determine number of lines and total number of VBI bytes. |
361 | A raw line takes 1443 bytes: 2 * 720 + 4 byte frame header - 1 | 361 | A raw line takes 1444 bytes: 4 byte SAV code + 2 * 720 |
362 | The '- 1' byte is probably an unused U or V byte. Or something... | ||
363 | A sliced line takes 51 bytes: 4 byte frame header, 4 byte internal | 362 | A sliced line takes 51 bytes: 4 byte frame header, 4 byte internal |
364 | header, 42 data bytes + checksum (to be confirmed) */ | 363 | header, 42 data bytes + checksum (to be confirmed) */ |
365 | if (raw) { | 364 | if (raw) { |
@@ -377,14 +376,15 @@ static void cx18_vbi_setup(struct cx18_stream *s) | |||
377 | /* Lines per field */ | 376 | /* Lines per field */ |
378 | data[1] = (lines / 2) | ((lines / 2) << 16); | 377 | data[1] = (lines / 2) | ((lines / 2) << 16); |
379 | /* bytes per line */ | 378 | /* bytes per line */ |
380 | data[2] = (raw ? cx->vbi.raw_size : cx->vbi.sliced_size); | 379 | data[2] = (raw ? cx->vbi.raw_decoder_line_size |
380 | : cx->vbi.sliced_decoder_line_size); | ||
381 | /* Every X number of frames a VBI interrupt arrives | 381 | /* Every X number of frames a VBI interrupt arrives |
382 | (frames as in 25 or 30 fps) */ | 382 | (frames as in 25 or 30 fps) */ |
383 | data[3] = 1; | 383 | data[3] = 1; |
384 | /* Setup VBI for the cx25840 digitizer */ | 384 | /* Setup VBI for the cx25840 digitizer */ |
385 | if (raw) { | 385 | if (raw) { |
386 | data[4] = 0x20602060; | 386 | data[4] = 0x20602060; |
387 | data[5] = 0x30703070; | 387 | data[5] = 0x307090d0; |
388 | } else { | 388 | } else { |
389 | data[4] = 0xB0F0B0F0; | 389 | data[4] = 0xB0F0B0F0; |
390 | data[5] = 0xA0E0A0E0; | 390 | data[5] = 0xA0E0A0E0; |