[alsa-devel] [PATCH v2 2/2] ALSA: hda: fix to wait for RIRB & CORB DMA to set

Vinod Koul vinod.koul at intel.com
Mon May 9 06:38:24 CEST 2016


On Sun, May 08, 2016 at 11:45:50AM +0200, Takashi Iwai wrote:
> > +/* wait for cmd dmas till they are stopped */
> > +static void hdac_wait_for_cmd_dmas(struct hdac_bus *bus)
> > +{
> > +	unsigned long timeout;
> > +
> > +	timeout = jiffies + msecs_to_jiffies(100);
> > +	while ((snd_hdac_chip_readb(bus, RIRBCTL) & AZX_RBCTL_DMA_EN)
> > +		&& time_before(jiffies, timeout))
> > +		udelay(10);
> > +
> > +	timeout = jiffies + msecs_to_jiffies(100);
> > +	while ((snd_hdac_chip_readb(bus, CORBCTL) & AZX_CORBCTL_RUN)
> > +		&& time_before(jiffies, timeout))
> > +		udelay(10);
> 
> This will end up with doubled timeout.  But it doesn't matter so much
> in practice.  So I applied the patch as is.

Thanks Takashi

-- 
~Vinod


More information about the Alsa-devel mailing list