]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: codecs: wcd938x: fix dB range for HPHL and HPHR
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Wed, 5 Jul 2023 12:57:23 +0000 (13:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:50:36 +0000 (08:50 +0200)
commit5da98d0438bd1cbee90680e6233d682314e5df70
tree7e3117e8d5f6ba46513241808631e3451806d4ad
parente3495bc99464f5d680a611a04a760492f52a9744
ASoC: codecs: wcd938x: fix dB range for HPHL and HPHR

[ Upstream commit c03226ba15fe3c42d13907ec7d8536396602557b ]

dB range for HPHL and HPHR gains are from +6dB to -30dB in steps of
1.5dB with register values range from 0 to 24.

Current code maps these dB ranges incorrectly, fix them to allow proper
volume setting.

Fixes: e8ba1e05bdc0 ("ASoC: codecs: wcd938x: add basic controls")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230705125723.40464-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/wcd938x.c