From 69276d4a6c92599fb3cc9a9a4db64ce22cff8504 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 29 Mar 2021 11:36:17 +0200 Subject: [PATCH] amixer: print error when snd_hctl_handle_events() fails It may be possible that the controls are quickly added and removed, thus the "hard" fail is not optimal here. Signed-off-by: Jaroslav Kysela --- amixer/amixer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/amixer/amixer.c b/amixer/amixer.c index b3b9b48..0bdae99 100644 --- a/amixer/amixer.c +++ b/amixer/amixer.c @@ -1602,7 +1602,8 @@ static int events(int argc ATTRIBUTE_UNUSED, char *argv[] ATTRIBUTE_UNUSED) if (res >= 0) { printf("Poll ok: %i\n", res); res = snd_hctl_handle_events(handle); - assert(res > 0); + if (res < 0) + printf("ERR: %s (%d)\n", snd_strerror(res), res); } } snd_hctl_close(handle);