wireplumber merge requestshttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests2021-10-13T10:25:13Zhttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/240implement encoded audio passthrough + misc policy fixes2021-10-13T10:25:13ZGeorge Kiagiadakisimplement encoded audio passthrough + misc policy fixesFixes #63Fixes #63https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/241si-audio-adapter: parse the rate optionally2021-10-13T16:32:47ZWim Taymanssi-audio-adapter: parse the rate optionallyWe can use spa_format_audio_raw_parse() because we need to parse
the samplerate here optionally.
Many virtual sinks will not set a rate, which makes parsing fail and
the node will end up with the default channels/positions, which is
mos...We can use spa_format_audio_raw_parse() because we need to parse
the samplerate here optionally.
Many virtual sinks will not set a rate, which makes parsing fail and
the node will end up with the default channels/positions, which is
most likely wrong.
Fixes channel positions for virtual sinks.https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/242lua/api: fix impl_module_new arg parse2021-10-14T06:24:04Zsaivertlua/api: fix impl_module_new arg parseMatches documentation.Matches documentation.https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/239wp: support loading optional modules2021-10-14T06:29:53ZAshok Sidipotuwp: support loading optional modules-some modules will not be available during runtime, due to
external dependencies.
-these modules can now be marked optional.
-loading of these optional modules will be attempted and if
they are not available, wp will recover and wi...-some modules will not be available during runtime, due to
external dependencies.
-these modules can now be marked optional.
-loading of these optional modules will be attempted and if
they are not available, wp will recover and will not be
terminated.https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/243si-standard-link: refactor linking logic to correctly link unpositioned nodes2021-10-14T13:57:56ZGeorge Kiagiadakissi-standard-link: refactor linking logic to correctly link unpositioned nodes"unpositioned" nodes don't have a specific channel layout
(ex the Pro Audio profile); in that case, we should not try to copy this
undefined layout to the peer node, we need to configure both in their
preferred layout and do a best-effor..."unpositioned" nodes don't have a specific channel layout
(ex the Pro Audio profile); in that case, we should not try to copy this
undefined layout to the peer node, we need to configure both in their
preferred layout and do a best-effort linking of ports.George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/244si-standard-link: fix aux channels links2021-10-14T14:34:09ZWim Taymanssi-standard-link: fix aux channels linksAUX channels can link to any other channel but when AUX channels are
linked, they must match exactly.
Fixes some issues with split devices with aux channels.AUX channels can link to any other channel but when AUX channels are
linked, they must match exactly.
Fixes some issues with split devices with aux channels.https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/245wp: implement topics in SPA log interface2021-10-17T21:11:04ZP Vwp: implement topics in SPA log interfaceImplement SPA log topic API, showing log topics as GLIB_DOMAIN,
and enabling based on WIREPLUMBER_DEBUG.Implement SPA log topic API, showing log topics as GLIB_DOMAIN,
and enabling based on WIREPLUMBER_DEBUG.https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/237meson: give the wireplumber binary a variable name2021-10-15T09:04:21ZPeter Hutterermeson: give the wireplumber binary a variable nameThis allows it to be accessed from pipewire when WP is built as a
subproject.
Edit: I added another commit to build `wp-uninstalled.sh` into the builddir. This now allows us to call that script from pipewire without knowing wireplumber...This allows it to be accessed from pipewire when WP is built as a
subproject.
Edit: I added another commit to build `wp-uninstalled.sh` into the builddir. This now allows us to call that script from pipewire without knowing wireplumber's internal repository:
Pipewire's `src/daemon/meson.build` stanza can now look like this:
```python
elif default_sm == 'wireplumber'
wireplumber = wp_proj.get_variable('wireplumber')
wp_bindir = wp_proj.get_variable('wireplumber_bin_dir', pipewire_bindir)
conf_config.set('session_manager_path', wp_bindir / wireplumber.name())
wp_uninstalled = wp_proj.get_variable('wireplumber_uninstalled')
conf_config_uninstalled.set('session_manager_path', wp_uninstalled.full_path())
conf_config_uninstalled.set('sm_comment', '')
endif
```
The second part relies on !238 as well, without that we'd have to set the `args` to `wireplumber.name()` as well.https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/235Elogind support2021-10-15T13:37:32ZEnrique Reyes AnguloElogind supportMeson code changed to accept elogind instead of systemdMeson code changed to accept elogind instead of systemdhttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/246si-audio-adapter: make sure formats is valid before iterating2021-10-19T05:45:35ZJulian Bouzasjulian.bouzas@collabora.comsi-audio-adapter: make sure formats is valid before iteratingGeorge KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/226wp-factory: intial commit2021-10-19T05:48:42ZAshok Sidipotuwp-factory: intial commitWpFactory enumerates pw_factory objects they are needed for us to setup access permissions.WpFactory enumerates pw_factory objects they are needed for us to setup access permissions.https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/247m-si-audio-adapter: remove unused audio utilities2021-10-20T07:43:23ZJulian Bouzasjulian.bouzas@collabora.comm-si-audio-adapter: remove unused audio utilitiesThere is no need to keep the session item audio adapter utilities anymore because they are not used.There is no need to keep the session item audio adapter utilities anymore because they are not used.George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/248m-si-audio-endpoint: do not use virtual media class for null sink nodes2021-10-20T19:07:12ZJulian Bouzasjulian.bouzas@collabora.comm-si-audio-endpoint: do not use virtual media class for null sink nodesThe PulseAudio layer does not recognize virtual media classes.The PulseAudio layer does not recognize virtual media classes.George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/249Endpoint improvements2021-10-23T06:24:54ZJulian Bouzasjulian.bouzas@collabora.comEndpoint improvementsThis MR refactors the `si-audio-endpoint` module to use internally a `si-audio-adapter`, and so avoids code duplication when setting audio format in both modules.
In addition to this, both `policy-endpoint-device.lua` and `policy-endpoi...This MR refactors the `si-audio-endpoint` module to use internally a `si-audio-adapter`, and so avoids code duplication when setting audio format in both modules.
In addition to this, both `policy-endpoint-device.lua` and `policy-endpoint-client.lua` scripts have been update to look similar to `policy-node.lua`. The fix to delay the rescan when an endpoint link cannot be removed (because it is still being activated) is also included.George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/250ci: add a shellcheck job2021-11-01T10:00:22ZPeter Huttererci: add a shellcheck jobWe only have one script (wp-uninstalled.sh) but let's check that.We only have one script (wp-uninstalled.sh) but let's check that.https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/251scripts: escape semicolon when serializing and parsing array2021-11-01T10:06:02ZJulian Bouzasjulian.bouzas@collabora.comscripts: escape semicolon when serializing and parsing arrayFixes https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/82Fixes https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/82George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/252policy-node: make sure 'taget.node' property has a valid Id before waiting2021-11-03T17:30:19ZJulian Bouzasjulian.bouzas@collabora.compolicy-node: make sure 'taget.node' property has a valid Id before waitingFixes https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/92Fixes https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/92George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/255systemd: document the service files for split mode2021-11-09T08:06:39ZPeter Hutterersystemd: document the service files for split modehttps://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/84#note_1117863https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/84#note_1117863https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/254policy-node: lookup the proper peer link when handling linkable2021-11-09T08:22:20ZJulian Bouzasjulian.bouzas@collabora.compolicy-node: lookup the proper peer link when handling linkablePreviously, we were always looking for the first available link on the item, which could lead to problems if the item had more than 1 link (eg target and monitor links). Now, we keep the Id of the last target in order to determine if the...Previously, we were always looking for the first available link on the item, which could lead to problems if the item had more than 1 link (eg target and monitor links). Now, we keep the Id of the last target in order to determine if the item is linked to the proper target when rescanning.
Fixes https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/77George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/256wp: invalidate WpGlobal id when removed from registry2021-11-13T10:51:28ZP Vwp: invalidate WpGlobal id when removed from registryOnce an object is removed from the registry, its id is invalidated and
can be later reused by other objects. WpGlobal objects may be
long-lived: e.g. those in tmp_globals may live over an add,remove,add
sequence for the same id, and a ne...Once an object is removed from the registry, its id is invalidated and
can be later reused by other objects. WpGlobal objects may be
long-lived: e.g. those in tmp_globals may live over an add,remove,add
sequence for the same id, and a new WpGlobal must be used for the second
add. However, currently e.g. wp_registry_prepare_new_global may pick the
WpGlobal for a previously removed object from the tmp_globals list.
To address this, invalidate the WpGlobal id immediately when we get the
registry remove event.
---------------
I don't actually have a test case that reproduces a problem here right now, but reading the code it seems that if you get the sequence "add,remove,add" of registry events for the same ID before the sync event, then the second "add" will reuse the WpGlobal of the first "add", which corresponds to a completely different object and you can get problems.
XXX: I'd need to read more carefully through the Wp sources to understand how the object lifetimes in Wp actually are supposed to work, but maybe those more familiar with Wp can already say how this should be done.