alsa: rework UCM open

Use _alibpref to check if a device needs a UCM local config. Mark
the device as such and use this to set the OPEN_UCM property on
the device.
Open the UCM for a card when the device has the property set. Use the
same logic for loading the UCM as the acp code.

See #1251
This commit is contained in:
Wim Taymans 2021-06-02 17:25:21 +02:00
parent 58d0e44664
commit 35e81fbfdc
8 changed files with 61 additions and 18 deletions

View file

@ -60,6 +60,7 @@ extern "C" {
#define SPA_KEY_API_ALSA_CARD "api.alsa.card" /**< alsa card number */
#define SPA_KEY_API_ALSA_USE_UCM "api.alsa.use-ucm" /**< if UCM should be used */
#define SPA_KEY_API_ALSA_IGNORE_DB "api.alsa.ignore-dB" /**< if decibel info should be ignored */
#define SPA_KEY_API_ALSA_OPEN_UCM "api.alsa.open.ucm" /**< if UCM should be opened card */
/** info from alsa card_info */
#define SPA_KEY_API_ALSA_CARD_ID "api.alsa.card.id" /**< id from card_info */