Skip to content

Commit

Permalink
ucm2: codecs: wcd938x: use Analog volume for HeadPhones
Browse files Browse the repository at this point in the history
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: #335
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
Srinivas-Kandagatla authored and perexg committed Oct 30, 2023
1 parent eb22326 commit 99cb07c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ucm2/Qualcomm/sc8280xp/HiFi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
2 changes: 2 additions & 0 deletions ucm2/codecs/wcd938x/HeadphoneEnableSeq.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
10 changes: 5 additions & 5 deletions ucm2/codecs/wcd938x/init.conf
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# 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"
]

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
}
}
}
Expand Down

0 comments on commit 99cb07c

Please sign in to comment.