[alsa-devel] [PATCH] ASoC: sgtl5000: Fix VAG_POWER enabling/disabling order

Fabio Estevam festevam at gmail.com
Tue May 28 16:10:35 CEST 2013


Hi Marek,

On Fri, May 24, 2013 at 12:34 AM, Marek Vasut <marex at denx.de> wrote:
> The VAG_POWER must be enabled after all other bits in CHIP_ANA_POWER
> and disabled before any other bit in CHIP_ANA_POWER. See the SGTL5000
> datasheet (Table 31, BIT 7, page 42-43). Failing to follow this order
> will result in ugly loud "POP" noise at the end of playback.
>
> To achieve such order, use the _PRE and _POST DAPM widgets to trigger
> the power_vag_event, where the event type check has to be fixed
> accordingly as well.
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Dong Aisheng <dong.aisheng at linaro.org>
> Cc: Eric Nelson <eric.nelson at boundarydevices.com>
> Cc: Fabio Estevam <fabio.estevam at freescale.com>
> Cc: Mark Brown <broonie at opensource.wolfsonmicro.com>

Thanks, tested on a mx51evk and it removes an annoying 'click' after
an audio track is played.

> -       case SND_SOC_DAPM_POST_PMD:
> +       case SND_SOC_DAPM_PRE_PMD:
>                 snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
>                         SGTL5000_VAG_POWERUP, 0);
> -               msleep(400);
> +               mdelay(400);

What is the reasoning for this change?

Anyway:

Tested-by: Fabio Estevam <fabio.estevam at freescale.com>


More information about the Alsa-devel mailing list