Skip to content

Commit

Permalink
[media] msp3400: fix mute audio regression
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent f43402f commit 0310871
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/media/video/msp3400-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,12 @@ static int msp_s_ctrl(struct v4l2_ctrl *ctrl)

void msp_update_volume(struct msp_state *state)
{
v4l2_ctrl_s_ctrl(state->volume, v4l2_ctrl_g_ctrl(state->volume));
/* Force an update of the volume/mute cluster */
v4l2_ctrl_lock(state->volume);
state->volume->val = state->volume->cur.val;
state->muted->val = state->muted->cur.val;
msp_s_ctrl(state->volume);
v4l2_ctrl_unlock(state->volume);
}

/* --- v4l2 ioctls --- */
Expand Down

0 comments on commit 0310871

Please sign in to comment.