summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-28 23:12:01 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-04 00:34:56 +0400
commit0b07ab9244d34929b6e07d6a275137a229e9c839 (patch)
tree2748f981737c87e7a0ea06f60b0bda6997303254 /sound/soc
parentf3a54a283b58b932cd3d018ca4a1ba96cc43a895 (diff)
downloadlinux-0b07ab9244d34929b6e07d6a275137a229e9c839.tar.xz
ASoC: Instantiate DAPM widgets before we do the DAI link init
The DAI init function may want to do something that needs the widgets to be instantiated. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a58c1fc966eb..1ed8093b44e8 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1059,6 +1059,9 @@ static int soc_post_component_init(struct snd_soc_card *card,
temp = codec->name_prefix;
codec->name_prefix = NULL;
+ /* Make sure all DAPM widgets are instantiated */
+ snd_soc_dapm_new_widgets(&codec->dapm);
+
/* do machine specific initialization */
if (!dailess && dai_link->init)
ret = dai_link->init(rtd);
@@ -1070,9 +1073,6 @@ static int soc_post_component_init(struct snd_soc_card *card,
}
codec->name_prefix = temp;
- /* Make sure all DAPM widgets are instantiated */
- snd_soc_dapm_new_widgets(&codec->dapm);
-
/* register the rtd device */
rtd->codec = codec;
rtd->dev.parent = card->dev;