[linux-audio-dev] ALSA Picture

Clemens Ladisch clemens at ladisch.de
Mon Mar 27 09:48:32 UTC 2006


Richard Spindler wrote:
> 2006/3/24, Clemens Ladisch <clemens at ladisch.de>:
> > The SUSPENDED and XRUN states can happen asynchronously, i.e., the
> > device can go into them at any time (from some other states), and the
> > next call to snd_pcm_writei() only reports them.  In this regard, they
> > are similar to the DISCONNECTED state.
> 
> Is this an issue when using this async-stuff? I think the most likely
> situation might be that it happens when you call writei.

XRUN won't happen unless the device is running, but SUSPENDED can happen
with any function that tries to access the hardware (like, e.g.,
snd_pcm_hw_params()).

> > XRUN happens not only when an over/underrun occurs but also when some
> > other error causes the device to stop (this error may be recoverable or
> > not).
> 
> What could that be?

Some drivers stop the device when a DMA error occurs (which may be a
real over/underrun when there was too much other activity on the PCI bus
so that the data could not be transferred).

The AK4114/4117 drivers put the capture device into the DRAINING state
when the sample rate of the digital input changes.


HTH
Clemens



More information about the Linux-audio-dev mailing list