mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
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:
parent
28c49a12fc
commit
0f44b1e820
12 changed files with 76 additions and 25 deletions
|
|
@ -350,8 +350,10 @@ static void verify_access(struct userdata *u, struct device *d) {
|
|||
/* If we are already loaded update suspend status with
|
||||
* accessible boolean */
|
||||
|
||||
if ((card = pa_namereg_get(u->core, d->card_name, PA_NAMEREG_CARD)))
|
||||
if ((card = pa_namereg_get(u->core, d->card_name, PA_NAMEREG_CARD))) {
|
||||
pa_log_debug("%s all sinks and sources of card %s.", accessible ? "Resuming" : "Suspending", d->card_name);
|
||||
pa_card_suspend(card, !accessible, PA_SUSPEND_SESSION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue