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 3/3] ALSA: HDA: wait for RIRB, CORB DMA to finish
Date: Tue, 4 Aug 2015 14:40:48 +0530 [thread overview]
Message-ID: <20150804091048.GD11789@localhost> (raw)
In-Reply-To: <s5hlhdrd4bb.wl-tiwai@suse.de>
On Tue, Aug 04, 2015 at 07:13:12AM +0200, Takashi Iwai wrote:
> > @@ -86,10 +86,24 @@ EXPORT_SYMBOL_GPL(snd_hdac_bus_init_cmd_io);
> > */
> > void snd_hdac_bus_stop_cmd_io(struct hdac_bus *bus)
> > {
> > + unsigned long timeout;
> > +
> > spin_lock_irq(&bus->reg_lock);
> > /* disable ringbuffer DMAs */
> > snd_hdac_chip_writeb(bus, RIRBCTL, 0);
> > snd_hdac_chip_writeb(bus, CORBCTL, 0);
> > +
> > + /* poll DMAs to check if they stopped or not */
> > +
> > + timeout = jiffies + msecs_to_jiffies(100);
> > + while ((snd_hdac_chip_readb(bus, RIRBCTL) & AZX_RBCTL_DMA_EN) &&
> > + time_before(jiffies, timeout))
> > + usleep_range(500, 1000);
>
> You must not use *sleep() inside atomic context.
Right, not sure why it didnt crib when we tested, will send updated one soon
Thanks for the super quick review :)
--
~Vinod
prev parent reply other threads:[~2015-08-04 9:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-04 3:58 [PATCH 0/3] ALSA: hdac: stream fixes Vinod Koul
2015-08-04 3:58 ` [PATCH 1/3] ALSA: HDA: Fix stream assignment for host in decoupled mode Vinod Koul
2015-08-04 5:12 ` Takashi Iwai
2015-08-04 3:58 ` [PATCH 2/3] ALSA: HDA: Dont check return for snd_hdac_chip_readl Vinod Koul
2015-08-04 5:12 ` Takashi Iwai
2015-08-04 3:58 ` [PATCH 3/3] ALSA: HDA: wait for RIRB, CORB DMA to finish Vinod Koul
2015-08-04 5:13 ` Takashi Iwai
2015-08-04 9:10 ` Vinod Koul [this message]
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=20150804091048.GD11789@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.