lkml.org 
[lkml]   [2021]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ASoC: core: Don't set platform name when of_node is set
Date
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
\
 
 \ /
  Last update: 2021-03-09 09:24    [W:0.096 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site