Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: liam.r.girdwood@linux.intel.com, patches.audio@intel.com,
	alsa-devel@alsa-project.org, broonie@kernel.org,
	Jeeja KP <jeeja.kp@intel.com>
Subject: Re: [PATCH 1/2] ALSA: hdac: add link pm and ref counting
Date: Mon, 2 May 2016 14:32:00 +0530	[thread overview]
Message-ID: <20160502090200.GA2274@localhost> (raw)
In-Reply-To: <s5hfuu4ss28.wl-tiwai@suse.de>

On Fri, Apr 29, 2016 at 11:05:51AM +0200, Takashi Iwai wrote:
> > +int snd_hdac_ext_bus_link_get(struct hdac_ext_bus *ebus,
> > +				struct hdac_ext_link *link)
> > +{
> > +	int ret = 0;
> > +
> > +	spin_lock(&ebus->lock);
> > +
> > +	/*
> > +	 * if we move from 0 to 1, count will be 1 so power up this link
> > +	 * as well, also check the dma status and trigger that
> > +	 */
> > +	if (++link->ref_count == 1) {
> > +		if (!ebus->cmd_io) {
> > +			snd_hdac_bus_init_cmd_io(&ebus->bus);
> 
> Calling this function inside a spinlock is wrong.
> It should be mutex instead.

Yes I looked at it's usage, we should do a mutex here, will send an update

-- 
~Vinod

  reply	other threads:[~2016-05-02  8:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 14:00 [PATCH 0/2] ASoC: Intel: Skylake: Add HDA link management Vinod Koul
2016-04-28 14:00 ` [PATCH 1/2] ALSA: hdac: add link pm and ref counting Vinod Koul
2016-04-29  9:05   ` Takashi Iwai
2016-05-02  9:02     ` Vinod Koul [this message]
2016-04-28 14:00 ` [PATCH 2/2] ASoC: Intel: Skylake: add link mangement Vinod Koul

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=20160502090200.GA2274@localhost \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jeeja.kp@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=patches.audio@intel.com \
    --cc=tiwai@suse.de \
    /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