]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: cs42l43: Fix maximum ADC Volume
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Thu, 6 Mar 2025 13:32:54 +0000 (13:32 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 6 Mar 2025 13:37:20 +0000 (13:37 +0000)
The range of ADC volume is -1 -> 3 (-6 to 18dB) so the number of levels
should actually be 4.

Fixes: fc918cbe874e ("ASoC: cs42l43: Add support for the cs42l43")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250306133254.1861046-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l43.c

index 4257dbefe9dd105b6353608167e8137e06535446..d307b56a7f38e6dbac0270736101f5733ba6bc73 100644 (file)
@@ -1146,7 +1146,7 @@ static const struct snd_kcontrol_new cs42l43_controls[] = {
 
        SOC_DOUBLE_R_SX_TLV("ADC Volume", CS42L43_ADC_B_CTRL1, CS42L43_ADC_B_CTRL2,
                            CS42L43_ADC_PGA_GAIN_SHIFT,
-                           0xF, 5, cs42l43_adc_tlv),
+                           0xF, 4, cs42l43_adc_tlv),
 
        SOC_DOUBLE("PDM1 Invert Switch", CS42L43_DMIC_PDM_CTRL,
                   CS42L43_PDM1L_INV_SHIFT, CS42L43_PDM1R_INV_SHIFT, 1, 0),