]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
common: split.conf - don't use If.0 blocks
authorJaroslav Kysela <perex@perex.cz>
Fri, 21 Nov 2025 13:21:36 +0000 (14:21 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 21 Nov 2025 13:21:39 +0000 (14:21 +0100)
Compounds starting with zero (and with continuous indexes)
are handled as array type. It means that they are appended
when they are parsed multiple times. Fix this.

Closes: https://github.com/alsa-project/alsa-ucm-conf/issues/646
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/common/pcm/split.conf

index 91ded9ce5281c398af5e78f1fae9524aa62f5866..b1f3dfa3ad54f01afde3a9b04bd8acd8c38ed23d 100644 (file)
@@ -6,7 +6,7 @@
 # Helper macros
 #
 
-DefineMacro.SplitPCM_chnpos.If.0 {
+DefineMacro.SplitPCM_chnpos.If.a {
        Condition {
                Type String
                Empty "${var:__HWChannelPos}"
@@ -16,7 +16,7 @@ DefineMacro.SplitPCM_chnpos.If.0 {
        }
 }
 
-DefineMacro.SplitPCM_chn.If.0 {
+DefineMacro.SplitPCM_chn.If.a {
        Condition {
                Type RegexMatch
                Regex "${var:__ChRegex}"
@@ -29,7 +29,7 @@ DefineMacro.SplitPCM_chn.If.0 {
        }
 }
 
-DefineMacro.SplitPCMDevice_chnpos.If.0 {
+DefineMacro.SplitPCMDevice_chnpos.If.a {
        Condition {
                Type String
                Empty "${var:__Channel}"
@@ -40,7 +40,7 @@ DefineMacro.SplitPCMDevice_chnpos.If.0 {
        }
 }
 
-DefineMacro.SplitPCMDevice_addchn.If.0 {
+DefineMacro.SplitPCMDevice_addchn.If.a {
        Condition {
                Type String
                Empty "${var:__Channel}"
@@ -64,7 +64,7 @@ DefineMacro.SplitPCMDevice_addchn.If.0 {
 #   [HWChannelPos1] - channel position (MONO FR FL etc. - see alsa-lib's strings)
 #
 
-DefineMacro.SplitPCM.If.0 {
+DefineMacro.SplitPCM.If.a {
        Condition {
                Type String
                Empty "${var:@SplitPCM}"
@@ -189,14 +189,14 @@ DefineMacro.SplitPCM.If.0 {
 #
 
 DefineMacro.SplitPCMDevice {
-       If.0 {
+       If.a {
                Condition {
                        Type String
                        Empty "${var:-__Device}"
                }
                True.Define.__Device "0"
        }
-       If.1 {
+       If.b {
                Condition {
                        Type String
                        Empty "${var:@SplitPCM}"