]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
sof-soundwire: third fix for multi-codec
authorMaciej Strozek <mstrozek@opensource.cirrus.com>
Tue, 9 Dec 2025 13:00:44 +0000 (13:00 +0000)
committerJaroslav Kysela <perex@perex.cz>
Tue, 9 Dec 2025 13:49:30 +0000 (14:49 +0100)
Ensure MultiCodec-based actions are only done when MultiCodec1 is not empty

Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/658
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/sof-soundwire/sof-soundwire.conf

index 7f9c7dcf0d8dac5c71646c1dd3995a232cea5a30..895f479933f4341cbce9e5522b97ab024e44c0bf 100644 (file)
@@ -72,8 +72,9 @@ If.multi_init {
 If.multi_speaker {
        Condition {
                Type RegexMatch
-               Regex "(${var:MultiCodec1}(-sdca)?)"
-               String "${var:SpeakerCodec1}"
+               # guard with "=" to avoid empty string matching
+               Regex "=(${var:MultiCodec1}(-sdca)?)="
+               String "=${var:SpeakerCodec1}="
        }
        True {
                Define.SpeakerCodec1 ""
@@ -83,8 +84,9 @@ If.multi_speaker {
 If.multi_mic {
        Condition {
                Type RegexMatch
-               Regex "(${var:MultiCodec1}(-sdca)?)"
-               String "${var:MicCodec1}"
+               # guard with "=" to avoid empty string matching
+               Regex "=(${var:MultiCodec1}(-sdca)?)="
+               String "=${var:MicCodec1}="
        }
        True {
                Define.MicCodec1 ""
@@ -94,8 +96,9 @@ If.multi_mic {
 If.multi_headset {
        Condition {
                Type RegexMatch
-               Regex "(${var:MultiCodec1}(-sdca)?)"
-               String "${var:HeadsetCodec1}"
+               # guard with "=" to avoid empty string matching
+               Regex "=(${var:MultiCodec1}(-sdca)?)="
+               String "=${var:HeadsetCodec1}="
        }
        True {
                Define.HeadsetCodec1 ""