minor improvements in debug handling

This commit is contained in:
Lennart Poettering 2008-09-09 02:17:01 +03:00
parent 4050447230
commit 0deb6a4b13
2 changed files with 10 additions and 6 deletions

View file

@ -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" : "");
}
}

View file

@ -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" : "");
}
}