summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-26 14:56:10 (GMT)
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-26 17:06:56 (GMT)
commit501bf0354df9348dcd199d7f6f57c13fed7a45cb (patch)
tree27c22c6a4a448f9522c3512d26ebd2b134842d08 /sound/soc
parentbe3f3f2ce6029d622d158de4274f86e3b47c9c03 (diff)
downloadlinux-fsl-qoriq-501bf0354df9348dcd199d7f6f57c13fed7a45cb.tar.xz
ASoC: wm8996: Put the microphone biases into bypass mode when idle
When we're not actively doing audio we don't need the microphone biases to be regulated, noise is not important when we are not looking at the audio signal. Save some power by putting the MICBIAS regulators into bypass mode when not doing audio. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm8996.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index 1fd6354..8af422e 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -1770,7 +1770,13 @@ static int wm8996_set_bias_level(struct snd_soc_codec *codec,
switch (level) {
case SND_SOC_BIAS_ON:
+ break;
case SND_SOC_BIAS_PREPARE:
+ /* Put the MICBIASes into regulating mode */
+ snd_soc_update_bits(codec, WM8996_MICBIAS_1,
+ WM8996_MICB1_MODE, 0);
+ snd_soc_update_bits(codec, WM8996_MICBIAS_2,
+ WM8996_MICB2_MODE, 0);
break;
case SND_SOC_BIAS_STANDBY:
@@ -1793,6 +1799,12 @@ static int wm8996_set_bias_level(struct snd_soc_codec *codec,
regcache_cache_only(codec->control_data, false);
regcache_sync(codec->control_data);
}
+
+ /* Bypass the MICBIASes for lowest power */
+ snd_soc_update_bits(codec, WM8996_MICBIAS_1,
+ WM8996_MICB1_MODE, WM8996_MICB1_MODE);
+ snd_soc_update_bits(codec, WM8996_MICBIAS_2,
+ WM8996_MICB2_MODE, WM8996_MICB2_MODE);
break;
case SND_SOC_BIAS_OFF: