Skip to content

Commit ce40d93

Browse files
committed
ASoC: mt8192: Fix range for sidetone positive gain
The Sidetone_Positive_Gain_dB control reports a range of 0..100 as valid but the put() function rejects anything larger than 24. Fix this. There are numerous other problems with this control, the name is very non idiomatic and it should be a TLV, but it's ABI so probably we should leave those alone. Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230223-asoc-mt8192-quick-fixes-v1-4-9a85f90368e1@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 05437a9 commit ce40d93

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/soc/mediatek/mt8192/mt8192-dai-adda.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ static int mt8192_adda6_only_set(struct snd_kcontrol *kcontrol,
670670
static const struct snd_kcontrol_new mtk_adda_controls[] = {
671671
SOC_SINGLE("Sidetone_Gain", AFE_SIDETONE_GAIN,
672672
SIDE_TONE_GAIN_SFT, SIDE_TONE_GAIN_MASK, 0),
673-
SOC_SINGLE_EXT("Sidetone_Positive_Gain_dB", SND_SOC_NOPM, 0, 100, 0,
673+
SOC_SINGLE_EXT("Sidetone_Positive_Gain_dB", SND_SOC_NOPM, 0, 24, 0,
674674
stf_positive_gain_get, stf_positive_gain_set),
675675
SOC_SINGLE("ADDA_DL_GAIN", AFE_ADDA_DL_SRC2_CON1,
676676
DL_2_GAIN_CTL_PRE_SFT, DL_2_GAIN_CTL_PRE_MASK, 0),

0 commit comments

Comments
 (0)