Skip to content

t6041-j575c: enable the speaker - #1573

Merged
RyanTheTide merged 4 commits into
aurora-silicon:integration/aurorafrom
7robertodantas:j575c-speaker
Nov 12, 2026
Merged

RyanTheTide merged 4 commits into
aurora-silicon:integration/aurorafrom
7robertodantas:j575c-speaker

Conversation

@7robertodantas

@7robertodantas 7robertodantas commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

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-speaker also 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.

  • A one-channel stream drains six times faster than 48 kHz (about 290,000 frames/s); a six-channel one runs at 48 kHz, playback and sense in lockstep.
  • The amp's current and voltage come back on sense channels 0 and 1. With a 440 Hz tone at -40 dB on 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, as j375.conf/j475.conf).

The change.

  1. 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.
  2. 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.
  3. dt-bindings: sound: apple,t6041-aop-audio: allow spkr, sense, cout, cin (speakers and jack, no microphones).
  4. 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 plain Speaker 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-config 00 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 Volume 1, -100 dB).

Userspace, in separate PRs:

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.c is unchanged.

Test Result
Card binds pass: AppleJ575 (PCM 1 "Secondary", PCM 2 "Speaker Sense") next to AppleJack, no amp faults
No daemon pass: Speaker Volume held at 1 (-100.5 dB)
Stock speakersafetyd 2.0.1 with its j575.conf fails safe: panics at snd_pcm_hw_params_set_channels (two channels asked of the twelve-channel sense PCM), speaker stays at the floor
speakersafetyd with the twelve-channel profile pass: 1 speaker, amp gain 21 dBV, max power 0.94 W, min gain -17.65 dB; takes the volume lock, models from the sense
V/I sense at -40 dB, 440 Hz pass: as above
PipeWire (aurora-audio's graph-j575.json, "Mac Studio Speaker") pass: the owner confirmed sound from the built-in speaker
Headphone jack card alongside pass (with the UCM jack profile)
dt-validate (dtschema 2026.9) on the J575c DTB 0 new warnings against integration/aurora; the binding passes dt-doc-validate
checkpatch --strict 0 errors (warnings only for the Co-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

7robertodantas and others added 4 commits November 11, 2026 18:45
… 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>

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
RyanTheTide merged commit 29528fe into aurora-silicon:integration/aurora Nov 12, 2026
2 checks passed
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.

2 participants