alsa-utils/topology
Jaska Uimonen 44d3e8aa44 topology: add simple topology plugin mechanism
Add a simple plugin interface for processing the topology tree. There
can be cases where parts of the topology need to be translated from the
original format into something else. For example one could calculate
some kind of filter coefficients from filter parameters or some other
binary interface parameters from plain text topology tokens.

Mechanism is similar as in alsa-plugins and in the plugin there should
be only 1 function exported of the form:

int _snd_topology_##pluginname##_process (snd_config_t *input, snd_config_t *output)

Input and output parameters are snd_config tree before and after topology2
pre-processing. So the plugin can modify both if needed. There are cases
where the plugin may need to get information from input tree, but make
modifications to the output.

The plugins to be used can be defined in command line with:

alsatplg -DPREPROCESS_PLUGINS="foobar" -c topology.conf -p -o topology.tplg

Multiple plugins should be separated by ":".

Plugins to be used can also be defined with "Define" clause inside the
topology file (but command line takes precedence):

Define {
       PREPROCESS_PLUGINS "foobar"
}

Link: https://github.com/alsa-project/alsa-utils/pull/129
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2022-05-03 13:23:36 +02:00
..
alsatplg.rst alsatplg: add decode command 2020-02-09 20:52:30 +01:00
Makefile.am topology: pre-process-dai: add support for hwcfg objects 2021-05-25 18:26:51 +02:00
pre-process-class.c alsatplg: use standard include/asoundlib.h instead direct headers 2021-09-03 08:49:03 +02:00
pre-process-dai.c alsatplg: use standard include/asoundlib.h instead direct headers 2021-09-03 08:49:03 +02:00
pre-process-dapm.c topology: pre-processor: Move the call to expand variables 2021-12-19 20:32:38 +01:00
pre-process-external.h topology: add simple topology plugin mechanism 2022-05-03 13:23:36 +02:00
pre-process-object.c topology: pre-process-object: expand variables before validating attributes 2022-01-27 18:32:06 +01:00
pre-processor.c topology: add simple topology plugin mechanism 2022-05-03 13:23:36 +02:00
pre-processor.h topology: add simple topology plugin mechanism 2022-05-03 13:23:36 +02:00
topology.c topology: fix the comment for improved -D option 2022-01-28 09:29:34 +01:00
topology.h topology: rename function free_pre_preprocessor to free_pre_processor 2022-01-27 15:02:02 +01:00