summaryrefslogtreecommitdiffstats
path: root/sound/i2c/other
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-05-27 07:25:06 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-06-18 20:52:51 -0300
commit54f6019b5860ec062d1149b3a97a5a63ad3e4da9 (patch)
tree87d4ed19bd81a3357bcfab4a37148d1a82f945e5 /sound/i2c/other
parente4cca4edbce693238ba4d75269db082f34da48bb (diff)
downloadop-kernel-dev-54f6019b5860ec062d1149b3a97a5a63ad3e4da9.zip
op-kernel-dev-54f6019b5860ec062d1149b3a97a5a63ad3e4da9.tar.gz
[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/i2c/other')
-rw-r--r--sound/i2c/other/tea575x-tuner.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c
index 582aace..ba2bc51 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,
strcpy(v->name, "FM");
v->type = V4L2_TUNER_RADIO;
v->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;
+ if (!tea->cannot_read_data)
+ v->capability |= V4L2_TUNER_CAP_HWSEEK_BOUNDED;
v->rangelow = FREQ_LO;
v->rangehigh = FREQ_HI;
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,
}
tea->val &= ~TEA575X_BIT_SEARCH;
snd_tea575x_set_freq(tea);
- return -EAGAIN;
+ return -ENODATA;
}
static int tea575x_s_ctrl(struct v4l2_ctrl *ctrl)
OpenPOWER on IntegriCloud