Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f9c82c0 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c5c46f26
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
@@ -238,6 +238,19 @@ static int ivtv_prep_dev(struct ivtv *itv, int type)
	s->vdev->release = video_device_release;
	s->vdev->release = video_device_release;
	s->vdev->tvnorms = V4L2_STD_ALL;
	s->vdev->tvnorms = V4L2_STD_ALL;
	s->vdev->lock = &itv->serialize_lock;
	s->vdev->lock = &itv->serialize_lock;
	if (s->type == IVTV_DEC_STREAM_TYPE_VBI) {
		v4l2_disable_ioctl(s->vdev, VIDIOC_S_AUDIO);
		v4l2_disable_ioctl(s->vdev, VIDIOC_G_AUDIO);
		v4l2_disable_ioctl(s->vdev, VIDIOC_ENUMAUDIO);
		v4l2_disable_ioctl(s->vdev, VIDIOC_ENUMINPUT);
		v4l2_disable_ioctl(s->vdev, VIDIOC_S_INPUT);
		v4l2_disable_ioctl(s->vdev, VIDIOC_G_INPUT);
		v4l2_disable_ioctl(s->vdev, VIDIOC_S_FREQUENCY);
		v4l2_disable_ioctl(s->vdev, VIDIOC_G_FREQUENCY);
		v4l2_disable_ioctl(s->vdev, VIDIOC_S_TUNER);
		v4l2_disable_ioctl(s->vdev, VIDIOC_G_TUNER);
		v4l2_disable_ioctl(s->vdev, VIDIOC_S_STD);
	}
	set_bit(V4L2_FL_USE_FH_PRIO, &s->vdev->flags);
	set_bit(V4L2_FL_USE_FH_PRIO, &s->vdev->flags);
	ivtv_set_funcs(s->vdev);
	ivtv_set_funcs(s->vdev);
	return 0;
	return 0;