]> git.alsa-project.org Git - alsa-utils.git/commit
topology: Add option to pass pre-processor definitions
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Thu, 4 Nov 2021 19:17:24 +0000 (12:17 -0700)
committerJaroslav Kysela <perex@perex.cz>
Mon, 6 Dec 2021 08:19:20 +0000 (09:19 +0100)
commitda8f90c42473976eddd43f9d7037442dd15b7ed3
tree50ff360594436acf2f9e42587fd954f3157d16d3
parentc4e43384fc8af468900b6771a23bdf44d03347a5
topology: Add option to pass pre-processor definitions

Add a -D switch to be able to pass pre-processor definitions that will
be used to expand arguments in the input config file. This will be
useful to generate multiple topology binaries from the same input config
file with different argument values.

For example: if we had a pipeline config as follows:

Object.Pipeline {
volume-playback.1 {
dynamic_pipeline $DYNAMIC_PIPELINE
}
}

We can define the variable for DYNAMIC_PIPELINE as:

Define {
DYNAMIC_PIPELINE 0
}

And when pre-processing the conf file pass "-D DYNAMIC_PIPELINE=1" to
override the default value for dynamic_pipeline attribute in the input
conf file.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
topology/pre-processor.c
topology/topology.c
topology/topology.h