Commit graph

373 commits

Author SHA1 Message Date
George Kiagiadakis
04421ec148 meson: fix version number in 0.2 branch 2020-05-18 07:31:07 +00:00
Julian Bouzas
d3d977cbe4 config-policy: add timeout when waiting on conditional variables 2019-12-27 08:38:07 -05:00
George Kiagiadakis
c56209fac6 add .gitignore 2019-12-23 18:24:06 +02: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
0e98e4150b config-policy: debug handling of endpoints 2019-12-19 14:49:57 +02:00
George Kiagiadakis
40e4ce8909 config-policy: push endpoints with keep=true to the end of the list when sorting
This ensures that endpoints with keep=false will still have
a chance to link when ones with keep=true exist. This also effectively
means that role priority does not matter when keep=true: we keep these
links active no matter what, while policy still applies normally for
all others.

For example, a final sorted list with these endpoints will end up
looking like this:

* ep1, role priority=25, keep=false
* ep2, role priority=20, keep=false
* ep3, role priority=25, keep=true
* ep4, role priority=75, keep=true

... which will effectively cause ep1, ep3 and ep4 to be linked.
2019-12-19 14:43:40 +02:00
George Kiagiadakis
729aee5c4c config-policy: do not unlink other endpoints when linking one with keep=true
keep=true should work in both ways:
* keep the endpoint with this property linked at all times
* keep other already linked endpoints when linking this one
2019-12-19 14:40:50 +02:00
George Kiagiadakis
3c5b5ea08c config-policy: remove _can_link_stream() function
This is no longer needed since we sort endpoints by role priority
before trying to link them and we link only the highest priority one.
After this sorting, the highest priority endpoint is guaranteed
to be able to link, so _can_link_stream() always returns TRUE.
2019-12-19 14:38:01 +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
152611dd3f parser-endpoint: fix typo; initialize endpoint priority instead of reseting the match one 2019-12-18 16:04:57 +02:00
George Kiagiadakis
e10b0f871d lib: debug loading of config files + endpoint priorities 2019-12-18 15:43:29 +02:00
George Kiagiadakis
7abf74942d cli: fail gracefully if connection to pipewire fails 2019-12-17 19:49:50 +02:00
George Kiagiadakis
c1e1d67b72 config-policy: debug rescans 2019-12-17 18:03:02 +02:00
George Kiagiadakis
2bb534d063 policy: track the exported session instead of the proxy
The proxy takes more roundtrips to get updated and this makes the
policy fail to find a default endpoint at startup, right after
the devices have been discovered

This also removes the weak ref on the session, since the object
manager internally maintains a reference on the objects that
it manages.
2019-12-17 18:01:03 +02:00
George Kiagiadakis
56f12047ab module-session: debug default endpoint changes 2019-12-17 18:00:34 +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
George Kiagiadakis
bb3a91bd36 session: select the default endpoint based on endpoint priority 2019-12-17 13:54:09 +02:00
Julian Bouzas
1d00104642 config-policy: only handle the highest priority endpoint for a target, and the ones with keep=true 2019-12-16 14:05:14 -05:00
Julian Bouzas
eda8507ef7 config-policy: use the default session endpoint if target-endpoint is not defined 2019-12-16 13:37:05 -05:00
Julian Bouzas
5348239ccb policy: add _get_session API for the policy manager 2019-12-16 13:37:05 -05:00
Julian Bouzas
d485c1192a base-endpoint: add _get_global_id API 2019-12-16 13:37:05 -05: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
0ad0c9fb9d base-endpoint: add _get_priority API 2019-12-16 13:37:05 -05:00
Julian Bouzas
0552e7da87 parser-endpoint-link: don't parse unused state value 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
Julian Bouzas
134f62a189 softdsp-endpoint: don't rename the endpoint on creation 2019-12-16 07:56:28 -05:00
Julian Bouzas
b9e594e5f9 parser-endpoint-link: higher number means higher priority 2019-12-13 14:55:13 -05:00
Julian Bouzas
db7a3a3b9c config-policy: sort endpoints by creation time when finding target 2019-12-13 14:43:50 -05:00
George Kiagiadakis
cda1a8c498 cli: fix build warning 2019-12-12 22:27:43 +02:00
George Kiagiadakis
1fcadf4bdf meson: install a pkgconfig file for libwireplumber 2019-12-12 20:41:20 +02:00
George Kiagiadakis
8b2d8c90a2 endpoint proxy: don't try to set a control value if the proxy is destroyed 2019-12-12 20:09:17 +02:00
George Kiagiadakis
67cb633fb5 core: change idle_add to take a GDestroyNotify as well and return a source id
to make it more usable and compatible with g_idle_add
2019-12-12 20:07:46 +02:00
George Kiagiadakis
9d93fefa17 cli: add a set-volume command 2019-12-12 01:41:14 +02:00
George Kiagiadakis
8e40b18fb1 softdsp-endpoint: implement volume controls via the exported endpoint
and drop the WpBaseEndpoint controls entirely
2019-12-12 01:37:48 +02:00
George Kiagiadakis
f4c434728a cli: extend with operations to list endpoints and change the default 2019-12-11 23:51:12 +02: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
bb7b8daa17 exported: delay export until the core is connected
This is useful to be able to call export() from a module init
function, which is called before the core is connected
2019-12-11 23:43:53 +02:00
George Kiagiadakis
787bd8d576 endpoint: implement get_{name,media_class,direction} 2019-12-11 23:43:13 +02:00
George Kiagiadakis
57ac90b188 config-policy: avoid race condition in the unit tests
Clear self->pending_endpoint before sending the done signal,
because the signal will trigger a new endpoint to be added in the
unit test and this may happen before g_clear_object is called,
in which case adding the new endpoint fails
2019-12-11 19:15:02 +02:00
George Kiagiadakis
57ffc0435f softdsp-endpoint: export Endpoint object on the pipewire registry 2019-12-11 19:05:09 +02:00
George Kiagiadakis
ff36ff31e5 session: ensure the exported properties do not leak object, client & factory ids
These are set by the server on the global properties set
2019-12-11 19:05:09 +02:00
George Kiagiadakis
7b222ebcbd endpoint: export name, media class & direction + finetune the global properties 2019-12-11 19:05:09 +02:00
George Kiagiadakis
a71d433a5e lib: implement WpEndpoint (interface + Proxy + Exported + unit test)
heavily based on the WpSession implementation
2019-12-11 19:05:09 +02:00
George Kiagiadakis
c0455c981d lib: rename WpEndpoint* to WpBaseEndpoint*
to avoid name clashing with the upcoming WpEndpoint interface
that is going to be the common interface of Wp{Proxy,Exported}Endpoint
2019-12-11 19:05:05 +02:00
Julian Bouzas
b999ecf9d4 tests: improved config policy priority test to make sure endpoint role works 2019-12-11 08:55:00 -05:00
Julian Bouzas
1dec637ab5 tests: clear core weak reference when finalizing endpoint-link-fake 2019-12-10 19:35:12 -05:00
Julian Bouzas
e8dad1a4f2 stream: clear proxy when finalizing 2019-12-10 19:34:30 -05:00