From 8a7fb2c936ef8f6a47f05aaa5d7072c8306bd742 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Tue, 9 Jan 2024 17:52:14 +0100 Subject: [PATCH] ucm2: Qualcomm: sc8280xp/x1e80100: fix default volume settings Default volume settings should be specified in the BootSequence rather than in device enable sequences to allow users to override the defaults. Add machine specific BootSequences to set up reasonable defaults for the Lenovo ThinkPad X13s and X1E80100 CRD. Note that the settings depends on the actual hardware configuration and should therefore not be specified in the (potentially shared) codec init files. Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/382 Signed-off-by: Johan Hovold Signed-off-by: Jaroslav Kysela --- ucm2/Qualcomm/sc8280xp/HiFi.conf | 1 - ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf | 8 ++++++++ ucm2/Qualcomm/x1e80100/HiFi.conf | 1 - ucm2/Qualcomm/x1e80100/X1E80100-CRD.conf | 6 ++++++ ucm2/codecs/wcd938x/DefaultEnableSeq.conf | 4 ---- ucm2/codecs/wcd938x/HeadphoneMicEnableSeq.conf | 1 - ucm2/codecs/wcd938x/init.conf | 4 ---- ucm2/codecs/wsa883x/SpeakerEnableSeq.conf | 2 -- 8 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 ucm2/codecs/wcd938x/DefaultEnableSeq.conf diff --git a/ucm2/Qualcomm/sc8280xp/HiFi.conf b/ucm2/Qualcomm/sc8280xp/HiFi.conf index 0fb5302..b40d671 100644 --- a/ucm2/Qualcomm/sc8280xp/HiFi.conf +++ b/ucm2/Qualcomm/sc8280xp/HiFi.conf @@ -9,7 +9,6 @@ SectionVerb { cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 1" ] - Include.wcde.File "/codecs/wcd938x/DefaultEnableSeq.conf" Include.wsae.File "/codecs/wsa883x/DefaultEnableSeq.conf" Value { diff --git a/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf b/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf index 10e914b..c01fb4c 100644 --- a/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf +++ b/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf @@ -5,6 +5,14 @@ SectionUseCase."HiFi" { Comment "HiFi quality Music." } +BootSequence [ + cset "name='SpkrLeft PA Volume' 12" + cset "name='SpkrRight PA Volume' 12" + cset "name='HPHL Volume' 20" + cset "name='HPHR Volume' 20" + cset "name='ADC2 Volume' 10" +] + Include.card-init.File "/lib/card-init.conf" Include.ctl-remap.File "/lib/ctl-remap.conf" Include.wcd-init.File "/codecs/wcd938x/init.conf" diff --git a/ucm2/Qualcomm/x1e80100/HiFi.conf b/ucm2/Qualcomm/x1e80100/HiFi.conf index 1a4f73f..dcecacf 100644 --- a/ucm2/Qualcomm/x1e80100/HiFi.conf +++ b/ucm2/Qualcomm/x1e80100/HiFi.conf @@ -9,7 +9,6 @@ SectionVerb { cset "name='MultiMedia4 Mixer VA_CODEC_DMA_TX_0' 1" ] - Include.wcde.File "/codecs/wcd938x/DefaultEnableSeq.conf" Include.wsae.File "/codecs/wsa884x/four-speakers/DefaultEnableSeq.conf" Include.wsm1e.File "/codecs/qcom-lpass/wsa-macro/Wsa1SpeakerEnableSeq.conf" Include.wsm2e.File "/codecs/qcom-lpass/wsa-macro/Wsa2SpeakerEnableSeq.conf" diff --git a/ucm2/Qualcomm/x1e80100/X1E80100-CRD.conf b/ucm2/Qualcomm/x1e80100/X1E80100-CRD.conf index e4c62fb..c733145 100644 --- a/ucm2/Qualcomm/x1e80100/X1E80100-CRD.conf +++ b/ucm2/Qualcomm/x1e80100/X1E80100-CRD.conf @@ -5,6 +5,12 @@ SectionUseCase."HiFi" { Comment "HiFi quality Music." } +BootSequence [ + cset "name='HPHL Volume' 20" + cset "name='HPHR Volume' 20" + cset "name='ADC2 Volume' 10" +] + Include.card-init.File "/lib/card-init.conf" Include.ctl-remap.File "/lib/ctl-remap.conf" Include.wcd-init.File "/codecs/wcd938x/init.conf" diff --git a/ucm2/codecs/wcd938x/DefaultEnableSeq.conf b/ucm2/codecs/wcd938x/DefaultEnableSeq.conf deleted file mode 100644 index 5da6717..0000000 --- a/ucm2/codecs/wcd938x/DefaultEnableSeq.conf +++ /dev/null @@ -1,4 +0,0 @@ -EnableSequence [ - cset "name='HPHR Volume' 20" - cset "name='HPHL Volume' 20" -] diff --git a/ucm2/codecs/wcd938x/HeadphoneMicEnableSeq.conf b/ucm2/codecs/wcd938x/HeadphoneMicEnableSeq.conf index 58b6b79..8ea2472 100644 --- a/ucm2/codecs/wcd938x/HeadphoneMicEnableSeq.conf +++ b/ucm2/codecs/wcd938x/HeadphoneMicEnableSeq.conf @@ -3,5 +3,4 @@ EnableSequence [ cset "name='HDR12 MUX' NO_HDR12" cset "name='ADC2 MUX' INP2" cset "name='ADC2 Switch' 1" - cset "name='ADC2 Volume' 10" ] diff --git a/ucm2/codecs/wcd938x/init.conf b/ucm2/codecs/wcd938x/init.conf index c2a418c..256452b 100644 --- a/ucm2/codecs/wcd938x/init.conf +++ b/ucm2/codecs/wcd938x/init.conf @@ -1,9 +1,5 @@ # WCD938X specific volume control settings -BootSequence [ - cset "name='ADC2 Volume' 12" -] - LibraryConfig.remap.Config { ctl.default.map { diff --git a/ucm2/codecs/wsa883x/SpeakerEnableSeq.conf b/ucm2/codecs/wsa883x/SpeakerEnableSeq.conf index 3a05b4f..a079cdc 100644 --- a/ucm2/codecs/wsa883x/SpeakerEnableSeq.conf +++ b/ucm2/codecs/wsa883x/SpeakerEnableSeq.conf @@ -4,11 +4,9 @@ EnableSequence [ cset "name='SpkrLeft DAC Switch' 1" cset "name='SpkrLeft VISENSE Switch' 0" cset "name='SpkrLeft WSA MODE' 0" - cset "name='SpkrLeft PA Volume' 12" cset "name='SpkrRight COMP Switch' 1" cset "name='SpkrRight BOOST Switch' 1" cset "name='SpkrRight DAC Switch' 1" cset "name='SpkrRight VISENSE Switch' 0" - cset "name='SpkrRight PA Volume' 12" cset "name='SpkrRight WSA MODE' 0" ] -- 2.47.1