diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-05 11:28:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-01 16:23:24 -0400 |
commit | 5f9c82c021cca74ad9a2dd48353c01bad567815e (patch) | |
tree | bbfe0ae200d92e334c69f04a5cf04ea8ccb624d6 | |
parent | c5c46f26591e2c77fa9b78fac202db90428762b0 (diff) |
[media] ivtv: disable a bunch of ioctls that are invalid for the decoder VBI
The VBI capture for the decoder (/dev/vbi8) is special in that it captures
the VBI stream embedded in an MPEG stream that is being decoded.
A lot of the ioctls that would normally be valid have to be disabled since
they make no sense for such a device, and v4l2-compliance will complain
about that.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-streams.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-streams.c b/drivers/media/pci/ivtv/ivtv-streams.c index 3455f465ff13..70dad588a677 100644 --- a/drivers/media/pci/ivtv/ivtv-streams.c +++ b/drivers/media/pci/ivtv/ivtv-streams.c | |||
@@ -238,6 +238,19 @@ static int ivtv_prep_dev(struct ivtv *itv, int type) | |||
238 | s->vdev->release = video_device_release; | 238 | s->vdev->release = video_device_release; |
239 | s->vdev->tvnorms = V4L2_STD_ALL; | 239 | s->vdev->tvnorms = V4L2_STD_ALL; |
240 | s->vdev->lock = &itv->serialize_lock; | 240 | s->vdev->lock = &itv->serialize_lock; |
241 | if (s->type == IVTV_DEC_STREAM_TYPE_VBI) { | ||
242 | v4l2_disable_ioctl(s->vdev, VIDIOC_S_AUDIO); | ||
243 | v4l2_disable_ioctl(s->vdev, VIDIOC_G_AUDIO); | ||
244 | v4l2_disable_ioctl(s->vdev, VIDIOC_ENUMAUDIO); | ||
245 | v4l2_disable_ioctl(s->vdev, VIDIOC_ENUMINPUT); | ||
246 | v4l2_disable_ioctl(s->vdev, VIDIOC_S_INPUT); | ||
247 | v4l2_disable_ioctl(s->vdev, VIDIOC_G_INPUT); | ||
248 | v4l2_disable_ioctl(s->vdev, VIDIOC_S_FREQUENCY); | ||
249 | v4l2_disable_ioctl(s->vdev, VIDIOC_G_FREQUENCY); | ||
250 | v4l2_disable_ioctl(s->vdev, VIDIOC_S_TUNER); | ||
251 | v4l2_disable_ioctl(s->vdev, VIDIOC_G_TUNER); | ||
252 | v4l2_disable_ioctl(s->vdev, VIDIOC_S_STD); | ||
253 | } | ||
241 | set_bit(V4L2_FL_USE_FH_PRIO, &s->vdev->flags); | 254 | set_bit(V4L2_FL_USE_FH_PRIO, &s->vdev->flags); |
242 | ivtv_set_funcs(s->vdev); | 255 | ivtv_set_funcs(s->vdev); |
243 | return 0; | 256 | return 0; |