Skip to content

Commit

Permalink
ASoC: Ensure SYSCLK is enabled for WM8958 accessory detection
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Nov 29, 2011
1 parent 38fd54e commit 4cdf5e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -3016,6 +3016,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;
Expand All @@ -3025,6 +3027,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;
Expand Down

0 comments on commit 4cdf5e4

Please sign in to comment.