ALSA: ASoC: Add widgets before setting endpoints on GTA01
authorJonas Bonn <jonas.bonn@gmail.com>
Wed, 1 Oct 2008 17:17:12 +0000 (18:17 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 13 Oct 2008 00:18:09 +0000 (02:18 +0200)
This prevents error messages at startup where the endpoints are being
set before the widgets/controls have even been added.

Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/s3c24xx/neo1973_wm8753.c

index 006c36ded25720803ca8d0defd96ff7483f46bf5..9eda86259e6973fd27789da82e4f769f9d435d8e 100644 (file)
@@ -518,13 +518,13 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec)
        snd_soc_dapm_nc_pin(codec, "LINE1");
        snd_soc_dapm_nc_pin(codec, "LINE2");
 
-       /* set endpoints to default mode */
-       set_scenario_endpoints(codec, NEO_AUDIO_OFF);
-
        /* Add neo1973 specific widgets */
        snd_soc_dapm_new_controls(codec, wm8753_dapm_widgets,
                                  ARRAY_SIZE(wm8753_dapm_widgets));
 
+       /* set endpoints to default mode */
+       set_scenario_endpoints(codec, NEO_AUDIO_OFF);
+
        /* add neo1973 specific controls */
        for (i = 0; i < ARRAY_SIZE(wm8753_neo1973_controls); i++) {
                err = snd_ctl_add(codec->card,