summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSameer Pujar <spujar@nvidia.com>2020-11-02 20:40:08 +0530
committerMark Brown <broonie@kernel.org>2020-11-10 17:28:18 +0000
commit3256ef984b016fc8491f34cad594168b4b500317 (patch)
tree074c4c36ab7e0eb2cb150d15bcfa23f47dc39885
parent513e22f384f04f205c9501372d04ece070cfc1b4 (diff)
ASoC: soc-core: Fix component name_prefix parsing
The "prefix" can be defined in DAI link node or it can be specified as part of the component node itself. Currently "sound-name-prefix" defined in a component is not taking effect. Actually the property is not getting parsed. It can be fixed by parsing "sound-name-prefix" property whenever "prefix" is missing in DAI link Codec node. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1604329814-24779-2-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/soc-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index ea3986a46c12..cb7333da58f1 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1124,7 +1124,8 @@ static void soc_set_name_prefix(struct snd_soc_card *card,
for (i = 0; i < card->num_configs; i++) {
struct snd_soc_codec_conf *map = &card->codec_conf[i];
- if (snd_soc_is_matching_component(&map->dlc, component)) {
+ if (snd_soc_is_matching_component(&map->dlc, component) &&
+ map->name_prefix) {
component->name_prefix = map->name_prefix;
return;
}