From 2168afd96c10c57def638d99074c87f901ff893b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 11 Feb 2026 14:01:44 +0400 Subject: [PATCH] audio: require pulse >= 0.9.13 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pulseaudio 0.9.13 was released on 2009-09-10. All our supported distros have it. PA_*_IS_GOOD are from 0.9.11. Signed-off-by: Marc-André Lureau Link: https://lore.kernel.org/r/20260211-cleanups-v1-4-e63c96572389@redhat.com Signed-off-by: Paolo Bonzini --- audio/paaudio.c | 28 ++-------------------------- meson.build | 2 +- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index 23e8767a46..24327ecbf4 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -62,26 +62,6 @@ static void G_GNUC_PRINTF(2, 3) qpa_logerr(int err, const char *fmt, ...) error_printf(" Reason: %s\n", pa_strerror(err)); } -#ifndef PA_CONTEXT_IS_GOOD -static inline int PA_CONTEXT_IS_GOOD(pa_context_state_t x) -{ - return - x == PA_CONTEXT_CONNECTING || - x == PA_CONTEXT_AUTHORIZING || - x == PA_CONTEXT_SETTING_NAME || - x == PA_CONTEXT_READY; -} -#endif - -#ifndef PA_STREAM_IS_GOOD -static inline int PA_STREAM_IS_GOOD(pa_stream_state_t x) -{ - return - x == PA_STREAM_CREATING || - x == PA_STREAM_READY; -} -#endif - #define CHECK_SUCCESS_GOTO(c, expression, label, msg) \ do { \ if (!(expression)) { \ @@ -682,9 +662,7 @@ static void qpa_volume_out(HWVoiceOut *hw, Volume *vol) PAConnection *c = pa->g->conn; int i; -#ifdef PA_CHECK_VERSION /* macro is present in 0.9.16+ */ - pa_cvolume_init (&v); /* function is present in 0.9.13+ */ -#endif + pa_cvolume_init(&v); v.channels = vol->channels; for (i = 0; i < vol->channels; ++i) { @@ -724,9 +702,7 @@ static void qpa_volume_in(HWVoiceIn *hw, Volume *vol) PAConnection *c = pa->g->conn; int i; -#ifdef PA_CHECK_VERSION - pa_cvolume_init (&v); -#endif + pa_cvolume_init(&v); v.channels = vol->channels; for (i = 0; i < vol->channels; ++i) { diff --git a/meson.build b/meson.build index cbd6d90ce6..11f83cf05c 100644 --- a/meson.build +++ b/meson.build @@ -1298,7 +1298,7 @@ endif pulse = not_found if not get_option('pa').auto() or (host_os == 'linux' and have_system) - pulse = dependency('libpulse', required: get_option('pa'), + pulse = dependency('libpulse', version: '>=0.9.13', required: get_option('pa'), method: 'pkg-config') endif alsa = not_found