* [PATCH 0/3] ASoC: codecs: Fix more control definitions that write another control's bits
@ 2026-10-18 6:47 HyeongJun An
2026-10-18 6:47 ` [PATCH 1/3] ASoC: codecs: sta32x: Fix definition of limiter threshold controls HyeongJun An
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: HyeongJun An @ 2026-10-18 6:47 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, shenghao-ding, kevin-lu, baojun.xu, sen, marex,
linux-sound, linux-kernel
These are the last fixes found by the overlap scan from the first
series [1]. In sta32x and sta350 a 4-bit field has a maximum of 16, so
the control also writes the bit above it. In tlv320aic32x4 a TAS2505
control uses the wrong register.
[1] https://lore.kernel.org/all/20261008130953.2446692-1-sammiee5311@gmail.com/
HyeongJun An (3):
ASoC: codecs: sta32x: Fix definition of limiter threshold controls
ASoC: codecs: sta350: Fix definition of limiter threshold controls
ASoC: tlv320aic32x4: Fix definition of TAS2505 HP Driver Gain Volume
control
sound/soc/codecs/sta32x.c | 16 ++++++++--------
sound/soc/codecs/sta350.c | 16 ++++++++--------
sound/soc/codecs/tlv320aic32x4.c | 2 +-
sound/soc/codecs/tlv320aic32x4.h | 1 +
4 files changed, 18 insertions(+), 17 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] ASoC: codecs: sta32x: Fix definition of limiter threshold controls
2026-10-18 6:47 [PATCH 0/3] ASoC: codecs: Fix more control definitions that write another control's bits HyeongJun An
@ 2026-10-18 6:47 ` HyeongJun An
2026-10-18 6:47 ` [PATCH 2/3] ASoC: codecs: sta350: " HyeongJun An
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: HyeongJun An @ 2026-10-18 6:47 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, shenghao-ding, kevin-lu, baojun.xu, sen, marex,
linux-sound, linux-kernel
The limiter attack and release thresholds are the two 4-bit halves of
one register, so their maximum is 15, not 16. With 16 the controls on
bits 3:0 also write bit 4, which belongs to the other threshold.
Fixes: c034abf6e503 ("ASoC: add STA32X codec driver")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
---
sound/soc/codecs/sta32x.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index 1e4a19769618..773a9b203456 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -507,21 +507,21 @@ SOC_ENUM("Limiter2 Release Rate (dB/ms)", sta32x_limiter2_release_rate_enum),
* two different enum definitions; provide both
*/
SOC_SINGLE_TLV("Limiter1 Attack Threshold (AC Mode)", STA32X_L1ATRT, STA32X_LxA_SHIFT,
- 16, 0, sta32x_limiter_ac_attack_tlv),
+ 15, 0, sta32x_limiter_ac_attack_tlv),
SOC_SINGLE_TLV("Limiter2 Attack Threshold (AC Mode)", STA32X_L2ATRT, STA32X_LxA_SHIFT,
- 16, 0, sta32x_limiter_ac_attack_tlv),
+ 15, 0, sta32x_limiter_ac_attack_tlv),
SOC_SINGLE_TLV("Limiter1 Release Threshold (AC Mode)", STA32X_L1ATRT, STA32X_LxR_SHIFT,
- 16, 0, sta32x_limiter_ac_release_tlv),
+ 15, 0, sta32x_limiter_ac_release_tlv),
SOC_SINGLE_TLV("Limiter2 Release Threshold (AC Mode)", STA32X_L2ATRT, STA32X_LxR_SHIFT,
- 16, 0, sta32x_limiter_ac_release_tlv),
+ 15, 0, sta32x_limiter_ac_release_tlv),
SOC_SINGLE_TLV("Limiter1 Attack Threshold (DRC Mode)", STA32X_L1ATRT, STA32X_LxA_SHIFT,
- 16, 0, sta32x_limiter_drc_attack_tlv),
+ 15, 0, sta32x_limiter_drc_attack_tlv),
SOC_SINGLE_TLV("Limiter2 Attack Threshold (DRC Mode)", STA32X_L2ATRT, STA32X_LxA_SHIFT,
- 16, 0, sta32x_limiter_drc_attack_tlv),
+ 15, 0, sta32x_limiter_drc_attack_tlv),
SOC_SINGLE_TLV("Limiter1 Release Threshold (DRC Mode)", STA32X_L1ATRT, STA32X_LxR_SHIFT,
- 16, 0, sta32x_limiter_drc_release_tlv),
+ 15, 0, sta32x_limiter_drc_release_tlv),
SOC_SINGLE_TLV("Limiter2 Release Threshold (DRC Mode)", STA32X_L2ATRT, STA32X_LxR_SHIFT,
- 16, 0, sta32x_limiter_drc_release_tlv),
+ 15, 0, sta32x_limiter_drc_release_tlv),
BIQUAD_COEFS("Ch1 - Biquad 1", 0),
BIQUAD_COEFS("Ch1 - Biquad 2", 5),
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] ASoC: codecs: sta350: Fix definition of limiter threshold controls
2026-10-18 6:47 [PATCH 0/3] ASoC: codecs: Fix more control definitions that write another control's bits HyeongJun An
2026-10-18 6:47 ` [PATCH 1/3] ASoC: codecs: sta32x: Fix definition of limiter threshold controls HyeongJun An
@ 2026-10-18 6:47 ` HyeongJun An
2026-10-18 6:47 ` [PATCH 3/3] ASoC: tlv320aic32x4: Fix definition of TAS2505 HP Driver Gain Volume control HyeongJun An
2026-10-18 12:23 ` [PATCH 0/3] ASoC: codecs: Fix more control definitions that write another control's bits Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: HyeongJun An @ 2026-10-18 6:47 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, shenghao-ding, kevin-lu, baojun.xu, sen, marex,
linux-sound, linux-kernel
The limiter attack and release thresholds are the two 4-bit halves of
one register, so their maximum is 15, not 16. With 16 the controls on
bits 3:0 also write bit 4, which belongs to the other threshold.
Fixes: 2439ea1f0f8f ("ASoC: sta350: Add codec driver")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
---
sound/soc/codecs/sta350.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/sta350.c b/sound/soc/codecs/sta350.c
index 95aee5aa2bff..acf5dc618398 100644
--- a/sound/soc/codecs/sta350.c
+++ b/sound/soc/codecs/sta350.c
@@ -502,28 +502,28 @@ SOC_ENUM("Limiter2 Release Rate (dB/ms)", sta350_limiter2_release_rate_enum),
*/
SOC_SINGLE_TLV("Limiter1 Attack Threshold (AC Mode)",
STA350_L1ATRT, STA350_LxA_SHIFT,
- 16, 0, sta350_limiter_ac_attack_tlv),
+ 15, 0, sta350_limiter_ac_attack_tlv),
SOC_SINGLE_TLV("Limiter2 Attack Threshold (AC Mode)",
STA350_L2ATRT, STA350_LxA_SHIFT,
- 16, 0, sta350_limiter_ac_attack_tlv),
+ 15, 0, sta350_limiter_ac_attack_tlv),
SOC_SINGLE_TLV("Limiter1 Release Threshold (AC Mode)",
STA350_L1ATRT, STA350_LxR_SHIFT,
- 16, 0, sta350_limiter_ac_release_tlv),
+ 15, 0, sta350_limiter_ac_release_tlv),
SOC_SINGLE_TLV("Limiter2 Release Threshold (AC Mode)",
STA350_L2ATRT, STA350_LxR_SHIFT,
- 16, 0, sta350_limiter_ac_release_tlv),
+ 15, 0, sta350_limiter_ac_release_tlv),
SOC_SINGLE_TLV("Limiter1 Attack Threshold (DRC Mode)",
STA350_L1ATRT, STA350_LxA_SHIFT,
- 16, 0, sta350_limiter_drc_attack_tlv),
+ 15, 0, sta350_limiter_drc_attack_tlv),
SOC_SINGLE_TLV("Limiter2 Attack Threshold (DRC Mode)",
STA350_L2ATRT, STA350_LxA_SHIFT,
- 16, 0, sta350_limiter_drc_attack_tlv),
+ 15, 0, sta350_limiter_drc_attack_tlv),
SOC_SINGLE_TLV("Limiter1 Release Threshold (DRC Mode)",
STA350_L1ATRT, STA350_LxR_SHIFT,
- 16, 0, sta350_limiter_drc_release_tlv),
+ 15, 0, sta350_limiter_drc_release_tlv),
SOC_SINGLE_TLV("Limiter2 Release Threshold (DRC Mode)",
STA350_L2ATRT, STA350_LxR_SHIFT,
- 16, 0, sta350_limiter_drc_release_tlv),
+ 15, 0, sta350_limiter_drc_release_tlv),
BIQUAD_COEFS("Ch1 - Biquad 1", 0),
BIQUAD_COEFS("Ch1 - Biquad 2", 5),
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] ASoC: tlv320aic32x4: Fix definition of TAS2505 HP Driver Gain Volume control
2026-10-18 6:47 [PATCH 0/3] ASoC: codecs: Fix more control definitions that write another control's bits HyeongJun An
2026-10-18 6:47 ` [PATCH 1/3] ASoC: codecs: sta32x: Fix definition of limiter threshold controls HyeongJun An
2026-10-18 6:47 ` [PATCH 2/3] ASoC: codecs: sta350: " HyeongJun An
@ 2026-10-18 6:47 ` HyeongJun An
2026-10-18 12:23 ` [PATCH 0/3] ASoC: codecs: Fix more control definitions that write another control's bits Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: HyeongJun An @ 2026-10-18 6:47 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, shenghao-ding, kevin-lu, baojun.xu, sen, marex,
linux-sound, linux-kernel
The TAS2505 HP volume is bits 6:0 of page 1 register 22, not of
register 16, which holds the HP driver mute (bit 6) and gain
(bits 5:0).
Fixes: 2169d6a0f072 ("ASoC: tlv320aic32x4: Fix TAS2505 volume controls")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
---
sound/soc/codecs/tlv320aic32x4.c | 2 +-
sound/soc/codecs/tlv320aic32x4.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index 7fec94768afb..2ee4a9d2abf2 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -1057,7 +1057,7 @@ static const struct snd_kcontrol_new aic32x4_tas2505_snd_controls[] = {
SOC_ENUM("DAC Playback PowerTune Switch", l_ptm_enum),
SOC_SINGLE_TLV("HP Driver Gain Volume",
- AIC32X4_HPLGAIN, 0, 0x74, 1, tlv_tas_driver_gain),
+ TAS2505_HPVOL, 0, 0x74, 1, tlv_tas_driver_gain),
SOC_SINGLE("HP DAC Playback Switch", AIC32X4_HPLGAIN, 6, 1, 1),
SOC_SINGLE_TLV("Speaker Driver Playback Volume",
diff --git a/sound/soc/codecs/tlv320aic32x4.h b/sound/soc/codecs/tlv320aic32x4.h
index cfab6f8ce5ac..d0c2e1002e99 100644
--- a/sound/soc/codecs/tlv320aic32x4.h
+++ b/sound/soc/codecs/tlv320aic32x4.h
@@ -94,6 +94,7 @@ int aic32x4_register_clocks(struct device *dev, const char *mclk_name);
#define AIC32X4_LOLGAIN AIC32X4_REG(1, 18)
#define AIC32X4_LORGAIN AIC32X4_REG(1, 19)
#define AIC32X4_HEADSTART AIC32X4_REG(1, 20)
+#define TAS2505_HPVOL AIC32X4_REG(1, 22)
#define TAS2505_SPK AIC32X4_REG(1, 45)
#define TAS2505_SPKVOL1 AIC32X4_REG(1, 46)
#define TAS2505_SPKVOL2 AIC32X4_REG(1, 48)
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] ASoC: codecs: Fix more control definitions that write another control's bits
2026-10-18 6:47 [PATCH 0/3] ASoC: codecs: Fix more control definitions that write another control's bits HyeongJun An
` (2 preceding siblings ...)
2026-10-18 6:47 ` [PATCH 3/3] ASoC: tlv320aic32x4: Fix definition of TAS2505 HP Driver Gain Volume control HyeongJun An
@ 2026-10-18 12:23 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-10-18 12:23 UTC (permalink / raw)
To: HyeongJun An
Cc: lgirdwood, shenghao-ding, kevin-lu, baojun.xu, sen, marex,
linux-sound, linux-kernel
On Sun, 18 Oct 2026 15:47:43 +0900, HyeongJun An wrote:
> ASoC: codecs: Fix more control definitions that write another control's bits
>
> These are the last fixes found by the overlap scan from the first
> series [1]. In sta32x and sta350 a 4-bit field has a maximum of 16, so
> the control also writes the bit above it. In tlv320aic32x4 a TAS2505
> control uses the wrong register.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4
Thanks!
[1/3] ASoC: codecs: sta32x: Fix definition of limiter threshold controls
https://git.kernel.org/broonie/sound/c/e06bf60ee5bf
[2/3] ASoC: codecs: sta350: Fix definition of limiter threshold controls
https://git.kernel.org/broonie/sound/c/77623752c156
[3/3] ASoC: tlv320aic32x4: Fix definition of TAS2505 HP Driver Gain Volume control
https://git.kernel.org/broonie/sound/c/f28c09b7e62f
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] 5+ messages in thread
end of thread, other threads:[~2026-10-18 20:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-18 6:47 [PATCH 0/3] ASoC: codecs: Fix more control definitions that write another control's bits HyeongJun An
2026-10-18 6:47 ` [PATCH 1/3] ASoC: codecs: sta32x: Fix definition of limiter threshold controls HyeongJun An
2026-10-18 6:47 ` [PATCH 2/3] ASoC: codecs: sta350: " HyeongJun An
2026-10-18 6:47 ` [PATCH 3/3] ASoC: tlv320aic32x4: Fix definition of TAS2505 HP Driver Gain Volume control HyeongJun An
2026-10-18 12:23 ` [PATCH 0/3] ASoC: codecs: Fix more control definitions that write another control's bits Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox