Skip to content

Commit

Permalink
ASoC: wm8994: Make sure we sync DAPM on WM8958 detection mode changes
Browse files Browse the repository at this point in the history
Normally this will have no effect as we set detection up at system startup
before DAPM syncs take effect, this will only be useful if the system
enables and disables detection at runtime.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Mar 4, 2012
1 parent 67109cb commit 7d464b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -3330,6 +3330,7 @@ int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
}

snd_soc_dapm_force_enable_pin(&codec->dapm, "CLK_SYS");
snd_soc_dapm_sync(&codec->dapm);

wm8994->micdet[0].jack = jack;
wm8994->jack_cb = cb;
Expand Down Expand Up @@ -3376,6 +3377,7 @@ int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
snd_soc_update_bits(codec, WM8958_MIC_DETECT_1,
WM8958_MICD_ENA, 0);
snd_soc_dapm_disable_pin(&codec->dapm, "CLK_SYS");
snd_soc_dapm_sync(&codec->dapm);
}

return 0;
Expand Down

0 comments on commit 7d464b2

Please sign in to comment.