Skip to content

Draft: wp-object: arm the activation with a high priority idle callback

This allows the activation to start before execution calls into the libpipewire event loop, which flushes protocol messages.

The intention is to fix a Bluetooth bug where changing between A2DP profiles momentarily causes streams to be linked to an internal speaker. This happens because, while the A2DP node is destroyed by WpSpaDevice and "create-object" is immediately called in Lua, the new WpImplNode that is created does not get exported because its activation is configured to start with an idle callback; that callback runs after the pipewire event loop is processed and therefore the old node removal and the new node creation are announced in different pipewire protocol cycles, which makes the event dispatcher ineffective as it "sees" no events other than node-removed at this point and therefore allows the relinking procedure to start right after the node is destroyed.

Merge request reports