Some special characters like '\v' are encoded using 6 characters, which
currently does not work because the VLA size asumes a maximum of 4 characters
per encoded special character. This patch refactors this logic to avoid using
VLAs at all and encodes the string directly into the builder.
See #471
Similar to wp_spa_json_builder_add_property(), we need to make sure the dst
array in wp_spa_json_builder_add_string() has room for the null character
because builder_add() expects it.
Fixes#471
Disable bluez5.auto-connect.
It makes PW to try connect to all locally known BT audio devices on
start, which is in general not a good thing to do.
Some BT adapters are not capable of simultaneous audio streaming and
scanning for connections (e.g Raspberry Pi builtin BT, probably more),
so audio stutters until adapter/kernel give up trying to connect to
devices that cannot be reached.
Disabling it makes devices to not reconnect on user VT switch, but also
that we should only do for devices that were connected when logind
switched.
After a timeout, it's possible that something else may have
destroyed the node already. This can happen for example with virtual
sinks that were created from another process.
Fixes: #467
libcamera uses namespaces to sandbox IPA (Image Processing Algorithm)
modules because they are sometimes proprietary binary blobs. The
RestrictNamespaces option in Wireplumber's systemd service breaks this
sandboxing when libcamera is loaded via the libcamera SPA module, so
cameras requiring an IPA do not work.
This commit removes RestrictNamespaces so that the sandboxing works
again. I've confirmed that after this change wireplumber works with
libcamera with an IPA module.
Resolves#466
Timeout of 3 seconds is too slow for test-si-standard-link on slower
devices, crank this up with plenty of extra margin. Does not
practically affect running time on faster devices.
For Bluetooth LE Audio device sets (e.g. pair of earbuds), bluez5-device
emits "internal" nodes for each individual device, and a combine node
for the device set.
Make the bluetooth monitor to create the combine nodes using
module-combine-stream.
Do some shenanigans to route ObjectConfig events from bluez5-device to
the correct combine node: look for combine nodes associated with device
sets, and put them as managed objects of the Spa devices.
Add a new signal that gets emitted if any WpLink changes to an error
state. This allows better error handling in cases where e.g. no format
could be negotiated.
Add support for BLE MIDI devices and local endpoints.
Disabled by default for now, as the feature currently faces some
DBus/SELinux policy issues e.g. on Fedora.
The spa_json_encode_string() API does not add a null terminator character. We
need to use the return value to know the size of the encoded string when adding
it to the builder.
This is a tricky case where iteration matches the last 2 objects
managed by an object manager. When we remove them while iterating,
the last object is not removed because it takes the place of the first
upon removal (side-effect of g_ptr_array_remove_fast()) and the iterator
skips it.
See #388
For offload SCO, the audio stream should be routed to/from Bluetooth
chipset via ALSA.
To do this, this commit prevent the creation of the sco-source or sco-sink
nodes, and replace them by loopback nodes.
It's up to the platform to correctly the the route to the Bluetooth chipset
ALSA entries.
When the loopback node state change to running, the script also call the
bluetoothOffloadActive param of the device to start/stop the SCO link.