]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
USB-Audio: ALC4080 - add Headset device
authorJaroslav Kysela <perex@perex.cz>
Mon, 19 Jan 2026 09:01:06 +0000 (10:01 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 19 Jan 2026 10:09:47 +0000 (11:09 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf

index 6b8811199a15d4635e72f85ca1f3257bbdfa233c..b061dde72c85bf5c08d531d1f837d80c4635fa9e 100644 (file)
@@ -38,6 +38,12 @@ Define {
        Line1Jack "Line - Input Jack"
        Line1PCM "1"
 
+       HeadsetName ""
+       HeadsetMixer ""
+       HeadsetMindex ""
+       HeadsetJack ""
+       HeadsetPCM ""
+
        SpdifName "S/PDIF Output"
        SpdifPCM "3"
        SpdifMixer "PCM"
@@ -74,6 +80,20 @@ If.spdif_ctl {
        }
 }
 
+If.headset_ctl {
+       Condition {
+               Type ControlExists
+               Control "name='Headset Capture Switch'"
+       }
+       True.Define {
+               HeadsetName "Headset"
+               HeadsetMixer "Headset"
+               HeadsetMindex "0"
+               HeadsetJack "Headset - Input Jack"
+               HeadsetPCM "1"
+       }
+}
+
 If.spdif_nodev {
        Condition {
                Type RegexMatch
@@ -336,3 +356,28 @@ If.mic2 {
                }
        }
 }
+
+If.headset {
+       Condition {
+               Type String
+               Empty "${var:HeadsetName}"
+       }
+       False.SectionDevice."Headset" {
+               Comment "${var:HeadsetName}"
+
+               EnableSequence [
+                       cset "name='${var:HeadsetMixer} Capture Switch',index=${var:HeadsetMindex} on"
+               ]
+
+               DisableSequence [
+                       cset "name='${var:HeadsetMixer} Capture Switch',index=${var:HeadsetMindex} off"
+               ]
+
+               Value {
+                       CapturePriority 500
+                       CapturePCM "hw:${CardId},${var:HeadsetPCM}"
+                       JackControl "${var:HeadsetJack}"
+                       CaptureMixerElem "${var:HeadsetMixer},${var:HeadsetMindex}"
+               }
+       }
+}