diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 64f179ee9834..5e8626ae612b 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -1121,6 +1121,7 @@ static int aic3x_regulator_event(struct notifier_block *nb, | |||
1121 | static int aic3x_set_power(struct snd_soc_codec *codec, int power) | 1121 | static int aic3x_set_power(struct snd_soc_codec *codec, int power) |
1122 | { | 1122 | { |
1123 | struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec); | 1123 | struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec); |
1124 | unsigned int pll_c, pll_d; | ||
1124 | int ret; | 1125 | int ret; |
1125 | 1126 | ||
1126 | if (power) { | 1127 | if (power) { |
@@ -1138,6 +1139,18 @@ static int aic3x_set_power(struct snd_soc_codec *codec, int power) | |||
1138 | /* Sync reg_cache with the hardware */ | 1139 | /* Sync reg_cache with the hardware */ |
1139 | regcache_cache_only(aic3x->regmap, false); | 1140 | regcache_cache_only(aic3x->regmap, false); |
1140 | regcache_sync(aic3x->regmap); | 1141 | regcache_sync(aic3x->regmap); |
1142 | |||
1143 | /* Rewrite paired PLL D registers in case cached sync skipped | ||
1144 | * writing one of them and thus caused other one also not | ||
1145 | * being written | ||
1146 | */ | ||
1147 | pll_c = snd_soc_read(codec, AIC3X_PLL_PROGC_REG); | ||
1148 | pll_d = snd_soc_read(codec, AIC3X_PLL_PROGD_REG); | ||
1149 | if (pll_c == aic3x_reg[AIC3X_PLL_PROGC_REG].def || | ||
1150 | pll_d == aic3x_reg[AIC3X_PLL_PROGD_REG].def) { | ||
1151 | snd_soc_write(codec, AIC3X_PLL_PROGC_REG, pll_c); | ||
1152 | snd_soc_write(codec, AIC3X_PLL_PROGD_REG, pll_d); | ||
1153 | } | ||
1141 | } else { | 1154 | } else { |
1142 | /* | 1155 | /* |
1143 | * Do soft reset to this codec instance in order to clear | 1156 | * Do soft reset to this codec instance in order to clear |