ASoC: Fix prefixing of DAPM controls
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 17 Oct 2011 23:11:49 +0000 (00:11 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 18 Oct 2011 10:16:31 +0000 (11:16 +0100)
We don't want to clear the prefix while we're creating the DAPM controls
for the device as the prefix is applied during control creation.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
sound/soc/soc-core.c

index d6af52b..a5d3685 100644 (file)
@@ -1055,13 +1055,13 @@ static int soc_post_component_init(struct snd_soc_card *card,
        }
        rtd->card = card;
 
+       /* Make sure all DAPM widgets are instantiated */
+       snd_soc_dapm_new_widgets(&codec->dapm);
+
        /* machine controls, routes and widgets are not prefixed */
        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);