summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorCamel Guo <camelg@axis.com>2020-09-08 12:04:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-29 12:07:39 +0300
commit8f319155ef516bc9181cddf54b087a305eb2e7e0 (patch)
tree3aeddd8595556800f15cbb5365bc4d78da5b812b /sound/soc
parent7d3dcc5d26e1e1332f6c062ac0800c6d1b77edc0 (diff)
downloadlinux-8f319155ef516bc9181cddf54b087a305eb2e7e0.tar.xz
ASoC: tlv320adcx140: Fix digital gain range
[ Upstream commit 73154aca4a03a2ab4833fd36683feb884af06d4b ] According to its datasheet, the digital gain should be -100 dB when CHx_DVOL is 1 and 27 dB when CHx_DVOL is 255. But with the current dig_vol_tlv, "Digital CHx Out Volume" shows 27.5 dB if CHx_DVOL is 255 and -95.5 dB if CHx_DVOL is 1. This commit fixes this bug. Fixes: 689c7655b50c ("ASoC: tlv320adcx140: Add the tlv320adcx140 codec driver family") Signed-off-by: Camel Guo <camelg@axis.com> Link: https://lore.kernel.org/r/20200908090417.16695-1-camel.guo@axis.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/tlv320adcx140.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c
index 03fb50175d87..a6273ccb8401 100644
--- a/sound/soc/codecs/tlv320adcx140.c
+++ b/sound/soc/codecs/tlv320adcx140.c
@@ -154,7 +154,7 @@ static const struct regmap_config adcx140_i2c_regmap = {
};
/* Digital Volume control. From -100 to 27 dB in 0.5 dB steps */
-static DECLARE_TLV_DB_SCALE(dig_vol_tlv, -10000, 50, 0);
+static DECLARE_TLV_DB_SCALE(dig_vol_tlv, -10050, 50, 0);
/* ADC gain. From 0 to 42 dB in 1 dB steps */
static DECLARE_TLV_DB_SCALE(adc_tlv, 0, 100, 0);