summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-07-03 17:30:47 +0100
committerMark Brown <broonie@kernel.org>2024-07-03 17:30:47 +0100
commit91419b0d9ab203945e0ed4efb3cab84c45df0a21 (patch)
tree0a1fb5faa5ac14bfbaeb8802331d137147114159 /sound/soc
parentc288f0a1c08efa65f9e3bb7954eb3cefb966c97d (diff)
parent244389bd42870640c4b5ef672a360da329b579ed (diff)
downloadlwn-91419b0d9ab203945e0ed4efb3cab84c45df0a21.tar.gz
lwn-91419b0d9ab203945e0ed4efb3cab84c45df0a21.zip
ASoC: cs35l56: Set correct upper volume limit
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: These two commits set the upper limit of the Speaker Volume control to +12dB instead of +100dB. This should have been a simple 1-line change to the #define in the header file, but only the HDA cs35l56 driver is using this define. The ASoC cs35l56 driver was using hardcoded numbers instead of the header defines. So the first commit changes the ASoC driver to use the #defined constants. The second commit corrects the value of the constant.
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/cs35l56.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 7cac9812f5b5..84c34f5b1a51 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -71,7 +71,11 @@ static const struct snd_kcontrol_new cs35l56_controls[] = {
cs35l56_dspwait_get_volsw, cs35l56_dspwait_put_volsw),
SOC_SINGLE_S_EXT_TLV("Speaker Volume",
CS35L56_MAIN_RENDER_USER_VOLUME,
- 6, -400, 400, 9, 0,
+ CS35L56_MAIN_RENDER_USER_VOLUME_SHIFT,
+ CS35L56_MAIN_RENDER_USER_VOLUME_MIN,
+ CS35L56_MAIN_RENDER_USER_VOLUME_MAX,
+ CS35L56_MAIN_RENDER_USER_VOLUME_SIGNBIT,
+ 0,
cs35l56_dspwait_get_volsw,
cs35l56_dspwait_put_volsw,
vol_tlv),