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

Commit 3088e3b4 authored by Stephen Warren's avatar Stephen Warren Committed by Mark Brown
Browse files

ASoC: WM8903: Fix mic detection enable logic



The mic detection HW should be enabled when either mic or short detection
is required, not when only both are required.

Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
parent 28d639f7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1482,7 +1482,7 @@ int wm8903_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
			    WM8903_MICDET_EINT | WM8903_MICSHRT_EINT,
			    irq_mask);

	if (det && shrt) {
	if (det || shrt) {
		/* Enable mic detection, this may not have been set through
		 * platform data (eg, if the defaults are OK). */
		snd_soc_update_bits(codec, WM8903_WRITE_SEQUENCER_0,