[alsa-devel] preventing SNDRV_PCM_STATE_XRUN

Sergey Lapin slapin at ossfans.org
Thu Jun 18 10:48:37 CEST 2009

Hi, all!
I have uncontrollable data stream which I need to play through kernel
via ALSA snd_pcm_lib_write call. Everything is fine, but once
a few seconds I get SNDRV_PCM_STATE_XRUN on stream and thus, -EPIPE.
Sound glitches are minor, but annoying.

Is it possible to somehow prevent this from happenning? Is it possible
to distinguish if my next chunk of data will fit?

Thanks a lot,

More information about the Alsa-devel mailing list