On Tue, 08.01.08 09:00, Jaroslav Kysela (perex@perex.cz) wrote:
So, depending on what clients are connected, we dynamically change the wakeups. Now, on ALSA (and with a lot of sound hw, as I understood Takashi) you cannot reconfigure the period sizes dynamically without interruptions of audio output. That's why I want to disable the whole period/buffer fill level management of ALSA, and do all myself with system timers, which I thankfully now can due to the advent of hrtimers (at least on Linux/x86). System timers nowadays are a lot more flexibe than the PCM timer, because they can be reconfigured all the time without any drawbacks. They are not dependant on period sizes or other stuff which may only be reconfigured by resetting the audio devices. The only drawback is that we need to determinine how the sound card clock and the system clock deviate.
Does that make sense to you?
Yes, but I don't see any problem to change avail_min dynamically (sw_params can be changed at any time), so each interrupt can be catched via poll(). But I really think that one timing source (system timers) is enough.
OK. I wasn't really aware that you could change sw params dynamically. I will do this now. This should be sufficient for my needs.
Lennart