diff --git a/spa/plugins/alsa/acp/acp.c b/spa/plugins/alsa/acp/acp.c index 71a9df2b3..3c814da86 100644 --- a/spa/plugins/alsa/acp/acp.c +++ b/spa/plugins/alsa/acp/acp.c @@ -1537,9 +1537,19 @@ 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 && !(np->profile.flags & ACP_PROFILE_PRO)) { - if ((res = pa_alsa_ucm_set_profile(&impl->ucm, impl, - np->profile.flags & ACP_PROFILE_OFF ? NULL : np, op)) < 0) { + if (impl->use_ucm) { + if (np->profile.flags & ACP_PROFILE_OFF) { + if ((res = pa_alsa_ucm_set_profile(&impl->ucm, impl, NULL, op)) < 0) + return res; + } else if (np->profile.flags & ACP_PROFILE_PRO) { + const char *verb = find_best_verb(impl); + if ((res = pa_alsa_ucm_set_profile(&impl->ucm, impl, NULL, op)) < 0) + return res; + if ((res = snd_use_case_set(impl->ucm.ucm_mgr, "_verb", verb)) < 0) { + pa_log_error("error setting verb: %s", snd_strerror(res)); + return res; + } + } else if ((res = pa_alsa_ucm_set_profile(&impl->ucm, impl, np, op)) < 0) { return res; } }