diff options
author | Jarkko Nikula <jhnikula@gmail.com> | 2011-05-20 09:52:38 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@ti.com> | 2011-05-23 05:36:44 -0400 |
commit | 9fb352b18b11124ed1ddebc0d74ebbd7ba8defd7 (patch) | |
tree | eba7979bf81596d16d28fdc28fcd13a45f1650de | |
parent | 508b76864c18f34f8d6ba08d192f5817f8dc8ead (diff) |
ASoC: tlv320aic3x: Do soft reset to codec when going to bias off state
TLV320AIC33, TLV320AIC34 and I believe others too in this family have some
hw bugs that cause that analogue and digital VDD supplies remain leaking
up to a few mA of current after certain use cases even the hw blocks inside
codec are driven to off.
Highest leakages occur after using the bypass paths inside codec but it
is possible to get smaller leakages just by toggling mute switches in
unused audio paths (i.e. no DAPM changes) while codec is on due another
active audio path.
While some cases are able to workaroud by making sure that e.g. output mixer
switches are muted before powering down the output stage this doesn't help
all the cases.
Therefore use the software reset command to clear possible leakage currents
since that works in every cases and affects only this codec instance. Only
drawback is that now cache sync is required everytime when codec bias comes
out from bias off state, not only when supply regulators were off.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 9047bb173c6b..789453d44ec5 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -1120,6 +1120,13 @@ static int aic3x_set_power(struct snd_soc_codec *codec, int power) | |||
1120 | aic3x_init_3007(codec); | 1120 | aic3x_init_3007(codec); |
1121 | codec->cache_sync = 0; | 1121 | codec->cache_sync = 0; |
1122 | } else { | 1122 | } else { |
1123 | /* | ||
1124 | * Do soft reset to this codec instance in order to clear | ||
1125 | * possible VDD leakage currents in case the supply regulators | ||
1126 | * remain on | ||
1127 | */ | ||
1128 | snd_soc_write(codec, AIC3X_RESET, SOFT_RESET); | ||
1129 | codec->cache_sync = 1; | ||
1123 | aic3x->power = 0; | 1130 | aic3x->power = 0; |
1124 | /* HW writes are needless when bias is off */ | 1131 | /* HW writes are needless when bias is off */ |
1125 | codec->cache_only = 1; | 1132 | codec->cache_only = 1; |