Commit 3af41a33 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] wm8775: fix broken audio routing

Commit 5aa9ae5e inverted the mute control
state test in s_routing which caused the audio routing to fail. This broke
ivtv support for the Hauppauge video/audio input bracket (which adds additional
video and audio inputs) all the way back in kernel 2.6.36.
This fix fixes the condition and it also removes a nonsense check on the
balance control.
Bisected-by: default avatarRajil Saraswat <rajil.s@gmail.com>
Signed-off-by: default avatarAndy Walls <awalls@md.metrocast.net>
Reported-by: default avatarRajil Saraswat <rajil.s@gmail.com>
Tested-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org      # for v3.10 and up
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent dff04d34
...@@ -130,12 +130,10 @@ static int wm8775_s_routing(struct v4l2_subdev *sd, ...@@ -130,12 +130,10 @@ static int wm8775_s_routing(struct v4l2_subdev *sd,
return -EINVAL; return -EINVAL;
} }
state->input = input; state->input = input;
if (!v4l2_ctrl_g_ctrl(state->mute)) if (v4l2_ctrl_g_ctrl(state->mute))
return 0; return 0;
if (!v4l2_ctrl_g_ctrl(state->vol)) if (!v4l2_ctrl_g_ctrl(state->vol))
return 0; return 0;
if (!v4l2_ctrl_g_ctrl(state->bal))
return 0;
wm8775_set_audio(sd, 1); wm8775_set_audio(sd, 1);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment