[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210309082328.38388-1-daniel.baluta@oss.nxp.com>
Date: Tue, 9 Mar 2021 10:23:28 +0200
From: Daniel Baluta <daniel.baluta@....nxp.com>
To: broonie@...nel.org, alsa-devel@...a-project.org
Cc: lgirdwood@...il.com, perex@...ex.cz, tiwai@...e.com,
linux-kernel@...r.kernel.org, linux-imx@....com,
ranjani.sridharan@...ux.intel.com,
pierre-louis.bossart@...ux.intel.com, shengjiu.wang@....com,
Daniel Baluta <daniel.baluta@....com>
Subject: [PATCH] ASoC: core: Don't set platform name when of_node is set
From: Daniel Baluta <daniel.baluta@....com>
Platform may be specified by either name or OF node but not
both.
For OF node platforms (e.g i.MX) we end up with both platform name
and of_node set and sound card registration will fail with the error:
asoc-simple-card sof-sound-wm8960: ASoC: Neither/both
platform name/of_node are set for sai1-wm8960-hifi
Signed-off-by: Daniel Baluta <daniel.baluta@....com>
---
sound/soc/soc-core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 16ba54eb8164..76ab42fa9461 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1660,7 +1660,9 @@ static void soc_check_tplg_fes(struct snd_soc_card *card)
dev_err(card->dev, "init platform error");
continue;
}
- dai_link->platforms->name = component->name;
+
+ if (!dai_link->platforms->of_node)
+ dai_link->platforms->name = component->name;
/* convert non BE into BE */
if (!dai_link->no_pcm) {
--
2.27.0
Powered by blists - more mailing lists