Repository navigation
SCSND: iOS sound played by the Scion app - #34
Merged
Merged
Conversation
AVF's own sound device (crosvm's vhost-user virtio-snd, audio=1) failed to start two times in three on the Pixel 10 and took the VM with it, so iOS had no sound under AVF. Now the app lends one more region of RAM (scsnd.addr= scsnd.size=), as it lends the framebuffer's, the camera's and the GPU's: a header and a ring of samples in /dev/hakios-audio's format (sys/hakios.scsnd.h). The new sink (bsd/dev/hakios.scsnd.c, registered from hakios_audio_init by patch 1401) copies what the audio server writes into the ring and never waits; what does not fit is counted and lost. iOS's speaker volume is passed on in the header for the app to apply. avfboot keeps the region out of the kernel's memory. The app side: Scion-Project/scion scsnd/app (scsnd.c plays the ring with AAudio). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 93884ed9886e187aa409914a6045bc7f3949f749)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
iOS sound is now played by the Scion app, not AVF's virtio-snd. On the Pixel 10, crosvm's vhost-user sound device failed to start 2 times in 3 and took the VM down with it.
sys/hakios.scsnd.h: a 128-byte header and a ring of 48 kHz stereo s16 in a 1 MiB region the app lends. The region is passed asscsnd.addr/scsnd.size, the same way as SCFB/SCCAM/SCGPU.bsd/dev/hakios.scsnd.c: a/dev/hakios-audiosink. It copies what the audio server writes into the ring without ever blocking (what doesn't fit is counted indropped), and passes iOS's volume and mute through the header.bsd/conf/filesand callshakios_scsnd_init()fromhakios_audio_init.The app side is Scion-Project/scion
scsnd/app.Testing
CI is green (run 40551164050). On the phone, the boot gets to
hakios-audio: sound goes to the Scion app (SCSND)and the app reports the ring. Sound has not been listened to yet.🤖 Generated with Claude Code