Commit Graph

2632 Commits

Author SHA1 Message Date
George Kiagiadakis
7bd4032a28 lua: hooks: record the entire 'after' array
Previously we were ignoring the last element in the 'after' arrays
because of a wrong loop limit
2024-01-08 12:28:21 +02:00
George Kiagiadakis
4a3557d8e4 event: add some trace logs to debug sorting hook dependencies 2024-01-08 12:28:21 +02:00
George Kiagiadakis
03098c88bb bt-pinephone.lua: remove useless variable assignments
This is a copy/paste from the code that now lives in apply-routes.lua,
but there is no point since the route here is a real route param and
not a route_info structure.
2024-01-08 12:28:21 +02:00
George Kiagiadakis
0b0595a156 apply-routes.lua: rename variable to make the code easier to understand 2024-01-08 12:28:21 +02:00
George Kiagiadakis
a7d0dacd12 state-routes: fix restoring volumes when a Route is changed manually
When a manual change is applied, the store-or-restore-routes is the only
hook that gets executed for this event. In order to be able to test if a
route was changed, we need to reset all of them to 'active = false',
record the previous value of 'active' and test their difference.

Testing only the 'active' variable (and discarding 'prev_active') sounds
tempting here, but if a route is changed back and forth (from A to B
and back to A), there is nothing to reset the 'active' variable of A
when it gets deactivated and it will appear as previously active on
the second switch.

Related to: #551
2024-01-08 12:21:27 +02:00
Julian Bouzas
d60747f40f docs: remove obsolete tags 2024-01-05 09:34:35 -05:00
Julian Bouzas
4ac7dc831e event-dispatcher: fix ingroup documentation 2024-01-05 09:34:35 -05:00
Willow Barraco
cdd472713d docs-policy: add filter.smart = true 2024-01-05 10:11:00 +01:00
George Kiagiadakis
4c82e59163 0.4.81 2024-01-04 20:33:29 +02:00
George Kiagiadakis
eb2d6efcd4 state: add save_after_timeout() method to replace all custom timeout code
This was a common pattern that we had in many places, so it makes sense
to consolidate it.
2024-01-04 16:38:33 +02:00
George Kiagiadakis
7fa16292c3 common-utils: remove the simple serializer functions that were used for state files 2024-01-04 10:38:23 +02:00
George Kiagiadakis
38b6eec456 state-routes: use json to store info in the state file 2024-01-04 10:27:02 +02:00
George Kiagiadakis
5d41ef2311 scripts: s/putils/lutils/g ("policy" utils -> "linking" utils) 2024-01-03 11:10:56 +02:00
George Kiagiadakis
994f1c1f4a Merge branch 'master' into next 2024-01-03 10:47:16 +02:00
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
Pauli Virtanen
88c59ff9c6 docs: explain runtime logging controls 2023-12-24 17:59:59 +02:00
Pauli Virtanen
43e190e3b4 wpctl: add set-log-level command
Add command for changing log level for Pipewire or Wireplumber daemons
at runtime.

It can be done with pw-metadata, but make it easier so that the user
doesn't need to look up Wireplumber client ids.
2023-12-24 17:59:59 +02:00
Pauli Virtanen
6037a6af94 m-log-settings: add module for changing log level at runtime
Pipewire server uses the global "settings" metadata for adjusting its
own log level.

Make it a convention that clients may watch "log.level" in this metadata
with their client id as subject, for setting their own log level
dynamically.

Watch the global "settings" metadata for "log.level" changes for our id.
On changes, set our log level accordingly.
2023-12-24 17:59:59 +02:00
Pauli Virtanen
4e17edb1ac wp: make wp_log_set_global_level public API
Applications may want to change WP log level at runtime.

Also change it to return error stataus instead of printing warnings on
error.
2023-12-24 17:58:30 +02:00
George Kiagiadakis
c2d125b0da Merge branch 'master' into next 2023-12-23 18:34:00 +02:00
George Kiagiadakis
f3f89b8fc1 docs: shuffle files to have the same logical hierarchy as on the generated doc
Also:
 - rename some files to remove redundant information from the filenames
 - rename many labels to match the filename and its place in the hierarchy
 - move lua_api under the scripting section
2023-12-23 12:36:27 +02:00
George Kiagiadakis
7dfc346a7b script docs: rewrite all csv-table to list-table for better source readability 2023-12-23 11:32:56 +02:00
George Kiagiadakis
6afdadc549 docs: update understanding_wireplumber.rst, merging changes from !535 2023-12-21 13:26:44 +02:00
George Kiagiadakis
59972b6e4f systemd: change the template services to load different profiles instead of conf files 2023-12-21 11:28:50 +02:00
George Kiagiadakis
0037733545 daemon: add cmdline option to load custom profile and report error if not found 2023-12-18 17:58:09 +02:00
George Kiagiadakis
c0b212bb0e scripts: common-utils: do not crash if the defaults table is nil
Fixes #542, #544
2023-12-18 10:56:30 +02:00
George Kiagiadakis
b58c94816a docs: update configuration.rst 2023-12-15 21:14:24 +02:00
George Kiagiadakis
6ace763868 docs: add central doc section about the configuration file 2023-12-15 21:07:02 +02:00
George Kiagiadakis
32b31232d1 docs: document components, profiles, features and settings 2023-12-14 16:49:12 +02:00
George Kiagiadakis
396b88e64b docs: update copyright years 2023-12-14 12:33:42 +02:00
George Kiagiadakis
f63174ad5f docs: lua: document missing Core functions 2023-12-14 12:30:13 +02:00
George Kiagiadakis
c4a0f5317e meson: exclude rst files from being installed with the scripts
and add them nicely to the sphinx_files without referencing '..' paths
2023-12-13 16:31:50 +02: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
ca3bc3eb6d scripts: tidy up monitor settings and config options
* add a new common-utils method to get configuration sections with
  defaults more efficiently and with less boilerplate
* rework the ALSA reserve-device settings so that the priority is
  configured per device using rules and the application name comes
  from the WpCore instead of the config file
* rename bluetooth to bluez in all options for consistency with other
  monitors that use the backend API name
* rename alsa.midi to alsa-midi for consistency with bluez-midi
2023-12-09 15:52:24 +02:00
George Kiagiadakis
4feebfc3a3 m-lua-scripting: add Core.get_properties() method 2023-12-08 12:28:24 +02:00
George Kiagiadakis
600adf003b scripts: tidy up device-related settings
* rename settings to make more sense
* split out monitor settings into a separate category
* add setting for restoring the default nodes in the node category
2023-12-08 12:06:28 +02: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
Julian Bouzas
78fe6f1ef9 m-si-audio-adapter: make sure format task is finished even if ports were already configured
Currently, if the adapter node already has its ports configured when wireplumber
starts (For example a virtual node), the async _set_ports_format() call is never
completed because the node ports have not changed, stalling the event stack.
This fixes the issue by checking the Props param after configuring the ports,
and completes the task if there is one pending and the node already has ports
available.

Fixes #527
2023-11-28 10:59:15 +00: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