diff options
author | Andy Walls <awalls@radix.net> | 2008-12-12 14:24:04 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:38:32 -0500 |
commit | dd073434b5285121007860914a004320d644ee7e (patch) | |
tree | 8ead658f43d30b68c07bea8b8f868835da7e5331 /drivers/media/video/cx18/cx18-av-vbi.c | |
parent | abb096de82f6f920a06ca935f76925261e66b556 (diff) |
V4L/DVB (9805): cx18: Port fix for raw/sliced VBI mixup from ivtv and cx25840
This is a port of the fixes Hans Verkuil made for ivtv/cx25840:
The service_set field was used to determine whether raw or sliced VBI was
desired. This is incorrect since it is perfectly valid to select sliced VBI
with a service_set of 0.
Instead the driver should check on VIDIOC_S_FMT whether the type
field matches the raw or sliced VBI type.
Updated the cx18 driver accordingly, including an additional check in
cx18_start_v4l2_encode_stream() that didn't exist in ivtv.
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/cx18/cx18-av-vbi.c b/drivers/media/video/cx18/cx18-av-vbi.c index 02fdf57bb678..1527ea4f6b06 100644 --- a/drivers/media/video/cx18/cx18-av-vbi.c +++ b/drivers/media/video/cx18/cx18-av-vbi.c | |||
@@ -141,10 +141,11 @@ int cx18_av_vbi(struct cx18 *cx, unsigned int cmd, void *arg) | |||
141 | u8 lcr[24]; | 141 | u8 lcr[24]; |
142 | 142 | ||
143 | fmt = arg; | 143 | fmt = arg; |
144 | if (fmt->type != V4L2_BUF_TYPE_SLICED_VBI_CAPTURE) | 144 | if (fmt->type != V4L2_BUF_TYPE_SLICED_VBI_CAPTURE && |
145 | fmt->type != V4L2_BUF_TYPE_VBI_CAPTURE) | ||
145 | return -EINVAL; | 146 | return -EINVAL; |
146 | svbi = &fmt->fmt.sliced; | 147 | svbi = &fmt->fmt.sliced; |
147 | if (svbi->service_set == 0) { | 148 | if (fmt->type == V4L2_BUF_TYPE_VBI_CAPTURE) { |
148 | /* raw VBI */ | 149 | /* raw VBI */ |
149 | memset(svbi, 0, sizeof(*svbi)); | 150 | memset(svbi, 0, sizeof(*svbi)); |
150 | 151 | ||