]> git.alsa-project.org Git - alsa-utils.git/commit
topology: Expand attribute references inside $[] expressions
authorJyri Sarha <jyri.sarha@linux.intel.com>
Sun, 31 Dec 2023 01:10:19 +0000 (03:10 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 24 Jan 2024 17:38:03 +0000 (18:38 +0100)
commit0029ab7cc7c7e20bb0973f0386a7042278ccaff9
tree34d2764c3f9a0c07769e4d403a99e8d9d4c31acd
parent6eb1eb504719637a2bd56ecab4d236e010ee1414
topology: Expand attribute references inside $[] expressions

Properly expand referred object attributes inside $[] expression. This
allows for example this simplified case:

Define {
       CHANNELS 2
       BIT_DEPTH 16
}

Object.Base.foo {
channels $CHANNELS
sample_bits $BIT_DEPTH
frame_bits "$[$channels * $sample_bits]"
}

Closes: https://github.com/alsa-project/alsa-utils/pull/250
Reported-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
topology/pre-process-object.c