Commit ef36ca92 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-topology.c: dai_link->platform again

On SOF, many topology is assuming dai_link->platform exists, and is
allowed to be overwritten on each link_load().
This patch restore the removed dai_link->platform for SOF, and add
the comment.

Fixes: e7098ba9 ("ASoC: soc-topology.c: remove unnecessary dai_link->platform")
Reported-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/87jzz7jczp.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/87v8ikcsr5.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ffaf886e
...@@ -1685,8 +1685,8 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, ...@@ -1685,8 +1685,8 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
struct snd_soc_dai_link_component *dlc; struct snd_soc_dai_link_component *dlc;
int ret; int ret;
/* link + cpu + codec */ /* link + cpu + codec + platform */
link = devm_kzalloc(tplg->dev, sizeof(*link) + (2 * sizeof(*dlc)), GFP_KERNEL); link = devm_kzalloc(tplg->dev, sizeof(*link) + (3 * sizeof(*dlc)), GFP_KERNEL);
if (link == NULL) if (link == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -1724,6 +1724,14 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, ...@@ -1724,6 +1724,14 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
link->codecs->name = "snd-soc-dummy"; link->codecs->name = "snd-soc-dummy";
link->codecs->dai_name = "snd-soc-dummy-dai"; 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 */ /* enable DPCM */
link->dynamic = 1; link->dynamic = 1;
link->ignore_pmdown_time = 1; link->ignore_pmdown_time = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment