]> git.alsa-project.org Git - alsa-utils.git/commit
topology: pre-processor: support to include conf block with IncludeByKey
authorChao Song <chao.song@linux.intel.com>
Tue, 17 Jan 2023 12:52:18 +0000 (20:52 +0800)
committerJaroslav Kysela <perex@perex.cz>
Tue, 24 Jan 2023 08:45:45 +0000 (09:45 +0100)
commit1350900246e0462b584331be0df24e177e7b25be
tree3ada40cc7a2c7111c75b2f7992fa2880dd30c4bf
parentdf3da091cc753bc55365fc20ce92aade3f32b387
topology: pre-processor: support to include conf block with IncludeByKey

Currently, The IncludeByKey mechanism only supports conditionally
including a topology conf file. Even if we only
want to conditionally include a small conf block, we have
to use a conf file and in the end we will have a lot of
trivial conf files that only contain a single conf blocks.

This patch extends the use of IncludeByKey ito support including conf
blocks conditionally. For example, the block below will include the route
conditionally based on the variable definition COPIER_ROUTE.

Define {
COPIER_ROUTE 1
}

IncludeByKey.COPIER_ROUTE {
        "1" {
Object.Base.route.11 {
source copier.module.8.2
sink copier.module.17.2
}
    }
}

Fixes: https://github.com/alsa-project/alsa-utils/pull/187
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Co-authored-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
topology/pre-processor.c