summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tvaudio.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-02-26 22:19:36 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-02-26 22:19:36 -0300
commite46833c20d935275819ec7699848db8bf7fc95c6 (patch)
tree6bc18657f5b3ea20ebad3d7800380a953b911278 /linux/drivers/media/video/tvaudio.c
parent2ea01ce1b95e74d54c08e88437218f26d2f5ac87 (diff)
parent9f6504985990a61609caaa94fac0724d11be4803 (diff)
downloadmediapointer-dvb-s2-e46833c20d935275819ec7699848db8bf7fc95c6.tar.gz
mediapointer-dvb-s2-e46833c20d935275819ec7699848db8bf7fc95c6.tar.bz2
merge: http://linuxtv.org/hg/~awalls/cx18
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/tvaudio.c')
-rw-r--r--linux/drivers/media/video/tvaudio.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c
index 3ca242af5..755418a31 100644
--- a/linux/drivers/media/video/tvaudio.c
+++ b/linux/drivers/media/video/tvaudio.c
@@ -26,7 +26,7 @@
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/slab.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/kthread.h>
@@ -1644,21 +1644,24 @@ static int tvaudio_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
switch (qc->id) {
case V4L2_CID_AUDIO_MUTE:
- break;
+ return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
case V4L2_CID_AUDIO_VOLUME:
+ if (desc->flags & CHIP_HAS_VOLUME)
+ return v4l2_ctrl_query_fill(qc, 0, 65535, 65535 / 100, 58880);
+ break;
case V4L2_CID_AUDIO_BALANCE:
- if (!(desc->flags & CHIP_HAS_VOLUME))
- return -EINVAL;
+ if (desc->flags & CHIP_HAS_VOLUME)
+ return v4l2_ctrl_query_fill(qc, 0, 65535, 65535 / 100, 32768);
break;
case V4L2_CID_AUDIO_BASS:
case V4L2_CID_AUDIO_TREBLE:
- if (!(desc->flags & CHIP_HAS_BASSTREBLE))
- return -EINVAL;
+ if (desc->flags & CHIP_HAS_BASSTREBLE)
+ return v4l2_ctrl_query_fill(qc, 0, 65535, 65535 / 100, 32768);
break;
default:
- return -EINVAL;
+ break;
}
- return v4l2_ctrl_query_fill_std(qc);
+ return -EINVAL;
}
static int tvaudio_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *rt)