From 43aeb1c22421b68acdfae4ebec0a467b2ff47cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 2 Jan 2019 18:14:26 +0100 Subject: [PATCH] module/alsa: include volume min/max/cur and muted state in info log --- modules/alsa.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/alsa.c b/modules/alsa.c index 29f65b4..916eb37 100644 --- a/modules/alsa.c +++ b/modules/alsa.c @@ -97,11 +97,13 @@ run(struct module_run_context *ctx) snd_mixer_selem_id_set_name(sid, m->mixer); snd_mixer_elem_t* elem = snd_mixer_find_selem(handle, sid); - LOG_INFO("connected to card=%s, mixer=%s", m->card, m->mixer); - /* Initial state */ update_state(mod, elem); + LOG_INFO("%s,%s: volume min=%ld, max=%ld, current=%ld%s", + m->card, m->mixer, m->vol_min, m->vol_max, m->vol_cur, + m->muted ? ", muted" : ""); + while (true) { int fd_count = snd_mixer_poll_descriptors_count(handle); assert(fd_count >= 1);