feat(steam): sync QAM brightness and volume with Android

This commit is contained in:
Kurt Himebauch committed 2026-10-26 12:32:36 -04:00
1 parent da127d1b4c
commit 6a5dfe1486
11 files changed
+575 -7

No files matched your search

@@ -59,6 +59,7 @@ PA_MODULE_DESCRIPTION("Android audio output: DirectAudio's AAudio engine, in-pro
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(false);
PA_MODULE_USAGE(
"control_dir=<Android media volume bridge directory> "
"sink_name=<name for the sink> "
"sink_properties=<properties for the sink> "
"volume=<initial volume, linear, 1.0 = full> "
@@ -91,11 +92,15 @@ PA_MODULE_USAGE(
#define DA_FADE_FRAMES 64
static const char* const valid_modargs[] = {
"control_dir",
"sink_name", "sink_properties", "volume", "performance_mode", "buffer_ms", "max_ms", "ring_ms",
"adaptive", "decay", "limiter", "watchdog", NULL
};
struct android_volume;
struct userdata {
struct android_volume *android_volume;
pa_core *core;
pa_module *module;
pa_sink *sink;
@@ -136,6 +141,9 @@ struct userdata {
unsigned int opens;
};
#include "../../aaudio-sink/android-volume.h"
static uint64_t now_ns(void) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
@@ -774,6 +782,7 @@ int pa__init(pa_module *m) {
pa_log("Failed to create thread.");
goto fail;
}
u->android_volume = android_volume_new(u->sink, pa_modargs_get_value(ma, "control_dir", NULL));
pa_sink_put(u->sink);
pa_modargs_free(ma);
return 0;
@@ -799,6 +808,7 @@ void pa__done(pa_module *m) {
pa_assert(m);
if (!(u = m->userdata))
return;
android_volume_free(u->android_volume);
if (u->sink)
pa_sink_unlink(u->sink);
if (u->thread) {