mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
media-session: implement route selection and restore
Disable automatic port configuration in acp and move the logic to the session manager. Implement initial port selection and restore on profile activation. Implement route switch when unavailable Implement port settings save.
This commit is contained in:
parent
7cc5026c02
commit
f43bcca35e
4 changed files with 262 additions and 45 deletions
|
|
@ -1177,11 +1177,16 @@ static int device_enable(pa_card *impl, pa_alsa_mapping *mapping, pa_alsa_device
|
|||
p->port.priority = p->priority;
|
||||
}
|
||||
|
||||
port_index = acp_device_find_best_port_index(&dev->device, NULL);
|
||||
if (impl->auto_port)
|
||||
port_index = acp_device_find_best_port_index(&dev->device, NULL);
|
||||
else
|
||||
port_index = ACP_INVALID_INDEX;
|
||||
|
||||
if (port_index == ACP_INVALID_INDEX)
|
||||
dev->active_port = NULL;
|
||||
else
|
||||
dev->active_port = (pa_device_port*)impl->card.ports[port_index];
|
||||
|
||||
if (dev->active_port)
|
||||
dev->active_port->port.flags |= ACP_PORT_ACTIVE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue