From 4331779e4d31d5306625a30bca71b970f963dc1f Mon Sep 17 00:00:00 2001 From: Dimitrios Katsaros Date: Wed, 13 Dec 2023 14:41:04 +0100 Subject: [PATCH] ALSA: Remove alsa timer from IRQ scheduling As part of the setup for IRQ based scheduling, a period event was installed. Not only is a timer based polling unecessary for IRQ scheduling, depending on the state of the system, the timer could fire far enough from the IRQ, causing alsa wakeup events with no data in the ring buffer. Pipewire would identify these events as an "early wakeup", adding an extra quantum of time to the next_time estimate, skewing the clock and causing issues with apps that depend on precise timing. --- spa/plugins/alsa/alsa-pcm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index d2f4b4a67..a48d57c3c 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -2181,8 +2181,6 @@ static int set_swparams(struct state *state) /* start the transfer */ CHECK(snd_pcm_sw_params_set_start_threshold(hndl, params, LONG_MAX), "set_start_threshold"); - CHECK(snd_pcm_sw_params_set_period_event(hndl, params, state->disable_tsched), "set_period_event"); - if (state->disable_tsched) { snd_pcm_uframes_t avail_min;