session-manager: split policy and monitor

Separate the session manager in a monitor and policy part.

The monitor manages the devices and endpoints.

The policy watches the nodes/ports/clients and applies the policy
of linking them.

Because both now have a separate connection, we can remove some
hacks in the protocol. When a remote was both the implementer and
user of an object we could get in a deadlock when the user was
blocked waiting and the implementator was blocked sending a reply.
We used to un-busy a client when it was expecting a reply from a
ping or sync for this reason.

Add and use some more keys for the endpoints and streams.
This commit is contained in:
Wim Taymans 2019-11-07 16:03:00 +01:00
parent 8bbfe876a7
commit 4ad7ce3aa2
11 changed files with 138 additions and 1365 deletions

View file

@ -60,8 +60,6 @@ struct alsa_node {
struct pw_proxy *proxy;
struct spa_node *node;
struct pw_endpoint_stream_info info;
};
struct alsa_object {
@ -84,13 +82,6 @@ struct alsa_object {
unsigned int first:1;
struct spa_list node_list;
struct pw_client_endpoint_proxy *client_endpoint;
struct spa_hook client_endpoint_listener;
struct pw_endpoint_info client_endpoint_info;
unsigned int use_ucm:1;
snd_use_case_mgr_t *ucm;
};
static struct alsa_node *alsa_find_node(struct alsa_object *obj, uint32_t id)
@ -447,7 +438,6 @@ static void reserve_acquired(void *data, struct rd_device *d)
set_profile(obj, 1);
setup_alsa_endpoint(obj);
}
static void sync_complete_done(void *data, int seq)