Commit 65397995 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] tea575x-tuner: mark VIDIOC_S_HW_FREQ_SEEK as an invalid ioctl

The tea575x-tuner framework can support the VIDIOC_S_HW_FREQ_SEEK for only
some of the tea575x-based boards. Mark this ioctl as invalid if the board
doesn't support it.

This fixes an issue with S_HW_FREQ_SEEK in combination with priority handling:
since the priority check is done first it could return -EBUSY, even though
calling the S_HW_FREQ_SEEK ioctl would return -ENOTTY. It should always return
ENOTTY in such a case.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 48ea0be0
......@@ -375,6 +375,9 @@ int snd_tea575x_init(struct snd_tea575x *tea)
tea->vd.v4l2_dev = tea->v4l2_dev;
tea->vd.ctrl_handler = &tea->ctrl_handler;
set_bit(V4L2_FL_USE_FH_PRIO, &tea->vd.flags);
/* disable hw_freq_seek if we can't use it */
if (tea->cannot_read_data)
v4l2_dont_use_cmd(&tea->vd, VIDIOC_S_HW_FREQ_SEEK);
v4l2_ctrl_handler_init(&tea->ctrl_handler, 1);
v4l2_ctrl_new_std(&tea->ctrl_handler, &tea575x_ctrl_ops, V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment