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 2021-07-14 08:59:30.000000000 +0800 +++ alsa-ucm-conf-1.2.2/debian/changelog 2021-08-23 11:00:48.000000000 +0800 @@ -1,3 +1,19 @@ +alsa-ucm-conf (1.2.2-1ubuntu0.10) focal; urgency=medium + + * d/p/0031-sof-soundwire-rt1316-DAC-L-and-R-is-replaced-by-DAC.patch + The mixer name is changed in the codec driver rt1316-sdw.c, so need + to handle the new mixer name. + https://github.com/alsa-project/alsa-ucm-conf/pull/109 + (LP: #1937980) + * d/p/0032-sof-hda-dsp-Set-Capture-Switch-on-in-the-BootSequenc.patch + The input volume of the external microphone is 0 by default for all + machines with sof audio driver, that is because the capture switch + is set to off by default, need to set it to on in the ucm. + https://github.com/alsa-project/alsa-ucm-conf/pull/107 + (LP: #1940788) + + -- Hui Wang Mon, 23 Aug 2021 11:00:48 +0800 + alsa-ucm-conf (1.2.2-1ubuntu0.9) focal; urgency=medium * d/p/0028-rt715-don-t-initialize-obsolete-ADC-controls.patch diff -Nru alsa-ucm-conf-1.2.2/debian/patches/0031-sof-soundwire-rt1316-DAC-L-and-R-is-replaced-by-DAC.patch alsa-ucm-conf-1.2.2/debian/patches/0031-sof-soundwire-rt1316-DAC-L-and-R-is-replaced-by-DAC.patch --- alsa-ucm-conf-1.2.2/debian/patches/0031-sof-soundwire-rt1316-DAC-L-and-R-is-replaced-by-DAC.patch 1970-01-01 08:00:00.000000000 +0800 +++ alsa-ucm-conf-1.2.2/debian/patches/0031-sof-soundwire-rt1316-DAC-L-and-R-is-replaced-by-DAC.patch 2021-08-23 10:57:31.000000000 +0800 @@ -0,0 +1,139 @@ +From 47f19f276255ddfbcb7fbb71c24f435ccf8bc7a5 Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Fri, 23 Jul 2021 11:13:02 +0800 +Subject: [PATCH] sof-soundwire: rt1316 - DAC L and R is replaced by DAC + +In the latest codec driver rt1316-sdw.c, the DAC L and DAC R are +replaced by DAC, so we change the ucm to add the condition checking, +if 'DAC L' exists, will set those mixers in the old way, otherwise, +set the mixers with new name. + +The codec rt1316 is used on a Dell TGL soundwire audio machine. + +Signed-off-by: Hui Wang +--- + ucm2/sof-soundwire/rt1316-1.conf | 39 +++++++++++++++++------ + ucm2/sof-soundwire/rt1316-2.conf | 54 ++++++++++++++++++++++---------- + 2 files changed, 67 insertions(+), 26 deletions(-) + +diff --git a/ucm2/sof-soundwire/rt1316-1.conf b/ucm2/sof-soundwire/rt1316-1.conf +index f442a79..aa277dd 100644 +--- a/ucm2/sof-soundwire/rt1316-1.conf ++++ b/ucm2/sof-soundwire/rt1316-1.conf +@@ -3,17 +3,36 @@ + SectionDevice."Speaker" { + Comment "Speaker" + +- EnableSequence [ +- cset "name='rt1316-1 DAC L Switch' 1" +- cset "name='rt1316-1 DAC R Switch' 1" +- cset "name='Speaker Switch' on" +- ] ++ If.lrswitch { ++ Condition { ++ Type ControlExists ++ Control "name='rt1316-1 DAC L Switch'" ++ } ++ True { ++ EnableSequence [ ++ cset "name='rt1316-1 DAC L Switch' 1" ++ cset "name='rt1316-1 DAC R Switch' 1" ++ cset "name='Speaker Switch' on" ++ ] + +- DisableSequence [ +- cset "name='rt1316-1 DAC L Switch' 0" +- cset "name='rt1316-1 DAC R Switch' 0" +- cset "name='Speaker Switch' off" +- ] ++ DisableSequence [ ++ cset "name='rt1316-1 DAC L Switch' 0" ++ cset "name='rt1316-1 DAC R Switch' 0" ++ cset "name='Speaker Switch' off" ++ ] ++ } ++ False { ++ EnableSequence [ ++ cset "name='rt1316-1 DAC Switch' 1" ++ cset "name='Speaker Switch' on" ++ ] ++ ++ DisableSequence [ ++ cset "name='rt1316-1 DAC Switch' 0" ++ cset "name='Speaker Switch' off" ++ ] ++ } ++ } + + Value { + PlaybackPriority 100 +diff --git a/ucm2/sof-soundwire/rt1316-2.conf b/ucm2/sof-soundwire/rt1316-2.conf +index f2fd9ab..94223e1 100644 +--- a/ucm2/sof-soundwire/rt1316-2.conf ++++ b/ucm2/sof-soundwire/rt1316-2.conf +@@ -3,24 +3,46 @@ + SectionDevice."Speaker" { + Comment "Speaker" + +- EnableSequence [ +- cset "name='rt1316-1 RX Channel Select' L,L" +- cset "name='rt1316-2 RX Channel Select' R,R" ++ If.lrswitch { ++ Condition { ++ Type ControlExists ++ Control "name='rt1316-1 DAC L Switch'" ++ } ++ True { ++ EnableSequence [ ++ cset "name='rt1316-1 RX Channel Select' L,L" ++ cset "name='rt1316-2 RX Channel Select' R,R" ++ cset "name='rt1316-1 DAC L Switch' 1" ++ cset "name='rt1316-1 DAC R Switch' 1" ++ cset "name='rt1316-2 DAC L Switch' 1" ++ cset "name='rt1316-2 DAC R Switch' 1" ++ cset "name='Speaker Switch' on" ++ ] + +- cset "name='rt1316-1 DAC L Switch' 1" +- cset "name='rt1316-1 DAC R Switch' 1" +- cset "name='rt1316-2 DAC L Switch' 1" +- cset "name='rt1316-2 DAC R Switch' 1" +- cset "name='Speaker Switch' on" +- ] ++ DisableSequence [ ++ cset "name='rt1316-1 DAC L Switch' 0" ++ cset "name='rt1316-1 DAC R Switch' 0" ++ cset "name='rt1316-2 DAC L Switch' 0" ++ cset "name='rt1316-2 DAC R Switch' 0" ++ cset "name='Speaker Switch' off" ++ ] ++ } ++ False { ++ EnableSequence [ ++ cset "name='rt1316-1 RX Channel Select' L,L" ++ cset "name='rt1316-2 RX Channel Select' R,R" ++ cset "name='rt1316-1 DAC Switch' 1" ++ cset "name='rt1316-2 DAC Switch' 1" ++ cset "name='Speaker Switch' on" ++ ] + +- DisableSequence [ +- cset "name='rt1316-1 DAC L Switch' 0" +- cset "name='rt1316-1 DAC R Switch' 0" +- cset "name='rt1316-2 DAC L Switch' 0" +- cset "name='rt1316-2 DAC R Switch' 0" +- cset "name='Speaker Switch' off" +- ] ++ DisableSequence [ ++ cset "name='rt1316-1 DAC Switch' 0" ++ cset "name='rt1316-2 DAC Switch' 0" ++ cset "name='Speaker Switch' off" ++ ] ++ } ++ } + + Value { + PlaybackPriority 100 +-- +2.25.1 + diff -Nru alsa-ucm-conf-1.2.2/debian/patches/0032-sof-hda-dsp-Set-Capture-Switch-on-in-the-BootSequenc.patch alsa-ucm-conf-1.2.2/debian/patches/0032-sof-hda-dsp-Set-Capture-Switch-on-in-the-BootSequenc.patch --- alsa-ucm-conf-1.2.2/debian/patches/0032-sof-hda-dsp-Set-Capture-Switch-on-in-the-BootSequenc.patch 1970-01-01 08:00:00.000000000 +0800 +++ alsa-ucm-conf-1.2.2/debian/patches/0032-sof-hda-dsp-Set-Capture-Switch-on-in-the-BootSequenc.patch 2021-08-23 11:00:06.000000000 +0800 @@ -0,0 +1,39 @@ +From 55d2ab5c177ec905dc46f45dd27de408c55153bd Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Fri, 23 Jul 2021 11:20:50 +0800 +Subject: [PATCH] sof-hda-dsp: Set Capture Switch on in the BootSequence + +We found an issue that the PA source of Mic2/Headset and Mic2 is +muted by default after newly install an OS, the root cause is the +'Capture Switch' is set to off in the kernel. + +Without ucm, the /usr/share/alsa/init/default will set the 'Capture +Switch' to on, similarly we set it to on in the BootSequence of ucm. + +Signed-off-by: Hui Wang +--- + ucm2/sof-hda-dsp/sof-hda-dsp.conf | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/ucm2/sof-hda-dsp/sof-hda-dsp.conf b/ucm2/sof-hda-dsp/sof-hda-dsp.conf +index 79b54a9..ca3473a 100644 +--- a/ucm2/sof-hda-dsp/sof-hda-dsp.conf ++++ b/ucm2/sof-hda-dsp/sof-hda-dsp.conf +@@ -57,3 +57,14 @@ If.Dmic0 { + cset "name='Dmic0 Capture Volume' 70%" + ] + } ++ ++If.Capture { ++ Condition { ++ Type ControlExists ++ Control "name='Capture Switch'" ++ } ++ True.BootSequence [ ++ cset "name='Capture Volume' 60%" ++ cset "name='Capture Switch' on" ++ ] ++} +-- +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 2021-07-14 08:59:30.000000000 +0800 +++ alsa-ucm-conf-1.2.2/debian/patches/series 2021-08-23 11:00:42.000000000 +0800 @@ -31,3 +31,7 @@ 0028-rt715-don-t-initialize-obsolete-ADC-controls.patch 0029-sof-soundwire-rt715-use-the-hw-volume-control.patch 0030-rt715-add-the-missing-sof-prefix-to-the-hw-control-n.patch + +0031-sof-soundwire-rt1316-DAC-L-and-R-is-replaced-by-DAC.patch + +0032-sof-hda-dsp-Set-Capture-Switch-on-in-the-BootSequenc.patch