From 1b1fbd41da39dd93d1c91203328bf10f9f6ee1e6 Mon Sep 17 00:00:00 2001 From: The412Banner Date: Wed, 23 Sep 2026 08:01:52 -0400 Subject: [PATCH] audio: the sink is named DirectAudio when the relay carries the sound, so the client's Audio settings show which road is in use --- .../steamdeck/launcher/audio/PulseAudioComponent.java | 9 ++++++--- tools/aaudio-sink/module-directaudio-sink.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/steamdeck/launcher/audio/PulseAudioComponent.java b/app/src/main/java/com/steamdeck/launcher/audio/PulseAudioComponent.java index 68f0e0d325..1525155302 100644 --- a/app/src/main/java/com/steamdeck/launcher/audio/PulseAudioComponent.java +++ b/app/src/main/java/com/steamdeck/launcher/audio/PulseAudioComponent.java @@ -122,12 +122,15 @@ public class PulseAudioComponent extends SessionPart { + socket().getAbsolutePath() + "\""); // volume=1.0 is not optional: with no volume argument module-aaudio-sink defaults // the sink to 0% and the session plays silence. + // The sink's name is what the client's Audio settings show as the output device, so it + // says which road the sound takes. if (relaySocketPath != null && !relaySocketPath.isEmpty()) { - config.add("load-module module-directaudio-sink socket=\"" + relaySocketPath + "\" performance_mode=1 adaptive=1 volume=1.0"); + config.add("load-module module-directaudio-sink sink_name=DirectAudio socket=\"" + relaySocketPath + "\" performance_mode=1 adaptive=1 volume=1.0"); + config.add("set-default-sink DirectAudio"); } else { - config.add("load-module module-aaudio-sink performance_mode=1 adaptive=1 volume=1.0"); + config.add("load-module module-aaudio-sink sink_name=AAudioSink performance_mode=1 adaptive=1 volume=1.0"); + config.add("set-default-sink AAudioSink"); } - config.add("set-default-sink AAudioSink"); if (micFifoPath != null && !micFifoPath.isEmpty()) { // The format is the helper's, fixed at s16le/48000/mono: it resamples when the device // grants another input rate, so the daemon is never told a rate the bytes are not. diff --git a/tools/aaudio-sink/module-directaudio-sink.c b/tools/aaudio-sink/module-directaudio-sink.c index 3f03351129..eca10b307e 100644 --- a/tools/aaudio-sink/module-directaudio-sink.c +++ b/tools/aaudio-sink/module-directaudio-sink.c @@ -57,7 +57,7 @@ PA_MODULE_USAGE( "performance_mode=<0 none, 1 low latency, 2 power saving> " "adaptive="); -#define DEFAULT_SINK_NAME "AAudioSink" +#define DEFAULT_SINK_NAME "DirectAudio" #define RECONNECT_USEC (500 * PA_USEC_PER_MSEC) #define OFFLINE_TICK_USEC (20 * PA_USEC_PER_MSEC) #define STATS_EVERY_USEC (30 * PA_USEC_PER_SEC)