struct snd_soc_dai_link_component *dlc;
int ret;
- /* link + cpu + codec */
- link = devm_kzalloc(tplg->dev, sizeof(*link) + (2 * sizeof(*dlc)), GFP_KERNEL);
+ /* link + cpu + codec + platform */
+ link = devm_kzalloc(tplg->dev, sizeof(*link) + (3 * sizeof(*dlc)), GFP_KERNEL);
if (link == NULL)
return -ENOMEM;
link->codecs->name = "snd-soc-dummy";
link->codecs->dai_name = "snd-soc-dummy-dai";
+ /*
+ * Many topology is assuming link has Platform.
+ * This might be overwritten at soc_tplg_dai_link_load().
+ */
+ link->platforms = &dlc[2];
+ link->platforms->name = "snd-soc-dummy";
+ link->num_platforms = 1;
+
/* enable DPCM */
link->dynamic = 1;
link->ignore_pmdown_time = 1;