* [PATCH] ASoC: codecs: Fix gain setting ranges for Renesas IDT821034 codec
@ 2025-10-09 17:03 Christophe Leroy
2025-10-10 7:16 ` Herve Codina
2025-10-15 9:49 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Christophe Leroy @ 2025-10-09 17:03 UTC (permalink / raw)
To: Herve Codina, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai
Cc: Christophe Leroy, linux-sound, linux-kernel
The gain ranges specified in Renesas IDT821034 codec documentation
are [-3dB;+13dB] in the transmit path (ADC) and [-13dB;+3dB] in the
receive path (DAC). Allthough the registers allow programming values
outside those ranges, the signal S/N and distorsion are only
guaranteed in the specified ranges.
Set ranges to the specified ones.
Fixes: e51166990e81 ("ASoC: codecs: Add support for the Renesas IDT821034 codec")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
sound/soc/codecs/idt821034.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/idt821034.c b/sound/soc/codecs/idt821034.c
index a03d4e5e7d144..cab2f2eecdfba 100644
--- a/sound/soc/codecs/idt821034.c
+++ b/sound/soc/codecs/idt821034.c
@@ -548,14 +548,14 @@ static int idt821034_kctrl_mute_put(struct snd_kcontrol *kcontrol,
return ret;
}
-static const DECLARE_TLV_DB_LINEAR(idt821034_gain_in, -6520, 1306);
-#define IDT821034_GAIN_IN_MIN_RAW 1 /* -65.20 dB -> 10^(-65.2/20.0) * 1820 = 1 */
-#define IDT821034_GAIN_IN_MAX_RAW 8191 /* 13.06 dB -> 10^(13.06/20.0) * 1820 = 8191 */
+static const DECLARE_TLV_DB_LINEAR(idt821034_gain_in, -300, 1300);
+#define IDT821034_GAIN_IN_MIN_RAW 1288 /* -3.0 dB -> 10^(-3.0/20.0) * 1820 = 1288 */
+#define IDT821034_GAIN_IN_MAX_RAW 8130 /* 13.0 dB -> 10^(13.0/20.0) * 1820 = 8130 */
#define IDT821034_GAIN_IN_INIT_RAW 1820 /* 0dB -> 10^(0/20) * 1820 = 1820 */
-static const DECLARE_TLV_DB_LINEAR(idt821034_gain_out, -6798, 1029);
-#define IDT821034_GAIN_OUT_MIN_RAW 1 /* -67.98 dB -> 10^(-67.98/20.0) * 2506 = 1*/
-#define IDT821034_GAIN_OUT_MAX_RAW 8191 /* 10.29 dB -> 10^(10.29/20.0) * 2506 = 8191 */
+static const DECLARE_TLV_DB_LINEAR(idt821034_gain_out, -1300, 300);
+#define IDT821034_GAIN_OUT_MIN_RAW 561 /* -13.0 dB -> 10^(-13.0/20.0) * 2506 = 561 */
+#define IDT821034_GAIN_OUT_MAX_RAW 3540 /* 3.0 dB -> 10^(3.0/20.0) * 2506 = 3540 */
#define IDT821034_GAIN_OUT_INIT_RAW 2506 /* 0dB -> 10^(0/20) * 2506 = 2506 */
static const struct snd_kcontrol_new idt821034_controls[] = {
--
2.49.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: codecs: Fix gain setting ranges for Renesas IDT821034 codec
2025-10-09 17:03 [PATCH] ASoC: codecs: Fix gain setting ranges for Renesas IDT821034 codec Christophe Leroy
@ 2025-10-10 7:16 ` Herve Codina
2025-10-15 9:49 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Herve Codina @ 2025-10-10 7:16 UTC (permalink / raw)
To: Christophe Leroy
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
linux-sound, linux-kernel
Hi Christophe,
On Thu, 9 Oct 2025 19:03:13 +0200
Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
> The gain ranges specified in Renesas IDT821034 codec documentation
> are [-3dB;+13dB] in the transmit path (ADC) and [-13dB;+3dB] in the
> receive path (DAC). Allthough the registers allow programming values
> outside those ranges, the signal S/N and distorsion are only
> guaranteed in the specified ranges.
>
> Set ranges to the specified ones.
>
> Fixes: e51166990e81 ("ASoC: codecs: Add support for the Renesas IDT821034 codec")
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
Acked-by: Herve Codina <herve.codina@bootlin.com>
Thanks for the modification.
Best regards,
Hervé
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: codecs: Fix gain setting ranges for Renesas IDT821034 codec
2025-10-09 17:03 [PATCH] ASoC: codecs: Fix gain setting ranges for Renesas IDT821034 codec Christophe Leroy
2025-10-10 7:16 ` Herve Codina
@ 2025-10-15 9:49 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2025-10-15 9:49 UTC (permalink / raw)
To: Herve Codina, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Christophe Leroy
Cc: linux-sound, linux-kernel
On Thu, 09 Oct 2025 19:03:13 +0200, Christophe Leroy wrote:
> The gain ranges specified in Renesas IDT821034 codec documentation
> are [-3dB;+13dB] in the transmit path (ADC) and [-13dB;+3dB] in the
> receive path (DAC). Allthough the registers allow programming values
> outside those ranges, the signal S/N and distorsion are only
> guaranteed in the specified ranges.
>
> Set ranges to the specified ones.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: codecs: Fix gain setting ranges for Renesas IDT821034 codec
commit: 6370a996f308ea3276030769b7482b346e7cc7c1
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] 3+ messages in thread
end of thread, other threads:[~2025-10-15 9:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-09 17:03 [PATCH] ASoC: codecs: Fix gain setting ranges for Renesas IDT821034 codec Christophe Leroy
2025-10-10 7:16 ` Herve Codina
2025-10-15 9:49 ` 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).