All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
	lgirdwood@gmail.com
Subject: Re: [PATCH] ASoC: arizona: Add delay for output disable
Date: Mon, 19 Jan 2015 16:24:32 +0000	[thread overview]
Message-ID: <20150119162432.GF2809@sirena.org.uk> (raw)
In-Reply-To: <1421682586-6303-1-git-send-email-ckeepax@opensource.wolfsonmicro.com>


[-- Attachment #1.1: Type: text/plain, Size: 930 bytes --]

On Mon, Jan 19, 2015 at 03:49:46PM +0000, Charles Keepax wrote:

> +	case SND_SOC_DAPM_POST_PMD:
> +		switch (w->shift) {
> +		case ARIZONA_OUT1L_ENA_SHIFT:
> +		case ARIZONA_OUT1R_ENA_SHIFT:
> +		case ARIZONA_OUT2L_ENA_SHIFT:
> +		case ARIZONA_OUT2R_ENA_SHIFT:
> +		case ARIZONA_OUT3L_ENA_SHIFT:
> +		case ARIZONA_OUT3R_ENA_SHIFT:
> +			udelay(750);
> +			break;

That's a really quite long udelay() especially given that as the code is
written it's going to be cumalative over all the outputs being torn down
so typically will be 1.5ms for headphones (not sure if that's the
intention or not).  msleep() would be more friendly than udelay() and
it'd also be good to arrange to coalesce the delays.  Perhaps set a flag
in _PRE_PMD and check if a delay is needed in the clock teardown?  Or
better yet record a timestamp and then figure out if a delay is needed
when tearing down the clock though that is probably overengineering.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



       reply	other threads:[~2015-01-19 16:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1421682586-6303-1-git-send-email-ckeepax@opensource.wolfsonmicro.com>
2015-01-19 16:24 ` Mark Brown [this message]
2015-01-19 16:58   ` [PATCH] ASoC: arizona: Add delay for output disable Charles Keepax
2015-01-19 17:07     ` Mark Brown
2015-01-19 17:13       ` Charles Keepax

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=20150119162432.GF2809@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=lgirdwood@gmail.com \
    --cc=patches@opensource.wolfsonmicro.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.