Skip to contentSkip to conversation

ASoC: Convert Goni to data based DAPM init

PATCH In review Mark Brown 2 participants 2 messages Oct 8, 2011 – Oct 11, 2011

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: Convert Goni to data based DAPM init

---
 sound/soc/samsung/goni_wm8994.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)
sound/soc/samsung/goni_wm8994.c +5 -8
index dcaf656..60ed59b 100644
@@ -100,14 +100,6 @@ static int goni_wm8994_init(struct snd_soc_pcm_runtime *rtd)
 	struct snd_soc_dapm_context *dapm = &codec->dapm;
 	int ret;
 
-	/* add goni specific widgets */
-	snd_soc_dapm_new_controls(dapm, goni_dapm_widgets,
-			ARRAY_SIZE(goni_dapm_widgets));
-
-	/* set up goni specific audio routes */
-	snd_soc_dapm_add_routes(dapm, goni_dapm_routes,
-			ARRAY_SIZE(goni_dapm_routes));
-
 	/* set endpoints to not connected */
 	snd_soc_dapm_nc_pin(dapm, "IN2LP:VXRN");
 	snd_soc_dapm_nc_pin(dapm, "IN2RP:VXRP");
@@ -256,6 +248,11 @@ static struct snd_soc_card goni = {
 	.name = "goni",
 	.dai_link = goni_dai,
 	.num_links = ARRAY_SIZE(goni_dai),
+
+	.dapm_widgets = goni_dapm_widgets,
+	.num_dapm_widgets = ARRAY_SIZE(goni_dapm_widgets),
+	.dapm_routes = goni_dapm_routes,
+	.num_dapm_routes = ARRAY_SIZE(goni_dapm_routes),
 };
 
 static int __init goni_init(void)
Signature · 1 line
1.7.6.3
Acked-by on v1 1/1
#1 lore raw
Quoted 44 lines · Mark Brown

---
 sound/soc/samsung/goni_wm8994.c |   13 +++++--------

 1 files changed, 5 insertions(+), 8 deletions(-)
sound/soc/samsung/goni_wm8994.c +5 -9
index dcaf656..60ed59b 100644
@@ -100,14 +100,6 @@ static int goni_wm8994_init(struct snd_soc_pcm_runtime *rtd)
        struct snd_soc_dapm_context *dapm = &codec->dapm;
        int ret;
 
-       /* add goni specific widgets */
-       snd_soc_dapm_new_controls(dapm, goni_dapm_widgets,
-                       ARRAY_SIZE(goni_dapm_widgets));
-
-       /* set up goni specific audio routes */
-       snd_soc_dapm_add_routes(dapm, goni_dapm_routes,
-                       ARRAY_SIZE(goni_dapm_routes));
-
        /* set endpoints to not connected */
        snd_soc_dapm_nc_pin(dapm, "IN2LP:VXRN");
        snd_soc_dapm_nc_pin(dapm, "IN2RP:VXRP");
@@ -256,6 +248,11 @@ static struct snd_soc_card goni = {
        .name = "goni",
        .dai_link = goni_dai,
        .num_links = ARRAY_SIZE(goni_dai),
+
+       .dapm_widgets = goni_dapm_widgets,
+       .num_dapm_widgets = ARRAY_SIZE(goni_dapm_widgets),
+       .dapm_routes = goni_dapm_routes,
+       .num_dapm_routes = ARRAY_SIZE(goni_dapm_routes),
  };
 
  static int __init goni_init(void)
--

1.7.6.3

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel