alsa-ucm-conf/0006-chtnau8824-Add-support-for-laptops-using-stereo-DMIC.patch
Takashi Iwai cea7e1aaaa Accepting request 855782 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes: AMD MCP mute issue, chtnau8824 fixes,
  rt715 fix, and soundwire initialization fix:
  0004-Revert-ucm2-HDA-acp-add-Capture-simple-mixer-element.patch
  0005-chtnau8824-Fix-mono-speaker-config-not-working.patch
  0006-chtnau8824-Add-support-for-laptops-using-stereo-DMIC.patch
  0007-chtnau8824-Boost-analog-mic-volumes-a-bit.patch
  0008-rt715-init-setup-ADC07-to-a-proper-volume.patch
  0009-sof-hda-dsp-Set-Master-Playback-Switch-on-in-the-Boo.patch

OBS-URL: https://build.opensuse.org/request/show/855782
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-ucm-conf?expand=0&rev=25
2020-12-14 15:51:13 +00:00

95 lines
2.3 KiB
Diff

From 7db718571440b13045ebb3150a71745033ff5c0c Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Sun, 6 Dec 2020 13:47:17 +0100
Subject: [PATCH 6/9] chtnau8824: Add support for laptops using stereo DMICs
The Medion E2228T uses a NAU8824 codec combined with stereo
DMICs, add support for this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
ucm2/chtnau8824/HiFi.conf | 16 +++++++++++++++-
ucm2/codecs/nau8824/DMIC1_2.conf | 30 ++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 1 deletion(-)
create mode 100644 ucm2/codecs/nau8824/DMIC1_2.conf
diff --git a/ucm2/chtnau8824/HiFi.conf b/ucm2/chtnau8824/HiFi.conf
index d7a5f63f9774..105f36078d38 100644
--- a/ucm2/chtnau8824/HiFi.conf
+++ b/ucm2/chtnau8824/HiFi.conf
@@ -1,4 +1,5 @@
Define.Speaker "Speaker"
+Define.Mic "InternalMic"
If.cfg-mspk {
Condition {
@@ -11,6 +12,19 @@ If.cfg-mspk {
}
}
+If.cfg-mic {
+ Condition {
+ Type RegexMatch
+ String "${CardLongName}"
+ # Medion E22??T models put DMIC in their product version
+ # when using DMICs
+ Regex "(MEDION-E22..T.*-DMIC-)"
+ }
+ True {
+ Define.Mic "DMIC1_2"
+ }
+}
+
SectionVerb {
Value {
@@ -42,7 +56,7 @@ If.cfg-includes {
Include.spk.File "/codecs/nau8824/${var:Speaker}.conf"
Include.hp.File "/codecs/nau8824/HeadPhones.conf"
- Include.mic.File "/codecs/nau8824/InternalMic.conf"
+ Include.mic.File "/codecs/nau8824/${var:Mic}.conf"
Include.hsmic.File "/codecs/nau8824/HeadsetMic.conf"
}
}
diff --git a/ucm2/codecs/nau8824/DMIC1_2.conf b/ucm2/codecs/nau8824/DMIC1_2.conf
new file mode 100644
index 000000000000..f54f6718676f
--- /dev/null
+++ b/ucm2/codecs/nau8824/DMIC1_2.conf
@@ -0,0 +1,30 @@
+# Stereo DMICs on the DMIC1 and DMIC2 inputs
+
+SectionDevice."Mic" {
+ Comment "Internal Digital Microphones"
+
+ Value {
+ CapturePriority 200
+ CapturePCM "hw:${CardId}"
+ }
+
+ ConflictingDevice [
+ "Headset"
+ ]
+
+ EnableSequence [
+ # Note needs to be swapped / swap is deliberate!
+ cset "name='ADC CH0 Select' 1"
+ cset "name='ADC CH1 Select' 0"
+
+ cset "name='Int Mic Switch' on"
+ cset "name='DMIC1 Enable Switch' on"
+ cset "name='DMIC2 Enable Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Int Mic Switch' off"
+ cset "name='DMIC1 Enable Switch' off"
+ cset "name='DMIC2 Enable Switch' off"
+ ]
+}
--
2.26.2