aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/wm8994.c53
1 files changed, 29 insertions, 24 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index c80218f23bb9..f8355ac76a42 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -3007,34 +3007,39 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec,
3007 break; 3007 break;
3008 3008
3009 case SND_SOC_BIAS_OFF: 3009 case SND_SOC_BIAS_OFF:
3010 /* Switch over to startup biases */ 3010 if (codec->bias_level == SND_SOC_BIAS_STANDBY) {
3011 snd_soc_update_bits(codec, WM8994_ANTIPOP_2, 3011 /* Switch over to startup biases */
3012 WM8994_BIAS_SRC | WM8994_STARTUP_BIAS_ENA | 3012 snd_soc_update_bits(codec, WM8994_ANTIPOP_2,
3013 WM8994_VMID_BUF_ENA | 3013 WM8994_BIAS_SRC |
3014 WM8994_VMID_RAMP_MASK, 3014 WM8994_STARTUP_BIAS_ENA |
3015 WM8994_BIAS_SRC | WM8994_STARTUP_BIAS_ENA | 3015 WM8994_VMID_BUF_ENA |
3016 WM8994_VMID_BUF_ENA | 3016 WM8994_VMID_RAMP_MASK,
3017 (1 << WM8994_VMID_RAMP_SHIFT)); 3017 WM8994_BIAS_SRC |
3018 3018 WM8994_STARTUP_BIAS_ENA |
3019 /* Disable main biases */ 3019 WM8994_VMID_BUF_ENA |
3020 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1, 3020 (1 << WM8994_VMID_RAMP_SHIFT));
3021 WM8994_BIAS_ENA | WM8994_VMID_SEL_MASK, 0);
3022 3021
3023 /* Discharge line */ 3022 /* Disable main biases */
3024 snd_soc_update_bits(codec, WM8994_ANTIPOP_1, 3023 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1,
3025 WM8994_LINEOUT1_DISCH | 3024 WM8994_BIAS_ENA |
3026 WM8994_LINEOUT2_DISCH, 3025 WM8994_VMID_SEL_MASK, 0);
3027 WM8994_LINEOUT1_DISCH |
3028 WM8994_LINEOUT2_DISCH);
3029 3026
3030 msleep(5); 3027 /* Discharge line */
3028 snd_soc_update_bits(codec, WM8994_ANTIPOP_1,
3029 WM8994_LINEOUT1_DISCH |
3030 WM8994_LINEOUT2_DISCH,
3031 WM8994_LINEOUT1_DISCH |
3032 WM8994_LINEOUT2_DISCH);
3031 3033
3032 /* Switch off startup biases */ 3034 msleep(5);
3033 snd_soc_update_bits(codec, WM8994_ANTIPOP_2,
3034 WM8994_BIAS_SRC | WM8994_STARTUP_BIAS_ENA |
3035 WM8994_VMID_BUF_ENA |
3036 WM8994_VMID_RAMP_MASK, 0);
3037 3035
3036 /* Switch off startup biases */
3037 snd_soc_update_bits(codec, WM8994_ANTIPOP_2,
3038 WM8994_BIAS_SRC |
3039 WM8994_STARTUP_BIAS_ENA |
3040 WM8994_VMID_BUF_ENA |
3041 WM8994_VMID_RAMP_MASK, 0);
3042 }
3038 break; 3043 break;
3039 } 3044 }
3040 codec->bias_level = level; 3045 codec->bias_level = level;