pulse-server: Support clearing default sink/source

The PulseAudio way of doing this is to accept @NONE@ to clear the
default setting, so let's accept that.
This commit is contained in:
Arun Raghavan 2025-11-06 17:19:45 -08:00
parent 2374d034d7
commit 3337af64ca

View file

@ -4674,6 +4674,10 @@ static int do_set_default(struct client *client, uint32_t command, uint32_t tag,
pw_log_info("[%s] %s tag:%u name:%s", client->name,
commands[command].name, tag, name);
/* @NONE@ is used to clear the setting */
if (spa_streq(name, "@NONE@"))
name = NULL;
if (name != NULL && (o = find_device(client, SPA_ID_INVALID, name, sink, NULL)) == NULL)
return -ENOENT;