Skip to content

Commit aafa3ac

Browse files
jhovoldbroonie
authored andcommitted
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>
1 parent 46188db commit aafa3ac

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

sound/soc/codecs/wcd9335.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,7 +3033,6 @@ static int wcd9335_codec_enable_mix_path(struct snd_soc_dapm_widget *w,
30333033
{
30343034
struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm);
30353035
u16 gain_reg;
3036-
int offset_val = 0;
30373036
int val = 0;
30383037

30393038
switch (w->reg) {
@@ -3073,7 +3072,6 @@ static int wcd9335_codec_enable_mix_path(struct snd_soc_dapm_widget *w,
30733072
switch (event) {
30743073
case SND_SOC_DAPM_POST_PMU:
30753074
val = snd_soc_component_read(comp, gain_reg);
3076-
val += offset_val;
30773075
snd_soc_component_write(comp, gain_reg, val);
30783076
break;
30793077
case SND_SOC_DAPM_POST_PMD:
@@ -3294,7 +3292,6 @@ static int wcd9335_codec_enable_interpolator(struct snd_soc_dapm_widget *w,
32943292
u16 gain_reg;
32953293
u16 reg;
32963294
int val;
3297-
int offset_val = 0;
32983295

32993296
if (!(snd_soc_dapm_widget_name_cmp(w, "RX INT0 INTERP"))) {
33003297
reg = WCD9335_CDC_RX0_RX_PATH_CTL;
@@ -3337,7 +3334,6 @@ static int wcd9335_codec_enable_interpolator(struct snd_soc_dapm_widget *w,
33373334
case SND_SOC_DAPM_POST_PMU:
33383335
wcd9335_config_compander(comp, w->shift, event);
33393336
val = snd_soc_component_read(comp, gain_reg);
3340-
val += offset_val;
33413337
snd_soc_component_write(comp, gain_reg, val);
33423338
break;
33433339
case SND_SOC_DAPM_POST_PMD:

0 commit comments

Comments
 (0)