X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=discover.c;h=ca3591b7094c3f826d6474a48997a50eecd57061;hb=cc70e0ae30920ca835bf011f8040afb6fea43f45;hp=79164bb06b44a866e1747e9b4370fc9622313a64;hpb=2478974dfde05063cbf0233e3d3c434ca2f46c7c;p=staging%2Fagl-audio-plugin.git diff --git a/discover.c b/discover.c index 79164bb..ca3591b 100644 --- a/discover.c +++ b/discover.c @@ -743,12 +743,10 @@ void agl_discover_register_source_output (struct userdata *u, pa_source_output * void agl_discover_add_sink_input (struct userdata *u, pa_sink_input *sinp) { - pa_core *core; agl_node *node; pa_assert (u); pa_assert (sinp); - pa_assert_se (core = u->core); if (!sinp->client) return; @@ -759,16 +757,22 @@ void agl_discover_add_sink_input (struct userdata *u, pa_sink_input *sinp) /* start routing */ agl_router_register_node (u, node); + + /* apply priority effects */ + agl_router_apply_node_priority_effect (u, node, true); } void agl_discover_remove_sink_input (struct userdata *u, pa_sink_input *sinp) { - pa_core *core; - agl_node *node; + agl_nodeset *nodeset; + agl_node *node, *n; + pa_sink *sink; + int priority; + uint32_t index; pa_assert (u); pa_assert (sinp); - pa_assert_se (core = u->core); + pa_assert_se (nodeset = u->nodeset); if (!sinp->client) return; @@ -779,4 +783,10 @@ void agl_discover_remove_sink_input (struct userdata *u, pa_sink_input *sinp) /* stop routing */ agl_router_unregister_node (u, node); + + /* un-apply priority effects */ + agl_router_apply_node_priority_effect (u, node, false); + + /* remove node */ + agl_node_destroy (u, node); }