Blame SOURCES/alsa-ucm-conf.patch

bc7ea9
From 2667378a6b9120d99e44f783ac4d247fb683d83c Mon Sep 17 00:00:00 2001
bc7ea9
From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?=
bc7ea9
 <nfraprado@collabora.com>
bc7ea9
Date: Thu, 24 Mar 2022 18:13:45 -0400
bc7ea9
Subject: [PATCH 01/21] ucm2: Add support for MT8192 Asurada Spherion
bc7ea9
 Chromebook
bc7ea9
MIME-Version: 1.0
bc7ea9
Content-Type: text/plain; charset=UTF-8
bc7ea9
Content-Transfer-Encoding: 8bit
bc7ea9
bc7ea9
Add support for the Acer Chromebook 514 CP514-2H, powered by MediaTek
bc7ea9
Kompanio 820 (MT8192). This machine uses a MT6359 PMIC, with RT1015P as
bc7ea9
speaker codec and RT5682 as headphone codec.
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/217
bc7ea9
Signed-off-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 .../mt8192/mt6359-rt1015p-rt5682/HiFi.conf    | 88 +++++++++++++++++++
bc7ea9
 .../mt8192/mt6359-rt1015p-rt5682/init.conf    | 24 +++++
bc7ea9
 .../mt8192_mt6359_rt1015p_rt5682.conf         | 11 +++
bc7ea9
 .../mt8192_mt6359_rt1015p_rt5682.conf         |  1 +
bc7ea9
 4 files changed, 124 insertions(+)
bc7ea9
 create mode 100644 ucm2/MediaTek/mt8192/mt6359-rt1015p-rt5682/HiFi.conf
bc7ea9
 create mode 100644 ucm2/MediaTek/mt8192/mt6359-rt1015p-rt5682/init.conf
bc7ea9
 create mode 100644 ucm2/MediaTek/mt8192/mt6359-rt1015p-rt5682/mt8192_mt6359_rt1015p_rt5682.conf
bc7ea9
 create mode 120000 ucm2/conf.d/mt8192_mt6359/mt8192_mt6359_rt1015p_rt5682.conf
bc7ea9
bc7ea9
diff --git a/ucm2/MediaTek/mt8192/mt6359-rt1015p-rt5682/HiFi.conf b/ucm2/MediaTek/mt8192/mt6359-rt1015p-rt5682/HiFi.conf
bc7ea9
new file mode 100644
bc7ea9
index 0000000..cf0d2c1
bc7ea9
--- /dev/null
bc7ea9
+++ b/ucm2/MediaTek/mt8192/mt6359-rt1015p-rt5682/HiFi.conf
bc7ea9
@@ -0,0 +1,88 @@
bc7ea9
+SectionVerb {
bc7ea9
+	EnableSequence [
bc7ea9
+		disdevall ""
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		TQ "HiFi"
bc7ea9
+	}
bc7ea9
+}
bc7ea9
+
bc7ea9
+SectionDevice."Speaker" {
bc7ea9
+	Comment "Speaker"
bc7ea9
+
bc7ea9
+	EnableSequence [
bc7ea9
+		cset "name='Speakers Switch' 1"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	DisableSequence [
bc7ea9
+		cset "name='Speakers Switch' 0"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		PlaybackPCM "hw:${CardId},0"
bc7ea9
+		PlaybackPriority 100
bc7ea9
+	}
bc7ea9
+}
bc7ea9
+
bc7ea9
+SectionDevice."Headphones" {
bc7ea9
+	Comment "Headphones"
bc7ea9
+
bc7ea9
+	EnableSequence [
bc7ea9
+		cset "name='Headphone Jack Switch' 1"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	DisableSequence [
bc7ea9
+		cset "name='Headphone Jack Switch' 0"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		PlaybackPCM "hw:${CardId},3"
bc7ea9
+		JackControl "Headphone Jack"
bc7ea9
+		PlaybackMixerElem "DAC1"
bc7ea9
+		PlaybackPriority 200
bc7ea9
+	}
bc7ea9
+}
bc7ea9
+
bc7ea9
+SectionDevice."Mic" {
bc7ea9
+	Comment "Internal Microphone"
bc7ea9
+
bc7ea9
+	EnableSequence [
bc7ea9
+		cset "name='MTKAIF_DMIC Switch' 1"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	DisableSequence [
bc7ea9
+		cset "name='MTKAIF_DMIC Switch' 0"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		CapturePCM "hw:${CardId},10"
bc7ea9
+		CapturePriority 100
bc7ea9
+	}
bc7ea9
+}
bc7ea9
+
bc7ea9
+SectionDevice."Headset" {
bc7ea9
+	Comment "Headset Microphone"
bc7ea9
+
bc7ea9
+	EnableSequence [
bc7ea9
+		cset "name='Headset Mic Switch' 1"
bc7ea9
+		cset "name='STO1 ADC Capture Switch' 1"
bc7ea9
+		cset "name='RECMIX1L CBJ Switch' 1"
bc7ea9
+		cset "name='Stereo1 ADC MIXL ADC1 Switch' 1"
bc7ea9
+		cset "name='Stereo1 ADC MIXR ADC1 Switch' 1"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	DisableSequence [
bc7ea9
+		cset "name='STO1 ADC Capture Switch' 0"
bc7ea9
+		cset "name='RECMIX1L CBJ Switch' 0"
bc7ea9
+		cset "name='Stereo1 ADC MIXL ADC1 Switch' 0"
bc7ea9
+		cset "name='Stereo1 ADC MIXR ADC1 Switch' 0"
bc7ea9
+		cset "name='Headset Mic Switch' 0"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		CapturePCM  "hw:${CardId},11"
bc7ea9
+		JackControl "Headset Mic Jack"
bc7ea9
+		CapturePriority 200
bc7ea9
+	}
bc7ea9
+}
bc7ea9
diff --git a/ucm2/MediaTek/mt8192/mt6359-rt1015p-rt5682/init.conf b/ucm2/MediaTek/mt8192/mt6359-rt1015p-rt5682/init.conf
bc7ea9
new file mode 100644
bc7ea9
index 0000000..b53178e
bc7ea9
--- /dev/null
bc7ea9
+++ b/ucm2/MediaTek/mt8192/mt6359-rt1015p-rt5682/init.conf
bc7ea9
@@ -0,0 +1,24 @@
bc7ea9
+BootSequence [
bc7ea9
+	# Speaker
bc7ea9
+	cset "name='I2S3_CH1 DL1_CH1' 1"
bc7ea9
+	cset "name='I2S3_CH2 DL1_CH2' 1"
bc7ea9
+	cset "name='I2S3_HD_Mux' 1"
bc7ea9
+
bc7ea9
+	# Headphone
bc7ea9
+	cset "name='I2S9_CH1 DL3_CH1' 1"
bc7ea9
+	cset "name='I2S9_CH2 DL3_CH2' 1"
bc7ea9
+	cset "name='I2S9_HD_Mux' 1"
bc7ea9
+
bc7ea9
+	# Internal Mic
bc7ea9
+	cset "name='UL1_CH1 ADDA_UL_CH1' 1"
bc7ea9
+	cset "name='UL1_CH2 ADDA_UL_CH2' 1"
bc7ea9
+	cset "name='UL_SRC_MUX' DMIC"
bc7ea9
+
bc7ea9
+	# Headset Mic
bc7ea9
+	cset "name='UL2_CH1 I2S8_CH1' 1"
bc7ea9
+	cset "name='UL2_CH2 I2S8_CH2' 1"
bc7ea9
+	cset "name='I2S8_HD_Mux' 1"
bc7ea9
+	cset "name='Stereo1 ADC L1 Mux' 1"
bc7ea9
+	cset "name='Stereo1 ADC R1 Mux' 1"
bc7ea9
+	cset "name='CBJ Boost Volume' 3"
bc7ea9
+]
bc7ea9
diff --git a/ucm2/MediaTek/mt8192/mt6359-rt1015p-rt5682/mt8192_mt6359_rt1015p_rt5682.conf b/ucm2/MediaTek/mt8192/mt6359-rt1015p-rt5682/mt8192_mt6359_rt1015p_rt5682.conf
bc7ea9
new file mode 100644
bc7ea9
index 0000000..b4e124d
bc7ea9
--- /dev/null
bc7ea9
+++ b/ucm2/MediaTek/mt8192/mt6359-rt1015p-rt5682/mt8192_mt6359_rt1015p_rt5682.conf
bc7ea9
@@ -0,0 +1,11 @@
bc7ea9
+Comment "MT8192 MT6359 RT1015P RT5682 sound card"
bc7ea9
+Syntax 4
bc7ea9
+
bc7ea9
+SectionUseCase."HiFi" {
bc7ea9
+  File "HiFi.conf"
bc7ea9
+  Comment "Default"
bc7ea9
+}
bc7ea9
+
bc7ea9
+Include.card-init.File "/lib/card-init.conf"
bc7ea9
+Include.ctl-remap.File "/lib/ctl-remap.conf"
bc7ea9
+Include.init.File "init.conf"
bc7ea9
diff --git a/ucm2/conf.d/mt8192_mt6359/mt8192_mt6359_rt1015p_rt5682.conf b/ucm2/conf.d/mt8192_mt6359/mt8192_mt6359_rt1015p_rt5682.conf
bc7ea9
new file mode 120000
bc7ea9
index 0000000..4425b19
bc7ea9
--- /dev/null
bc7ea9
+++ b/ucm2/conf.d/mt8192_mt6359/mt8192_mt6359_rt1015p_rt5682.conf
bc7ea9
@@ -0,0 +1 @@
bc7ea9
+../../MediaTek/mt8192/mt6359-rt1015p-rt5682/mt8192_mt6359_rt1015p_rt5682.conf
bc7ea9
\ No newline at end of file
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From 6dee56f11fbd48dd412179722a445416fcd779ef Mon Sep 17 00:00:00 2001
bc7ea9
From: Jaroslav Kysela <perex@perex.cz>
bc7ea9
Date: Sun, 6 Nov 2022 18:08:27 +0100
bc7ea9
Subject: [PATCH 02/21] ucm: USB-Audio - Add support for Focusrite Scarlett 2i2
bc7ea9
 gen2
bc7ea9
bc7ea9
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/234
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ...2-HiFi.conf => Scarlett-2i-gen2-HiFi.conf} | 45 +++++++++++--------
bc7ea9
 .../USB-Audio/Focusrite/Scarlett-2i-gen2.conf | 22 +++++++++
bc7ea9
 .../Focusrite/Scarlett-2i4-gen2.conf          | 11 -----
bc7ea9
 ucm2/USB-Audio/USB-Audio.conf                 | 10 ++---
bc7ea9
 4 files changed, 53 insertions(+), 35 deletions(-)
bc7ea9
 rename ucm2/USB-Audio/Focusrite/{Scarlett-2i4-gen2-HiFi.conf => Scarlett-2i-gen2-HiFi.conf} (65%)
bc7ea9
 create mode 100644 ucm2/USB-Audio/Focusrite/Scarlett-2i-gen2.conf
bc7ea9
 delete mode 100644 ucm2/USB-Audio/Focusrite/Scarlett-2i4-gen2.conf
bc7ea9
bc7ea9
diff --git a/ucm2/USB-Audio/Focusrite/Scarlett-2i4-gen2-HiFi.conf b/ucm2/USB-Audio/Focusrite/Scarlett-2i-gen2-HiFi.conf
bc7ea9
similarity index 65%
bc7ea9
rename from ucm2/USB-Audio/Focusrite/Scarlett-2i4-gen2-HiFi.conf
bc7ea9
rename to ucm2/USB-Audio/Focusrite/Scarlett-2i-gen2-HiFi.conf
bc7ea9
index 5ee5076..ab69bc7 100644
bc7ea9
--- a/ucm2/USB-Audio/Focusrite/Scarlett-2i4-gen2-HiFi.conf
bc7ea9
+++ b/ucm2/USB-Audio/Focusrite/Scarlett-2i-gen2-HiFi.conf
bc7ea9
@@ -3,7 +3,7 @@ Include.pcm_split.File "/common/pcm/split.conf"
bc7ea9
 Macro [
bc7ea9
 	{
bc7ea9
 		SplitPCM {
bc7ea9
-			Name "scarlett2i4_stereo_out"
bc7ea9
+			Name "scarlett2i_stereo_out"
bc7ea9
 			Direction Playback
bc7ea9
 			Format S32_LE
bc7ea9
 			Channels 2
bc7ea9
@@ -16,7 +16,7 @@ Macro [
bc7ea9
 	}
bc7ea9
 	{
bc7ea9
 		SplitPCM {
bc7ea9
-			Name "scarlett2i4_mono_in"
bc7ea9
+			Name "scarlett2i_mono_in"
bc7ea9
 			Direction Capture
bc7ea9
 			Format S32_LE
bc7ea9
 			Channels 1
bc7ea9
@@ -33,7 +33,7 @@ SectionDevice."Line1" {
bc7ea9
 		PlaybackPriority 200
bc7ea9
 	}
bc7ea9
 	Macro.pcm_split.SplitPCMDevice {
bc7ea9
-		Name "scarlett2i4_stereo_out"
bc7ea9
+		Name "scarlett2i_stereo_out"
bc7ea9
 		Direction Playback
bc7ea9
 		HWChannels 4
bc7ea9
 		Channels 2
bc7ea9
@@ -44,21 +44,28 @@ SectionDevice."Line1" {
bc7ea9
 	}
bc7ea9
 }
bc7ea9
 
bc7ea9
-SectionDevice."Line2" {
bc7ea9
-	Comment "Line 3-4"
bc7ea9
-
bc7ea9
-	Value {
bc7ea9
-		PlaybackPriority 100
bc7ea9
+If.scarlett_2i4 {
bc7ea9
+	Condition {
bc7ea9
+		Type String
bc7ea9
+		String1 "${var:PlaybackChannels}"
bc7ea9
+		String2 "4"
bc7ea9
 	}
bc7ea9
-	Macro.pcm_split.SplitPCMDevice {
bc7ea9
-		Name "scarlett2i4_stereo_out"
bc7ea9
-		Direction Playback
bc7ea9
-		HWChannels 4
bc7ea9
-		Channels 2
bc7ea9
-		Channel0 2
bc7ea9
-		Channel1 3
bc7ea9
-		ChannelPos0 FL
bc7ea9
-		ChannelPos1 FR
bc7ea9
+	True.SectionDevice."Line2" {
bc7ea9
+		Comment "Line 3-4"
bc7ea9
+
bc7ea9
+		Value {
bc7ea9
+			PlaybackPriority 100
bc7ea9
+		}
bc7ea9
+		Macro.pcm_split.SplitPCMDevice {
bc7ea9
+			Name "scarlett2i_stereo_out"
bc7ea9
+			Direction Playback
bc7ea9
+			HWChannels 4
bc7ea9
+			Channels 2
bc7ea9
+			Channel0 2
bc7ea9
+			Channel1 3
bc7ea9
+			ChannelPos0 FL
bc7ea9
+			ChannelPos1 FR
bc7ea9
+		}
bc7ea9
 	}
bc7ea9
 }
bc7ea9
 
bc7ea9
@@ -69,7 +76,7 @@ SectionDevice."Mic1" {
bc7ea9
 		CapturePriority 200
bc7ea9
 	}
bc7ea9
 	Macro.pcm_split.SplitPCMDevice {
bc7ea9
-		Name "scarlett2i4_mono_in"
bc7ea9
+		Name "scarlett2i_mono_in"
bc7ea9
 		Direction Capture
bc7ea9
 		HWChannels 2
bc7ea9
 		Channels 1
bc7ea9
@@ -85,7 +92,7 @@ SectionDevice."Mic2" {
bc7ea9
 		CapturePriority 100
bc7ea9
 	}
bc7ea9
 	Macro.pcm_split.SplitPCMDevice {
bc7ea9
-		Name "scarlett2i4_mono_in"
bc7ea9
+		Name "scarlett2i_mono_in"
bc7ea9
 		Direction Capture
bc7ea9
 		HWChannels 2
bc7ea9
 		Channels 1
bc7ea9
diff --git a/ucm2/USB-Audio/Focusrite/Scarlett-2i-gen2.conf b/ucm2/USB-Audio/Focusrite/Scarlett-2i-gen2.conf
bc7ea9
new file mode 100644
bc7ea9
index 0000000..ee5b0b5
bc7ea9
--- /dev/null
bc7ea9
+++ b/ucm2/USB-Audio/Focusrite/Scarlett-2i-gen2.conf
bc7ea9
@@ -0,0 +1,22 @@
bc7ea9
+Define.PlaybackChannels 4
bc7ea9
+
bc7ea9
+If.scarlett_2i4 {
bc7ea9
+	Condition {
bc7ea9
+		Type String
bc7ea9
+		Haystack "${CardComponents}"
bc7ea9
+		Needle "USB1235:8202"
bc7ea9
+	}
bc7ea9
+	True.Define.PlaybackChannels 2
bc7ea9
+}
bc7ea9
+
bc7ea9
+Comment "Focusrite Scarlett 2i${var:PlaybackChannels} Gen 2"
bc7ea9
+
bc7ea9
+SectionUseCase."HiFi" {
bc7ea9
+    Comment "Default"
bc7ea9
+    File "/USB-Audio/Focusrite/Scarlett-2i-gen2-HiFi.conf"
bc7ea9
+}
bc7ea9
+
bc7ea9
+Define.DirectPlaybackChannels "${var:PlaybackChannels}"
bc7ea9
+Define.DirectCaptureChannels 2
bc7ea9
+
bc7ea9
+Include.dhw.File "/common/direct.conf"
bc7ea9
diff --git a/ucm2/USB-Audio/Focusrite/Scarlett-2i4-gen2.conf b/ucm2/USB-Audio/Focusrite/Scarlett-2i4-gen2.conf
bc7ea9
deleted file mode 100644
bc7ea9
index ffc296d..0000000
bc7ea9
--- a/ucm2/USB-Audio/Focusrite/Scarlett-2i4-gen2.conf
bc7ea9
+++ /dev/null
bc7ea9
@@ -1,11 +0,0 @@
bc7ea9
-Comment "Focusrite Scarlett 2i4 Gen 2"
bc7ea9
-
bc7ea9
-SectionUseCase."HiFi" {
bc7ea9
-    Comment "Default"
bc7ea9
-    File "/USB-Audio/Focusrite/Scarlett-2i4-gen2-HiFi.conf"
bc7ea9
-}
bc7ea9
-
bc7ea9
-Define.DirectPlaybackChannels 4
bc7ea9
-Define.DirectCaptureChannels 2
bc7ea9
-
bc7ea9
-Include.dhw.File "/common/direct.conf"
bc7ea9
diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
index 90a88d4..3479ba1 100644
bc7ea9
--- a/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
+++ b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
@@ -135,14 +135,14 @@ If.goxlr {
bc7ea9
 	True.Define.ProfileName "GoXLR/GoXLR"
bc7ea9
 }
bc7ea9
 
bc7ea9
-If.focusrite-scarlett-2i4-gen2 {
bc7ea9
+If.focusrite-scarlett-2i-gen2 {
bc7ea9
 	Condition {
bc7ea9
-		Type String
bc7ea9
-		Haystack "${CardComponents}"
bc7ea9
-		Needle "USB1235:8200"
bc7ea9
+		Type RegexMatch
bc7ea9
+		String "${CardComponents}"
bc7ea9
+		Regex "USB1235:820[02]"
bc7ea9
 	}
bc7ea9
 	True.Define {
bc7ea9
-		ProfileName "Focusrite/Scarlett-2i4-gen2"
bc7ea9
+		ProfileName "Focusrite/Scarlett-2i-gen2"
bc7ea9
 	}
bc7ea9
 }
bc7ea9
 
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From b50a903f488e3f6479001b603c1b42b2a9600882 Mon Sep 17 00:00:00 2001
bc7ea9
From: Manu Linares <mbarriolinares@gmail.com>
bc7ea9
Date: Sat, 5 Nov 2022 19:32:27 -0300
bc7ea9
Subject: [PATCH 04/21] ucm2: USB-Audio - Added Digidesign Mbox 3 support
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/237
bc7ea9
Signed-off-by: Manu Linares <mbarriolinares@gmail.com>
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 .../Digidesign/Digidesign-Mbox-3-HiFi.conf    | 126 ++++++++++++++++++
bc7ea9
 .../Digidesign/Digidesign-Mbox-3.conf         |  11 ++
bc7ea9
 ucm2/USB-Audio/USB-Audio.conf                 |   9 ++
bc7ea9
 3 files changed, 146 insertions(+)
bc7ea9
 create mode 100644 ucm2/USB-Audio/Digidesign/Digidesign-Mbox-3-HiFi.conf
bc7ea9
 create mode 100644 ucm2/USB-Audio/Digidesign/Digidesign-Mbox-3.conf
bc7ea9
bc7ea9
diff --git a/ucm2/USB-Audio/Digidesign/Digidesign-Mbox-3-HiFi.conf b/ucm2/USB-Audio/Digidesign/Digidesign-Mbox-3-HiFi.conf
bc7ea9
new file mode 100644
bc7ea9
index 0000000..7219bea
bc7ea9
--- /dev/null
bc7ea9
+++ b/ucm2/USB-Audio/Digidesign/Digidesign-Mbox-3-HiFi.conf
bc7ea9
@@ -0,0 +1,126 @@
bc7ea9
+Include.pcm_split.File "/common/pcm/split.conf"
bc7ea9
+
bc7ea9
+Macro [
bc7ea9
+	{
bc7ea9
+		SplitPCM {
bc7ea9
+			Name "mbox3_stereo_out"
bc7ea9
+			Direction Playback
bc7ea9
+			Channels 2
bc7ea9
+			HWChannels 4
bc7ea9
+			HWChannelPos0 FL
bc7ea9
+			HWChannelPos1 FR
bc7ea9
+			HWChannelPos2 FL
bc7ea9
+			HWChannelPos3 FR
bc7ea9
+		}
bc7ea9
+	}
bc7ea9
+	{
bc7ea9
+		SplitPCM {
bc7ea9
+			Name "mbox3_stereo_in"
bc7ea9
+			Direction Capture
bc7ea9
+			Channels 2
bc7ea9
+			HWChannels 4
bc7ea9
+			HWChannelPos0 FL
bc7ea9
+			HWChannelPos1 FR
bc7ea9
+			HWChannelPos2 FL
bc7ea9
+			HWChannelPos3 FR
bc7ea9
+		}
bc7ea9
+	}
bc7ea9
+	{
bc7ea9
+		SplitPCM {
bc7ea9
+			Name "mbox3_mono_in"
bc7ea9
+			Direction Capture
bc7ea9
+			Channels 1
bc7ea9
+			HWChannels 4
bc7ea9
+			HWChannelPos0 MONO
bc7ea9
+			HWChannelPos1 MONO
bc7ea9
+			HWChannelPos2 MONO
bc7ea9
+			HWChannelPos3 MONO
bc7ea9
+		}
bc7ea9
+	}
bc7ea9
+]
bc7ea9
+
bc7ea9
+SectionDevice."Line1" {
bc7ea9
+	Comment "Main Output L/R"
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		PlaybackPriority 300
bc7ea9
+	}
bc7ea9
+	Macro.pcm_split.SplitPCMDevice {
bc7ea9
+		Name "mbox3_stereo_out"
bc7ea9
+		Direction Playback
bc7ea9
+		HWChannels 4
bc7ea9
+		Channels 2
bc7ea9
+		Channel0 0
bc7ea9
+		Channel1 1
bc7ea9
+		ChannelPos0 FL
bc7ea9
+		ChannelPos1 FR
bc7ea9
+	}
bc7ea9
+}
bc7ea9
+
bc7ea9
+
bc7ea9
+SectionDevice."line2SPDIF" {
bc7ea9
+	Comment "SPDIF Out"
bc7ea9
+	Value {
bc7ea9
+		PlaybackPriority 100
bc7ea9
+	}
bc7ea9
+	Macro.pcm_split.SplitPCMDevice {
bc7ea9
+		Name "mbox3_stereo_out"
bc7ea9
+		Direction Playback
bc7ea9
+		HWChannels 4
bc7ea9
+		Channels 2
bc7ea9
+		Channel0 2
bc7ea9
+		Channel1 3
bc7ea9
+		ChannelPos0 FL
bc7ea9
+		ChannelPos1 FR
bc7ea9
+	}
bc7ea9
+}
bc7ea9
+
bc7ea9
+SectionDevice."mic1" {
bc7ea9
+	Comment "Mic/Line 1"
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		CapturePriority 300
bc7ea9
+	}
bc7ea9
+	Macro.pcm_split.SplitPCMDevice {
bc7ea9
+		Name "mbox3_mono_in"
bc7ea9
+		Direction Capture
bc7ea9
+		HWChannels 4
bc7ea9
+		Channels 1
bc7ea9
+		Channel0 0
bc7ea9
+		ChannelPos0 MONO
bc7ea9
+	}
bc7ea9
+}
bc7ea9
+
bc7ea9
+SectionDevice."mic2" {
bc7ea9
+	Comment "Mic/Line 2"
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		CapturePriority 200
bc7ea9
+	}
bc7ea9
+	Macro.pcm_split.SplitPCMDevice {
bc7ea9
+		Name "mbox3_mono_in"
bc7ea9
+		Direction Capture
bc7ea9
+		HWChannels 4
bc7ea9
+		Channels 1
bc7ea9
+		Channel0 1
bc7ea9
+		ChannelPos0 MONO
bc7ea9
+	}
bc7ea9
+}
bc7ea9
+
bc7ea9
+SectionDevice."mic3SPDIF" {
bc7ea9
+	Comment "SPDIF In"
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		CapturePriority 100
bc7ea9
+	}
bc7ea9
+	Macro.pcm_split.SplitPCMDevice {
bc7ea9
+		Name "mbox3_stereo_in"
bc7ea9
+		Direction Capture
bc7ea9
+		HWChannels 4
bc7ea9
+		Channels 2
bc7ea9
+		Channel0 2
bc7ea9
+		Channel1 3
bc7ea9
+		ChannelPos0 FL
bc7ea9
+		ChannelPos1 FR
bc7ea9
+	}
bc7ea9
+}
bc7ea9
diff --git a/ucm2/USB-Audio/Digidesign/Digidesign-Mbox-3.conf b/ucm2/USB-Audio/Digidesign/Digidesign-Mbox-3.conf
bc7ea9
new file mode 100644
bc7ea9
index 0000000..d6e19f9
bc7ea9
--- /dev/null
bc7ea9
+++ b/ucm2/USB-Audio/Digidesign/Digidesign-Mbox-3.conf
bc7ea9
@@ -0,0 +1,11 @@
bc7ea9
+Comment "Digidesign Mbox 3"
bc7ea9
+
bc7ea9
+SectionUseCase."Mixer" {
bc7ea9
+	Comment "Stereo Duplex"
bc7ea9
+	File "/USB-Audio/Digidesign/Digidesign-Mbox-3-HiFi.conf"
bc7ea9
+}
bc7ea9
+
bc7ea9
+Define.DirectPlaybackChannels 4
bc7ea9
+Define.DirectCaptureChannels 4
bc7ea9
+
bc7ea9
+Include.dhw.File "/common/direct.conf"
bc7ea9
diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
index 3479ba1..d1d70d8 100644
bc7ea9
--- a/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
+++ b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
@@ -126,6 +126,15 @@ If.dell-desktop-rear {
bc7ea9
 	True.Define.ProfileName "Dell/Desktop-Rear"
bc7ea9
 }
bc7ea9
 
bc7ea9
+If.mbox3 {
bc7ea9
+	Condition {
bc7ea9
+		Type String
bc7ea9
+		Haystack "${CardComponents}"
bc7ea9
+		Needle "USB0dba:5000"
bc7ea9
+	}
bc7ea9
+	True.Define.ProfileName "Digidesign/Digidesign-Mbox-3"
bc7ea9
+}
bc7ea9
+
bc7ea9
 If.goxlr {
bc7ea9
 	Condition {
bc7ea9
 		Type RegexMatch
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From 88f232dffd54e1b9222ea76c7885445efebaa74d Mon Sep 17 00:00:00 2001
bc7ea9
From: "Ben Scholzen (DASPRiD)" <mail@dasprids.de>
bc7ea9
Date: Mon, 31 Oct 2022 17:41:02 +0100
bc7ea9
Subject: [PATCH 05/21] ucm2: Alc4080 - add support for ASUS ROG Strix Z790-E
bc7ea9
 Gaming Wifi
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/235
bc7ea9
Signed-off-by: Ben Scholzen (DASPRiD) <mail@dasprids.de>
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf | 2 +-
bc7ea9
 ucm2/USB-Audio/USB-Audio.conf            | 3 ++-
bc7ea9
 2 files changed, 3 insertions(+), 2 deletions(-)
bc7ea9
bc7ea9
diff --git a/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf b/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf
bc7ea9
index 519f3b0..fa8d445 100644
bc7ea9
--- a/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf
bc7ea9
+++ b/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf
bc7ea9
@@ -68,7 +68,7 @@ If.spdif_dev2 {
bc7ea9
 	Condition {
bc7ea9
 		Type RegexMatch
bc7ea9
 		String "${CardComponents}"
bc7ea9
-		Regex "USB(0b05:1996|0db0:1feb)"
bc7ea9
+		Regex "USB(0b05:1996|0b05:1a52|0db0:1feb)"
bc7ea9
 	}
bc7ea9
 	True.Define.SpdifPCM "hw:${CardId},2"
bc7ea9
 }
bc7ea9
diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
index d1d70d8..e30dc2b 100644
bc7ea9
--- a/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
+++ b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
@@ -41,6 +41,7 @@ If.realtek-alc4080 {
bc7ea9
 		# 0b05:1a16 ASUS ROG Strix B660-F Gaming WiFi
bc7ea9
 		# 0b05:1a20 ASUS ROG STRIX Z690-I Gaming Wifi
bc7ea9
 		# 0b05:1a27 ALC4082 on ASUS ROG Maximus Z690 Hero
bc7ea9
+		# 0b05:1a52 ASUS ROG Strix Z790-E Gaming Wifi
bc7ea9
 		# 0db0:005a MSI MPG Z690 CARBON WIFI
bc7ea9
 		# 0db0:151f MSI X570S EDGE MAX WIFI
bc7ea9
 		# 0db0:1feb MSI Edge Wifi Z690
bc7ea9
@@ -50,7 +51,7 @@ If.realtek-alc4080 {
bc7ea9
 		# 0db0:a47c MSI MEG X570S Ace Max
bc7ea9
 		# 0db0:b202 MSI MAG Z690 Tomahawk Wifi
bc7ea9
 		# 0db0:d6e7 MSI MPG X670E Carbon Wifi
bc7ea9
-		Regex "USB((0414:a00e)|(0b05:(1996|1a(16|2[07])))|(0db0:(005a|151f|1feb|419c|82c7|a073|a47c|b202|d6e7)))"
bc7ea9
+		Regex "USB((0414:a00e)|(0b05:(1996|1a(16|2[07]|52)))|(0db0:(005a|151f|1feb|419c|82c7|a073|a47c|b202|d6e7)))"
bc7ea9
 	}
bc7ea9
 	True.Define.ProfileName "Realtek/ALC4080"
bc7ea9
 }
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From b121b63f30c24e89beec506ae1d2bac9ebb3cc61 Mon Sep 17 00:00:00 2001
bc7ea9
From: Jaroslav Kysela <perex@perex.cz>
bc7ea9
Date: Tue, 15 Nov 2022 17:49:13 +0100
bc7ea9
Subject: [PATCH 06/21] USB-Audio: ALC4080 - add 0db0:6cc9 MSI MPG Z590 Gaming
bc7ea9
 Plus device
bc7ea9
bc7ea9
BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/241
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/USB-Audio/USB-Audio.conf | 3 ++-
bc7ea9
 1 file changed, 2 insertions(+), 1 deletion(-)
bc7ea9
bc7ea9
diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
index e30dc2b..89482cb 100644
bc7ea9
--- a/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
+++ b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
@@ -46,12 +46,13 @@ If.realtek-alc4080 {
bc7ea9
 		# 0db0:151f MSI X570S EDGE MAX WIFI
bc7ea9
 		# 0db0:1feb MSI Edge Wifi Z690
bc7ea9
 		# 0db0:419c MSI MPG X570S Carbon Max Wifi
bc7ea9
+		# 0db0:6cc9 MSI MPG Z590 Gaming Plus
bc7ea9
 		# 0db0:82c7 MSI MEG Z690I Unify
bc7ea9
 		# 0db0:a073 MSI MAG X570S Torpedo Max
bc7ea9
 		# 0db0:a47c MSI MEG X570S Ace Max
bc7ea9
 		# 0db0:b202 MSI MAG Z690 Tomahawk Wifi
bc7ea9
 		# 0db0:d6e7 MSI MPG X670E Carbon Wifi
bc7ea9
-		Regex "USB((0414:a00e)|(0b05:(1996|1a(16|2[07]|52)))|(0db0:(005a|151f|1feb|419c|82c7|a073|a47c|b202|d6e7)))"
bc7ea9
+		Regex "USB((0414:a00e)|(0b05:(1996|1a(16|2[07]|52)))|(0db0:(005a|151f|1feb|419c|6cc9|82c7|a073|a47c|b202|d6e7)))"
bc7ea9
 	}
bc7ea9
 	True.Define.ProfileName "Realtek/ALC4080"
bc7ea9
 }
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From c82c400fb653292bbf0570e278d60e1ba14cc341 Mon Sep 17 00:00:00 2001
bc7ea9
From: Shuming Fan <shumingf@realtek.com>
bc7ea9
Date: Wed, 16 Nov 2022 17:36:51 +0800
bc7ea9
Subject: [PATCH 07/21] ucm2: sof-soundwire: add basic settings for RT1318 SDCA
bc7ea9
 device
bc7ea9
bc7ea9
Add support for rt1318 amplifier
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/242
bc7ea9
Signed-off-by: Shuming Fan <shumingf@realtek.com>
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/sof-soundwire/rt1318-1.conf | 20 ++++++++++++++++++++
bc7ea9
 ucm2/sof-soundwire/rt1318-2.conf | 25 +++++++++++++++++++++++++
bc7ea9
 2 files changed, 45 insertions(+)
bc7ea9
 create mode 100644 ucm2/sof-soundwire/rt1318-1.conf
bc7ea9
 create mode 100644 ucm2/sof-soundwire/rt1318-2.conf
bc7ea9
bc7ea9
diff --git a/ucm2/sof-soundwire/rt1318-1.conf b/ucm2/sof-soundwire/rt1318-1.conf
bc7ea9
new file mode 100644
bc7ea9
index 0000000..13d77e1
bc7ea9
--- /dev/null
bc7ea9
+++ b/ucm2/sof-soundwire/rt1318-1.conf
bc7ea9
@@ -0,0 +1,20 @@
bc7ea9
+# Use case Configuration for sof-soundwire card
bc7ea9
+
bc7ea9
+SectionDevice."Speaker" {
bc7ea9
+	Comment	"Speaker"
bc7ea9
+
bc7ea9
+	EnableSequence [
bc7ea9
+		cset "name='rt1318-1 DAC Switch' 1"
bc7ea9
+		cset "name='Speaker Switch' on"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	DisableSequence [
bc7ea9
+		cset "name='rt1318-1 DAC Switch' 0"
bc7ea9
+		cset "name='Speaker Switch' off"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+	      PlaybackPriority 100
bc7ea9
+	      PlaybackPCM "hw:${CardId},2"
bc7ea9
+	}
bc7ea9
+}
bc7ea9
diff --git a/ucm2/sof-soundwire/rt1318-2.conf b/ucm2/sof-soundwire/rt1318-2.conf
bc7ea9
new file mode 100644
bc7ea9
index 0000000..5602470
bc7ea9
--- /dev/null
bc7ea9
+++ b/ucm2/sof-soundwire/rt1318-2.conf
bc7ea9
@@ -0,0 +1,25 @@
bc7ea9
+# Use case Configuration for sof-soundwire card
bc7ea9
+
bc7ea9
+SectionDevice."Speaker" {
bc7ea9
+	Comment	"Speaker"
bc7ea9
+
bc7ea9
+	EnableSequence [
bc7ea9
+		cset "name='rt1318-1 RX Channel Select' L,L"
bc7ea9
+		cset "name='rt1318-2 RX Channel Select' R,R"
bc7ea9
+
bc7ea9
+		cset "name='rt1318-1 DAC Switch' 1"
bc7ea9
+		cset "name='rt1318-2 DAC Switch' 1"
bc7ea9
+		cset "name='Speaker Switch' on"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	DisableSequence [
bc7ea9
+		cset "name='rt1318-1 DAC Switch' 0"
bc7ea9
+		cset "name='rt1318-2 DAC Switch' 0"
bc7ea9
+		cset "name='Speaker Switch' off"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+	      PlaybackPriority 100
bc7ea9
+	      PlaybackPCM "hw:${CardId},2"
bc7ea9
+	}
bc7ea9
+}
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From 998849d9510754960d808e20dad4c440adaf87ef Mon Sep 17 00:00:00 2001
bc7ea9
From: Clayton Craft <clayton@craftyguy.net>
bc7ea9
Date: Wed, 29 Jun 2022 15:23:23 -0700
bc7ea9
Subject: [PATCH 08/21] ucm2: add profile for the Librem 5
bc7ea9
MIME-Version: 1.0
bc7ea9
Content-Type: text/plain; charset=UTF-8
bc7ea9
Content-Transfer-Encoding: 8bit
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/181
bc7ea9
Tested-by: Guido GĂ¼nther <agx@sigxcpu.org>
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/NXP/iMX8/Librem_5/HiFi.conf      | 151 ++++++++++++++++++++++++++
bc7ea9
 ucm2/NXP/iMX8/Librem_5/Librem 5.conf  |  25 +++++
bc7ea9
 ucm2/conf.d/simple-card/Librem 5.conf |   1 +
bc7ea9
 3 files changed, 177 insertions(+)
bc7ea9
 create mode 100644 ucm2/NXP/iMX8/Librem_5/HiFi.conf
bc7ea9
 create mode 100644 ucm2/NXP/iMX8/Librem_5/Librem 5.conf
bc7ea9
 create mode 120000 ucm2/conf.d/simple-card/Librem 5.conf
bc7ea9
bc7ea9
diff --git a/ucm2/NXP/iMX8/Librem_5/HiFi.conf b/ucm2/NXP/iMX8/Librem_5/HiFi.conf
bc7ea9
new file mode 100644
bc7ea9
index 0000000..55eabe3
bc7ea9
--- /dev/null
bc7ea9
+++ b/ucm2/NXP/iMX8/Librem_5/HiFi.conf
bc7ea9
@@ -0,0 +1,151 @@
bc7ea9
+SectionVerb {
bc7ea9
+	EnableSequence [
bc7ea9
+		disdevall ""
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	Value.TQ "HiFi"
bc7ea9
+}
bc7ea9
+
bc7ea9
+SectionDevice."Handset" {
bc7ea9
+	Comment "Handset"
bc7ea9
+
bc7ea9
+	ConflictingDevice [
bc7ea9
+		"Headphones"
bc7ea9
+		"Speaker"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	EnableSequence [
bc7ea9
+		cset "name='Speaker Switch' off,on"
bc7ea9
+		cset "name='DAC L/R Swap Switch' on"
bc7ea9
+		cset "name='DAC Monomix Switch' on"
bc7ea9
+		cset "name='SPKOUTR PGA' DAC"
bc7ea9
+		cset "name='Speaker Boost Volume' 2"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	DisableSequence [
bc7ea9
+		cset "name='Speaker Switch' off,off"
bc7ea9
+		cset "name='DAC L/R Swap Switch' off"
bc7ea9
+		cset "name='DAC Monomix Switch' off"
bc7ea9
+		cset "name='SPKOUTR PGA' Mixer"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		PlaybackPriority "100"
bc7ea9
+		PlaybackVolume "name='Speaker Volume'"
bc7ea9
+		PlaybackSwitch "name='Speaker Switch'"
bc7ea9
+		PlaybackMixerElem "Speaker"
bc7ea9
+		PlaybackPCM "hw:${CardId}"
bc7ea9
+	}
bc7ea9
+}
bc7ea9
+
bc7ea9
+SectionDevice."Speaker" {
bc7ea9
+	Comment "Speaker"
bc7ea9
+
bc7ea9
+	ConflictingDevice [
bc7ea9
+		"Handset"
bc7ea9
+		"Headphones"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	EnableSequence [
bc7ea9
+		cset "name='Speaker Switch' on,off"
bc7ea9
+		cset "name='DAC Monomix Switch' on"
bc7ea9
+		cset "name='SPKOUTL PGA' DAC"
bc7ea9
+		cset "name='Speaker Boost Volume' 6"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	DisableSequence [
bc7ea9
+		cset "name='Speaker Switch' off,off"
bc7ea9
+		cset "name='DAC Monomix Switch' off"
bc7ea9
+		cset "name='SPKOUTL PGA' Mixer"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		PlaybackPriority "500"
bc7ea9
+		PlaybackVolume "name='Speaker Volume'"
bc7ea9
+		PlaybackSwitch "name='Speaker Switch'"
bc7ea9
+		PlaybackMixerElem "Speaker"
bc7ea9
+		PlaybackPCM "hw:${CardId}"
bc7ea9
+	}
bc7ea9
+}
bc7ea9
+
bc7ea9
+SectionDevice."Headphones" {
bc7ea9
+	Comment "Headphones"
bc7ea9
+
bc7ea9
+	ConflictingDevice [
bc7ea9
+		"Handset"
bc7ea9
+		"Speaker"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	EnableSequence [
bc7ea9
+		cset "name='Headphone Switch' on,on"
bc7ea9
+		cset "name='HPOUTL PGA' 0 unmute"
bc7ea9
+		cset "name='HPOUTR PGA' 0 unmute"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	DisableSequence [
bc7ea9
+		cset "name='Headphone Switch' off off"
bc7ea9
+		cset "name='HPOUTL PGA' 0 mute"
bc7ea9
+		cset "name='HPOUTR PGA' 0 mute"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		PlaybackPriority "1000"
bc7ea9
+		PlaybackVolume "name='Headphone Volume'"
bc7ea9
+		PlaybackSwitch "name='Headphone Switch'"
bc7ea9
+		PlaybackMixerElem "Headphone"
bc7ea9
+		PlaybackPCM "hw:${CardId}"
bc7ea9
+		JackControl "Headphones Jack"
bc7ea9
+	}
bc7ea9
+}
bc7ea9
+
bc7ea9
+SectionDevice."Mic" {
bc7ea9
+	Comment "Internal Microphone"
bc7ea9
+
bc7ea9
+	ConflictingDevice [
bc7ea9
+		"Headset"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	EnableSequence [
bc7ea9
+		cset "name='ADC L/R Swap Switch' on"
bc7ea9
+		cset "name='Input Mode' Digital"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	DisableSequence [
bc7ea9
+		cset "name='ADC L/R Swap Switch' off"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		CapturePriority "500"
bc7ea9
+		CaptureVolume "name='Digital Capture Volume'"
bc7ea9
+		CaptureMixerElem "Digital"
bc7ea9
+		CapturePCM "hw:${CardId}"
bc7ea9
+	}
bc7ea9
+}
bc7ea9
+
bc7ea9
+SectionDevice."Headset" {
bc7ea9
+	Comment "Headset Microphone"
bc7ea9
+
bc7ea9
+	ConflictingDevice [
bc7ea9
+		"Mic"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	EnableSequence [
bc7ea9
+		cset "name='Input Mode' Analog"
bc7ea9
+		cset "name='MIXINR PGA Switch' on,on"
bc7ea9
+		cset "name='Capture Switch' on,on"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	DisableSequence [
bc7ea9
+		cset "name='Capture Switch' off,off"
bc7ea9
+		cset "name='MIXINR PGA Switch' off,off"
bc7ea9
+		cset "name='Input Mode' Digital"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	Value {
bc7ea9
+		CapturePriority "100"
bc7ea9
+		CaptureVolume "name='Capture Volume'"
bc7ea9
+		CaptureMixerElem "Capture"
bc7ea9
+		CapturePCM "hw:${CardId}"
bc7ea9
+		JackControl "Headphones Jack"
bc7ea9
+	}
bc7ea9
+}
bc7ea9
diff --git a/ucm2/NXP/iMX8/Librem_5/Librem 5.conf b/ucm2/NXP/iMX8/Librem_5/Librem 5.conf
bc7ea9
new file mode 100644
bc7ea9
index 0000000..4d7dbd6
bc7ea9
--- /dev/null
bc7ea9
+++ b/ucm2/NXP/iMX8/Librem_5/Librem 5.conf	
bc7ea9
@@ -0,0 +1,25 @@
bc7ea9
+Syntax 2
bc7ea9
+
bc7ea9
+SectionUseCase."HiFi" {
bc7ea9
+	File "HiFi.conf"
bc7ea9
+	Comment "Default"
bc7ea9
+}
bc7ea9
+
bc7ea9
+BootSequence [
bc7ea9
+	cset "name='Digital Playback Volume' 100,100"
bc7ea9
+	cset "name='MIXINL IN2L Switch' off"
bc7ea9
+	cset "name='MIXINL IN3L Switch' off"
bc7ea9
+	cset "name='MIXINR IN2R Switch' off"
bc7ea9
+	cset "name='MIXINR IN3R Switch' off"
bc7ea9
+	cset "name='INPGAR IN1R Switch' off"
bc7ea9
+	cset "name='INPGAR IN2R Switch' off"
bc7ea9
+	cset "name='INPGAR IN3R Switch' on"
bc7ea9
+	cset "name='INPGAR IN4R Switch' off"
bc7ea9
+	cset "name='INPGAL IN1L Switch' off"
bc7ea9
+	cset "name='INPGAL IN2L Switch' off"
bc7ea9
+	cset "name='INPGAL IN3L Switch' off"
bc7ea9
+	cset "name='INPGAL IN4L Switch' off"
bc7ea9
+	cset "name='Input Mixer Switch' off,on"
bc7ea9
+	cset "name='SPKOUTL PGA' Mixer"
bc7ea9
+	cset "name='SPKOUTR PGA' Mixer"
bc7ea9
+]
bc7ea9
diff --git a/ucm2/conf.d/simple-card/Librem 5.conf b/ucm2/conf.d/simple-card/Librem 5.conf
bc7ea9
new file mode 120000
bc7ea9
index 0000000..c687942
bc7ea9
--- /dev/null
bc7ea9
+++ b/ucm2/conf.d/simple-card/Librem 5.conf	
bc7ea9
@@ -0,0 +1 @@
bc7ea9
+../../NXP/iMX8/Librem_5/Librem 5.conf
bc7ea9
\ No newline at end of file
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From 71ff24cdd2e0fecb71c2fcf8a45a1ae50233c34b Mon Sep 17 00:00:00 2001
bc7ea9
From: Jaroslav Kysela <perex@perex.cz>
bc7ea9
Date: Mon, 21 Nov 2022 09:51:54 +0100
bc7ea9
Subject: [PATCH 09/21] USB-Audio: allow to configure period size for PCM split
bc7ea9
MIME-Version: 1.0
bc7ea9
Content-Type: text/plain; charset=UTF-8
bc7ea9
Content-Transfer-Encoding: 8bit
bc7ea9
bc7ea9
The environment variable UCM_USB_PERIOD_TIME (microseconds / μs)
bc7ea9
can define the period size for the PCM channel split over
bc7ea9
the default value 10000μs.
bc7ea9
bc7ea9
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/240
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/238
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/USB-Audio/USB-Audio.conf | 8 ++++++++
bc7ea9
 1 file changed, 8 insertions(+)
bc7ea9
bc7ea9
diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
index 89482cb..fdc29ec 100644
bc7ea9
--- a/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
+++ b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
@@ -4,6 +4,14 @@ Define.ProfileName ""
bc7ea9
 Define.MixerRemap ""
bc7ea9
 Define.SplitPCMPeriodTime 10000		# 10ms
bc7ea9
 
bc7ea9
+If.env1 {
bc7ea9
+	Condition {
bc7ea9
+		Type String
bc7ea9
+		Empty "${env:UCM_USB_PERIOD_TIME}"
bc7ea9
+	}
bc7ea9
+	False.Define.SplitPCMPeriodTime "${env:UCM_USB_PERIOD_TIME}"
bc7ea9
+}
bc7ea9
+
bc7ea9
 If.linked {
bc7ea9
 	Condition {
bc7ea9
 		Type RegexMatch
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From 445c079665979802d50b237fe5a55be82ffd0bd9 Mon Sep 17 00:00:00 2001
bc7ea9
From: Fadwa Chiby <fchiby@baylibre.com>
bc7ea9
Date: Fri, 22 Jul 2022 09:45:07 +0000
bc7ea9
Subject: [PATCH 10/21] mt8195-demo: fix soundcard initialization
bc7ea9
bc7ea9
The previous initialization in Bootsequence set all Switch
bc7ea9
to off after boot.
bc7ea9
bc7ea9
So remove the setting off of the Switch in the BootSequence
bc7ea9
and define Enable/DisableSequence in verb section for
bc7ea9
a proper setting.
bc7ea9
bc7ea9
Note that the controls enable access to the PCM devices
bc7ea9
(controls routes between Front End and Back End in ASoC).
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/211
bc7ea9
Signed-off-by: Fadwa Chiby <fchiby@baylibre.com>
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/MediaTek/mt8195_demo/HiFi.conf        | 57 ++++++++++++++++++++++
bc7ea9
 ucm2/MediaTek/mt8195_demo/mt8195_demo.conf | 36 ++++----------
bc7ea9
 2 files changed, 66 insertions(+), 27 deletions(-)
bc7ea9
bc7ea9
diff --git a/ucm2/MediaTek/mt8195_demo/HiFi.conf b/ucm2/MediaTek/mt8195_demo/HiFi.conf
bc7ea9
index 95f2b51..660b4ad 100644
bc7ea9
--- a/ucm2/MediaTek/mt8195_demo/HiFi.conf
bc7ea9
+++ b/ucm2/MediaTek/mt8195_demo/HiFi.conf
bc7ea9
@@ -1,3 +1,60 @@
bc7ea9
+SectionVerb {
bc7ea9
+
bc7ea9
+	EnableSequence [
bc7ea9
+		cset "name='HDMI_OUT_MUX' Connect"
bc7ea9
+		cset "name='DPTX_OUT_MUX' Connect"
bc7ea9
+		cset "name='O176 I070 Switch' on"
bc7ea9
+		cset "name='O177 I071 Switch' on"
bc7ea9
+		cset "name='O034 I168 Switch' on"
bc7ea9
+		cset "name='O035 I169 Switch' on"
bc7ea9
+		cset "name='O036 I012 Switch' on"
bc7ea9
+		cset "name='O037 I013 Switch' on"
bc7ea9
+		cset "name='O072 I022 Switch' on"
bc7ea9
+		cset "name='O073 I023 Switch' on"
bc7ea9
+		cset "name='O074 I024 Switch' on"
bc7ea9
+		cset "name='O075 I025 Switch' on"
bc7ea9
+		cset "name='O076 I026 Switch' on"
bc7ea9
+		cset "name='O077 I027 Switch' on"
bc7ea9
+		cset "name='O078 I028 Switch' on"
bc7ea9
+		cset "name='O079 I029 Switch' on"
bc7ea9
+		cset "name='O002 I004 Switch' on"
bc7ea9
+		cset "name='O003 I005 Switch' on"
bc7ea9
+		cset "name='O004 I006 Switch' on"
bc7ea9
+		cset "name='O005 I007 Switch' on"
bc7ea9
+		cset "name='O006 I008 Switch' on"
bc7ea9
+		cset "name='O007 I009 Switch' on"
bc7ea9
+		cset "name='O008 I010 Switch' on"
bc7ea9
+		cset "name='O009 I011 Switch' on"
bc7ea9
+	]
bc7ea9
+
bc7ea9
+	DisableSequence [
bc7ea9
+		cset "name='HDMI_OUT_MUX' Disconnect"
bc7ea9
+		cset "name='DPTX_OUT_MUX' Disconnect"
bc7ea9
+		cset "name='O176 I070 Switch' off"
bc7ea9
+		cset "name='O177 I071 Switch' off"
bc7ea9
+		cset "name='O034 I168 Switch' off"
bc7ea9
+		cset "name='O035 I169 Switch' off"
bc7ea9
+		cset "name='O036 I012 Switch' off"
bc7ea9
+		cset "name='O037 I013 Switch' off"
bc7ea9
+		cset "name='O072 I022 Switch' off"
bc7ea9
+		cset "name='O073 I023 Switch' off"
bc7ea9
+		cset "name='O074 I024 Switch' off"
bc7ea9
+		cset "name='O075 I025 Switch' off"
bc7ea9
+		cset "name='O076 I026 Switch' off"
bc7ea9
+		cset "name='O077 I027 Switch' off"
bc7ea9
+		cset "name='O078 I028 Switch' off"
bc7ea9
+		cset "name='O079 I029 Switch' off"
bc7ea9
+		cset "name='O002 I004 Switch' off"
bc7ea9
+		cset "name='O003 I005 Switch' off"
bc7ea9
+		cset "name='O004 I006 Switch' off"
bc7ea9
+		cset "name='O005 I007 Switch' off"
bc7ea9
+		cset "name='O006 I008 Switch' off"
bc7ea9
+		cset "name='O007 I009 Switch' off"
bc7ea9
+		cset "name='O008 I010 Switch' off"
bc7ea9
+		cset "name='O009 I011 Switch' off"
bc7ea9
+	]
bc7ea9
+}
bc7ea9
+
bc7ea9
 SectionDevice."HDMI" {
bc7ea9
 	Comment "Hdmi/DP output"
bc7ea9
 
bc7ea9
diff --git a/ucm2/MediaTek/mt8195_demo/mt8195_demo.conf b/ucm2/MediaTek/mt8195_demo/mt8195_demo.conf
bc7ea9
index c23dc37..896b6dc 100644
bc7ea9
--- a/ucm2/MediaTek/mt8195_demo/mt8195_demo.conf
bc7ea9
+++ b/ucm2/MediaTek/mt8195_demo/mt8195_demo.conf
bc7ea9
@@ -1,4 +1,4 @@
bc7ea9
-Syntax 3
bc7ea9
+Syntax 2
bc7ea9
 
bc7ea9
 SectionUseCase."HiFi" {
bc7ea9
 	File "/MediaTek/mt8195_demo/HiFi.conf"
bc7ea9
@@ -16,12 +16,12 @@ BootSequence [
bc7ea9
 	cset "name='PGA_L_Mux' AIN1"
bc7ea9
 	cset "name='HDMI_OUT_MUX' Connect"
bc7ea9
 	cset "name='DPTX_OUT_MUX' Connect"
bc7ea9
+	# we need to enable all devices before starting PA.
bc7ea9
+	# In our driver we use PCM, which means that we have
bc7ea9
+	# to route Front End to a BackEnd and then only we can
bc7ea9
+	# open a device. Without linking to BE it will fail.
bc7ea9
 	cset "name='O176 I070 Switch' on"
bc7ea9
 	cset "name='O177 I071 Switch' on"
bc7ea9
-	cset "name='O034 I168 Switch' on"
bc7ea9
-	cset "name='O035 I169 Switch' on"
bc7ea9
-	cset "name='O036 I012 Switch' on"
bc7ea9
-	cset "name='O037 I013 Switch' on"
bc7ea9
 	cset "name='O072 I022 Switch' on"
bc7ea9
 	cset "name='O073 I023 Switch' on"
bc7ea9
 	cset "name='O074 I024 Switch' on"
bc7ea9
@@ -30,6 +30,10 @@ BootSequence [
bc7ea9
 	cset "name='O077 I027 Switch' on"
bc7ea9
 	cset "name='O078 I028 Switch' on"
bc7ea9
 	cset "name='O079 I029 Switch' on"
bc7ea9
+	cset "name='O034 I168 Switch' on"
bc7ea9
+	cset "name='O035 I169 Switch' on"
bc7ea9
+	cset "name='O036 I012 Switch' on"
bc7ea9
+	cset "name='O037 I013 Switch' on"
bc7ea9
 	cset "name='O002 I004 Switch' on"
bc7ea9
 	cset "name='O003 I005 Switch' on"
bc7ea9
 	cset "name='O004 I006 Switch' on"
bc7ea9
@@ -38,26 +42,4 @@ BootSequence [
bc7ea9
 	cset "name='O007 I009 Switch' on"
bc7ea9
 	cset "name='O008 I010 Switch' on"
bc7ea9
 	cset "name='O009 I011 Switch' on"
bc7ea9
-	cset "name='O176 I070 Switch' off"
bc7ea9
-	cset "name='O177 I071 Switch' off"
bc7ea9
-	cset "name='O034 I168 Switch' off"
bc7ea9
-	cset "name='O035 I169 Switch' off"
bc7ea9
-	cset "name='O036 I012 Switch' off"
bc7ea9
-	cset "name='O037 I013 Switch' off"
bc7ea9
-	cset "name='O072 I022 Switch' off"
bc7ea9
-	cset "name='O073 I023 Switch' off"
bc7ea9
-	cset "name='O074 I024 Switch' off"
bc7ea9
-	cset "name='O075 I025 Switch' off"
bc7ea9
-	cset "name='O076 I026 Switch' off"
bc7ea9
-	cset "name='O077 I027 Switch' off"
bc7ea9
-	cset "name='O078 I028 Switch' off"
bc7ea9
-	cset "name='O079 I029 Switch' off"
bc7ea9
-	cset "name='O002 I004 Switch' off"
bc7ea9
-	cset "name='O003 I005 Switch' off"
bc7ea9
-	cset "name='O004 I006 Switch' off"
bc7ea9
-	cset "name='O005 I007 Switch' off"
bc7ea9
-	cset "name='O006 I008 Switch' off"
bc7ea9
-	cset "name='O007 I009 Switch' off"
bc7ea9
-	cset "name='O008 I010 Switch' off"
bc7ea9
-	cset "name='O009 I011 Switch' off"
bc7ea9
 ]
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From 5c865236e8de9fd75c741892fd3bd2cff62d4f3f Mon Sep 17 00:00:00 2001
bc7ea9
From: Jaroslav Kysela <perex@perex.cz>
bc7ea9
Date: Tue, 22 Nov 2022 09:54:22 +0100
bc7ea9
Subject: [PATCH 11/21] USB-Audio: the environment variable UCM_USB_PERIOD_TIME
bc7ea9
 may be undefined
bc7ea9
bc7ea9
Fixes: 71ff24c ("USB-Audio: allow to configure period size for PCM split")
bc7ea9
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/240
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/USB-Audio/USB-Audio.conf | 2 +-
bc7ea9
 1 file changed, 1 insertion(+), 1 deletion(-)
bc7ea9
bc7ea9
diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
index fdc29ec..1c11da9 100644
bc7ea9
--- a/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
+++ b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
@@ -7,7 +7,7 @@ Define.SplitPCMPeriodTime 10000		# 10ms
bc7ea9
 If.env1 {
bc7ea9
 	Condition {
bc7ea9
 		Type String
bc7ea9
-		Empty "${env:UCM_USB_PERIOD_TIME}"
bc7ea9
+		Empty "$${env:UCM_USB_PERIOD_TIME}"
bc7ea9
 	}
bc7ea9
 	False.Define.SplitPCMPeriodTime "${env:UCM_USB_PERIOD_TIME}"
bc7ea9
 }
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From 01e37f4fb7aab57e3f0051d81f5f6e5b2f15c831 Mon Sep 17 00:00:00 2001
bc7ea9
From: Jaroslav Kysela <perex@perex.cz>
bc7ea9
Date: Mon, 21 Nov 2022 10:16:57 +0100
bc7ea9
Subject: [PATCH 12/21] HDA: DualCodecs - handle S/PDIF without analog
bc7ea9
 connections
bc7ea9
bc7ea9
When no analog wires are connected, the S/PDIF output cannot be
bc7ea9
selected in pipewire. Handle this for motherboards without Speaker
bc7ea9
UCM device.
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/239
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/HDA/DualCodecs/HiFi.conf | 15 +++++++++++----
bc7ea9
 1 file changed, 11 insertions(+), 4 deletions(-)
bc7ea9
bc7ea9
diff --git a/ucm2/HDA/DualCodecs/HiFi.conf b/ucm2/HDA/DualCodecs/HiFi.conf
bc7ea9
index 10c9162..8c0f403 100644
bc7ea9
--- a/ucm2/HDA/DualCodecs/HiFi.conf
bc7ea9
+++ b/ucm2/HDA/DualCodecs/HiFi.conf
bc7ea9
@@ -66,13 +66,20 @@ SectionDevice."Line1" {
bc7ea9
 		}
bc7ea9
 		True.Value.PlaybackMixerElem "Front"
bc7ea9
 	}
bc7ea9
-	If.1 {
bc7ea9
+	# make S/PDIF output working when no analog jacks are connected
bc7ea9
+	If.speaker {
bc7ea9
 		Condition {
bc7ea9
 			Type ControlExists
bc7ea9
-			Control "iface=CARD,name='Line Out Front Jack'"
bc7ea9
+			Control "name='Speaker Playback Switch'"
bc7ea9
+		}
bc7ea9
+		True.If.1 {
bc7ea9
+			Condition {
bc7ea9
+				Type ControlExists
bc7ea9
+				Control "iface=CARD,name='Line Out Front Jack'"
bc7ea9
+			}
bc7ea9
+			True.Value.JackControl "Line Out Front Jack"
bc7ea9
+			False.Value.JackControl "Line Out Jack"
bc7ea9
 		}
bc7ea9
-		True.Value.JackControl "Line Out Front Jack"
bc7ea9
-		False.Value.JackControl "Line Out Jack"
bc7ea9
 	}
bc7ea9
 }
bc7ea9
 
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From 79a8ec44d3dcf097f4a4492c506cbcf338324175 Mon Sep 17 00:00:00 2001
bc7ea9
From: Jaroslav Kysela <perex@perex.cz>
bc7ea9
Date: Wed, 7 Dec 2022 10:18:04 +0100
bc7ea9
Subject: [PATCH 13/21] ucm2: sof-hda-dsp: Update Mic LED settings
bc7ea9
bc7ea9
Users expect to turn the LED on when only internal mic is off, but
bc7ea9
it makes sense to turn this LED when all internal inputs are off.
bc7ea9
bc7ea9
This configuration may be changed when the affected applications
bc7ea9
are updated.
bc7ea9
bc7ea9
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=2134824
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf | 12 +++++++++++-
bc7ea9
 1 file changed, 11 insertions(+), 1 deletion(-)
bc7ea9
bc7ea9
diff --git a/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf b/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf
bc7ea9
index e6a8a15..9e85914 100644
bc7ea9
--- a/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf
bc7ea9
+++ b/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf
bc7ea9
@@ -9,7 +9,17 @@ If.devdmic {
bc7ea9
 		Haystack "${CardComponents}"
bc7ea9
 		Needle "cfg-dmics:"
bc7ea9
 	}
bc7ea9
-	True.Define.DeviceDmic "Mic1"
bc7ea9
+	True {
bc7ea9
+		Define.DeviceDmic "Mic1"
bc7ea9
+		FixedBootSequence [
bc7ea9
+			#
bc7ea9
+			# users expect to turn the LED on when only internal
bc7ea9
+			# mic is off, but it makes sense to turn this LED
bc7ea9
+			# when all internal inputs are off
bc7ea9
+			#
bc7ea9
+			sysw "-/class/sound/ctl-led/mic/card${CardNumber}/detach:Capture Switch"
bc7ea9
+		]
bc7ea9
+	}
bc7ea9
 	True.Define.DeviceMic "Mic2"
bc7ea9
 }
bc7ea9
 
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From 9ce9ddb4a84fb467602b716575ea1d8f2bab0c39 Mon Sep 17 00:00:00 2001
bc7ea9
From: Jaroslav Kysela <perex@perex.cz>
bc7ea9
Date: Wed, 7 Dec 2022 15:00:35 +0100
bc7ea9
Subject: [PATCH 14/21] ucm2: HDA: Update Mic LED settings for ACP DMIC
bc7ea9
bc7ea9
Users expect to turn the LED on when only internal mic is off, but
bc7ea9
it makes sense to turn this LED when all internal inputs are off.
bc7ea9
bc7ea9
This configuration may be changed when the affected applications
bc7ea9
are updated.
bc7ea9
bc7ea9
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=2134824
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/HDA/HDA.conf | 1 +
bc7ea9
 1 file changed, 1 insertion(+)
bc7ea9
bc7ea9
diff --git a/ucm2/HDA/HDA.conf b/ucm2/HDA/HDA.conf
bc7ea9
index 64ffe83..47dfc05 100644
bc7ea9
--- a/ucm2/HDA/HDA.conf
bc7ea9
+++ b/ucm2/HDA/HDA.conf
bc7ea9
@@ -55,6 +55,7 @@ If.use {
bc7ea9
 					cset-new "name='Mic ACP LED Capture Switch' type=bool,count=1 off"
bc7ea9
 					exec "-/sbin/modprobe snd_ctl_led"
bc7ea9
 					sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:Mic ACP LED Capture Switch"
bc7ea9
+					sysw "-/class/sound/ctl-led/mic/card${CardNumber}/detach:Capture Switch"
bc7ea9
 				]
bc7ea9
 			}
bc7ea9
 		}
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From 3984514b25a5b2a2a09d29ad8ddbc1ad78c6a1e4 Mon Sep 17 00:00:00 2001
bc7ea9
From: Jaroslav Kysela <perex@perex.cz>
bc7ea9
Date: Wed, 7 Dec 2022 15:48:05 +0100
bc7ea9
Subject: [PATCH 15/21] ucm2: sof-hda-dsp - If.devdmic cleanup
bc7ea9
bc7ea9
Simplify the If.devdmic block.
bc7ea9
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf | 2 +-
bc7ea9
 1 file changed, 1 insertion(+), 1 deletion(-)
bc7ea9
bc7ea9
diff --git a/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf b/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf
bc7ea9
index 9e85914..7ef4f24 100644
bc7ea9
--- a/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf
bc7ea9
+++ b/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf
bc7ea9
@@ -11,6 +11,7 @@ If.devdmic {
bc7ea9
 	}
bc7ea9
 	True {
bc7ea9
 		Define.DeviceDmic "Mic1"
bc7ea9
+		Define.DeviceMic "Mic2"
bc7ea9
 		FixedBootSequence [
bc7ea9
 			#
bc7ea9
 			# users expect to turn the LED on when only internal
bc7ea9
@@ -20,7 +21,6 @@ If.devdmic {
bc7ea9
 			sysw "-/class/sound/ctl-led/mic/card${CardNumber}/detach:Capture Switch"
bc7ea9
 		]
bc7ea9
 	}
bc7ea9
-	True.Define.DeviceMic "Mic2"
bc7ea9
 }
bc7ea9
 
bc7ea9
 SectionUseCase."HiFi" {
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From e395d7b743584cba60876b6356fb3bc7834992aa Mon Sep 17 00:00:00 2001
bc7ea9
From: Jaroslav Kysela <perex@perex.cz>
bc7ea9
Date: Mon, 26 Dec 2022 09:20:51 +0100
bc7ea9
Subject: [PATCH 16/21] sof-soundwire: set PGA capture switch for rt715 mic in
bc7ea9
 BootSequence
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/255
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/sof-soundwire/sof-soundwire.conf | 11 +++++++++++
bc7ea9
 1 file changed, 11 insertions(+)
bc7ea9
bc7ea9
diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf
bc7ea9
index 03df16c..bdc48ff 100644
bc7ea9
--- a/ucm2/sof-soundwire/sof-soundwire.conf
bc7ea9
+++ b/ucm2/sof-soundwire/sof-soundwire.conf
bc7ea9
@@ -61,3 +61,14 @@ If.mic_init {
bc7ea9
 	}
bc7ea9
 	True.Include.mic_init.File "/codecs/${var:MicCodec1}/init.conf"
bc7ea9
 }
bc7ea9
+
bc7ea9
+If.mic_init_rt715 {
bc7ea9
+	Condition {
bc7ea9
+		Type String
bc7ea9
+		Needle "rt715"
bc7ea9
+		Haystack "${var:MicCodec1}"
bc7ea9
+	}
bc7ea9
+	True.BootSequence [
bc7ea9
+		cset "name='PGA5.0 5 Master Capture Switch' 1"
bc7ea9
+	]
bc7ea9
+}
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From c0b9d6fb207d533d348942e02ecdc57984eb5fc3 Mon Sep 17 00:00:00 2001
bc7ea9
From: Kai-Chuan Hsieh <kaichuan.hsieh@canonical.com>
bc7ea9
Date: Mon, 26 Dec 2022 10:24:20 +0800
bc7ea9
Subject: [PATCH 17/21] sof-hda-dsp: Set Dmic0 Capture Switch on
bc7ea9
bc7ea9
Internal micrphone default is off after fresh installation.
bc7ea9
Add operation to set the control on to align with other architecture.
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/259
bc7ea9
Signed-off-by: Kai-Chuan Hsieh <kaichuan.hsieh@canonical.com>
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf | 1 +
bc7ea9
 1 file changed, 1 insertion(+)
bc7ea9
bc7ea9
diff --git a/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf b/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf
bc7ea9
index 7ef4f24..6887938 100644
bc7ea9
--- a/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf
bc7ea9
+++ b/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf
bc7ea9
@@ -83,6 +83,7 @@ If.dmic {
bc7ea9
 		}
bc7ea9
 		True.BootSequence [
bc7ea9
 			cset "name='Dmic0 Capture Volume' 70%"
bc7ea9
+			cset "name='Dmic0 Capture Switch' on"
bc7ea9
 		]
bc7ea9
 	}
bc7ea9
 }
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From 1923bd19c0bef947c085e2941dd8ed2d1310731e Mon Sep 17 00:00:00 2001
bc7ea9
From: 13r0ck <brock@szu.email>
bc7ea9
Date: Mon, 19 Dec 2022 18:08:38 -0700
bc7ea9
Subject: [PATCH 18/21] USB-Audio: alc4080 - add MSI MAG B650I Edge WiFi (ID
bc7ea9
 0db0:36e7)
bc7ea9
bc7ea9
This motherboard is recognized as the thelio-r3 by System76
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/254
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/USB-Audio/USB-Audio.conf | 3 ++-
bc7ea9
 1 file changed, 2 insertions(+), 1 deletion(-)
bc7ea9
bc7ea9
diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
index 1c11da9..6e48f98 100644
bc7ea9
--- a/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
+++ b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
@@ -53,6 +53,7 @@ If.realtek-alc4080 {
bc7ea9
 		# 0db0:005a MSI MPG Z690 CARBON WIFI
bc7ea9
 		# 0db0:151f MSI X570S EDGE MAX WIFI
bc7ea9
 		# 0db0:1feb MSI Edge Wifi Z690
bc7ea9
+		# 0db0:36e7 MSI MAG B650I Edge WiFi
bc7ea9
 		# 0db0:419c MSI MPG X570S Carbon Max Wifi
bc7ea9
 		# 0db0:6cc9 MSI MPG Z590 Gaming Plus
bc7ea9
 		# 0db0:82c7 MSI MEG Z690I Unify
bc7ea9
@@ -60,7 +61,7 @@ If.realtek-alc4080 {
bc7ea9
 		# 0db0:a47c MSI MEG X570S Ace Max
bc7ea9
 		# 0db0:b202 MSI MAG Z690 Tomahawk Wifi
bc7ea9
 		# 0db0:d6e7 MSI MPG X670E Carbon Wifi
bc7ea9
-		Regex "USB((0414:a00e)|(0b05:(1996|1a(16|2[07]|52)))|(0db0:(005a|151f|1feb|419c|6cc9|82c7|a073|a47c|b202|d6e7)))"
bc7ea9
+		Regex "USB((0414:a00e)|(0b05:(1996|1a(16|2[07]|52)))|(0db0:(005a|151f|1feb|36e7|419c|6cc9|82c7|a073|a47c|b202|d6e7)))"
bc7ea9
 	}
bc7ea9
 	True.Define.ProfileName "Realtek/ALC4080"
bc7ea9
 }
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From fea43c9342dd32ab93fa71b419abb97778def5c9 Mon Sep 17 00:00:00 2001
bc7ea9
From: Samuel Williams <samuel.williams@oriontransfer.co.nz>
bc7ea9
Date: Sun, 11 Dec 2022 18:30:40 +1300
bc7ea9
Subject: [PATCH 19/21] USB-Audio: ALC4080 - Add support for ASUS ROG Crosshair
bc7ea9
 X670 Extreme (ID 0b05:1a53)
bc7ea9
bc7ea9
- Confirmed working.
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/249
bc7ea9
Signed-off-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/USB-Audio/USB-Audio.conf | 3 ++-
bc7ea9
 1 file changed, 2 insertions(+), 1 deletion(-)
bc7ea9
bc7ea9
diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
index 6e48f98..041db9d 100644
bc7ea9
--- a/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
+++ b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
@@ -50,6 +50,7 @@ If.realtek-alc4080 {
bc7ea9
 		# 0b05:1a20 ASUS ROG STRIX Z690-I Gaming Wifi
bc7ea9
 		# 0b05:1a27 ALC4082 on ASUS ROG Maximus Z690 Hero
bc7ea9
 		# 0b05:1a52 ASUS ROG Strix Z790-E Gaming Wifi
bc7ea9
+		# 0b05:1a53 ALC4082 on ASUS ROG Crosshair X670E Extreme
bc7ea9
 		# 0db0:005a MSI MPG Z690 CARBON WIFI
bc7ea9
 		# 0db0:151f MSI X570S EDGE MAX WIFI
bc7ea9
 		# 0db0:1feb MSI Edge Wifi Z690
bc7ea9
@@ -61,7 +62,7 @@ If.realtek-alc4080 {
bc7ea9
 		# 0db0:a47c MSI MEG X570S Ace Max
bc7ea9
 		# 0db0:b202 MSI MAG Z690 Tomahawk Wifi
bc7ea9
 		# 0db0:d6e7 MSI MPG X670E Carbon Wifi
bc7ea9
-		Regex "USB((0414:a00e)|(0b05:(1996|1a(16|2[07]|52)))|(0db0:(005a|151f|1feb|36e7|419c|6cc9|82c7|a073|a47c|b202|d6e7)))"
bc7ea9
+		Regex "USB((0414:a00e)|(0b05:(1996|1a(16|2[07]|5[23])))|(0db0:(005a|151f|1feb|36e7|419c|6cc9|82c7|a073|a47c|b202|d6e7)))"
bc7ea9
 	}
bc7ea9
 	True.Define.ProfileName "Realtek/ALC4080"
bc7ea9
 }
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From 12db78292676441dfea39c2d0e5db448ec740e2a Mon Sep 17 00:00:00 2001
bc7ea9
From: Adrian Rudnik <adrian@klonmaschine.de>
bc7ea9
Date: Thu, 8 Dec 2022 00:49:13 +0100
bc7ea9
Subject: [PATCH 20/21] ucm2: alc4080 - add support for MSI PRO Z790-A WIFI (ID
bc7ea9
 0db0:d1d7)
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/248
bc7ea9
Signed-off-by: Adrian Rudnik <adrian@klonmaschine.de>
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/USB-Audio/USB-Audio.conf | 3 ++-
bc7ea9
 1 file changed, 2 insertions(+), 1 deletion(-)
bc7ea9
bc7ea9
diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
index 041db9d..da9acd0 100644
bc7ea9
--- a/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
+++ b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
@@ -61,8 +61,9 @@ If.realtek-alc4080 {
bc7ea9
 		# 0db0:a073 MSI MAG X570S Torpedo Max
bc7ea9
 		# 0db0:a47c MSI MEG X570S Ace Max
bc7ea9
 		# 0db0:b202 MSI MAG Z690 Tomahawk Wifi
bc7ea9
+		# 0db0:d1d7 MSI PRO Z790-A WIFI
bc7ea9
 		# 0db0:d6e7 MSI MPG X670E Carbon Wifi
bc7ea9
-		Regex "USB((0414:a00e)|(0b05:(1996|1a(16|2[07]|5[23])))|(0db0:(005a|151f|1feb|36e7|419c|6cc9|82c7|a073|a47c|b202|d6e7)))"
bc7ea9
+		Regex "USB((0414:a00e)|(0b05:(1996|1a(16|2[07]|5[23])))|(0db0:(005a|151f|1feb|36e7|419c|6cc9|82c7|a073|a47c|b202|d1d7|d6e7)))"
bc7ea9
 	}
bc7ea9
 	True.Define.ProfileName "Realtek/ALC4080"
bc7ea9
 }
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
bc7ea9
From d771df0333e70cd474389bade0f52a804de7b5ea Mon Sep 17 00:00:00 2001
bc7ea9
From: 13r0ck <bnr@tuta.io>
bc7ea9
Date: Tue, 22 Nov 2022 15:40:50 -0700
bc7ea9
Subject: [PATCH 21/21] Add: 0b05:1999 ASUS ROG Strix Z590-A Gaming WiFi
bc7ea9
bc7ea9
This model is recognized as a thelio-mira-b1 by system76
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/247/
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf | 13 +++++++++++++
bc7ea9
 ucm2/USB-Audio/USB-Audio.conf            |  3 ++-
bc7ea9
 2 files changed, 15 insertions(+), 1 deletion(-)
bc7ea9
bc7ea9
diff --git a/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf b/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf
bc7ea9
index fa8d445..868e267 100644
bc7ea9
--- a/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf
bc7ea9
+++ b/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf
bc7ea9
@@ -100,6 +100,19 @@ If.msi-meg-unify {
bc7ea9
 	}
bc7ea9
 }
bc7ea9
 
bc7ea9
+If.asus-rog-strix {
bc7ea9
+	Condition {
bc7ea9
+		Type RegexMatch
bc7ea9
+		String "${CardComponents}"
bc7ea9
+		Regex "USB(0b05:1999)"
bc7ea9
+	}
bc7ea9
+	True.Define {
bc7ea9
+		Line1PCM "hw:${CardId},3"
bc7ea9
+		HeadphonesName ""
bc7ea9
+		SpdifName ""
bc7ea9
+	}
bc7ea9
+}
bc7ea9
+
bc7ea9
 SectionVerb {
bc7ea9
 	EnableSequence [
bc7ea9
 		disdevall ""
bc7ea9
diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
index da9acd0..2a27b89 100644
bc7ea9
--- a/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
+++ b/ucm2/USB-Audio/USB-Audio.conf
bc7ea9
@@ -46,6 +46,7 @@ If.realtek-alc4080 {
bc7ea9
 		String "${CardComponents}"
bc7ea9
 		# 0414:a00e Gigabyte Z590 Aorus Pro AX
bc7ea9
 		# 0b05:1996 ASUS on multiple boards (including ASUS ROG Maximus XIII)
bc7ea9
+		# 0b05:1999 ASUS ROG Strix Z590-A Gaming WiFi
bc7ea9
 		# 0b05:1a16 ASUS ROG Strix B660-F Gaming WiFi
bc7ea9
 		# 0b05:1a20 ASUS ROG STRIX Z690-I Gaming Wifi
bc7ea9
 		# 0b05:1a27 ALC4082 on ASUS ROG Maximus Z690 Hero
bc7ea9
@@ -63,7 +64,7 @@ If.realtek-alc4080 {
bc7ea9
 		# 0db0:b202 MSI MAG Z690 Tomahawk Wifi
bc7ea9
 		# 0db0:d1d7 MSI PRO Z790-A WIFI
bc7ea9
 		# 0db0:d6e7 MSI MPG X670E Carbon Wifi
bc7ea9
-		Regex "USB((0414:a00e)|(0b05:(1996|1a(16|2[07]|5[23])))|(0db0:(005a|151f|1feb|36e7|419c|6cc9|82c7|a073|a47c|b202|d1d7|d6e7)))"
bc7ea9
+		Regex "USB((0414:a00e)|(0b05:(199[69]|1a(16|2[07]|5[23])))|(0db0:(005a|151f|1feb|36e7|419c|6cc9|82c7|a073|a47c|b202|d1d7|d6e7)))"
bc7ea9
 	}
bc7ea9
 	True.Define.ProfileName "Realtek/ALC4080"
bc7ea9
 }
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
From cfb595c9d94db05f35c86530385e6280fa60ec70 Mon Sep 17 00:00:00 2001
bc7ea9
From: Andy Chi <andy.chi@canonical.com>
bc7ea9
Date: Wed, 28 Dec 2022 17:36:37 +0800
bc7ea9
Subject: [PATCH 1/2] ucm2: sof-soundwire: Update Mic LED settings
bc7ea9
bc7ea9
It would be better to make this settings as default in
bc7ea9
the driver. See PR.
bc7ea9
bc7ea9
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/261
bc7ea9
Signed-off-by: Andy Chi <andy.chi@canonical.com>
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/sof-soundwire/sof-soundwire.conf | 1 +
bc7ea9
 1 file changed, 1 insertion(+)
bc7ea9
bc7ea9
diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf
bc7ea9
index bdc48ff..c6c9115 100644
bc7ea9
--- a/ucm2/sof-soundwire/sof-soundwire.conf
bc7ea9
+++ b/ucm2/sof-soundwire/sof-soundwire.conf
bc7ea9
@@ -70,5 +70,6 @@ If.mic_init_rt715 {
bc7ea9
 	}
bc7ea9
 	True.BootSequence [
bc7ea9
 		cset "name='PGA5.0 5 Master Capture Switch' 1"
bc7ea9
+		sysw "-/class/sound/ctl-led/mic/card${CardNumber}/detach:PGA5.0 5 Master Capture Switch"
bc7ea9
 	]
bc7ea9
 }
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9
bc7ea9
From 3ebf342dbe3c1e3e6e668cfbdc314b0be550cdb5 Mon Sep 17 00:00:00 2001
bc7ea9
From: Jaroslav Kysela <perex@perex.cz>
bc7ea9
Date: Mon, 20 Feb 2023 15:36:53 +0100
bc7ea9
Subject: [PATCH] sof-soundwire: Initialize PGA switch controls in the
bc7ea9
 BootSequence
bc7ea9
bc7ea9
A bug in the driver / firmware may cause that the paths are
bc7ea9
active for the first boot, but if the sound card state is saved
bc7ea9
and restored later (e.g. next boot), the paths may be deactivated.
bc7ea9
bc7ea9
BugLink: https://github.com/thesofproject/linux/issues/4196
bc7ea9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
bc7ea9
---
bc7ea9
 ucm2/sof-soundwire/sof-soundwire.conf | 21 ++++++++++++++++++++-
bc7ea9
 1 file changed, 20 insertions(+), 1 deletion(-)
bc7ea9
bc7ea9
diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf
bc7ea9
index c6c9115..786ba63 100644
bc7ea9
--- a/ucm2/sof-soundwire/sof-soundwire.conf
bc7ea9
+++ b/ucm2/sof-soundwire/sof-soundwire.conf
bc7ea9
@@ -69,7 +69,26 @@ If.mic_init_rt715 {
bc7ea9
 		Haystack "${var:MicCodec1}"
bc7ea9
 	}
bc7ea9
 	True.BootSequence [
bc7ea9
-		cset "name='PGA5.0 5 Master Capture Switch' 1"
bc7ea9
 		sysw "-/class/sound/ctl-led/mic/card${CardNumber}/detach:PGA5.0 5 Master Capture Switch"
bc7ea9
 	]
bc7ea9
 }
bc7ea9
+
bc7ea9
+If.pga_init_pga2 {
bc7ea9
+	Condition {
bc7ea9
+		Type ControlExists
bc7ea9
+		Control "name='PGA2.0 2 Master Capture Switch'"
bc7ea9
+	}
bc7ea9
+	True.BootSequence [
bc7ea9
+		cset "name='PGA2.0 2 Master Capture Switch' 1"
bc7ea9
+	]
bc7ea9
+}
bc7ea9
+
bc7ea9
+If.pga_init_pga5 {
bc7ea9
+	Condition {
bc7ea9
+		Type ControlExists
bc7ea9
+		Control "name='PGA5.0 5 Master Capture Switch'"
bc7ea9
+	}
bc7ea9
+	True.BootSequence [
bc7ea9
+		cset "name='PGA5.0 5 Master Capture Switch' 1"
bc7ea9
+	]
bc7ea9
+}
bc7ea9
-- 
bc7ea9
2.39.0
bc7ea9