alsa: disable timer-based scheduling inside a VM
commit3b2530255460e5700766fcd7c7443b7065240f61
authorLennart Poettering <lennart@poettering.net>
Thu, 5 Nov 2009 02:23:08 +0000 (5 03:23 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 11 Nov 2009 04:26:36 +0000 (11 05:26 +0100)
tree0f3ac47809690326be4c42ad9ed4a8760932b156
parent5da02977444805aabb6665d14bd74563941a7b15
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
src/modules/alsa/alsa-sink.c
src/modules/alsa/alsa-source.c
src/modules/alsa/alsa-util.c
src/modules/alsa/alsa-util.h