Rework profile/route handling

Add save property to Profile and Route params to notify the session
manager that they should be saved. Let the session manager only save
the Profile and Routes with the save flag.
Make pulse-server set the save flag on Profile and Route changes.
The result is that we can make a difference between user requested
changes and automatical changes and only remember the user preferences.
When a port changes availability, first check if we need to perform
a profile switch, if not select the new best port.
This commit is contained in:
Wim Taymans 2021-02-22 16:42:29 +01:00
parent 5ae92fd643
commit 8414092763
9 changed files with 176 additions and 105 deletions

View file

@ -119,6 +119,7 @@ enum spa_param_profile {
* String : property (eg. "card.profile.devices"),
* Array of Int: device indexes
* )*)) */
SPA_PARAM_PROFILE_save, /**< If profile should be saved (Bool) */
};
enum spa_param_port_config_mode {
@ -159,6 +160,7 @@ enum spa_param_route {
SPA_PARAM_ROUTE_props, /**< properties SPA_TYPE_OBJECT_Props */
SPA_PARAM_ROUTE_devices, /**< associated device indexes (Array of Int) */
SPA_PARAM_ROUTE_profile, /**< profile id (Int) */
SPA_PARAM_ROUTE_save, /**< If route should be saved (Bool) */
};