pulse-server: add 2 quirks to block sink/source updates

See #1517
This commit is contained in:
Wim Taymans 2023-06-15 11:45:43 +02:00
parent d04e430f23
commit a0a32af386
4 changed files with 17 additions and 2 deletions

View file

@ -2911,10 +2911,15 @@ static int do_set_volume(struct client *client, uint32_t command, uint32_t tag,
(index != SPA_ID_INVALID && name != NULL))
return -EINVAL;
if (command == COMMAND_SET_SINK_VOLUME)
if (command == COMMAND_SET_SINK_VOLUME) {
if (client->quirks & QUIRK_BLOCK_SINK_VOLUME)
return -EPERM;
direction = PW_DIRECTION_OUTPUT;
else
} else {
if (client->quirks & QUIRK_BLOCK_SOURCE_VOLUME)
return -EPERM;
direction = PW_DIRECTION_INPUT;
}
o = find_device(client, index, name, direction == PW_DIRECTION_OUTPUT, &is_monitor);
if (o == NULL || (info = o->info) == NULL || info->props == NULL)