diff options
Diffstat (limited to 'sound/soc/codecs/tlv320aic3x.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index b3175860bcb..94dc707d902 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -1069,7 +1069,8 @@ static int aic3x_set_bias_level(struct snd_soc_codec *codec, | |||
1069 | case SND_SOC_BIAS_ON: | 1069 | case SND_SOC_BIAS_ON: |
1070 | break; | 1070 | break; |
1071 | case SND_SOC_BIAS_PREPARE: | 1071 | case SND_SOC_BIAS_PREPARE: |
1072 | if (aic3x->master) { | 1072 | if (codec->bias_level == SND_SOC_BIAS_STANDBY && |
1073 | aic3x->master) { | ||
1073 | /* enable pll */ | 1074 | /* enable pll */ |
1074 | reg = aic3x_read_reg_cache(codec, AIC3X_PLL_PROGA_REG); | 1075 | reg = aic3x_read_reg_cache(codec, AIC3X_PLL_PROGA_REG); |
1075 | aic3x_write(codec, AIC3X_PLL_PROGA_REG, | 1076 | aic3x_write(codec, AIC3X_PLL_PROGA_REG, |
@@ -1077,15 +1078,16 @@ static int aic3x_set_bias_level(struct snd_soc_codec *codec, | |||
1077 | } | 1078 | } |
1078 | break; | 1079 | break; |
1079 | case SND_SOC_BIAS_STANDBY: | 1080 | case SND_SOC_BIAS_STANDBY: |
1080 | /* fall through and disable pll */ | 1081 | if (codec->bias_level == SND_SOC_BIAS_PREPARE && |
1081 | case SND_SOC_BIAS_OFF: | 1082 | aic3x->master) { |
1082 | if (aic3x->master) { | ||
1083 | /* disable pll */ | 1083 | /* disable pll */ |
1084 | reg = aic3x_read_reg_cache(codec, AIC3X_PLL_PROGA_REG); | 1084 | reg = aic3x_read_reg_cache(codec, AIC3X_PLL_PROGA_REG); |
1085 | aic3x_write(codec, AIC3X_PLL_PROGA_REG, | 1085 | aic3x_write(codec, AIC3X_PLL_PROGA_REG, |
1086 | reg & ~PLL_ENABLE); | 1086 | reg & ~PLL_ENABLE); |
1087 | } | 1087 | } |
1088 | break; | 1088 | break; |
1089 | case SND_SOC_BIAS_OFF: | ||
1090 | break; | ||
1089 | } | 1091 | } |
1090 | codec->bias_level = level; | 1092 | codec->bias_level = level; |
1091 | 1093 | ||