Unverified Commit 91419b0d authored by Mark Brown's avatar Mark Brown
Browse files

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.
parents c288f0a1 244389bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+5 −1
Original line number Diff line number Diff line
@@ -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),