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: <Y/++jj0bQustGAhl@sirena.org.uk>
Date:   Wed, 1 Mar 2023 21:07:26 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Chancel Liu <chancel.liu@....com>
Cc:     lgirdwood@...il.com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, perex@...ex.cz, tiwai@...e.com,
        ckeepax@...nsource.cirrus.com, patches@...nsource.cirrus.com,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCH v2 2/2] ASoC: wm8524: Correct the MUTE setting while
 power up/down

On Mon, Feb 27, 2023 at 05:19:38PM +0800, Chancel Liu wrote:

> wm8524 should be unmuted while power up and muted while power down.

> @@ -75,7 +75,7 @@ static int wm8524_startup(struct snd_pcm_substream *substream,
>  				   SNDRV_PCM_HW_PARAM_RATE,
>  				   &wm8524->rate_constraint);
>  
> -	gpiod_set_value_cansleep(wm8524->mute, 1);
> +	gpiod_set_value_cansleep(wm8524->mute, 0);
>  
>  	return 0;
>  }

I *think* the theory with these is that the device should be muted by
default so that any noise during startup is minimised, and only unmuted
when there's an actual audio stream, done in wm8524_mute_stream().  I am
unclear why this default state is set up in startup(), or why we unmute
in shutdown().  It could be that the startup thing is trying to work
around some suspend/resume thing?  In any case I'm not sure this helps,
I think really we should just not be managing the GPIO in these
functions at all and setting the default state to be muted when the GPIO
is requested.  With this change we'd move the unmute _mute_stream() does
much earlier, meaning that any noise output by the SoC during startup
will get played.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ