]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ASoC: TWL4030: DAC power optimization
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>
Tue, 13 Jul 2010 09:07:44 +0000 (12:07 +0300)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Tue, 13 Jul 2010 10:30:12 +0000 (11:30 +0100)
Restructure the DAPM connections in order to enable
only the needed DAC (out of four in twl4030 series).
I need to keep the 'AIF Enable' supply connected to
the L2/R2 digital path, since the digital loopback
needs AIF and APLL running.
If no valid route available, than none of the DAC will
be powered, but the AIF and APLL is going to be enabled.
Furthermore, if only one audio path have valid route,
than only the corresponding DAC will be powered.

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

index d7f0048273c1bf1127bce93df4d663d4c1a2fe70..6fd6d0b1055504507cc15141a744e2fdb4c3afbd 100644 (file)
@@ -1460,8 +1460,11 @@ static const struct snd_soc_dapm_route intercon[] = {
        /* Supply for the digital part (APLL) */
        {"Digital Voice Playback Mixer", NULL, "APLL Enable"},
 
-       {"Digital R1 Playback Mixer", NULL, "AIF Enable"},
-       {"Digital L1 Playback Mixer", NULL, "AIF Enable"},
+       {"DAC Left1", NULL, "AIF Enable"},
+       {"DAC Right1", NULL, "AIF Enable"},
+       {"DAC Left2", NULL, "AIF Enable"},
+       {"DAC Right1", NULL, "AIF Enable"},
+
        {"Digital R2 Playback Mixer", NULL, "AIF Enable"},
        {"Digital L2 Playback Mixer", NULL, "AIF Enable"},
 
@@ -1532,10 +1535,10 @@ static const struct snd_soc_dapm_route intercon[] = {
 
        /* outputs */
        /* Must be always connected (for AIF and APLL) */
-       {"Virtual HiFi OUT", NULL, "Digital L1 Playback Mixer"},
-       {"Virtual HiFi OUT", NULL, "Digital R1 Playback Mixer"},
-       {"Virtual HiFi OUT", NULL, "Digital L2 Playback Mixer"},
-       {"Virtual HiFi OUT", NULL, "Digital R2 Playback Mixer"},
+       {"Virtual HiFi OUT", NULL, "DAC Left1"},
+       {"Virtual HiFi OUT", NULL, "DAC Right1"},
+       {"Virtual HiFi OUT", NULL, "DAC Left2"},
+       {"Virtual HiFi OUT", NULL, "DAC Right2"},
        /* Must be always connected (for APLL) */
        {"Virtual Voice OUT", NULL, "Digital Voice Playback Mixer"},
        /* Physical outputs */