Proposed implementation on how to configure the BAP Broadcast Source from PipeWire
Hi, we would like to add support in PipeWire to configure the BAP Broadcast Source.
The implementation we propose is:
In WirePlumber Bluetooth configuration under monitor.bluez.properties we add the property “bluez5.bcast_source.config” which will define the BISes configuration.
Example:
bluez5.bcast_source.config = [
{
"broadcast_code" : [1, 2, 104, 5, 83, 241, 65, 90, 162, 101, 187, 175, 198, 234, 3, 184],
"presentation_delay" : 40000,
"bis": [
{
"codec_capability" : [2, 1, 3, 2, 2, 1, 3, 4, 40, 0, 5, 3, 1, 0, 0, 0],
"qos" : {
"sync_factor" : 1,
....
},
"metadata" : [3, 2, 2, 0]
}
]
}
]
In BlueZ after the broadcast source endpoint is registered, an endpoint is created on D-Bus. To configure the BISes of the broadcast source SetConfiguration with information like codec capabilities, metadata, qos, etc.. must be called on this endpoint. Each call represents the configuration of a new BIS.
When the endpoint is detected (over DBus) by Pipewire and it has a broadcast sink UUID, we will start calling se “SetConfiguration” with the data read from the configuration file (or default configuration) After each SetConfiguration BlueZ will create a transport with the data from SetConfiguration that will be used by PipeWire.
Thanks for the support.