Commit graph

48 commits

Author SHA1 Message Date
George Kiagiadakis
07835488a0 modules: remove module-pw-bluez
This is not used by AGL anymore and it will go away *anyway*
when we switch to the configuration-based logic for
creating endpoints
2019-10-07 17:44:35 +03:00
George Kiagiadakis
7e41d5aa52 monitor: add a flag to activate alsa devices
In current pw master the behavior has been changed to not activate
the "On" profile on alsa devices by default, because of the DeviceReserve
D-Bus API implementation in media-session.

This is a hack here to get the previous behavior. In the future
we should have a way to configure profiles, as well as to pick
a sensible default by autodetection.
2019-10-07 16:47:54 +03:00
George Kiagiadakis
bbca2ca236 monitor: update to reflect API changes in pipewire master 2019-10-07 16:30:04 +03:00
George Kiagiadakis
48fbabcc3f daemon: do not access the inexistent error-message property from core
This is a remainder from the old WpRemote, which is gone.
I would re-add the property, but it's not worth it, since libpipewire
prints it as well by default
2019-10-02 21:18:44 +03:00
Julian Bouzas
26fb89cb16 modules: move softdsp-endpoint inside module-pipewire 2019-09-25 10:25:49 +02:00
George Kiagiadakis
375fa8a3dd modules: replace the monitor code from module-pw-{alsa,bluez} with module-monitor 2019-09-17 16:35:14 +03:00
George Kiagiadakis
cc3f01b248 daemon config: add config command to load pipewire modules 2019-09-17 16:35:14 +03:00
George Kiagiadakis
d5acbdd87c daemon config: add the ability to register spa libraries from the config file 2019-09-17 16:35:14 +03:00
George Kiagiadakis
371e4cf9f3 core: allow passing properties to the pw_core and pw_remote constructors 2019-09-07 18:21:17 +03:00
George Kiagiadakis
a63f2bb99b lib/wp: merge both WpRemote & WpRemotePipewire in WpCore
In practice we always create a remote and connect to pipewire.
Any other scenario is invalid, therefore, it is not justified
to be confused with so many classes for such small functionality.
This simplifies a lot the modules code.

Also, this commit exposes the pw_core and pw_remote objects
out of WpCore. This is in practice useful when dealing with low-level
pw and spa factories, which are used in the monitors. Let's not
add API wrappers for everything... Bindings will never use this
functionality anyway, since it depends on low level pipewire C API.
2019-09-07 17:55:46 +03:00
Julian Bouzas
6786b13fdc bluez: add new module to monitor bluetooth devices 2019-08-19 10:42:03 -04:00
George Kiagiadakis
1ed004c3c1 policy: implement a basic policy based on role priorities
* Every client has a priority based on its role
* For playback, we allow only a single client to play at a time
* For capture, we allow all clients to capture simultaneously
* Every time the "selected" device changes (either because devices
  are discovered/removed or because the user changed the selection),
  the clients are re-linked to the new "selected" device.
* When a playback client quits and there are others waiting unlinked,
  the highest priority one is linked automatically.
* This also properly fixes re-linking the correct client(s) to the
  correct device(s) when wireplumber exits and restarts.
2019-07-12 19:28:27 +03:00
George Kiagiadakis
a22d353a1b config: allow nested blocks, in case a property has a dictionary value 2019-07-12 19:27:12 +03:00
Julian Bouzas
1a02bfef8a audio-client-module: added new module to load clients after softdsp endpoints are created 2019-07-12 09:44:15 -04:00
George Kiagiadakis
ebe22c34fd mixer: implement listing controls of multiple streams
Currently, the stream names have to be duplicated in the configuration
file. This is going to change in a future version.
2019-07-09 13:20:39 -04:00
George Kiagiadakis
7618b8b082 alsa-udev/softdsp-endpoint: make the stream names & count configurable 2019-07-09 13:20:39 -04:00
George Kiagiadakis
4ed5e30d9d config: enhance the configuration file with comments 2019-06-28 13:32:45 +03:00
George Kiagiadakis
1e7bcd8943 config: ensure that both ABI and MODULE are specified before the properties
If we have properties, strtok will return strings from there as tokens
and the error will appear later as we will attempt to parse an incomplete
GVariant. It is better to catch this early so that we can print a more
useful error message.
2019-06-27 18:30:11 +03:00
George Kiagiadakis
22699a4b21 config: allow module property blocks to span multiple lines
So now we can do:
---
load-module C foo {
  "property": <"value">
}
---

The starting brace is still required to be on the same line
as the load-module.
2019-06-27 18:26:05 +03:00
George Kiagiadakis
f9f7f6e271 config: implement reading properties for modules from the config file
Properties are expected to be a GVariant a{sv} dictionary,
specified in the GVariant text format:
https://developer.gnome.org/glib/stable/gvariant-text.html
2019-06-27 18:10:21 +03:00
George Kiagiadakis
d02bfcd2aa config: skip empty lines and comments (starting with #) 2019-06-27 17:33:04 +03:00
George Kiagiadakis
3e24856263 modules: add new module to manage client permissions
Currently this will just grant full access to all clients.
A future version will refine that to grant access to specific
objects only.
2019-06-26 12:11:38 +03:00
George Kiagiadakis
aa5b16f8df module-mixer: implement the "Mixer/Audio" endpoint provider
This provides high level volume controls for the AGL audiomixer
binding and the applications using it.
2019-06-18 19:58:42 +03:00
George Kiagiadakis
7b9e8a030e lib: add a new WpRemote base class and move the pw_remote glue into a new WpRemotePipewire
This is a cleaner way to interface with the remote pipewire daemon.
The WpRemote base class can be subclassed also for interfacing
with other daemons (hardware-specific managers, etc)
2019-06-17 20:28:06 +03:00
George Kiagiadakis
a93b47690e modules: re-implement the simple policy module using WpPolicy 2019-06-13 14:57:59 +03:00
Julian Bouzas
b87e9775ce simple-policy: add new module 2019-06-10 11:52:03 -04:00
George Kiagiadakis
1962a8ca1c daemon: quit when the pipewire remote disconnects or signals an error
This is implemented in a slightly hacky way, we register the GMainLoop
as a global object and use it from the module to quit the daemon.
This is bad design because the module assumes it is loaded inside
our daemon.

In the future, this should change. It looks like we should have an
object that tracks the state of PipeWire and main() should track
state changes of that object and decide what to do.
2019-06-05 18:38:56 +03:00
George Kiagiadakis
36bc1795ca Relicense to MIT 2019-05-31 12:13:12 +03:00
George Kiagiadakis
98fe322897 meson: export the module & config dirs to the C code
This allows loading of config and modules when deployed in
the target system without setting environment variables.
2019-05-29 17:36:22 +03:00
George Kiagiadakis
0e01895db3 meson: install wireplumber.conf 2019-05-29 12:58:47 +03:00
George Kiagiadakis
3aa7d6ce78 lib: remove the session-manager object and register endpoints as globals 2019-05-26 19:21:27 +03:00
George Kiagiadakis
0506f53149 Add a sample config file and a Makefile to make running (for testing) easier 2019-05-17 13:34:33 +03:00
George Kiagiadakis
447c968846 Refactor everything!
After discussing things at the AGL May 2019 F2F meeting
and reflecting on the initial design of WirePlumber,
it became clear that it needed a fresh start.
2019-05-17 13:34:07 +03:00
George Kiagiadakis
ac65d44bbf session: make the media_class a normal GObject property 2019-04-28 14:18:44 +03:00
George Kiagiadakis
41b1f40053 plugin-registry-impl: remove useless warning 2019-04-26 13:56:34 +03:00
George Kiagiadakis
26ad8bcad9 core: connect the new-proxy-available signal to the plugins' handle_pw_proxy 2019-04-26 13:55:46 +03:00
George Kiagiadakis
e16e66de2d lib: object/interface: do not (transfer full) interfaces and objects 2019-04-26 13:19:18 +03:00
George Kiagiadakis
19f10a81c9 core: implement an interface to retrieve the pw_core & pw_remote 2019-04-22 18:26:09 +03:00
George Kiagiadakis
4fcdb931be proxy/plugin: hold a pointer to the core instead of the respective registry
This makes it more intuitive to get other attached interfaces
from the core
2019-04-22 17:48:02 +03:00
George Kiagiadakis
ede602a05a implement WpSession & WpSessionRegistry 2019-04-22 13:07:08 +03:00
George Kiagiadakis
eeb99f908a proxy-registry-impl: run every proxy through the plugins' provide_interfaces
This allows plugins to provide custom interfaces on proxies
2019-04-17 19:20:39 +03:00
George Kiagiadakis
ce43cf5f0c refactoring around the registries
* make the registries available as dynamic interfaces of the core
* improve a bit the C API of WpObject & WpInterfaceImpl
2019-04-17 19:09:39 +03:00
George Kiagiadakis
ce7f9002cd core: fix stupid mistakes in module loading mechanism 2019-04-16 18:41:09 +03:00
George Kiagiadakis
a8450b0f02 src: use a common log domain in the daemon code
glib log domains are not like the gstreamer ones, where you can enable
many of them with a wildcard, therefore it is not particularly useful
to have different ones per file
2019-04-16 15:44:04 +03:00
George Kiagiadakis
6f740a2a13 src: implement module loading 2019-04-16 15:42:10 +03:00
George Kiagiadakis
96d801803c switch all headers to use SPDX-License-Identifier 2019-04-12 12:53:54 +03:00
George Kiagiadakis
9d4731d029 lib: begin working on a library to allow implementing policy plugins 2019-04-10 12:32:51 +03:00
George Kiagiadakis
43c44fb7cf Initial commit 2019-04-04 16:47:33 +03:00