From 0deb6a4b13efd852de6c9ce08e587149368c3b0e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 9 Sep 2008 02:17:01 +0300 Subject: minor improvements in debug handling --- src/modules/module-alsa-sink.c | 8 +++++--- src/modules/module-alsa-source.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/modules/module-alsa-sink.c b/src/modules/module-alsa-sink.c index 24ae7234..b8bef935 100644 --- a/src/modules/module-alsa-sink.c +++ b/src/modules/module-alsa-sink.c @@ -654,7 +654,9 @@ static int unsuspend(struct userdata *u) { } if (nfrags != u->nfragments || period_size*u->frame_size != u->fragment_size) { - pa_log_warn("Resume failed, couldn't restore original fragment settings."); + pa_log_warn("Resume failed, couldn't restore original fragment settings. (Old: %lu*%lu, New %lu*%lu)", + (unsigned long) u->nfragments, (unsigned long) u->fragment_size, + (unsigned long) nfrags, period_size * u->frame_size); goto fail; } @@ -1154,7 +1156,7 @@ static void thread_func(void *userdata) { goto fail; } - if (revents & (POLLERR|POLLNVAL|POLLHUP)) { + if (revents & (POLLERR|POLLNVAL|POLLHUP|POLLPRI)) { if (pa_alsa_recover_from_poll(u->pcm_handle, revents) < 0) goto fail; @@ -1163,7 +1165,7 @@ static void thread_func(void *userdata) { } if (revents && u->use_tsched) - pa_log_debug("Wakeup from ALSA! (%i)", revents); + pa_log_debug("Wakeup from ALSA!%s%s", (revents & POLLIN) ? " INPUT" : "", (revents & POLLOUT) ? " OUTPUT" : ""); } } diff --git a/src/modules/module-alsa-source.c b/src/modules/module-alsa-source.c index 86e08f7b..cb777672 100644 --- a/src/modules/module-alsa-source.c +++ b/src/modules/module-alsa-source.c @@ -597,7 +597,9 @@ static int unsuspend(struct userdata *u) { } if (nfrags != u->nfragments || period_size*u->frame_size != u->fragment_size) { - pa_log_warn("Resume failed, couldn't restore original fragment settings."); + pa_log_warn("Resume failed, couldn't restore original fragment settings. (Old: %lu*%lu, New %lu*%lu)", + (unsigned long) u->nfragments, (unsigned long) u->fragment_size, + (unsigned long) nfrags, period_size * u->frame_size); goto fail; } @@ -989,7 +991,7 @@ static void thread_func(void *userdata) { goto fail; } - if (revents & (POLLERR|POLLNVAL|POLLHUP)) { + if (revents & (POLLERR|POLLNVAL|POLLHUP|POLLPRI)) { if (pa_alsa_recover_from_poll(u->pcm_handle, revents) < 0) goto fail; @@ -997,7 +999,7 @@ static void thread_func(void *userdata) { } if (revents && u->use_tsched) - pa_log_debug("Wakeup from ALSA! (%i)", revents); + pa_log_debug("Wakeup from ALSA!%s%s", (revents & POLLIN) ? " INPUT" : "", (revents & POLLOUT) ? " OUTPUT" : ""); } } -- cgit v1.2.3