From 397ce4ccc72c3618ec43f3edbd5f1f3189d35d2d Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 28 Jan 2015 13:17:40 +0100 Subject: [PATCH] ALSA-Backend prefer ppoll() --- libs/backends/alsa/zita-alsa-pcmi.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/backends/alsa/zita-alsa-pcmi.cc b/libs/backends/alsa/zita-alsa-pcmi.cc index 5aba08c786..6eead7e28b 100644 --- a/libs/backends/alsa/zita-alsa-pcmi.cc +++ b/libs/backends/alsa/zita-alsa-pcmi.cc @@ -170,7 +170,11 @@ snd_pcm_sframes_t Alsa_pcmi::pcm_wait (void) } for (i = 0; i < n2; i++) _poll_fd [i].events |= POLLERR; - r = poll (_poll_fd, n2, 1000); + timespec timeout; + timeout.tv_sec = 1; + timeout.tv_nsec = 0; + r = ppoll (_poll_fd, n2, &timeout, NULL); + if (r < 0) { if (errno == EINTR) return 0;