Skip to content

Bound V/I onset energy before gain writes - #12

Closed
RyanTheTide wants to merge 4 commits into
wip/sg8-line2-20261026from
fix/vi-onset-energy
Closed

RyanTheTide wants to merge 4 commits into
wip/sg8-line2-20261026from
fix/vi-onset-energy

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

A gain increase after silence or mute could let full-scale input heat a V/I model past its limit before the next measurement arrived.

Reserve the whole possible energy dose before each gain write, using maximum amplifier voltage, minimum impedance, unobserved time, the old lease and queue, and a possible renewed lease. The kernel lease counts playing time, so the dose must fit even when idle gaps intervene. Bound both thermal nodes and the safe-level tail. Unified also checks its feed-forward model. The projections use copies and leave measured accounting alone. Unsupported ALSA reductions fail before writing instead of clamping to less attenuation.

This ceiling can attenuate quiet audio beyond the governor's 7 dB handoff threshold. That threshold still applies to the governor request, with its existing handoff, latch and re-arm rules. An unqualified profile whose worst-case fallback cannot fit its working limit stays locked. All profile files, fingerprints and service activation stay unchanged.

The tests retain the six reviewed programs and add delayed and intermittent onsets, old-gain queue retention through mute, and a quiet-to-full-scale sweep at every V/I profile's maximum voltage. The sweep verifies pre-onset leases on 25 profiles and refusal on 9 unqualified profiles whose fallback tails do not fit.

Validation on the L2-1 base 5c1485f15218640a3fefa5652b624279dc8595d2 and this head:

  • Linux release suites pass 225/225 on the base and 232/232 on the head. All-target clippy exits 0, and all seven Python acceptance fixtures pass.
  • All 144 long programs, 20,000 V/I cases and 5,000 J700 cases pass. The V/I battery reports no truth-over-150 cases.
  • The 320-case matrix peak falls from 434.4 to 118.6 C, with over-150 rows falling from 55 to zero. Eight rows are warmer than their baseline but remain below the limit. All 96 schedule rows are cooler, with a 91.9 C head peak.
  • Seven recordings at 0 and +10 dB were compared over 193,810 paired period rows. All 28 invocations return diagnostic 3, as on the base; they are not certificates. Mean maximum-per-output attenuation changes range from -2.91 to +14.98 dB. One +10 dB replay logs two new lost-line verdicts.

No hardware, playback, deployment or new profile qualification. This is ready for independent review.

@RyanTheTide
RyanTheTide marked this pull request as ready for review October 25, 2026 21:49
RyanTheTide added a commit that referenced this pull request Oct 26, 2026
The FF reserve is additional protection. Retain PR #12\x27s existing V/I reserve on the legacy path and take the larger ceiling. Extend the regression so a warm FF state and a warm V/I state each tighten the output independently; the earlier FF-only implementation fails the latter check.
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

SHIP for the onset-bound delta at 62cf38640eb7; approval of the PR 8 base and integrated stack is still required. The reserve, unchanged measured accounting and refusal of unreachable ALSA reductions pass independent checks. The quiet-audio cost is substantial. The half-dB simulation applies 5.5 dB to woofers, 13.5 dB to J316/J616 tweeters and 15 dB to J413 tweeters. The tweeter values exceed the seven-decibel handoff threshold by 6.5 and 8 dB.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Superseded by #27: this PR's head is already contained in the 0.1.13 release candidate branch (fu-speakerguardd-rc), so it lands with that PR. Closing to keep one release PR (fewer, bigger PRs).

@RyanTheTide RyanTheTide closed this Nov 4, 2026
@RyanTheTide
RyanTheTide deleted the fix/vi-onset-energy branch November 6, 2026 03:23
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.

1 participant