A node.target property of -1 also means to follow the default
sink/source. The ALSA plugin might use this to select the
target node and would otherwise not move to the new default sink.
Only start the driver node after we have added ourselves to the
driver node or else we might start too soon, before there is anything
to schedule and we cause driver underruns.
Only activate the links when the node is added to a driver. Otherwise
the driver will expect us to decrement the activation counters for the
links but that won't happen because the node will not be processed
yet.
Instead we activate the links that were not activated yet when the
node is activated.
This improves scheduling for newly added links and nodes.
When we were busy with the graph recalculation and something changed,
restart the graph state change to get the new change applied.
For example, when we start a node and it has a max-quantum set, we
need to restart our calculation with the new quantum limits.
Use the manager sync method to wait until all pending queries are
finished. It is the manager that will query the new parameters so
we need to wait until that completes.
See #868
Trigger a roundtrip before we send the reply to the client for many
methods like set_volume/set_mute etc.
this ensure that we get the updated information from the server before
we reply so that a subsequent query returns the up-to-data information.
Fixes#868
Every time a new operation is started, schedule a rescan. This
ensures that there are no more pending actions before the policy
module scans the nodes.
This has the effect that all devices and nodes are up to data and
ready to be used by policy-node.
Fixes#789
Move the profile switching from default-route to the default-profile
module. This makes more sense and it also allows us to restore the
saved profile when it becomes available.
Make default-profile always check if the saved profile can be restored
before attempting to switch to the best profile.
Default-route now just monitors profile changes and restores the
routes associated with it.
See #466
If the default sink or source is set as the target, just don't save
the new target so that it follows the new default.
This is a workaround for gnome-control-center first setting the
default source/sink and then setting the targets on all
stream-restore database entries to the new default. Setting an
explicit target will pin the stream to that sink/source forever,
which is then making pavucontrol default source/sink toggle
fail.
See #676
In COMMAND_SET_DEFAULT_SINK/SOURCE, set our default source and sink
immediately instead of waiting for the metadata update. This makes
it possible to check for the new default sink immediately in other
modules.
Don't just store the id in the metadata but a JSON object with
the node name. This makes it possible to easily introspect the
metadata and also extend the metadata with more fields later.
Instead of matching the metadata id to the global ids we now
have to match it against the name.
The session manager might be configured without metadata support
so check this before attempting to use the metadata. It's not
really a problem because the default sink/source can only be
changed with the pulseaudio API, which activates metadata.
The prefix was used to filter the properties when loading and
saving but since the conversion to the core provided functions, this
feature is not longer available.
It's not exactly a problem, we could implement the filtering ourselves
afterwards but there is little point because we just ignore the unknown
items and never write invalid items.
The branch should be taken if errno is neither EAGAIN,
nor EWOULDBLOCK.
Previously,
if (errno != EAGAIN || errno != EWOULDBLOCK)
would be taken for all values of errno if EAGAIN != EWOULDBLOCK.
(Except for the ones that are filtered out before.)
Fix that by changing `||` to `&&`.
node.latency also influences the pipeline latency in that it can
push the latency above the default value.
node.max-latency, instead, is only used to clamp the final latency
of the pipeline.
Make a registry of modules
Assign an unique number to each module with the MODULE_FLAG bit set
so that we can also enumerate them
Implement enumerating our internally loaded modules
Implement unloading of the module using the module id
Move module-null-sink into a separate file
Use Audio/Sink if no other media.class was given, so that it works
just like the pulseaudio module
Enable linger=true in all cases.
After we drained, set the io state to NEED_DATA again. This will
trigger a new _process callback, if we have new buffers we will
exit the drain state and produce more data, if we have no buffers we
reenter the drained state and signal the drained event.
This effectively provides a way to exit the drain state by pushing
a new buffer into the stream.
/run/pipewire is initially created by pipewire.socket when it creates
the socket file, but it is owned by root with mode 0755.
In the .service unit, RuntimeDirectory=pipewire re-creates /run/pipewire
for user pipewire (owned by pipewire:pipewire, 0755) when this unit starts.
This is necessary for the pipewire daemon to be able to write the .lock file.
By default, when the service unit stops, systemd deletes this runtime
directory and therefore it also deletes the socket that is owned by
pipewire.socket. When this happens, the service is no longer
socket-activateable even though pipewire.socket is active.
RuntimeDirectoryPreserve=yes prevents the service unit from removing
this runtime directory and socket activation still works as expected
When running pipewire as a system-wide daemon, module-portal
obviously doesn't load. Make it optional so that the default
config doesn't fail in system-wide mode