summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tvaudio.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-02-21 22:47:24 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2009-02-21 22:47:24 +0100
commitceb38ab7b287651e30d049e86e6469d4bcc3ea3b (patch)
tree117224f2cd44c28327d28f55bd0153dd7e99752d /linux/drivers/media/video/tvaudio.c
parentc0d72775f8fc3a3e551f233b3501ccf1ca23fe2a (diff)
downloadmediapointer-dvb-s2-ceb38ab7b287651e30d049e86e6469d4bcc3ea3b.tar.gz
mediapointer-dvb-s2-ceb38ab7b287651e30d049e86e6469d4bcc3ea3b.tar.bz2
v4l2-common: remove v4l2_ctrl_query_fill_std
From: Hans Verkuil <hverkuil@xs4all.nl> The v4l2_ctrl_query_fill_std() function wasn't one the best idea I ever had. It doesn't add anything valuable that cannot be expressed equally well with v4l2_ctrl_query_fill and only adds overhead. Replace it with v4l2_ctrl_query_fill() everywhere it is used and remove it from v4l2_common.c. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/tvaudio.c')
-rw-r--r--linux/drivers/media/video/tvaudio.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c
index 3ca242af5..e8a6893ff 100644
--- a/linux/drivers/media/video/tvaudio.c
+++ b/linux/drivers/media/video/tvaudio.c
@@ -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)