All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH alsa-ucm-conf 0/5] bytcr-rt5640: Fixes and improvements
@ 2021-09-29  9:11 Hans de Goede
  2021-09-29  9:11 ` [PATCH alsa-ucm-conf 1/5] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set Hans de Goede
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Hans de Goede @ 2021-09-29  9:11 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Hans de Goede, alsa-devel, Pierre-Louis Bossart, Bard Liao

Hi Jaroslav,

Here is a patch series with 2 bug-fixes for X86 devices with a rt5640
codec (these 2 are a resend) + 3 patches adding support for the second
headset-jack (on the dock) found on the HP elitepad 1000 G2.

The new kernel-bits for the second headset-jack have already landed,
so this is ready for merging.

Regards,

Hans


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH alsa-ucm-conf 1/5] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set
  2021-09-29  9:11 [PATCH alsa-ucm-conf 0/5] bytcr-rt5640: Fixes and improvements Hans de Goede
@ 2021-09-29  9:11 ` Hans de Goede
  2021-09-29  9:11 ` [PATCH alsa-ucm-conf 2/5] codecs/rt5640: Rename DAPM PIN switches to avoid having 2 Speaker and Headphones switches Hans de Goede
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2021-09-29  9:11 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Dmitry Osipenko, Hans de Goede, alsa-devel, Pierre-Louis Bossart,
	Bard Liao

Commit 446d0a71b47f ("codecs/rt5640: Move out BayTrail-specific pin switches")
moved the setting of the 'Headphone Switch' / 'Headset Mic Switch' into
"If.hp" resp "If.hsmic" blocks. But instead of making them part of the
True {} block inside that If, the statements where added add the top-level
of the If {} block where they are no-ops.

Move them to inside the True blocks so that these Switches again get
properly turned on/off. This fixes the Headphones and Headset-mic no longer
working on bytcr-rt5640 devices.

Cc: Dmitry Osipenko <digetx@gmail.com>
Fixes: 446d0a71b47f ("codecs/rt5640: Move out BayTrail-specific pin switches")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 ucm2/bytcr-rt5640/HiFi.conf | 36 ++++++++++++++++++++----------------
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/ucm2/bytcr-rt5640/HiFi.conf b/ucm2/bytcr-rt5640/HiFi.conf
index a5b47df..08127e0 100644
--- a/ucm2/bytcr-rt5640/HiFi.conf
+++ b/ucm2/bytcr-rt5640/HiFi.conf
@@ -100,16 +100,18 @@ If.mono {
 
 If.hp {
 	Condition { Type String Empty "" }
-	True.Include.hs.File "/codecs/rt5640/HeadPhones.conf"
+	True {
+		Include.hs.File "/codecs/rt5640/HeadPhones.conf"
 
-	SectionDevice."Headphones" {
-		EnableSequence [
-			cset "name='Headphone Switch' on"
-		]
+		SectionDevice."Headphones" {
+			EnableSequence [
+				cset "name='Headphone Switch' on"
+			]
 
-		DisableSequence [
-			cset "name='Headphone Switch' off"
-		]
+			DisableSequence [
+				cset "name='Headphone Switch' off"
+			]
+		}
 	}
 }
 
@@ -178,15 +180,17 @@ If.in3 {
 
 If.hsmic {
 	Condition { Type String Empty "" }
-	True.Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
+	True {
+		Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
 
-	SectionDevice."Headset" {
-		EnableSequence [
-			cset "name='Headset Mic Switch' on"
-		]
+		SectionDevice."Headset" {
+			EnableSequence [
+				cset "name='Headset Mic Switch' on"
+			]
 
-		DisableSequence [
-			cset "name='Headset Mic Switch' off"
-		]
+			DisableSequence [
+				cset "name='Headset Mic Switch' off"
+			]
+		}
 	}
 }
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH alsa-ucm-conf 2/5] codecs/rt5640: Rename DAPM PIN switches to avoid having 2 Speaker and Headphones switches
  2021-09-29  9:11 [PATCH alsa-ucm-conf 0/5] bytcr-rt5640: Fixes and improvements Hans de Goede
  2021-09-29  9:11 ` [PATCH alsa-ucm-conf 1/5] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set Hans de Goede
@ 2021-09-29  9:11 ` Hans de Goede
  2021-09-29  9:11 ` [PATCH alsa-ucm-conf 3/5] bytcr-rt5640: Add support for devices using the DMIC2 input for their internal mic(s) Hans de Goede
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2021-09-29  9:11 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Hans de Goede, alsa-devel, Pierre-Louis Bossart, Bard Liao

Now that we rename the mutes from their weird 'Channel Switch' postfix
to the standard 'Playback Switch' postfix we end up having 2 Switches
for the 'Speaker' resp. 'Headphones' volume controls, with 1 of the two
getting ignored by the alsa-lib mixer code because it is duplicate.

This is caused by the bytcr-rt5640 machine driver adding DAPM PIN
Switches which are named 'Headphone Switch' resp. 'Speaker Switch',
rename these to 'Headphone Output Switch' / 'Speaker Output Switch'
so that they get seen as separate controls by the alsa-lib mixer code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 ucm2/codecs/rt5640/init.conf | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ucm2/codecs/rt5640/init.conf b/ucm2/codecs/rt5640/init.conf
index 38baee4..0756b4a 100644
--- a/ucm2/codecs/rt5640/init.conf
+++ b/ucm2/codecs/rt5640/init.conf
@@ -5,8 +5,13 @@ LibraryConfig.remap.Config {
 		"name='IN1 Boost'" "name='IN1 Boost Capture Volume'"
 		"name='IN2 Boost'" "name='IN2 Boost Capture Volume'"
 		"name='IN3 Boost'" "name='IN3 Boost Capture Volume'"
+		# Rename the 'Headphone Switch' DAPM PIN switch to avoid it getting
+		# grouped with 'Headphone Playback Volume'
+		"name='Headphone Switch'" "name='Headphone Output Switch'"
 		"name='HP Playback Volume'" "name='Headphone Playback Volume'"
 		"name='HP Channel Switch'" "name='Headphone Playback Switch'"
+		# Idem for the 'Speaker Switch'
+		"name='Speaker Switch'" "name='Speaker Output Switch'"
 		"name='Speaker Channel Switch'" "name='Speaker Playback Switch'"
 	}
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH alsa-ucm-conf 3/5] bytcr-rt5640: Add support for devices using the DMIC2 input for their internal mic(s)
  2021-09-29  9:11 [PATCH alsa-ucm-conf 0/5] bytcr-rt5640: Fixes and improvements Hans de Goede
  2021-09-29  9:11 ` [PATCH alsa-ucm-conf 1/5] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set Hans de Goede
  2021-09-29  9:11 ` [PATCH alsa-ucm-conf 2/5] codecs/rt5640: Rename DAPM PIN switches to avoid having 2 Speaker and Headphones switches Hans de Goede
@ 2021-09-29  9:11 ` Hans de Goede
  2021-09-29  9:11 ` [PATCH alsa-ucm-conf 4/5] bytcr-rt5640: Add support for a second headphones output Hans de Goede
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2021-09-29  9:11 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Dmitry Osipenko, Hans de Goede, alsa-devel, Pierre-Louis Bossart,
	Bard Liao

Add support for devices using the DMIC2 input for their internal mic(s),
this has been tested on a HP Elitepad 1000 G2.

Cc: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 ucm2/Tegra/rt5640/Google-Nexus-7-HiFi.conf |  3 ++-
 ucm2/bytcr-rt5640/HiFi-Components.conf     | 17 ++++++++++++++++-
 ucm2/bytcr-rt5640/HiFi-LongName.conf       |  5 ++++-
 ucm2/bytcr-rt5640/HiFi.conf                |  5 +++--
 ucm2/codecs/rt5640/DigitalMics.conf        |  1 +
 ucm2/codecs/rt5640/EnableSeq.conf          |  1 -
 6 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/ucm2/Tegra/rt5640/Google-Nexus-7-HiFi.conf b/ucm2/Tegra/rt5640/Google-Nexus-7-HiFi.conf
index 8156006..0cc5f4c 100644
--- a/ucm2/Tegra/rt5640/Google-Nexus-7-HiFi.conf
+++ b/ucm2/Tegra/rt5640/Google-Nexus-7-HiFi.conf
@@ -3,7 +3,8 @@
 Define.HaveAif "1"
 Define.HaveSpeaker "2"
 Define.HaveHeadsetMic ""
-Define.HaveInternalMic "dmic1"
+Define.HaveInternalMic "dmic"
+Define.StereoADC2Mux "DMIC1"
 
 Include.hp.File "/codecs/rt5640/HeadPhones.conf"
 Include.mspk.File "/codecs/rt5640/Speaker.conf"
diff --git a/ucm2/bytcr-rt5640/HiFi-Components.conf b/ucm2/bytcr-rt5640/HiFi-Components.conf
index 729b2b6..39c7f36 100644
--- a/ucm2/bytcr-rt5640/HiFi-Components.conf
+++ b/ucm2/bytcr-rt5640/HiFi-Components.conf
@@ -22,7 +22,22 @@ If.dmic1 {
 		Haystack "${CardComponents}"
 		Needle "cfg-mic:dmic1"
 	}
-	True.Define.HaveInternalMic "dmic1"
+	True {
+		Define.HaveInternalMic "dmic"
+		Define.StereoADC2Mux "DMIC1"
+	}
+}
+
+If.dmic2 {
+	Condition {
+		Type String
+		Haystack "${CardComponents}"
+		Needle "cfg-mic:dmic2"
+	}
+	True {
+		Define.HaveInternalMic "dmic"
+		Define.StereoADC2Mux "DMIC2"
+	}
 }
 
 If.in1 {
diff --git a/ucm2/bytcr-rt5640/HiFi-LongName.conf b/ucm2/bytcr-rt5640/HiFi-LongName.conf
index 7af2d4a..b2fb471 100644
--- a/ucm2/bytcr-rt5640/HiFi-LongName.conf
+++ b/ucm2/bytcr-rt5640/HiFi-LongName.conf
@@ -22,7 +22,10 @@ If.dmic1 {
 		Haystack "${CardLongName}"
 		Needle "-dmic1-mic"
 	}
-	True.Define.HaveInternalMic "dmic1"
+	True {
+		Define.HaveInternalMic "dmic"
+		Define.StereoADC2Mux "DMIC1"
+	}
 }
 
 If.in1 {
diff --git a/ucm2/bytcr-rt5640/HiFi.conf b/ucm2/bytcr-rt5640/HiFi.conf
index 08127e0..604e7d9 100644
--- a/ucm2/bytcr-rt5640/HiFi.conf
+++ b/ucm2/bytcr-rt5640/HiFi.conf
@@ -4,6 +4,7 @@ Define.HaveAif ""
 Define.HaveSpeaker ""
 Define.HaveInternalMic ""
 Define.HaveHeadsetMic "yes"
+Define.StereoADC2Mux "DMIC1"
 
 If.DefineAif1 {
 	Condition {
@@ -115,11 +116,11 @@ If.hp {
 	}
 }
 
-If.dmic1 {
+If.dmic {
 	Condition {
 		Type String
 		Haystack "${var:HaveInternalMic}"
-		Needle "dmic1"
+		Needle "dmic"
 	}
 	True {
 		Include.dmic.File "/codecs/rt5640/DigitalMics.conf"
diff --git a/ucm2/codecs/rt5640/DigitalMics.conf b/ucm2/codecs/rt5640/DigitalMics.conf
index b4d01ae..188df0a 100644
--- a/ucm2/codecs/rt5640/DigitalMics.conf
+++ b/ucm2/codecs/rt5640/DigitalMics.conf
@@ -14,6 +14,7 @@ SectionDevice."Mic" {
 	}
 
 	EnableSequence [
+		cset "name='Stereo ADC2 Mux' ${var:StereoADC2Mux}"
 		cset "name='Mono ADC MIXL ADC2 Switch' on"
 		cset "name='Mono ADC MIXR ADC2 Switch' on"
 		cset "name='Stereo ADC MIXL ADC2 Switch' on"
diff --git a/ucm2/codecs/rt5640/EnableSeq.conf b/ucm2/codecs/rt5640/EnableSeq.conf
index 4e9a6c0..d9d536c 100644
--- a/ucm2/codecs/rt5640/EnableSeq.conf
+++ b/ucm2/codecs/rt5640/EnableSeq.conf
@@ -30,7 +30,6 @@ EnableSequence [
 
 	# Input Configuration
 	cset "name='Stereo ADC1 Mux' ADC"
-	cset "name='Stereo ADC2 Mux' DMIC1"
 	cset "name='ADC Capture Switch' on"
 
 	cset "name='Mono ADC L1 Mux' ADCL"
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH alsa-ucm-conf 4/5] bytcr-rt5640: Add support for a second headphones output
  2021-09-29  9:11 [PATCH alsa-ucm-conf 0/5] bytcr-rt5640: Fixes and improvements Hans de Goede
                   ` (2 preceding siblings ...)
  2021-09-29  9:11 ` [PATCH alsa-ucm-conf 3/5] bytcr-rt5640: Add support for devices using the DMIC2 input for their internal mic(s) Hans de Goede
@ 2021-09-29  9:11 ` Hans de Goede
  2021-09-29  9:11 ` [PATCH alsa-ucm-conf 5/5] bytcr-rt5640: Add support for a second headset input Hans de Goede
  2021-09-29 10:58 ` [PATCH alsa-ucm-conf 0/5] bytcr-rt5640: Fixes and improvements Jaroslav Kysela
  5 siblings, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2021-09-29  9:11 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Hans de Goede, alsa-devel, Pierre-Louis Bossart, Bard Liao

Some devices (HP Elitepad 1000 G2) have a second headphones output
(1 on the dock, 2nd on the tablet itself) which is implemented through
the line-out output of the codec combined with an external hp-amp.

The kernel has recently gotten support for this setup and will
advertise this to userspace by adding cfg-hp2:lineout to the
components string, add support for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 ucm2/bytcr-rt5640/HiFi-Components.conf |  9 +++++
 ucm2/bytcr-rt5640/HiFi.conf            | 18 ++++++++++
 ucm2/codecs/rt5640/HeadPhones2.conf    | 46 ++++++++++++++++++++++++++
 3 files changed, 73 insertions(+)
 create mode 100644 ucm2/codecs/rt5640/HeadPhones2.conf

diff --git a/ucm2/bytcr-rt5640/HiFi-Components.conf b/ucm2/bytcr-rt5640/HiFi-Components.conf
index 39c7f36..3f941ac 100644
--- a/ucm2/bytcr-rt5640/HiFi-Components.conf
+++ b/ucm2/bytcr-rt5640/HiFi-Components.conf
@@ -16,6 +16,15 @@ If.mono {
 	True.Define.HaveSpeaker "1"
 }
 
+If.hp2 {
+	Condition {
+		Type String
+		Haystack "${CardComponents}"
+		Needle "cfg-hp2:lineout"
+	}
+	True.Define.HaveHeadPhones2 "yes"
+}
+
 If.dmic1 {
 	Condition {
 		Type String
diff --git a/ucm2/bytcr-rt5640/HiFi.conf b/ucm2/bytcr-rt5640/HiFi.conf
index 604e7d9..2e099bd 100644
--- a/ucm2/bytcr-rt5640/HiFi.conf
+++ b/ucm2/bytcr-rt5640/HiFi.conf
@@ -2,6 +2,7 @@
 
 Define.HaveAif ""
 Define.HaveSpeaker ""
+Define.HaveHeadPhones2 ""
 Define.HaveInternalMic ""
 Define.HaveHeadsetMic "yes"
 Define.StereoADC2Mux "DMIC1"
@@ -116,6 +117,23 @@ If.hp {
 	}
 }
 
+If.hp2 {
+	Condition { Type String Empty "${var:HaveHeadPhones2}" }
+	False {
+		Include.hs.File "/codecs/rt5640/HeadPhones2.conf"
+
+		SectionDevice."Headphones2" {
+			EnableSequence [
+				cset "name='Line Out Switch' on"
+			]
+
+			DisableSequence [
+				cset "name='Line Out Switch' off"
+			]
+		}
+	}
+}
+
 If.dmic {
 	Condition {
 		Type String
diff --git a/ucm2/codecs/rt5640/HeadPhones2.conf b/ucm2/codecs/rt5640/HeadPhones2.conf
new file mode 100644
index 0000000..b75e420
--- /dev/null
+++ b/ucm2/codecs/rt5640/HeadPhones2.conf
@@ -0,0 +1,46 @@
+# The 2nd headset jack uses lineout with an external HP-amp
+
+SectionDevice."Headphones2" {
+	Comment "Headphones 2"
+
+	ConflictingDevice [
+		"Speaker"
+		"Headphones"
+	]
+
+	EnableSequence [
+		cset "name='LOUT MIX OUTVOL L Switch' on"
+		cset "name='LOUT MIX OUTVOL R Switch' on"
+		cset "name='OUT Channel Switch' on"
+	]
+
+	DisableSequence [
+		cset "name='LOUT MIX OUTVOL L Switch' off"
+		cset "name='LOUT MIX OUTVOL R Switch' off"
+		cset "name='OUT Channel Switch' off"
+	]
+
+	Value {
+		PlaybackPriority 400
+		PlaybackPCM "hw:${CardId}"
+		JackControl "Line Out Jack"
+		PlaybackMixerElem "OUT"
+		PlaybackVolume "OUT Playback Volume"
+		If.HpAif1 {
+			Condition {
+				Type String
+				String1 "${var:HaveAif}"
+				String2 "1"
+			}
+			True.PlaybackMasterElem "DAC1"
+		}
+		If.HpAif2 {
+			Condition {
+				Type String
+				String1 "${var:HaveAif}"
+				String2 "2"
+			}
+			True.PlaybackMasterElem "DAC2"
+		}
+	}
+}
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH alsa-ucm-conf 5/5] bytcr-rt5640: Add support for a second headset input
  2021-09-29  9:11 [PATCH alsa-ucm-conf 0/5] bytcr-rt5640: Fixes and improvements Hans de Goede
                   ` (3 preceding siblings ...)
  2021-09-29  9:11 ` [PATCH alsa-ucm-conf 4/5] bytcr-rt5640: Add support for a second headphones output Hans de Goede
@ 2021-09-29  9:11 ` Hans de Goede
  2021-09-29 10:58 ` [PATCH alsa-ucm-conf 0/5] bytcr-rt5640: Fixes and improvements Jaroslav Kysela
  5 siblings, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2021-09-29  9:11 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Hans de Goede, alsa-devel, Pierre-Louis Bossart, Bard Liao

Some devices (HP Elitepad 1000 G2) have a second headphones output
(1 on the dock, 2nd on the tablet itself) the headset mic input of
this second headset is connected to IN1, add support for this.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213415
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 ucm2/bytcr-rt5640/HiFi-Components.conf  |  9 +++++
 ucm2/bytcr-rt5640/HiFi.conf             | 22 +++++++++++
 ucm2/codecs/rt5640/HeadsetMic2-IN1.conf | 52 +++++++++++++++++++++++++
 3 files changed, 83 insertions(+)
 create mode 100644 ucm2/codecs/rt5640/HeadsetMic2-IN1.conf

diff --git a/ucm2/bytcr-rt5640/HiFi-Components.conf b/ucm2/bytcr-rt5640/HiFi-Components.conf
index 3f941ac..ae5fd05 100644
--- a/ucm2/bytcr-rt5640/HiFi-Components.conf
+++ b/ucm2/bytcr-rt5640/HiFi-Components.conf
@@ -66,3 +66,12 @@ If.in3 {
 	}
 	True.Define.HaveInternalMic "in3"
 }
+
+If.hs2 {
+	Condition {
+		Type String
+		Haystack "${CardComponents}"
+		Needle "cfg-hs2:in1"
+	}
+	True.Define.HaveHeadsetMic2 "in1"
+}
diff --git a/ucm2/bytcr-rt5640/HiFi.conf b/ucm2/bytcr-rt5640/HiFi.conf
index 2e099bd..f758507 100644
--- a/ucm2/bytcr-rt5640/HiFi.conf
+++ b/ucm2/bytcr-rt5640/HiFi.conf
@@ -5,6 +5,7 @@ Define.HaveSpeaker ""
 Define.HaveHeadPhones2 ""
 Define.HaveInternalMic ""
 Define.HaveHeadsetMic "yes"
+Define.HaveHeadsetMic2 ""
 Define.StereoADC2Mux "DMIC1"
 
 If.DefineAif1 {
@@ -213,3 +214,24 @@ If.hsmic {
 		}
 	}
 }
+
+If.hsmic2 {
+	Condition {
+		Type String
+		Haystack "${var:HaveHeadsetMic2}"
+		Needle "in1"
+	}
+	True {
+		Include.hsmic.File "/codecs/rt5640/HeadsetMic2-IN1.conf"
+
+		SectionDevice."Headset2" {
+			EnableSequence [
+				cset "name='Headset Mic 2 Switch' on"
+			]
+
+			DisableSequence [
+				cset "name='Headset Mic 2 Switch' off"
+			]
+		}
+	}
+}
diff --git a/ucm2/codecs/rt5640/HeadsetMic2-IN1.conf b/ucm2/codecs/rt5640/HeadsetMic2-IN1.conf
new file mode 100644
index 0000000..ff05f82
--- /dev/null
+++ b/ucm2/codecs/rt5640/HeadsetMic2-IN1.conf
@@ -0,0 +1,52 @@
+SectionDevice."Headset2" {
+	Comment "Headset Microphone 2"
+
+	ConflictingDevice [
+		"Mic"
+		"Headset"
+	]
+
+	EnableSequence [
+		cset "name='RECMIXL BST1 Switch' on"
+		cset "name='RECMIXR BST1 Switch' on"
+
+		cset "name='Stereo ADC MIXL ADC1 Switch' on"
+		cset "name='Stereo ADC MIXR ADC1 Switch' on"
+		cset "name='Mono ADC MIXL ADC1 Switch' on"
+		cset "name='Mono ADC MIXR ADC1 Switch' on"
+	]
+
+	DisableSequence [
+		cset "name='Stereo ADC MIXL ADC1 Switch' off"
+		cset "name='Stereo ADC MIXR ADC1 Switch' off"
+		cset "name='Mono ADC MIXL ADC1 Switch' off"
+		cset "name='Mono ADC MIXR ADC1 Switch' off"
+
+		cset "name='RECMIXL BST1 Switch' off"
+		cset "name='RECMIXR BST1 Switch' off"
+	]
+
+	Value {
+		CapturePriority 300
+		CapturePCM "hw:${CardId}"
+		JackControl "Headset Mic 2 Jack"
+		CaptureMixerElem "IN1 Boost"
+		CaptureVolume "IN1 Boost"
+		If.In1Aif1 {
+			Condition {
+				Type String
+				String1 "${var:HaveAif}"
+				String2 "1"
+			}
+			True.CaptureMasterElem "ADC"
+		}
+		If.In1Aif2 {
+			Condition {
+				Type String
+				String1 "${var:HaveAif}"
+				String2 "2"
+			}
+			True.CaptureMasterElem "Mono ADC"
+		}
+	}
+}
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH alsa-ucm-conf 0/5] bytcr-rt5640: Fixes and improvements
  2021-09-29  9:11 [PATCH alsa-ucm-conf 0/5] bytcr-rt5640: Fixes and improvements Hans de Goede
                   ` (4 preceding siblings ...)
  2021-09-29  9:11 ` [PATCH alsa-ucm-conf 5/5] bytcr-rt5640: Add support for a second headset input Hans de Goede
@ 2021-09-29 10:58 ` Jaroslav Kysela
  5 siblings, 0 replies; 7+ messages in thread
From: Jaroslav Kysela @ 2021-09-29 10:58 UTC (permalink / raw)
  To: Hans de Goede; +Cc: alsa-devel, Pierre-Louis Bossart, Bard Liao

On 29. 09. 21 11:11, Hans de Goede wrote:
> Hi Jaroslav,
> 
> Here is a patch series with 2 bug-fixes for X86 devices with a rt5640
> codec (these 2 are a resend) + 3 patches adding support for the second
> headset-jack (on the dock) found on the HP elitepad 1000 G2.
> 
> The new kernel-bits for the second headset-jack have already landed,
> so this is ready for merging.

Thank you for this update and your work. I applied all patches to the 
alsa-ucm-conf repo.

					Jaroslav

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-29 10:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29  9:11 [PATCH alsa-ucm-conf 0/5] bytcr-rt5640: Fixes and improvements Hans de Goede
2021-09-29  9:11 ` [PATCH alsa-ucm-conf 1/5] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set Hans de Goede
2021-09-29  9:11 ` [PATCH alsa-ucm-conf 2/5] codecs/rt5640: Rename DAPM PIN switches to avoid having 2 Speaker and Headphones switches Hans de Goede
2021-09-29  9:11 ` [PATCH alsa-ucm-conf 3/5] bytcr-rt5640: Add support for devices using the DMIC2 input for their internal mic(s) Hans de Goede
2021-09-29  9:11 ` [PATCH alsa-ucm-conf 4/5] bytcr-rt5640: Add support for a second headphones output Hans de Goede
2021-09-29  9:11 ` [PATCH alsa-ucm-conf 5/5] bytcr-rt5640: Add support for a second headset input Hans de Goede
2021-09-29 10:58 ` [PATCH alsa-ucm-conf 0/5] bytcr-rt5640: Fixes and improvements Jaroslav Kysela

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.