When the `done` flag was first added in
9f9be7d7f2, it was
actually needed because cleanup was implemented
using a per-client eventfd which was signalled when
something related to the particular client needed
to be freed. The function that ran, then, checked
each stream's `done` flag, and freed them as necessary.
However, since c70a5de526,
the stream cleanup is done using a work queue, and as
a consequence, the `done` flag is no longer needed.
When the `disconnecting` flag was first added in
d44fdabea1, a client's
streams were not explicitly destroyed when it was freed,
instead, only the client's pw_core was disconnected,
which then caused all related streams to be destroyed.
Thus there needed to be a way to determine why the stream's
state changed to PW_STREAM_STATE_UNCONNECTED as it may have
been because the client is disconnecting or because the
stream has been "killed" in some other way.
The `COMMAND_{PLAYBACK,RECORD}_STREAM_KILLED` command
only needed to be sent to the client in the second case.
However, at the moment, all streams of a client are explicitly
destroyed before it's pw_core is disconnected. This makes the
`disconnecting` flag unnecessary, thus it can be removed.
Move the reference counting from `pending_sample_free()`
into `on_sample_done()` so that the client's references
are managed in a single place.
The reason why `pending_sample_free()` cannot simply call
`client_unref()` is that `client_free()` may be called from
`manager_disconnect()` regardless of the reference count,
and, in turn, `pending_sample_free()` may be called,
which could then lead to a recursive call to `client_free()`.
Load all sections found in all prefix/name.conf.d directories and add
them to the config as overrides.
If for example jack.conf is loaded, check in:
/usr/share/pipewire/jack.conf.d/
/etc/pipewire/jack.conf.d/
$XDG_CONFIG_HOME/pipewire/jack.conf.d/
or ~/.config/pipewire/jack.conf.d/
For .conf files and also process the sections. The files are processed
in sorted order so 10-remap.conf can be used to specify the order.
When processing a section, first the global conf is applied and then the
overrides in their order.
This makes it possible to override properties or add modules,
objects and custom matching rules.
Since the merging logic is handled either internally or by the
application, we can add more syntax later to do more complex merges.
See #207
Instead of reading all config section in properties, emit a callback
for each section, allow for filtering on a particular section as
well. In the callback, update the section value in the properties.
Deprecate get_conf_section(), it can't support multiple section
updates.
When sink is follower, and no data to write is available, it should not
schedule a timeout, but wait for the driver to wake it up again.
Fixes process ending up busylooping in data thread as follower, under
some conditions.
Also, clean up the code to be more clear about timeout logic. Just loop
directly instead of setting timeout 1, if we need to just flush more
immediately.
When acting as SCO AG / A2DP sink, the remote end should decide when to
close the connection. This does not work currently properly, because
stopping sources/sinks releases the transport, which causes it to go
idle, and which then destroys dynamic nodes. The sources/sinks should
not cause the transport to be released.
Implement keepalive flag for spa_bt_transport, such that
spa_bt_transport_release does not actually release the transport when
the refcount reaches zero. Set the flag for dynamic nodes when the
transport becomes pending (remote end connects) and unset the flag when
idle (remote end disconnected, or dynamic node removed).
Add a node.force-quantum and node.force-rate property. When no global
quantum or rate is enforce with settings, the last updated node property
is used as the quantum.
Make jack use the force-quantum property when set_buffersize is used to
make sure that the quantum is not just a suggestion but a hard forced
one. This makes it possible for ardour or other jack apps to raise the
quantum above the max-quantum but also ensure that it will not change
by any other application (unless other jack apps).
Fixes#2079
Using a probe connection to determine adapter msbc capability causes
problems on some adapters (ff8c3d2, 84bc0490a5, 717004334b,
pipewire#2030) and seems to be a bad idea.
Go back to probing for transparent msbc transport capability via HCI
commands. bluetooth/hci.h may be deprecated later, but for now it's
better to go back to using it. (In practice, adapters not supporting
esco appear to be fairly rare; kernel commit in 2013 refers to "older
devices", so if we can't use HCI, assume the adapter supports the
necessary modes.)
For now, put a limit on the amount of items we can send and receive
over the native protocol. A more complex way of allocating and freeing
can be implemented later when we really need to raise the limits.
Fixes#2070
pipewire will allocate buffers aligned to the max alignment required for
the CPU. Take this into account and don't expect larger alignment.
Fixes a warning in mixer-dsp when the CPU max alignment is 16 but the
plugin requires 32 bytes alignment for the AVX2 path (that would never
be chosen on the CPU).
See #2074
Enable SBC-XQ codec for the JBL Endurance RUN BT headset. The codec worked well
with pulseaudio and works equally well with pipewire.
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>