Pinephone: SuspendGuardian Update

Kleines Update für SuspendGuardian, der erkennt jetzt auch Audioplayback und geht dann nicht in den Deep-Sleep. Für Euch zum Kompilieren: github.com – SuspendGuardian/suspendguardian.c

Pinephone: SuspendGuardian Update

Neue Konfigoptionen sind nicht nötig. Es wird direkt Alsa gefragt, ob über das Hauptaudiodevice etwas ausgegeben wird:

// Lets find out, if sound playback of ANY source is played:
char *status = readFile(„/proc/asound/card0/pcm0p/sub0/status“);
if ( strstr(status,“closed“) >= status ) {
 // no, so continue

würde etwas ausgegeben, sähe das so aus:

state: RUNNING
owner_pid : 790
trigger_time: 569.377071676
tstamp : 571.758585082
delay : 6496
avail : 59040
avail_max : 64512
—–
hw_ptr : 114336
appl_ptr : 120832

Sehr praktisch, so bekommt man die PID vom Abspielprogramm. Leider klappt das nicht für ein Telefonat 🙁

Da habe ich keinen universellen Weg gefunden.