Fail to setup a2dp source connection
Wireplumber fails to setup an a2dp connection if the audio source plays immediately after connection. This can be replicated by connecting an Android phone while a music is playing.
This seems to be caused by a missed create-object
notification, but I do not fully understand the PipeWire/WirePlumber object model so I am not sure how to fix this. The device object gets created and exported, but the node object does not get exported and does not turn up in e.g. pw-mon
.
The sequence of events seems to be roughly this:
- Bluez notifies WP about the transport
-
lua:createDevice
runs and calls device:activate -
bluez5-device.c:emit_node
runs, but there are no listeners registered, socreate-object
does not get called - main event loop activates the device and registers listeners
If the source starts playing some time after connection, (2) (3) get reordered and the connection works.