acp: don't use the card index for alibpref

The alibpref fallback does not contain the card number but it is
a local counter instead. Just check if it starts with something in
case the alsa library is not patched to return _alibpref.
This commit is contained in:
Wim Taymans 2021-06-10 13:21:08 +02:00
parent 461ae02c50
commit 23a0f29d48

View file

@ -247,7 +247,7 @@ static void init_device(pa_card *impl, pa_alsa_device *dev, pa_alsa_direction_t
if ((snd_use_case_get(impl->ucm.ucm_mgr, "_alibpref", &alibpref) != 0))
alibpref = NULL;
if (alibpref == NULL)
alibpref = spa_aprintf("_ucm%04X.", impl->card.index);
alibpref = strdup("_ucm");
if (alibpref != NULL) {
char **d;
for (d = m->device_strings; *d; d++) {