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

@ -35,3 +35,15 @@ Object path: /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez
Message: switch-codec
Parameters: "codec name"
Return value: none
Description: Set if card profile selection should be sticky instead of being automated
Object path: /card/<card_name>
Message: set-profile-sticky
Parameters: JSON "true" or "false"
Return value: none
Description: Get if card profile selection should be sticky instead of being automated
Object path: /card/<card_name>
Message: get-profile-sticky
Parameters: None
Return value: JSON "true" or "false"