alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: vinod.koul@linux.intel.com, tiwai@suse.de,
	patches@opensource.wolfsonmicro.com, alsa-devel@alsa-project.org,
	liam.r.girdwood@intel.com
Subject: Re: [PATCH v4] ASoC: soc-compress: Cancel delayed power down if needed
Date: Wed, 20 Mar 2013 11:25:44 +0100	[thread overview]
Message-ID: <20130320102544.GK28775@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20130311092526.GA2141@opensource.wolfsonmicro.com>


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

On Mon, Mar 11, 2013 at 09:25:26AM +0000, Charles Keepax wrote:

Sorry about the delay here, I had been waiting for review from Vinod.

>  	mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
> @@ -220,6 +221,10 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
>  			goto out;
>  	}
>  
> +	/* cancel any delayed stream shutdown that is pending */
> +	rtd->pop_wait = 0;
> +	cancel_delayed_work_sync(&rtd->delayed_work);
> +

The work here uses the pcm mutex but the cancel is done with the mutex
held.  We need to either cancel outside the lock or just ensure that the
work doesn't do anything if we have run (which it looks like the
pop_wait flag actually does so we could probably just use a non-sync
cancel).

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

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



  reply	other threads:[~2013-03-20 10:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-25 15:38 [PATCH] ASoC: soc-compress: Cancel delayed power down if needed Charles Keepax
2013-01-25 16:56 ` [PATCH v2] " Charles Keepax
2013-01-26  8:52 ` [PATCH] " Mark Brown
2013-03-08 16:52   ` [PATCH v3] " Charles Keepax
2013-03-11  9:25     ` [PATCH v4] " Charles Keepax
2013-03-20 10:25       ` Mark Brown [this message]
2013-03-22  8:50         ` [PATCH v5] " Charles Keepax
2013-03-26 17:51           ` Mark Brown
2013-03-27 11:41             ` 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=20130320102544.GK28775@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@linux.intel.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;
as well as URLs for NNTP newsgroup(s).