All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Fabio Estevam <festevam@gmail.com>, Mark Brown <broonie@kernel.org>
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
	alsa-devel@alsa-project.org,
	Dong Aisheng <dong.aisheng@linaro.org>,
	Eric Nelson <eric.nelson@boundarydevices.com>
Subject: Re: [PATCH] ASoC: sgtl5000: Fix VAG_POWER enabling/disabling order
Date: Tue, 28 May 2013 20:23:40 +0200	[thread overview]
Message-ID: <201305282023.40181.marex@denx.de> (raw)
In-Reply-To: <CAOMZO5CpOz3PKiJ8-Ka+0nWN8BLquxHMcb8DZGvEE-cbeq3M8w@mail.gmail.com>

Dear Fabio Estevam,

[Fixing Mark's address in the CC.]

> Hi Marek,
> 
> On Fri, May 24, 2013 at 12:34 AM, Marek Vasut <marex@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@denx.de>
> > Cc: Dong Aisheng <dong.aisheng@linaro.org>
> > Cc: Eric Nelson <eric.nelson@boundarydevices.com>
> > Cc: Fabio Estevam <fabio.estevam@freescale.com>
> > Cc: Mark Brown <broonie@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

  reply	other threads:[~2013-05-28 18:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-24  3:34 [PATCH] ASoC: sgtl5000: Fix VAG_POWER enabling/disabling order Marek Vasut
2013-05-28 14:10 ` Fabio Estevam
2013-05-28 18:23   ` Marek Vasut [this message]
2013-05-28 19:44     ` Fabio Estevam
2013-05-28 20:04       ` Marek Vasut
2013-05-28 14:59 ` Mark Brown
2013-05-28 18:57   ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201305282023.40181.marex@denx.de \
    --to=marex@denx.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=dong.aisheng@linaro.org \
    --cc=eric.nelson@boundarydevices.com \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.