mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:25:42 +01:00
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:
parent
2c753a85a7
commit
69276d4a6c
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue