Skip to content

Commit

Permalink
ASoC: Instantiate any forgotten DAPM widgets
Browse files Browse the repository at this point in the history
With the recent changes to the DAPM power checks it has become important
to explicitly instantiate all widgets but some drivers were forgetting
to do that.  Since everything needs to do it add a call to instantiate
them immediately before the card registration - it does no harm when it
is called repeatedly and saves work in drivers.

Tested-by: pHilipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
broonie committed Jun 14, 2009
1 parent 5ba7368 commit 6d5701b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,9 @@ int snd_soc_init_card(struct snd_soc_device *socdev)
snprintf(codec->card->longname, sizeof(codec->card->longname),
"%s (%s)", card->name, codec->name);

/* Make sure all DAPM widgets are instantiated */
snd_soc_dapm_new_widgets(codec);

ret = snd_card_register(codec->card);
if (ret < 0) {
printk(KERN_ERR "asoc: failed to register soundcard for %s\n",
Expand Down

0 comments on commit 6d5701b

Please sign in to comment.