mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 19:06:31 +01:00
cf25cf6767
Expand the pre-processor to allow for expanding the definitions, object attribute references and arithmetic expressions within strings. With this extension its possible to embedded definitions or attribute references into topology string objects. For example: Define { PCM_NUMBER 1 } Object.Pipeline { pcm-playback.0 { Object.Widget { copier.1 { copier_type "host" } gain.1 { Object.Control.mixer.1 { name 'hw:$[$PCM_NUMBER - 1] Playback Volume' } } Object.Base { route.1 { source copier.host.$index.1 sink gain.$index.1 } } } In the example the $[$PCM_NUMBER - 1] would be replaced with the result of arithmetic expression '1 - 1' in other words '0' , and $index in all occurrences with index attribute found from pipeline object. Any non alpha numeric or '_' character are treated as delimiters for variable names if $[]-notation is not used. Fixes: https://github.com/alsa-project/alsa-utils/pull/189 Signed-off-by: Jyri Sarha <jyri.sarha@intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz> |
||
---|---|---|
.. | ||
nhlt | ||
alsatplg.rst | ||
Makefile.am | ||
pre-process-class.c | ||
pre-process-dai.c | ||
pre-process-dapm.c | ||
pre-process-external.h | ||
pre-process-object.c | ||
pre-processor.c | ||
pre-processor.h | ||
topology.c | ||
topology.h |