]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Do DAPM power checks only for widgets changed since last run
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 3 Oct 2011 20:06:40 +0000 (21:06 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 4 Oct 2011 15:50:20 +0000 (16:50 +0100)
commit2b8a6e9f9c338230fc6bbbabfb1132ec9bbdc737
tree5bd14d5a82768553518184e1bf309ad463ce4384
parentdaec7ff92892825df965ee5882da4c167d5f4551
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>
include/sound/soc-dapm.h
include/sound/soc.h
sound/soc/soc-core.c
sound/soc/soc-dapm.c