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 <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-03-29 11:36:17 +02:00
parent 2c753a85a7
commit 69276d4a6c

View file

@ -1602,7 +1602,8 @@ static int events(int argc ATTRIBUTE_UNUSED, char *argv[] ATTRIBUTE_UNUSED)
if (res >= 0) { if (res >= 0) {
printf("Poll ok: %i\n", res); printf("Poll ok: %i\n", res);
res = snd_hctl_handle_events(handle); 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); snd_hctl_close(handle);