mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
ASoC: codecs/jz4770: Add missing gain control after DAC/ADC mixer
The capture and playback paths both have a configurable gain after their respective mixer, which can be set from -31 dB to 0 dB in 32 steps. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20211125232543.117074-1-paul@crapouillou.net Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
f670b274f7
commit
0b18939594
@ -307,6 +307,7 @@ static const DECLARE_TLV_DB_MINMAX_MUTE(dac_tlv, -3100, 0);
|
|||||||
static const DECLARE_TLV_DB_SCALE(adc_tlv, 0, 100, 0);
|
static const DECLARE_TLV_DB_SCALE(adc_tlv, 0, 100, 0);
|
||||||
static const DECLARE_TLV_DB_MINMAX(out_tlv, -2500, 600);
|
static const DECLARE_TLV_DB_MINMAX(out_tlv, -2500, 600);
|
||||||
static const DECLARE_TLV_DB_SCALE(linein_tlv, -2500, 100, 0);
|
static const DECLARE_TLV_DB_SCALE(linein_tlv, -2500, 100, 0);
|
||||||
|
static const DECLARE_TLV_DB_MINMAX(mixer_tlv, -3100, 0);
|
||||||
|
|
||||||
/* Unconditional controls. */
|
/* Unconditional controls. */
|
||||||
static const struct snd_kcontrol_new jz4770_codec_snd_controls[] = {
|
static const struct snd_kcontrol_new jz4770_codec_snd_controls[] = {
|
||||||
@ -319,6 +320,14 @@ static const struct snd_kcontrol_new jz4770_codec_snd_controls[] = {
|
|||||||
SOC_DOUBLE_R_TLV("Line In Bypass Playback Volume",
|
SOC_DOUBLE_R_TLV("Line In Bypass Playback Volume",
|
||||||
JZ4770_CODEC_REG_GCR_LIBYL, JZ4770_CODEC_REG_GCR_LIBYR,
|
JZ4770_CODEC_REG_GCR_LIBYL, JZ4770_CODEC_REG_GCR_LIBYR,
|
||||||
REG_GCR_GAIN_OFFSET, REG_GCR_GAIN_MAX, 1, linein_tlv),
|
REG_GCR_GAIN_OFFSET, REG_GCR_GAIN_MAX, 1, linein_tlv),
|
||||||
|
|
||||||
|
SOC_SINGLE_TLV("Mixer Capture Volume",
|
||||||
|
JZ4770_CODEC_REG_GCR_MIXADC,
|
||||||
|
REG_GCR_GAIN_OFFSET, REG_GCR_GAIN_MAX, 1, mixer_tlv),
|
||||||
|
|
||||||
|
SOC_SINGLE_TLV("Mixer Playback Volume",
|
||||||
|
JZ4770_CODEC_REG_GCR_MIXDAC,
|
||||||
|
REG_GCR_GAIN_OFFSET, REG_GCR_GAIN_MAX, 1, mixer_tlv),
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct snd_kcontrol_new jz4770_codec_pcm_playback_controls[] = {
|
static const struct snd_kcontrol_new jz4770_codec_pcm_playback_controls[] = {
|
||||||
|
Loading…
Reference in New Issue
Block a user