Make a module that creates a route-settings metadata and provides
some helper functions to parse the json fields.
Load the route-settings module in the policy.
Move the Notification settings to the metadata. Listen for metadata
updates and update our state table.
Fixes#51
Previously a default source had to be Audio/Source and a default sink
had to be Audio/Sink. This did not account for:
- monitor sources (Audio/Sink)
- duplex nodes (Audio/Duplex)
- virtual sources (Audio/Source/Virtual)
With this change the restriction is now on the number of input/output
ports, so any Audio/* node with output ports is a valid target to select
as a default source, while any Audio/* node with input ports is a valid
target for a default sink.
Fixes#60
The spa_dict does not live outside of the scope it is created in
and so no metadata name is passed to the export function.
Use and initialize a variable outside of the scope instead.
Similar to the volume and latencyOffset we need parse, save and restore
the configured iec958Codecs on the node.
Pavucontrol will use the device-restore extension to set the configured
iec958Codecs on the Node/Route. This will make the node enumerate
audio/iec958 formats, which can be matched against streams that can
provide this format to configure passthrough.
Fixes#64
pw_log_set resets the log level of the logger to the Pipewire's current
level. Here, it's instead expected that the level is retained, so call
pw_log_set_level first.
It used to be that pw_init set the log level based on PIPEWIRE_DEBUG
value, but this is now done only when using Pipewire's default logger.
If 'disable.dsp' is set to TRUE, the adapter will always be configured in
passthrough mode. Then, if 2 adapters want to be linked with different formats,
the si-standard-link session item will automatically reconfigure one of the
adapters in convert mode so that the format matches.
We always use the output session item mode and format when configuring adapters,
unless the input session item is a device node and the output session item is
not a device node.
This is needed so that the async callback passed to _set_ports_format is called
when changing the adapter's port format and the port has not been removed or
added. Eg: when configuring the adapter in S16 convert mode to S32 convert mode.
The idle callback may be called after the object manager has been
destroyed, or the object manager may be destroyed while emitting
one of the signals from the idle callback, so it needs to be ref'ed
while the callback is running. g_cclosure_new_object ensures that
in both cases the code behaves correctly.
This copies the logic of media-session's logind module and allows
the bluez monitor to be active in only one user session at a time.
This is especially useful to avoid interference between the gdm
session and the actual user session, which momentarily both have
wireplumber running when logging in/out.
Fixes#54
This change also keeps the plugin always activated, regardless of whether the
DBus connection is closed or not, which is useful when the dbus service is
restarted.
This destroys the ALSA monitor when the DBus connection is closed, and
re-creates again the monitor when the Dbus connection is connected, so that
device reservation is restarted.
This change also keeps the plugin always activated, regardless of whether the
DBus connection is closed or not, which is useful when the dbus service is
restarted.
If PipeWire is built without V4L support, then
`monitor = SpaDevice("api.v4l2.enum.udev", config.properties or {})`
will result in a nil monitor. This commit adds a basic sanity check
to avoid further using the nil variable.
Thanks-to: Pascal Flöschel (initial bug report)
Thanks-to: George Kiagiadakis <george.kiagiadakis@collabora.com>
Bug: https://bugs.gentoo.org/813043
If PipeWire is built without Bluetooth support, then
`monitor = SpaDevice("api.bluez5.enum.dbus", monitor_props)`
will result in a nil monitor. This commit adds a basic sanity check
to avoid further using the nil variable.
Thanks-to: Pascal Flöschel (initial bug report)
Thanks-to: George Kiagiadakis <george.kiagiadakis@collabora.com>
Bug: https://bugs.gentoo.org/813043
It's useful downstream to be able to control building
tests, as there's not much use building them if we're
not going to run them.
Signed-off-by: Sam James <sam@gentoo.org>
Removing a link before it finished activating can lead to race conditions. If
the link is not active, we should schedule a pending rescan to make sure the
old link is only removed when active. This should fix the proxy activation
failed warnings.
It's not used elsewhere, so there is no good reason yet to expose it.
Besides, I expect that GLib will likely add a method in the future
to return the XDG_STATE_HOME (which is relatively new in the xdg spec)