static void thread_func(void *userdata) {
struct userdata *u = userdata;
- unsigned short revents = 0;
pa_assert(u);
if (PA_SINK_IS_OPENED(u->sink->thread_info.state)) {
struct pollfd *pollfd;
+
if (u->rtpoll_item) {
+ unsigned short revents = 0;
+
pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
revents = pollfd->revents;
if (revents & ~POLLOUT) {
/* Need to reset revents because pa_rtpoll_run just returns without calling poll */
pollfd->revents = 0;
- revents = 0;
- } else {
- //pa_log_debug("Poll wakeup.", revents);
}
}
}
static void thread_func(void *userdata) {
struct userdata *u = userdata;
- unsigned short revents = 0;
pa_assert(u);
pa_log_debug("Thread starting up");
if (PA_SOURCE_IS_OPENED(u->source->thread_info.state)) {
struct pollfd *pollfd;
+
if (u->rtpoll_item) {
+ unsigned short revents = 0;
+
pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
revents = pollfd->revents;
if (revents & ~POLLIN) {
pa_log_debug("Poll error 0x%x occured, try recover.", revents);
pa_hal_interface_pcm_recover(u->hal_interface, u->pcm_handle, revents);
u->first = true;
- revents = 0;
- } else {
- //pa_log_debug("Poll wakeup.", revents);
}
}
}