diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-09-09 02:17:01 +0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-09-09 02:17:01 +0300 |
commit | 0deb6a4b13efd852de6c9ce08e587149368c3b0e (patch) | |
tree | 42bbca88cbe9df870fcb16acde569338fb8da979 | |
parent | 4050447230040983fdc07f665cf4ec3f23dde217 (diff) |
minor improvements in debug handling
-rw-r--r-- | src/modules/module-alsa-sink.c | 8 | ||||
-rw-r--r-- | 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" : ""); } } |