media-session: skip route availability check for default nodes

For default nodes, that are explicitly configured, skip the route check.
This makes it possible for the user to select a non-available node
as the default still.

Fixes #1624
This commit is contained in:
Wim Taymans 2021-09-20 18:33:08 +02:00
parent 64f83158f4
commit 2ae6ac2bcb

View file

@ -769,10 +769,6 @@ static int find_node(void *data, struct node *node)
pw_log_debug(".. connecting link-group %s", find->link_group);
return 0;
}
if (device != NULL && !have_available_route(node, device)) {
pw_log_debug(".. no available routes");
return 0;
}
plugged = node->plugged;
priority = node->priority;
@ -799,6 +795,10 @@ static int find_node(void *data, struct node *node)
if (is_default)
priority += 10000;
}
if (device != NULL && !is_default && !have_available_route(node, device)) {
pw_log_debug(".. no available routes");
return 0;
}
if ((find->capture_sink && node->direction != PW_DIRECTION_INPUT) ||
(!find->capture_sink && !is_default && node->direction == find->direction)) {