Log the reason for every suspend/resume.

I was looking at a log that showed that a suspend happened (at
a strange time), but the log didn't tell me why the suspend was done.
This patch tries to make sure that that won't happen again.
This commit is contained in:
Tanu Kaskinen 2012-11-16 18:24:34 +02:00
parent 28c49a12fc
commit 0f44b1e820
12 changed files with 76 additions and 25 deletions

View file

@ -126,6 +126,7 @@ static int sink_set_state_cb(pa_sink *s, pa_sink_state_t state) {
if (state == PA_SINK_RUNNING) {
/* need to wake-up source if it was suspended */
pa_log_debug("Resuming source %s, because its uplink sink became active.", u->source->name);
pa_source_suspend(u->source, FALSE, PA_SUSPEND_ALL);
/* FIXME: if there's no client connected, the source will suspend