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.
The sequence of events seems to be roughly this:
- Bluez notifies WP about the transport
lua:createDeviceruns and calls device:activate
bluez5-device.c:emit_noderuns, but there are no listeners registered, so
create-objectdoes 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.