/* get section config */
if (!strcmp(section_name, "tlv")) {
- ret = tplg_config_make_add(&item_config, section_name,
- SND_CONFIG_TYPE_STRING, cfg);
- if (ret < 0) {
- SNDERR("Error creating section config widget %s for %s\n",
- section_name, parent_name);
- return ret;
+ /* set tlv name if config exists already */
+ ret = snd_config_search(cfg, section_name, &item_config);
+ if (ret < 0) {
+ ret = tplg_config_make_add(&item_config, section_name,
+ SND_CONFIG_TYPE_STRING, cfg);
+ 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);