* [PATCH] ASoC: codecs/jz4760: add digital gain controls
@ 2023-01-22 21:07 Christophe Branchereau
2023-02-01 17:32 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Branchereau @ 2023-01-22 21:07 UTC (permalink / raw)
To: paul, lgirdwood, broonie, perex, tiwai, linux-mips, alsa-devel,
linux-kernel
Cc: Christophe Branchereau
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>
---
sound/soc/codecs/jz4760.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/soc/codecs/jz4760.c b/sound/soc/codecs/jz4760.c
index d96a4f6c9183..9df58e23d360 100644
--- a/sound/soc/codecs/jz4760.c
+++ b/sound/soc/codecs/jz4760.c
@@ -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),
--
2.39.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: codecs/jz4760: add digital gain controls
2023-01-22 21:07 [PATCH] ASoC: codecs/jz4760: add digital gain controls Christophe Branchereau
@ 2023-02-01 17:32 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-02-01 17:32 UTC (permalink / raw)
To: paul, lgirdwood, perex, tiwai, linux-mips, alsa-devel,
linux-kernel, Christophe Branchereau
On Sun, 22 Jan 2023 22:07:03 +0100, Christophe Branchereau wrote:
> Both the DAC and ADC have digital gain controls available
> for their mixers, which go from -31 to 0db by step of 1db.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: codecs/jz4760: add digital gain controls
commit: 36acae192d65195342d02595f45e404cc0f2eca0
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-01 17:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-22 21:07 [PATCH] ASoC: codecs/jz4760: add digital gain controls Christophe Branchereau
2023-02-01 17:32 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).