From 93c36d19e0bedfd4eac0314ffe58266d64f00a1e Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Fri, 7 Jul 2023 12:53:09 +0100 Subject: [PATCH] ucm2: codecs: wcd938x: use Analog volume for HeadPhones Current setup used Digital Volume to control Headset Volume which is pretty saturated after centain gain. Fix the Digital gain at 0dB and use Analog gain to do the volume control. Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/335 Signed-off-by: Srinivas Kandagatla Reviewed-by: Johan Hovold Tested-by: Johan Hovold Signed-off-by: Jaroslav Kysela --- ucm2/Qualcomm/sc8280xp/HiFi.conf | 2 +- ucm2/codecs/wcd938x/HeadphoneEnableSeq.conf | 2 ++ ucm2/codecs/wcd938x/init.conf | 10 +++++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ucm2/Qualcomm/sc8280xp/HiFi.conf b/ucm2/Qualcomm/sc8280xp/HiFi.conf index a184e9dc..02c65e50 100644 --- a/ucm2/Qualcomm/sc8280xp/HiFi.conf +++ b/ucm2/Qualcomm/sc8280xp/HiFi.conf @@ -44,7 +44,7 @@ SectionDevice."Headphones" { PlaybackPriority 200 PlaybackPCM "hw:${CardId},0" PlaybackMixer "default:${CardId}" - PlaybackMixerElem "HP Digital" + PlaybackMixerElem "HP" JackControl "Headphone Jack" JackHWMute "Speaker" } diff --git a/ucm2/codecs/wcd938x/HeadphoneEnableSeq.conf b/ucm2/codecs/wcd938x/HeadphoneEnableSeq.conf index 6c9236de..f9969380 100644 --- a/ucm2/codecs/wcd938x/HeadphoneEnableSeq.conf +++ b/ucm2/codecs/wcd938x/HeadphoneEnableSeq.conf @@ -3,6 +3,8 @@ EnableSequence [ cset "name='HPHR_RDAC Switch' 1" cset "name='HPHL Switch' 1" cset "name='HPHR Switch' 1" + cset "name='HPHR_COMP Switch' 0" + cset "name='HPHL_COMP Switch' 0" cset "name='CLSH Switch' 1" cset "name='LO Switch' 1" ] diff --git a/ucm2/codecs/wcd938x/init.conf b/ucm2/codecs/wcd938x/init.conf index 9bf7fd86..3b7c119f 100644 --- a/ucm2/codecs/wcd938x/init.conf +++ b/ucm2/codecs/wcd938x/init.conf @@ -1,8 +1,8 @@ # WCD938X specific volume control settings BootSequence [ - cset "name='RX_RX0 Digital Volume' 80" - cset "name='RX_RX1 Digital Volume' 80" + cset "name='RX_RX0 Digital Volume' 84" + cset "name='RX_RX1 Digital Volume' 84" cset "name='ADC2 Volume' 12" ] @@ -10,9 +10,9 @@ LibraryConfig.remap.Config { ctl.default.map { # Merge two mono controls into one stereo - "name='HP Digital Volume'" { - "name='RX_RX0 Digital Volume'".vindex.0 0 - "name='RX_RX1 Digital Volume'".vindex.1 0 + "name='HP Volume'" { + "name='HPHL Volume'".vindex.0 0 + "name='HPHR Volume'".vindex.1 0 } } }