Commit graph

70 commits

Author SHA1 Message Date
Julian Bouzas
c2dfec2184 monitor: add dbus-reservation flag 2020-03-20 14:01:22 -04:00
Julian Bouzas
d9abbf811f config: make default configuration for desktop and create a separate one for automotive 2020-03-03 13:27:18 -05:00
Julian Bouzas
60bdea1ed6 modules: add jack-device module 2020-03-03 11:14:13 -05:00
Julian Bouzas
83a0725b6a modules: remove match priorities from config files and use the filename instead 2020-01-14 09:15:22 -05:00
Julian Bouzas
a9ac1fdc06 update to the latest pipewire API 2020-01-13 15:07:08 -05:00
Julian Bouzas
4ec61d79b8 config-static-nodes: add config static nodes module
This module allows wireplumber to create static nodes that match a specific
device using a spa node factory. Matching is optional, and if there is no match,
the node will always be created.
2020-01-09 08:50:03 -05:00
George Kiagiadakis
1ccc570f3f docs: add full documentation on WirePlumber's configuration options and files 2019-12-23 18:21:14 +02:00
George Kiagiadakis
db7317c1ac config: add missing endpoint priority in hw:0,0 config 2019-12-19 14:37:11 +02:00
George Kiagiadakis
1586d7314f config: fix typo in config files 2019-12-17 17:36:57 +02:00
George Kiagiadakis
5dc250a961 config: refactor wireplumber's configuration 2019-12-17 17:16:53 +02:00
Julian Bouzas
7ac9c6359c modules: only allow 'sink' and 'source' strings when parsing direction in config files 2019-12-16 13:37:05 -05:00
Julian Bouzas
3fe1e96e2e config-policy: remove parsing of streams file
This is now done by the config endpoint module
2019-12-16 13:37:05 -05:00
Julian Bouzas
acda80d77c modules: add config endpoint module 2019-12-16 13:36:56 -05:00
Julian Bouzas
50f06baf3a modules: remove alsa-udev and audio-client modules 2019-12-16 13:03:36 -05:00
George Kiagiadakis
aa4fb5b1aa modules: implement module-session, a WpSession provider module
This keeps track of the default endpoint and selects a default
based on endpoint priorities when devices are discovered
2019-12-11 23:45:06 +02:00
George Kiagiadakis
c0bf6dca56 config: remove the stream from the default endpoint-link files
So that we can use media.role to specify the stream
2019-12-11 00:44:25 +02:00
George Kiagiadakis
91e309bad0 config: fix typo 2019-12-05 14:27:17 +02:00
George Kiagiadakis
a11cd3b651 parser-endpoint-link: make 'properties' subtables of 'match-endpoint' and 'target-endpoint' 2019-12-05 12:21:24 +02:00
Julian Bouzas
664db8a200 modules: add config policy module 2019-12-04 16:38:35 -05:00
Julian Bouzas
3cb74e0611 modules: remove simple policy
This will be replaced by a new policy based on configuration files
2019-12-04 16:38:35 -05:00
Julian Bouzas
2578ec4286 src: set the default configuration path when wireplumber starts 2019-12-04 16:38:35 -05:00
Julian Bouzas
857217bc3f modules: remove the mixer
This is no longer used and it is the wrong approach anyway.
A mixer GUI needs to list all endpoints and figure out the controls
from the streams on its own, using the new endpoints API.
2019-11-06 16:41:54 +02:00
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