@@ -126,10 +126,28 @@ int mtk_afe_pcm_new(struct snd_soc_component *component,
}
EXPORT_SYMBOL_GPL(mtk_afe_pcm_new);
+static int mtk_afe_component_probe(struct snd_soc_component *component)
+{
+ struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
+ int ret;
+
+ snd_soc_component_init_regmap(component, afe->regmap);
+
+ /* If the list was never initialized there are no sub-DAIs */
+ if (afe->sub_dais.next && afe->sub_dais.prev) {
+ ret = mtk_afe_add_sub_dai_control(component);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
+}
+
const struct snd_soc_component_driver mtk_afe_pcm_platform = {
.name = AFE_PCM_NAME,
.pointer = mtk_afe_pcm_pointer,
.pcm_construct = mtk_afe_pcm_new,
+ .probe = mtk_afe_component_probe,
};
EXPORT_SYMBOL_GPL(mtk_afe_pcm_platform);