acp: also add the Pro profile for UCM devices

This commit is contained in:
Wim Taymans 2023-01-03 13:17:10 +01:00
parent 3595e31124
commit f62c40c205

View file

@ -449,8 +449,7 @@ static void add_profiles(pa_card *impl)
ap->profile.flags = ACP_PROFILE_OFF;
pa_hashmap_put(impl->profiles, ap->name, ap);
if (!impl->use_ucm)
add_pro_profile(impl, impl->card.index);
add_pro_profile(impl, impl->card.index);
PA_HASHMAP_FOREACH(ap, impl->profile_set->profiles, state) {
pa_alsa_mapping *m;
@ -1448,7 +1447,7 @@ int acp_card_set_profile(struct acp_card *card, uint32_t new_index, uint32_t fla
}
/* if UCM is available for this card then update the verb */
if (impl->use_ucm) {
if (impl->use_ucm && !(np->profile.flags & ACP_PROFILE_PRO)) {
if ((res = pa_alsa_ucm_set_profile(&impl->ucm, impl,
np->profile.flags & ACP_PROFILE_OFF ? NULL : np->profile.name,
op ? op->profile.name : NULL)) < 0) {