Repository navigation
ASoC: SN012776 amp setup and jack cap from the ADT (no bring-up hand values) - #981
Merged
Merged
Conversation
…he DT The driver wrote a brownout prevention block typed in from a trace to every SN012776, and left the DC blockers at their reset values. The Mac's ADT carries both for each amp group (bop-config and amp-dcblocker-config), and the boot loader now copies them to every amp's node as apple,bop-config and apple,amp-dcblocker-config. Program BOP_CFG0..BOP_CFG24 from apple,bop-config, and DC_BLK0 and DC_BLK1 from the first two bytes of apple,amp-dcblocker-config (the rest is padding), and drop the copy in the driver. PVDD stays the brownout source on every SN012776, as before. Without a property its registers keep their reset values; a property of the wrong length is a broken device tree and fails the probe. KUnit tas2764-bop (8 cases): each block is the property byte for byte, absent means none, a wrong length fails, a TAS2764 ignores both. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Which of an SN012776's idle sense output slots drive zeros instead of floating comes from per-board masks in the sound card's device tree node. The Mac's ADT carries it per amp (a row of the group's amp-tx-zd-config: one byte per eight slots from slot 0), and the boot loader now copies each amp's row to its node as apple,amp-tx-zd-config. With the property, program SDOUT_HIZ_1..4 from the row's first four bytes and enable FORCE_0 at probe, and leave the card's idle masks unused for that amp; the bit clock ratio still crops the mask to the frame. An all-zero row leaves every idle slot in high impedance, as an amp without a card mask has today. Like those masks, slots from 32 on are not driven; a row that asks for them is warned about. Without the property nothing changes. KUnit tas2764-bop: tas2764_tx_zd (row to mask, absent, short row, not a TAS2764 property). Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
The driver limited every SN012776's "Amp Gain Volume" to a value from its per-board table; three of those values (J614s, J616s, J713) were picked at bring-up. The Mac's ADT gives each amp's operating level: the second byte of the amp's row in its group's speaker-config, which the boot loader now copies to the amp's node as apple,speaker-config. Limit each SN012776's "Amp Gain Volume" to its own level from that row (low five bits) and drop the SN012776 gains from the board tables. A speaker link whose amps do not all carry a level in the amp's range (an older boot loader) keeps its speakers off, as a model whose safety the driver can't assure does. The woofers keep the playback high-pass corner the amps were given from the ADT (apple,amp-dcblocker-config) instead of a fixed "2 Hz"; the tweeters keep the 800 Hz protection floor. On the M1 Pro, M2 and M4 Pro every amp's ADT level is the level their tables had, so their limits do not change. KUnit apple-speaker-amp-level (4 cases): the level is the row's second byte, out-of-range and short or absent rows are rejected, speakers need every amp's level, no SN012776 board table carries a gain. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
The J616s/J713 jack was capped 6 dB below the DAC's 0 dB by a margin chosen at bring-up; the other CS42L84 machines had no cap and reached the DAC's digital gain above 0 dB, which only clips. macOS's own headphone volume ends at 0 dB on every machine whose audio configuration we have collected. Drop the per-board value and cap every CS42L84 jack at 0 dB. Cards without a CS42L84 jack have no such control and are left alone. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
macaudio now leaves an SN012776 woofer's playback high-pass at the corner the amp got from the Mac's ADT (apple,amp-dcblocker-config) and only locks it, instead of setting "2 Hz". Expect the control to keep the value it holds; tweeters still go to the 800 Hz floor. macaudio-fixed-controls: 0 failures in 590 attempts with and without CONFIG_SND_CTL_INPUT_VALIDATION. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
This was referenced Nov 5, 2026
RyanTheTide
added a commit
that referenced
this pull request
Nov 5, 2026
Merge integration/aurora (#981 amp values from the ADT) into sgv2-kernel-interface
This was referenced Nov 5, 2026
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.
Summary
No bring-up hand values for the SN012776 speaker amps and the CS42L84 jack. Every per-machine amp value now comes from the Mac's ADT, which aura copies onto each amp's DT node (aurora-silicon/aura #75):
apple,bop-config→ BOP_CFG0..BOP_CFG24 (the typed-in copy in the driver is gone);apple,amp-dcblocker-config→ DC_BLK0/DC_BLK1. PVDD stays the BOP source. No property: reset values. Wrong length: probe fails (broken DT).apple,amp-tx-zd-config→ SDOUT_HIZ_1..4 + FORCE_0 at probe; it replaces the card's per-board TDM idle masks for that amp (bclk crop still applies). No property: unchanged.apple,speaker-config(row byte 1, low 5 bits). All SN012776 gains are gone from the board tables (including the three bring-up ones, J614s/J616s/J713). A speaker link whose amps don't all carry a level keeps its speakers off. Woofers keep the HPF corner the amps got from the ADT instead of a fixed "2 Hz"; tweeters keep the 800 Hz protection floor.On the M1 Pro, M2 and M4 Pro the ADT values equal what the tables had (level 15 on every amp, same brownout block), so limits don't move.
Order: aura #75 must be in the boot chain before a kernel with this runs, or SN012776 speakers stay off (fail-safe). The J616s Stage 2 and every distro's aura need the new aura before the next fleet kernel; the ref Macs' boot.bin too.
#922 (sgv2-kernel-interface): merging this into the sgv2 line conflicts in
macaudio_set_speakerand the j316/j413 tables. Resolution (KUnit-tested) on branchn2/sgv2-nohand: the per-amp level becomes a fixed volume there (macaudio_fix_sn012776_levels), tweeters keepmacaudio_speaker_hpf(), woofers keep the amp's corner. Follow-up:tweeter_hpf_granted = "2 Hz"should become the woofers' ADT corner.Tests
🤖 Generated with Claude Code