aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8990.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-17 12:11:14 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-17 12:26:51 -0500
commit2adb9833d1782262c20b21457d645163928cf2a2 (patch)
tree3e80484273c24359f53516e7eae82af748659518 /sound/soc/codecs/wm8990.c
parentbe1b87c70af69acfadb8a27a7a76dfb61de92643 (diff)
ASoC: Manage VMID mode for WM8990
A small additional power saving can be achieved for the WM8990 by maintaining VMID using a 2*250k divider when in standby mode. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8990.c')
-rw-r--r--sound/soc/codecs/wm8990.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index 938e15429207..2d7b0096d929 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -1222,8 +1222,14 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec,
1222 switch (level) { 1222 switch (level) {
1223 case SND_SOC_BIAS_ON: 1223 case SND_SOC_BIAS_ON:
1224 break; 1224 break;
1225
1225 case SND_SOC_BIAS_PREPARE: 1226 case SND_SOC_BIAS_PREPARE:
1227 /* VMID=2*50k */
1228 val = wm8990_read_reg_cache(codec, WM8990_POWER_MANAGEMENT_1) &
1229 ~WM8990_VMID_MODE_MASK;
1230 wm8990_write(codec, WM8990_POWER_MANAGEMENT_1, val | 0x2);
1226 break; 1231 break;
1232
1227 case SND_SOC_BIAS_STANDBY: 1233 case SND_SOC_BIAS_STANDBY:
1228 if (codec->bias_level == SND_SOC_BIAS_OFF) { 1234 if (codec->bias_level == SND_SOC_BIAS_OFF) {
1229 /* Enable all output discharge bits */ 1235 /* Enable all output discharge bits */
@@ -1278,6 +1284,11 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec,
1278 wm8990_write(codec, WM8990_EXT_CTL1, 0xa003); 1284 wm8990_write(codec, WM8990_EXT_CTL1, 0xa003);
1279 wm8990_write(codec, WM8990_EXT_ACCESS_ENA, 0); 1285 wm8990_write(codec, WM8990_EXT_ACCESS_ENA, 0);
1280 } 1286 }
1287
1288 /* VMID=2*250k */
1289 val = wm8990_read_reg_cache(codec, WM8990_POWER_MANAGEMENT_1) &
1290 ~WM8990_VMID_MODE_MASK;
1291 wm8990_write(codec, WM8990_POWER_MANAGEMENT_1, val | 0x4);
1281 break; 1292 break;
1282 1293
1283 case SND_SOC_BIAS_OFF: 1294 case SND_SOC_BIAS_OFF: