diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-05-10 02:16:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 08:17:52 -0400 |
commit | 6539799599f50e9ce36da784ee0f545540a9732c (patch) | |
tree | c7582159cab3b4293c8440c48000404b916ecc45 /sound | |
parent | 48ea0be06028d97b57602372f032afbec02e7e97 (diff) |
[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: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/i2c/other/tea575x-tuner.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index a63faec5e7fd..6e9ca7bd0f11 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c | |||
@@ -375,6 +375,9 @@ int snd_tea575x_init(struct snd_tea575x *tea) | |||
375 | tea->vd.v4l2_dev = tea->v4l2_dev; | 375 | tea->vd.v4l2_dev = tea->v4l2_dev; |
376 | tea->vd.ctrl_handler = &tea->ctrl_handler; | 376 | tea->vd.ctrl_handler = &tea->ctrl_handler; |
377 | set_bit(V4L2_FL_USE_FH_PRIO, &tea->vd.flags); | 377 | set_bit(V4L2_FL_USE_FH_PRIO, &tea->vd.flags); |
378 | /* disable hw_freq_seek if we can't use it */ | ||
379 | if (tea->cannot_read_data) | ||
380 | v4l2_dont_use_cmd(&tea->vd, VIDIOC_S_HW_FREQ_SEEK); | ||
378 | 381 | ||
379 | v4l2_ctrl_handler_init(&tea->ctrl_handler, 1); | 382 | v4l2_ctrl_handler_init(&tea->ctrl_handler, 1); |
380 | v4l2_ctrl_new_std(&tea->ctrl_handler, &tea575x_ctrl_ops, V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1); | 383 | v4l2_ctrl_new_std(&tea->ctrl_handler, &tea575x_ctrl_ops, V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1); |