mirror of
https://github.com/alsa-project/alsa-utils
synced 2025-01-03 11:09:44 +01:00
pre-process-object: set tlv name if config exists already
Do not create TLV config if it exists already. Just set the string value with the name name. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
b13a940618
commit
814dc3b19e
1 changed files with 10 additions and 6 deletions
|
@ -118,12 +118,16 @@ int tplg_parent_update(struct tplg_pre_processor *tplg_pp, snd_config_t *parent,
|
||||||
|
|
||||||
/* get section config */
|
/* get section config */
|
||||||
if (!strcmp(section_name, "tlv")) {
|
if (!strcmp(section_name, "tlv")) {
|
||||||
ret = tplg_config_make_add(&item_config, section_name,
|
/* set tlv name if config exists already */
|
||||||
SND_CONFIG_TYPE_STRING, cfg);
|
ret = snd_config_search(cfg, section_name, &item_config);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
SNDERR("Error creating section config widget %s for %s\n",
|
ret = tplg_config_make_add(&item_config, section_name,
|
||||||
section_name, parent_name);
|
SND_CONFIG_TYPE_STRING, cfg);
|
||||||
return ret;
|
if (ret < 0) {
|
||||||
|
SNDERR("Error creating section config widget %s for %s\n",
|
||||||
|
section_name, parent_name);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return snd_config_set_string(item_config, item_name);
|
return snd_config_set_string(item_config, item_name);
|
||||||
|
|
Loading…
Reference in a new issue