Commit graph

1940 commits

Author SHA1 Message Date
George Kiagiadakis
cf4fb87b35 lua api: allow nil to be passed on all constructors that take optional properties 2023-11-10 13:23:50 +02:00
George Kiagiadakis
a6bea40172 core: add wp_core_get_own_bound_id() method
This allows retrieving the bound-id of our own client
2023-11-10 11:27:13 +02:00
George Kiagiadakis
e88fa840f2 lua: json: add optional argument in the json parse() method to limit the number of recursions
This allows partially parsing a json object, allowing some parts to be
passed on as strings to another component that does its own parsing
(ex. a pipewire module)
2023-11-10 11:27:13 +02:00
George Kiagiadakis
0bc6ca6a2d lua: json: allow keys inside objects to be without quotes 2023-11-10 11:27:13 +02:00
George Kiagiadakis
6eed30cf77 properties: update doc to mention that it's possible to use JSON in _new_string() 2023-11-07 20:26:16 +02:00
James Calligeros
3fa87510d1 config: allow passing arguments to pipewire modules
Sometimes, it may be necessary to pass arguments in to a
Pipewire module being loaded. Allow this to be done using
the same format as load_module()/load_optional_module().

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
2023-11-07 15:22:29 +00:00
James Calligeros
7394f478d6
conf: update module-rt usage
update the module-rt description and commented-out defaults to
reflect the addition of utilisation clamping to the module.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
2023-11-07 22:06:28 +10:00
James Calligeros
7a65d76a57 policy-dsp: add ability to hide parent nodes
some hardware devices are never supposed to be accessed directly by
clients, and are designed under the assumption that they will be
front-loaded by some sort of DSP. add a hide_parent property
to policy-dsp and revoke all permissions to the bound node of a DSP
graph where this is set to prevent hardware misuse or damage by poorly
behaved/configured clients.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
2023-10-30 20:11:47 +00:00
Julian Bouzas
98f622f718 m-default-nodes: clear all previous configured nodes if metadata changes to NULL
This will completely clear all the default nodes (current and previous ones)
if the configured metadata value has been set to NULL. This is needed so that
the 'wpctl clear-default' command completely clears all the default nodes state.
2023-10-26 13:21:55 -04:00
Matthew Horan
a6d30c6f77 docs: fix typo in ALSA passthrough instructions 2023-10-25 09:43:03 -04:00
George Kiagiadakis
23ba01970f object-manager: use an idle callback to expose tmp globals instead of pw_core_sync
A core sync is not really necessary here because whatever objects the remote
pipewire daemon has to announce have already been sent to us on a message
and this message is already being processed at this point. This means, we are
not going to be returning to the main loop until all the new objects have been
announced and therefore placed into the tmp globals array. So, we can also use
an idle callback and achieve the same effect of slightly delaying until all
new globals have been announced.

With an idle callback, we can be more agile and add those new objects immediately
after the message has been processed instead of waiting for a pw_core_sync()
reply, which will come in the next message.

This fixes an odd failure of the si-standard-link test after applying the fix
for #517, which was caused by the fact that the test was previously relying on
a delay caused by some unrelated globals being prepared in the object manager
that tries to verify the graph state. After those globals were removed from the
internal preparation queue, the test would fail to detect the link objects
because they were stuck in the tmp_globals array for too long.
2023-10-23 23:14:48 +03:00
George Kiagiadakis
5fc7e68d10 object-manager: reduce the amount of globals that initially match the interest
With the previous check, any global matching either the type or the global
properties of the interest would be considered for inclusion in the object
manager and would be prepared only to fail the same check later.

The correct way to check is (variable & (X|Y) == (X|Y)), which is what
SPA_FLAG_IS_SET() expands to.

Fixes #517
2023-10-23 23:04:02 +03:00
Matt Horan
686048d6fa docs: Provide example for iec958.codecs config 2023-10-19 12:11:36 -04:00
George Kiagiadakis
d67b48e595 0.4.15 2023-10-12 19:24:26 +03:00
George Kiagiadakis
ffd6c0dfb9 docs: fix warnings related to recent policy-dsp changes
- remove dsp.rst, since it's empty and not in the toctree
- fix g-i function param annotation
2023-10-12 19:24:26 +03:00
Wim Taymans
69ed77042f config: set priority. keys on midi-bridge
So that it can be used as a fallback driver.

See pipewire#3562
2023-10-12 12:01:05 +02:00
Ronan Pigott
b2bfb1b917 wpctl: add zsh completions 2023-10-10 07:07:16 +00:00
Dmitry Sharshakov
5faab4e8c2 policy-device-profile: set default and best by device.profile 2023-10-02 14:52:45 +00:00
Dmitry Sharshakov
2970ee2634 policy-dsp: expect policy-device-profile to manage profiles 2023-09-25 12:31:18 +03:00
Dmitry Sharshakov
2dd28c0015 policy-dsp: load filters from file 2023-09-25 12:31:18 +03:00
Dmitry Sharshakov
11b3803edc policy-dsp: add a policy for loading filter chains
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
2023-09-25 12:31:18 +03:00
Dmitry Sharshakov
2ae1b3cbd9 api: module: support loading arguments from file 2023-09-22 19:35:10 +03:00
Jonas Holmberg
92e53bb7ba policy-device-profile: Use device.profile if set
Don't set best profile if device.profile property has been set with
alsa_monitor.rules.
2023-09-15 17:56:29 +02:00
George Kiagiadakis
ca58c68ef9 config: alsa: increase VM period-size to 1024
Fixes: #507
2023-09-13 16:02:55 +03:00
George Kiagiadakis
02e1393c9f policy-node: destroy node only after sending an error to the client
if the node is destroyed before, pw_stream shuts down and doesn't
relay the error to the application
2023-09-01 16:23:09 +03:00
Tom A. Wagner
6e81dc7a66 docs: Add missing '\since' attributes to types and functions that have been added in versions later than 0.4.0 2023-08-30 11:20:06 +02:00
Tom A. Wagner
3a4b91fad7 Add enum documentation and Since tag to the generated gir file
Fix gen-api-gtkdoc.py to also parse an enums detailed description, which may contain a `since` attribute.

This makes the enums documentation and `Since` attribute end up in the final .gir file.
2023-08-25 13:50:39 +02:00
Tom A. Wagner
fa22101530 gir: Add object documentation and Since tag to the generated gir file
Fix gen-api-gtkdoc.py to also parse a structs detailed description, which may contain a `since` attribute,
and to generate a gtkdoc definition for those structs in the output wp-gtkdoc.h.

This makes the structs documentation and `Since` attribute end up in the final .gir file.
2023-08-25 11:35:36 +02:00
Julian Bouzas
227dd97036 m-lua-scripting: always parse JSON to String if its type is not recognized
This allows parsing JSON strings without quotes.
2023-08-11 14:48:13 -04:00
Julian Bouzas
e24e52c6d3 spa-json: encode the string directly into the builder
Some special characters like '\v' are encoded using 6 characters, which
currently does not work because the VLA size asumes a maximum of 4 characters
per encoded special character. This patch refactors this logic to avoid using
VLAs at all and encodes the string directly into the builder.

See #471
2023-06-19 12:03:23 -04:00
Julian Bouzas
e91a9583d8 spa-json: Fix conditional jump on uninitialised value when adding empty strings to builder
Similar to wp_spa_json_builder_add_property(), we need to make sure the dst
array in wp_spa_json_builder_add_string() has room for the null character
because builder_add() expects it.

Fixes #471
2023-06-19 08:07:02 -04:00
Pauli Virtanen
baa0940d8b bluez: disable auto-connect by default
Disable bluez5.auto-connect.

It makes PW to try connect to all locally known BT audio devices on
start, which is in general not a good thing to do.

Some BT adapters are not capable of simultaneous audio streaming and
scanning for connections (e.g Raspberry Pi builtin BT, probably more),
so audio stutters until adapter/kernel give up trying to connect to
devices that cannot be reached.

Disabling it makes devices to not reconnect on user VT switch, but also
that we should only do for devices that were connected when logind
switched.
2023-06-19 07:27:31 +00:00
George Kiagiadakis
5d4db78427 suspend-node: check if the node still exists before suspending it
After a timeout, it's possible that something else may have
destroyed the node already. This can happen for example with virtual
sinks that were created from another process.

Fixes: #467
2023-06-14 23:26:30 +03:00
George Kiagiadakis
a7b8966c06 node: prevent crashing if the proxy isn't bound
Related to: #467
2023-06-14 23:00:56 +03:00
David Turner
f112d424ca Remove RestrictNamespaces from systemd service
libcamera uses namespaces to sandbox IPA (Image Processing Algorithm)
modules because they are sometimes proprietary binary blobs.  The
RestrictNamespaces option in Wireplumber's systemd service breaks this
sandboxing when libcamera is loaded via the libcamera SPA module, so
cameras requiring an IPA do not work.

This commit removes RestrictNamespaces so that the sandboxing works
again.  I've confirmed that after this change wireplumber works with
libcamera with an IPA module.

Resolves #466
2023-06-13 15:41:45 +01:00
George Kiagiadakis
6dc5ac089a wpctl: add status options to display device/node names and nicknames 2023-05-23 11:41:38 +03:00
matoro
b7d41ac5bd tests: common: crank up timeout for slower devices
Timeout of 3 seconds is too slow for test-si-standard-link on slower
devices, crank this up with plenty of extra margin.  Does not
practically affect running time on faster devices.
2023-04-20 17:53:35 -04:00
Ashok Sidipotu
7e3b175d93 bluetooth.conf: set the export-core to true
bluetooth monitor creates bluetooth devices as well as uses the object manager
so it needs access to both the regular core and the export core.
2023-04-14 17:27:07 +00:00
Pauli Virtanen
faf98ae76e bluez: emit combine-stream for BAP device sets
For Bluetooth LE Audio device sets (e.g. pair of earbuds), bluez5-device
emits "internal" nodes for each individual device, and a combine node
for the device set.

Make the bluetooth monitor to create the combine nodes using
module-combine-stream.

Do some shenanigans to route ObjectConfig events from bluez5-device to
the correct combine node: look for combine nodes associated with device
sets, and put them as managed objects of the Spa devices.
2023-04-08 23:18:58 +03:00
Aleksandr Melman
4df905eea2 Replace ru.po 2023-04-06 08:10:33 +00:00
Viktar Vauchkevich
7235097cbe po: Update Belarusian translation 2023-03-24 18:21:50 +00:00
Pauli Virtanen
cbed93221e bluez: update configuration settings
bluez5.headset-roles is now bluez5.roles.  Fix the description of the
msbc/hw-volume/sbc-xq settings to be less confusing.
2023-03-24 18:18:49 +00:00
George Kiagiadakis
0f23fac6b7 gitlab-ci: Update all images and use latest CI templates 2023-03-24 20:01:55 +02:00
George Kiagiadakis
6d0c7f7b7f 0.4.14 2023-03-09 16:37:42 +01:00
Piotr Drąg
aaefda86f4 Update Polish translation 2023-03-04 14:37:05 +01:00
Ashok Sidipotu
b78e441c79 libcamera.lua: add support for disabling nodes
Fixes #418
2023-02-22 14:13:17 +00:00
Robert Mader
979fd59329 policy-node: do not hold references in link-error handler
Using `si` and `si_target` in the error handler results in references to
the objects getting added, keeping them alive indefinitely. Look them up
using their ids instead.

Fixes b8201d2716

Closes https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/419
2023-02-20 15:05:25 +01:00
Yuri Chornoivan
e7c394d6c2 po: Update Ukrainian translation 2023-02-16 10:48:50 +00:00
Wim Taymans
eae8d2d0b5 alsa: boost pro- profiles priority
So that they are more likely to become the driver in the graph.
2023-02-16 10:44:48 +00:00
Robert Mader
b8201d2716 policy-node: handle WpSiStandardLink link-error signal
It gets emitted e.g. on format negotiation errors. Send `-EPIPE`
errors to the respective clients to let them close the connection.
2023-02-16 10:39:31 +00:00