diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-10-04 07:05:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-13 07:08:01 -0400 |
commit | a8b864354e060dda1000e62d1fea7c1274581caf (patch) | |
tree | 7b1e70dc49c1605a7cdad6b460ea9f602a24b161 /drivers/media/video/cx25840 | |
parent | 3c7b933bea2ee380d54b57b99dee42b1726a4eaa (diff) |
V4L/DVB (9162): ivtv: fix raw/sliced VBI mixup
The service_set field was used in saa7115 and cx25840 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 these drivers should checked on VIDIOC_S_FMT whether the type
field matches the raw or sliced VBI type.
Updated ivtv accordingly.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx25840')
-rw-r--r-- | drivers/media/video/cx25840/cx25840-vbi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/cx25840/cx25840-vbi.c b/drivers/media/video/cx25840/cx25840-vbi.c index 69f2bbdbb929..58e6ef1c28a0 100644 --- a/drivers/media/video/cx25840/cx25840-vbi.c +++ b/drivers/media/video/cx25840/cx25840-vbi.c | |||
@@ -141,10 +141,11 @@ int cx25840_vbi(struct i2c_client *client, 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 | ||