Commit graph

1930 commits

Author SHA1 Message Date
George Kiagiadakis
60c5982cd0 lua: add bindings for event / hook / dispatcher 2023-04-17 07:47:09 -04:00
George Kiagiadakis
9afd588d79 lib: initial version of WpEventDispatcher / WpEvent / WpEventHook 2023-04-17 07:47:09 -04:00
George Kiagiadakis
1fea0f60f4 config: remove obsolete files 2023-04-17 07:47:06 -04:00
Ashok Sidipotu
cfd51d9fe2 lib: wpsettings: Add _register_callback () API 2023-04-17 07:44:19 -04:00
Ashok Sidipotu
8e9d852124 docs: configs-refactor changes. 2023-04-17 07:44:19 -04:00
Ashok Sidipotu
6de381ad45 config/JSON: Spruce up the JSON config files
- declutter the wireplumber.conf file.
- adjust the nomenclature of *-settings.conf files.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
3011a1c07e m-settings: Fix the crash with empty settings
Add a null check when iterator gets the value to detect the end of the
JSON object, this will ensure the rest of the code that operates on the
value is bypassed.

Still it must be noted that an empty setting screws up the following
settings and behavior is undefined, this is the limiation in the
spa-json parsing.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
8a0c4fde4c policy: Switch policy settings to JSON
- Create policy-settings.conf and move all the policy settings to it.
- Change all the policy scripts to fetch the settigs from WpSettings
  API.
- Remove all the references to config/lua.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
067b1954e3 tests: Add tests for JSON array of strings
Bluetooth has a setting that would need JSON array of strings and so
these tests help prepare the ground.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
2f60077460 endpoints: Switch endpoints config to JSON
- Move the endpoints defination to wireplumber.conf under a new section
  in the form of two JSON objects, namely endpoints and
  endpoints-roles.
- Treat the endpoint objects as settings, for the sake of loading,
  parsing and querying.
- m-settings loads the objects and WpSettings parses them as any other
  settings.
- Make the following changes in endpoint scripts.
   - Get the endpoint settings using the _get_string() API.
   - Parse and use the data.
   - Remove references to the config/lua
- Remove the endpoints defination in config/lua
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
ff3b5fe828 main.c: Add support for ifexits and nofail flags
- pipewire uses these flags to control module loading.
- remove all the references of bluetooth config/lua and move to
  wpsettings.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
2ef76f823a bluez.lua: Switch bluez lua monitor to wpsettings
- Monitor to use the JSON APIs and move away from config/lua
- Enhance logic in wpsettings to parse settings which are JSON arrays,
  some of the bluetooth properties are JSON arrays and parsing
  logic confused them for a rule.
- Add corresponding tests around this logic as well.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
4282dff187 wpsettings: switch settings in main.lua.d to JSON
- switch stream based lua script and their configs to wpsettings,
  remove all the config/lua references
- move last remaining scripts and modules from 90-enable-all.lua to
  wireplumber.conf
- delete all files in main.lua.d
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
e180ff2f94 device-settings: Switch device settings to wpsettings
- move all the device based settings and scripts to JSON config and
  remove config/lua references.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
3a25bc14d2 lib: Add _get_float() wpsettings API
- also add the corresponding C & Lua tests.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
b76baca520 wireplumber.conf: split up the wireplumber config
- create wireplumber.conf.d and create a file each for a group
  of settings.
- distrube the "wireplumber.components" section as well into these
  files
2023-04-17 07:44:19 -04:00
George Kiagiadakis
893e44c51e lua: fix number of returned values in Settings.apply_rule 2023-04-17 07:44:19 -04:00
George Kiagiadakis
5cefe9e800 settings: fix doxygen/g-i strings/commands and link them to the sphinx site 2023-04-17 07:44:19 -04:00
Ashok Sidipotu
161c43b71a lua monitors: switch to wpsetttings
- switch alsa.lua, v4l2.lua & libcamera.lua
- remove the config/lua references for these scripts
- fix the wpsettings deps parsing bug.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
7d304096e5 lib: Add _get_{int,string}() APIs
- add integer and string version of the APIs,
- Also Refine the APIs, return value to indicate the setting existance
  and a new param to return the value of the setting.
- add their lua bindings as well, in lua binding the return value nil
  indicates that the setting is not defnied.
- Add corresponding C and lua tests as well.
- Add a few handy debug msgs.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
a4f16a98f0 main: Add support for deps flag in loading modules
- support loading modules dependent on wireplumber settings in JSON
  config.
- load the settings module before parsing wireplumber.components,
  so that dependencies can be fetched during parsing.
- access lua scripts are switched to JSON based config and lua configs
  are removed.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
a5d62b7bbd lib: Add wp_settings_apply_rule() API
- add C based tests
- add lua binding for the API and corresponding lua tests
- address comments from previous commits
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
229f5d0630 spa-json: add _is_container () API 2023-04-17 07:44:19 -04:00
Ashok Sidipotu
75c61f9388 lib: Add parsing logic for rules
- unlike pipewire, rules will be parsed during the bootup time, i.e
  during the creation of the wpsettings object.
- The rules are parsed into the wpinterest objects and stored in the
  wpsettings object, they will be eventually used to service the
  apply_rule() API.
- Support pipewire syntax of rules defination in this version.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
4d7ce2292e tests: Add tests for WpSettings object
- settings.c tests conf file loading & parsing, metadata updates,
  wpsetttings object creation and its API.
- settings.lua tests the API from lua scripts.
- Add a sample settings.conf file, this file contains sections copied
  over from client.conf along with the settings section. Add a file
  each for wp side and lua side of scripts.
- Make changes in base test infrastructure to take a custom conf file.
- Enhance the wp_settings_get_instance_api() to be take metadata_name
  parameter. So, Wpsetttings is now a singleton instance for a given
  metadata file.
- Enhance the m-settings module also to be take metadata_name parameter.
  this is handy for lua side of tests as its cumbersome to do this is
  lua.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
8fd8b01b7a lib: Introduce WpSettings API
- WpSettings is a singleton object which attaches itself to the core
  and registry, it provides a get_instance () for its clients.
- WpSettings provides API to get/set wireplumber settings and rules.
- main.c loads the new object and makes sure it is available for
  for all the modules and scripts. This is achieved by introducing
  a new activation step.
- Add the lua bindings for get_setting API.
2023-04-17 07:44:19 -04:00
Ashok Sidipotu
e9391b195f m-settings: Module to handle JSON config settings.
- parse settings from .conf file.
- create "sm-settings" metadata and copy settings as key value pairs
  to it.
- put in place "persistent" behavior, control it with a special
  setting.
- when persistent behavior is enabled.

  - create a state file and update settings to it.
  - monitor changes in the metadata and update the settings to state
    file.
2023-04-17 07:44:19 -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
Robert Mader
04bf9b013e m-si-link: propagate WpLink errors
Add a new signal that gets emitted if any WpLink changes to an error
state. This allows better error handling in cases where e.g. no format
could be negotiated.
2023-02-16 10:39:31 +00:00
Julian Bouzas
c8be8d91be m-lua-scripting: increase refcount of export_core before pushing into the Lua state 2023-02-10 10:54:52 -05:00
Jürgen Benvenuti
1e8ab76d70 po: Update German translation 2023-02-06 18:31:09 +00:00
Julian Bouzas
a0e8470764 restore-stream: add default-channel-volume config option
Allows users to set a default channel volume for streams whose properties have
never been saved before.
2023-01-31 17:06:10 +00:00
Wim Taymans
11733bed4c docs: add new ACP option do docs
Add api.acp.pro-channels to set the number of channels when probing the
Pro Audio profile.
2023-01-31 16:08:24 +01:00
Pauli Virtanen
2daa2da773 bluez-midi: add property for setting latency offset 2023-01-24 17:01:20 +02:00
Pauli Virtanen
69fcdb5b69 bluez-midi: set api.glib.mainloop
Indicate to the plugin that Glib mainloop = PW mainloop.
2023-01-24 17:01:20 +02:00
Pauli Virtanen
0978c224dc scripts: add bluez-midi monitor and its configuration
Add support for BLE MIDI devices and local endpoints.

Disabled by default for now, as the feature currently faces some
DBus/SELinux policy issues e.g. on Fedora.
2023-01-24 17:01:20 +02:00
Wim Taymans
6b32ef5e64 docs: add api.acp.probe-rate docs
document the property used to configure the samplerate used when
opening the device for probing.
2023-01-12 09:35:02 +01:00
Frédéric Danis
f3e62f31db bluez: Update headset roles default value
Since PipeWire commit 2e3347e85 HSP HS role has been replaced by HFP HFP
as default headset role profile
2023-01-10 08:52:30 +01:00