mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 22:24:11 +08:00
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>
This commit is contained in:
parent
c2bc65274a
commit
36acae192d
@ -287,6 +287,7 @@ static const DECLARE_TLV_DB_MINMAX_MUTE(dac_tlv, -3100, 100);
|
||||
static const DECLARE_TLV_DB_SCALE(adc_tlv, 0, 100, 0);
|
||||
static const DECLARE_TLV_DB_MINMAX(out_tlv, -2500, 100);
|
||||
static const DECLARE_TLV_DB_SCALE(linein_tlv, -2500, 100, 0);
|
||||
static const DECLARE_TLV_DB_MINMAX(mixer_tlv, -3100, 0);
|
||||
|
||||
/* Unconditional controls. */
|
||||
static const struct snd_kcontrol_new jz4760_codec_snd_controls[] = {
|
||||
@ -299,6 +300,14 @@ static const struct snd_kcontrol_new jz4760_codec_snd_controls[] = {
|
||||
JZ4760_CODEC_REG_GCR4, JZ4760_CODEC_REG_GCR3,
|
||||
REG_GCR_GAIN_OFFSET, REG_GCR_GAIN_MAX, 1, linein_tlv),
|
||||
|
||||
SOC_SINGLE_TLV("Mixer Capture Volume",
|
||||
JZ4760_CODEC_REG_MIX1,
|
||||
REG_GCR_GAIN_OFFSET, REG_GCR_GAIN_MAX, 1, mixer_tlv),
|
||||
|
||||
SOC_SINGLE_TLV("Mixer Playback Volume",
|
||||
JZ4760_CODEC_REG_MIX2,
|
||||
REG_GCR_GAIN_OFFSET, REG_GCR_GAIN_MAX, 1, mixer_tlv),
|
||||
|
||||
SOC_SINGLE("High-Pass Filter Capture Switch",
|
||||
JZ4760_CODEC_REG_CR4,
|
||||
REG_CR4_ADC_HPF_OFFSET, 1, 0),
|
||||
|
Loading…
Reference in New Issue
Block a user