mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
alsa: disable timer-based scheduling inside a VM
In virtual machines sound card clocks and OS scheduling tend to become unreliable, adding various 'uneven' latencies. The adaptive algorithm that handles drop-outs does not handle it this well: in contrast to drop-outs on real machines that are evenly distributed, small and can easily be encountered via the adpative algorithms, drop-outs in VMs tend to happen abruptly, and massively, which is not easy to counter. This patch simply disables timer based scheduling in VMs reverting to classic IO based scheduling. This should help make PA perform better in VMs. https://bugzilla.redhat.com/show_bug.cgi?id=532775
This commit is contained in:
parent
c079ceeba0
commit
53b046d5c9
4 changed files with 28 additions and 8 deletions
|
|
@ -1698,10 +1698,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if (use_tsched && !pa_rtclock_hrtimer()) {
|
||||
pa_log_notice("Disabling timer-based scheduling because high-resolution timers are not available from the kernel.");
|
||||
use_tsched = FALSE;
|
||||
}
|
||||
use_tsched = pa_alsa_may_tsched(use_tsched);
|
||||
|
||||
u = pa_xnew0(struct userdata, 1);
|
||||
u->core = m->core;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue