Commit 3256ef98 authored by Sameer Pujar's avatar Sameer Pujar Committed by Mark Brown

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: default avatarSameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1604329814-24779-2-git-send-email-spujar@nvidia.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 513e22f3
...@@ -1124,7 +1124,8 @@ static void soc_set_name_prefix(struct snd_soc_card *card, ...@@ -1124,7 +1124,8 @@ static void soc_set_name_prefix(struct snd_soc_card *card,
for (i = 0; i < card->num_configs; i++) { for (i = 0; i < card->num_configs; i++) {
struct snd_soc_codec_conf *map = &card->codec_conf[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; component->name_prefix = map->name_prefix;
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment