Skip to content

Add the MacBook Air 13" M4 (J713), measured and qualified on the machine - #10

Closed
erikwb wants to merge 3 commits into
aurora-silicon:integration/recording-ring-preservationfrom
erikwb:j713/conf
Closed

erikwb wants to merge 3 commits into
aurora-silicon:integration/recording-ring-preservationfrom
erikwb:j713/conf

Conversation

@erikwb

@erikwb erikwb commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

The J713 (MacBook Air 13" M4) profile, with its speakers measured on the machine and a proposal to mark it qualified. It's on integration/recording-ring-preservation (a9daa66). There are three commits:

  1. profiles: j713: Use the J413 constants on the J713's measured stream, unchanged from before: j413.conf on the J713's 12-channel sense stream, with the tweeters' ADT DC resistances as z_min.
  2. profiles: j713: Use the tweeters' measured time constants: tweeter tau_coil 3.9 → 1.85 s, and tau_magnet / vi_tau_magnet 70 → 25 s. Everything else stays the J413's.
  3. profiles: j713: Mark qualified: a proposal, separate so you can take it or leave it. It sets qualified = true, adds a udev line for AppleJ713, updates the two tests that expected the J713 to be refused, and updates the README and PROFILES.md.

How the speakers were measured

Each voice coil is its own thermometer. Copper's resistance rises about 0.37 %/K, and the amps' V/I sense gives each coil's resistance every 85 ms period. A test tool plays band-limited noise on the raw speaker route while speakerguardd governs. The woofers get 400–2000 Hz and the tweeters 4–12 kHz, with nothing low on the tweeters. The tool reads the temperature from the resistance and fits the two-node model.

The tool and all run data are in j713-thermal.tar.zst (5.0 MB): the source, tests, RESULTS.md, and per-period CSVs for every run.

Safety of the runs:

  • speakerguardd governed throughout. The tool only added --record, through a temporary drop-in.
  • On top of that, the tool had its own layers:
    • caps on measured power, RMS and peak voltage per driver, assuming the sense may read as low as 0.75 of the truth;
    • a coil-rise stop at +30 K;
    • checks on sense validity and voltage tracking;
    • stops on the hold changing, amp faults in the kernel log, or stalls;
    • a watchdog on the audio feed.
  • The tool went through several independent safety reviews before each mode first played.
  • Five runs on the hardware: two dry runs, a 4-step heat run, a 12-cut step probe and a woofer run. None hit an amp fault or a coil limit. The woofer run's last step ended on the tool's own voltage cap, which is set about 10 dB below normal full-volume playback.

Checked on the machine before any heating:

  • Each playback slot alone reaches only its own amp's sense: 18–48 mA against about 1 mA on the others.
  • V*I is positive.
  • The measured pilot voltage is 0.99–1.03 of what the 18.5 dBV full scale and the daemon's reduction predict.
  • The tweeters' resistance in their test band is 0.98–0.99× the ADT DC value, and the woofers' 1.01–1.04×.

A level effect in the V/I resistance

Part of the resistance the sense reports rises with drive level, at once, with no thermal lag.

  • The probe: 12 times, the level was cut from loud to a quiet pilot in 5 ms. On the tweeters, the whole fast part of the drop, about 0.10 Ω (7–8 K if it were heat), is there 5–10 ms after the cut, then flat. The instant share of the fast drop is 0.91 [0.81, 0.98] and 0.93 [0.84, 1.05], with 95 % bootstrap intervals over the cuts. A coil can't cool that fast.
  • Its size: about 1.65 Ω/V² at the driver on the tweeters and 0.15–0.35 Ω/V² on the woofers.
  • What it means for the daemon: a V/I temperature (the vi model, the asahi guard) reads hot at loud levels on this hardware, up to tens of K-equivalent on a woofer at its heating level. That's the safe direction, but it costs headroom.
  • How the measurements handle it: all the time constants below come from readings at a constant quiet level, where the effect is constant or gone.

Tweeters

Total thermal resistance tau_coil tau_magnet
Left (two runs) 239 / 236 K/W 1.79 s 24 s
Right (two runs) 226 / 245 K/W 1.99 s 30 s
J413 profile (feed-forward set) 234 K/W 3.9 s 70 s
  • Time constants: from the cooling after each of the probe's cuts, at constant pilot level, with no level model involved.
  • Total thermal resistance: from the heat runs, with the probe's level term taken out. It matches the J413's.
  • The coil and magnet cool faster than the J413 constants say. With 3.9 s and 70 s, the model lets a burst of a few seconds to tens of seconds through at a power the real coil can't take. Commit 2 uses the VI set's 1.85 s for both coil constants and 25 s for both magnet ones.

Offline replays (--replay, on three J713 recordings: the certified one, the heat run, and the heat run 10 dB louder):

  • the tweeters' hold is unchanged: 17.0 → 16.5, 15.0 → 15.0 and 15.5 → 15.5 dB at the median;
  • with the recording 10 dB louder, the modelled coil peaks 2 C higher.

A sweep shows the hold is set almost entirely by tau_coil: each halving costs about 3 dB.

Woofers

They were read only at the pilot, in 0.3 s dips every 2 s during heating, because at their heating level the level effect is tens of K-equivalent. That gave about 2950 readings each.

Total thermal resistance tau_coil tau_magnet
Left 37.5 K/W 4.8 s (model) / 5.7 s (rests) 27 s / 64 s
Right 37.1 K/W 3.9 s / 6.4 s 22 s / 57 s
J413 profile 52.1 K/W 4.7 s 66.5 s

The J413 constants overstate the woofers' heating by about 40 %. tau_coil agrees. tau_magnet isn't settled between the two fits, but with either value the J413 model's coil runs hotter than the measured one at every time, so the woofers keep the J413 constants.

Certification

j713-certified-v2.rec.zst (7.9 MB; decompressed SHA-256 11c509c59b523cb6f64fe6b675bae39e1d491c7de4d02d2bd62c28a3261aec27): the daemon governing the J713 with this PR's constants (commits 1–2), playing test sounds (chords and blips). The installed file still said qualified = false, with --allow-unqualified; the flag only gates starting. Against the J413 tweeter constants, the replay refuses it as "not the recorded configuration". Its replay:

  • certifies: "the recording is complete and the replay matches the live decisions";
  • 0 ambiguous intervals, and the account equal to the live one;
  • both lock transitions matched;
  • 0 hand-offs and 0 latches;
  • no amp faults in the kernel log.

The qualification proposal

The README asks for evidence for every role and board variant, a review of the constants, and an explicit change to qualified. The J713 has one board variant, and everything above comes from one machine.

On that evidence, commit 3 proposes:

  • qualified = true;
  • udev starting the daemon on the J713, as on the J700.

If you'd rather not qualify on one unit, commits 1–2 stand on their own and the J713 stays unqualified.

Possibly relevant beyond the J713: the J413 profile has the same tweeter time constants. If the M2's tweeters behave like the M4's, the same gap applies there. I haven't measured an M2.

Tests

cargo test --release on a9daa66 + these commits: 331 passed, 2 failed, 1 ignored. The two failures, j616_ordinary_quiet_programme_has_zero_extra_attenuation and ordinary_quiet_programme_costs_at_most_one_db, fail the same way on a9daa66 alone.

  • parses_the_vi_machines checks the J713 against j413.conf, apart from the channel count, the tweeter z_min, and the three tweeter time constants, which it asserts.
  • With commit 3, it asserts the J713 is qualified and governs without the flag.
  • The load-refusal test now expects the J713 to load.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for this, and for testing #8 on real hardware.

We checked the sense map against your numbers. The I/V pairs on channels 0-7 are in the J413's order, and your |V|^2/P of 4.01 / 4.00 / 3.73 / 3.73 ohm lines up with the 4.0 and 3.72 ohm the file uses and with the ADT's per-unit Re. Apart from channels = 12 the file is j413.conf, and qualified = false keeps it from governing without --allow-unqualified. Merged onto the current #8 head it passes the whole suite (211 tests).

The edge hand-offs you found on the tweeters are a real usability bug, and our M2 runs the same charges, so we're fixing that in #8. This merges right after #8 does.

@RyanTheTide

Copy link
Copy Markdown
Contributor

One suggestion for a follow-up, not for this PR. The measured-power bounds assume a speaker never presents less than its smallest impedance, which for these tweeters is the J413's 3.72 ohm. Your ADT shows 3.55 ohm on the left tweeter, so the J713 file would be better off with 3.55 (or lower) there. #8 has no separate key for that yet; we're adding a per-speaker z_min, and once it lands it would be worth setting it in j713.conf.

@RyanTheTide

Copy link
Copy Markdown
Contributor

The J713 addition keeps qualified = false, the twelve-channel sense stream, and the first eight I/V channels in LW/RW/LT/RT order. The reported map, polarity and low-level power checks are useful board evidence; they do not qualify this profile for default protection.

Keep this behind #8's independent review and refresh it onto that accepted head. Once the minimum-impedance key is available, use conservative per-speaker bounds for the measured tweeters, 3.55 ohm left and 3.68 ohm right, rather than the reused 3.72 ohm value, and cover the stream-edge handoffs before qualification. I am not clearing #8's separate review here.

Linux #439 must not ship speakers relying on this unqualified profile. It needs a qualified J713 protection path paired with UCM #6 and asahi-audio #10. A qualified speakersafetyd profile is the other route; the profile described in those PRs still needs its own deployable submission.

The J713 shares the J413's chassis, and its ADT's per-unit DC resistances
(4.00 and 4.10 ohm woofers, 3.55 and 3.68 ohm tweeters) are in line with
the J413 constants, so it is taken to have the J413's speakers. Replace
its generic draft with j413.conf on the J713's sense stream, as measured
on a J713 (speakerguardd#8, aurora-silicon#10):

- The M4 AOP's speaker stream has twelve sense channels. The four amps
  fill the first eight, I then V per amp in the J413 order, and channels
  8-11 carry nothing.
- The tweeters take their own DC resistances as z_min, below their 3.72
  ohm z_nominal and r_ff. That raises the worst-case current and power
  bounds and lowers the low-band line-fault threshold slightly (4.6% and
  1.1%), both in the protective direction.

Against the draft this takes the J413's reviewed margins for these
speakers instead of the generic fallbacks: safe_reduction 99.5 dB instead
of 20 (the J713 kernel, aurora-silicon/linux#439, holds a locked SN012776
at raw volume step 1, about -100 dB, as on the J413), t_limit 150 C with
10 K headroom instead of 120 C with 15 K, no extra regulator headroom, no
J700 power caps, and the J413's r_ff instead of the 2.7 ohm placeholder.
The amp gain stays 18.5 dBV: the J713 kernel caps the index at 15. There
is no [Playback] section, since the J713 kernel has no energy grant.

The draft's guesses did not fit the machine: eight channels, and a gain
index above the J713's cap. Run on a J713, the draft never armed. This
profile arms 42 s after a cold boot, and the onset bound then holds the
tweeters about 15 dB and the woofers about 5 dB down without a grant. A
chord and five short blips played with no hand-offs. It stays unqualified.

J713 moves from the draft admission matrix to the machine profiles'
tests: the V/I parse test (the whole profile against j413.conf apart
from the channel count and tweeter z_min), the unqualified refusal, the
recovery requirement of the hot full-scale onset test, and the grant
reserve test.

Signed-off-by: Erik Bourget <erik@ebourget.net>
@erikwb
erikwb changed the base branch from unified/rework-20261024 to integration/recording-ring-preservation October 31, 2026 01:07
@erikwb
erikwb marked this pull request as draft October 31, 2026 13:49
@erikwb

erikwb commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

strict qualification incoming.

The J713's speakers were measured on the machine, under speakerguardd,
with each voice coil's resistance (from its amp's V/I sense) as its
thermometer. The method and the data are in speakerguardd#10.

The tweeters' total thermal resistance came out as the J413's: 226-245
K/W across two runs, against 234. But they cool faster than the J413
constants say. At a constant level, after the drive steps down, the coil
cools with about 1.8-2.0 s and the magnet with 24-30 s, against the
J413's 3.9 s (feed-forward) and 70 s. With those constants the model
lets a burst of a few seconds to tens of seconds through at a power the
real coil can't take. Use the VI set's 1.85 s for both coil time
constants and 25 s for both magnet ones. The thermal resistances stay.

Replayed offline on three J713 recordings, the change leaves the
tweeters' hold where it was (17.0 -> 16.5 dB and 15.0 -> 15.0 dB at the
median). With the recording played 10 dB louder, the modelled coil peaks
2 C higher.

The woofers measured at about 37 K/W against the J413's 52. The J413
constants overstate their heating, and they stay as they are.

The J713 parse test now allows these three tweeter constants to differ
from j413.conf.

Signed-off-by: Erik Bourget <erik@ebourget.net>
Qualification asks for evidence for every role and board variant, a review
of the constants, and an explicit change to `qualified`. For the J713,
which has one board variant, the evidence is in speakerguardd#10:

- Routing: playing each slot alone reaches only its own amp's sense. V*I
  is positive, and the measured voltage is 0.99-1.03 of what the amp's
  18.5 dBV full scale and the daemon's reduction predict, on all four
  speakers.
- Tweeters: their thermal resistance matches the J413's. Their time
  constants are the J713's own (the previous commit).
- Woofers: their measured heating, about 37 K/W, is under the J413's 52,
  so the J413 constants overstate it and stay.
- Certification: a recording of the daemon governing the J713 with this
  profile (test sounds) certifies on replay. It is complete, the replay
  matches the live decisions, and there are no ambiguous intervals. It was
  recorded with `qualified = false` and --allow-unqualified; the flag only
  gates starting. Against the J413's tweeter constants the replay refuses
  it as not the recorded configuration.

This is a proposal, for the maintainers to take or leave: it rests on one
J713. Mark the profile qualified, and have udev start the daemon on the
J713 as on the J700. The tests that refused it as unqualified now expect
it to govern.

Signed-off-by: Erik Bourget <erik@ebourget.net>
@erikwb erikwb changed the title Add the MacBook Air 13" M4 (J713), unqualified Add the MacBook Air 13" M4 (J713), measured and qualified on the machine Oct 31, 2026
@erikwb
erikwb marked this pull request as ready for review October 31, 2026 19:46
@erikwb

erikwb commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

@RyanTheTide The qualification is in, as of 10-31. The description has the details, but editing a description doesn't notify anyone, so here it is against your 10-25 points:

  • Per-speaker minimum impedance: z_min = 3.55 on the left tweeter and 3.68 on the right, from the ADT DC resistances (commit 1).
  • Measured constants: each coil's V/I resistance served as its thermometer while the daemon governed.
    • Tweeters: the total thermal resistance matches the J413's (226–245 against 234 K/W), but the coil and magnet cool faster. So commit 2 sets tau_coil 1.85 s and tau_magnet/vi_tau_magnet 25 s (J413: 3.9 / 70 s).
    • Woofers: they keep the J413 constants, which overstate their heating by about 40 %.
  • Certification: a fresh recording with these constants certifies on replay: 0 ambiguous intervals, both lock transitions matched, and no amp faults. Against the old tweeter constants the replay refuses it. The tool, the per-period data and the recording are linked in the description.
  • Qualification: commit 3 proposes qualified = true and the udev start. It's separate, so commits 1–2 can land without it.
  • Tests: 331 pass. The two that fail also fail on the base, a9daa66.

Still open from your list:

RyanTheTide added a commit that referenced this pull request Nov 4, 2026
Assisted-by: LLM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Folded into the 0.1.13 release candidate as merge 4a8a049 on fu-speakerguardd-rc (#27); it lands with that PR. Suite on the folded head: 403 passed, the 2 known listening gates failing, 3 ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants