Skip to contentSkip to conversation

ASoC: codecs: Fix control definitions that write another control's register

PATCH In review HyeongJun An 2 participants 6 messages Oct 16 – Oct 18

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover ASoC: codecs: Fix control definitions that write another control's register

These are more fixes found by the overlap scan from the first series [1]. In each driver a control writes the register of another control.

[1] https://lore.kernel.org/all/[email protected]/

HyeongJun An (4):
ASoC: codecs: da732x: Fix definition of ADC2 EQ Overall Volume control
ASoC: codecs: tlv320adc3xxx: Fix definition of AGC Target Level
control
ASoC: codecs: sta32x: Fix definition of Ch2 and Ch3 Volume Bypass
controls
ASoC: codecs: sta350: Fix definition of Ch2 and Ch3 Volume Bypass
controls

 sound/soc/codecs/da732x.c        | 2 +-
 sound/soc/codecs/sta32x.c        | 4 ++--
 sound/soc/codecs/sta350.c        | 4 ++--
 sound/soc/codecs/tlv320adc3xxx.c | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/4 ASoC: codecs: da732x: Fix definition of ADC2 EQ Overall Volume control

The ADC2 EQ overall volume is in DA732X_REG_ADC2_EQ5 (0x9F), not in DA732X_REG_ADC1_EQ5 (0x97), which holds the ADC1 one.

Fixes 48e278746070 ("ASoC: codecs: Add DA732x codec driver")
Assisted-by Claude:claude-opus-5-5
---
 sound/soc/codecs/da732x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/da732x.c +1 -1
index c9b6172ac0a1..e417c7ada237 100644
@@ -511,7 +511,7 @@ static const struct snd_kcontrol_new da732x_snd_controls[] = {
 	SOC_SINGLE_TLV("ACD2 EQ Band 5 Volume", DA732X_REG_ADC2_EQ5,
 		       DA732X_EQ_BAND5_SHIFT, DA732X_EQ_VOL_VAL_MAX,
 		       DA732X_INVERT, eq_band_pga_tlv),
-	SOC_SINGLE_TLV("ADC2 EQ Overall Volume", DA732X_REG_ADC1_EQ5,
+	SOC_SINGLE_TLV("ADC2 EQ Overall Volume", DA732X_REG_ADC2_EQ5,
 		       DA732X_EQ_OVERALL_SHIFT, DA732X_EQ_OVERALL_VOL_VAL_MAX,
 		       DA732X_INVERT, eq_overall_tlv),
 
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/4 ASoC: codecs: tlv320adc3xxx: Fix definition of AGC Target Level control

In reply to HyeongJun An

The right channel AGC target level is in RIGHT_CHN_AGC_1, as on the left, not in RIGHT_CHN_AGC_2, which holds the right noise threshold and hysteresis.

Fixes e9a3b57efd28 ("ASoC: codec: tlv320adc3xxx: New codec driver")
Assisted-by Claude:claude-opus-5-5
---
 sound/soc/codecs/tlv320adc3xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/tlv320adc3xxx.c +1 -1
index 528c44446482..79f4abc245dd 100644
@@ -691,7 +691,7 @@ static const struct snd_kcontrol_new adc3xxx_snd_controls[] = {
 	SOC_DOUBLE_R("AGC Capture Switch", ADC3XXX_LEFT_CHN_AGC_1,
 		     ADC3XXX_RIGHT_CHN_AGC_1, 7, 1, 0),
 	SOC_DOUBLE_R_TLV("AGC Target Level Capture Volume", ADC3XXX_LEFT_CHN_AGC_1,
-		     ADC3XXX_RIGHT_CHN_AGC_2, 4, 0x07, 1, agc_target_tlv),
+		     ADC3XXX_RIGHT_CHN_AGC_1, 4, 0x07, 1, agc_target_tlv),
 	SOC_DOUBLE_R_TLV("AGC Noise Threshold Capture Volume", ADC3XXX_LEFT_CHN_AGC_2,
 		     ADC3XXX_RIGHT_CHN_AGC_2, 1, 0x1f, 1, agc_thresh_tlv),
 	SOC_DOUBLE_R_TLV("AGC Hysteresis Capture Volume", ADC3XXX_LEFT_CHN_AGC_2,
Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/4 ASoC: codecs: sta32x: Fix definition of Ch2 and Ch3 Volume Bypass controls

In reply to HyeongJun An

Each channel's master volume bypass (CxVBP) is in its own configuration register, C2CFG and C3CFG, not in C1CFG, which holds the channel 1 bit.

Fixes c034abf6e503 ("ASoC: add STA32X codec driver")
Assisted-by Claude:claude-opus-5-5
---
 sound/soc/codecs/sta32x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/sta32x.c +2 -2
index 2865a07be395..1e4a19769618 100644
@@ -491,8 +491,8 @@ SOC_SINGLE("Ch2 Tone Control Bypass Switch", STA32X_C2CFG, STA32X_CxCFG_TCB_SHIF
 SOC_SINGLE("Ch1 EQ Bypass Switch", STA32X_C1CFG, STA32X_CxCFG_EQBP_SHIFT, 1, 0),
 SOC_SINGLE("Ch2 EQ Bypass Switch", STA32X_C2CFG, STA32X_CxCFG_EQBP_SHIFT, 1, 0),
 SOC_SINGLE("Ch1 Master Volume Bypass Switch", STA32X_C1CFG, STA32X_CxCFG_VBP_SHIFT, 1, 0),
-SOC_SINGLE("Ch2 Master Volume Bypass Switch", STA32X_C1CFG, STA32X_CxCFG_VBP_SHIFT, 1, 0),
-SOC_SINGLE("Ch3 Master Volume Bypass Switch", STA32X_C1CFG, STA32X_CxCFG_VBP_SHIFT, 1, 0),
+SOC_SINGLE("Ch2 Master Volume Bypass Switch", STA32X_C2CFG, STA32X_CxCFG_VBP_SHIFT, 1, 0),
+SOC_SINGLE("Ch3 Master Volume Bypass Switch", STA32X_C3CFG, STA32X_CxCFG_VBP_SHIFT, 1, 0),
 SOC_ENUM("Ch1 Limiter Select", sta32x_limiter_ch1_enum),
 SOC_ENUM("Ch2 Limiter Select", sta32x_limiter_ch2_enum),
 SOC_ENUM("Ch3 Limiter Select", sta32x_limiter_ch3_enum),
Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/4 ASoC: codecs: sta350: Fix definition of Ch2 and Ch3 Volume Bypass controls

In reply to HyeongJun An

Each channel's master volume bypass (CxVBP) is in its own configuration register, C2CFG and C3CFG, not in C1CFG, which holds the channel 1 bit.

Fixes 2439ea1f0f8f ("ASoC: sta350: Add codec driver")
Assisted-by Claude:claude-opus-5-5
---
 sound/soc/codecs/sta350.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/sta350.c +2 -2
index d2b6f73d5e10..95aee5aa2bff 100644
@@ -477,9 +477,9 @@ SOC_SINGLE("Ch2 EQ Bypass Switch",
 SOC_SINGLE("Ch1 Master Volume Bypass Switch",
 	   STA350_C1CFG, STA350_CxCFG_VBP_SHIFT, 1, 0),
 SOC_SINGLE("Ch2 Master Volume Bypass Switch",
-	   STA350_C1CFG, STA350_CxCFG_VBP_SHIFT, 1, 0),
+	   STA350_C2CFG, STA350_CxCFG_VBP_SHIFT, 1, 0),
 SOC_SINGLE("Ch3 Master Volume Bypass Switch",
-	   STA350_C1CFG, STA350_CxCFG_VBP_SHIFT, 1, 0),
+	   STA350_C3CFG, STA350_CxCFG_VBP_SHIFT, 1, 0),
 SOC_ENUM("Ch1 Binary Output Select", sta350_binary_output_ch1_enum),
 SOC_ENUM("Ch2 Binary Output Select", sta350_binary_output_ch2_enum),
 SOC_ENUM("Ch3 Binary Output Select", sta350_binary_output_ch3_enum),
Signature · 1 line
2.43.0
maintainer
#5 lore raw
In reply to HyeongJun An
Quoted 8 lines · HyeongJun An

ASoC: codecs: Fix control definitions that write another control's register

These are more fixes found by the overlap scan from the first series [1]. In each driver a control writes the register of another control.

[1] https://lore.kernel.org/all/[email protected]/

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4

Thanks!

[1/4] ASoC: codecs: da732x: Fix definition of ADC2 EQ Overall Volume control

      https://git.kernel.org/broonie/sound/c/ebef9212cb46
[2/4] ASoC: codecs: tlv320adc3xxx: Fix definition of AGC Target Level control
      https://git.kernel.org/broonie/sound/c/0a9efcb663b5
[3/4] ASoC: codecs: sta32x: Fix definition of Ch2 and Ch3 Volume Bypass controls
      https://git.kernel.org/broonie/sound/c/ea53ab9003d8
[4/4] ASoC: codecs: sta350: Fix definition of Ch2 and Ch3 Volume Bypass controls
      https://git.kernel.org/broonie/sound/c/7308ce7c8459

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