summaryrefslogtreecommitdiff
path: root/amixer
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2021-03-29 11:36:17 +0200
committerJaroslav Kysela <perex@perex.cz>2021-03-29 11:36:19 +0200
commit69276d4a6c92599fb3cc9a9a4db64ce22cff8504 (patch)
tree1c5a3f1b7b291a3569dd67b35f9df1b407fb6d82 /amixer
parent2c753a85a7834f6cbaa130d798f54fbf5bd87520 (diff)
downloadalsa-utils-69276d4a6c92599fb3cc9a9a4db64ce22cff8504.tar.gz
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>
Diffstat (limited to 'amixer')
-rw-r--r--amixer/amixer.c3
1 files changed, 2 insertions, 1 deletions
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);