[alsa-devel] [PATCH 3/3] ALSA: HDA: wait for RIRB, CORB DMA to finish
Vinod Koul
vinod.koul at intel.com
Tue Aug 4 11:10:48 CEST 2015
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
More information about the Alsa-devel
mailing list