summaryrefslogtreecommitdiffstats
path: root/src/modules/alsa/alsa-source.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-11-05 03:23:08 +0100
committerLennart Poettering <lennart@poettering.net>2009-11-05 03:23:08 +0100
commit53b046d5c9593d848270e85017c2999a61256e0e (patch)
treebc60409ef2e9b6307f9858bf324f6d1766bf3d9d /src/modules/alsa/alsa-source.c
parentc079ceeba00c77a93c613ecf4a3f2cb516db0753 (diff)
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
Diffstat (limited to 'src/modules/alsa/alsa-source.c')
-rw-r--r--src/modules/alsa/alsa-source.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index 37dd6476..e775b20c 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -1541,10 +1541,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
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;