mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 20:26:30 +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,7 +880,9 @@ int tplg_build_object_from_template(struct tplg_pre_processor *tplg_pp, snd_conf
|
|||
*wtop = top;
|
||||
} else {
|
||||
*wtop = tplg_find_config(top, object_name);
|
||||
if (!(*wtop)) {
|
||||
if (*wtop)
|
||||
goto template;
|
||||
|
||||
ret = tplg_config_make_add(wtop, object_name, SND_CONFIG_TYPE_COMPOUND,
|
||||
top);
|
||||
if (ret < 0) {
|
||||
|
@ -888,8 +890,8 @@ int tplg_build_object_from_template(struct tplg_pre_processor *tplg_pp, snd_conf
|
|||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template:
|
||||
/* create template config */
|
||||
if (!map->template_items)
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue