Skip to content

mic: carry split/join regions of per-microphone boxes (14-inch MacBook Pro designs) - #281

Merged
RyanTheTide merged 2 commits into
mainfrom
feat/mic-split-trims
Nov 28, 2026
Merged

RyanTheTide merged 2 commits into
mainfrom
feat/mic-split-trims

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

What: The 14-inch MacBook Pro microphone graphs fan the channels out with a split box, apply a per-microphone gain box to each, and gather them again with a join before the suppressor. The compiler refused those graphs ("off the single path"). It now compiles such a region as one sub-graph stage, using the nested-graph compiler that already flattens split/join routing, gains and filter boxes (from the nested graph used by the 13-inch Air design).

  • A region with a nested split, a second join, or an input from outside the region refuses.
  • Behaviour comes from the graph and strip data. There are no per-board tables.
  • Speaker sources are untouched, and the mic modules stay outside the voicing law hash.
  • Default compiles that now succeed: every 14-inch MacBook Pro design in the pinned 27.2 images, including the PROLED 14-inch.
  • Still refused:
    • one older 14-inch design whose graph uses a set statement the shared graph parser does not know yet (a parser change for that would touch the speaker path's hash, so it is a separate change);
    • designs whose beam uses a selection mode other than fixed.

Tested:

  • At 131c889: aurora-speaker-tuning mic tests pass, including a new synthetic test: +6.02 dB trims on both microphones between a split and a join double the output. parity_law passes; cargo fmt --check, cargo clippy --workspace --all-targets -D warnings and tools/check-clean.sh are clean.

  • Offline parity, ours versus macOS's own graph engine on the same stimuli (hosted black-box on a lab Mac):

    14-inch design PROLED 14-inch design
    mismatched noise 59.0 dB 63.1 dB
    diffuse noise 57.4 dB 60.2 dB
    sweep 45.0 dB 46.3 dB
    real 3-mic room capture 43.4 dB 43.1 dB
    -85/-95 dBFS 23.2/18.5 dB 25.4/20.6 dB

    Lag 0, level within 0.02 dB on broadband input.

  • Graphs without a split are unchanged: on the saved J616s and J413 captures, the output is bit-identical to merged main (max relative error 0.0).

Risk: two-way · compiles graphs that used to refuse; other graphs are byte-for-byte unchanged. A plain revert undoes it.

Not yet:

  • No hardware row on a 14-inch Mac yet. The lab's only one is the K114s. Its SSH host key changed (likely a reinstall), so I asked its bring-up owner before connecting, and its microphone PCM must be in the device tree.
  • Until that row exists, the evidence is the macOS oracle parity above plus the bit-identical regression on the J616s and J413 captures. This PR stays open until a 14-inch row is in.

…e boxes

Some microphone graphs fan the channels out with a split box, give each
microphone its own gain box and gather them again with a join before the
suppressor. Compile such a region as one sub-graph stage with the nested
graph compiler, which already flattens split/join routing, gains and
filter boxes. A region with a nested split, a second join or an input from
outside refuses. This lets the 14-inch MacBook Pro designs compile.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide requested review from a team as code owners November 27, 2026 13:38
@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 a540ef97: 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 a540ef97
Conflicts ok none
PR text ok Risk: two-way · compiles graphs that used to refuse; other graphs are 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.

@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 new region validates cross-boundary audio wires, but drops graph parameters and links and gives nested() an empty parent parameter map. An outer graph default or parameter-box link targeting a gain inside the split/join region originally contributes to the top-level static overrides. In the flattened path it can be discarded while the stage is marked Exact. Please carry the resolved overrides into the region or refuse parameter/property links that cannot be preserved. Add a synthetic split/join test in which an outer default drives a trim and verify its rendered gain. The saved-state trim test covers a separate path. The target 14-inch microphone row remains open.

…region

The region compiled from the split to the join dropped the graph's
parameters and links and gave the nested compiler no parent values, so an
outer graph default or parameter link driving a box inside the region was
lost while the stage was reported exact. Keep the parameter declarations
and the links into region boxes, pass the resolved graph values, and
refuse a parameter link that crosses the region boundary or any property
link into it. Test that an outer default driving both trims renders their
gain.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Addressed the requested change at a540ef9:

  • The split/join region now keeps the graph's parameter declarations and every parameter link into a region box, and nested() gets the resolved graph parameter values (the same map the top-level static overrides use). An outer default, or a link driving a trim inside the region, therefore reaches it as in the full graph.
  • A parameter link that crosses the region boundary (a parameter box outside driving a box inside, or the reverse), and any property link into the region, now refuse instead of being dropped.
  • New synthetic test an_outer_graph_default_driving_a_trim_inside_a_split_region_is_carried: trims with a saved state of 0 dB are driven to +6.02 dB by a graph-parameter default through outer links, and the rendered output doubles. The test fails against the previous region code (checked) and passes now.
  • The real 14-inch designs are unchanged: they still compile by default, and parity against the macOS oracle is the same (e.g. 59.0 dB on noise, 43.4 dB on the room capture). fmt, clippy (-D warnings) and check-clean are clean.
  • Still open: the 14-inch hardware row (K114s, asked K114S-BRINGUP).

@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 new head carries resolved graph parameters and links into the split/join region and refuses crossing parameter links and unsupported property links. The new synthetic fixture drives both trims from an outer default with saved gain at zero and checks that the rendered output doubles. That covers the original loss of static overrides. Code approved by source inspection. Hold for hosted checks and the exact 14-inch microphone row.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Hardware row at a540ef9: K114s (14-inch M5 Pro OLED, Linux 7.3.0-k114sstack, read-only, nothing installed, recorded or played). sgv2 is not provisioned there, so there is no installer bundle; the row compiles its own design from the pinned 26B8125 tuning copied to /var/tmp. The board comes from its device tree (apple,k114s). aarch64 builds:

  • main refuses the design at the split box ("split (split) is not characterised", then the rest is off the single path);
  • this head flattens the split/join region (dbgn_Mic1..3, 3 nodes) and writes the blob: 3 microphones, 48 kHz, latency 1439, no refusals.

The microphone PCM matches: arecord --dump-hw-params on hw:AppleK114HPAI,0 shows CHANNELS 3, RATE 48000, FLOAT_LE; nothing was recorded. Afterwards the K114s has its scratch removed, 0 failed units and is Enforcing. Result: PASS.

@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). The different-lane App approval and the K114s hardware row are at a540ef9, and CI is green. If no code-owner review arrives, this may be merged under the 6-point rule no earlier than one hour after this ping. Revert: a plain git revert of the merge commit (designs without split/join regions are unchanged).

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Nov 28, 2026
@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 a540ef9:

  1. different-lane App APPROVE at this head (REVIEW6, after its changes; it asked to hold for the hosted checks and the 14-inch row, both now in);
  2. CI green (build and test jobs; readiness is the review/row meta-check);
  3. hardware row at head (K114s, 14-inch: main refuses at the split box, head writes the 3-microphone blob; the PCM matches);
  4. family regression rows: n/a (not kernel/DT/Mesa/aura/installer);
  5. no open blocking review;
  6. code-owner teams pinged 13:00 AEDT, more than 1 h ago.

Checked locally: main merged with this head passes all 19 aurora-speaker-tuning test binaries, and the 14-inch, K114s, Neo, J615 and 16-inch designs compile. Rationale: compiler-only; designs without split/join regions are byte-identical. Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit cdee132 into main Nov 28, 2026
12 of 13 checks passed
@RyanTheTide
RyanTheTide deleted the feat/mic-split-trims branch November 28, 2026 03:02
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