alsa: rewrite mixer open/close, cache mixer accesses in probe

The ALSA mixer can be opened multiple times (especially for UCM
in the probe). This adds a simple mixer cache to prevent
multiple open calls.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2019-12-07 20:39:21 +01:00 committed by Arun Raghavan
parent 6438e5c46d
commit 3bd7c70c51
9 changed files with 177 additions and 151 deletions

View file

@ -248,6 +248,7 @@ struct pa_alsa_ucm_config {
snd_use_case_mgr_t *ucm_mgr;
pa_alsa_ucm_verb *active_verb;
pa_hashmap *mixers;
PA_LLIST_HEAD(pa_alsa_ucm_verb, verbs);
PA_LLIST_HEAD(pa_alsa_jack, jacks);
};