[PATCH alsa-ucm-conf 3/5] bytcr-rt5640: Add support for devices using the DMIC2 input for their internal mic(s)
Hans de Goede
hdegoede at redhat.com
Wed Sep 29 11:11:42 CEST 2021
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 at gmail.com>
Signed-off-by: Hans de Goede <hdegoede at 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
More information about the Alsa-devel
mailing list