lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <456eaa3a-7f0c-4b28-aeca-2af60475011a@linaro.org>
Date: Fri, 19 Jan 2024 07:46:57 +0000
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To: Johan Hovold <johan+linaro@...nel.org>, Mark Brown <broonie@...nel.org>
Cc: Banajit Goswami <bgoswami@...cinc.com>,
 Liam Girdwood <lgirdwood@...il.com>, Jaroslav Kysela <perex@...ex.cz>,
 Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
 linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 5/5] ASoC: codecs: wcd9335: drop unused gain hack
 remnant



On 18/01/2024 16:58, Johan Hovold wrote:
> 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.
> 
> Signed-off-by: Johan Hovold <johan+linaro@...nel.org>
> ---

lgtm,

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>


--srini
>   sound/soc/codecs/wcd9335.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c
> index 43c648efd0d9..deb15b95992d 100644
> --- a/sound/soc/codecs/wcd9335.c
> +++ b/sound/soc/codecs/wcd9335.c
> @@ -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:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ