diff --git a/0004-Revert-ucm2-HDA-acp-add-Capture-simple-mixer-element.patch b/0004-Revert-ucm2-HDA-acp-add-Capture-simple-mixer-element.patch new file mode 100644 index 0000000..d0d7d4c --- /dev/null +++ b/0004-Revert-ucm2-HDA-acp-add-Capture-simple-mixer-element.patch @@ -0,0 +1,32 @@ +From 6889736b917eed89c4d775824efd8655400e27e3 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Mon, 7 Dec 2020 09:33:30 +0100 +Subject: [PATCH 4/9] Revert "ucm2: HDA/acp - add Capture simple mixer element + to the ACP Mic device" + +This reverts commit 3320b1ac804595d6c145c1ad7af85917182a3c98. + +This solution does not work. The mute state is shared between +the HDA and AMD ACP in PA, so it may cause the security issue, if +the users do not set the mute manually. + +BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/64 +Signed-off-by: Jaroslav Kysela +--- + ucm2/HDA-Intel/HiFi-acp.conf | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/ucm2/HDA-Intel/HiFi-acp.conf b/ucm2/HDA-Intel/HiFi-acp.conf +index 15eeca527907..123ae15f0406 100644 +--- a/ucm2/HDA-Intel/HiFi-acp.conf ++++ b/ucm2/HDA-Intel/HiFi-acp.conf +@@ -4,6 +4,5 @@ SectionDevice."Mic1" { + Value { + CapturePriority 100 + CapturePCM "hw:${var:AcpCardId}" +- CaptureMixerElem "Capture" + } + } +-- +2.26.2 + diff --git a/0005-chtnau8824-Fix-mono-speaker-config-not-working.patch b/0005-chtnau8824-Fix-mono-speaker-config-not-working.patch new file mode 100644 index 0000000..51effa9 --- /dev/null +++ b/0005-chtnau8824-Fix-mono-speaker-config-not-working.patch @@ -0,0 +1,42 @@ +From 13420f94a6858e9c3e3a056a7987d9c0db823394 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sun, 6 Dec 2020 13:47:16 +0100 +Subject: [PATCH 5/9] chtnau8824: Fix mono speaker config not working + +Fix the Speaker define / var being changed from "Speaker" to "MonoSpeaker" +not having any effect because the variable gets expanded before the if +making the change is interpreted. + +Signed-off-by: Hans de Goede +Signed-off-by: Jaroslav Kysela +--- + ucm2/chtnau8824/HiFi.conf | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/ucm2/chtnau8824/HiFi.conf b/ucm2/chtnau8824/HiFi.conf +index 3ccd6b149517..d7a5f63f9774 100644 +--- a/ucm2/chtnau8824/HiFi.conf ++++ b/ucm2/chtnau8824/HiFi.conf +@@ -34,8 +34,15 @@ SectionVerb { + } + } + +-Include.spk.File "/codecs/nau8824/${var:Speaker}.conf" +-Include.hp.File "/codecs/nau8824/HeadPhones.conf" ++# The includes using $vars in there path must be conditional otherwise the ++# $var gets expanded before the other If-s above can change the vars. ++If.cfg-includes { ++ Condition { Type String Empty "" } ++ True { ++ Include.spk.File "/codecs/nau8824/${var:Speaker}.conf" ++ Include.hp.File "/codecs/nau8824/HeadPhones.conf" + +-Include.mic.File "/codecs/nau8824/InternalMic.conf" +-Include.hsmic.File "/codecs/nau8824/HeadsetMic.conf" ++ Include.mic.File "/codecs/nau8824/InternalMic.conf" ++ Include.hsmic.File "/codecs/nau8824/HeadsetMic.conf" ++ } ++} +-- +2.26.2 + diff --git a/0006-chtnau8824-Add-support-for-laptops-using-stereo-DMIC.patch b/0006-chtnau8824-Add-support-for-laptops-using-stereo-DMIC.patch new file mode 100644 index 0000000..96ea124 --- /dev/null +++ b/0006-chtnau8824-Add-support-for-laptops-using-stereo-DMIC.patch @@ -0,0 +1,94 @@ +From 7db718571440b13045ebb3150a71745033ff5c0c Mon Sep 17 00:00:00 2001 +From: Hans de Goede +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 +Signed-off-by: Jaroslav Kysela +--- + 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 + diff --git a/0007-chtnau8824-Boost-analog-mic-volumes-a-bit.patch b/0007-chtnau8824-Boost-analog-mic-volumes-a-bit.patch new file mode 100644 index 0000000..6fe14ed --- /dev/null +++ b/0007-chtnau8824-Boost-analog-mic-volumes-a-bit.patch @@ -0,0 +1,32 @@ +From dacfe2fc7b41b800f4f379ce4b1722462b97cab2 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sun, 6 Dec 2020 13:47:18 +0100 +Subject: [PATCH 7/9] chtnau8824: Boost analog mic volumes a bit + +Both Mic1 (internal analog mic) and Mic2 (headset mic) are a bit soft +with the current settings, boost their volumes a bit. + +Signed-off-by: Hans de Goede +Signed-off-by: Jaroslav Kysela +--- + ucm2/codecs/nau8824/EnableSeq.conf | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ucm2/codecs/nau8824/EnableSeq.conf b/ucm2/codecs/nau8824/EnableSeq.conf +index 433e8e283d4b..3650d06485b4 100644 +--- a/ucm2/codecs/nau8824/EnableSeq.conf ++++ b/ucm2/codecs/nau8824/EnableSeq.conf +@@ -7,8 +7,8 @@ EnableSequence [ + cset "name='DMIC2 Enable Switch' off" + cset "name='DMIC3 Enable Switch' off" + cset "name='DMIC4 Enable Switch' off" +- cset "name='MIC1 Volume' 10" +- cset "name='MIC2 Volume' 10" ++ cset "name='MIC1 Volume' 14" ++ cset "name='MIC2 Volume' 14" + # Button Configuration + cset "name='THD for key media' 10" + cset "name='THD for key voice command' 16" +-- +2.26.2 + diff --git a/0008-rt715-init-setup-ADC07-to-a-proper-volume.patch b/0008-rt715-init-setup-ADC07-to-a-proper-volume.patch new file mode 100644 index 0000000..22743ee --- /dev/null +++ b/0008-rt715-init-setup-ADC07-to-a-proper-volume.patch @@ -0,0 +1,26 @@ +From 263bd26b1216c933db3d216197a78678d0f8610e Mon Sep 17 00:00:00 2001 +From: Libin Yang +Date: Thu, 19 Nov 2020 20:01:30 +0800 +Subject: [PATCH 8/9] rt715: init: setup ADC07 to a proper volume + +This patch initiates 'rt715 ADC 07 Capture Volume' to a proper volume. + +Signed-off-by: Libin Yang +Signed-off-by: Jaroslav Kysela +--- + ucm2/codecs/rt715/init.conf | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/ucm2/codecs/rt715/init.conf b/ucm2/codecs/rt715/init.conf +index 6e07b2df5a79..15a05714d1aa 100644 +--- a/ucm2/codecs/rt715/init.conf ++++ b/ucm2/codecs/rt715/init.conf +@@ -7,4 +7,5 @@ BootSequence [ + cset "name='rt715 ADC 25 Mux' 4" + cset "name='rt715 ADC 27 Capture Switch' 1" + cset "name='rt715 ADC 07 Capture Switch' 1" ++ cset "name='rt715 ADC 07 Capture Volume' 58" + ] +-- +2.26.2 + diff --git a/0009-sof-hda-dsp-Set-Master-Playback-Switch-on-in-the-Boo.patch b/0009-sof-hda-dsp-Set-Master-Playback-Switch-on-in-the-Boo.patch new file mode 100644 index 0000000..064101b --- /dev/null +++ b/0009-sof-hda-dsp-Set-Master-Playback-Switch-on-in-the-Boo.patch @@ -0,0 +1,44 @@ +From cf267cce6d553d4d436c166c23d3befc5476acef Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Thu, 29 Oct 2020 13:34:02 +0800 +Subject: [PATCH 9/9] sof-hda-dsp: Set Master Playback Switch on in the + BootSequence + +Otherwise, the audio output will be muted by default if there is no +/var/lib/alsa/asound.state. I have experienced this issue When newly +install an OS. + +Signed-off-by: Hui Wang +Signed-off-by: Jaroslav Kysela +--- + ucm2/HDA-Intel/init.conf | 1 + + ucm2/sof-hda-dsp/sof-hda-dsp.conf | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/ucm2/HDA-Intel/init.conf b/ucm2/HDA-Intel/init.conf +index 1a351a9cb3d5..6310eb34973a 100644 +--- a/ucm2/HDA-Intel/init.conf ++++ b/ucm2/HDA-Intel/init.conf +@@ -15,6 +15,7 @@ If.master { + } + True.BootSequence [ + cset "name='Master Playback Volume' 60%" ++ cset "name='Master Playback Switch' on" + ] + } + +diff --git a/ucm2/sof-hda-dsp/sof-hda-dsp.conf b/ucm2/sof-hda-dsp/sof-hda-dsp.conf +index c8069a6bbf28..79b54a9c61d6 100644 +--- a/ucm2/sof-hda-dsp/sof-hda-dsp.conf ++++ b/ucm2/sof-hda-dsp/sof-hda-dsp.conf +@@ -24,6 +24,7 @@ If.master { + } + True.BootSequence [ + cset "name='Master Playback Volume' 60%" ++ cset "name='Master Playback Switch' on" + ] + } + +-- +2.26.2 + diff --git a/alsa-ucm-conf.changes b/alsa-ucm-conf.changes index 6a323ae..16e9cc8 100644 --- a/alsa-ucm-conf.changes +++ b/alsa-ucm-conf.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Dec 14 16:20:59 CET 2020 - tiwai@suse.de + +- 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 + ------------------------------------------------------------------- Tue Dec 1 09:40:25 CET 2020 - tiwai@suse.de diff --git a/alsa-ucm-conf.spec b/alsa-ucm-conf.spec index 77787da..b6c93cf 100644 --- a/alsa-ucm-conf.spec +++ b/alsa-ucm-conf.spec @@ -26,6 +26,12 @@ Source: ftp://ftp.alsa-project.org/pub/lib/alsa-ucm-conf-%{version}.tar. Patch1: 0001-fix-the-ucm2-codecs-hda-hdmi.conf-use.patch Patch2: 0002-codecs-hda-hdmi.conf-add-DisplayPort-to-the-device-d.patch Patch3: 0003-sof-soundwire-use-the-codecs-hda-hdmi.conf-macro.patch +Patch4: 0004-Revert-ucm2-HDA-acp-add-Capture-simple-mixer-element.patch +Patch5: 0005-chtnau8824-Fix-mono-speaker-config-not-working.patch +Patch6: 0006-chtnau8824-Add-support-for-laptops-using-stereo-DMIC.patch +Patch7: 0007-chtnau8824-Boost-analog-mic-volumes-a-bit.patch +Patch8: 0008-rt715-init-setup-ADC07-to-a-proper-volume.patch +Patch9: 0009-sof-hda-dsp-Set-Master-Playback-Switch-on-in-the-Boo.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -37,6 +43,12 @@ This package contains the profiles files for ALSA UCM (Use Case Manager). %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 %build