mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
acp: avoid profile switch to the current profile
This commit is contained in:
parent
971236e77a
commit
c0c439ff76
1 changed files with 5 additions and 2 deletions
|
|
@ -1056,6 +1056,11 @@ int acp_card_set_profile(struct acp_card *card, uint32_t new_index)
|
|||
op = old_index != ACP_INVALID_INDEX ? (pa_alsa_profile*)profiles[old_index] : NULL;
|
||||
np = (pa_alsa_profile*)profiles[new_index];
|
||||
|
||||
if (op == np)
|
||||
return 0;
|
||||
|
||||
pa_log_info("activate profile: %s (%d)", np->profile.name, new_index);
|
||||
|
||||
if (op && op->output_mappings) {
|
||||
PA_IDXSET_FOREACH(am, op->output_mappings, idx) {
|
||||
if (np->output_mappings &&
|
||||
|
|
@ -1100,8 +1105,6 @@ int acp_card_set_profile(struct acp_card *card, uint32_t new_index)
|
|||
np->profile.flags |= ACP_PROFILE_ACTIVE;
|
||||
impl->card.active_profile_index = new_index;
|
||||
|
||||
pa_log_info("active_profile: %s (%d)", np->profile.name, new_index);
|
||||
|
||||
if (impl->events && impl->events->profile_changed)
|
||||
impl->events->profile_changed(impl->user_data, old_index,
|
||||
new_index);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue