diff options
author | Jarkko Nikula <jhnikula@gmail.com> | 2010-12-14 05:18:32 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-12-15 13:01:34 -0500 |
commit | 7be31be880ee00c6f8d38184368e8a834923b469 (patch) | |
tree | 04b4337378d63ff8051ec2ffd3323680ad8a4225 /include/sound | |
parent | 97c866defc0fc6e18b49603ac19f732f53e79c46 (diff) |
ASoC: Extend DAPM to handle power changes on cross-device paths
Power change event like stream start/stop or kcontrol change in a
cross-device path originates from one device but codec bias and widget power
changes must be populated to another devices on that path as well.
This patch modifies the dapm_power_widgets so that all the widgets on a
sound card are checked for a power change, not just those that are specific
to originating device. Also bias management is extended to check all the
devices. Only exception in bias management are widgetless codecs whose bias
state is changed only if power change is originating from that context.
DAPM context test is added to dapm_seq_run to take care of if power sequence
extends to an another device which requires separate register writes.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc-dapm.h | 5 | ||||
-rw-r--r-- | include/sound/soc.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index c0e7c47469fc..98783510d2f1 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -471,6 +471,11 @@ struct snd_soc_dapm_context { | |||
471 | struct device *dev; /* from parent - for debug */ | 471 | struct device *dev; /* from parent - for debug */ |
472 | struct snd_soc_codec *codec; /* parent codec */ | 472 | struct snd_soc_codec *codec; /* parent codec */ |
473 | struct snd_soc_card *card; /* parent card */ | 473 | struct snd_soc_card *card; /* parent card */ |
474 | |||
475 | /* used during DAPM updates */ | ||
476 | int dev_power; | ||
477 | struct list_head list; | ||
478 | |||
474 | #ifdef CONFIG_DEBUG_FS | 479 | #ifdef CONFIG_DEBUG_FS |
475 | struct dentry *debugfs_dapm; | 480 | struct dentry *debugfs_dapm; |
476 | #endif | 481 | #endif |
diff --git a/include/sound/soc.h b/include/sound/soc.h index d5fb8618fdba..74921f20a1d8 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -663,6 +663,7 @@ struct snd_soc_card { | |||
663 | 663 | ||
664 | struct list_head widgets; | 664 | struct list_head widgets; |
665 | struct list_head paths; | 665 | struct list_head paths; |
666 | struct list_head dapm_list; | ||
666 | 667 | ||
667 | #ifdef CONFIG_DEBUG_FS | 668 | #ifdef CONFIG_DEBUG_FS |
668 | struct dentry *debugfs_card_root; | 669 | struct dentry *debugfs_card_root; |