]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
USB-Audio: Add profile for MSI MPG X570S Carbon Max Wifi.
authorJohannes Schickel <lordhoto@gmail.com>
Sun, 16 Jan 2022 13:27:08 +0000 (14:27 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 20 May 2022 16:57:52 +0000 (18:57 +0200)
This patch depends on Linux 5.17.

This board features an Realtek ALC4080 chip. The various inputs and
outputs are distributed over multiple hardware devices:
* Input
 - hw:$card,0 loop back from speaker (called "Analog In")
 - hw:$card,1 line in at back panel
 - hw:$card,2 microphone from front AND back panel
* Output
 - hw:$card,0 speaker output at back panel (up to 7.1)
 - hw:$card,1 headerphone output at front panel
 - hw:$card,2 could not figure this one out
 - hw:$card,3 guessed S/PDIF output (sadly no way to test)

By default Mic and Line in are disabled. This confuses applications,
thus I made the profile enable them by default.

Without an UCM profile PulseAudio is not able to create output on
the front panel nor record any microphone input.

Signed-off-by: Johannes Schickel <lordhoto@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf [new file with mode: 0644]
ucm2/USB-Audio/Realtek/ALC4080.conf [new file with mode: 0644]
ucm2/USB-Audio/USB-Audio.conf

diff --git a/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf b/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf
new file mode 100644 (file)
index 0000000..9bbaf63
--- /dev/null
@@ -0,0 +1,57 @@
+SectionDevice."Speaker" {
+       Comment "Speakers"
+       Value {
+               PlaybackChannels 8
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
+               JackControl "Speaker - Output Jack"
+               PlaybackMixerElem "Speaker"
+       }
+}
+
+SectionDevice."Headphones" {
+       Comment "Front Headphones"
+       Value {
+               PlaybackPriority 300
+               PlaybackPCM "hw:${CardId},1"
+               JackControl "Headphone - Output Jack"
+               PlaybackMixerElem "Front Headphone"
+       }
+}
+
+SectionDevice."SPDIF" {
+       Comment "S/PDIF Out"
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},3"
+               PlaybackMixerElem "IEC958"
+       }
+}
+
+SectionDevice."Line" {
+       EnableSequence [
+               cset "name='Line Capture Switch' on"
+       ]
+
+       Comment "Line In"
+       Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId},1"
+               JackControl "Line - Input Jack"
+               CaptureMixerElem "Line"
+       }
+}
+
+SectionDevice."Mic" {
+       EnableSequence [
+               cset "name='Mic Capture Switch' on"
+       ]
+
+       Comment "Microphone"
+       Value {
+               CapturePriority 200
+               CapturePCM "hw:${CardId},2"
+               JackControl "Mic - Input Jack"
+               CaptureMixerElem "Mic"
+       }
+}
diff --git a/ucm2/USB-Audio/Realtek/ALC4080.conf b/ucm2/USB-Audio/Realtek/ALC4080.conf
new file mode 100644 (file)
index 0000000..a42dd68
--- /dev/null
@@ -0,0 +1,5 @@
+Comment "USB-audio on Realtek ALC4080"
+SectionUseCase."HiFi" {
+       File "/USB-Audio/Realtek/ALC4080-HiFi.conf"
+       Comment "Default Alsa Profile"
+}
index c40187fd43adc206557002dbf0895a8ce93ccad6..75780fc0705299f57705064dfc907447223df4aa 100644 (file)
@@ -29,6 +29,17 @@ If.realtek-alc1220-vb {
        True.Define.ProfileName "Realtek/ALC1220-VB-Desktop"
 }
 
+If.realtek-alc4080 {
+
+       Condition {
+               Type RegexMatch
+               String "${CardComponents}"
+               # 0db0:419c MSI MPG X570S Carbon Max Wifi
+               Regex "USB(0db0:419c)"
+       }
+       True.Define.ProfileName "Realtek/ALC4080"
+}
+
 If.gigabyte-aorus-main {
        Condition {
                Type String