[alsa-devel] [PATCH] ALSA: add support for disabling period irq

Raymond Yau superquad.vortex2 at gmail.com
Tue Nov 2 00:46:17 CET 2010

2010/11/2 Pierre-Louis Bossart <bossart.nospam at gmail.com>

> Merged and cleaned patch based on earlier patches posted
> on alsa-devel by Clemens Ladisch <clemens at ladisch.de> and
> Pierre-Louis Bossart <pierre-louis.bossart at intel.com>
> This patch disables period interrupts which are not
> needed when the application relies on a system timer
> to wake-up and refill the ring buffer. The behavior of
> the driver is left unchanged, and interrupts are only
> disabled if the application requests this configuration.
> The behavior in case of underruns is slightly different,
> instead of being detected during the period interrupts the
> underruns are detected when the application calls
> snd_pcm_update_avail, which in turns forces a refresh of the
> hw pointer and shows the buffer is empty.

But PA server set stop threshold to boundary, according to


PCM is automatically stopped in SND_PCM_STATE_XRUN state when available
frames is >= threshold. If the stop threshold is equal to boundary (also
software parameter - sw_param) then automatic stop will be disabled (thus
device will do the endless loop in the ring buffer).

The available buffer will not be empty (zero) but negative since device will
do the endless loop

More information about the Alsa-devel mailing list