File 0003-ucm2-codecs-rt722-add-condition-to-SetLED-for-mic.patch of Package alsa-ucm-conf
From 5d0d2bd660b4378f802c94be3eadd8375c4c7a3a Mon Sep 17 00:00:00 2001
From: Shuming Fan <shumingf@realtek.com>
Date: Tue, 9 Dec 2025 15:40:49 +0800
Subject: [PATCH 3/3] ucm2: codecs: rt722: add condition to SetLED for mic
Some SKUs don't have the internal mic, so the patch adds the condition to check
whether the SKU has the internal mic or not.
Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/657
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
ucm2/codecs/rt722/init.conf | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/ucm2/codecs/rt722/init.conf b/ucm2/codecs/rt722/init.conf
index c820e55e4711..40f245856d43 100644
--- a/ucm2/codecs/rt722/init.conf
+++ b/ucm2/codecs/rt722/init.conf
@@ -10,4 +10,11 @@ BootSequence [
cset "name='rt722 FU0F Capture Volume' 63"
]
-Macro [{ SetLED { LED="mic" Action="attach" CtlId="rt722 FU1E Capture Switch" } }]
+If.mic_init_rt722 {
+ Condition {
+ Type String
+ Needle "rt722"
+ Haystack "${var:MicCodec1}"
+ }
+ True.Macro [{ SetLED { LED="mic" Action="attach" CtlId="rt722 FU1E Capture Switch" } }]
+}
--
2.52.0