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>
This commit is contained in:
Mark Brown 2011-09-28 20:12:01 +01:00
parent f3a54a283b
commit 0b07ab9244
1 changed files with 3 additions and 3 deletions

View File

@ -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;