Repository navigation
t6041-j575c: enable the speaker - #1573
Merged
RyanTheTide merged 4 commits intoNov 12, 2026
Merged
Conversation
… stream speaker_fe_channels gives the speaker front-end every slot of a CPU stream that has more slots than amps (the AOP's six-slot speaker stream on the J713). The front-end link merges its back-ends' channel limits (dpcm_merged_chan). ASoC leaves a back-end's codecs out of that merge when there are several of them, but merges a single codec's own limits: with one amp (two channels on an SN012776) behind a six-slot stream the front-end's channels come out empty, and every open fails with -EINVAL. Do not merge channels on the speaker front-end of such a machine. Its CPU DAI already states the stream's channel count, and the amp takes its slots from its TDM mask, as on the J713. Signed-off-by: Roberto Dantas <7robertodantas@gmail.com> Assisted-by: LLM (Claude Code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The J575c (Mac Studio, M4 Max) has one SN012776 on the AOP's speaker stream. Its variant left the speaker link unbound: the speaker had not been brought up, and the J773s ADT's speaker stream lists no receive slots, so no V/I sense was expected. On a J575c the firmware runs this stream exactly as on the J616s, ADT notwithstanding (its audio-speaker node lists one playback slot and no receive slots): six 32-bit playback slots and twelve 16-bit sense slots in a 250-bit frame at 12 MHz. A one-channel stream drains six times faster than 48 kHz; a six-channel one runs at 48 kHz, and the amp's current and voltage come back on sense channels 0 and 1 (a 440 Hz tone at -40 dB reads back in both, the voltage 14 degrees ahead of the current, 3.4 ohm at speakersafetyd's SN012776 scales). Give the J575c its own variant: the J616s stream format and frame, the speaker front-end on all six slots as on the J713, the amp on the first two (it downmixes them). The J773 keeps its speaker off. Signed-off-by: Roberto Dantas <7robertodantas@gmail.com> Assisted-by: LLM (Claude Code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…microphones A Mac without microphones (the Mac mini and Mac Studio) lists no "dma" channel. Its node could describe the headset jack alone, but not the speakers too: allow "spkr", "sense", "cout" and "cin" (the J575c, Mac Studio M4 Max). Signed-off-by: Roberto Dantas <7robertodantas@gmail.com> Assisted-by: LLM (Claude Code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The J575c's speaker amp, its I2C bus and its sound card were disabled, and the AOP audio node listed only the headphone jack's streams. Enable them, with the speaker stream (base-ns ADMAC TX0) and its sense (RX0) on the AOP audio node, as on the J616s. The amp's address and interrupt, guessed until now, are the ADT's (/arm-io/i2c1/audio-speaker: 0x38, AP pin 55), as is its shutdown line (function-reset: AP pin 54). The amp loses its "Speaker" name prefix: like the J375's single amp, its controls are the card's plain "Speaker Volume", "Amp Gain Volume", "VSENSE Switch" and "ISENSE Switch", the names macaudio's mono fixups, the Mac Studio UCM profile and speakersafetyd's J575 model use (with the prefix, macaudio's control fixup fails and the card does not bind). The boot loader passes the amp's ADT configuration (apple,speaker-config 00 14 00 02, apple,bop-config, apple,amp-dcblocker-config). Until a protection daemon takes the volume lock, macaudio holds the amp at its lowest volume step. Signed-off-by: Roberto Dantas <7robertodantas@gmail.com> Assisted-by: LLM (Claude Code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7robertodantas
force-pushed
the
j575c-speaker
branch
from
November 11, 2026 21:45
ab07be6 to
8c4d009
Compare
RyanTheTide
approved these changes
Nov 12, 2026
RyanTheTide
left a comment
Contributor
There was a problem hiding this comment.
Checked the macaudio change and the J575c config. The speaker comes up at the floor and only rises under speakersafetyd, and the V/I sense test backs the model. One question for a J713 or J715 owner: the speaker front-end no longer merges the back-end's channel limits on those boards either, so a quick speaker open there would confirm nothing changed. Approved.
RyanTheTide
merged commit Nov 12, 2026
29528fe
into
aurora-silicon:integration/aurora
2 checks passed
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.
Written with an AI assistant (Claude) on @7robertodantas's behalf; every hardware step was run and checked on the owner's J575c.
The J575c (Mac Studio, M4 Max) speaker was off in the DT and in macaudio: the J575c/J773 variant never bound the speaker link, because the speaker had not been brought up and the J773s ADT's speaker stream lists no receive slots, so no V/I sense was expected.
What the hardware does. The J575c ADT's
iop-audio-controller/audio-speakeralso lists one playback slot and no receive slots. The firmware runs the stream as on the J616s anyway: six 32-bit playback slots and twelve 16-bit sense slots in a 250-bit frame at 12 MHz, on base-ns ADMAC TX0/RX0.Speaker Volume(about 0.2 mW into the speaker), both read the tone (100 and 91 LSB), the voltage 14 degrees ahead of the current, |Z| 3.4 ohm at speakersafetyd's SN012776 scales (3.75 A, 14 V).So the J575c speaker can run under speakersafetyd with the Mac Studio speaker model (
j575.conf, asj375.conf/j475.conf).The change.
ASoC: apple: macaudio: a speaker front-end that carries more slots than amps (speaker_fe_channels, the J713's six-slot stream) no longer merges its back-end's channel limits. ASoC merges a lone codec's own limits (two channels on an SN012776) but not several codecs', so with one amp the six-slot front-end came out empty and every open failed with -EINVAL.ASoC: apple: macaudio: the J575c gets its own variant: the J616s stream format and frame (I2S, inverted frame clock, bclk ratio 250), the front-end on all six slots as on the J713, the amp on the first two (it downmixes them). The J773 keeps its speaker off.dt-bindings: sound: apple,t6041-aop-audio: allowspkr,sense,cout,cin(speakers and jack, no microphones).t6041-j575c: enable i2c1, the amp and the card; the AOP audio node gets the speaker stream and its sense. The amp's address, interrupt and shutdown line, guessed until now, are the ADT's. The amp drops its "Speaker" name prefix: like the J375's single amp its controls are the card's plainSpeaker Volume,Amp Gain Volume,VSENSE Switch,ISENSE Switch, which macaudio's mono fixups, the Mac Studio UCM profile and speakersafetyd's model use (with the prefix the card's control fixup fails and it does not bind).No AOP driver change. The boot loader passes the amp's ADT configuration (
apple,speaker-config00 14 00 02,apple,bop-config,apple,amp-dcblocker-config; aura kboot, 1.0.0b5 and later). Without a protection daemon macaudio holds the amp at its lowest step (Speaker Volume1, -100 dB).Userspace, in separate PRs:
apple/j575c.confbeforeapple/j575.conf, and shipsj575c.conf(j575.conf with the twelve-channel sense).Tested on a J575c: linux-aurora 7.3.0 built from integration/aurora 1943af8 with #1546 and #1565, these commits' macaudio as a module, and these DT commits on that tree (with #1499) as a one-shot aura Stage 2 trial (aura 1.0.0b8 + aura#160). The PR is on today's integration/aurora (ea10c4d), where
macaudio.cis unchanged.AppleJ575(PCM 1 "Secondary", PCM 2 "Speaker Sense") next toAppleJack, no amp faultsSpeaker Volumeheld at 1 (-100.5 dB)j575.confsnd_pcm_hw_params_set_channels(two channels asked of the twelve-channel sense PCM), speaker stays at the floorgraph-j575.json, "Mac Studio Speaker")dt-validate(dtschema 2026.9) on the J575c DTBdt-doc-validatecheckpatch --strictCo-Authored-By:trailer's case)Not tested: a cold boot with the speaker enabled (the trials were warm reboots), suspend and resume with the speaker playing, long loud playback (speakersafetyd's governor reducing gain), the J773 (unchanged here).
🤖 Generated with Claude Code