alsa: cache UCM config

ALSA has problems with creating more than 8 configs per card so cache
the config per card and reuse it.

Fixes problems with no devices after logging out and in again because
ALSA can't create UCM profiles anymore.

See #1553
This commit is contained in:
Wim Taymans 2021-08-30 17:36:11 +02:00
parent cff9dbf9dd
commit 09ee977141
2 changed files with 85 additions and 27 deletions

View file

@ -205,7 +205,7 @@ struct state {
struct spa_latency_info latency[2];
struct spa_process_latency_info process_latency;
snd_use_case_mgr_t *ucm;
uint32_t ucm_prefix_len;
};
int