Skip to content

linking: handle defined target properly with smart filters

Julian Bouzas requested to merge julian/wireplumber:filter-fixes into master

If we have 2 audio sink nodes (default-sink and not-default-sink), and 1 smart filter linked to the default sink node (default-filter), and we do the following:

pw-play test.wav --target not-default-sink

Wireplumber will link pw-play with the filter that is linked to the default node (default-filter), which is wrong. The client should instead be linked with the not default sink node (not-default-sink).

On the other hand, if the not default sink node (not-default-sink) also has a filter linked to it (not-default-filter), and we use the same pw-play command, WirePlumber should link pw-play to the not default filter (not-default-filter), instead of the default filter (default-filter).

This MR fixes both problems.

Finally, this MR also adds a new property. This property indicates whether a filter can be directly linked with clients that have a defined target or not. This can be useful when a client wants to be linked with a filter that is in the middle of the chain in order to bypass the filters that are placed before the selected one. If the property is not set, wireplumber will consider the filter not targetable by default, meaning filters will never by bypassed by clients, and clients will always be linked with the first filter in the chain. This fixes #554 (closed).

Merge request reports