Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs/jz4760: add digital gain controls

Both the DAC and ADC have digital gain controls available
for their mixers, which go from -31 to 0db by step of 1db.

Signed-off-by: Christophe Branchereau <cbranchereau@gmail.com>
Link: https://lore.kernel.org/r/20230122210703.2552384-1-cbranchereau@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Christophe Branchereau and committed by
Mark Brown
36acae19 c2bc6527

+9
+9
sound/soc/codecs/jz4760.c
··· 287 287 static const DECLARE_TLV_DB_SCALE(adc_tlv, 0, 100, 0); 288 288 static const DECLARE_TLV_DB_MINMAX(out_tlv, -2500, 100); 289 289 static const DECLARE_TLV_DB_SCALE(linein_tlv, -2500, 100, 0); 290 + static const DECLARE_TLV_DB_MINMAX(mixer_tlv, -3100, 0); 290 291 291 292 /* Unconditional controls. */ 292 293 static const struct snd_kcontrol_new jz4760_codec_snd_controls[] = { ··· 299 298 SOC_DOUBLE_R_TLV("Line In Bypass Playback Volume", 300 299 JZ4760_CODEC_REG_GCR4, JZ4760_CODEC_REG_GCR3, 301 300 REG_GCR_GAIN_OFFSET, REG_GCR_GAIN_MAX, 1, linein_tlv), 301 + 302 + SOC_SINGLE_TLV("Mixer Capture Volume", 303 + JZ4760_CODEC_REG_MIX1, 304 + REG_GCR_GAIN_OFFSET, REG_GCR_GAIN_MAX, 1, mixer_tlv), 305 + 306 + SOC_SINGLE_TLV("Mixer Playback Volume", 307 + JZ4760_CODEC_REG_MIX2, 308 + REG_GCR_GAIN_OFFSET, REG_GCR_GAIN_MAX, 1, mixer_tlv), 302 309 303 310 SOC_SINGLE("High-Pass Filter Capture Switch", 304 311 JZ4760_CODEC_REG_CR4,