mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-13 01:15:42 +01:00
topology: create Define subtree for command line defines only
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
3afa353c0a
commit
31d4afd8ca
1 changed files with 7 additions and 0 deletions
|
@ -253,6 +253,12 @@ static int pre_process_add_defines(struct tplg_pre_processor *tplg_pp, snd_confi
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = snd_config_search(from, "Define", &conf_defines);
|
ret = snd_config_search(from, "Define", &conf_defines);
|
||||||
|
if (ret == -ENOENT) {
|
||||||
|
if (tplg_pp->input_cfg == from && tplg_pp->define_cfg) {
|
||||||
|
conf_defines = NULL;
|
||||||
|
goto create;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -265,6 +271,7 @@ static int pre_process_add_defines(struct tplg_pre_processor *tplg_pp, snd_confi
|
||||||
tplg_pp->define_cfg_merged = conf_defines;
|
tplg_pp->define_cfg_merged = conf_defines;
|
||||||
|
|
||||||
if (tplg_pp->define_cfg_merged == NULL) {
|
if (tplg_pp->define_cfg_merged == NULL) {
|
||||||
|
create:
|
||||||
ret = snd_config_make_compound(&tplg_pp->define_cfg_merged, "Define", 0);
|
ret = snd_config_make_compound(&tplg_pp->define_cfg_merged, "Define", 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue