diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-05-27 06:25:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-06-18 19:52:51 -0400 |
commit | 54f6019b5860ec062d1149b3a97a5a63ad3e4da9 (patch) | |
tree | 87d4ed19bd81a3357bcfab4a37148d1a82f945e5 /sound | |
parent | e4cca4edbce693238ba4d75269db082f34da48bb (diff) |
[media] S_HW_FREQ_SEEK: set capability flags and return ENODATA instead of EAGAIN
Set the new capability flags in G_TUNER and return ENODATA if no channels
were found.
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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index 582aace20ea3..ba2bc511d777 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c | |||
@@ -191,6 +191,8 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
191 | strcpy(v->name, "FM"); | 191 | strcpy(v->name, "FM"); |
192 | v->type = V4L2_TUNER_RADIO; | 192 | v->type = V4L2_TUNER_RADIO; |
193 | v->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO; | 193 | v->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO; |
194 | if (!tea->cannot_read_data) | ||
195 | v->capability |= V4L2_TUNER_CAP_HWSEEK_BOUNDED; | ||
194 | v->rangelow = FREQ_LO; | 196 | v->rangelow = FREQ_LO; |
195 | v->rangehigh = FREQ_HI; | 197 | v->rangehigh = FREQ_HI; |
196 | v->rxsubchans = tea->stereo ? V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO; | 198 | v->rxsubchans = tea->stereo ? V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO; |
@@ -299,7 +301,7 @@ static int vidioc_s_hw_freq_seek(struct file *file, void *fh, | |||
299 | } | 301 | } |
300 | tea->val &= ~TEA575X_BIT_SEARCH; | 302 | tea->val &= ~TEA575X_BIT_SEARCH; |
301 | snd_tea575x_set_freq(tea); | 303 | snd_tea575x_set_freq(tea); |
302 | return -EAGAIN; | 304 | return -ENODATA; |
303 | } | 305 | } |
304 | 306 | ||
305 | static int tea575x_s_ctrl(struct v4l2_ctrl *ctrl) | 307 | static int tea575x_s_ctrl(struct v4l2_ctrl *ctrl) |