[alsa-devel] Timer instability

Lennart Poettering mznyfn at 0pointer.de
Fri Feb 20 02:50:19 CET 2009

On Fri, 20.02.09 02:22, Lennart Poettering (mznyfn at 0pointer.de) wrote:

> > > 
> > > If necessary I could extract a test case for this, but my hope that
> > > you guys might have an idea what goes on without a test case, given
> > > that this smells so "overflowy" ;-)
> > > 
> > > And of course, how come ALSA triggers POLLIN if I asked it not to?
> > 
> > Are you using *_period_event() stuff?
> Yes, I am. But ignore that part for now. I have now commented the use
> of that call. Now I certainly get more POLLOUTs as expected, but the
> real problem stays: after a few minutes _avail() will suddenly jump
> from next to zero to more then the hwbuf size in less than 1ms without
> any further inteference and with a buffer size of 350ms! There is
> something really wrong with the behaviour of _avail().
> I can reproduce this only on ens1371 for now.

Actually it is worse than just the issue mentioned above. I also can
reproduce that _avail() tells me the device is almost completely full
(i.e. 370ms of data), and when i then go to sleep for 350ms then
afterwards _avail() will tell me that about 700ms are missing. From
the context the first _avail() was just wrong.

In summary: _avail() is completely unreliable on ens1371. It sometimes
returns values that are too high by once the buffer size, and
sometimes too low by once the buffer size.


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

More information about the Alsa-devel mailing list