mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
alsa-ucm: Set profiles by their struct instance, not their name
While switching profiles, it's possible that we will want to do more work besides switching UCM verbs. The alsa-card module already has our profiles as structs, but passes in only the names instead of the entire struct. Make things work with the struct instead, so we can add other things (like a UCM context) to it and use those here. Co-authored-by: Tanu Kaskinen <tanuk@iki.fi> [Alper: Split into its own commit and integrated Tanu's snippet.] Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
parent
3dce92e580
commit
4d08c9ad60
3 changed files with 9 additions and 11 deletions
|
|
@ -1429,8 +1429,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 && !(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) {
|
||||
np->profile.flags & ACP_PROFILE_OFF ? NULL : np, op)) < 0) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue