Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -130,12 +130,10 @@ static int wm8775_s_routing(struct v4l2_subdev *sd,
		return -EINVAL;
	}
	state->input = input;
	if (!v4l2_ctrl_g_ctrl(state->mute))
	if (v4l2_ctrl_g_ctrl(state->mute))
		return 0;
	if (!v4l2_ctrl_g_ctrl(state->vol))
		return 0;
	if (!v4l2_ctrl_g_ctrl(state->bal))
		return 0;
	wm8775_set_audio(sd, 1);
	return 0;
}