mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
acp: make sure we pass the save flag around
When we set the volume on a port, make sure we also set the save flag so that the flag is put into the volume changed event and the session manager can save it. Fixes #995
This commit is contained in:
parent
c50c0b91c5
commit
dc3bf68aa2
1 changed files with 3 additions and 4 deletions
|
|
@ -1743,16 +1743,15 @@ int acp_device_set_port(struct acp_device *dev, uint32_t port_index, uint32_t fl
|
|||
return -EINVAL;
|
||||
|
||||
p = (pa_device_port*)impl->card.ports[port_index];
|
||||
if (p == old)
|
||||
return 0;
|
||||
|
||||
if (!pa_hashmap_get(d->ports, p->name))
|
||||
return -EINVAL;
|
||||
|
||||
p->port.flags = ACP_PORT_ACTIVE | flags;
|
||||
if (p == old)
|
||||
return 0;
|
||||
if (old)
|
||||
old->port.flags &= ~(ACP_PORT_ACTIVE | ACP_PORT_SAVE);
|
||||
d->active_port = p;
|
||||
p->port.flags |= ACP_PORT_ACTIVE | flags;
|
||||
|
||||
if (impl->use_ucm) {
|
||||
pa_alsa_ucm_port_data *data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue