ASoC: Convert Simtec machines to table based DAPM init
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 8 Oct 2011 11:19:12 +0000 (12:19 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 10 Oct 2011 10:06:22 +0000 (11:06 +0100)
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/samsung/s3c24xx_simtec_hermes.c
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c

index 359530bc7a9a8e66710a67165f9e9669b5f46f00..6bc5a36af1d9c74ed7fe7a269a8ac269e6ba7ab5 100644 (file)
@@ -65,11 +65,6 @@ static int simtec_hermes_init(struct snd_soc_pcm_runtime *rtd)
        struct snd_soc_codec *codec = rtd->codec;
        struct snd_soc_dapm_context *dapm = &codec->dapm;
 
-       snd_soc_dapm_new_controls(dapm, dapm_widgets,
-                                 ARRAY_SIZE(dapm_widgets));
-
-       snd_soc_dapm_add_routes(dapm, base_map, ARRAY_SIZE(base_map));
-
        snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
        snd_soc_dapm_enable_pin(dapm, "Line In");
        snd_soc_dapm_enable_pin(dapm, "Line Out");
@@ -95,6 +90,11 @@ static struct snd_soc_card snd_soc_machine_simtec_aic33 = {
        .name           = "Simtec-Hermes",
        .dai_link       = &simtec_dai_aic33,
        .num_links      = 1,
+
+       .dapm_widgets   = dapm_widgets,
+       .num_dapm_widgets = ARRAY_SIZE(dapm_widgets),
+       .dapm_routes    = base_map,
+       .num_dapm_routes = ARRAY_SIZE(base_map),
 };
 
 static int __devinit simtec_audio_hermes_probe(struct platform_device *pd)
index 8bad349a9897d331868fcb11f9f53448fdc92b6c..7bdda76740083c365b908320c5b4c871ff4e6582 100644 (file)
@@ -54,11 +54,6 @@ static int simtec_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd)
        struct snd_soc_codec *codec = rtd->codec;
        struct snd_soc_dapm_context *dapm = &codec->dapm;
 
-       snd_soc_dapm_new_controls(dapm, dapm_widgets,
-                                 ARRAY_SIZE(dapm_widgets));
-
-       snd_soc_dapm_add_routes(dapm, base_map, ARRAY_SIZE(base_map));
-
        snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
        snd_soc_dapm_enable_pin(dapm, "Line In");
        snd_soc_dapm_enable_pin(dapm, "Line Out");
@@ -84,6 +79,11 @@ static struct snd_soc_card snd_soc_machine_simtec_aic23 = {
        .name           = "Simtec",
        .dai_link       = &simtec_dai_aic23,
        .num_links      = 1,
+
+       .dapm_widgets   = dapm_widgets,
+       .num_dapm_widgets = ARRAY_SIZE(dapm_widgets),
+       .dapm_routes    = base_map,
+       .num_dapm_routes = ARRAY_SIZE(base_map),
 };
 
 static int __devinit simtec_audio_tlv320aic23_probe(struct platform_device *pd)