[alsa-devel] [PATCH] ASoC: max98357a: Fix speaker pop when starting playback

Mark Brown broonie at kernel.org
Thu Mar 22 02:54:56 CET 2018


On Wed, Mar 21, 2018 at 07:30:15PM -0300, Ezequiel Garcia wrote:

> +- sdmode-delay : specify a delay time for SD_MODE pin. According
> +        to the DAC datasheet, if LRCLK is removed while BCLK is present,
> +        the DAC output can cause loud pop/crack noises. This property
> +        specifies a delay for the SD_MODE pin assert, required to
> +        eliminate the noise.

Why is this configurable?  This sounds like something entirely within
the digital domain of the device rather than something that depends on
board configuration and it's hard to see how someone would configure
this.

> +static void max98357a_enable_sdmode_work(struct work_struct *work)
> +{
> +	struct max98357a_priv *max98357a = container_of(work,
> +		struct max98357a_priv, enable_sdmode_work.work);
> +	unsigned long flags;
> +
> +	spin_lock_irqsave(&max98357a->sdmode_lock, flags);
> +	gpiod_set_value(max98357a->sdmode, max98357a->sdmode_enabled);
> +	spin_unlock_irqrestore(&max98357a->sdmode_lock, flags);
> +}

What is this lock supposed to accomplish?  We perform a single action
under the lock which itself has internal locking, it's not going to have
any meaningful effect.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20180322/08c5b204/attachment.sig>


More information about the Alsa-devel mailing list