提交 0b07ab92 编写于 作者: M Mark Brown

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: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 f3a54a28
...@@ -1059,6 +1059,9 @@ static int soc_post_component_init(struct snd_soc_card *card, ...@@ -1059,6 +1059,9 @@ static int soc_post_component_init(struct snd_soc_card *card,
temp = codec->name_prefix; temp = codec->name_prefix;
codec->name_prefix = NULL; codec->name_prefix = NULL;
/* Make sure all DAPM widgets are instantiated */
snd_soc_dapm_new_widgets(&codec->dapm);
/* do machine specific initialization */ /* do machine specific initialization */
if (!dailess && dai_link->init) if (!dailess && dai_link->init)
ret = dai_link->init(rtd); ret = dai_link->init(rtd);
...@@ -1070,9 +1073,6 @@ static int soc_post_component_init(struct snd_soc_card *card, ...@@ -1070,9 +1073,6 @@ static int soc_post_component_init(struct snd_soc_card *card,
} }
codec->name_prefix = temp; codec->name_prefix = temp;
/* Make sure all DAPM widgets are instantiated */
snd_soc_dapm_new_widgets(&codec->dapm);
/* register the rtd device */ /* register the rtd device */
rtd->codec = codec; rtd->codec = codec;
rtd->dev.parent = card->dev; rtd->dev.parent = card->dev;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册