mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
context: handle non-passive driver links to itself
A non-passive link between the driver and itself should make the driver active as well. This makes the midi-bridge running when linking its ports. It also activates a sink when its monitor ports are connected to its playback ports. Fixes #3153
This commit is contained in:
parent
2a5c23c811
commit
bd04af6cc9
1 changed files with 12 additions and 6 deletions
|
|
@ -885,15 +885,18 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *node,
|
|||
|
||||
pw_impl_link_prepare(l);
|
||||
|
||||
if (!l->prepared || t->visited)
|
||||
if (!l->prepared || (t != n && t->visited))
|
||||
continue;
|
||||
|
||||
if (!l->passive)
|
||||
t->runnable = true;
|
||||
|
||||
if (!t->visited) {
|
||||
t->visited = true;
|
||||
spa_list_append(&queue, &t->sort_link);
|
||||
}
|
||||
}
|
||||
}
|
||||
spa_list_for_each(p, &n->output_ports, link) {
|
||||
spa_list_for_each(l, &p->links, output_link) {
|
||||
t = l->input->node;
|
||||
|
|
@ -903,15 +906,18 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *node,
|
|||
|
||||
pw_impl_link_prepare(l);
|
||||
|
||||
if (!l->prepared || t->visited)
|
||||
if (!l->prepared || (t != n && t->visited))
|
||||
continue;
|
||||
|
||||
if (!l->passive)
|
||||
t->runnable = true;
|
||||
|
||||
if (!t->visited) {
|
||||
t->visited = true;
|
||||
spa_list_append(&queue, &t->sort_link);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* now go through all the nodes that have the same group and
|
||||
* that are not yet visited */
|
||||
if (n->group != NULL || n->link_group != NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue