Skip to content

pulse: recover disconnected streams and retry AAudio in the retained server - #133

Draft
Leeestephen wants to merge 1 commit into
SuperTurtleDev:mainfrom
Leeestephen:fix/retained-pulse-recovery
Draft

Leeestephen wants to merge 1 commit into
SuperTurtleDev:mainfrom
Leeestephen:fix/retained-pulse-recovery

Conversation

@Leeestephen

Copy link
Copy Markdown
Collaborator

Summary

Detect a retained AAudio stream whose state is DISCONNECTED even when
requestStart returns INVALID_STATE. Reopen that stream on resume and retain
the existing asynchronous completion notification.

Keep a running PulseAudio server/socket when Android audio is not ready yet.
Use one bounded worker to retry the AAudio sink and select it as default, so
existing clients can migrate from auto_null. Verify the worker command identity
before signalling a PID read from persistent runtime storage. Prefer the
idle-safe AAudio configuration, retaining OpenSL ES as a documented alternative.

Testing

Ten host tests pass for worker bounds, server loss, module/default-sink decisions,
PID ownership and an eight-case matrix executing the actual resume function
against recording stubs. Shell syntax checks pass. Earlier integrated device
controls demonstrated same-server auto_null-to-Android migration and audible
cold-boot playback on alioth.

A complete rebuilt Android audio-module test and exact-revision route/cold-boot
acceptance remain pending. The separate startup PR supplies verified-domain
launch and BusyBox UID switching. Both branches are based directly on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant