aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorJarkko Nikula <jhnikula@gmail.com>2010-12-14 05:18:31 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-15 13:01:01 -0500
commit97c866defc0fc6e18b49603ac19f732f53e79c46 (patch)
tree66ba8412fad0974ebf9a30c45ad5d81f26607e6e /include/sound
parent8ddab3f5107c3955e70e87a632d4d179ddba1189 (diff)
ASoC: Move widgets from DAPM context to snd_soc_card
Decoupling widgets from DAPM context is required when extending the ASoC core to cross-device paths. Even the list of widgets are now kept in struct snd_soc_card, the widget listing in sysfs and debugs remain sorted per device. This patch makes possible to build cross-device paths but does not extend yet the DAPM to handle codec bias and widget power changes of an another device. Cross-device paths are registered by listing the widgets from device A in a map for device B. In case of conflicting widget names between the devices, a uniform name prefix is needed to separate them. See commit ead9b91 "ASoC: Add optional name_prefix for kcontrol, widget and route names" for help. An example below shows a path that connects MONO out of A into Line In of B: static const struct snd_soc_dapm_route mapA[] = { {"MONO", NULL, "DAC"}, }; static const struct snd_soc_dapm_route mapB[] = { {"Line In", NULL, "MONO"}, }; 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.h2
-rw-r--r--include/sound/soc.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 2c1e0eed43d5..c0e7c47469fc 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -462,7 +462,7 @@ struct snd_soc_dapm_widget {
462 462
463/* DAPM context */ 463/* DAPM context */
464struct snd_soc_dapm_context { 464struct snd_soc_dapm_context {
465 struct list_head widgets; 465 int n_widgets; /* number of widgets in this context */
466 enum snd_soc_bias_level bias_level; 466 enum snd_soc_bias_level bias_level;
467 enum snd_soc_bias_level suspend_bias_level; 467 enum snd_soc_bias_level suspend_bias_level;
468 struct delayed_work delayed_work; 468 struct delayed_work delayed_work;
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 466895b627b5..d5fb8618fdba 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -661,6 +661,7 @@ struct snd_soc_card {
661 struct list_head platform_dev_list; 661 struct list_head platform_dev_list;
662 struct list_head dai_dev_list; 662 struct list_head dai_dev_list;
663 663
664 struct list_head widgets;
664 struct list_head paths; 665 struct list_head paths;
665 666
666#ifdef CONFIG_DEBUG_FS 667#ifdef CONFIG_DEBUG_FS