]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
USB-Audio/Realtek/ALC4080: Fix microphone on MSI boards after ASUS changes.
authorJohannes Schickel <lordhoto@gmail.com>
Wed, 13 Apr 2022 19:58:18 +0000 (21:58 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 20 May 2022 16:57:52 +0000 (18:57 +0200)
Signed-off-by: Johannes Schickel <lordhoto@gmail.com>.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf

index 52f6564b16e8d9888ca173595a7d966603c7644a..77931190a6ae4d39633918be6595ceaa315a96dd 100644 (file)
@@ -1,4 +1,5 @@
 Define.SPDIFIndex "3"
+Define.Mic1Name "Microphone"
 
 If.asus-rog-usb {
        Condition {
@@ -6,7 +7,21 @@ If.asus-rog-usb {
                String "${CardComponents}"
                Regex "USB(0b05:1996)"
        }
-       True.Define.SPDIFIndex "2"
+       True {
+               Define.SPDIFIndex "2"
+               Define.Mic1Name "Front Microphone"
+
+               SectionDevice."Mic2" {
+                       # On ASUS ROG Maximus XIII and others, back microphone
+                       Comment "Microphone"
+                       Value {
+                               CapturePriority 300
+                               CapturePCM "hw:${CardId}"
+                               JackControl "Mic - Input Jack"
+                               CaptureMixerElem "Mic"
+                       }
+               }
+       }
 }
 
 SectionDevice."Speaker" {
@@ -53,25 +68,16 @@ SectionDevice."Line" {
        }
 }
 
-SectionDevice."Mic" {
+SectionDevice."Mic1" {
        EnableSequence [
                cset "name='Mic Capture Switch' on"
        ]
 
-       Comment "Front Microphone"
+       Comment "${var:Mic1Name}"
        Value {
                CapturePriority 200
                CapturePCM "hw:${CardId},2"
                JackControl "Mic - Input Jack"
                CaptureMixerElem "Mic"
        }
-
-       # On ASUS ROG Maximus XIII and others, back microphone
-       Comment "Microphone"
-       Value {
-               CapturePriority 300
-               CapturePCM "hw:${CardId}"
-               JackControl "Mic - Input Jack"
-               CaptureMixerElem "Mic"
-       }
 }