From a879e50dbbcc793311c49452d4f1f304ee79a053 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 21 Nov 2025 14:21:36 +0100 Subject: [PATCH] common: split.conf - don't use If.0 blocks 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 --- ucm2/common/pcm/split.conf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ucm2/common/pcm/split.conf b/ucm2/common/pcm/split.conf index 91ded9c..b1f3dfa 100644 --- a/ucm2/common/pcm/split.conf +++ b/ucm2/common/pcm/split.conf @@ -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}" -- 2.47.3