From ffd544c42acc2e97e31f6860ad8c711fc89ebd84 Mon Sep 17 00:00:00 2001 From: The412Banner Date: Wed, 23 Sep 2026 01:18:42 -0400 Subject: [PATCH] aaudio sink: the sink is AAudioSink, as the daemon config expects; acknowledge rewind requests before rendering (assertion on device) --- tools/aaudio-sink/module-aaudio-sink.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/aaudio-sink/module-aaudio-sink.c b/tools/aaudio-sink/module-aaudio-sink.c index e44bcdf89..fbeb41471 100644 --- a/tools/aaudio-sink/module-aaudio-sink.c +++ b/tools/aaudio-sink/module-aaudio-sink.c @@ -55,7 +55,8 @@ PA_MODULE_USAGE( "buffer_frames= " "max_buffer_frames="); -#define DEFAULT_SINK_NAME "aaudio_output" +/* The name the app's daemon config addresses (set-default-sink). */ +#define DEFAULT_SINK_NAME "AAudioSink" /* A write that blocks longer than this has lost the device underneath it. */ #define WRITE_TIMEOUT_NS (500LL * 1000 * 1000) /* Underruns are polled every so many writes, not every write. */ @@ -305,6 +306,9 @@ static void thread_func(void *userdata) { int ret; if (PA_SINK_IS_OPENED(u->sink->thread_info.state) && u->started) { + /* Nothing written can be taken back from the device, so a rewind is just acknowledged. */ + if (u->sink->thread_info.rewind_requested) + pa_sink_process_rewind(u->sink, 0); if (write_one_burst(u) < 0) goto fail; }