mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-12 13:30:15 -05:00
context: fix passive node check
A node starts out as passive but becomes non-passive when there is a non-passive link to an active node. If there is a link to an inactive node, the node remains passive. This fixes suspend of drivers in all cases. Fixes #898
This commit is contained in:
parent
75b4c80dc6
commit
f2b537bb65
1 changed files with 10 additions and 6 deletions
|
|
@ -874,10 +874,12 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *driver
|
|||
spa_list_for_each(p, &n->input_ports, link) {
|
||||
spa_list_for_each(l, &p->links, input_link) {
|
||||
t = l->output->node;
|
||||
if (!l->passive)
|
||||
driver->passive = n->passive = false;
|
||||
else
|
||||
|
||||
if (l->passive)
|
||||
pw_impl_link_prepare(l);
|
||||
else if (t->active)
|
||||
driver->passive = n->passive = false;
|
||||
|
||||
if (t->visited || !t->active)
|
||||
continue;
|
||||
if (l->prepared) {
|
||||
|
|
@ -889,10 +891,12 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *driver
|
|||
spa_list_for_each(p, &n->output_ports, link) {
|
||||
spa_list_for_each(l, &p->links, output_link) {
|
||||
t = l->input->node;
|
||||
if (!l->passive)
|
||||
driver->passive = n->passive = false;
|
||||
else
|
||||
|
||||
if (l->passive)
|
||||
pw_impl_link_prepare(l);
|
||||
else if (t->active)
|
||||
driver->passive = n->passive = false;
|
||||
|
||||
if (t->visited || !t->active)
|
||||
continue;
|
||||
if (l->prepared) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue