summaryrefslogtreecommitdiff
path: root/drivers/media/pci/saa7134/saa7134-video.c
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2013-02-01 23:01:18 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-14 22:27:09 (GMT)
commitce5bdd52629ebb50f65db03e6dfa9c96697d0d40 (patch)
tree1c1b4ce16a6b61e3fef7d01a4f922c14a5208619 /drivers/media/pci/saa7134/saa7134-video.c
parent0a5ea88b31bed56350939c6a99c4cd58904baa66 (diff)
downloadlinux-ce5bdd52629ebb50f65db03e6dfa9c96697d0d40.tar.xz
[media] saa7134: v4l2-compliance: fix g_tuner/s_tuner
Make saa7134 driver more V4L2 compliant: return real frequency range in g_tuner and fail in s_tuner for non-zero tuner Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci/saa7134/saa7134-video.c')
-rw-r--r--drivers/media/pci/saa7134/saa7134-video.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
index 506a9f4..b832684 100644
--- a/drivers/media/pci/saa7134/saa7134-video.c
+++ b/drivers/media/pci/saa7134/saa7134-video.c
@@ -2014,11 +2014,11 @@ static int saa7134_g_tuner(struct file *file, void *priv,
if (NULL != card_in(dev, n).name) {
strcpy(t->name, "Television");
t->type = V4L2_TUNER_ANALOG_TV;
+ saa_call_all(dev, tuner, g_tuner, t);
t->capability = V4L2_TUNER_CAP_NORM |
V4L2_TUNER_CAP_STEREO |
V4L2_TUNER_CAP_LANG1 |
V4L2_TUNER_CAP_LANG2;
- t->rangehigh = 0xffffffffUL;
t->rxsubchans = saa7134_tvaudio_getstereo(dev);
t->audmode = saa7134_tvaudio_rx2mode(t->rxsubchans);
}
@@ -2034,6 +2034,9 @@ static int saa7134_s_tuner(struct file *file, void *priv,
struct saa7134_dev *dev = fh->dev;
int rx, mode;
+ if (0 != t->index)
+ return -EINVAL;
+
mode = dev->thread.mode;
if (UNSET == mode) {
rx = saa7134_tvaudio_getstereo(dev);