aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-03 21:06:40 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-04 16:50:20 +0100
commitdb432b414e20b7218bbd91654d7be9c524a4337a (patch)
tree5bd14d5a82768553518184e1bf309ad463ce4384 /sound/soc/soc-core.c
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 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1ed8093b44e..778c177b5bf 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2916,6 +2916,7 @@ int snd_soc_register_card(struct snd_soc_card *card)
card->rtd[i].dai_link = &card->dai_link[i];
INIT_LIST_HEAD(&card->list);
+ INIT_LIST_HEAD(&card->dapm_dirty);
card->instantiated = 0;
mutex_init(&card->mutex);