]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: tlv320dac33: Power down digital parts, when not needed
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>
Fri, 10 Dec 2010 11:26:31 +0000 (13:26 +0200)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Fri, 10 Dec 2010 22:50:12 +0000 (22:50 +0000)
commit19d0d3b72db2b8d825f47367a60ac22fc9577f46
tree3124cf31d0952b1a773dbc64999d2e6fa23b84c8
parent6088f9a6b76071a36dde65fb40052744f36d00eb
ASoC: tlv320dac33: Power down digital parts, when not needed

If the following scenario has been followed:
1. Enable analog bypass
amixer sset 'Analog Left Bypass' on
amixer sset 'Analog Right Bypass' on

2. Start playback
aplay -fdat -d3 /dev/zero

After the playback stopped (3 sec), and the soc timeout (5 sec),
the digital parts of the codec will remain powered up.
This means that the DAI clocks are continue to run, the
oscillator remain operational, etc.

Use the SND_SOC_DAPM_POST_PMD widget to get notification
about the stopped stream, and power down the digital
part of the codec.
If the analog bypass is enabled, than the codec will remain in
BIAS_ON level, and things will work correctly.
In case, if the bypass is disabled, than the codec will
fall to BIAS_STANDBY than to BIAS_OFF level, as it used
to.

The digital part of DAC33 is initialized at every stream start
(DAPM_PRE:PRE_PMU event), so subsequent streams (within 5 sec)
will have working DAI.
When the codec is coming out from BIAS_OFF, the full power-up
sequence followed by the same DAPM_PRE widget event will power up
the digital part.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
sound/soc/codecs/tlv320dac33.c