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.
Use bigger fallback maximum MTU, when kernel fails to tell us, which
shouldn't happen but apparently can. We choose the packet size based on
incoming data, so these values aren't usually needed so we can just bump
them.
Also report errors as necessary.
Calling the spa_log_xxx macros with NULL log used to be allowed,
and it's used in some tests.
Write the NULL check in a way the compiler can understand and make UBSan
a happy UBSan.
When checking that a card has all of its PCM devices available, ignore
any specific device with the ACP_IGNORE udev environment variable. This
mirrors how we ignore whole cards, but specifically allows non-PipeWire
software to own specific PCM devices.
Note that this does not actually stop PipeWire from using those
subdevices right now, we assume UCM configs take care of that. This
should probably be implemented later to ensure PipeWire always stays
away from them, but for now this fixes the issue where it refuses to
probe the entire card.
Fixes: #3570
Signed-off-by: Hector Martin <marcan@marcan.st>
Don't try to allocate each time port buffers are set but only once
before we start procesing.
Also allocate enough temp buffers are there are ports. This saves us
quite a bit of memory in the normal case.