Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Liam Girdwood <lrg@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, Misael Lopez Cruz <misael.lopez@ti.com>
Subject: Re: [PATCH] ASoC: dapm: Fix locking during codec shutdown
Date: Fri, 06 Jul 2012 17:36:15 +0100	[thread overview]
Message-ID: <1341592575.4963.7.camel@odin> (raw)
In-Reply-To: <20120706160220.GG4017@opensource.wolfsonmicro.com>

On Fri, 2012-07-06 at 17:02 +0100, Mark Brown wrote:
> On Fri, Jul 06, 2012 at 04:57:05PM +0100, Liam Girdwood wrote:
> > Codec shutdown performs a DAPM power sequence that might cause conflicts
> > and/or race conditions if another stream power event is running simultaneously.
> > Use card's dapm mutex to protect any potential race condition between them.
> 
> There's a bigger problem here if we're managing to run into this - the
> shutdown function is only supposed to be being called while the system
> is in the middle of shutting down so we've probably got a bunch of other
> races further up the stack to worry about too...

I don't think there is anything explicitly stopping a power off from
happening during a stream shutdown atm without this patch. It was
reported to me that this would fail 1 in 20 times on a certain device
and that the above patch fixed the issue (1200 tests completed OK after
the patch).

I do think we need this patch atm since we are accessing the same
resources as the stream event.

Liam

  reply	other threads:[~2012-07-06 16:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06 15:57 [PATCH] ASoC: dapm: Fix locking during codec shutdown Liam Girdwood
2012-07-06 16:02 ` Mark Brown
2012-07-06 16:36   ` Liam Girdwood [this message]
2012-07-06 16:43     ` Mark Brown
2012-07-06 17:10       ` Liam Girdwood
2012-07-06 17:20         ` Mark Brown
2012-07-06 18:03 ` Mark Brown

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=1341592575.4963.7.camel@odin \
    --to=lrg@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=misael.lopez@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox