Skip to content

Commit

Permalink
ASoC: tlv320aic3x: Do soft reset to codec when going to bias off state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jarkko Nikula authored and Liam Girdwood committed May 23, 2011
1 parent 508b768 commit 9fb352b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sound/soc/codecs/tlv320aic3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,13 @@ static int aic3x_set_power(struct snd_soc_codec *codec, int power)
aic3x_init_3007(codec);
codec->cache_sync = 0;
} else {
/*
* Do soft reset to this codec instance in order to clear
* possible VDD leakage currents in case the supply regulators
* remain on
*/
snd_soc_write(codec, AIC3X_RESET, SOFT_RESET);
codec->cache_sync = 1;
aic3x->power = 0;
/* HW writes are needless when bias is off */
codec->cache_only = 1;
Expand Down

0 comments on commit 9fb352b

Please sign in to comment.