mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
Rework profile/route handling
Add save property to Profile and Route params to notify the session manager that they should be saved. Let the session manager only save the Profile and Routes with the save flag. Make pulse-server set the save flag on Profile and Route changes. The result is that we can make a difference between user requested changes and automatical changes and only remember the user preferences. When a port changes availability, first check if we need to perform a profile switch, if not select the new best port.
This commit is contained in:
parent
5ae92fd643
commit
8414092763
9 changed files with 176 additions and 105 deletions
|
|
@ -320,7 +320,7 @@ static int cmd_set_profile(struct data *data, const struct command *cmd, int arg
|
|||
else
|
||||
index = card->active_profile_index;
|
||||
|
||||
return acp_card_set_profile(card, index);
|
||||
return acp_card_set_profile(card, index, 0);
|
||||
}
|
||||
|
||||
static int cmd_list_ports(struct data *data, const struct command *cmd, int argc, char *argv[])
|
||||
|
|
@ -355,7 +355,7 @@ static int cmd_set_port(struct data *data, const struct command *cmd, int argc,
|
|||
if (dev_id >= card->n_devices)
|
||||
return -EINVAL;
|
||||
|
||||
return acp_device_set_port(card->devices[dev_id], port_id);
|
||||
return acp_device_set_port(card->devices[dev_id], port_id, 0);
|
||||
}
|
||||
|
||||
static int cmd_list_devices(struct data *data, const struct command *cmd, int argc, char *argv[])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue