mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
ASoC: codecs: wcd9335: drop unused gain hack remnant
The vendor driver appears to be modifying the gain settings behind the back of user space but these hacks never made it upstream except for some essentially dead code that adds a constant zero to the current gain setting on DAPM events. Note that the volume registers still need to be written after enabling clocks in order for any prior updates to take effect. Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://msgid.link/r/20240119112420.7446-5-johan+linaro@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
46188db080
commit
aafa3acf62
@ -3033,7 +3033,6 @@ static int wcd9335_codec_enable_mix_path(struct snd_soc_dapm_widget *w,
|
||||
{
|
||||
struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm);
|
||||
u16 gain_reg;
|
||||
int offset_val = 0;
|
||||
int val = 0;
|
||||
|
||||
switch (w->reg) {
|
||||
@ -3073,7 +3072,6 @@ static int wcd9335_codec_enable_mix_path(struct snd_soc_dapm_widget *w,
|
||||
switch (event) {
|
||||
case SND_SOC_DAPM_POST_PMU:
|
||||
val = snd_soc_component_read(comp, gain_reg);
|
||||
val += offset_val;
|
||||
snd_soc_component_write(comp, gain_reg, val);
|
||||
break;
|
||||
case SND_SOC_DAPM_POST_PMD:
|
||||
@ -3294,7 +3292,6 @@ static int wcd9335_codec_enable_interpolator(struct snd_soc_dapm_widget *w,
|
||||
u16 gain_reg;
|
||||
u16 reg;
|
||||
int val;
|
||||
int offset_val = 0;
|
||||
|
||||
if (!(snd_soc_dapm_widget_name_cmp(w, "RX INT0 INTERP"))) {
|
||||
reg = WCD9335_CDC_RX0_RX_PATH_CTL;
|
||||
@ -3337,7 +3334,6 @@ static int wcd9335_codec_enable_interpolator(struct snd_soc_dapm_widget *w,
|
||||
case SND_SOC_DAPM_POST_PMU:
|
||||
wcd9335_config_compander(comp, w->shift, event);
|
||||
val = snd_soc_component_read(comp, gain_reg);
|
||||
val += offset_val;
|
||||
snd_soc_component_write(comp, gain_reg, val);
|
||||
break;
|
||||
case SND_SOC_DAPM_POST_PMD:
|
||||
|
Loading…
Reference in New Issue
Block a user