Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next
[deliverable/linux.git] / sound / soc / codecs / wm5110.c
index 14a7739d6c0960e89f7c698e7bb2b00d3dc7b5cf..709fcc6169d81eda5a9cfcb3f26c55a8f77f6602 100644 (file)
@@ -1600,7 +1600,7 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec)
 {
        struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
        struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec);
-       int ret;
+       int i, ret;
 
        priv->core.arizona->dapm = dapm;
 
@@ -1608,8 +1608,16 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec)
        arizona_init_gpio(codec);
        arizona_init_mono(codec);
 
-       ret = snd_soc_add_codec_controls(codec, wm_adsp2_fw_controls, 8);
-       if (ret != 0)
+       for (i = 0; i < WM5110_NUM_ADSP; ++i) {
+               ret = wm_adsp2_codec_probe(&priv->core.adsp[i], codec);
+               if (ret)
+                       return ret;
+       }
+
+       ret = snd_soc_add_codec_controls(codec,
+                                        arizona_adsp2_rate_controls,
+                                        WM5110_NUM_ADSP);
+       if (ret)
                return ret;
 
        snd_soc_dapm_disable_pin(dapm, "HAPTICS");
@@ -1620,6 +1628,10 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec)
 static int wm5110_codec_remove(struct snd_soc_codec *codec)
 {
        struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec);
+       int i;
+
+       for (i = 0; i < WM5110_NUM_ADSP; ++i)
+               wm_adsp2_codec_remove(&priv->core.adsp[i], codec);
 
        priv->core.arizona->dapm = NULL;
 
This page took 0.024183 seconds and 5 git commands to generate.