diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-05-16 12:47:29 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-05-18 10:53:14 -0400 |
commit | 6d3ddc81f5762d54ce7d1db70eb757c6c12fabbc (patch) | |
tree | b476a394790be86d97d9fc47beff0de6e1186c96 /include/sound | |
parent | b7a755a8a145a7e34e735bda9c452317de7a538a (diff) |
ASoC: Split DAPM power checks from sequencing of power changes
DAPM has always applied any changes to the power state of widgets as soon
as it has determined that they are required. Instead of doing this store
all the changes that are required on lists of widgets to power up and
down, then iterate over those lists and apply the changes. This changes
the sequence in which changes are implemented, doing all power downs
before power ups and always using the up/down sequences (previously they
were only used when changes were due to DAC/ADC power events). The error
handling is also changed so that we continue attempting to power widgets
if some changes fail.
The main benefit of this is to allow future changes to do optimisations
over the whole power sequence and to reduce the number of walks of the
widget graph required to check the power status of widgets.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc-dapm.h | 3 | ||||
-rw-r--r-- | include/sound/soc.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 533f9f256496..b3f789d0cee8 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -385,6 +385,9 @@ struct snd_soc_dapm_widget { | |||
385 | /* widget input and outputs */ | 385 | /* widget input and outputs */ |
386 | struct list_head sources; | 386 | struct list_head sources; |
387 | struct list_head sinks; | 387 | struct list_head sinks; |
388 | |||
389 | /* used during DAPM updates */ | ||
390 | struct list_head power_list; | ||
388 | }; | 391 | }; |
389 | 392 | ||
390 | #endif | 393 | #endif |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 6ab80bf7abd2..8309ce81cf3b 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -372,6 +372,8 @@ struct snd_soc_codec { | |||
372 | enum snd_soc_bias_level bias_level; | 372 | enum snd_soc_bias_level bias_level; |
373 | enum snd_soc_bias_level suspend_bias_level; | 373 | enum snd_soc_bias_level suspend_bias_level; |
374 | struct delayed_work delayed_work; | 374 | struct delayed_work delayed_work; |
375 | struct list_head up_list; | ||
376 | struct list_head down_list; | ||
375 | 377 | ||
376 | /* codec DAI's */ | 378 | /* codec DAI's */ |
377 | struct snd_soc_dai *dai; | 379 | struct snd_soc_dai *dai; |