* [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
2026-10-18 6:47 ` [PATCH 3/3] ASoC: tlv320aic32x4: Fix definition of TAS2505 HP Driver Gain Volume control HyeongJun An
2 siblings, 0 replies; 4+ 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] 4+ 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
2 siblings, 0 replies; 4+ 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] 4+ 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
2 siblings, 0 replies; 4+ 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] 4+ messages in thread