Skip to content

Commit 8b353bb

Browse files
rfvirgilbroonie
authored andcommitted
ASoC: cs42l42: Remove duplicate control for WNF filter frequency
The driver was defining two ALSA controls that both change the same register field for the wind noise filter corner frequency. The filter response has two corners, at different frequencies, and the duplicate controls most likely were an attempt to be able to set the value using either of the frequencies. However, having two controls changing the same field can be problematic and it is unnecessary. Both frequencies are related to each other so setting one implies exactly what the other would be. Removing a control affects user-side code, but there is currently no known use of the removed control so it would be best to remove it now before it becomes a problem. Signed-off-by: Richard Fitzgerald <[email protected]> Fixes: 2c394ca ("ASoC: Add support for CS42L42 codec") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 30615bd commit 8b353bb

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

sound/soc/codecs/cs42l42.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -425,15 +425,6 @@ static SOC_ENUM_SINGLE_DECL(cs42l42_wnf3_freq_enum, CS42L42_ADC_WNF_HPF_CTL,
425425
CS42L42_ADC_WNF_CF_SHIFT,
426426
cs42l42_wnf3_freq_text);
427427

428-
static const char * const cs42l42_wnf05_freq_text[] = {
429-
"280Hz", "315Hz", "350Hz", "385Hz",
430-
"420Hz", "455Hz", "490Hz", "525Hz"
431-
};
432-
433-
static SOC_ENUM_SINGLE_DECL(cs42l42_wnf05_freq_enum, CS42L42_ADC_WNF_HPF_CTL,
434-
CS42L42_ADC_WNF_CF_SHIFT,
435-
cs42l42_wnf05_freq_text);
436-
437428
static const struct snd_kcontrol_new cs42l42_snd_controls[] = {
438429
/* ADC Volume and Filter Controls */
439430
SOC_SINGLE("ADC Notch Switch", CS42L42_ADC_CTL,
@@ -451,7 +442,6 @@ static const struct snd_kcontrol_new cs42l42_snd_controls[] = {
451442
CS42L42_ADC_HPF_EN_SHIFT, true, false),
452443
SOC_ENUM("HPF Corner Freq", cs42l42_hpf_freq_enum),
453444
SOC_ENUM("WNF 3dB Freq", cs42l42_wnf3_freq_enum),
454-
SOC_ENUM("WNF 05dB Freq", cs42l42_wnf05_freq_enum),
455445

456446
/* DAC Volume and Filter Controls */
457447
SOC_SINGLE("DACA Invert Switch", CS42L42_DAC_CTL1,

0 commit comments

Comments
 (0)