card: handle sticky profile flag

New card database entry version 5 for card profile is sticky flag.
New messaging API handlers set-profile-sticky and get-profile-sticky.

When card profile is sticky, always restore it even if it is unavailable,
and prevent switching from it when ports become unavailable.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/568>
This commit is contained in:
Igor V. Kovalenko 2020-12-16 00:35:05 +03:00 committed by PulseAudio Marge Bot
parent 79cb1369fc
commit e576bd924f
5 changed files with 133 additions and 5 deletions

View file

@ -83,6 +83,7 @@ struct pa_card {
pa_device_port *preferred_output_port;
bool save_profile:1;
bool profile_is_sticky:1;
pa_suspend_cause_t suspend_cause;