mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
acp-device: just always select the best port/profile for now
This commit is contained in:
parent
4a35fcaf09
commit
d456893f31
1 changed files with 6 additions and 12 deletions
|
|
@ -670,12 +670,8 @@ static void card_profile_available(void *data, uint32_t index,
|
|||
emit_info(this, false);
|
||||
|
||||
if (this->props.auto_profile) {
|
||||
if (available == ACP_AVAILABLE_NO) {
|
||||
uint32_t best = acp_card_find_best_profile_index(card, NULL);
|
||||
acp_card_set_profile(card, best);
|
||||
} else if (available == ACP_AVAILABLE_YES) {
|
||||
acp_card_set_profile(card, index);
|
||||
}
|
||||
uint32_t best = acp_card_find_best_profile_index(card, NULL);
|
||||
acp_card_set_profile(card, best);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -712,15 +708,13 @@ static void card_port_available(void *data, uint32_t index,
|
|||
|
||||
for (i = 0; i < p->n_devices; i++) {
|
||||
struct acp_device *d = p->devices[i];
|
||||
uint32_t best;
|
||||
|
||||
if (!(d->flags & ACP_DEVICE_ACTIVE))
|
||||
continue;
|
||||
|
||||
if (available == ACP_AVAILABLE_NO) {
|
||||
uint32_t best = acp_device_find_best_port_index(d, NULL);
|
||||
acp_device_set_port(d, best);
|
||||
} else if (available == ACP_AVAILABLE_YES) {
|
||||
acp_device_set_port(d, index);
|
||||
}
|
||||
best = acp_device_find_best_port_index(d, NULL);
|
||||
acp_device_set_port(d, best);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue