From: Jaroslav Kysela Date: Mon, 29 Mar 2021 09:36:17 +0000 (+0200) Subject: amixer: print error when snd_hctl_handle_events() fails X-Git-Tag: v1.2.5~45 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=69276d4a6c92599fb3cc9a9a4db64ce22cff8504;p=alsa-utils.git 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 --- 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);