Repository navigation
ASoC: restore DT tweeter HPF on grant and protect amp sense switches - #990
Merged
Merged
Conversation
Contributor
Author
|
M2 (J413) hardware check, 2026-11-06, test kernel 7.3.0-aurora-sgv2xo1 (sgv2-kernel-interface + linux #990 + #993) with speakerguardd #70 + #67:
|
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.
On J316, J413 and J616, a protection grant currently replaces the tweeter HPF with a literal “2 Hz”. Save each amp’s codec-loaded DT corner before applying the 800 Hz policy floor, then restore that value on grant. The SN012776 driver also explicitly programs DC_BLK0=0x01 and DC_BLK1=0x00 when apple,amp-dcblocker-config is absent, on every amp.
While Speaker Protection is owned, reject writes to every ISENSE/VSENSE DAPM switch from any other control file. An optional ALSA write-check callback supplies the caller identity before validation or the DAPM put callback, serialized with lock/unlock and file close. The owner keeps write access before, during and after a grant; unlocking protection releases the restriction.
KUnit covers DT corner capture/restore, the absent-property pair, sense control selection and owner authorization. The fixed-controls selftest exercises the actual ALSA write path with input validation both off and on (660 attempts each).
Validation at 87af9e9: fixed-controls passes (660 attempts per input-validation setting); ARM64 QEMU KUnit passes all 36 macaudio tests and all 9 TAS2764 tests. The ARM64 Apple MCA reference Image/modules/DTBs build also passes with Rust disabled; the Rust-enabled build encounters generated binding alignment assertions. Physical boot qualification is pending. The v2 selfcheck companion change issues sense writes on its grant-holding file.