diff --git a/spa/plugins/alsa/acp/acp.c b/spa/plugins/alsa/acp/acp.c index 5fa42750f..0d773ef8a 100644 --- a/spa/plugins/alsa/acp/acp.c +++ b/spa/plugins/alsa/acp/acp.c @@ -242,9 +242,13 @@ static void init_device(pa_card *impl, pa_alsa_device *dev, pa_alsa_direction_t dev->ports = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func); if (m->ucm_context.ucm) { - const char *alibpref; + const char *alibpref = NULL; dev->ucm_context = &m->ucm_context; - if ((snd_use_case_get(impl->ucm.ucm_mgr, "_alibpref", &alibpref) == 0)) { + 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); + if (alibpref != NULL) { char **d; for (d = m->device_strings; *d; d++) { if (pa_startswith(*d, alibpref)) {