Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Liam Girdwood <liam.r.girdwood@intel.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Wilbur Wang <wwang27@marvell.com>,
	Qiao Zhou <zhouqiao@marvell.com>, Mark Brown <broonie@kernel.org>,
	Chao Xie <cxie4@marvell.com>
Subject: Re: [Question about DPCM] dpcm_run_new_update races again xrun
Date: Mon, 03 Nov 2014 15:42:16 +0100	[thread overview]
Message-ID: <s5htx2g1h2v.wl-tiwai@suse.de> (raw)
In-Reply-To: <1415021524.2471.16.camel@loki>

At Mon, 03 Nov 2014 13:32:04 +0000,
Liam Girdwood wrote:
> 
> On Mon, 2014-11-03 at 03:28 -0800, Qiao Zhou wrote:
> > Hi Mark, Liam
> > 
> > I met one BE not-function issue when developing DPCM feature, and found
> > dpcm_run_new_update is not protected well against xrun(interrupt context).
> > Could you help to give some suggestions?
> > 
> 
> I'm wondering if this would be better solved by improving the locking so
> that an XRUN could not run at the same time as the runtime update. Both
> functions are async, but are only protected by a mutex atm (like the
> rest of PCM ops except trigger which is atomic). We maybe need to add a
> spinlock to both runtime_update() and dpcm_fe_dai_trigger() 

Be careful, you cannot take spinlock while hw_params, for example.

Why do you need to set runtime_update to NO in the trigger callback in
the first place?  The trigger may influence on the FE streaming state,
but not on the FE/BE connection state, right?


Takashi

  reply	other threads:[~2014-11-03 14:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03 11:28 [Question about DPCM] dpcm_run_new_update races again xrun Qiao Zhou
2014-11-03 13:32 ` Liam Girdwood
2014-11-03 14:42   ` Takashi Iwai [this message]
2014-11-03 16:54     ` Takashi Iwai
2014-11-03 17:20       ` Liam Girdwood
2014-11-03 18:45         ` Takashi Iwai
2014-11-04  6:43         ` Qiao Zhou
2014-11-03 17:16     ` Liam Girdwood
2014-11-03 17:19       ` Liam Girdwood

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=s5htx2g1h2v.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cxie4@marvell.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=wwang27@marvell.com \
    --cc=zhouqiao@marvell.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