control: always link notify and control controls

This commit is contained in:
Wim Taymans 2018-08-30 12:35:14 +02:00
parent 0bce72d898
commit 61e4ad3b41
2 changed files with 8 additions and 16 deletions

View file

@ -559,20 +559,16 @@ static void try_link_controls(struct impl *impl, struct pw_port *port, struct pw
pw_log_debug("module %p: trying controls", impl); pw_log_debug("module %p: trying controls", impl);
spa_list_for_each(cout, &port->control_list[SPA_DIRECTION_OUTPUT], port_link) { spa_list_for_each(cout, &port->control_list[SPA_DIRECTION_OUTPUT], port_link) {
spa_list_for_each(cin, &target->control_list[SPA_DIRECTION_INPUT], port_link) { spa_list_for_each(cin, &target->control_list[SPA_DIRECTION_INPUT], port_link) {
if (cin->id != cout->id) {
if ((res = pw_control_link(cout, cin)) < 0) if ((res = pw_control_link(cout, cin)) < 0)
pw_log_error("failed to link controls: %s", spa_strerror(res)); pw_log_error("failed to link controls: %s", spa_strerror(res));
} }
} }
}
spa_list_for_each(cin, &port->control_list[SPA_DIRECTION_INPUT], port_link) { spa_list_for_each(cin, &port->control_list[SPA_DIRECTION_INPUT], port_link) {
spa_list_for_each(cout, &target->control_list[SPA_DIRECTION_OUTPUT], port_link) { spa_list_for_each(cout, &target->control_list[SPA_DIRECTION_OUTPUT], port_link) {
if (cin->id != cout->id) {
if ((res = pw_control_link(cout, cin)) < 0) if ((res = pw_control_link(cout, cin)) < 0)
pw_log_error("failed to link controls: %s", spa_strerror(res)); pw_log_error("failed to link controls: %s", spa_strerror(res));
} }
} }
}
} }
static int static int

View file

@ -212,20 +212,16 @@ static void try_link_controls(struct impl *impl, struct pw_port *port, struct pw
pw_log_debug("module %p: trying controls", impl); pw_log_debug("module %p: trying controls", impl);
spa_list_for_each(cout, &port->control_list[SPA_DIRECTION_OUTPUT], port_link) { spa_list_for_each(cout, &port->control_list[SPA_DIRECTION_OUTPUT], port_link) {
spa_list_for_each(cin, &target->control_list[SPA_DIRECTION_INPUT], port_link) { spa_list_for_each(cin, &target->control_list[SPA_DIRECTION_INPUT], port_link) {
if (cin->id != cout->id) {
if ((res = pw_control_link(cout, cin)) < 0) if ((res = pw_control_link(cout, cin)) < 0)
pw_log_error("failed to link controls: %s", spa_strerror(res)); pw_log_error("failed to link controls: %s", spa_strerror(res));
} }
} }
}
spa_list_for_each(cin, &port->control_list[SPA_DIRECTION_INPUT], port_link) { spa_list_for_each(cin, &port->control_list[SPA_DIRECTION_INPUT], port_link) {
spa_list_for_each(cout, &target->control_list[SPA_DIRECTION_OUTPUT], port_link) { spa_list_for_each(cout, &target->control_list[SPA_DIRECTION_OUTPUT], port_link) {
if (cin->id != cout->id) {
if ((res = pw_control_link(cout, cin)) < 0) if ((res = pw_control_link(cout, cin)) < 0)
pw_log_error("failed to link controls: %s", spa_strerror(res)); pw_log_error("failed to link controls: %s", spa_strerror(res));
} }
} }
}
} }