]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: cs42l42: Correct definition of ADC Volume control
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Thu, 29 Jul 2021 17:09:27 +0000 (18:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Aug 2021 06:56:57 +0000 (08:56 +0200)
commitf6467ebd03865a1665d706b87889ed950f41a21f
tree4ecc744add833a507c5644497d22c48903746513
parentf6ecc9382f6b101ccafbdcb1304fb0510bc25764
ASoC: cs42l42: Correct definition of ADC Volume control

[ Upstream commit ee86f680ff4c9b406d49d4e22ddf10805b8a2137 ]

The ADC volume is a signed 8-bit number with range -97 to +12,
with -97 being mute. Use a SOC_SINGLE_S8_TLV() to define this
and fix the DECLARE_TLV_DB_SCALE() to have the correct start and
mute flag.

Fixes: 76df8a58a574 ("ASoC: Add support for CS42L42 codec")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210729170929.6589-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/cs42l42.c