The linking-utils module already implements a way to check for available routes,
this patch uses it in default-nodes/rescan.lua to remove redundant code.
This patch caches the settings info to make sure their values are always
updated, even if using the settings API multiple times before pipewire
finishes synchronizing the metadata objects.
Fixes#749
Systemd journal entries have several common entries:
https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html
Add "SYSLOG_IDENTIFIER" to make it easier to find wireplumber messages.
Add "SYSLOG_FACILITY" to avoid confusing programs that expect both or neither.
Add "TID" and "SYSLOG_PID" to make debugging a little easier.
The test I wrote for
https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/778 uses
this, since it needs a target-loudness to make a loudness filter:
```
tu.createDeviceNode (
"default-device-node",
"Audio/Sink",
{ ["device.target-loudness"] = -18 }
)
```
It's possible that managed_node.properties["node.name"] == nil if the
node is gone.
The removeDevice call above has already cleared the node names, so no
need to do it again.
I'm guessing this was a typo? I ran `git grep dont-remix` in both
wireplumber's and pipewire's repos, and all the other references were to
stream.dont-remix, including the definition of PW_KEY_STREAM_DONT_REMIX.
wireplumber.service generates the following when dbus.service
stops before it (e.g. when the user logs out):
m-dbus-connection: <WpDBusConnection:0x556b3c561680> DBus connection closed: Underlying GIOStream returned 0 bytes on an async read
m-dbus-connection: <WpDBusConnection:0x556b3c561680> Trying to reconnect after core sync
Stop the service before dbus.service exits, to avoid these messages.
This allows grouping audio streams that have a pw-audio-namespace ancestor
process name. The grouping is done by creating a loopback filter for each group
or namespace. Those loopback filters are then linked in between the actual
stream and device nodes. A '--target-object' flag is also supported in the
ancestor process name to define a target for the loopback stream node.
I had a hard time figuring out all the steps relevant for this to work.
Hopefully this brief summary and couple of links will help the next
person writing their own script.
See: #601
`wp_object_manager_add_interest()` passes the format string
and the arguments after that to `g_variant_new()`, which
requires a 32-bit integer for "u". Passing a 64-bit integer
will cause problems on certain ABIs.
Furthermore, remove the metadata related interest declaration
from `set_default_prepare()` since the "set-default" command
does not access metadata directly, it uses the "default-nodes-api"
plugin.
Fixes: 7784cfad92 ("wpctl: support @DEFAULT_{AUDIO,VIDEO}_{SINK,SOURCE}@ as ID ")
Fixes#773
It is valid for components not to have a "provides" field, but it
prevents them from being able to have "before" and "after" dependencies.
With this patch, we generate a hidden "provides" field so that the
dependencies sorting algorithm can work without issues.
Fixes: #771
stream-restore should not be touching node properties of the Bluetooth
mic / device set / offload / ALSA UCM split loopback nodes. Those are
controlled by Route settings on the device.
Set device.routes and state.restore-props=false as appropriate to avoid
that.
Instruct ACP to provide information about UCM SplitPCM channel
splitting instead of doing it with alsa-lib plugins.
Use the provided information to load loopbacks that create virtual sinks
that do the channel remapping from UCM.
Fix memory leaks in bad GValue handling. Unset iterator GValue after
use and strdup keys. The keys aren't necessarily static strings (for
id-XXXX properties), so have to be dup'd.
Node name deduplication relying on presence of node objects creates race
conditions, as the name cannot be marked unused if the node object was
not created or was destroyed.
Use separate (device_id, node_id) -> name table to track name ownership
separately from the existence of node objects.
Also clear up the reserved names when device is destroyed, by the
monitor or device reservation. In these cases "object-removed" for
nodes is not called, so this fixes names leaking when e.g. pw-reserve is
used.
In cases where a Node is created asynchronously and associated with the
Device later, set the id pending so that we don't miss ObjectConfig
events.
The "set Route again" workaround is also not needed, moreover it was not
reliable before either since the Device might issue ObjectConfig only
for changed properties.
Allow marking WpSpaDevice object ids "pending", which means Props from
any ObjectConfig events received for the ids are saved, if there is no
associated object set yet.
When wp_spa_device_store_managed_object() is called, any pending Props
are set on the managed object.
This is useful when nodes cannot be immediately created in the
"create-object" signal handler. For example, in cases where the nodes
are created asynchronously, e.g. by "module-loopback". In this case,
although the nodes can be later associated with the WpSpaDevice, any
ObjectConfig events received in the meantime are lost, so for example
restoring saved Routes will race against async node creation. Using
wp_spa_device_set_managed_pending() solves this race condition.
If loopback is emitted after the SCO node, e.g. when A2DP profile
connects late, recreate the SCO node.
This ensures the underlying SCO node is hidden when the loopback is
present.
This seems to be an omission from when we transferred the default device
properties from the config file on to the Lua script. Both auto-profile
and auto-port are meant to be disabled, so that we can apply our own
management logic.
Fixes: #734