ASoC: cs53l30: Correct number of volume levels on SX controls
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Thu, 2 Jun 2022 16:21:16 +0000 (17:21 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 6 Jun 2022 12:08:57 +0000 (13:08 +0100)
This driver specified the maximum value rather than the number of volume
levels on the SX controls, this is incorrect, so correct them.

Reported-by: David Rhodes <david.rhodes@cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602162119.3393857-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs53l30.c

index 7035452..360ca2f 100644 (file)
@@ -348,22 +348,22 @@ static const struct snd_kcontrol_new cs53l30_snd_controls[] = {
        SOC_ENUM("ADC2 NG Delay", adc2_ng_delay_enum),
 
        SOC_SINGLE_SX_TLV("ADC1A PGA Volume",
-                   CS53L30_ADC1A_AFE_CTL, 0, 0x34, 0x18, pga_tlv),
+                   CS53L30_ADC1A_AFE_CTL, 0, 0x34, 0x24, pga_tlv),
        SOC_SINGLE_SX_TLV("ADC1B PGA Volume",
-                   CS53L30_ADC1B_AFE_CTL, 0, 0x34, 0x18, pga_tlv),
+                   CS53L30_ADC1B_AFE_CTL, 0, 0x34, 0x24, pga_tlv),
        SOC_SINGLE_SX_TLV("ADC2A PGA Volume",
-                   CS53L30_ADC2A_AFE_CTL, 0, 0x34, 0x18, pga_tlv),
+                   CS53L30_ADC2A_AFE_CTL, 0, 0x34, 0x24, pga_tlv),
        SOC_SINGLE_SX_TLV("ADC2B PGA Volume",
-                   CS53L30_ADC2B_AFE_CTL, 0, 0x34, 0x18, pga_tlv),
+                   CS53L30_ADC2B_AFE_CTL, 0, 0x34, 0x24, pga_tlv),
 
        SOC_SINGLE_SX_TLV("ADC1A Digital Volume",
-                   CS53L30_ADC1A_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv),
+                   CS53L30_ADC1A_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv),
        SOC_SINGLE_SX_TLV("ADC1B Digital Volume",
-                   CS53L30_ADC1B_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv),
+                   CS53L30_ADC1B_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv),
        SOC_SINGLE_SX_TLV("ADC2A Digital Volume",
-                   CS53L30_ADC2A_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv),
+                   CS53L30_ADC2A_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv),
        SOC_SINGLE_SX_TLV("ADC2B Digital Volume",
-                   CS53L30_ADC2B_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv),
+                   CS53L30_ADC2B_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv),
 };
 
 static const struct snd_soc_dapm_widget cs53l30_dapm_widgets[] = {