From 3337af64cad134a0d7be35e6120db17526e4a33e Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Thu, 6 Nov 2025 17:19:45 -0800 Subject: [PATCH] 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. --- src/modules/module-protocol-pulse/pulse-server.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 3e77c0a89..9d2e7257c 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -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;