diff options
Diffstat (limited to 'src/pulsecore')
-rw-r--r-- | src/pulsecore/asyncq.h | 5 | ||||
-rw-r--r-- | src/pulsecore/aupdate.h | 2 | ||||
-rw-r--r-- | src/pulsecore/cpu-arm.c | 6 | ||||
-rw-r--r-- | src/pulsecore/memblockq.h | 2 | ||||
-rw-r--r-- | src/pulsecore/rtpoll.c | 23 |
5 files changed, 29 insertions, 9 deletions
diff --git a/src/pulsecore/asyncq.h b/src/pulsecore/asyncq.h index e6847ab8..47ccbf03 100644 --- a/src/pulsecore/asyncq.h +++ b/src/pulsecore/asyncq.h @@ -48,8 +48,9 @@ void pa_asyncq_free(pa_asyncq* q, pa_free_cb_t free_cb); void* pa_asyncq_pop(pa_asyncq *q, pa_bool_t wait); int pa_asyncq_push(pa_asyncq *q, void *p, pa_bool_t wait); -/* Similar to pa_asyncq_push(), but if the queue is full, postpone it - * locally and delay until pa_asyncq_before_poll_post() */ +/* Similar to pa_asyncq_push(), but if the queue is full, postpone the + * appending of the item locally and delay until + * pa_asyncq_before_poll_post() is called. */ void pa_asyncq_post(pa_asyncq*l, void *p); /* For the reading side */ diff --git a/src/pulsecore/aupdate.h b/src/pulsecore/aupdate.h index fb38ffa2..48871126 100644 --- a/src/pulsecore/aupdate.h +++ b/src/pulsecore/aupdate.h @@ -39,7 +39,7 @@ void pa_aupdate_write_end(pa_aupdate *a); /* Will return 0, or 1, depending which copy of the data the caller * should modify. Each time called this will return the opposite of - * the previous pa_aupdate_write_begin()/pa_aupdate_write_swap() + * the previous pa_aupdate_write_begin() / pa_aupdate_write_swap() * call. Should only be called between pa_aupdate_write_begin() and * pa_aupdate_write_end() */ unsigned pa_aupdate_write_swap(pa_aupdate *a); diff --git a/src/pulsecore/cpu-arm.c b/src/pulsecore/cpu-arm.c index 6bb2eadd..bf632f7a 100644 --- a/src/pulsecore/cpu-arm.c +++ b/src/pulsecore/cpu-arm.c @@ -30,6 +30,7 @@ #include <fcntl.h> #include <pulse/xmalloc.h> +#include <pulsecore/core-util.h> #include <pulsecore/log.h> #include "cpu-arm.h" @@ -67,7 +68,7 @@ static char *get_cpuinfo(void) { return NULL; } - if ((n = pa_read(fd, cpuinfo, MAX_BUFFER-1)) < 0) { + if ((n = pa_read(fd, cpuinfo, MAX_BUFFER-1, NULL)) < 0) { pa_xfree(cpuinfo); pa_close(fd); return NULL; @@ -105,7 +106,8 @@ void pa_cpu_init_arm (void) { } /* get the CPU features */ if ((line = get_cpuinfo_line (cpuinfo, "Features"))) { - char *state = NULL, *current; + const char *state = NULL; + char *current; while ((current = pa_split_spaces (line, &state))) { if (!strcmp (current, "vfp")) diff --git a/src/pulsecore/memblockq.h b/src/pulsecore/memblockq.h index 587c364b..b756549a 100644 --- a/src/pulsecore/memblockq.h +++ b/src/pulsecore/memblockq.h @@ -165,7 +165,7 @@ void pa_memblockq_set_silence(pa_memblockq *memblockq, pa_memchunk *silence); void pa_memblockq_apply_attr(pa_memblockq *memblockq, const pa_buffer_attr *a); void pa_memblockq_get_attr(pa_memblockq *bq, pa_buffer_attr *a); -/* Call pa_memchunk_willneed() for every chunk in the queue from the current read pointer to the end */ +/* Call pa_memchunk_will_need() for every chunk in the queue from the current read pointer to the end */ void pa_memblockq_willneed(pa_memblockq *bq); /* Check whether the memblockq is completely empty, i.e. no data diff --git a/src/pulsecore/rtpoll.c b/src/pulsecore/rtpoll.c index 83993f02..2ef78736 100644 --- a/src/pulsecore/rtpoll.c +++ b/src/pulsecore/rtpoll.c @@ -42,6 +42,7 @@ #include <pulsecore/core-util.h> #include <pulsecore/winsock.h> #include <pulsecore/ratelimit.h> +#include <pulse/rtclock.h> #include "rtpoll.h" @@ -212,6 +213,10 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait_op) { pa_assert(p); pa_assert(!p->running); +#ifdef DEBUG_TIMING + pa_log("rtpoll_run"); +#endif + p->running = TRUE; p->timer_elapsed = FALSE; @@ -225,13 +230,19 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait_op) { if (!i->work_cb) continue; - if (p->quit) + if (p->quit) { +#ifdef DEBUG_TIMING + pa_log("rtpoll finish"); +#endif goto finish; + } if ((k = i->work_cb(i)) != 0) { if (k < 0) r = k; - +#ifdef DEBUG_TIMING + pa_log("rtpoll finish"); +#endif goto finish; } } @@ -263,7 +274,9 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait_op) { if (k < 0) r = k; - +#ifdef DEBUG_TIMING + pa_log("rtpoll finish"); +#endif goto finish; } } @@ -287,6 +300,10 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait_op) { pa_usec_t now = pa_rtclock_now(); p->awake = now - p->timestamp; p->timestamp = now; + if (!wait_op || p->quit || p->timer_enabled) + pa_log("poll timeout: %d ms ",(int) ((timeout.tv_sec*1000) + (timeout.tv_usec / 1000))); + else + pa_log("poll timeout is ZERO"); } #endif |