xapu: decode Opus packets through a Rust sidecar (RT-XAPU-OPUS-DECODE) #2044
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2044
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2044"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@BubsMcgee on GitHub · 2026-11-25 18:54 UTC · original
BubsMcgee:rt-xapu-opus→main· +1340 −172 · 14 files · 6 commits · merged 2026-11-26 14:41 UTCClaimed as RT-XAPU-OPUS-DECODE (#1608).
Depends on: #1144 (RT-XAPU-CONNECT-LAYOUTS). The branch is stacked on #1144 and also merges
main(b9320a118): the #1144 head predates a slot-133kernel_writesfix and crashed early in a retail boot without it. When #1144 lands, this reduces to the decoder alone.What and why
#1144 keeps the xapu command queue and layouts and leaves
fill_silence()for a decoder; this wires one in:runtime/opus_decoder: a Rust C-ABI crate over BSD-3-Clauseopus-pure, built by cargo likeruntime/xma_decoder(-DLEONIDA_REQUIRE_OPUS_DECODER=ONrequires it;-DLEONIDA_OPUS_DECODER_LIB=<path>links a prebuilt one).xapu_queue.cpp::fill()decodes each process packet into f32 PCM, honouringfirst_frame,frame_count,output_bytesand the deinterleaved option; without cargo it keeps the table-of-contents frame count and silence.The layouts stay #1144's (credited to Marvisak/VIctory
apu.rs, GPL-3.0-or-later); no VIctory source is copied, and the new files use leonida names.Tested
xapu_opus(new): 29/29. A generated 440 Hz stereo packet decodes to 960 frames / 0x1E00 bytes with energy;first_frame/frame_count/output_bytesclipping; empty, null and stray-stream errors; deactivate and reactivate.xapu_chad(#1144's): passes unchanged (layouts + silent path).acphal,acphal_noncached_only,xapu_chad,xapu_opus,xapu: 5/5 CTest.d, 1905 presents, 32/32 non-black, no faults. The runtime logsxapu: connected for Opus decoding, 256 streams; packets decoded. RTX 3080 Ti, NVIDIA 616.64, Windows 11.Notes
mainmerge is only for the slot-133 fix; it can be dropped on rebase after #1144 lands.xapu.cppis the legacy test-only shim; the runtime serves xapu fromxapu_queue.cpp(#1144) and chad fromxapu_chad.cpp.AI-assisted.
@BubsMcgee on GitHub · 2026-11-25 18:56 UTC · original
CI shows
action_requiredon No Game Data, Runtime and CI (the fork's first run needs a maintainer to approve it), somergeStateStatusis UNSTABLE until then. Local verification on this head:xapu_chad_test41/41,acphal/acphal_noncached_only/xapu_chad/xapu4/4, and a 120 s retail boot (RTX 3080 Ti, NVIDIA 616.64) with 33/33 non-black frames and no faults. No game data.@BubsMcgee on GitHub · 2026-11-25 18:57 UTC · original
Overlap found after opening: #1144 (
RT-XAPU-CONNECT-LAYOUTS, @nicoco23) implements the sameConnectInput/ 24-byteCommandId/ 0x50-byte result layouts and moves xapu toruntime/shims/xapu_queue.cpp, deliberately leavingfill_silence()for a decoder. This PR currently touchesxapu_chad.cppand duplicates that layout work, so the two will conflict.Plan: rebase this onto #1144 and keep only the Opus decode —
runtime/opus_decoder(Rust over BSD-3opus-pure) plus the decode call inside #1144'sfill_silence(), keeping the zero-frame fallback. I will addDepends on: #1144and force-push the reduced branch. If @nicoco23 would rather fold the decode into #1144, I can hand over the crate/CMake patch instead.Holding the current head until that is settled. No game data.
@BubsMcgee on GitHub · 2026-11-25 19:16 UTC · original
Rebased onto #1144 and force-pushed (
4cfbdfc0b). The layouts/queue are #1144's; this only addsruntime/opus_decoderand the decode infill(), plusxapu_opus_test.xapu_chad_test(layouts + silence) is unchanged and still passes.mainwas merged into the branch because the #1144 head predates the slot-133kernel_writesfix; on the old base the runtime crashed attitle_page_watch.h:662in a retail boot before any XAPU call. With the merge: 121 s boot, sessiond, 1905 presents, no faults, andxapu: connected for Opus decoding, 256 streams; packets decoded.CTest:
acphal,acphal_noncached_only,xapu_chad,xapu_opus,xapu— 5/5.xapu_opus29/29.@aslan2142 on GitHub · 2026-11-26 14:42 UTC · original
Thank you, @BubsMcgee. This went into
mainthrough #2350 (RT-LINUX-AMD-WORLD), merged at your head4cfbdfc0bwith your commits and authorship kept, together with #1144 underneath it. It gave us the first decoded game audio on our machine. GitHub shows this PR as merged for that reason, so nothing needs closing.AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)