[alsa-devel] safe support for rewind in ALSA

Lennart Poettering mznyfn at 0pointer.de
Sun Feb 21 21:21:45 CET 2010

On Sun, 21.02.10 12:06, Kai Vehmanen (kvehmanen at eca.cx) wrote:

> Hi,
> On Thu, 11 Feb 2010, Jaroslav Kysela wrote:
> >> However, PA ignores the sound card's interrupts and is woken up by its
> >> own timer.
> >
> > PA can drive the wake-ups using avail_min sw parameter. If this value is
> > high enough, no userspace wake up is called, only interrupt is processed
> > and internal ring buffer pointers in the driver are updated.
> but that's unfortunately not enough. AFAIK glitch-free aims, among other 
> things, to minimize power usage for battery powered devices, and to do 
> that, you need to minimize hardware interrupts [1]. And for that, 
> avail_min won't help.
> [1] this is exactly the same thing that is driving Linux tickless
>      development:
>      http://www.lesswatts.org/projects/tickless/
> PS I do agree that avail_min is a very useful, and often overlooked
>     feature, of ALSA. But in this specific case it won't help...

We try our best to minimize wakeups by setting the minimal number of
periods in PA. Unfortunately that still means one gets 2 or 1 irqs per
buffer iteration.

However even if we get those two wakeups, using avail_min allows us to
minimize the number of processes that are woken up on that
IRQ. i.e. if the CPU is woken up, it is still better when this only
means some IRQ in the kernel is processed, then passing it into


Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

More information about the Alsa-devel mailing list