]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ASoC: Don't mark the outputs of supplies as dirty on state changes
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 4 Oct 2011 21:43:31 +0000 (22:43 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 5 Oct 2011 10:22:30 +0000 (11:22 +0100)
The whole point of supply widgets is that they aren't inputs to their
sinks so a state change in a supply should never affect the state of the
widget being supplied and we don't need to mark them as dirty.

           Power    Path   Neighbour
Before:    69       727    905
After:     63       607    731

This is particularly useful where supplies affect large portions of the
chip (eg, a bandgap supplying the analogue sections).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-dapm.c

index c39146d435e227217ce12cb68376332230863cc1..cbca1ddb66192743e2ab2d3be242f07a1b8c2e5c 100644 (file)
@@ -1260,11 +1260,18 @@ static void dapm_widget_set_power(struct snd_soc_dapm_widget *w, bool power,
                                                   path->connect);
                }
        }
-       list_for_each_entry(path, &w->sinks, list_source) {
-               if (path->sink) {
-                       dapm_widget_set_peer_power(path->sink, power,
-                                                  path->connect);
+       switch (w->id) {
+       case snd_soc_dapm_supply:
+               /* Supplies can't affect their outputs, only their inputs */
+               break;
+       default:
+               list_for_each_entry(path, &w->sinks, list_source) {
+                       if (path->sink) {
+                               dapm_widget_set_peer_power(path->sink, power,
+                                                          path->connect);
+                       }
                }
+               break;
        }
 
        if (power)