BlueZ now requires endpoints to set Locations/Context, so set them to
some sensible default values. These could in principle be made
configurable later.
We can only increment or decrement the busy_count with a valid busy_id.
In complete_ready and complete_paused, the id can be INVALID and if
there was no pending busy_id, it would decrement the busy_count below 0.
This would block the link from progressing its state change.
See #3547
Also add the queued buffers in the converter to the pw_time.queued_buffers
field. This means that queued_buffers + avail_buffers always equal the
total amount of allocated buffers, which makes more sense.
Fixes#3592
Don't set the port io to NEED_DATA in prepare_output because this
might be called when we get the data from an input port that is linked
to out output port.
See #3514
We can directly use the port io, which is always available. This ensures
the mix->io status is set to NEED_DATA even when there is no global
mix.
This reverts part of 56786aedc4
See #3514
Destroy the node and device in the global free event. This way, the
global resources are already destroyed and we have removed their ref to
the spa node before we destroy that.
Fixes#3588
We calculate the available frames in read_sync but add another
check in read_frames so that we don't attempt to read more frames
than we have available to avoid xruns.
Make a function to recalculate the headroom and call it whenever the
resample state of the node can change.
When we are IRQ based scheduling but need to resample, we are actually
not driving the graph whit IRQ and need to adjust our period size and
headroom as if we are using timers.
Instead of just following static target match rules to create output streams,
this feature allows the user to dynamically create more output streams
with custom targets using metadata.
Some jack clients will take a lock before doing IPC and then will
take the same lock in a notify callback. This prevents the IPC from
progressing and causes a deadlock.
Make a separate thread to dispatch the notify so that we don't block the
IPC in any case.
Fixes#3585
Some jack clients like to lock the process function and so we can't be
sure we will deadlock while we try to wait for the data-loop.
Instead, don't sync with the data-loop when setting the mix-io, it will
happen later when it is possible. Queue a free operation of the memmap
after the mix_set_io if we need to clean up.
See #3585
Add access.socket option, which sets PW_KEY_ACCESS based only on which
socket the client connected from.
Remove the executable-based permissions and all old options. Add
access.legacy=true option that enables the old default behavior. The
legacy mode cannot be used together with the socket-based access.
Emit warnings if any of the removed old options have been set.
Set pipewire.sec.flatpak=true for Flatpak applications.
The socket-based access ignores PW_KEY_CLIENT_ACCESS and the Flatpak
status when setting PW_KEY_ACCESS. Dealing with them becomes
responsibility of the session manager (or equivalent) which processes
the permission rules.
Make the default access.socket value compatible with the
module-protocol-native default two-socket configuration.
However, if neither access.socket or access.legacy is specified, we will
for now use the legacy mode for backward compatibility.
If no socket configuration specified for a server, create two sockets,
"CORENAME" and "CORENAME-manager" where CORENAME is the value computed
by get_server_name.
Don't blindly clear the format when EnumFormat changes. This will
just stop the node without renegotiating.
We should probably find a new best format, check if it changed and
then Stop/configure/Resume the follower with the new format.
This fixes a stall when a node is running and you change the allowed
codecs.
We can change the quantum of a node while it is running just fine so
relax the check.
This was copied from the rate change logic, which is avoided while the
node is running.
This fixes a regression in dynamic quantum switching.
Fixes#3574
This reverts commit 6fefd49a8a.
We can't use PRIVATE because mmap docs say that we then might not see
changes in the data anymore from other processes.
Fixes#3575
vulkan_headers was a workaround for distributions providing pkg-config information
without the headers. Replacing it with a more conventional have_vulkan
and assert header availability if the option vulkan is enabled.