summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@nxp.com>2021-04-14 13:12:12 +0300
committerMark Brown <broonie@kernel.org>2021-04-16 15:43:21 +0300
commitd97140033948363ffdf5ed71dd2366f717e120e7 (patch)
tree73c4a34013803bf3ae512a9b76b3bb6537ff9ac4 /sound/soc/soc-core.c
parenteea1d18e9b2d959df908746b193f66dba3078473 (diff)
downloadlinux-d97140033948363ffdf5ed71dd2366f717e120e7.tar.xz
ASoC: core: Don't set platform name when of_node is set
A DAI link has 3 components: * CPU * platform * codec(s) A component is specified via: * name * of_node * dai_name In order to avoid confusion when building a sound card we disallow matching by both name and of_node (1). soc_check_tplg_fes allows overriding certain BE links by overriding BE link name. This doesn't work well if BE link was specified via DT, because we end up with a link with both name and of_node specified which is conflicting with (1). In order to fix this we need to: * override of_node if component was specified via DT * override name, otherwise. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20210414101212.65573-1-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 236e075b9e57..56bda3b9f691 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1658,7 +1658,11 @@ match:
dev_err(card->dev, "init platform error");
continue;
}
- dai_link->platforms->name = component->name;
+
+ if (component->dev->of_node)
+ dai_link->platforms->of_node = component->dev->of_node;
+ else
+ dai_link->platforms->name = component->name;
/* convert non BE into BE */
if (!dai_link->no_pcm) {