Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

+6 -2
+1 -1
include/sound/cs35l56.h
··· 207 207 208 208 /* CS35L56_MAIN_RENDER_USER_VOLUME */ 209 209 #define CS35L56_MAIN_RENDER_USER_VOLUME_MIN -400 210 - #define CS35L56_MAIN_RENDER_USER_VOLUME_MAX 400 210 + #define CS35L56_MAIN_RENDER_USER_VOLUME_MAX 48 211 211 #define CS35L56_MAIN_RENDER_USER_VOLUME_MASK 0x0000FFC0 212 212 #define CS35L56_MAIN_RENDER_USER_VOLUME_SHIFT 6 213 213 #define CS35L56_MAIN_RENDER_USER_VOLUME_SIGNBIT 9
+5 -1
sound/soc/codecs/cs35l56.c
··· 71 71 cs35l56_dspwait_get_volsw, cs35l56_dspwait_put_volsw), 72 72 SOC_SINGLE_S_EXT_TLV("Speaker Volume", 73 73 CS35L56_MAIN_RENDER_USER_VOLUME, 74 - 6, -400, 400, 9, 0, 74 + CS35L56_MAIN_RENDER_USER_VOLUME_SHIFT, 75 + CS35L56_MAIN_RENDER_USER_VOLUME_MIN, 76 + CS35L56_MAIN_RENDER_USER_VOLUME_MAX, 77 + CS35L56_MAIN_RENDER_USER_VOLUME_SIGNBIT, 78 + 0, 75 79 cs35l56_dspwait_get_volsw, 76 80 cs35l56_dspwait_put_volsw, 77 81 vol_tlv),