Repository navigation
USB Audio 0.4.3-experimental: recording costs less CPU, and almost nothing at rest - #2462
Merged
Merged
Conversation
…copy MAIN, like MAIN + CUE before it, no longer stores the sixteen track words a frame or routes its packets through the C copy: mwua_begin_frame decides both once a frame for every layout (mwua_no_tracks, mwua_bus_words). A change that starts sending a track without a reconnect keeps that track silent for one ring lap instead of sending the ring's older words. Owner's MKII, twin of base 0.8.4, Windows 11, MAIN + INPUTS AB: recording 51.6 -> 41.6-42.8 % of the frame interrupt, recording with input 54.3 -> 45.9 % (and 50.7 -> 40.1 % in a second pair); the recorded samples are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ev_usb_frame does not rest, so the hook ran its register save, the routing snapshot and the idle bookkeeping every block with no host. It now returns before saving a register while no stream is asked for, none needs tearing down, the idle bookkeeping is done and no POST gain history has to follow core 0. The first block a host asks for takes the whole path. Owner's MKII, twin of base 0.8.4, playing: base alone 30.8 %, installed at rest 31.3 % (0.4.2) and 31.4 % (previous commit) -> 30.9 %; recording and recording with input unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ut the routes The bus-only copy becomes a run copy: mwua_begin_frame finds a packet whose pairs are consecutive ring words (one pair, two pairs or the eight tracks) and the packet copy moves that run alone, so TRACKS, TRACK 8 and single or double Outbox-style runs skip the routed C copy as MAIN and MAIN + CUE do. Owner's MKII, twin of base 0.8.4, Windows 11, recording only (frame interrupt, previous commit -> this one): TRACKS 16 channels 56.7 -> 50.3 %, TRACK 8 46.7 -> 44.6 %; at rest 30.9 % both; the recorded channels' peaks are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…11 with 0.4.2 as its Undo, recipes and the release package Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uilt packages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # src/engine/assets/module-build.json
… merge with main Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t is not run yet Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nerate the module documents Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in the routes; the base's settings test back as on main The routing snapshot keeps every route as before; mwua_begin_frame raises mwua_tracks_stale for one ring lap after the producer stores track words again, and the packet copy then sends those tracks silent (mwua_copy_fresh). The new checks live in sdk/tests/usb_audio_runs_test.c, outside the base's sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…NG.md names the release and its last change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…f, no buzz Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… unchanged Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ne scene on 0.8.5, the release note for busy projects, the owner's approval on this source Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t price (+0.1 % of a frame), the record Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
repeat98
marked this pull request as ready for review
November 30, 2026 19:46
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.
USB Audio 0.4.3-experimental: almost nothing at rest, and cheaper recording in lighter projects. The release package passed steps 1-9 of the test procedure on a 0.8.5 twin, and the owner approved it (30 November 2026).
3c3c996d): software checks, beside every other module, the scripted unit pass (12 of 12 Part switches), a 2-minute soak, the price. The audio is the same as 0.4.2's.cbcd00b70(a trial waits until the USB function reconnects), applied uncommitted; without it the soak lost its link. That fix goes to main in its own Fix pull request.sdk/approvals).16c87945) and 0.8.5 (5ac74d69,8fb901eb), Windows 11 and macOS, rolled-back trials, nothing kept.The module's author is Mark Roberts (markandrus, MIT port). The owner maintains its Modwerk releases (0.4.0-0.4.2) and asked for this update.
What changed
usb_audio_settings.cmwua_begin_framedecides once a frame whether any packet needs a track word (mwua_no_tracks), and whether a high-speed packet is one run of consecutive ring words (mwua_run_words2, 4 or 16,mwua_run_off). After a change that starts sending tracks without a reconnect (MAIN to TRACK 8),mwua_tracks_staleis up for one ring lap (64 blocks, 23 ms) and the packet copy sends those tracks silent (mwua_copy_fresh), so the packets never carry older ring words. The routes are untouched, so the base's settings test stays as on main; the new checks are insdk/tests/usb_audio_runs_test.c.usb_audio_configurable.py: the producer skips the sixteen track stores onmwua_no_tracks(was MAIN + CUE only);mwua_copy_runmoves a run withmoveml(2, 4 or 16 words a frame); the frame hook returns before its register save while no stream is asked for, none needs tearing down, the idle bookkeeping is done and POST LEVEL is off.configurable-0.4.2) and keeps it as the Undo. Recipes re-captured (same copy sites, new source hashes), release package rebuilt.Measurements
All in TESTING.md and
evidence/performance.json; the method and every reading are in TESTING.md's 0.4.3 entry. Three readings a state (the base's guard and CPU meter), alternated A B A B against 0.4.2's code built the same way.Tested on a unit: package 3c3c996d2789, MKII OS 1.40C, test:procedure steps 6, 7, 8, 9 on development twin 5ac74d69 of base 0.8.5; the developer's stage not done (no listening test); the owner approved the release on 30 November 2026.
Edge cases
modules:compat(step 2)What the guides lacked or got wrong: nothing in the guides; the test tool missed
cbcd00b70(fixed in its own pull request). A 0.8.5 development twin with every beta flag overflows a flash slot by 1,332 bytes; the twins here leave out the stream channel (and, for the benchmark pair, the sample editor).🤖 Generated with Claude Code