On Fri, 13.06.08 19:37, Jaroslav Kysela (perex@perex.cz) wrote:
It means that the PCM midlevel code thinks that samples in URBs are played (underrun can be detected), but they are queued in URBs.
OK, my fault. It's exactly behaviour I proposed (URBs are extra buffers), but we need to take in account the right snd_pcm_delay() output. Lennart probably meant that samples are consumed too much quickly at the stream start and impossibility to detect the extra buffering mechanism with the current code.
Yes, this is exactly what I am experiencing. At stream start my estimations (based on update_avail) are way off. Afterwards everything is fine. As a dirty workaround to fix this I halve the initial sleep time always so that I can make sure I don't sleep for too long and get an xrun. But that's really ugly, because halving it is just a wild guess and it isn't even necessary on PCI hardware.
Lennart