From b51437390a12dbfb881574b7712af71e61f6f48e Mon Sep 17 00:00:00 2001 From: 13r0ck Date: Wed, 3 Aug 2022 22:37:16 -0600 Subject: [PATCH] USB-Audio: Add profile for MSI MEG Z690I Unify Very similar to c710aa0eb2fe184072b312a8afa5c4e301e93a65, but this board only has 3 devices, Mic, Line-Out and Line-In. Thus we are using the same conf. Mainly enabling the Mic by default, but we also need to disable the unused devices from the MSI MPG X570S Max WiFi. Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/196 Signed-off-by: 13r0ck Signed-off-by: Jaroslav Kysela --- ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf | 44 +++++++++++++++++------- ucm2/USB-Audio/USB-Audio.conf | 3 +- 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf b/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf index be2e273..e371616 100644 --- a/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf +++ b/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf @@ -43,6 +43,18 @@ If.asus-rog-usb { } } +If.msi-meg-unify { + Condition { + Type RegexMatch + String "${CardComponents}" + Regex "USB(0db0:82c7)" + } + True.Define { + HeadphonesName "" + SpdifName "" + } +} + SectionVerb { EnableSequence [ disdevall "" @@ -74,22 +86,28 @@ SectionDevice."Speaker" { Variant."HiFi 7+1".Value.PlaybackChannels 8 } -SectionDevice."Headphones" { - Comment "${var:HeadphonesName}" +If.headphones { + Condition { + Type String + Empty "${var:HeadphonesName}" + } + False.SectionDevice."Headphones" { + Comment "${var:HeadphonesName}" - EnableSequence [ - cset "name='${var:HeadphonesMixer} Playback Switch' on" - ] + EnableSequence [ + cset "name='${var:HeadphonesMixer} Playback Switch' on" + ] - DisableSequence [ - cset "name='${var:HeadphonesMixer} Playback Switch' off" - ] + DisableSequence [ + cset "name='${var:HeadphonesMixer} Playback Switch' off" + ] - Value { - PlaybackPriority 300 - PlaybackPCM "${var:HeadphonesPCM}" - JackControl "${var:HeadphonesJack}" - PlaybackMixerElem "${var:HeadphonesMixer}" + Value { + PlaybackPriority 300 + PlaybackPCM "${var:HeadphonesPCM}" + JackControl "${var:HeadphonesJack}" + PlaybackMixerElem "${var:HeadphonesMixer}" + } } } diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf index 7d9b72b..2668cd3 100644 --- a/ucm2/USB-Audio/USB-Audio.conf +++ b/ucm2/USB-Audio/USB-Audio.conf @@ -41,8 +41,9 @@ If.realtek-alc4080 { # 0b05:1a20 ASUS ROG STRIX Z690-I Gaming Wifi # 0db0:1feb MSI Edge Wifi Z690 # 0db0:419c MSI MPG X570S Carbon Max Wifi + # 0db0:82c7 MSI MEG Z690I Unify # 0db0:a073 MSI MAG X570S Torpedo Max - Regex "USB((0b05:(1996|1a2[07]))|(0db0:(1feb|419c|a073)))" + Regex "USB((0b05:(1996|1a2[07]))|(0db0:(1feb|419c|82c7|a073)))" } True.Define.ProfileName "Realtek/ALC4080" } -- 2.47.1