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

@ -204,6 +204,7 @@ struct acp_device {
#define ACP_DEVICE_ACTIVE (1<<0)
#define ACP_DEVICE_HW_VOLUME (1<<1)
#define ACP_DEVICE_HW_MUTE (1<<2)
#define ACP_DEVICE_UCM_DEVICE (1<<3)
uint32_t flags;
const char *name;