Skip to content

Commit ba5080d

Browse files
Srinivas-Kandagatlagregkh
authored andcommitted
ASoC: codecs: wcd9335: move gains from SX_TLV to S8_TLV
[ Upstream commit 2fbe095 ] move all the digital gains form using SX_TLV to S8_TLV, these gains are actually 8 bit gains with 7th signed bit and ranges from -84dB to +40dB rest of the Qualcomm wcd codecs uses these properly. Fixes: 8c4f021 ("ASoC: wcd9335: add basic controls") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220609111901.318047-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent cc4d15f commit ba5080d

File tree

1 file changed

+36
-45
lines changed

1 file changed

+36
-45
lines changed

sound/soc/codecs/wcd9335.c

Lines changed: 36 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,51 +2259,42 @@ static int wcd9335_rx_hph_mode_put(struct snd_kcontrol *kc,
22592259

22602260
static const struct snd_kcontrol_new wcd9335_snd_controls[] = {
22612261
/* -84dB min - 40dB max */
2262-
SOC_SINGLE_SX_TLV("RX0 Digital Volume", WCD9335_CDC_RX0_RX_VOL_CTL,
2263-
0, -84, 40, digital_gain),
2264-
SOC_SINGLE_SX_TLV("RX1 Digital Volume", WCD9335_CDC_RX1_RX_VOL_CTL,
2265-
0, -84, 40, digital_gain),
2266-
SOC_SINGLE_SX_TLV("RX2 Digital Volume", WCD9335_CDC_RX2_RX_VOL_CTL,
2267-
0, -84, 40, digital_gain),
2268-
SOC_SINGLE_SX_TLV("RX3 Digital Volume", WCD9335_CDC_RX3_RX_VOL_CTL,
2269-
0, -84, 40, digital_gain),
2270-
SOC_SINGLE_SX_TLV("RX4 Digital Volume", WCD9335_CDC_RX4_RX_VOL_CTL,
2271-
0, -84, 40, digital_gain),
2272-
SOC_SINGLE_SX_TLV("RX5 Digital Volume", WCD9335_CDC_RX5_RX_VOL_CTL,
2273-
0, -84, 40, digital_gain),
2274-
SOC_SINGLE_SX_TLV("RX6 Digital Volume", WCD9335_CDC_RX6_RX_VOL_CTL,
2275-
0, -84, 40, digital_gain),
2276-
SOC_SINGLE_SX_TLV("RX7 Digital Volume", WCD9335_CDC_RX7_RX_VOL_CTL,
2277-
0, -84, 40, digital_gain),
2278-
SOC_SINGLE_SX_TLV("RX8 Digital Volume", WCD9335_CDC_RX8_RX_VOL_CTL,
2279-
0, -84, 40, digital_gain),
2280-
SOC_SINGLE_SX_TLV("RX0 Mix Digital Volume",
2281-
WCD9335_CDC_RX0_RX_VOL_MIX_CTL,
2282-
0, -84, 40, digital_gain),
2283-
SOC_SINGLE_SX_TLV("RX1 Mix Digital Volume",
2284-
WCD9335_CDC_RX1_RX_VOL_MIX_CTL,
2285-
0, -84, 40, digital_gain),
2286-
SOC_SINGLE_SX_TLV("RX2 Mix Digital Volume",
2287-
WCD9335_CDC_RX2_RX_VOL_MIX_CTL,
2288-
0, -84, 40, digital_gain),
2289-
SOC_SINGLE_SX_TLV("RX3 Mix Digital Volume",
2290-
WCD9335_CDC_RX3_RX_VOL_MIX_CTL,
2291-
0, -84, 40, digital_gain),
2292-
SOC_SINGLE_SX_TLV("RX4 Mix Digital Volume",
2293-
WCD9335_CDC_RX4_RX_VOL_MIX_CTL,
2294-
0, -84, 40, digital_gain),
2295-
SOC_SINGLE_SX_TLV("RX5 Mix Digital Volume",
2296-
WCD9335_CDC_RX5_RX_VOL_MIX_CTL,
2297-
0, -84, 40, digital_gain),
2298-
SOC_SINGLE_SX_TLV("RX6 Mix Digital Volume",
2299-
WCD9335_CDC_RX6_RX_VOL_MIX_CTL,
2300-
0, -84, 40, digital_gain),
2301-
SOC_SINGLE_SX_TLV("RX7 Mix Digital Volume",
2302-
WCD9335_CDC_RX7_RX_VOL_MIX_CTL,
2303-
0, -84, 40, digital_gain),
2304-
SOC_SINGLE_SX_TLV("RX8 Mix Digital Volume",
2305-
WCD9335_CDC_RX8_RX_VOL_MIX_CTL,
2306-
0, -84, 40, digital_gain),
2262+
SOC_SINGLE_S8_TLV("RX0 Digital Volume", WCD9335_CDC_RX0_RX_VOL_CTL,
2263+
-84, 40, digital_gain),
2264+
SOC_SINGLE_S8_TLV("RX1 Digital Volume", WCD9335_CDC_RX1_RX_VOL_CTL,
2265+
-84, 40, digital_gain),
2266+
SOC_SINGLE_S8_TLV("RX2 Digital Volume", WCD9335_CDC_RX2_RX_VOL_CTL,
2267+
-84, 40, digital_gain),
2268+
SOC_SINGLE_S8_TLV("RX3 Digital Volume", WCD9335_CDC_RX3_RX_VOL_CTL,
2269+
-84, 40, digital_gain),
2270+
SOC_SINGLE_S8_TLV("RX4 Digital Volume", WCD9335_CDC_RX4_RX_VOL_CTL,
2271+
-84, 40, digital_gain),
2272+
SOC_SINGLE_S8_TLV("RX5 Digital Volume", WCD9335_CDC_RX5_RX_VOL_CTL,
2273+
-84, 40, digital_gain),
2274+
SOC_SINGLE_S8_TLV("RX6 Digital Volume", WCD9335_CDC_RX6_RX_VOL_CTL,
2275+
-84, 40, digital_gain),
2276+
SOC_SINGLE_S8_TLV("RX7 Digital Volume", WCD9335_CDC_RX7_RX_VOL_CTL,
2277+
-84, 40, digital_gain),
2278+
SOC_SINGLE_S8_TLV("RX8 Digital Volume", WCD9335_CDC_RX8_RX_VOL_CTL,
2279+
-84, 40, digital_gain),
2280+
SOC_SINGLE_S8_TLV("RX0 Mix Digital Volume", WCD9335_CDC_RX0_RX_VOL_MIX_CTL,
2281+
-84, 40, digital_gain),
2282+
SOC_SINGLE_S8_TLV("RX1 Mix Digital Volume", WCD9335_CDC_RX1_RX_VOL_MIX_CTL,
2283+
-84, 40, digital_gain),
2284+
SOC_SINGLE_S8_TLV("RX2 Mix Digital Volume", WCD9335_CDC_RX2_RX_VOL_MIX_CTL,
2285+
-84, 40, digital_gain),
2286+
SOC_SINGLE_S8_TLV("RX3 Mix Digital Volume", WCD9335_CDC_RX3_RX_VOL_MIX_CTL,
2287+
-84, 40, digital_gain),
2288+
SOC_SINGLE_S8_TLV("RX4 Mix Digital Volume", WCD9335_CDC_RX4_RX_VOL_MIX_CTL,
2289+
-84, 40, digital_gain),
2290+
SOC_SINGLE_S8_TLV("RX5 Mix Digital Volume", WCD9335_CDC_RX5_RX_VOL_MIX_CTL,
2291+
-84, 40, digital_gain),
2292+
SOC_SINGLE_S8_TLV("RX6 Mix Digital Volume", WCD9335_CDC_RX6_RX_VOL_MIX_CTL,
2293+
-84, 40, digital_gain),
2294+
SOC_SINGLE_S8_TLV("RX7 Mix Digital Volume", WCD9335_CDC_RX7_RX_VOL_MIX_CTL,
2295+
-84, 40, digital_gain),
2296+
SOC_SINGLE_S8_TLV("RX8 Mix Digital Volume", WCD9335_CDC_RX8_RX_VOL_MIX_CTL,
2297+
-84, 40, digital_gain),
23072298
SOC_ENUM("RX INT0_1 HPF cut off", cf_int0_1_enum),
23082299
SOC_ENUM("RX INT0_2 HPF cut off", cf_int0_2_enum),
23092300
SOC_ENUM("RX INT1_1 HPF cut off", cf_int1_1_enum),

0 commit comments

Comments
 (0)