mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
context: activate loopback to drivers
We start with setting the visitied flag on the driver. Still follow the links to other visited nodes because it might make them active. for example, adding a link between two midi ports should make the midi driver running so that data flows between the ports. See #1559
This commit is contained in:
parent
a4f3a23095
commit
3300f5ddc4
1 changed files with 12 additions and 6 deletions
|
|
@ -985,15 +985,18 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *driver
|
|||
spa_list_for_each(l, &p->links, input_link) {
|
||||
t = l->output->node;
|
||||
|
||||
if (t->visited || !t->active)
|
||||
if (!t->active)
|
||||
continue;
|
||||
|
||||
pw_impl_link_prepare(l);
|
||||
|
||||
if (!l->passive && l->prepared)
|
||||
if (!l->prepared)
|
||||
continue;
|
||||
|
||||
if (!l->passive)
|
||||
driver->passive = n->passive = false;
|
||||
|
||||
if (l->prepared) {
|
||||
if (!t->visited) {
|
||||
t->visited = true;
|
||||
spa_list_append(&queue, &t->sort_link);
|
||||
}
|
||||
|
|
@ -1003,15 +1006,18 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *driver
|
|||
spa_list_for_each(l, &p->links, output_link) {
|
||||
t = l->input->node;
|
||||
|
||||
if (t->visited || !t->active)
|
||||
if (!t->active)
|
||||
continue;
|
||||
|
||||
pw_impl_link_prepare(l);
|
||||
|
||||
if (!l->passive && l->prepared)
|
||||
if (!l->prepared)
|
||||
continue;
|
||||
|
||||
if (!l->passive)
|
||||
driver->passive = n->passive = false;
|
||||
|
||||
if (l->prepared) {
|
||||
if (!t->visited) {
|
||||
t->visited = true;
|
||||
spa_list_append(&queue, &t->sort_link);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue