mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
acp: use flag for the Off profile
This commit is contained in:
parent
9f1d84e37c
commit
a97287351c
3 changed files with 4 additions and 3 deletions
|
|
@ -117,7 +117,7 @@ static void add_profiles(pa_card *impl)
|
|||
ap->profile.name = ap->name = pa_xstrdup("off");
|
||||
ap->profile.description = ap->description = pa_xstrdup(_("Off"));
|
||||
ap->profile.available = ACP_AVAILABLE_YES;
|
||||
ap->is_off = true;
|
||||
ap->profile.flags = ACP_PROFILE_OFF;
|
||||
pa_hashmap_put(impl->profiles, ap->name, ap);
|
||||
|
||||
PA_HASHMAP_FOREACH(ap, impl->profile_set->profiles, state) {
|
||||
|
|
@ -1047,7 +1047,8 @@ int acp_card_set_profile(struct acp_card *card, uint32_t new_index)
|
|||
|
||||
/* if UCM is available for this card then update the verb */
|
||||
if (impl->use_ucm) {
|
||||
if ((res = pa_alsa_ucm_set_profile(&impl->ucm, impl, np->is_off ? NULL : np->profile.name,
|
||||
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) {
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue