[alsa-devel] XRUN happens too often.

Jaroslav Kysela perex at perex.cz
Thu Apr 10 10:20:51 CEST 2008

On Thu, 10 Apr 2008, Rong-Jhe wrote:

> > ALSA does not generate threads for you like this.  I was referring to
> > your application's audio thread, assuming that your app is indeed
> > multithreaded.
> > 
> > The duration probably varies because the call to snd_pcm_writei() will
> > block until there is enough space in the ALSA ringbuffer to receive
> > your data.
> > 
> > Lee
> > 
> I found that there will be a thread generated after calling 
> snd_pcm_open(). I use command 'ps' to check it. Due to this I guess 
> snd_pcm_writei() only put the data into the buffer of the thread 'pcm'.

Nope, you probably use dmix plugin. This thread is only for management for 
shared device and has nothing to do with sample transfers.


Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

More information about the Alsa-devel mailing list