For params that don't emit change events, the param enumeration does not
start core sync, and its enumeration may be incomplete if a previous
core sync completes first.
Fix by always starting a core sync if we are updating params.
This fixes dev_info.active_port being sporadically SPA_ID_INVALID if
there is event pressure, which causes do_set_volume randomly set the
volume on the node instead of setting it on the device. This can be
triggered e.g. by shaking the volume slider in Pavucontrol with mouse.
Convert capture and playback streams to any global channel position that
has been set. This can then be used to implement an upmix sink and add
such an example config.
Keep the target and source fd in sync when we get the new fd from the
server in remote-node.
This makes it possible to refactor some things and only schedule nodes
by triggering the target.
Also include and update the state of the device/stream in
collect_device_info so that we can compare it against the previous value
and emit a change event.
Fixes#3660
Add (minimal) reference documentation for each pipewire-pulse module.
Add some preprocessing to substitute @pulse_module_options@ in docs from
PW_KEY_MODULE_USAGE so the module options don't need to be repeated.
Produce Doxygen docs + generate manpages pipewire-pulse-modules.7,
pipewire-pulse-module-*.7
First check if all of the new buffers are ok before attemping to replace
our exising ones with the new ones. Else we might end up copying some
of the new buffers and cleaning them up twice later.
struct mix contain pointers to themselves (see do_port_use_buffers) and
cannot be copied by value, so they should not be stored in pw_array.
Store them in pw_map instead.
Trying rt scheduling policy while RLIMIT_RTTIME is set could result in
SIGXCPU if the limit is exceeded. Set an infinite limit temporarily
while checking if rt policy is allowed.
Emit error if message construction is not holding appropriate locks or
runs from wrong thread, so that the flush may be running concurrently.
This generally causes corrputed messages to be sent silently, and can be
fairly hard to debug otherwise in client applications.
Modern heterogenous multiprocessor systems rely increasingly on
scheduler hinting for efficiency gains and system optimisation.
This is especially true on embedded systems, where background
tasks such as audio daemons should be consigned to the most
power-efficient core in the system. Left to its own devices, the
Linux Completely Fair Scheduler tends to migrate Pipewire to
more performant cores, even when this is unnecessary.
Luckily, CFS can be told by a task to clamp its utilisation values.
Coupled with energy-aware scheduling, this allows the scheduler to
make better informed decisions about where tasks should be placed,
and what pstate to set for the CPU it is running on.
Enable the user to configure UCLAMP_MIN and UCLAMP_MAX values via
arguments to libpipewire-module-rt.
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Allow PIPEWIRE_REMOTE / PW_KEY_REMOTE_NAME to contain a JSON array of
sockets to try to connect to, in order, instead of just one name.
JSON is restricted to utf-8 encoding. Also, this forces using JSON
syntax for paths that start with '['. This probably will not usually
cause much problem.
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.
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.