media-session: implement route selection and restore

Disable automatic port configuration in acp and move the logic
to the session manager.
Implement initial port selection and restore on profile activation.
Implement route switch when unavailable
Implement port settings save.
This commit is contained in:
Wim Taymans 2021-01-29 16:59:17 +01:00
parent 7cc5026c02
commit f43bcca35e
4 changed files with 262 additions and 45 deletions

View file

@ -329,6 +329,8 @@ static int handle_profile(struct device *dev)
if (dev->active_profile == pr.index)
return 0;
/* we get here when had configured a profile but something
* else changed it, in that case, save it. */
dev->active_profile = pr.index;
dev->saved_profile = pr.index;
if (pw_properties_setf(impl->properties, dev->key, "{ \"name\": \"%s\" }", pr.name)) {