]> git.alsa-project.org Git - alsa-lib.git/commit
ucm: add Repeat block - repetitive pattern substitution (Syntax 9)
authorJaroslav Kysela <perex@perex.cz>
Fri, 6 Feb 2026 12:43:11 +0000 (13:43 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 6 Feb 2026 18:32:28 +0000 (19:32 +0100)
commit27aa3e41ef1b80a87800afd8b2e718d8e67ad54c
treecc509730ee3c4e22eb8af18f3a7e4dc7e7e14389
parent2943b1e4120756cc862c33344276bc70037f4df0
ucm: add Repeat block - repetitive pattern substitution (Syntax 9)

Implements Repeat blocks for generating repetitive configuration patterns
with variable substitution. This feature allows applying a configuration
block multiple times with different variable values, significantly reducing
duplication in UCM configuration files.

iterator abstraction allows easy extension for future pattern types.

Example:

  Repeat.VolumeInit {
    Pattern {
      Variable 'ch'
      Type Integer
      First 0
      Last 7
      Step 1
    }
    Apply {
      cset "name='PCM Channel ${var:ch} Volume' 100%"
    }
  }

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/Makefile.am
src/ucm/parser.c
src/ucm/ucm_confdoc.h
src/ucm/ucm_local.h
src/ucm/ucm_repeat.c [new file with mode: 0644]