From 402468501d23f4623a9749f4f5e3e79c08f76c71 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Mon, 31 Dec 2018 13:07:29 +0100 Subject: [PATCH] alsa: Treat -22 (EINVAL) as an expected error --- src/alsa/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/alsa/mod.rs b/src/alsa/mod.rs index 47d17bfe6..2b0e186d6 100644 --- a/src/alsa/mod.rs +++ b/src/alsa/mod.rs @@ -91,7 +91,8 @@ impl Device { alsa::SND_PCM_NONBLOCK, ) { -2 | - -16 /* determined empirically */ => return Err(FormatsEnumerationError::DeviceNotAvailable), + -16 | + -22 /* determined empirically */ => return Err(FormatsEnumerationError::DeviceNotAvailable), e => check_errors(e).expect("device not available") }