[alsa-devel] [PATCH] ASoC: arizona: Add delay for output disable
Mark Brown
broonie at kernel.org
Mon Jan 19 17:24:32 CET 2015
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150119/7ace9bba/attachment.sig>
More information about the Alsa-devel
mailing list