Commit Graph

490 Commits

Author SHA1 Message Date
Julian Bouzas
efbefe9e0e simple-policy: fix bug when finding endpoints 2019-07-25 12:24:48 +03:00
Julian Bouzas
755f0bd862 modules: handle error if the endpoint proxies could not be created 2019-07-25 12:24:47 +03:00
Julian Bouzas
dbd763bc9c proxy: throw an error if the proxy is destroyed during async constructions 2019-07-25 12:24:47 +03:00
Julian Bouzas
3fc9582b6a dsp: use the new WpProxyLink API 2019-07-15 11:05:34 -04:00
George Kiagiadakis
eaaa9f7f35 simple-policy: remove the idle callback when the object finalizes
Avoids crashing if a rescan is scheduled but the policy module is
destroyed in the meantime
2019-07-12 19:43:07 +03: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
George Kiagiadakis
1b28b620c1 Merge branch 'delay-unhandled-clients' into 'master'
Delay unhandled clients

See merge request gkiagia/wireplumber!20
2019-07-12 14:20:21 +00:00
Julian Bouzas
536df13709 simple-policy: delay unhandled enpoints if target is not found 2019-07-12 09:44:32 -04: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
f3d41fe2ab Merge branch 'doc-fix' into 'master'
Fix doc warnings

See merge request gkiagia/wireplumber!19
2019-07-12 12:24:38 +00:00
Julian Bouzas
54721da7c4 Fix doc warnings 2019-07-12 08:20:08 -04:00
George Kiagiadakis
a2bf7e3999 policy: take into account the role of the client when linking it
This allows linking the client to the stream that has the same name
as the role that it requests.
2019-07-12 14:40:19 +03:00
George Kiagiadakis
10f8eff99c m-client-permissions: ref-count the client data and re-work code for safety
It so happens that sometimes the client proxy is created and destroyed
immediately, almost instantly, which causes this code to crash in case
the proxy pointer is gone when our idle callback tries to destroy it.

This change makes the whole operation safe.
2019-07-11 17:19:14 +03:00
George Kiagiadakis
44a60b8638 Merge branch 'stop-client' into 'master'
Stop client

See merge request gkiagia/wireplumber!18
2019-07-10 15:38:49 +00:00
Julian Bouzas
682bc6a6eb proxy: allow derived classes to finish its creation 2019-07-10 11:22:29 -04:00
Julian Bouzas
51facef4e4 simple-policy: unlink the target endpoint if it is already linked 2019-07-10 11:18:09 -04:00
Julian Bouzas
27a31498c0 endpoint: add wp_endpoint_unlink API 2019-07-10 11:18:09 -04:00
Julian Bouzas
5d1397cf56 endpoint: destroy the link before removing them from the lists 2019-07-10 11:18:09 -04:00
Julian Bouzas
1b69ef8339 simple-endpoint-link: store the created links in a list 2019-07-10 11:18:09 -04:00
Julian Bouzas
3cecccd681 endpoint: allow derived classes of endpoint-link to finish async construction 2019-07-10 11:18:09 -04:00
Julian Bouzas
1231001961 proxy-link: add new API 2019-07-10 11:18:06 -04:00
Julian Bouzas
d20633b831 module-pipewire: always include the node Id in the endpoint name 2019-07-10 08:40:30 -04:00
George Kiagiadakis
e6d048c056 Merge branch 'multistream-softdsp-ep'
See merge request !16
2019-07-10 15:02:29 +03:00
Julian Bouzas
184b293b7f dsp: add support for convert mode 2019-07-09 13:22:05 -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
700f55670a simple-policy: match the requested role to a stream in find_endpoint
... and simplify some code there
2019-07-09 13:20:39 -04:00
George Kiagiadakis
2a397faa30 softdsp-endpoint/dsp: actually notify controls on the endpoint, not the dsp object 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
4b65593ee1 softdsp-endpoint: move the selected control in the endpoint and simplify the id encoding 2019-07-09 13:20:39 -04:00
George Kiagiadakis
6e5905f6f3 softdsp-endpoint: dont't add the stream-id field on the description of the master controls
This is currently the documented way of describing controls
that have an effect on all streams
2019-07-09 13:20:39 -04:00
George Kiagiadakis
afcf9f4f0c softdsp-endpoint: actually register the streams 2019-07-09 13:20:39 -04:00
Julian Bouzas
7d1e860b7d softdsp-endpoint: change the control value properly 2019-07-09 13:20:39 -04:00
Julian Bouzas
f28971ebf8 softdsp-endpoint: add multiple streams support 2019-07-09 13:20:39 -04:00
George Kiagiadakis
d6e64d2739 Merge branch 'link-fix' into 'master'
simple-endpoint-link: dont link already linked ports

See merge request gkiagia/wireplumber!17
2019-07-08 12:27:21 +00:00
Julian Bouzas
51a1d9a36f simple-endpoint-link: dont link already linked ports 2019-07-05 12:21:57 -04:00
George Kiagiadakis
ccc88b39c3 Merge branch 'async-endpoint-links' into 'master'
Async endpoint links

See merge request gkiagia/wireplumber!15
2019-07-01 12:54:29 +00:00
Julian Bouzas
ab55116653 simple-policy: handle both input and output clients 2019-06-28 13:04:28 -04:00
Julian Bouzas
6f67682367 simple-endpoint: handle both input and output directions 2019-06-28 13:03:54 -04:00
Julian Bouzas
cf0e68a0f4 factory: remove unneeded sync construction API 2019-06-28 12:34:03 -04:00
Julian Bouzas
5429d57cb1 endpoint-link: make contruction async 2019-06-28 12:33:00 -04:00
George Kiagiadakis
4ed5e30d9d config: enhance the configuration file with comments 2019-06-28 13:32:45 +03:00
George Kiagiadakis
7c7c65de5a simple-policy: allow configuring the default audio devices via module arguments 2019-06-28 13:32:07 +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
2f29043b13 Merge branch 'unregister-fix' into 'master'
Unregister fixes

See merge request gkiagia/wireplumber!14
2019-06-27 12:17:39 +00:00
Julian Bouzas
e73553088b proxy: remove unneeded destroy signal 2019-06-27 07:23:20 -04:00
Julian Bouzas
3207811795 modules: disconnect the signals when the endpoints are destroyed 2019-06-26 12:47:51 -04:00