Repository navigation
mic: take automatic beam selection over one beam (iMac-class designs) - #284
Conversation
Six built-in microphone designs (three distinct tunings) save their beamformer in automatic beam-selection mode, and mic-compile refused them. Their coefficient files hold a single beam and the candidate range names that beam alone, so there is nothing to select: black-box renders of the unit in that saved state equal its renders in the fixed-beam state of the same file (8 of 30 bit-identical, the rest above 133 dB difference SNR), and our fixed beam matches both above 133 dB. Accept that exact state as a second characterised beam mode. The beam is still the coefficient file's fixed beam; a file with more than one beam, or any other selection state, still refuses. Blobs of the designs that compiled before are byte-identical. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
|
Merge readiness at
Areas: none matched in CODEOWNERS Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Hardware row at 3a6d868 (J616s, Linux 7.3.0-aurora-fleet89, read-only, nothing installed or played): |
|
Code-owner review requested: @aurora-silicon/core @aurora-silicon/omarchy-mac @aurora-silicon/aurora-maintainers. Microphone compiler only (speaker sources, engine and blob format untouched); CI and the hardware row at head are in the PR body. If no code-owner review arrives, this may be merged under the 6-point rule once a different-lane App approval is in, no earlier than one hour after this ping. Revert: a plain |
There was a problem hiding this comment.
The automatic mode checks the saved selection controls and still uses the existing one-beam coefficient parser. The fixed-mode checks remain in place. The reported black-box fixed/auto comparisons and negative multi-beam coverage support the narrow admission. Approved at this commit.
RyanTheTide
left a comment
There was a problem hiding this comment.
Verdict: MERGE at 3a6d868c03faa12b943bcb72bd6411bf8c4d6c5e
Blockers: none
Checked:
beam_mode(src/mic.rs): the automatic-selection branch is taken only when control 1 is exactly 2. It then needs the full one-beam state: controls 3 = 1, 4 = 0 and 5 = 0 (a candidate range of beam 0 only), 2/21/22/23/42 = 0, and 43 = 1. Any other value or a missing control refuses with a named reason.beam()still refuses any file whosenBeamsis not 1. Both callers (the single-beam path and the blend fan-out) go throughbeamformer, so a real selection over several beams can't get through either path.- I tried to break it with extra probe tests (not for commit), and they all pass at this head. Each case refuses, with the default options and with
--allow-partial, and the reason is named: two beams with the fixture's own microphone count ("2 beams");nBeams0; the range widened to 0..1 or 0..3; the range moved to beam 1 alone (4 = 5 = 1); start -1; end 0.5; control 1 = 2.0001 (falls to the fixed-mode check); auto state with control 2 on; each of controls 1/3/4/5/42/43 missing; a bypassed auto-mode beamformer; auto mode in the blend fan-out, both with a widened range on the reference beam and with a two-beam reference file. A NaN control fails earlier, at preset parsing, which is stricter than a refusal. Fixed mode still compiles without control 43, and its stage detail is unchanged. - The new tests fail without the src change. With
src/mic.rsfrom main and this branch's tests,automatic_selection_over_one_beam_is_the_fixed_beamandautomatic_selection_over_several_beams_refusesfail (main refuses at "control 1 is 2" before the beam file is read).automatic_selection_outside_the_one_beam_state_refusespasses on main as well, which is right for a guard test. cargo test -p aurora-speaker-tuningat this head: every binary passes, 0 failed (mic 17/17, parity_law included).- The speaker path is untouched. The diff is
src/mic.rsandtests/mic.rsonly;beam_mode/BeamModehave no other users, and only themic-compilesubcommand reachesmic::. The blob format and the engine are unchanged. - Taint: the mode-switch values are what the compiler needs to recognise the state, the same kind of value as the fixed-mode list already on main. The test's blend controls are the existing made-up fixture values. I checked that they are not the shipped preset values. No preset or coefficient data is committed, and the PR text quotes none.
- Hardware: the J616s row at this head (own-bundle
mic-compile, main vs head byte-identical) is the read-only regression row for the shared compiler. The designs this adds have no lab Mac; the offline oracle parity in the body stands in for a target row. No further row is needed before merge.
Non-blocking: the doc comment now calls control 2 the "selection-metric EQ" in fixed mode, where main called it "the fixed beam". If that name comes from the clean behaviour summary, fine; otherwise one of the two readings is wrong. It is a doc comment only, with no code effect.
Evidence
Buildbox, cargo 1.96, scratch worktrees under the MERGE-BLITZ scratch dir. cargo test -p aurora-speaker-tuning at 3a6d868 (all pass). Probe file with 7 extra tests appended to tests/mic.rs in a scratch worktree: 24/24 pass. Negative run: main's src/mic.rs with this branch's tests gives 15 passed, 2 failed (the two tests named above). #284 and #287 merge cleanly together (git merge-tree).
|
Merging under the 6-point rule (COMMON-RULES 01:54, permanent 11-28 09:29), all six checked at 3a6d868:
Rationale: compiler-only admission of a characterised state; every other design's blob is byte-identical. Revert: |
What: Six built-in microphone designs (three distinct tunings, iMac-class and one newer board) save their beamformer in automatic beam-selection mode, and
mic-compilerefused them ("control 1 is 2"). In all of them the coefficient file holds one beam and the selection's candidate range names that beam only, so there is nothing to select. The compiler now accepts that exact saved state as a second characterised beam mode; the uplink is the file's fixed beam, as in fixed-beam mode.Tested:
At 3a6d868: aurora-speaker-tuning tests pass, including three new ones: automatic selection over one beam compiles to the same beam as fixed mode; any other selection state refuses; several beams refuse.
parity_lawpasses;cargo fmt --check,cargo clippy --workspace --all-targets -D warningsandtools/check-clean.share clean.Black-box, macOS's own engine (hosted offline on a lab Mac): the beam unit in these designs' own automatic state vs the same unit and file in fixed-beam state, 3 designs x 10 stimuli (coherent, single-microphone, independent, wind-like, steered source, microphone level imbalance, onset out of silence, real 3-mic room capture): 8/30 bit-identical, the rest >= 133 dB difference SNR (float rounding). Ours vs the unit in its own state: 133-137 dB on all 30.
Whole chain, ours vs macOS's whole graph, all six designs:
Lag 0, level within 0.01 dB on broadband input. The impulse is 4-22 dB: the known start-up transient residual, which the merged 16-inch and 13-inch designs share.
Designs that compiled before are unchanged: their blobs are byte-identical between main and this branch (19 designs, both pinned 27.2 images).
Risk: two-way · compiles six designs that used to refuse; every other blob is byte-for-byte unchanged. A plain revert undoes it.
Not yet: no hardware row: none of these boards is in the lab. Evidence is the oracle parity above plus the byte-identical regression on every design that already compiled.