Blame SPECS/alsa-ucm-git.patch

Packit Service a46890
From 33be660e4b1e75c19d5332556c3d2636dd3344bf Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
Date: Mon, 2 Nov 2020 16:44:51 +0100
Packit Service a46890
Subject: [PATCH 01/24] fix the ucm2/codecs/hda/hdmi.conf use
Packit Service a46890
Packit Service a46890
The mentioned commit (dcef48f13d) removed the index for the IEC958 on/off
Packit Service a46890
control which made the HDMI 2+ outputs silent.
Packit Service a46890
Packit Service a46890
Fixes: dcef48f13d ("HDA-Intel: add support for AMD acp microphone devices")
Packit Service a46890
BugLink: https://github.com/alsa-project/alsa-lib/issues/95
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/HDA-Intel/Hdmi.conf   | 8 +++++++-
Packit Service a46890
 ucm2/codecs/hda/hdmi.conf  | 4 ++--
Packit Service a46890
 ucm2/sof-hda-dsp/Hdmi.conf | 3 +++
Packit Service a46890
 3 files changed, 12 insertions(+), 3 deletions(-)
Packit Service a46890
Packit Service fff732
diff --git a/ucm2/HDA-Intel/Hdmi.conf b/ucm2/HDA-Intel/Hdmi.conf
Packit Service fff732
index c8b6e77..c533e49 100644
Packit Service fff732
--- a/ucm2/HDA-Intel/Hdmi.conf
Packit Service fff732
+++ b/ucm2/HDA-Intel/Hdmi.conf
Packit Service fff732
@@ -6,6 +6,7 @@ If.hdmi1 {
Packit Service fff732
 		Define {
Packit Service fff732
 			HdmiNum 1
Packit Service fff732
 			HdmiPCM 3
Packit Service fff732
+			HdmiCtlIndex 0
Packit Service fff732
 			HdmiPrio 1100
Packit Service fff732
 		}
Packit Service fff732
 		Include.hdmi1.File "/codecs/hda/hdmi.conf"
Packit Service fff732
@@ -18,6 +19,7 @@ If.hdmi2 {
Packit Service fff732
 		Define {
Packit Service fff732
 			HdmiNum 2
Packit Service fff732
 			HdmiPCM 7
Packit Service fff732
+			HdmiCtlIndex 1
Packit Service fff732
 			HdmiPrio 1200
Packit Service fff732
 		}
Packit Service fff732
 		Include.hdmi2.File "/codecs/hda/hdmi.conf"
Packit Service fff732
@@ -30,6 +32,7 @@ If.hdmi3 {
Packit Service fff732
 		Define {
Packit Service fff732
 			HdmiNum 3
Packit Service fff732
 			HdmiPCM 8
Packit Service fff732
+			HdmiCtlIndex 2
Packit Service fff732
 			HdmiPrio 1300
Packit Service fff732
 		}
Packit Service fff732
 		Include.hdmi3.File "/codecs/hda/hdmi.conf"
Packit Service fff732
@@ -42,6 +45,7 @@ If.hdmi4 {
Packit Service fff732
 		Define {
Packit Service fff732
 			HdmiNum 4
Packit Service fff732
 			HdmiPCM 9
Packit Service fff732
+			HdmiCtlIndex 3
Packit Service fff732
 			HdmiPrio 1400
Packit Service fff732
 		}
Packit Service fff732
 		Include.hdmi4.File "/codecs/hda/hdmi.conf"
Packit Service fff732
@@ -54,6 +58,7 @@ If.hdmi5 {
Packit Service fff732
 		Define {
Packit Service fff732
 			HdmiNum 5
Packit Service fff732
 			HdmiPCM 10
Packit Service fff732
+			HdmiCtlIndex 4
Packit Service fff732
 			HdmiPrio 1500
Packit Service fff732
 		}
Packit Service fff732
 		Include.hdmi5.File "/codecs/hda/hdmi.conf"
Packit Service fff732
@@ -66,8 +71,9 @@ If.hdmi6 {
Packit Service fff732
 		Define {
Packit Service fff732
 			HdmiNum 6
Packit Service fff732
 			HdmiPCM 11
Packit Service fff732
+			HdmiCtlIndex 5
Packit Service fff732
 			HdmiPrio 1600
Packit Service fff732
 		}
Packit Service fff732
-		Include.hdmi5.File "/codecs/hda/hdmi.conf"
Packit Service fff732
+		Include.hdmi6.File "/codecs/hda/hdmi.conf"
Packit Service fff732
 	}
Packit Service fff732
 }
Packit Service fff732
diff --git a/ucm2/codecs/hda/hdmi.conf b/ucm2/codecs/hda/hdmi.conf
Packit Service a46890
index ba80fef..32a77f4 100644
Packit Service fff732
--- a/ucm2/codecs/hda/hdmi.conf
Packit Service fff732
+++ b/ucm2/codecs/hda/hdmi.conf
Packit Service a46890
@@ -8,11 +8,11 @@ If.hdmi {
Packit Service a46890
 			Comment "HDMI${var:HdmiNum} Output"
Packit Service fff732
 
Packit Service fff732
 			EnableSequence [
Packit Service fff732
-				cset "name='IEC958 Playback Switch' on"
Packit Service fff732
+				cset "name='IEC958 Playback Switch',index=${var:HdmiCtlIndex} on"
Packit Service fff732
 			]
Packit Service fff732
 
Packit Service fff732
 			DisableSequence [
Packit Service fff732
-				cset "name='IEC958 Playback Switch' off"
Packit Service fff732
+				cset "name='IEC958 Playback Switch',index=${var:HdmiCtlIndex} off"
Packit Service fff732
 			]
Packit Service fff732
 
Packit Service fff732
 			Value {
Packit Service fff732
diff --git a/ucm2/sof-hda-dsp/Hdmi.conf b/ucm2/sof-hda-dsp/Hdmi.conf
Packit Service fff732
index 7b777d1..1726567 100644
Packit Service fff732
--- a/ucm2/sof-hda-dsp/Hdmi.conf
Packit Service fff732
+++ b/ucm2/sof-hda-dsp/Hdmi.conf
Packit Service fff732
@@ -6,6 +6,7 @@ If.hdmi1 {
Packit Service fff732
 		Define {
Packit Service fff732
 			HdmiNum 1
Packit Service fff732
 			HdmiPCM 3
Packit Service fff732
+			HdmiCtlIndex 0
Packit Service fff732
 			HdmiPrio 500
Packit Service fff732
 		}
Packit Service fff732
 		Include.hdmi1.File "/codecs/hda/hdmi.conf"
Packit Service fff732
@@ -18,6 +19,7 @@ If.hdmi2 {
Packit Service fff732
 		Define {
Packit Service fff732
 			HdmiNum 2
Packit Service fff732
 			HdmiPCM 4
Packit Service fff732
+			HdmiCtlIndex 1
Packit Service fff732
 			HdmiPrio 600
Packit Service fff732
 		}
Packit Service fff732
 		Include.hdmi2.File "/codecs/hda/hdmi.conf"
Packit Service fff732
@@ -30,6 +32,7 @@ If.hdmi3 {
Packit Service fff732
 		Define {
Packit Service fff732
 			HdmiNum 3
Packit Service fff732
 			HdmiPCM 5
Packit Service fff732
+			HdmiCtlIndex 2
Packit Service fff732
 			HdmiPrio 700
Packit Service fff732
 		}
Packit Service fff732
 		Include.hdmi3.File "/codecs/hda/hdmi.conf"
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From f8c2428ccc42488c5e96801cce9f7e28080ecb71 Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
Date: Mon, 2 Nov 2020 18:15:14 +0100
Packit Service a46890
Subject: [PATCH 02/24] codecs/hda/hdmi.conf - add DisplayPort to the device
Packit Service a46890
 description (Comment)
Packit Service a46890
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/codecs/hda/hdmi.conf | 2 +-
Packit Service a46890
 1 file changed, 1 insertion(+), 1 deletion(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/codecs/hda/hdmi.conf b/ucm2/codecs/hda/hdmi.conf
Packit Service a46890
index 32a77f4..c7b7ba4 100644
Packit Service a46890
--- a/ucm2/codecs/hda/hdmi.conf
Packit Service a46890
+++ b/ucm2/codecs/hda/hdmi.conf
Packit Service a46890
@@ -5,7 +5,7 @@ If.hdmi {
Packit Service fff732
 	}
Packit Service a46890
 	True {
Packit Service a46890
 		SectionDevice."HDMI${var:HdmiNum}" {
Packit Service a46890
-			Comment "HDMI${var:HdmiNum} Output"
Packit Service a46890
+			Comment "HDMI / DisplayPort ${var:HdmiNum} Output"
Packit Service fff732
 
Packit Service a46890
 			EnableSequence [
Packit Service a46890
 				cset "name='IEC958 Playback Switch',index=${var:HdmiCtlIndex} on"
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 334b12e9a796cddf70779b68418ee7ad52ba1d14 Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
Date: Mon, 16 Nov 2020 11:48:05 +0100
Packit Service a46890
Subject: [PATCH 03/24] sof-soundwire: use the codecs/hda/hdmi.conf macro
Packit Service a46890
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/sof-soundwire/Hdmi.conf | 83 ++++++++++--------------------------
Packit Service a46890
 1 file changed, 22 insertions(+), 61 deletions(-)
Packit Service a46890
Packit Service fff732
diff --git a/ucm2/sof-soundwire/Hdmi.conf b/ucm2/sof-soundwire/Hdmi.conf
Packit Service fff732
index d0ba790..d5ee9c6 100644
Packit Service fff732
--- a/ucm2/sof-soundwire/Hdmi.conf
Packit Service fff732
+++ b/ucm2/sof-soundwire/Hdmi.conf
Packit Service fff732
@@ -1,79 +1,40 @@
Packit Service fff732
-# Use case Configuration for sof-soundwire card
Packit Service fff732
+# Use case Configuration for sof-soundwire
Packit Service fff732
 
Packit Service fff732
 If.hdmi1 {
Packit Service fff732
-	Condition {
Packit Service fff732
-		Type ControlExists
Packit Service fff732
-		Control "iface=CARD,name='HDMI/DP,pcm=5 Jack'"
Packit Service fff732
-	}
Packit Service fff732
+	Condition { Type String Empty "" }
Packit Service fff732
 	True {
Packit Service fff732
-		SectionDevice."HDMI1" {
Packit Service fff732
-			Comment "HDMI1/DP1 Output"
Packit Service fff732
-
Packit Service fff732
-			EnableSequence [
Packit Service fff732
-				cset "name='IEC958 Playback Switch' on"
Packit Service fff732
-			]
Packit Service fff732
-
Packit Service fff732
-			DisableSequence [
Packit Service fff732
-				cset "name='IEC958 Playback Switch' off"
Packit Service fff732
-			]
Packit Service fff732
-
Packit Service fff732
-			Value {
Packit Service fff732
-				PlaybackPriority 500
Packit Service fff732
-				PlaybackPCM "hw:${CardId},5"
Packit Service fff732
-				JackControl "HDMI/DP,pcm=5 Jack"
Packit Service fff732
-			}
Packit Service fff732
+		Define {
Packit Service fff732
+			HdmiNum 1
Packit Service fff732
+			HdmiPCM 5
Packit Service fff732
+			HdmiCtlIndex 0
Packit Service fff732
+			HdmiPrio 500
Packit Service fff732
 		}
Packit Service fff732
+		Include.hdmi1.File "/codecs/hda/hdmi.conf"
Packit Service fff732
 	}
Packit Service fff732
 }
Packit Service fff732
 
Packit Service fff732
 If.hdmi2 {
Packit Service fff732
-	Condition {
Packit Service fff732
-		Type ControlExists
Packit Service fff732
-		Control "iface=CARD,name='HDMI/DP,pcm=6 Jack'"
Packit Service fff732
-	}
Packit Service fff732
+	Condition { Type String Empty "" }
Packit Service fff732
 	True {
Packit Service fff732
-		SectionDevice."HDMI2" {
Packit Service fff732
-			Comment "HDMI2/DP2 Output"
Packit Service fff732
-
Packit Service fff732
-			EnableSequence [
Packit Service fff732
-				cset "name='IEC958 Playback Switch',index=1 on"
Packit Service fff732
-			]
Packit Service fff732
-
Packit Service fff732
-			DisableSequence [
Packit Service fff732
-				cset "name='IEC958 Playback Switch',index=1 off"
Packit Service fff732
-			]
Packit Service fff732
-
Packit Service fff732
-			Value {
Packit Service fff732
-				PlaybackPriority 600
Packit Service fff732
-				PlaybackPCM "hw:${CardId},6"
Packit Service fff732
-				JackControl "HDMI/DP,pcm=6 Jack"
Packit Service fff732
-			}
Packit Service fff732
+		Define {
Packit Service fff732
+			HdmiNum 2
Packit Service fff732
+			HdmiPCM 6
Packit Service fff732
+			HdmiCtlIndex 1
Packit Service fff732
+			HdmiPrio 600
Packit Service fff732
 		}
Packit Service fff732
+		Include.hdmi2.File "/codecs/hda/hdmi.conf"
Packit Service fff732
 	}
Packit Service fff732
 }
Packit Service fff732
 
Packit Service fff732
 If.hdmi3 {
Packit Service fff732
-	Condition {
Packit Service fff732
-		Type ControlExists
Packit Service fff732
-		Control "iface=CARD,name='HDMI/DP,pcm=7 Jack'"
Packit Service fff732
-	}
Packit Service fff732
+	Condition { Type String Empty "" }
Packit Service fff732
 	True {
Packit Service fff732
-		SectionDevice."HDMI3" {
Packit Service fff732
-			Comment "HDMI3/DP3 Output"
Packit Service fff732
-
Packit Service fff732
-			EnableSequence [
Packit Service fff732
-				cset "name='IEC958 Playback Switch',index=2 on"
Packit Service fff732
-			]
Packit Service fff732
-
Packit Service fff732
-			DisableSequence [
Packit Service fff732
-				cset "name='IEC958 Playback Switch',index=2 off"
Packit Service fff732
-			]
Packit Service fff732
-
Packit Service fff732
-			Value {
Packit Service fff732
-				PlaybackPriority 700
Packit Service fff732
-				PlaybackPCM "hw:${CardId},7"
Packit Service fff732
-				JackControl "HDMI/DP,pcm=7 Jack"
Packit Service fff732
-			}
Packit Service fff732
+		Define {
Packit Service fff732
+			HdmiNum 3
Packit Service fff732
+			HdmiPCM 7
Packit Service fff732
+			HdmiCtlIndex 2
Packit Service fff732
+			HdmiPrio 700
Packit Service fff732
 		}
Packit Service fff732
+		Include.hdmi3.File "/codecs/hda/hdmi.conf"
Packit Service fff732
 	}
Packit Service fff732
 }
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 6889736b917eed89c4d775824efd8655400e27e3 Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
Date: Mon, 7 Dec 2020 09:33:30 +0100
Packit Service a46890
Subject: [PATCH 04/24] Revert "ucm2: HDA/acp - add Capture simple mixer
Packit Service a46890
 element to the ACP Mic device"
Packit Service a46890
Packit Service a46890
This reverts commit 3320b1ac804595d6c145c1ad7af85917182a3c98.
Packit Service a46890
Packit Service a46890
This solution does not work. The mute state is shared between
Packit Service a46890
the HDA and AMD ACP in PA, so it may cause the security issue, if
Packit Service a46890
the users do not set the mute manually.
Packit Service a46890
Packit Service a46890
BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/64
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/HDA-Intel/HiFi-acp.conf | 1 -
Packit Service a46890
 1 file changed, 1 deletion(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/HDA-Intel/HiFi-acp.conf b/ucm2/HDA-Intel/HiFi-acp.conf
Packit Service a46890
index 15eeca5..123ae15 100644
Packit Service a46890
--- a/ucm2/HDA-Intel/HiFi-acp.conf
Packit Service a46890
+++ b/ucm2/HDA-Intel/HiFi-acp.conf
Packit Service a46890
@@ -4,6 +4,5 @@ SectionDevice."Mic1" {
Packit Service a46890
 	Value {
Packit Service a46890
 		CapturePriority 100
Packit Service a46890
 		CapturePCM "hw:${var:AcpCardId}"
Packit Service a46890
-		CaptureMixerElem "Capture"
Packit Service a46890
 	}
Packit Service a46890
 }
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 13420f94a6858e9c3e3a056a7987d9c0db823394 Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Date: Sun, 6 Dec 2020 13:47:16 +0100
Packit Service a46890
Subject: [PATCH 05/24] chtnau8824: Fix mono speaker config not working
Packit Service a46890
Packit Service a46890
Fix the Speaker define / var being changed from "Speaker" to "MonoSpeaker"
Packit Service a46890
not having any effect because the variable gets expanded before the if
Packit Service a46890
making the change is interpreted.
Packit Service a46890
Packit Service a46890
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/chtnau8824/HiFi.conf | 15 +++++++++++----
Packit Service a46890
 1 file changed, 11 insertions(+), 4 deletions(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/chtnau8824/HiFi.conf b/ucm2/chtnau8824/HiFi.conf
Packit Service a46890
index 3ccd6b1..d7a5f63 100644
Packit Service a46890
--- a/ucm2/chtnau8824/HiFi.conf
Packit Service a46890
+++ b/ucm2/chtnau8824/HiFi.conf
Packit Service a46890
@@ -34,8 +34,15 @@ SectionVerb {
Packit Service a46890
 	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
-Include.spk.File "/codecs/nau8824/${var:Speaker}.conf"
Packit Service a46890
-Include.hp.File "/codecs/nau8824/HeadPhones.conf"
Packit Service a46890
+# The includes using $vars in there path must be conditional otherwise the
Packit Service a46890
+# $var gets expanded before the other If-s above can change the vars.
Packit Service a46890
+If.cfg-includes {
Packit Service a46890
+	Condition { Type String Empty "" }
Packit Service a46890
+	True {
Packit Service a46890
+		Include.spk.File "/codecs/nau8824/${var:Speaker}.conf"
Packit Service a46890
+		Include.hp.File "/codecs/nau8824/HeadPhones.conf"
Packit Service a46890
 
Packit Service a46890
-Include.mic.File "/codecs/nau8824/InternalMic.conf"
Packit Service a46890
-Include.hsmic.File "/codecs/nau8824/HeadsetMic.conf"
Packit Service a46890
+		Include.mic.File "/codecs/nau8824/InternalMic.conf"
Packit Service a46890
+		Include.hsmic.File "/codecs/nau8824/HeadsetMic.conf"
Packit Service a46890
+	}
Packit Service a46890
+}
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 7db718571440b13045ebb3150a71745033ff5c0c Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Date: Sun, 6 Dec 2020 13:47:17 +0100
Packit Service a46890
Subject: [PATCH 06/24] chtnau8824: Add support for laptops using stereo DMICs
Packit Service a46890
Packit Service a46890
The Medion E2228T uses a NAU8824 codec combined with stereo
Packit Service a46890
DMICs, add support for this.
Packit Service a46890
Packit Service a46890
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/chtnau8824/HiFi.conf        | 16 +++++++++++++++-
Packit Service a46890
 ucm2/codecs/nau8824/DMIC1_2.conf | 30 ++++++++++++++++++++++++++++++
Packit Service a46890
 2 files changed, 45 insertions(+), 1 deletion(-)
Packit Service a46890
 create mode 100644 ucm2/codecs/nau8824/DMIC1_2.conf
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/chtnau8824/HiFi.conf b/ucm2/chtnau8824/HiFi.conf
Packit Service a46890
index d7a5f63..105f360 100644
Packit Service a46890
--- a/ucm2/chtnau8824/HiFi.conf
Packit Service a46890
+++ b/ucm2/chtnau8824/HiFi.conf
Packit Service a46890
@@ -1,4 +1,5 @@
Packit Service a46890
 Define.Speaker "Speaker"
Packit Service a46890
+Define.Mic "InternalMic"
Packit Service a46890
 
Packit Service a46890
 If.cfg-mspk {
Packit Service a46890
 	Condition {
Packit Service a46890
@@ -11,6 +12,19 @@ If.cfg-mspk {
Packit Service a46890
 	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
+If.cfg-mic {
Packit Service a46890
+	Condition {
Packit Service a46890
+		Type RegexMatch
Packit Service a46890
+		String "${CardLongName}"
Packit Service a46890
+		# Medion E22??T models put DMIC in their product version
Packit Service a46890
+		# when using DMICs
Packit Service a46890
+		Regex "(MEDION-E22..T.*-DMIC-)"
Packit Service a46890
+	}
Packit Service a46890
+	True {
Packit Service a46890
+		Define.Mic "DMIC1_2"
Packit Service a46890
+	}
Packit Service a46890
+}
Packit Service a46890
+
Packit Service a46890
 SectionVerb {
Packit Service a46890
 
Packit Service a46890
 	Value {
Packit Service a46890
@@ -42,7 +56,7 @@ If.cfg-includes {
Packit Service a46890
 		Include.spk.File "/codecs/nau8824/${var:Speaker}.conf"
Packit Service a46890
 		Include.hp.File "/codecs/nau8824/HeadPhones.conf"
Packit Service a46890
 
Packit Service a46890
-		Include.mic.File "/codecs/nau8824/InternalMic.conf"
Packit Service a46890
+		Include.mic.File "/codecs/nau8824/${var:Mic}.conf"
Packit Service a46890
 		Include.hsmic.File "/codecs/nau8824/HeadsetMic.conf"
Packit Service a46890
 	}
Packit Service a46890
 }
Packit Service a46890
diff --git a/ucm2/codecs/nau8824/DMIC1_2.conf b/ucm2/codecs/nau8824/DMIC1_2.conf
Packit Service a46890
new file mode 100644
Packit Service a46890
index 0000000..f54f671
Packit Service a46890
--- /dev/null
Packit Service a46890
+++ b/ucm2/codecs/nau8824/DMIC1_2.conf
Packit Service a46890
@@ -0,0 +1,30 @@
Packit Service a46890
+# Stereo DMICs on the DMIC1 and DMIC2 inputs
Packit Service a46890
+
Packit Service a46890
+SectionDevice."Mic" {
Packit Service a46890
+	Comment "Internal Digital Microphones"
Packit Service a46890
+
Packit Service a46890
+	Value {
Packit Service a46890
+		CapturePriority 200
Packit Service a46890
+		CapturePCM "hw:${CardId}"
Packit Service a46890
+	}
Packit Service a46890
+
Packit Service a46890
+	ConflictingDevice [
Packit Service a46890
+		"Headset"
Packit Service a46890
+	]
Packit Service a46890
+
Packit Service a46890
+	EnableSequence [
Packit Service a46890
+		# Note needs to be swapped / swap is deliberate!
Packit Service a46890
+		cset "name='ADC CH0 Select' 1"
Packit Service a46890
+		cset "name='ADC CH1 Select' 0"
Packit Service a46890
+
Packit Service a46890
+		cset "name='Int Mic Switch' on"
Packit Service a46890
+		cset "name='DMIC1 Enable Switch' on"
Packit Service a46890
+		cset "name='DMIC2 Enable Switch' on"
Packit Service a46890
+	]
Packit Service a46890
+
Packit Service a46890
+	DisableSequence [
Packit Service a46890
+		cset "name='Int Mic Switch' off"
Packit Service a46890
+		cset "name='DMIC1 Enable Switch' off"
Packit Service a46890
+		cset "name='DMIC2 Enable Switch' off"
Packit Service a46890
+	]
Packit Service a46890
+}
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From dacfe2fc7b41b800f4f379ce4b1722462b97cab2 Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Date: Sun, 6 Dec 2020 13:47:18 +0100
Packit Service a46890
Subject: [PATCH 07/24] chtnau8824: Boost analog mic volumes a bit
Packit Service a46890
Packit Service a46890
Both Mic1 (internal analog mic) and Mic2 (headset mic) are a bit soft
Packit Service a46890
with the current settings, boost their volumes a bit.
Packit Service a46890
Packit Service a46890
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/codecs/nau8824/EnableSeq.conf | 4 ++--
Packit Service a46890
 1 file changed, 2 insertions(+), 2 deletions(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/codecs/nau8824/EnableSeq.conf b/ucm2/codecs/nau8824/EnableSeq.conf
Packit Service a46890
index 433e8e2..3650d06 100644
Packit Service a46890
--- a/ucm2/codecs/nau8824/EnableSeq.conf
Packit Service a46890
+++ b/ucm2/codecs/nau8824/EnableSeq.conf
Packit Service a46890
@@ -7,8 +7,8 @@ EnableSequence [
Packit Service a46890
 	cset "name='DMIC2 Enable Switch' off"
Packit Service a46890
 	cset "name='DMIC3 Enable Switch' off"
Packit Service a46890
 	cset "name='DMIC4 Enable Switch' off"
Packit Service a46890
-	cset "name='MIC1 Volume' 10"
Packit Service a46890
-	cset "name='MIC2 Volume' 10"
Packit Service a46890
+	cset "name='MIC1 Volume' 14"
Packit Service a46890
+	cset "name='MIC2 Volume' 14"
Packit Service a46890
 	# Button Configuration
Packit Service a46890
 	cset "name='THD for key media' 10"
Packit Service a46890
 	cset "name='THD for key voice command' 16"
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 263bd26b1216c933db3d216197a78678d0f8610e Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Libin Yang <libin.yang@intel.com>
Packit Service a46890
Date: Thu, 19 Nov 2020 20:01:30 +0800
Packit Service a46890
Subject: [PATCH 08/24] rt715: init: setup ADC07 to a proper volume
Packit Service a46890
Packit Service a46890
This patch initiates 'rt715 ADC 07 Capture Volume' to a proper volume.
Packit Service a46890
Packit Service a46890
Signed-off-by: Libin Yang <libin.yang@intel.com>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/codecs/rt715/init.conf | 1 +
Packit Service a46890
 1 file changed, 1 insertion(+)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/codecs/rt715/init.conf b/ucm2/codecs/rt715/init.conf
Packit Service a46890
index 6e07b2d..15a0571 100644
Packit Service a46890
--- a/ucm2/codecs/rt715/init.conf
Packit Service a46890
+++ b/ucm2/codecs/rt715/init.conf
Packit Service a46890
@@ -7,4 +7,5 @@ BootSequence [
Packit Service a46890
 	cset "name='rt715 ADC 25 Mux' 4"
Packit Service a46890
 	cset "name='rt715 ADC 27 Capture Switch' 1"
Packit Service a46890
 	cset "name='rt715 ADC 07 Capture Switch' 1"
Packit Service a46890
+	cset "name='rt715 ADC 07 Capture Volume' 58"
Packit Service a46890
 ]
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From cf267cce6d553d4d436c166c23d3befc5476acef Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Hui Wang <hui.wang@canonical.com>
Packit Service a46890
Date: Thu, 29 Oct 2020 13:34:02 +0800
Packit Service a46890
Subject: [PATCH 09/24] sof-hda-dsp: Set Master Playback Switch on in the
Packit Service a46890
 BootSequence
Packit Service a46890
Packit Service a46890
Otherwise, the audio output will be muted by default if there is no
Packit Service a46890
/var/lib/alsa/asound.state. I have experienced this issue When newly
Packit Service a46890
install an OS.
Packit Service a46890
Packit Service a46890
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/HDA-Intel/init.conf          | 1 +
Packit Service a46890
 ucm2/sof-hda-dsp/sof-hda-dsp.conf | 1 +
Packit Service a46890
 2 files changed, 2 insertions(+)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/HDA-Intel/init.conf b/ucm2/HDA-Intel/init.conf
Packit Service a46890
index 1a351a9..6310eb3 100644
Packit Service a46890
--- a/ucm2/HDA-Intel/init.conf
Packit Service a46890
+++ b/ucm2/HDA-Intel/init.conf
Packit Service a46890
@@ -15,6 +15,7 @@ If.master {
Packit Service a46890
 	}
Packit Service a46890
 	True.BootSequence [
Packit Service a46890
 		cset "name='Master Playback Volume' 60%"
Packit Service a46890
+		cset "name='Master Playback Switch' on"
Packit Service a46890
 	]
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
diff --git a/ucm2/sof-hda-dsp/sof-hda-dsp.conf b/ucm2/sof-hda-dsp/sof-hda-dsp.conf
Packit Service a46890
index c8069a6..79b54a9 100644
Packit Service a46890
--- a/ucm2/sof-hda-dsp/sof-hda-dsp.conf
Packit Service a46890
+++ b/ucm2/sof-hda-dsp/sof-hda-dsp.conf
Packit Service a46890
@@ -24,6 +24,7 @@ If.master {
Packit Service a46890
 	}
Packit Service a46890
 	True.BootSequence [
Packit Service a46890
 		cset "name='Master Playback Volume' 60%"
Packit Service a46890
+		cset "name='Master Playback Switch' on"
Packit Service a46890
 	]
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 5405544752c18153acc310ee7e4a4bacda040dca Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
Packit Service a46890
Date: Thu, 27 Aug 2020 21:18:13 +0800
Packit Service a46890
Subject: [PATCH 10/24] HDA-Intel/HiFi-dual: Add EnableSequence and
Packit Service a46890
 DisableSequence for Speaker and Headphones
Packit Service a46890
Packit Service a46890
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/48
Packit Service a46890
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/HDA-Intel/HiFi-dual.conf | 16 ++++++++++++++++
Packit Service a46890
 1 file changed, 16 insertions(+)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/HDA-Intel/HiFi-dual.conf b/ucm2/HDA-Intel/HiFi-dual.conf
Packit Service a46890
index cff948e..bacfd80 100644
Packit Service a46890
--- a/ucm2/HDA-Intel/HiFi-dual.conf
Packit Service a46890
+++ b/ucm2/HDA-Intel/HiFi-dual.conf
Packit Service a46890
@@ -27,6 +27,14 @@ SectionDevice."Speaker" {
Packit Service a46890
 		PlaybackMixerElem "Speaker"
Packit Service a46890
 	}
Packit Service a46890
 
Packit Service a46890
+	EnableSequence [
Packit Service a46890
+		cset "name='Speaker Playback Switch' on"
Packit Service a46890
+	]
Packit Service a46890
+
Packit Service a46890
+	DisableSequence [
Packit Service a46890
+		cset "name='Speaker Playback Switch' off"
Packit Service a46890
+	]
Packit Service a46890
+
Packit Service a46890
 	ConflictingDevice [
Packit Service a46890
 		"Headphones"
Packit Service a46890
 	]
Packit Service a46890
@@ -54,6 +62,14 @@ SectionDevice."Headphones" {
Packit Service a46890
 		JackHWMute "Speaker"
Packit Service a46890
 	}
Packit Service a46890
 
Packit Service a46890
+	EnableSequence [
Packit Service a46890
+		cset "name='Headphone Playback Switch' on"
Packit Service a46890
+	]
Packit Service a46890
+
Packit Service a46890
+	DisableSequence [
Packit Service a46890
+		cset "name='Headphone Playback Switch' off"
Packit Service a46890
+	]
Packit Service a46890
+
Packit Service a46890
 	ConflictingDevice [
Packit Service a46890
 		"Speaker"
Packit Service a46890
 	]
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 5947daef124c84fae511233248196576dfbfab7c Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
Date: Wed, 16 Dec 2020 08:55:04 +0100
Packit Service a46890
Subject: [PATCH 11/24] HDA-Intel/HiFi-dual: Add BootSequence and disable
Packit Service a46890
 playback channels in verb init
Packit Service a46890
Packit Service a46890
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/48
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/HDA-Intel/HDAudio-DualCodecs.conf | 12 ++++++++++++
Packit Service a46890
 ucm2/HDA-Intel/HiFi-dual.conf          |  2 ++
Packit Service a46890
 2 files changed, 14 insertions(+)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/HDA-Intel/HDAudio-DualCodecs.conf b/ucm2/HDA-Intel/HDAudio-DualCodecs.conf
Packit Service a46890
index 8aaabd0..6fd7bd1 100644
Packit Service a46890
--- a/ucm2/HDA-Intel/HDAudio-DualCodecs.conf
Packit Service a46890
+++ b/ucm2/HDA-Intel/HDAudio-DualCodecs.conf
Packit Service a46890
@@ -4,3 +4,15 @@ SectionUseCase."HiFi" {
Packit Service a46890
 	File "HiFi-dual.conf"
Packit Service a46890
 	Comment "Default"
Packit Service a46890
 }
Packit Service a46890
+
Packit Service a46890
+BootSequence [
Packit Service a46890
+	cset "name='Headphone Playback Volume' 60%"
Packit Service a46890
+	cset "name='Headphone Playback Switch' off"
Packit Service a46890
+	cset "name='Speaker Playback Volume' 60%"
Packit Service a46890
+	cset "name='Speaker Playback Switch' on"
Packit Service a46890
+	cset "name='Front Playback Volume' 100%"
Packit Service a46890
+	cset "name='Front Playback Switch' on"
Packit Service a46890
+	cset "name='Rear-Panel Capture Volume' 100%"
Packit Service a46890
+	cset "name='Rear-Panel Capture Switch' on"
Packit Service a46890
+	cset "name='Input Source' Rear Mic"
Packit Service a46890
+]
Packit Service a46890
diff --git a/ucm2/HDA-Intel/HiFi-dual.conf b/ucm2/HDA-Intel/HiFi-dual.conf
Packit Service a46890
index bacfd80..f2c6915 100644
Packit Service a46890
--- a/ucm2/HDA-Intel/HiFi-dual.conf
Packit Service a46890
+++ b/ucm2/HDA-Intel/HiFi-dual.conf
Packit Service a46890
@@ -8,6 +8,8 @@ SectionVerb {
Packit Service a46890
 		cset "name='Front Playback Switch' on"
Packit Service a46890
 		cset "name='Rear-Panel Capture Volume' 100%"
Packit Service a46890
 		cset "name='Rear-Panel Capture Switch' on"
Packit Service a46890
+		cset "name='Headphone Playback Switch' off"
Packit Service a46890
+		cset "name='Speaker Playback Switch' off"
Packit Service a46890
 	]
Packit Service a46890
 
Packit Service a46890
 	DisableSequence [
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 5634db4be3ed435f3e59f30a71c3c3711162929d Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Jian-Hong Pan <jhp@endlessos.org>
Packit Service a46890
Date: Tue, 15 Dec 2020 16:54:03 +0800
Packit Service a46890
Subject: [PATCH 12/24] chtrt5645: Enable Internal MIC of ECS EF20EA
Packit Service a46890
Packit Service a46890
The ECS EF20EA uses a digital mic connected to the dmic2 pin, rather
Packit Service a46890
then the default analog mic.
Packit Service a46890
Packit Service a46890
1 [chtrt5645      ]: chtrt5645 - chtrt5645
Packit Service a46890
                     Standard-EF20EA-1.0
Packit Service a46890
Packit Service a46890
Add a card long name match for this, so that the right config is used.
Packit Service a46890
Packit Service a46890
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/68
Packit Service a46890
Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/chtrt5645/HiFi.conf | 2 +-
Packit Service a46890
 1 file changed, 1 insertion(+), 1 deletion(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/chtrt5645/HiFi.conf b/ucm2/chtrt5645/HiFi.conf
Packit Service a46890
index 10b0a1c..30fad50 100644
Packit Service a46890
--- a/ucm2/chtrt5645/HiFi.conf
Packit Service a46890
+++ b/ucm2/chtrt5645/HiFi.conf
Packit Service a46890
@@ -18,7 +18,7 @@ If.cfg-dmic2 {
Packit Service a46890
 	Condition {
Packit Service a46890
 		Type RegexMatch
Packit Service a46890
 		String "${CardLongName}"
Packit Service a46890
-		Regex "(LENOVO.*LenovoMIIX320|MEDION.*Wingman)"
Packit Service a46890
+		Regex "(LENOVO.*LenovoMIIX320|MEDION.*Wingman|Standard-EF20EA-1.0)"
Packit Service a46890
 	}
Packit Service a46890
 	True {
Packit Service a46890
 		Define.AnalogMic ""
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From bdd05ac3396a3a09f3818aaa9157eb7ef07676d6 Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Date: Sat, 9 Jan 2021 22:02:51 +0100
Packit Service a46890
Subject: [PATCH 13/24] bytcr-rt5640: Add support for devices without speakers
Packit Service a46890
 and/or an internal mic
Packit Service a46890
Packit Service a46890
There are kernel patches pending upstream for the bytcr-rt5640 machine-driver
Packit Service a46890
to support devices without speakers and/or an internal mic.
Packit Service a46890
Packit Service a46890
Since the UCM profile already conditionally loads the speaker and
Packit Service a46890
internal-mic codec include files, these will simply get skipped in this
Packit Service a46890
case, so this almost works with the current UCM profile without changes.
Packit Service a46890
Packit Service a46890
The only troublesome part is the ConflictingDevice sections in the codec
Packit Service a46890
HeadPhones.conf and HeadsetMic.conf files, which refer to resp. a "Speaker"
Packit Service a46890
and a "Mic" device. Without any of the speaker or mic codec conf files
Packit Service a46890
being included there will not by any "Speaker" / "Mic" devices leading
Packit Service a46890
to an error while parsing the HeadPhones.conf / HeadsetMic.conf files.
Packit Service a46890
Packit Service a46890
This commit makes the ConflictingDevice section conditional, fixing this.
Packit Service a46890
Packit Service a46890
Cc: Rasmus Porsager <rasmus@beat.dk>
Packit Service a46890
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/bytcr-rt5640/HiFi-Components.conf | 28 +++++++++++++++++++++-----
Packit Service a46890
 ucm2/bytcr-rt5640/HiFi-LongName.conf   | 28 +++++++++++++++++++++-----
Packit Service a46890
 ucm2/codecs/rt5640/HeadPhones.conf     | 14 ++++++++++---
Packit Service a46890
 ucm2/codecs/rt5640/HeadsetMic.conf     | 14 ++++++++++---
Packit Service a46890
 4 files changed, 68 insertions(+), 16 deletions(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/bytcr-rt5640/HiFi-Components.conf b/ucm2/bytcr-rt5640/HiFi-Components.conf
Packit Service a46890
index 2ce4f59..a76b42d 100644
Packit Service a46890
--- a/ucm2/bytcr-rt5640/HiFi-Components.conf
Packit Service a46890
+++ b/ucm2/bytcr-rt5640/HiFi-Components.conf
Packit Service a46890
@@ -1,10 +1,16 @@
Packit Service a46890
+Define.HaveSpeaker ""
Packit Service a46890
+Define.HaveInternalMic ""
Packit Service a46890
+
Packit Service a46890
 If.spk {
Packit Service a46890
 	Condition {
Packit Service a46890
 		Type String
Packit Service a46890
 		Haystack "${CardComponents}"
Packit Service a46890
 		Needle "cfg-spk:2"
Packit Service a46890
 	}
Packit Service a46890
-	True.Include.spk.File "/codecs/rt5640/Speaker.conf"
Packit Service a46890
+	True {
Packit Service a46890
+		Include.spk.File "/codecs/rt5640/Speaker.conf"
Packit Service a46890
+		Define.HaveSpeaker "yes"
Packit Service a46890
+	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
 If.mono {
Packit Service a46890
@@ -13,7 +19,10 @@ If.mono {
Packit Service a46890
 		Haystack "${CardComponents}"
Packit Service a46890
 		Needle "cfg-spk:1"
Packit Service a46890
 	}
Packit Service a46890
-	True.Include.mspk.File "/codecs/rt5640/MonoSpeaker.conf"
Packit Service a46890
+	True {
Packit Service a46890
+		Include.mspk.File "/codecs/rt5640/MonoSpeaker.conf"
Packit Service a46890
+		Define.HaveSpeaker "yes"
Packit Service a46890
+	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
 Include.hs.File "/codecs/rt5640/HeadPhones.conf"
Packit Service a46890
@@ -24,7 +33,10 @@ If.dmic1 {
Packit Service a46890
 		Haystack "${CardComponents}"
Packit Service a46890
 		Needle "cfg-mic:dmic1"
Packit Service a46890
 	}
Packit Service a46890
-	True.Include.dmic.File "/codecs/rt5640/DigitalMics.conf"
Packit Service a46890
+	True {
Packit Service a46890
+		Include.dmic.File "/codecs/rt5640/DigitalMics.conf"
Packit Service a46890
+		Define.HaveInternalMic "yes"
Packit Service a46890
+	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
 If.in1 {
Packit Service a46890
@@ -33,7 +45,10 @@ If.in1 {
Packit Service a46890
 		Haystack "${CardComponents}"
Packit Service a46890
 		Needle "cfg-mic:in1"
Packit Service a46890
 	}
Packit Service a46890
-	True.Include.mic1.File "/codecs/rt5640/IN1-InternalMic.conf"
Packit Service a46890
+	True {
Packit Service a46890
+		Include.mic1.File "/codecs/rt5640/IN1-InternalMic.conf"
Packit Service a46890
+		Define.HaveInternalMic "yes"
Packit Service a46890
+	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
 If.in3 {
Packit Service a46890
@@ -42,7 +57,10 @@ If.in3 {
Packit Service a46890
 		Haystack "${CardComponents}"
Packit Service a46890
 		Needle "cfg-mic:in3"
Packit Service a46890
 	}
Packit Service a46890
-	True.Include.mic3.File "/codecs/rt5640/IN3-InternalMic.conf"
Packit Service a46890
+	True {
Packit Service a46890
+		Include.mic3.File "/codecs/rt5640/IN3-InternalMic.conf"
Packit Service a46890
+		Define.HaveInternalMic "yes"
Packit Service a46890
+	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
 Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
Packit Service a46890
diff --git a/ucm2/bytcr-rt5640/HiFi-LongName.conf b/ucm2/bytcr-rt5640/HiFi-LongName.conf
Packit Service a46890
index c07f153..6cb5556 100644
Packit Service a46890
--- a/ucm2/bytcr-rt5640/HiFi-LongName.conf
Packit Service a46890
+++ b/ucm2/bytcr-rt5640/HiFi-LongName.conf
Packit Service a46890
@@ -1,10 +1,16 @@
Packit Service a46890
+Define.HaveSpeaker ""
Packit Service a46890
+Define.HaveInternalMic ""
Packit Service a46890
+
Packit Service a46890
 If.spk {
Packit Service a46890
 	Condition {
Packit Service a46890
 		Type String
Packit Service a46890
 		Haystack "${CardLongName}"
Packit Service a46890
 		Needle "-stereo-spk"
Packit Service a46890
 	}
Packit Service a46890
-	True.Include.spk.File "/codecs/rt5640/Speaker.conf"
Packit Service a46890
+	True {
Packit Service a46890
+		Include.spk.File "/codecs/rt5640/Speaker.conf"
Packit Service a46890
+		Define.HaveSpeaker "yes"
Packit Service a46890
+	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
 If.mono {
Packit Service a46890
@@ -13,7 +19,10 @@ If.mono {
Packit Service a46890
 		Haystack "${CardLongName}"
Packit Service a46890
 		Needle "-mono-spk"
Packit Service a46890
 	}
Packit Service a46890
-	True.Include.mspk.File "/codecs/rt5640/MonoSpeaker.conf"
Packit Service a46890
+	True {
Packit Service a46890
+		Include.mspk.File "/codecs/rt5640/MonoSpeaker.conf"
Packit Service a46890
+		Define.HaveSpeaker "yes"
Packit Service a46890
+	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
 Include.hs.File "/codecs/rt5640/HeadPhones.conf"
Packit Service a46890
@@ -24,7 +33,10 @@ If.dmic1 {
Packit Service a46890
 		Haystack "${CardLongName}"
Packit Service a46890
 		Needle "-dmic1-mic"
Packit Service a46890
 	}
Packit Service a46890
-	True.Include.dmic.File "/codecs/rt5640/DigitalMics.conf"
Packit Service a46890
+	True {
Packit Service a46890
+		Include.dmic.File "/codecs/rt5640/DigitalMics.conf"
Packit Service a46890
+		Define.HaveInternalMic "yes"
Packit Service a46890
+	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
 If.in1 {
Packit Service a46890
@@ -33,7 +45,10 @@ If.in1 {
Packit Service a46890
 		Haystack "${CardLongName}"
Packit Service a46890
 		Needle "-in1-mic"
Packit Service a46890
 	}
Packit Service a46890
-	True.Include.mic1.File "/codecs/rt5640/IN1-InternalMic.conf"
Packit Service a46890
+	True {
Packit Service a46890
+		Include.mic1.File "/codecs/rt5640/IN1-InternalMic.conf"
Packit Service a46890
+		Define.HaveInternalMic "yes"
Packit Service a46890
+	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
 If.in3 {
Packit Service a46890
@@ -42,7 +57,10 @@ If.in3 {
Packit Service a46890
 		Haystack "${CardLongName}"
Packit Service a46890
 		Needle "-in3-mic"
Packit Service a46890
 	}
Packit Service a46890
-	True.Include.mic3.File "/codecs/rt5640/IN3-InternalMic.conf"
Packit Service a46890
+	True {
Packit Service a46890
+		Include.mic3.File "/codecs/rt5640/IN3-InternalMic.conf"
Packit Service a46890
+		Define.HaveInternalMic "yes"
Packit Service a46890
+	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
 Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
Packit Service a46890
diff --git a/ucm2/codecs/rt5640/HeadPhones.conf b/ucm2/codecs/rt5640/HeadPhones.conf
Packit Service a46890
index 42151d6..b7707e5 100644
Packit Service a46890
--- a/ucm2/codecs/rt5640/HeadPhones.conf
Packit Service a46890
+++ b/ucm2/codecs/rt5640/HeadPhones.conf
Packit Service a46890
@@ -1,9 +1,17 @@
Packit Service a46890
 SectionDevice."Headphones" {
Packit Service a46890
 	Comment "Headphones"
Packit Service a46890
 
Packit Service a46890
-	ConflictingDevice [
Packit Service a46890
-		"Speaker"
Packit Service a46890
-	]
Packit Service a46890
+	If.have-spk {
Packit Service a46890
+		Condition {
Packit Service a46890
+			Type String
Packit Service a46890
+			Empty "${var:HaveSpeaker}"
Packit Service a46890
+		}
Packit Service a46890
+		False {
Packit Service a46890
+			ConflictingDevice [
Packit Service a46890
+				"Speaker"
Packit Service a46890
+			]
Packit Service a46890
+		}
Packit Service a46890
+	}
Packit Service a46890
 
Packit Service a46890
 	EnableSequence [
Packit Service a46890
  		cset "name='DAC MIXL INF1 Switch'  on"
Packit Service a46890
diff --git a/ucm2/codecs/rt5640/HeadsetMic.conf b/ucm2/codecs/rt5640/HeadsetMic.conf
Packit Service a46890
index 7a8dfb8..f88b611 100644
Packit Service a46890
--- a/ucm2/codecs/rt5640/HeadsetMic.conf
Packit Service a46890
+++ b/ucm2/codecs/rt5640/HeadsetMic.conf
Packit Service a46890
@@ -1,9 +1,17 @@
Packit Service a46890
 SectionDevice."Headset" {
Packit Service a46890
 	Comment "Headset Microphone"
Packit Service a46890
 
Packit Service a46890
-	ConflictingDevice [
Packit Service a46890
-		"Mic"
Packit Service a46890
-	]
Packit Service a46890
+	If.have-mic {
Packit Service a46890
+		Condition {
Packit Service a46890
+			Type String
Packit Service a46890
+			Empty "${var:HaveInternalMic}"
Packit Service a46890
+		}
Packit Service a46890
+		False {
Packit Service a46890
+			ConflictingDevice [
Packit Service a46890
+				"Mic"
Packit Service a46890
+			]
Packit Service a46890
+		}
Packit Service a46890
+	}
Packit Service a46890
 
Packit Service a46890
 	EnableSequence [
Packit Service a46890
 		cset "name='Headset Mic Switch' on"
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From cd02791e9360bcfa2cd4bed40cf5ddabb378ef93 Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Date: Sat, 9 Jan 2021 22:02:52 +0100
Packit Service a46890
Subject: [PATCH 14/24] rt5640: Move standard DAC setup to EnableSeq.conf
Packit Service a46890
Packit Service a46890
No matter which output is used, we always need to setup the standard
Packit Service a46890
DAC config. Move this to the shared EnableSeq.conf to avoid having
Packit Service a46890
to duplicate it in various places.
Packit Service a46890
Packit Service a46890
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/codecs/rt5640/EnableSeq.conf   | 6 ++++++
Packit Service a46890
 ucm2/codecs/rt5640/HeadPhones.conf  | 6 ------
Packit Service a46890
 ucm2/codecs/rt5640/MonoSpeaker.conf | 6 ------
Packit Service a46890
 ucm2/codecs/rt5640/Speaker.conf     | 6 ------
Packit Service a46890
 4 files changed, 6 insertions(+), 18 deletions(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/codecs/rt5640/EnableSeq.conf b/ucm2/codecs/rt5640/EnableSeq.conf
Packit Service a46890
index cbf4038..145a23b 100644
Packit Service a46890
--- a/ucm2/codecs/rt5640/EnableSeq.conf
Packit Service a46890
+++ b/ucm2/codecs/rt5640/EnableSeq.conf
Packit Service a46890
@@ -1,5 +1,11 @@
Packit Service a46890
 EnableSequence [
Packit Service a46890
 	# RT5640 default output routing
Packit Service a46890
+	cset "name='DAC MIXL INF1 Switch' on"
Packit Service a46890
+	cset "name='DAC MIXR INF1 Switch' on"
Packit Service a46890
+	cset "name='Stereo DAC MIXL DAC L1 Switch' on"
Packit Service a46890
+	cset "name='Stereo DAC MIXR DAC R1 Switch' on"
Packit Service a46890
+	cset "name='Stereo DAC MIXL DAC L2 Switch' on"
Packit Service a46890
+	cset "name='Stereo DAC MIXR DAC R2 Switch' on"
Packit Service a46890
 	cset "name='OUT MIXL DAC L1 Switch'  on"
Packit Service a46890
 	cset "name='OUT MIXR DAC R1 Switch'  on"
Packit Service a46890
 
Packit Service a46890
diff --git a/ucm2/codecs/rt5640/HeadPhones.conf b/ucm2/codecs/rt5640/HeadPhones.conf
Packit Service a46890
index b7707e5..a9e4d20 100644
Packit Service a46890
--- a/ucm2/codecs/rt5640/HeadPhones.conf
Packit Service a46890
+++ b/ucm2/codecs/rt5640/HeadPhones.conf
Packit Service a46890
@@ -14,12 +14,6 @@ SectionDevice."Headphones" {
Packit Service a46890
 	}
Packit Service a46890
 
Packit Service a46890
 	EnableSequence [
Packit Service a46890
- 		cset "name='DAC MIXL INF1 Switch'  on"
Packit Service a46890
- 		cset "name='DAC MIXR INF1 Switch'  on"
Packit Service a46890
- 		cset "name='Stereo DAC MIXL DAC L1 Switch'  on"
Packit Service a46890
- 		cset "name='Stereo DAC MIXR DAC R1 Switch'  on"
Packit Service a46890
-		cset "name='Stereo DAC MIXL DAC L2 Switch'  on"
Packit Service a46890
- 		cset "name='Stereo DAC MIXR DAC R2 Switch'  on"
Packit Service a46890
  		cset "name='HPO MIX HPVOL Switch'  on"
Packit Service a46890
  		cset "name='Headphone Switch'  on"
Packit Service a46890
 		cset "name='HP Channel Switch' on"
Packit Service a46890
diff --git a/ucm2/codecs/rt5640/MonoSpeaker.conf b/ucm2/codecs/rt5640/MonoSpeaker.conf
Packit Service a46890
index ddc7ba8..23cf34c 100644
Packit Service a46890
--- a/ucm2/codecs/rt5640/MonoSpeaker.conf
Packit Service a46890
+++ b/ucm2/codecs/rt5640/MonoSpeaker.conf
Packit Service a46890
@@ -6,12 +6,6 @@ SectionDevice."Speaker" {
Packit Service a46890
 	]
Packit Service a46890
 
Packit Service a46890
 	EnableSequence [
Packit Service a46890
-		cset "name='DAC MIXL INF1 Switch' on"
Packit Service a46890
-		cset "name='DAC MIXR INF1 Switch' on"
Packit Service a46890
-		cset "name='Stereo DAC MIXL DAC L1 Switch' on"
Packit Service a46890
-		cset "name='Stereo DAC MIXR DAC R1 Switch' on"
Packit Service a46890
-		cset "name='Stereo DAC MIXL DAC L2 Switch'  on"
Packit Service a46890
-		cset "name='Stereo DAC MIXR DAC R2 Switch'  on"
Packit Service a46890
 		cset "name='SPK MIXL DAC L1 Switch' on"
Packit Service a46890
 		cset "name='SPK MIXR DAC R1 Switch' on"
Packit Service a46890
 		cset "name='SPOL MIX SPKVOL L Switch' on"
Packit Service a46890
diff --git a/ucm2/codecs/rt5640/Speaker.conf b/ucm2/codecs/rt5640/Speaker.conf
Packit Service a46890
index 411cd13..422cfdf 100644
Packit Service a46890
--- a/ucm2/codecs/rt5640/Speaker.conf
Packit Service a46890
+++ b/ucm2/codecs/rt5640/Speaker.conf
Packit Service a46890
@@ -6,12 +6,6 @@ SectionDevice."Speaker" {
Packit Service a46890
 	]
Packit Service a46890
 
Packit Service a46890
 	EnableSequence [
Packit Service a46890
-		cset "name='DAC MIXL INF1 Switch' on"
Packit Service a46890
-		cset "name='DAC MIXR INF1 Switch' on"
Packit Service a46890
-		cset "name='Stereo DAC MIXL DAC L1 Switch' on"
Packit Service a46890
-		cset "name='Stereo DAC MIXR DAC R1 Switch' on"
Packit Service a46890
-		cset "name='Stereo DAC MIXL DAC L2 Switch'  on"
Packit Service a46890
- 		cset "name='Stereo DAC MIXR DAC R2 Switch'  on"
Packit Service a46890
 		cset "name='SPK MIXL DAC L1 Switch' on"
Packit Service a46890
 		cset "name='SPK MIXR DAC R1 Switch' on"
Packit Service a46890
 		cset "name='SPOL MIX SPKVOL L Switch' on"
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 95587ae8b75134c4bbc2cec0181e5d529826c9c4 Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
Date: Thu, 14 Jan 2021 18:31:24 +0100
Packit Service a46890
Subject: [PATCH 15/24] bytcr-rt5640: fix the execution order
Packit Service a46890
Packit Service a46890
The includes must be run _after_ defines. The Include directives
Packit Service a46890
have precedence. Put everything to If compound.
Packit Service a46890
Packit Service a46890
Fixes: bdd05ac339 ("bytcr-rt5640: Add support for devices without speakers and/or an internal mic")
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/bytcr-rt5640/HiFi-Components.conf | 10 ++++++++--
Packit Service a46890
 ucm2/bytcr-rt5640/HiFi-LongName.conf   | 10 ++++++++--
Packit Service a46890
 2 files changed, 16 insertions(+), 4 deletions(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/bytcr-rt5640/HiFi-Components.conf b/ucm2/bytcr-rt5640/HiFi-Components.conf
Packit Service a46890
index a76b42d..1999717 100644
Packit Service a46890
--- a/ucm2/bytcr-rt5640/HiFi-Components.conf
Packit Service a46890
+++ b/ucm2/bytcr-rt5640/HiFi-Components.conf
Packit Service a46890
@@ -25,7 +25,10 @@ If.mono {
Packit Service a46890
 	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
-Include.hs.File "/codecs/rt5640/HeadPhones.conf"
Packit Service a46890
+If.hp {
Packit Service a46890
+	Condition { Type String Empty "" }
Packit Service a46890
+	True.Include.hs.File "/codecs/rt5640/HeadPhones.conf"
Packit Service a46890
+}
Packit Service a46890
 
Packit Service a46890
 If.dmic1 {
Packit Service a46890
 	Condition {
Packit Service a46890
@@ -63,4 +66,7 @@ If.in3 {
Packit Service a46890
 	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
-Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
Packit Service a46890
+If.hsmic {
Packit Service a46890
+	Condition { Type String Empty "" }
Packit Service a46890
+	True.Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
Packit Service a46890
+}
Packit Service a46890
diff --git a/ucm2/bytcr-rt5640/HiFi-LongName.conf b/ucm2/bytcr-rt5640/HiFi-LongName.conf
Packit Service a46890
index 6cb5556..34acef8 100644
Packit Service a46890
--- a/ucm2/bytcr-rt5640/HiFi-LongName.conf
Packit Service a46890
+++ b/ucm2/bytcr-rt5640/HiFi-LongName.conf
Packit Service a46890
@@ -25,7 +25,10 @@ If.mono {
Packit Service a46890
 	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
-Include.hs.File "/codecs/rt5640/HeadPhones.conf"
Packit Service a46890
+If.hp {
Packit Service a46890
+	Condition { Type String Empty "" }
Packit Service a46890
+	True.Include.hs.File "/codecs/rt5640/HeadPhones.conf"
Packit Service a46890
+}
Packit Service a46890
 
Packit Service a46890
 If.dmic1 {
Packit Service a46890
 	Condition {
Packit Service a46890
@@ -63,4 +66,7 @@ If.in3 {
Packit Service a46890
 	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
-Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
Packit Service a46890
+If.hsmic {
Packit Service a46890
+	Condition { Type String Empty "" }
Packit Service a46890
+	True.Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
Packit Service a46890
+}
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 09e5271401480297c2c9c0b753df9705123a1af1 Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
Date: Thu, 14 Jan 2021 11:03:56 +0100
Packit Service a46890
Subject: [PATCH 16/24] ucm2: add initial configuration for TRX40 Gigabyte
Packit Service a46890
 Aorus Master Audio
Packit Service a46890
Packit Service a46890
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/25
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ...Gigabyte-Aorus-Master-Front-Headphone.conf |  1 +
Packit Service a46890
 ...Gigabyte-Aorus-Master-Main-Audio-HiFi.conf | 61 +++++++++++++++++++
Packit Service a46890
 .../Gigabyte-Aorus-Master-Main-Audio.conf     |  6 ++
Packit Service a46890
 3 files changed, 68 insertions(+)
Packit Service a46890
 create mode 120000 ucm2/USB-Audio/Gigabyte-Aorus-Master-Front-Headphone.conf
Packit Service a46890
 create mode 100644 ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf
Packit Service a46890
 create mode 100644 ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio.conf
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/USB-Audio/Gigabyte-Aorus-Master-Front-Headphone.conf b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Front-Headphone.conf
Packit Service a46890
new file mode 120000
Packit Service a46890
index 0000000..1376437
Packit Service a46890
--- /dev/null
Packit Service a46890
+++ b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Front-Headphone.conf
Packit Service a46890
@@ -0,0 +1 @@
Packit Service a46890
+../module/lib/linked.conf
Packit Service a46890
\ No newline at end of file
Packit Service a46890
diff --git a/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf
Packit Service a46890
new file mode 100644
Packit Service a46890
index 0000000..5c24165
Packit Service a46890
--- /dev/null
Packit Service a46890
+++ b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf
Packit Service a46890
@@ -0,0 +1,61 @@
Packit Service a46890
+Define.SecondaryCardId "$${CardIdByName:Aorus Master Front Headphone}"
Packit Service a46890
+
Packit Service a46890
+SectionDevice."Speaker" {
Packit Service a46890
+	Comment "Speakers"
Packit Service a46890
+	Value {
Packit Service a46890
+	       PlaybackChannels 8
Packit Service a46890
+	       PlaybackPriority 200
Packit Service a46890
+	       PlaybackPCM "hw:${CardId}"
Packit Service a46890
+	       JackControl "Line Out Jack"
Packit Service a46890
+	       PlaybackMixerElem "Line Out"
Packit Service a46890
+	}
Packit Service a46890
+}
Packit Service a46890
+
Packit Service a46890
+SectionDevice."Headphones" {
Packit Service a46890
+	Comment "Front Headphones"
Packit Service a46890
+	Value {
Packit Service a46890
+		PlaybackPriority 300
Packit Service a46890
+		PlaybackPCM "hw:${var:SecondaryCardId}"
Packit Service a46890
+		JackCTL "hw:${var:SecondaryCardId}"
Packit Service a46890
+		JackControl "Headphone - Output Jack"
Packit Service a46890
+	}
Packit Service a46890
+}
Packit Service a46890
+
Packit Service a46890
+SectionDevice."SPDIF" {
Packit Service a46890
+	Comment "S/PDIF Out"
Packit Service a46890
+	Value {
Packit Service a46890
+		PlaybackPriority 100
Packit Service a46890
+		PlaybackPCM "hw:${CardId},1"
Packit Service a46890
+		# PlaybackMixerElem "IEC958"
Packit Service a46890
+	}
Packit Service a46890
+}
Packit Service a46890
+
Packit Service a46890
+SectionDevice."Line" {
Packit Service a46890
+	Comment "Line In"
Packit Service a46890
+	Value {
Packit Service a46890
+		CapturePriority 100
Packit Service a46890
+		CapturePCM "hw:${CardId}"
Packit Service a46890
+		JackControl "Line Jack"
Packit Service a46890
+		CaptureMixerElem "Line"
Packit Service a46890
+	}
Packit Service a46890
+}
Packit Service a46890
+
Packit Service a46890
+SectionDevice."Mic1" {
Packit Service a46890
+	Comment "Microphone"
Packit Service a46890
+	Value {
Packit Service a46890
+		CapturePriority 200
Packit Service a46890
+		CapturePCM "hw:${CardId},1"
Packit Service a46890
+		JackControl "Mic Jack"
Packit Service a46890
+		CaptureMixerElem "Mic"
Packit Service a46890
+	}
Packit Service a46890
+}
Packit Service a46890
+
Packit Service a46890
+SectionDevice."Mic2" {
Packit Service a46890
+	Comment "Front Microphone"
Packit Service a46890
+	Value {
Packit Service a46890
+		CapturePriority 300
Packit Service a46890
+		CapturePCM "hw:${CardId},2"
Packit Service a46890
+		JackControl "Front Mic Jack"
Packit Service a46890
+		CaptureMixerElem "Front Mic"
Packit Service a46890
+	}
Packit Service a46890
+}
Packit Service a46890
diff --git a/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio.conf b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio.conf
Packit Service a46890
new file mode 100644
Packit Service a46890
index 0000000..656b989
Packit Service a46890
--- /dev/null
Packit Service a46890
+++ b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio.conf
Packit Service a46890
@@ -0,0 +1,6 @@
Packit Service a46890
+Syntax 3
Packit Service a46890
+Comment "Gigabyte Aorus Integrated Audio"
Packit Service a46890
+SectionUseCase."HiFi" {
Packit Service a46890
+	File "Gigabyte-Aorus-Master-Main-Audio-HiFi.conf"
Packit Service a46890
+	Comment "Default Alsa Profile"
Packit Service a46890
+}
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 062e4710c524283c5d11cbf99931b24c6d963f98 Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Marijn Suijten <marijns95@gmail.com>
Packit Service a46890
Date: Thu, 14 Jan 2021 14:11:50 +0100
Packit Service a46890
Subject: [PATCH 17/24] USB-Audio/ALC1220: Bump analog Speaker priority over
Packit Service a46890
 S/PDIF
Packit Service a46890
Packit Service a46890
The `S/PDIF` port does not have any jack sensing, and with a priority
Packit Service a46890
higher than the `Speakers` it will always be selected by default instead
Packit Service a46890
of the `Speakers` even if unplugged.
Packit Service a46890
Packit Service a46890
Swapping the priorities around allows analog `Speakers` to be selected
Packit Service a46890
first, _if_ they are plugged in. Otherwise `S/PDIF` is used.
Packit Service a46890
Packit Service a46890
Signed-off-by: Marijn Suijten <marijns95@gmail.com>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf | 4 ++--
Packit Service a46890
 1 file changed, 2 insertions(+), 2 deletions(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf b/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf
Packit Service a46890
index 344db83..cbf7154 100644
Packit Service a46890
--- a/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf
Packit Service a46890
+++ b/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf
Packit Service a46890
@@ -2,7 +2,7 @@ SectionDevice."Speaker" {
Packit Service a46890
 	Comment "Speakers"
Packit Service a46890
 	Value {
Packit Service a46890
 	       PlaybackChannels 8
Packit Service a46890
-	       PlaybackPriority 100
Packit Service a46890
+	       PlaybackPriority 200
Packit Service a46890
 	       PlaybackPCM "hw:${CardId}"
Packit Service a46890
 	       JackControl "Speaker Jack"
Packit Service a46890
 	       PlaybackMixerElem "Speaker"
Packit Service a46890
@@ -22,7 +22,7 @@ SectionDevice."Headphones" {
Packit Service a46890
 SectionDevice."SPDIF" {
Packit Service a46890
 	Comment "S/PDIF Out"
Packit Service a46890
 	Value {
Packit Service a46890
-		PlaybackPriority 200
Packit Service a46890
+		PlaybackPriority 100
Packit Service a46890
 		PlaybackPCM "hw:${CardId},2"
Packit Service a46890
 		PlaybackMixerElem "IEC958"
Packit Service a46890
 	}
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 8e875c9467cc72e53e53104b07d5515f3ef0a779 Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
Date: Fri, 15 Jan 2021 14:03:35 +0100
Packit Service a46890
Subject: [PATCH 18/24] USB-Audio/ALC1220: fix indentation for Speaker device
Packit Service a46890
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf | 10 +++++-----
Packit Service a46890
 1 file changed, 5 insertions(+), 5 deletions(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf b/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf
Packit Service a46890
index cbf7154..0d75384 100644
Packit Service a46890
--- a/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf
Packit Service a46890
+++ b/ucm2/USB-Audio/Realtek-ALC1220-VB-Desktop-HiFi.conf
Packit Service a46890
@@ -1,11 +1,11 @@
Packit Service a46890
 SectionDevice."Speaker" {
Packit Service a46890
 	Comment "Speakers"
Packit Service a46890
 	Value {
Packit Service a46890
-	       PlaybackChannels 8
Packit Service a46890
-	       PlaybackPriority 200
Packit Service a46890
-	       PlaybackPCM "hw:${CardId}"
Packit Service a46890
-	       JackControl "Speaker Jack"
Packit Service a46890
-	       PlaybackMixerElem "Speaker"
Packit Service a46890
+		PlaybackChannels 8
Packit Service a46890
+		PlaybackPriority 200
Packit Service a46890
+		PlaybackPCM "hw:${CardId}"
Packit Service a46890
+		JackControl "Speaker Jack"
Packit Service a46890
+		PlaybackMixerElem "Speaker"
Packit Service a46890
 	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 5503703ab95d5ed40b1da138016777bb5429190e Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
Date: Fri, 15 Jan 2021 14:55:53 +0100
Packit Service a46890
Subject: [PATCH 19/24] USB-Audio: fix indentation in
Packit Service a46890
 Gigabyte-Aorus-Master-Main-Audio-HiFi.conf
Packit Service a46890
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 .../Gigabyte-Aorus-Master-Main-Audio-HiFi.conf         | 10 +++++-----
Packit Service a46890
 1 file changed, 5 insertions(+), 5 deletions(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf
Packit Service a46890
index 5c24165..37800fb 100644
Packit Service a46890
--- a/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf
Packit Service a46890
+++ b/ucm2/USB-Audio/Gigabyte-Aorus-Master-Main-Audio-HiFi.conf
Packit Service a46890
@@ -3,11 +3,11 @@ Define.SecondaryCardId "$${CardIdByName:Aorus Master Front Headphone}"
Packit Service a46890
 SectionDevice."Speaker" {
Packit Service a46890
 	Comment "Speakers"
Packit Service a46890
 	Value {
Packit Service a46890
-	       PlaybackChannels 8
Packit Service a46890
-	       PlaybackPriority 200
Packit Service a46890
-	       PlaybackPCM "hw:${CardId}"
Packit Service a46890
-	       JackControl "Line Out Jack"
Packit Service a46890
-	       PlaybackMixerElem "Line Out"
Packit Service a46890
+		PlaybackChannels 8
Packit Service a46890
+		PlaybackPriority 200
Packit Service a46890
+		PlaybackPCM "hw:${CardId}"
Packit Service a46890
+		JackControl "Line Out Jack"
Packit Service a46890
+		PlaybackMixerElem "Line Out"
Packit Service a46890
 	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From eaa5eacd3e068471537888dee627751dc35e714a Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Date: Wed, 16 Dec 2020 16:38:37 +0100
Packit Service a46890
Subject: [PATCH 20/24] chtnau8824: Add a SST define/variable
Packit Service a46890
Packit Service a46890
Add a SST define which gets set to "yes" when using the SST driver
Packit Service a46890
and to "" when not using the SST driver;
Packit Service a46890
Packit Service a46890
And decide if platforms/bytcr/PlatformEnableSeq.conf should be included
Packit Service a46890
or not based on this.
Packit Service a46890
Packit Service a46890
This is a preparation patch for adding SOF support.
Packit Service a46890
Packit Service a46890
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/chtnau8824/HiFi.conf | 19 +++++++++++++++----
Packit Service a46890
 1 file changed, 15 insertions(+), 4 deletions(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/chtnau8824/HiFi.conf b/ucm2/chtnau8824/HiFi.conf
Packit Service a46890
index 105f360..b36588f 100644
Packit Service a46890
--- a/ucm2/chtnau8824/HiFi.conf
Packit Service a46890
+++ b/ucm2/chtnau8824/HiFi.conf
Packit Service a46890
@@ -1,5 +1,16 @@
Packit Service a46890
 Define.Speaker "Speaker"
Packit Service a46890
 Define.Mic "InternalMic"
Packit Service a46890
+Define.SST "yes"
Packit Service a46890
+
Packit Service a46890
+If.Controls {
Packit Service a46890
+	Condition {
Packit Service a46890
+		Type ControlExists
Packit Service a46890
+		Control "name='media0_in Gain 0 Switch'"
Packit Service a46890
+	}
Packit Service a46890
+	False {
Packit Service a46890
+		Define.SST ""
Packit Service a46890
+	}
Packit Service a46890
+}
Packit Service a46890
 
Packit Service a46890
 If.cfg-mspk {
Packit Service a46890
 	Condition {
Packit Service a46890
@@ -33,12 +44,12 @@ SectionVerb {
Packit Service a46890
 
Packit Service a46890
 	Include.e.File "/codecs/nau8824/EnableSeq.conf"
Packit Service a46890
 
Packit Service a46890
-	If.Controls {
Packit Service a46890
+	If.SST {
Packit Service a46890
 		Condition {
Packit Service a46890
-			Type ControlExists
Packit Service a46890
-			Control "name='media0_in Gain 0 Switch'"
Packit Service a46890
+			Type String
Packit Service a46890
+			Empty "${var:SST}"
Packit Service a46890
 		}
Packit Service a46890
-		True {
Packit Service a46890
+		False {
Packit Service a46890
 			Include.pe {
Packit Service a46890
 				File "/platforms/bytcr/PlatformEnableSeq.conf"
Packit Service a46890
 				Before.EnableSequence "0"
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 4e0369b4fcebde195a38d5b90c73b08f28e0047a Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Takashi Iwai <tiwai@suse.de>
Packit Service a46890
Date: Thu, 21 Jan 2021 11:15:02 +0100
Packit Service a46890
Subject: [PATCH 21/24] kblrt5660: Fix file permissions
Packit Service a46890
Packit Service a46890
The exec bit was set wrongly on those files.  Fix them.
Packit Service a46890
Packit Service a46890
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Packit Service a46890
---
Packit Service a46890
 ucm2/kblrt5660/Hdmi1.conf     | 0
Packit Service a46890
 ucm2/kblrt5660/Hdmi2.conf     | 0
Packit Service a46890
 ucm2/kblrt5660/HiFi.conf      | 0
Packit Service a46890
 ucm2/kblrt5660/kblrt5660.conf | 0
Packit Service a46890
 4 files changed, 0 insertions(+), 0 deletions(-)
Packit Service a46890
 mode change 100755 => 100644 ucm2/kblrt5660/Hdmi1.conf
Packit Service a46890
 mode change 100755 => 100644 ucm2/kblrt5660/Hdmi2.conf
Packit Service a46890
 mode change 100755 => 100644 ucm2/kblrt5660/HiFi.conf
Packit Service a46890
 mode change 100755 => 100644 ucm2/kblrt5660/kblrt5660.conf
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/kblrt5660/Hdmi1.conf b/ucm2/kblrt5660/Hdmi1.conf
Packit Service a46890
old mode 100755
Packit Service a46890
new mode 100644
Packit Service a46890
diff --git a/ucm2/kblrt5660/Hdmi2.conf b/ucm2/kblrt5660/Hdmi2.conf
Packit Service a46890
old mode 100755
Packit Service a46890
new mode 100644
Packit Service a46890
diff --git a/ucm2/kblrt5660/HiFi.conf b/ucm2/kblrt5660/HiFi.conf
Packit Service a46890
old mode 100755
Packit Service a46890
new mode 100644
Packit Service a46890
diff --git a/ucm2/kblrt5660/kblrt5660.conf b/ucm2/kblrt5660/kblrt5660.conf
Packit Service a46890
old mode 100755
Packit Service a46890
new mode 100644
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 96e1c19a6bcc1e353f677966d4d93399204af0ec Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Date: Wed, 16 Dec 2020 16:38:38 +0100
Packit Service a46890
Subject: [PATCH 22/24] chtnau8824: Add support for using the SOF driver
Packit Service a46890
Packit Service a46890
The old (and currently the default) SST driver uses TDM 4 slots 24 bit
Packit Service a46890
as wire format to the codec. Where as the new SOF driver uses standard
Packit Service a46890
I2S 2 channel 24 bit.
Packit Service a46890
Packit Service a46890
Normally this should not impact the UCM settings, but on the NAU8824
Packit Service a46890
the "DAC Right Channel Source" mixer setting must be set to 1 when
Packit Service a46890
using TDM 4 slots and to 0 when using I2S 2 channel mode.
Packit Service a46890
Packit Service a46890
Getting this wrong (in either case) results in the right channel not
Packit Service a46890
outputting any sound.
Packit Service a46890
Packit Service a46890
This commit introduces a RightOutputChannel variable which gets
Packit Service a46890
set to 0/1 depending on the driver and then uses that for the
Packit Service a46890
"DAC Right Channel Source" mixer setting so that we do the right
Packit Service a46890
thing depending on the driver.
Packit Service a46890
Packit Service a46890
This has been tested on the following devices:
Packit Service a46890
Packit Service a46890
Medion E2215T:    Stereo speakers, analog mic
Packit Service a46890
Medion E2228T:    Stereo speakers, stereo digital mics
Packit Service a46890
Cube iWork 8 Air: Mono speaker, analog mic
Packit Service a46890
Packit Service a46890
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/chtnau8824/HiFi.conf          | 2 ++
Packit Service a46890
 ucm2/codecs/nau8824/EnableSeq.conf | 2 +-
Packit Service a46890
 2 files changed, 3 insertions(+), 1 deletion(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/chtnau8824/HiFi.conf b/ucm2/chtnau8824/HiFi.conf
Packit Service a46890
index b36588f..c3d830d 100644
Packit Service a46890
--- a/ucm2/chtnau8824/HiFi.conf
Packit Service a46890
+++ b/ucm2/chtnau8824/HiFi.conf
Packit Service a46890
@@ -1,6 +1,7 @@
Packit Service a46890
 Define.Speaker "Speaker"
Packit Service a46890
 Define.Mic "InternalMic"
Packit Service a46890
 Define.SST "yes"
Packit Service a46890
+Define.RightOutputChannel 1
Packit Service a46890
 
Packit Service a46890
 If.Controls {
Packit Service a46890
 	Condition {
Packit Service a46890
@@ -9,6 +10,7 @@ If.Controls {
Packit Service a46890
 	}
Packit Service a46890
 	False {
Packit Service a46890
 		Define.SST ""
Packit Service a46890
+		Define.RightOutputChannel 0
Packit Service a46890
 	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
diff --git a/ucm2/codecs/nau8824/EnableSeq.conf b/ucm2/codecs/nau8824/EnableSeq.conf
Packit Service a46890
index 3650d06..660856f 100644
Packit Service a46890
--- a/ucm2/codecs/nau8824/EnableSeq.conf
Packit Service a46890
+++ b/ucm2/codecs/nau8824/EnableSeq.conf
Packit Service a46890
@@ -1,7 +1,7 @@
Packit Service a46890
 EnableSequence [
Packit Service a46890
 	# Playback TDM configuration
Packit Service a46890
 	cset "name='DACL Channel Source' 0"
Packit Service a46890
-	cset "name='DACR Channel Source' 1"
Packit Service a46890
+	cset "name='DACR Channel Source' ${var:RightOutputChannel}"
Packit Service a46890
 	# Input Configuration
Packit Service a46890
 	cset "name='DMIC1 Enable Switch' off"
Packit Service a46890
 	cset "name='DMIC2 Enable Switch' off"
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 3bea51c3188257c5bc0eaaed922d1f714e3508c7 Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Packit Service a46890
Date: Thu, 21 Jan 2021 14:38:26 -0600
Packit Service a46890
Subject: [PATCH 23/24] sof-hda-dsp: update handling of cfg-dmics strings
Packit Service a46890
Packit Service a46890
Existing platforms can have 1,2,3 or 4 microphones. The SOF firmware
Packit Service a46890
will generate 2 or 4 channels. Since by default CaptureChannels is 2,
Packit Service a46890
we need to add the case for cfg-dmics = 3.
Packit Service a46890
Packit Service a46890
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/sof-hda-dsp/HiFi.conf | 6 +++---
Packit Service a46890
 1 file changed, 3 insertions(+), 3 deletions(-)
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/sof-hda-dsp/HiFi.conf b/ucm2/sof-hda-dsp/HiFi.conf
Packit Service a46890
index a250331..2c02c15 100644
Packit Service a46890
--- a/ucm2/sof-hda-dsp/HiFi.conf
Packit Service a46890
+++ b/ucm2/sof-hda-dsp/HiFi.conf
Packit Service a46890
@@ -16,9 +16,9 @@ SectionDevice."Mic1" {
Packit Service a46890
 		CapturePCM "hw:${CardId},6"
Packit Service a46890
 		If.chn {
Packit Service a46890
 			Condition {
Packit Service a46890
-				Type String
Packit Service a46890
-				Haystack "${CardComponents}"
Packit Service a46890
-				Needle "cfg-dmics:4"
Packit Service a46890
+				Type RegexMatch
Packit Service a46890
+				Regex "cfg-dmics:[34]"
Packit Service a46890
+				String "${CardComponents}"
Packit Service a46890
 			}
Packit Service a46890
 			True {
Packit Service a46890
 				CaptureChannels 4
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890
Packit Service a46890
Packit Service a46890
From 889c5b9809f1635005d77871bb9abc09df6a3cc3 Mon Sep 17 00:00:00 2001
Packit Service a46890
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Packit Service a46890
Date: Thu, 21 Jan 2021 14:44:05 -0600
Packit Service a46890
Subject: [PATCH 24/24] sof-soundwire: add support for dmics
Packit Service a46890
Packit Service a46890
the pinmux allows for SoundWire to be used on e.g. link0 and link1,
Packit Service a46890
and the rest of the pins can be assigned for dmic usages.
Packit Service a46890
Packit Service a46890
We currently don't track this capability which means users don't see a
Packit Service a46890
capture device, e.g. on HP Spectre x360.
Packit Service a46890
Packit Service a46890
The sof_sdw machine driver was modified to report the cfg-dmics
Packit Service a46890
string, possible values are 0..4.
Packit Service a46890
Packit Service a46890
BugLink: https://github.com/thesofproject/linux/issues/2700
Packit Service a46890
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/75
Packit Service a46890
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Packit Service a46890
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Packit Service a46890
---
Packit Service a46890
 ucm2/sof-soundwire/dmic.conf          | 21 +++++++++++++++++++++
Packit Service a46890
 ucm2/sof-soundwire/sof-soundwire.conf |  5 +++++
Packit Service a46890
 2 files changed, 26 insertions(+)
Packit Service a46890
 create mode 100644 ucm2/sof-soundwire/dmic.conf
Packit Service a46890
Packit Service a46890
diff --git a/ucm2/sof-soundwire/dmic.conf b/ucm2/sof-soundwire/dmic.conf
Packit Service a46890
new file mode 100644
Packit Service a46890
index 0000000..1f704a5
Packit Service a46890
--- /dev/null
Packit Service a46890
+++ b/ucm2/sof-soundwire/dmic.conf
Packit Service a46890
@@ -0,0 +1,21 @@
Packit Service a46890
+SectionDevice."Mic" {
Packit Service a46890
+	Comment "Digital Microphone"
Packit Service a46890
+
Packit Service a46890
+	Value {
Packit Service a46890
+		CapturePriority 100
Packit Service a46890
+		CapturePCM "hw:${CardId},3"
Packit Service a46890
+		If.chn {
Packit Service a46890
+			Condition {
Packit Service a46890
+				Type RegexMatch
Packit Service a46890
+				Regex "[34]"
Packit Service a46890
+				String "${var:Mics1}"
Packit Service a46890
+			}
Packit Service a46890
+			True {
Packit Service a46890
+				CaptureChannels 4
Packit Service a46890
+			}
Packit Service a46890
+		}
Packit Service a46890
+		CaptureMixerElem "Dmic0"
Packit Service a46890
+		CaptureVolume "Dmic0 Capture Volume"
Packit Service a46890
+		CaptureSwitch "Dmic0 Capture Switch"
Packit Service a46890
+	}
Packit Service a46890
+}
Packit Service a46890
diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf
Packit Service a46890
index 2ba44be..ec8b01e 100644
Packit Service a46890
--- a/ucm2/sof-soundwire/sof-soundwire.conf
Packit Service a46890
+++ b/ucm2/sof-soundwire/sof-soundwire.conf
Packit Service a46890
@@ -11,6 +11,7 @@ Define {
Packit Service a46890
 	SpeakerAmps1 "0"
Packit Service a46890
 	HeadsetCodec1 ""
Packit Service a46890
 	MicCodec1 ""
Packit Service a46890
+	Mics1 "0"
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
 DefineRegex {
Packit Service a46890
@@ -34,6 +35,10 @@ DefineRegex {
Packit Service a46890
 		Regex " mic:([a-z0-9]+)"
Packit Service a46890
 		String "${CardComponents}"
Packit Service a46890
 	}
Packit Service a46890
+	Mics {
Packit Service a46890
+		Regex " cfg-mics:([1-9][0-9]*)"
Packit Service a46890
+		String "${CardComponents}"
Packit Service a46890
+	}
Packit Service a46890
 }
Packit Service a46890
 
Packit Service a46890
 If.hs_init {
Packit Service a46890
-- 
Packit Service a46890
2.29.2
Packit Service a46890