Skip to content

mic: take automatic beam selection over one beam (iMac-class designs) - #284

Merged
RyanTheTide merged 1 commit into
mainfrom
feat/mic-beam-select
Nov 28, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
feat/mic-beam-select

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

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-compile refused 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.

  • A file with more than one beam, or any other selection state (other algorithm, metric normalisation, boost limiting, switch crossfade), still refuses.
  • Behaviour comes from the strip and coefficient-file data. There are no per-board tables.
  • Speaker sources are untouched, and the mic modules stay outside the voicing law hash.
  • Independent of mic: carry split/join regions of per-microphone boxes (14-inch MacBook Pro designs) #281 (merges cleanly with it).

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_law passes; cargo fmt --check, cargo clippy --workspace --all-targets -D warnings and tools/check-clean.sh are 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:

    stimulus difference SNR
    mismatched / independent noise 58-63 dB
    steered source / level imbalance / onset 51-63 dB
    sweep 49-51 dB
    real 3-mic room capture 48-51 dB
    -65 / -75 / -85 / -95 dBFS 54-56 / 40-42 / 35-38 / 26-28 dB

    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.

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>
@RyanTheTide
RyanTheTide requested review from a team as code owners November 27, 2026 18:50
@github-actions github-actions Bot added door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Merge readiness at 3a6d868c: not ready yet

Check Detail
CI at head ok 11 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok comment at 3a6d868c
Conflicts ok none
PR text ok Risk: two-way · compiles six designs that used to refuse; every other blob is byte-for-byte unchanged. A plain revert undoes it.

Areas: none matched in CODEOWNERS

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Hardware row at 3a6d868 (J616s, Linux 7.3.0-aurora-fleet89, read-only, nothing installed or played): aurora-speaker-tuning mic-compile of the Mac's own tuning bundle with aarch64 builds of main 5bd2d65 and of this head 3a6d868: both full blobs (3 microphones, 48 kHz, latency 1439, no refusals), sha256 7086830c4584850f331c0b9dedf8eb359e54aa839e6227dba942425eb2587881 for both: BYTE-IDENTICAL. Fixed-beam designs are unchanged on hardware; the designs this PR adds have no lab Mac (offline oracle parity in the body). Result: PASS.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Nov 27, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

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 git revert of the merge commit (every other design's blob is byte-identical).

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 RyanTheTide left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 whose nBeams is not 1. Both callers (the single-beam path and the blend fan-out) go through beamformer, 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"); nBeams 0; 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.rs from main and this branch's tests, automatic_selection_over_one_beam_is_the_fixed_beam and automatic_selection_over_several_beams_refuses fail (main refuses at "control 1 is 2" before the beam file is read). automatic_selection_outside_the_one_beam_state_refuses passes on main as well, which is right for a guard test.
  • cargo test -p aurora-speaker-tuning at this head: every binary passes, 0 failed (mic 17/17, parity_law included).
  • The speaker path is untouched. The diff is src/mic.rs and tests/mic.rs only; beam_mode/BeamMode have no other users, and only the mic-compile subcommand reaches mic::. 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).

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merging under the 6-point rule (COMMON-RULES 01:54, permanent 11-28 09:29), all six checked at 3a6d868:

  1. different-lane App APPROVE at this head (REVIEW6);
  2. CI green (build and test jobs; readiness is the review/row meta-check);
  3. hardware row at head (J616s, own-bundle main vs head byte-identical);
  4. family regression rows: n/a (not kernel/DT/Mesa/aura/installer);
  5. no open blocking review (MERGE-BLITZ verdict MERGE at this head);
  6. code-owner teams pinged 10:51 AEDT, more than 1 h ago.

Rationale: compiler-only admission of a characterised state; every other design's blob is byte-identical. Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit 94fc372 into main Nov 28, 2026
12 of 14 checks passed
@RyanTheTide
RyanTheTide deleted the feat/mic-beam-select branch November 28, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant