[alsa-devel] need help understanding overrun/underrun

Jaroslav Kysela perex at perex.cz
Fri Aug 20 11:49:32 CEST 2010

On Fri, 20 Aug 2010, Harsha, Priya wrote:

> Hi
> I had modified the arecord application to call snd_pcm_writei() with the 
> output of snd_pcm_readi(). Basically a loopback.
> When we execute, I see the calls return EPIPE (lot of overruns and a few 
> underruns). Can anyone help me understand why there are underrun/overrun 
> being printed? Is it because of the serial call of reads and writes? Is 
> there any issue with the driver I am using? Can you suggest some ways to 
> overcome these messages?

You must queue playback with more samples at the beginning (to 
setup the output latency) otherwise you get the output underrun 
immediatelly. See alsa-lib/test/latency.c for an example.


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

More information about the Alsa-devel mailing list