Skip to contentSkip to conversation

ASoC: Ensure SYSCLK is enabled for WM8958 accessory detection

PATCH New Mark Brown 1 participant 1 message Nov 29, 2011

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: Ensure SYSCLK is enabled for WM8958 accessory detection

Ensure SYSCLK is enabled while running accessory detection on WM8958. It is always required so there is no sense in requiring machine drivers to individually do this.

---
 sound/soc/codecs/wm8994.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
sound/soc/codecs/wm8994.c +3 -0
index 2e577e6..94c0efd 100644
@@ -2919,6 +2919,8 @@ int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
 			cb_data = codec;
 		}
 
+		snd_soc_dapm_force_enable_pin(&codec->dapm, "CLK_SYS");
+
 		wm8994->micdet[0].jack = jack;
 		wm8994->jack_cb = cb;
 		wm8994->jack_cb_data = cb_data;
@@ -2928,6 +2930,7 @@ int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
 	} else {
 		snd_soc_update_bits(codec, WM8958_MIC_DETECT_1,
 				    WM8958_MICD_ENA, 0);
+		snd_soc_dapm_disable_pin(&codec->dapm, "CLK_SYS");
 	}
 
 	return 0;
Signature · 1 line
1.7.7.3