ASoC: wm_adsp: Add codec_probe and codec_remove stubs
[firefly-linux-kernel-4.4.55.git] / sound / soc / codecs / wm5110.c
index d65364e915320e158e2c749dee5e311d113fae1b..6e15d9c7ec239ed1bbfb56aa2fd66ca021c29507 100644 (file)
@@ -1599,7 +1599,7 @@ static struct snd_soc_dai_driver wm5110_dai[] = {
 static int wm5110_codec_probe(struct snd_soc_codec *codec)
 {
        struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec);
-       int ret;
+       int i, ret;
 
        priv->core.arizona->dapm = &codec->dapm;
 
@@ -1607,6 +1607,12 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec)
        arizona_init_gpio(codec);
        arizona_init_mono(codec);
 
+       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, wm_adsp2_fw_controls, 8);
        if (ret != 0)
                return ret;
@@ -1621,6 +1627,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;