Skip to content

Commit

Permalink
ASoC: Instantiate DAPM widgets before we do the DAI link init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Oct 3, 2011
1 parent f3a54a2 commit 0b07ab9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 0b07ab9

Please sign in to comment.