aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/wm8731.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 816e5bf9edc1..c6db67793777 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -396,21 +396,19 @@ static int wm8731_set_dai_fmt(struct snd_soc_dai *codec_dai,
396static int wm8731_set_bias_level(struct snd_soc_codec *codec, 396static int wm8731_set_bias_level(struct snd_soc_codec *codec,
397 enum snd_soc_bias_level level) 397 enum snd_soc_bias_level level)
398{ 398{
399 u16 reg = wm8731_read_reg_cache(codec, WM8731_PWR) & 0xff7f; 399 u16 reg;
400 400
401 switch (level) { 401 switch (level) {
402 case SND_SOC_BIAS_ON: 402 case SND_SOC_BIAS_ON:
403 /* vref/mid, osc on, dac unmute */
404 wm8731_write(codec, WM8731_PWR, reg);
405 break; 403 break;
406 case SND_SOC_BIAS_PREPARE: 404 case SND_SOC_BIAS_PREPARE:
407 break; 405 break;
408 case SND_SOC_BIAS_STANDBY: 406 case SND_SOC_BIAS_STANDBY:
409 /* everything off except vref/vmid, */ 407 /* Clear PWROFF, gate CLKOUT, everything else as-is */
408 reg = wm8731_read_reg_cache(codec, WM8731_PWR) & 0xff7f;
410 wm8731_write(codec, WM8731_PWR, reg | 0x0040); 409 wm8731_write(codec, WM8731_PWR, reg | 0x0040);
411 break; 410 break;
412 case SND_SOC_BIAS_OFF: 411 case SND_SOC_BIAS_OFF:
413 /* everything off, dac mute, inactive */
414 wm8731_write(codec, WM8731_ACTIVE, 0x0); 412 wm8731_write(codec, WM8731_ACTIVE, 0x0);
415 wm8731_write(codec, WM8731_PWR, 0xffff); 413 wm8731_write(codec, WM8731_PWR, 0xffff);
416 break; 414 break;