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

Marek Vasut marex at denx.de
Tue May 28 20:23:40 CEST 2013


Dear Fabio Estevam,

[Fixing Mark's address in the CC.]

> 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.

That's good. But you still hear some noise when the headphone/lineout drivers 
are powered up/down, right?

> > -       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?

Me being a moron, that's the full reasoning. Sorry.

Best regards,
Marek Vasut


More information about the Alsa-devel mailing list