mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
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.
This commit is contained in:
commit
91419b0d9a
@ -207,7 +207,7 @@
|
||||
|
||||
/* CS35L56_MAIN_RENDER_USER_VOLUME */
|
||||
#define CS35L56_MAIN_RENDER_USER_VOLUME_MIN -400
|
||||
#define CS35L56_MAIN_RENDER_USER_VOLUME_MAX 400
|
||||
#define CS35L56_MAIN_RENDER_USER_VOLUME_MAX 48
|
||||
#define CS35L56_MAIN_RENDER_USER_VOLUME_MASK 0x0000FFC0
|
||||
#define CS35L56_MAIN_RENDER_USER_VOLUME_SHIFT 6
|
||||
#define CS35L56_MAIN_RENDER_USER_VOLUME_SIGNBIT 9
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user