1 From 20fa86e74ab809216024bdcc16ee84e2eb77adfd Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Wed, 28 Oct 2020 15:43:39 +0000
4 Subject: ASoC: codecs: wcd934x: Set digital gain range correctly
6 From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 [ Upstream commit fc0522bbe02fa4beb95c0514ace66b585616f111 ]
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: 1cde8b822332 ("ASoC: wcd934x: add basic controls")
16 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
17 Link: https://lore.kernel.org/r/20201028154340.17090-1-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/wcd934x.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
24 diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c
25 index 35697b072367a..40f682f5dab8b 100644
26 --- a/sound/soc/codecs/wcd934x.c
27 +++ b/sound/soc/codecs/wcd934x.c
28 @@ -551,7 +551,7 @@ struct wcd_iir_filter_ctl {
29 struct soc_bytes_ext bytes_ext;
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);