From: Maciej Strozek Date: Tue, 9 Dec 2025 13:00:44 +0000 (+0000) Subject: sof-soundwire: third fix for multi-codec X-Git-Tag: v1.2.15.1~3 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=d57d800c6a5a77e6c475719b0297bebb098f7533;p=alsa-ucm-conf.git sof-soundwire: third fix for multi-codec 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 Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf index 7f9c7dc..895f479 100644 --- a/ucm2/sof-soundwire/sof-soundwire.conf +++ b/ucm2/sof-soundwire/sof-soundwire.conf @@ -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 ""