diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-09-03 15:47:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-09-03 17:36:25 -0400 |
commit | d526afe06b285006c63ed8f2eba9589f04e3283a (patch) | |
tree | dcd5e0ff6eed633f2b59da450fb8f82b7169787e /drivers/media/video/ivtv/ivtv-vbi.c | |
parent | c58dc0beaf70bce4d04ff53b82a7035a255a04e4 (diff) |
V4L/DVB (8648): ivtv: improve CC support
- change the work-queue to a single threaded high prio workqueue
- use DMA instead of PIO for the sliced VBI data.
- remove some incorrect tests
- increase the internal VBI capture queue size for sliced VBI packets
- ignore duplicate VBI lines
With these changes it should finally be possible to get reliable closed
captions.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-vbi.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-vbi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/ivtv/ivtv-vbi.c b/drivers/media/video/ivtv/ivtv-vbi.c index 71798f0da27f..1ce9deb1104f 100644 --- a/drivers/media/video/ivtv/ivtv-vbi.c +++ b/drivers/media/video/ivtv/ivtv-vbi.c | |||
@@ -293,6 +293,7 @@ static u32 compress_sliced_buf(struct ivtv *itv, u32 line, u8 *buf, u32 size, u8 | |||
293 | u32 line_size = itv->vbi.sliced_decoder_line_size; | 293 | u32 line_size = itv->vbi.sliced_decoder_line_size; |
294 | struct v4l2_decode_vbi_line vbi; | 294 | struct v4l2_decode_vbi_line vbi; |
295 | int i; | 295 | int i; |
296 | unsigned lines = 0; | ||
296 | 297 | ||
297 | /* find the first valid line */ | 298 | /* find the first valid line */ |
298 | for (i = 0; i < size; i++, buf++) { | 299 | for (i = 0; i < size; i++, buf++) { |
@@ -313,7 +314,8 @@ static u32 compress_sliced_buf(struct ivtv *itv, u32 line, u8 *buf, u32 size, u8 | |||
313 | } | 314 | } |
314 | vbi.p = p + 4; | 315 | vbi.p = p + 4; |
315 | itv->video_dec_func(itv, VIDIOC_INT_DECODE_VBI_LINE, &vbi); | 316 | itv->video_dec_func(itv, VIDIOC_INT_DECODE_VBI_LINE, &vbi); |
316 | if (vbi.type) { | 317 | if (vbi.type && !(lines & (1 << vbi.line))) { |
318 | lines |= 1 << vbi.line; | ||
317 | itv->vbi.sliced_data[line].id = vbi.type; | 319 | itv->vbi.sliced_data[line].id = vbi.type; |
318 | itv->vbi.sliced_data[line].field = vbi.is_second_field; | 320 | itv->vbi.sliced_data[line].field = vbi.is_second_field; |
319 | itv->vbi.sliced_data[line].line = vbi.line; | 321 | itv->vbi.sliced_data[line].line = vbi.line; |