On Mon, 23.02.09 03:42, Lennart Poettering (mznyfn@0pointer.de) wrote:
On Sun, 22.02.09 04:14, Lennart Poettering (mznyfn@0pointer.de) wrote:
I wrote this little test to track down all kinds of timer issues: it opens and sets up a sound device. Then it will constantly query _avail(), _delay() and _htstamp() in a busy loop writing a single sample at a time. The three values are then printed along with a system timestamp. The data generated like this can be opened in gnumeric and a nice graph be drawn.
Hmm, did some more testing with this tool on other cards:
On es1969 snd_pcm_avail() sometimes returns values like 1073728596 samples. This smells a lot like an overflow given that this times four (i.e. the sample size in bytes) is near to 2^32.
[...]
Here's an output of this tool for an emu10k1 card:
[...]
This is the end of the tool's output for HDA AD1989B:
The device is completely filled up (i.e. avail is 0, delay is 4416) and then after 2us suddenly the avail jumps to 4971973988617027465 and the delay to -4971973988617023049.
Smells like an integer overflow to me ...
Hmm, for now my little testing experiment I've now found es1969, ens1371, intel8x0, snd-emu10k1 and some intel-hda to have unreliable _avail() or _delay().
Lennart