ASoC: Decouple DAPM from CODECs
[deliverable/linux.git] / sound / soc / s3c24xx / goni_wm8994.c
index 694f702cc8e2c7c350d26893bb33811e9c8b95ac..052729c6540dfcf6609289f43b0b4551eb66dc1a 100644 (file)
@@ -97,25 +97,26 @@ static const struct snd_soc_dapm_route goni_dapm_routes[] = {
 static int goni_wm8994_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_codec *codec = rtd->codec;
+       struct snd_soc_dapm_context *dapm = &codec->dapm;
        int ret;
 
        /* add goni specific widgets */
-       snd_soc_dapm_new_controls(codec, goni_dapm_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(codec, goni_dapm_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(codec, "IN2LP:VXRN");
-       snd_soc_dapm_nc_pin(codec, "IN2RP:VXRP");
-       snd_soc_dapm_nc_pin(codec, "LINEOUT1N");
-       snd_soc_dapm_nc_pin(codec, "LINEOUT1P");
-       snd_soc_dapm_nc_pin(codec, "LINEOUT2N");
-       snd_soc_dapm_nc_pin(codec, "LINEOUT2P");
-
-       snd_soc_dapm_sync(codec);
+       snd_soc_dapm_nc_pin(dapm, "IN2LP:VXRN");
+       snd_soc_dapm_nc_pin(dapm, "IN2RP:VXRP");
+       snd_soc_dapm_nc_pin(dapm, "LINEOUT1N");
+       snd_soc_dapm_nc_pin(dapm, "LINEOUT1P");
+       snd_soc_dapm_nc_pin(dapm, "LINEOUT2N");
+       snd_soc_dapm_nc_pin(dapm, "LINEOUT2P");
+
+       snd_soc_dapm_sync(dapm);
 
        /* Headset jack detection */
        ret = snd_soc_jack_new(&goni, "Headset Jack",
This page took 0.02443 seconds and 5 git commands to generate.