mirror of
https://github.com/alsa-project/alsa-utils
synced 2025-01-03 17:49:50 +01:00
topology: pre-process-object: dont create if section already exists
Skip creating section when it exists already. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
3c81766242
commit
c1f0ec46b4
1 changed files with 9 additions and 7 deletions
|
@ -880,16 +880,18 @@ int tplg_build_object_from_template(struct tplg_pre_processor *tplg_pp, snd_conf
|
||||||
*wtop = top;
|
*wtop = top;
|
||||||
} else {
|
} else {
|
||||||
*wtop = tplg_find_config(top, object_name);
|
*wtop = tplg_find_config(top, object_name);
|
||||||
if (!(*wtop)) {
|
if (*wtop)
|
||||||
ret = tplg_config_make_add(wtop, object_name, SND_CONFIG_TYPE_COMPOUND,
|
goto template;
|
||||||
top);
|
|
||||||
if (ret < 0) {
|
ret = tplg_config_make_add(wtop, object_name, SND_CONFIG_TYPE_COMPOUND,
|
||||||
SNDERR("Error creating config for %s\n", object_name);
|
top);
|
||||||
return ret;
|
if (ret < 0) {
|
||||||
}
|
SNDERR("Error creating config for %s\n", object_name);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template:
|
||||||
/* create template config */
|
/* create template config */
|
||||||
if (!map->template_items)
|
if (!map->template_items)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue