Once Pipewire is started it will try to register a BAP broadcast source media endpoint on UUID 00001852-0000-1000-8000-00805f9b34fb if the media codec that supports BAP and the adapter indicates LE Audio is supported.
When the endpoint is detected (over DBus) by Pipewire and it has a broadcast sink UUID, a new device will be created with the address 00:00:00:00:00:00. This device will be our simulated remote device. This is done because a broadcast source emitting device does not need any connection to start transmitting the audio. This device is set as connected.
When the SetConfiguration DBus method is called and the spa_bt_transport structure with the profile BAP broadcast source is created we switch the device from the one read from DBus to the one created by us. This is done because in BlueZ, when the transport is created, at the Device property, BlueZ sets the adapter as the device that the transport is connected to. Here the device will have the newly created SPA_BT_PROFILE_BAP_BROADCAST_SINK profile connected.
Added code that allows to create a node in the graph for a device connected to the SPA_BT_PROFILE_BAP_BROADCAST_SINK profile.
Make sure we can only suspend when the node is (going to) IDLE. We don't
really want to allow applications to suspend a node that is running or
starting up.
This might fix a race when a node is suspended at the same time it is
started and cause silence. It also fixes the issue of total silence when
doing "pactl suspend <node> 1" on a running node.
See #3378
When the buffer frames change, make sure we emit a latency recalculation
even if we don't have a buffer_size callback.
Remove the unused GRAPH notify.
Protect ringbuffer writes to the notify queue with a lock because we
can't know what thread they execute in.
Make a new TOTAL_LATENCY notify type to trigger a complete latency
recalculation.
It is sometimes useful to add a custom profile-set.
For that, e.g. `default.conf` needs to be modified.
(at least, i have not succeeded in just adding a new file)
But that change gets overridden when the package is updated,
which could be *extremely* dangerous, e.g. if said profile
changed the `volume-limit`.
By shipping an "empty" `9999-custom.conf`,
the update becomes less problematic,
because one can now use e.g. `dpkg-divert` on said file.
Refs. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050293
Make sure we can only suspend when the node is (going to) IDLE. We don't
really want to suspend a node that is running or starting up.
Deactivate the node while we suspend so that graph recalc because of the
unprepared links will not try to prepare the links again.
This might fix a race when a node is suspended at the same time it is
started and cause silence. It also fixes the issue of total silence when
doing "pactl suspend <node> 1" on a running node.
This avoids the potential confusion when both codecless and codec profiles are
enumerated for A2DP.
Give base name to highest priority profile, so that best codec can be selected
at command line with out knowing which codecs are actually supported.
Some A2DP devices don't like reusing the same transport for different
media-sink instances, possibly because encoder is reset in between and
there can be a gap in transmitted audio.
This doesn't matter for SCO/ISO.
Fixes the return type of spa_pod_builder_control() from uint32_t to int.
Since the function returns the int returned by spa_pod_builder_raw,
the return type of the function should also be an int.
Node that have the node.always-process = false property do not conform
to the jack API because they will be suspended even when they don't
inactivate themselves. Don't hide the ports for those clients when
inactive.
Fixes#3416
Start scanning from a non-driving runnable node in one direction and set
all linked intermedia nodes runnable as well.
This ensure that play -> driving_sink -> effect -> sink also sets the
effect and sink nodes to running.
Fixes #3405
The provider might fail to connect to the PipeWire core when starting up, so
when stopping we need to check the core is valid before attempting to acquire a
mutex on its loop.