Repository navigation
selfcheck: name a lone desktop amp's sense switches without a prefix - #243
Merged
Merged
Conversation
The lone speaker amp of the desktop Macs (J274, J375, J473, J474, J475)
has no sound-name-prefix. wiring.derive() labels it "Speaker", but ALSA
names its controls without any prefix ("VSENSE Switch", "ISENSE
Switch", "Speaker Volume"), as the supervisor already expects
(kernel.rs takes an empty amp name for these). The switch test built
"Speaker VSENSE Switch", found no such control, and refused every mono
desktop; the "speaker PCM took none of ..." line that followed was only
a consequence of that early return.
Record the control prefix (empty) next to the label for the mono amp
and build the switch names from it. Amps that name themselves keep
their prefix in the control name.
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Contributor
Author
|
Review at 0be5cb6. First pass, non-author. The fix is in the right place and narrow:
Nit: |
DjDeveloperr
approved these changes
Nov 23, 2026
DjDeveloperr
left a comment
Contributor
There was a problem hiding this comment.
Formal §1–§6 pre-PR checklist review at 0be5cb60c9d218fbc4b9b021e7ab36d7f9bfcc22.
Verdict: APPROVE.
Checklist Summary
- §1 No model gating: Pass —
control_prefix = ""is derived solely from the mono-amp DT shape (len(codecs) == 1 and "prefix" not in codecs[0]), with no chip/board gate. - §2 Production-ready, no hacks: Pass — narrow, clean fix with no workarounds.
- §3 Safety: Pass — no safety values, limits, or protection thresholds change.
wiring_hash()(packaging/session/wiring.py:1232-1240) does not hashcontrol_prefix, so generated configs and hashes stay identical. Every lookup/toggle/restore incheck_sense()(packaging/session/speakerguardd-selfcheck:706-789) flows throughnames[(a["prefix"], kind)], so switch restore uses the unprefixed names as well. Voicing on J473 remains refused by the parity attestation until AID12 passes. - §4 Clean-room & attribution: Pass — commit
0be5cb60c9d2carries human author/committer (Ryan Murray <ryan@aurorasilicon.org>) and humanSigned-off-by:only (zero AI trailers in commit); PR body carriesAssisted-by:disclosure. - §5 Evidence & CI: Pass — 9/9 active CI checks green (
policy,Clean-publish check,selftest,Rustx86_64/arm64,Rig tools,Session side,aurora-speaker-upgrade; 1 skipped duplicateselftest).test_mono_amp_sense_switches_have_no_prefixcovers J274/J473 (unprefixed) and J413 (prefixed). J473 hardware row on fleet82 default kernel verifies the silent hardware switch test passes, voicing stays refused, andrpm -Vis clean after restore. - §6 Naming: Pass.
Assisted-by: LLM (Gemini 4 Neon)
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.
Problem. On the M2 Mac mini (J473) the speakerguardd v2 self-check refuses the speaker before it measures anything:
no 'Speaker VSENSE Switch' control, followed bythe speaker PCM took none of ['S24_LE', 'S32_LE', 'S16_LE']. The lone amp of the desktop Macs (J274, J375, J473, J474, J475) has nosound-name-prefix.wiring.derive()labels it "Speaker", but ALSA gives its controls no prefix at all (VSENSE Switch,ISENSE Switch,Speaker Volume). The supervisor already handles this (kernel.rstakes an empty amp name). Only the self-check's switch test built the name from the label. The PCM line is only a side effect of the switch test returning early.Change. For the mono amp,
wiring.derive()now records the control prefix (empty) next to the label, and the switch test builds the switch names from it. Amps that name themselves are unchanged. The label, the wiring hash and the generated configs are unchanged.Testing.
test_mono_amp_sense_switches_have_no_prefix(J274 and J473 fixtures ask forVSENSE Switch; J413 keeps its prefixed names). It fails before the change and passes after.packaging/session: test_wiring, test_verify, test_provision, test_session: 290 passed, 1 skipped.gen.py --checkclean.aurora-speaker-upgrade --checkgets through identity (AID12, the Mac's own tuning from its vendor firmware), compile and the silent hardware switch test, which now passes (derived wiring). It is then refused at the next step,voicing, by the macOS parity attestation. Nothing was played and nothing was switched.Still to run. The J473 cannot be granted yet. Its AID12 tuning is refused by the parity attestation in
parity.json, on every build. AID2, AID6 and AID26 are refused with it, with the same numbers (worst +2.51 dB at tone_1600_-12, -3.67 dB at step_down_2000; the BuzzKill gap that #138 works on). This PR only removes the refusal that comes before that step. Protected playback rows on the J473 will follow once AID12 passes.Reviewer detail
Amp Fault Status,Amp Gain Volume,ISENSE Switch,VSENSE Switch,Speaker Volume,Speaker Volume Unlock,Speaker Playback Mux,Speaker Sample Rate,Speaker Switch. The DT amp nodecodec@38hasti,vmon-slot-no/ti,imon-slot-noand nosound-name-prefix.hardware switch test: refused: ... no 'Speaker VSENSE Switch' control; the speaker PCM took none of [...].hardware switch test: pass: silent switch test passed on this kernel.selfcheck verify: kernel pass (both interfaces), hardware pass (j473 wiring derived), voicing refused (macOS parity attestation).rpm -V speakerguardd-v2was clean after the files were put back; the packages were removed again afterwards (the J473 stays on its production stack).Assisted-by: LLM (Claude:Opus 5.5)