linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: core: Don't set platform name when of_node is set
@ 2021-03-09  8:23 Daniel Baluta
  2021-03-09 15:34 ` Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Baluta @ 2021-03-09  8:23 UTC (permalink / raw)
  To: broonie, alsa-devel
  Cc: lgirdwood, perex, tiwai, linux-kernel, linux-imx,
	ranjani.sridharan, pierre-louis.bossart, shengjiu.wang,
	Daniel Baluta

From: Daniel Baluta <daniel.baluta@nxp.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@nxp.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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-03-17  8:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09  8:23 [PATCH] ASoC: core: Don't set platform name when of_node is set Daniel Baluta
2021-03-09 15:34 ` Mark Brown
2021-03-12  8:32   ` Daniel Baluta
2021-03-12 10:49     ` Mark Brown
2021-03-12 10:59       ` Daniel Baluta
2021-03-12 11:57         ` Mark Brown
2021-03-12 12:37           ` Daniel Baluta
2021-03-12 14:23             ` Mark Brown
2021-03-17  8:48               ` Daniel Baluta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).