aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/msp3400-driver.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-10-17 06:24:20 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 06:56:41 -0400
commit0310871d8f71da4ad8643687fbc40f219a0dac4d (patch)
treedae49f63fd458fb708852ce68b320bd7cea13767 /drivers/media/video/msp3400-driver.c
parentf43402fa55bf5e7e190c176343015122f694857c (diff)
[media] msp3400: fix mute audio regression
The switch to the new control framework caused a regression where the audio was no longer unmuted after the carrier scan finished. The original code attempted to set the volume control to its current value in order to have the set-volume control code to be called that handles the volume and muting. However, the framework will not call that code unless the new volume value is different from the old. Instead we now call msp_s_ctrl directly. It is a bit of a hack: we really need a v4l2_ctrl_refresh_ctrl function for this (or something along those lines). Thanks to Andy Walls for bisecting this and to Shane Shrybman for reporting it! Reported-by: Shane Shrybman <shrybman@teksavvy.com> Thanks-to: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/msp3400-driver.c')
-rw-r--r--drivers/media/video/msp3400-driver.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c
index fe18a0ab7acb..b1763ac93ab3 100644
--- a/drivers/media/video/msp3400-driver.c
+++ b/drivers/media/video/msp3400-driver.c
@@ -381,7 +381,12 @@ static int msp_s_ctrl(struct v4l2_ctrl *ctrl)
381 381
382void msp_update_volume(struct msp_state *state) 382void msp_update_volume(struct msp_state *state)
383{ 383{
384 v4l2_ctrl_s_ctrl(state->volume, v4l2_ctrl_g_ctrl(state->volume)); 384 /* Force an update of the volume/mute cluster */
385 v4l2_ctrl_lock(state->volume);
386 state->volume->val = state->volume->cur.val;
387 state->muted->val = state->muted->cur.val;
388 msp_s_ctrl(state->volume);
389 v4l2_ctrl_unlock(state->volume);
385} 390}
386 391
387/* --- v4l2 ioctls --- */ 392/* --- v4l2 ioctls --- */