diff -Nru alsa-ucm-conf-1.2.2/debian/changelog alsa-ucm-conf-1.2.2/debian/changelog --- alsa-ucm-conf-1.2.2/debian/changelog 2020-09-15 13:19:16.000000000 +0000 +++ alsa-ucm-conf-1.2.2/debian/changelog 2020-11-09 03:59:02.000000000 +0000 @@ -1,3 +1,17 @@ +alsa-ucm-conf (1.2.2-1ubuntu6) groovy; urgency=medium + + * d/p/0001-sof-hda-dsp-add-initial-kcontrol-values.patch + * d/p/0002-sof-hda-dsp-make-the-boot-init-optional-for-all-cont.patch + * d/p/0003-sof-hda-dsp-Set-Master-Playback-Switch-on-in-the-Boo.patch + * d/p/0004-sof-hda-dsp-Increase-the-speaker-output-volume-in-th.patch + Unmute the master playback switch and increase the init output volume, + otherwise the playback will be muted after freshly install the OS if + the machine uses ucm to configure the audio mixers, and the init playback + output volume is too low after freshly install the OS. + (LP: #1901922) + + -- Hui Wang Mon, 09 Nov 2020 03:59:02 +0000 + alsa-ucm-conf (1.2.2-1ubuntu5) groovy; urgency=medium * d/p/0001-ucm2-USB-Audio-Add-more-support-to-Lenovo-ThinkStati.patch diff -Nru alsa-ucm-conf-1.2.2/debian/patches/0001-sof-hda-dsp-add-initial-kcontrol-values.patch alsa-ucm-conf-1.2.2/debian/patches/0001-sof-hda-dsp-add-initial-kcontrol-values.patch --- alsa-ucm-conf-1.2.2/debian/patches/0001-sof-hda-dsp-add-initial-kcontrol-values.patch 1970-01-01 00:00:00.000000000 +0000 +++ alsa-ucm-conf-1.2.2/debian/patches/0001-sof-hda-dsp-add-initial-kcontrol-values.patch 2020-11-09 03:52:31.000000000 +0000 @@ -0,0 +1,47 @@ +From 40967300232adc19779f641e2963cca686de0e87 Mon Sep 17 00:00:00 2001 +From: Libin Yang +Date: Thu, 21 May 2020 03:45:16 -0400 +Subject: [PATCH 1/2] sof-hda-dsp: add initial kcontrol values + +This patch adds the initial values of sof-hda-dsp card. + +Signed-off-by: Libin Yang +Signed-off-by: Jaroslav Kysela +(cherry picked from commit 450bebd628975ffab153978b80f1493100910e53) +Signed-off-by: Hui Wang +--- + ucm2/sof-hda-dsp/sof-hda-dsp.conf | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/ucm2/sof-hda-dsp/sof-hda-dsp.conf b/ucm2/sof-hda-dsp/sof-hda-dsp.conf +index d7a0518..f3a79e9 100644 +--- a/ucm2/sof-hda-dsp/sof-hda-dsp.conf ++++ b/ucm2/sof-hda-dsp/sof-hda-dsp.conf +@@ -4,3 +4,24 @@ SectionUseCase."HiFi" { + File "HiFi.conf" + Comment "Play HiFi quality Music" + } ++ ++# the kcontrols initial values, which will be set by `alsactl init` ++ ++BootSequence [ ++ cset "name='Master Playback Volume' 80" ++ cset "name='Headphone Playback Volume' 80" ++ cset "name='Speaker Playback Volume' 80" ++ cset "name='Auto-Mute Mode' off" ++] ++ ++If.Dmic0 { ++ Condition { ++ Type ControlExists ++ Control "name='Dmic0 Capture Volume'" ++ } ++ True { ++ BootSequence [ ++ cset "name='Dmic0 Capture Volume' 70" ++ ] ++ } ++} +-- +2.25.1 + diff -Nru alsa-ucm-conf-1.2.2/debian/patches/0002-sof-hda-dsp-make-the-boot-init-optional-for-all-cont.patch alsa-ucm-conf-1.2.2/debian/patches/0002-sof-hda-dsp-make-the-boot-init-optional-for-all-cont.patch --- alsa-ucm-conf-1.2.2/debian/patches/0002-sof-hda-dsp-make-the-boot-init-optional-for-all-cont.patch 1970-01-01 00:00:00.000000000 +0000 +++ alsa-ucm-conf-1.2.2/debian/patches/0002-sof-hda-dsp-make-the-boot-init-optional-for-all-cont.patch 2020-11-09 03:55:20.000000000 +0000 @@ -0,0 +1,85 @@ +From ccad1a73cb7544c310a2eee733520d611471a984 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Wed, 24 Jun 2020 10:39:42 +0200 +Subject: [PATCH 2/2] sof-hda-dsp: make the boot init optional for all controls + +Also don't initialize "Auto-Mute Mode" in the HiFi verb. + +Signed-off-by: Jaroslav Kysela +(backported from commit 6ed067e0d448b34eaa8217f9785830aa1a3f716f) +Signed-off-by: Hui Wang +--- + ucm2/sof-hda-dsp/sof-hda-dsp.conf | 53 ++++++++++++++++++++++++------- + 1 file changed, 42 insertions(+), 11 deletions(-) + +diff --git a/ucm2/sof-hda-dsp/sof-hda-dsp.conf b/ucm2/sof-hda-dsp/sof-hda-dsp.conf +index f3a79e9..a26d1d0 100644 +--- a/ucm2/sof-hda-dsp/sof-hda-dsp.conf ++++ b/ucm2/sof-hda-dsp/sof-hda-dsp.conf +@@ -7,21 +7,52 @@ SectionUseCase."HiFi" { + + # the kcontrols initial values, which will be set by `alsactl init` + +-BootSequence [ +- cset "name='Master Playback Volume' 80" +- cset "name='Headphone Playback Volume' 80" +- cset "name='Speaker Playback Volume' 80" +- cset "name='Auto-Mute Mode' off" +-] ++If.amute { ++ Condition { ++ Type ControlExists ++ Control "name='Auto-Mute Mode'" ++ } ++ True.BootSequence [ ++ cset "name='Auto-Mute Mode' off" ++ ] ++} ++ ++If.master { ++ Condition { ++ Type ControlExists ++ Control "name='Master Playback Volume'" ++ } ++ True.BootSequence [ ++ cset "name='Master Playback Volume' 60%" ++ ] ++} ++ ++If.speaker { ++ Condition { ++ Type ControlExists ++ Control "name='Speaker Playback Volume'" ++ } ++ True.BootSequence [ ++ cset "name='Speaker Playback Volume' 60%" ++ ] ++} ++ ++If.headphone { ++ Condition { ++ Type ControlExists ++ Control "name='Headphone Playback Volume'" ++ } ++ True.BootSequence [ ++ cset "name='Headphone Playback Volume' 60%" ++ ] ++} + + If.Dmic0 { + Condition { + Type ControlExists + Control "name='Dmic0 Capture Volume'" + } +- True { +- BootSequence [ +- cset "name='Dmic0 Capture Volume' 70" +- ] +- } ++ True.BootSequence [ ++ cset "name='Dmic0 Capture Volume' 70%" ++ ] + } +-- +2.25.1 + diff -Nru alsa-ucm-conf-1.2.2/debian/patches/0003-sof-hda-dsp-Set-Master-Playback-Switch-on-in-the-Boo.patch alsa-ucm-conf-1.2.2/debian/patches/0003-sof-hda-dsp-Set-Master-Playback-Switch-on-in-the-Boo.patch --- alsa-ucm-conf-1.2.2/debian/patches/0003-sof-hda-dsp-Set-Master-Playback-Switch-on-in-the-Boo.patch 1970-01-01 00:00:00.000000000 +0000 +++ alsa-ucm-conf-1.2.2/debian/patches/0003-sof-hda-dsp-Set-Master-Playback-Switch-on-in-the-Boo.patch 2020-11-09 03:57:15.000000000 +0000 @@ -0,0 +1,45 @@ +From e0fda9bced590330e153dbd3e2b1d7aefa07b4db Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Thu, 29 Oct 2020 13:34:02 +0800 +Subject: [PATCH 1/2] 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. + +Backported from: https://github.com/alsa-project/alsa-ucm-conf/pull/57 + +Signed-off-by: Hui Wang +--- + 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 1a351a9..6310eb3 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 c8069a6..79b54a9 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.25.1 + diff -Nru alsa-ucm-conf-1.2.2/debian/patches/0004-sof-hda-dsp-Increase-the-speaker-output-volume-in-th.patch alsa-ucm-conf-1.2.2/debian/patches/0004-sof-hda-dsp-Increase-the-speaker-output-volume-in-th.patch --- alsa-ucm-conf-1.2.2/debian/patches/0004-sof-hda-dsp-Increase-the-speaker-output-volume-in-th.patch 1970-01-01 00:00:00.000000000 +0000 +++ alsa-ucm-conf-1.2.2/debian/patches/0004-sof-hda-dsp-Increase-the-speaker-output-volume-in-th.patch 2020-11-09 03:57:57.000000000 +0000 @@ -0,0 +1,64 @@ +From 618820c2800c4f79507e681b3d5bb3c5b46cfa24 Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Thu, 29 Oct 2020 13:39:49 +0800 +Subject: [PATCH 2/2] sof-hda-dsp: Increase the speaker output volume in the + BootSequence + +At least on the Leonvo X13 Yoga, the speaker output is too low with +60% setting, let us increase it a bit. + +Backported from: https://github.com/alsa-project/alsa-ucm-conf/pull/57 + +Signed-off-by: Hui Wang +--- + ucm2/HDA-Intel/init.conf | 4 ++-- + ucm2/sof-hda-dsp/sof-hda-dsp.conf | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/ucm2/HDA-Intel/init.conf b/ucm2/HDA-Intel/init.conf +index 6310eb3..1e11bae 100644 +--- a/ucm2/HDA-Intel/init.conf ++++ b/ucm2/HDA-Intel/init.conf +@@ -14,7 +14,7 @@ If.master { + Control "name='Master Playback Volume'" + } + True.BootSequence [ +- cset "name='Master Playback Volume' 60%" ++ cset "name='Master Playback Volume' 90%" + cset "name='Master Playback Switch' on" + ] + } +@@ -25,7 +25,7 @@ If.speaker { + Control "name='Speaker Playback Volume'" + } + True.BootSequence [ +- cset "name='Speaker Playback Volume' 60%" ++ cset "name='Speaker Playback Volume' 90%" + ] + } + +diff --git a/ucm2/sof-hda-dsp/sof-hda-dsp.conf b/ucm2/sof-hda-dsp/sof-hda-dsp.conf +index 79b54a9..f961756 100644 +--- a/ucm2/sof-hda-dsp/sof-hda-dsp.conf ++++ b/ucm2/sof-hda-dsp/sof-hda-dsp.conf +@@ -23,7 +23,7 @@ If.master { + Control "name='Master Playback Volume'" + } + True.BootSequence [ +- cset "name='Master Playback Volume' 60%" ++ cset "name='Master Playback Volume' 90%" + cset "name='Master Playback Switch' on" + ] + } +@@ -34,7 +34,7 @@ If.speaker { + Control "name='Speaker Playback Volume'" + } + True.BootSequence [ +- cset "name='Speaker Playback Volume' 60%" ++ cset "name='Speaker Playback Volume' 90%" + ] + } + +-- +2.25.1 + diff -Nru alsa-ucm-conf-1.2.2/debian/patches/series alsa-ucm-conf-1.2.2/debian/patches/series --- alsa-ucm-conf-1.2.2/debian/patches/series 2020-09-15 13:19:16.000000000 +0000 +++ alsa-ucm-conf-1.2.2/debian/patches/series 2020-11-09 03:58:19.000000000 +0000 @@ -20,3 +20,8 @@ 0017-USB-Audio-Dell-WD15-Dock-make-input-and-output-volum.patch 0001-ucm2-USB-Audio-Add-more-support-to-Lenovo-ThinkStati.patch + +0001-sof-hda-dsp-add-initial-kcontrol-values.patch +0002-sof-hda-dsp-make-the-boot-init-optional-for-all-cont.patch +0003-sof-hda-dsp-Set-Master-Playback-Switch-on-in-the-Boo.patch +0004-sof-hda-dsp-Increase-the-speaker-output-volume-in-th.patch