Commit graph

1961 commits

Author SHA1 Message Date
Ferdinand Bachmann
3a40a8795b wpctl: resolve device id and route device internally 2023-12-27 19:36:56 +01:00
Ferdinand Bachmann
f01177d08a wpctl: add set-route subcommand 2023-12-25 23:06:32 +01:00
Yaron Shahrabani
1e03b5bbe1 Added Hebrew translation. 2023-12-13 09:24:38 +00:00
Tom A. Wagner
bae3381c76 meson: Set correct package version for generated .gir file for gobject introspection
Previously the package version used for the gir file was hardcoded and did not change
when the `wireplumber_api_version` definition was changed, which has now been fixed to
use that definition.
2023-12-12 12:13:51 +01:00
George Kiagiadakis
d3eb77b292 release 0.4.17 2023-12-03 20:05:19 +02:00
George Kiagiadakis
e193ae0efc policy-endpoint-device: handle filters only if we have endpoints
Otherwise the filters are handled both in policy-node and here
and everything is messed up

Fixes: #536
2023-12-03 19:46:20 +02:00
George Kiagiadakis
4cc387d81d object-manager: ref all object managers before exposing tmp globals
It is possible that during this process some object managers emit
their "installed" signal, and it is possible that some object managers
are destroyed within the handler of this signal, ending up with a dangling
object manager pointer (since we do not ref object managers in the registry)
and with a modified object_managers list during iteration...

Related to: #534
2023-12-02 11:32:17 +02:00
Wim Taymans
a063d48281 scripts: pass is_filter to createLink
createLink uses an is_link variable that is unset. Fix this by passing
the is_link from the caller.
2023-11-29 11:01:34 +01:00
Wim Taymans
e9fc965b32 scripts: log si_link after creating it
Or else we get a exception because it is nil.
2023-11-29 11:00:08 +01:00
Danial Behzadi
e0cb9a845f Update fa.po 2023-11-25 12:27:15 +00:00
George Kiagiadakis
0d249b8a13 release 0.4.16 2023-11-22 16:20:02 +02:00
George Kiagiadakis
0ac2947aed scripts: add new sm-objects script
This allows loading objects on demand by adding entries on the
"sm-objects" metadata object.

It is useful to dynamically load pipewire modules such as loopbacks
or network modules without having to start a new pipewire process with
a hardcoded config file.

It is also useful to load new metadata objects in order to implement
the singleton metatada concept as discussed in pipewire!1742

This may be expanded in the future to be able to load other types of
objects.

The key name, combined with the subject, is considered a unique id for
this instance of the object. The value should be a json object with
a 'type' specifying the type of object, together with a 'name' and 'args'
2023-11-22 08:38:36 +00:00
Ashok Sidipotu
256f60ebf2 policy-device-profile.lua: add a method to prioritize BT codecs. 2023-11-22 08:32:28 +00:00
Ashok Sidipotu
a87d0478ea policy-endpoint-device.lua: connect filter output to actual sinks
The device script will also scan for the filter output streams and
connect them to the actual sink devices.
2023-11-22 08:22:59 +00:00
Ashok Sidipotu
9f6066ea0d policy-endpoint-device.lua: logic to connect endpoint to filter
While handling endpoints, first check to see if there is a filter
intending to connect to it.
Also prevent Endpoints connecting to filters unless otherwise
configured.
2023-11-22 08:22:59 +00:00
Ashok Sidipotu
83e990bf2d policy-endpoint-device.lua: enhance link log msgs 2023-11-22 08:22:59 +00:00
Ashok Sidipotu
eba3d9d6f8 policy-endpoint-client.lua: avoid connecting filters to endpoints
Equalizer Node or filter nodes are considered as regular linkable and
its output is connected to endpoint. Prevent this by skipping over
filter nodes in this script.
2023-11-22 08:22:59 +00:00
George Kiagiadakis
5922f1f077 meson: bump the required pipewire version to 0.3.68
This is for the passive links behavioural change
2023-11-20 12:05:53 +02:00
George Kiagiadakis
0a7bd4fe86 si-standard-link: remove the "passive" property
PipeWire no longer uses the link.passive property, so there's no
point in adding it here. The node.passive property is used directly.
2023-11-20 12:00:54 +02:00
George Kiagiadakis
5b1ff7377f si-audio-endpoint: mark the nodes as passive instead of marking the links
This is a behavioural change in effect since pipewire 0.3.68, where
pipewire's link-factory ignores the link.passive property and the
node.pasive = in/out/true is used instead.
2023-11-20 11:56:07 +02:00
George Kiagiadakis
74d3b550d3 metadata: export using the pw_impl_metadata properties 2023-11-10 16:15:34 +02:00
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