priority.session is meant to be used to set routing priorities.
priority.driver is meant to be used by the scheduler to select what
nodes is best for driving the graph. This usually depends on the
hardware quality and the use case (Pro Audio devices are likely
to be used as driving the graph).
See #1028
When setting a new default sink/source, use the name of the object
instead of the name used for selecting the sink/source. This makes
it possible to use the id to search for the device but still have
the device name in the metadata as is expected.
Fixes#1004
source and sink need not be set and need to be mapped to the target
source/sink to connect to.
node.group needs to be a unique id shared by source/sink to make them
part of the same scheduling group and do clock sync.
Remove some unused properties
Some apps use 0 to get some sort of sink/source info. PulseAudio
likely has a source/sink at index 0 but PipeWire certainly does not.
Asking for 0 source/sink is always because of some hardcoded values
in the app and we can return the default source/sink without causing
any problems for other apps.
See #756
When we start draining, set ourselves active so that the process
function is called where the draining is completed.
This avoids a corked stream from waiting forever to drain the stream.
Fixes#946
libpulse assumes in introspect.c:fill_card_port_info that port profile
array size <= card profile array size, and may crash otherwise.
Enforce this in fill_card_info. It can happen, if EnumRoute and
EnumProfile info is not in sync.
errno should be set to the positive errno value.
This does not cause problems except for the pulse-server where the
errno value is negated and returned as an error result.
This simplifies the code and also avoids a warning with _FORTIFY_SOURCE:
../pipewire/src/modules/module-protocol-pulse/pulse-server.c: In function ‘create_pid_file’:
../pipewire/src/modules/module-protocol-pulse/pulse-server.c:6028:2: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6028 | write(fd, pid_str, strlen(pid_str) + 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Because we set the default sink/source before calling the metadata,
we don't send out updates about the new sink and this confuses
pavucontrol.
Instead, use the new async reply to reply once the new metadata has
been configured and the defaults have been updated.
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
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