Skip to content

Audio M3: build the AAudio driver (Inferno PR 64), step 1 probe and result - #149

Merged
dylanneve1 merged 1 commit into
mainfrom
audio/aaudio-driver
Nov 8, 2026
Merged

dylanneve1 merged 1 commit into
mainfrom
audio/aaudio-driver

Conversation

@dylanneve1

@dylanneve1 dylanneve1 commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Companion to Scion-Project/pyre PR 64 (the AAudio driver). Pyre has Actions disabled ("Actions has been disabled for this repository" on workflow dispatch, and the PR got no runs), so this PR is also how CI compiles the driver.

  • third_party/inferno moves to 5d52dea on pyre's audio/aaudio branch: the driver commit on top of current pyre master ae85d1d. That also brings in the master commits Scion's pointer doesn't have yet (pyre PR 55, PR 62, PR 63: jump-cache size, the inline lookup and the org links). Once PR 64 merges, the pointer should be moved to the merge commit.
  • native/build-android.sh passes -Daaudio=enabled when the Inferno tree has the aaudio option. meson would detect it by itself; this makes a failed detection an error instead of a silent build without sound. Older trees (and pyre's android workflow against older revisions) are unaffected. The change sits next to lto_args, away from the -Dslirp line that PR 146 edits.
  • tools/aaudio_tone.c: the step 1 probe. It opens an AAudio output stream with the driver's settings (S16 stereo 48 kHz, low latency, USAGE_GAME, data callback), plays 440 Hz and prints every result code and frame count.
  • docs/AUDIO.md: the step 1 result.

Step 1 (does AAudio open from an exec'd native process, as in the app's child-process mode?) passed on the shared emulator (sdk_gphone64_arm64, API 36, -no-audio, so checked by result codes and frames, not by ear):

  • shell user: open, start and stop all returned AAUDIO_OK. The stream reached STARTED, 136320 frames in 3 s, 0 xruns.
  • app uid via run-as io.github.dylanneve1.iosonpixel (runas_app domain): the same, 114240 frames in 3 s, 0 xruns.
    So the socket/AudioTrack fallback isn't needed.

CI (run 41188357363): light-build, full-build, baseline-build and emulator-smoke all passed. In full-build, meson reports Library aaudio found: YES and AAudio support: YES, and audio/aaudio.c compiles and links into both the executable and the in-process library. Its only warnings are -Wunused-parameter on callback parameters, the same as the rest of the tree.

No app change: passing audio=on,audiodev=snd0 -audiodev aaudio,id=snd0 and requesting audio focus are issue 94.

Not tested: the driver itself hasn't played anything yet (it needs issue 94's wiring and issue 92's guest playback), there was no run in the real untrusted_app child domain, and disconnect/reopen and anything on a Pixel 10 are still unchecked.

Part of #93

Bumps third_party/inferno to the AAudio driver branch (Scion-Project/pyre
PR 64, audio/aaudio, on top of current pyre master). build-android.sh
passes -Daaudio=enabled when the Inferno tree has the option, so a failed
detection stops the build instead of shipping without sound.

tools/aaudio_tone.c is the step 1 probe: it opens an AAudio stream with
the driver's settings and plays 440 Hz. It opened and ran from a plain
exec'd process both as the shell user and in the app's uid (run-as) on
the API 36 emulator; docs/AUDIO.md records the numbers. No app change:
passing -audiodev aaudio is issue 94.
@dylanneve1
dylanneve1 merged commit e1ce03d into main Nov 8, 2026
2 of 8 checks passed
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.

2 participants