alsa-ucm: Make modifiers track conflicting/supported devices as idxsets

Modifiers currently keep their conflicting and supported devices's
names, and these names are resolved to devices every time we need to use
them. Instead, resolve these device names while creating the modifier
struct and keep track of the resulting device structs in idxsets, same
as how device structs keep track of their support relations.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
Wim Taymans 2023-03-20 14:56:14 +01:00
parent b1286c62c9
commit 6b5e232c5c
2 changed files with 42 additions and 36 deletions

View file

@ -223,11 +223,8 @@ struct pa_alsa_ucm_modifier {
pa_proplist *proplist;
int n_confdev;
int n_suppdev;
const char **conflicting_devices;
const char **supported_devices;
pa_idxset *conflicting_devices;
pa_idxset *supported_devices;
pa_direction_t action_direction;