From 7be31be880ee00c6f8d38184368e8a834923b469 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Tue, 14 Dec 2010 12:18:32 +0200 Subject: 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 Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- include/sound/soc-dapm.h | 5 +++++ include/sound/soc.h | 1 + 2 files changed, 6 insertions(+) (limited to 'include/sound') 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 { struct device *dev; /* from parent - for debug */ struct snd_soc_codec *codec; /* parent codec */ struct snd_soc_card *card; /* parent card */ + + /* used during DAPM updates */ + int dev_power; + struct list_head list; + #ifdef CONFIG_DEBUG_FS struct dentry *debugfs_dapm; #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 { struct list_head widgets; struct list_head paths; + struct list_head dapm_list; #ifdef CONFIG_DEBUG_FS struct dentry *debugfs_card_root; -- cgit v1.2.3-59-g8ed1b