diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 7ed3051554c1..477b9b67eaeb 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -1146,11 +1146,25 @@ static int vidioc_s_ctrl(struct file *file, void *priv, | |||
1146 | else | 1146 | else |
1147 | rc = 1; | 1147 | rc = 1; |
1148 | 1148 | ||
1149 | /* It were not an AC97 control. Sends it to the v4l2 dev interface */ | 1149 | /* It isn't an AC97 control. Sends it to the v4l2 dev interface */ |
1150 | if (rc == 1) { | 1150 | if (rc == 1) { |
1151 | v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_ctrl, ctrl); | 1151 | v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_ctrl, ctrl); |
1152 | /* FIXME: should be returning a meaninful value */ | 1152 | |
1153 | rc = 0; | 1153 | /* |
1154 | * In the case of non-AC97 volume controls, we still need | ||
1155 | * to do some setups at em28xx, in order to mute/unmute | ||
1156 | * and to adjust audio volume. However, the value ranges | ||
1157 | * should be checked by the corresponding V4L subdriver. | ||
1158 | */ | ||
1159 | switch (ctrl->id) { | ||
1160 | case V4L2_CID_AUDIO_MUTE: | ||
1161 | dev->mute = ctrl->value; | ||
1162 | rc = em28xx_audio_analog_set(dev); | ||
1163 | break; | ||
1164 | case V4L2_CID_AUDIO_VOLUME: | ||
1165 | dev->volume = ctrl->value; | ||
1166 | rc = em28xx_audio_analog_set(dev); | ||
1167 | } | ||
1154 | } | 1168 | } |
1155 | 1169 | ||
1156 | mutex_unlock(&dev->lock); | 1170 | mutex_unlock(&dev->lock); |