]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: HDA: Create microphone devices optionally
authorJaroslav Kysela <perex@perex.cz>
Sun, 4 Jan 2026 18:44:43 +0000 (19:44 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 5 Jan 2026 14:43:48 +0000 (15:43 +0100)
Check if 'Capture Switch' is present before HiFi-mic.conf file
is included.

Link: https://github.com/alsa-project/alsa-ucm-conf/issues/673
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/HDA/HiFi-analog.conf

index 25eca3c6b17ef5d27f6e085e6a30ded5fb095f2a..4628f5ae5303159518c1f1007cd91eb0bddb9665 100644 (file)
@@ -142,7 +142,13 @@ If.spk {
        }
 }
 
-Include.hifi-mic.File "/HDA/HiFi-mic.conf"
+If.cap-sw {
+       Condition {
+               Type ControlExists
+               Control "name='Capture Switch'"
+       }
+       True.Include.hifi-mic.File "/HDA/HiFi-mic.conf"
+}
 
 If.line {
        Condition {