From 29e6544baeb18fc194eabec6e351e905cf4aa0a0 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 5 Jun 2023 16:49:58 +0200 Subject: [PATCH] alsa: enable htimestamp mode Use snd_pcm_htimestamp to get both the available space and the timestamp when this was calculated. We can then use this to get a better estimate of the delay in the device against the graph start and get a more reliable delay between capture and playback. --- spa/plugins/alsa/alsa-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index 8accddcf3..8fc7a26d0 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -1856,7 +1856,7 @@ recover: return do_start(state); } -#if 1 +#if 0 static int get_avail(struct state *state, uint64_t current_time, snd_pcm_uframes_t *delay) { int res, missed;