1 From 9d17cc8dd6ef8128d7bbe2986a11d4bfd00eba10 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Wed, 28 Oct 2020 15:43:40 +0000
4 Subject: ASoC: codecs: wcd9335: Set digital gain range correctly
6 From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 [ Upstream commit 6d6bc54ab4f2404d46078abc04bf4dee4db01def ]
10 digital gain range is -84dB min to 40dB max, however this was not
11 correctly specified in the range.
13 Fix this by with correct range!
15 Fixes: 8c4f021d806a ("ASoC: wcd9335: add basic controls")
16 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
17 Link: https://lore.kernel.org/r/20201028154340.17090-2-srinivas.kandagatla@linaro.org
18 Signed-off-by: Mark Brown <broonie@kernel.org>
19 Signed-off-by: Sasha Levin <sashal@kernel.org>
21 sound/soc/codecs/wcd9335.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
24 diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c
25 index f318403133e96..81906c25e4a87 100644
26 --- a/sound/soc/codecs/wcd9335.c
27 +++ b/sound/soc/codecs/wcd9335.c
28 @@ -618,7 +618,7 @@ static const char * const sb_tx8_mux_text[] = {
29 "ZERO", "RX_MIX_TX8", "DEC8", "DEC8_192"
32 -static const DECLARE_TLV_DB_SCALE(digital_gain, 0, 1, 0);
33 +static const DECLARE_TLV_DB_SCALE(digital_gain, -8400, 100, -8400);
34 static const DECLARE_TLV_DB_SCALE(line_gain, 0, 7, 1);
35 static const DECLARE_TLV_DB_SCALE(analog_gain, 0, 25, 1);
36 static const DECLARE_TLV_DB_SCALE(ear_pa_gain, 0, 150, 0);