aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-03 16:06:40 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-04 11:50:20 -0400
commitdb432b414e20b7218bbd91654d7be9c524a4337a (patch)
tree5bd14d5a82768553518184e1bf309ad463ce4384 /include/sound
parent565631008f6dd27c3e975c2103141f344d80b84e (diff)
ASoC: Do DAPM power checks only for widgets changed since last run
In order to reduce the number of DAPM power checks we run keep a list of widgets which have been changed since the last DAPM run and iterate over that rather than the full widget list. Whenever we change the power state for a widget we add all the source and sink widgets it has to the dirty list, ensuring that all widgets in the path are checked. This covers more widgets than we need to as some of the neighbour widgets won't be connected but it's simpler as a first step. On one system I tried this gave: Power Path Neighbour Before: 207 1939 2461 After: 114 1066 1327 which seems useful. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dapm.h1
-rw-r--r--include/sound/soc.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index bb5953219d0b..c080635b3c35 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -492,6 +492,7 @@ struct snd_soc_dapm_widget {
492 492
493 /* used during DAPM updates */ 493 /* used during DAPM updates */
494 struct list_head power_list; 494 struct list_head power_list;
495 struct list_head dirty;
495}; 496};
496 497
497struct snd_soc_dapm_update { 498struct snd_soc_dapm_update {
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 9d0524a3a7f8..8ab1cfed1067 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -826,6 +826,7 @@ struct snd_soc_card {
826 struct list_head widgets; 826 struct list_head widgets;
827 struct list_head paths; 827 struct list_head paths;
828 struct list_head dapm_list; 828 struct list_head dapm_list;
829 struct list_head dapm_dirty;
829 830
830 /* Generic DAPM context for the card */ 831 /* Generic DAPM context for the card */
831 struct snd_soc_dapm_context dapm; 832 struct snd_soc_dapm_context dapm;