Skip to contentSkip to conversation

preventing SNDRV_PCM_STATE_XRUN

DISCUSSION Sergey Lapin 1 participant 1 message Jun 18, 2009

lore
Share & tools
lore
#0 lore raw

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,
S.