On Wed, 14 Apr 2010, Jarkko Nikula wrote:
On Tue, 13 Apr 2010 19:01:35 +0200 Takashi Iwai tiwai@suse.de wrote:
So by not doing the padding the distance to xrun is about the same and the wake-up semantics remains the same. I understood from the thread below that not all applications like if the wake-up happens before avail >= avail_min what would happen with the second idea.
http://mailman.alsa-project.org/pipermail/alsa-devel/2009-December/023986.ht...
Well, my understanding is that it's an application thing. It feeds the unaligned data while it expects the aligned wake-up.
Or, any other real example that doesn't work?
Actually I noticed this by wondering why there are wake-ups happening only for every second period even if there are only two periods. E.g.
It's quite nice jitter problem in the ring buffer position updates from the drivers. Thanks for the detailed explanation.
Your first proposal (change wake up condition) looks more appropriate to me, but I need to think more about this issue.
Another solution might be to add another position check using a workqueue or any timer source when the expectation of missed wake up is close.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.