Skip to content

ASoC/arm64: M5 Mac Studio audio: headphone jack, speaker off - #2535

Merged
DjDeveloperr merged 3 commits into
integration/aurorafrom
dtfill-t6050/studio-audio
Nov 20, 2026
Merged

DjDeveloperr merged 3 commits into
integration/aurorafrom
dtfill-t6050/studio-audio

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

The M5 Mac Studio (J775c, J775d) has no macaudio entry, so its card falls back to the generic configuration and neither the headphone jack nor the speaker works. The J775d's audio is described in its board file only, so the J775c can't share it.

Change

  • dt-bindings: add apple,j775c-macaudio (the J775d one is already there).
  • macaudio: one J775c/J775d entry with the J714s AOP front-ends and formats. The speaker stays off: the entry has no safe level, so macaudio_speakers_allowed() refuses the speaker, as on the J873. The jack works. The AOP's speaker stream on these machines has one TX slot and no RX (sense) slot, so the speaker can only run behind the protection lease with a no-sense model in speakerguardd (the J773g path). That is the follow-up stacked on this PR.
  • DT: new t6050-studio-audio.dtsi with the amp (i2c1 0x38), the jack codec (i2c2 0x4b) and both card links. The J775d includes it, and the J775c can too (arm64: dts: apple: support M5 Max Mac Studio (J775c) #2102). The amp is also given ti,bclk-ratio = <250>.

This replaces #2514, which ran the speaker under a fixed -20 dB ceiling with nothing protecting it.

Testing (buildbox, no hardware)

  • DTBs compared with integration: J775c identical; J775d only gains ti,bclk-ratio = <250> on the amp. dtc 0 warnings, dt-validate 0 messages on both, dt-doc-validate clean on the binding.
  • KUnit (arm64 qemu, apple-speaker-*): 60/60 pass. The J775 entry is refused speakers and carries no gain table.
  • checkpatch: only the "new file, MAINTAINERS?" note (the apple/ DT glob already covers it).

Still to run

On a J775c or J775d (no playback): the card probes, dmesg shows "driver can't assure safety on this model, disabling speakers", aplay -l lists the jack, evtest sees jack insert and remove.

ADT reading: why the speaker can't use the sense path

The iop-audio-controller/audio-speaker/audio-speaker reg in satchlj's J775c capture (#2449) is byte-identical to the J873s, J873 and J773g ones: ...01000000 00000000 01 00 18 00... = TX slot mask 0x1, RX slot mask 0x0, 1 TX and 0 RX slots. The same field on the J813, which has sense, reads 0f000000 ff000000 04 08: 4 TX slots and 8 RX words (V+I for each of the 4 amps). The J775 amp node has speaker-protection = 0 and no sense property (funkzy's J775d dump agrees). So the AP never sees V/I on these machines.

Assisted-by: LLM (Claude:Opus 5.5)

The M5 Max Mac Studio (J775c) shares the J775d's audio: a CS42L84 for the
headphone jack and one SN012776 for the speaker, behind the AOP. Add its
compatible next to the J775d's.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The M5 Mac Studio (J775c, J775d) has one SN012776 driving its built-in
speaker and a CS42L84 for the headphone jack, both behind the AOP's audio
services, as on the J714s. Neither machine has a macaudio entry, so the
card falls back to the generic "apple,macaudio" configuration: no AOP
front-ends, so neither the jack nor the speaker.

Add one entry for both, with the J714s front-ends and formats, and keep the
speaker off. The ADT's audio-speaker stream on these machines carries one
TX slot and no RX slot, so there is no voltage or current sense for a
protection model to read. Such a speaker can only run under a protection
lease taken by speakerguardd with a no-sense model, as on the J773g, and
that model does not exist for these machines yet. Until then the entry has
no safe level, so macaudio_speakers_allowed() refuses the speaker, as on
the J873. The jack is unaffected.

KUnit: the J775 configuration is refused speakers and carries no gain
table.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Move the J775d's speaker amp, jack codec and card links into a new
t6050-studio-audio.dtsi, which both M5 Mac Studios (J775c, J775d) can
include: one SN012776 at 0x38 on i2c1 (IRQ pin 106, shutdown pin 107), one
CS42L84 at 0x4b on i2c2 (IRQ pin 134, reset pin 139), and the jack and
speaker links on the AOP's audio services. The board sets the card's
compatible and model. The file says why the speaker is described but stays
off: the AOP's speaker stream carries no sense back.

The amp is also told its frame: 250 BCLKs of 12 MHz, which its ratio
detection rejects, as on the other AOP-fed SN012776 machines
(ti,bclk-ratio).

The J775d DTB only gains ti,bclk-ratio on the amp. J775c, whose integration
file does not describe audio yet, is unchanged.

Link: #2449
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>

@DjDeveloperr DjDeveloperr 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.

Reviewed at ebaf49c.

The speaker stays off. macaudio_j775_cfg has enable_speakers = false and safe_vol = 0, so macaudio_speakers_allowed() is false. The "Speaker" link is then skipped with "driver can't assure safety on this model, disabling speakers" before has_speakers is set or any BE link is created (sound/soc/apple/macaudio.c:2661). No speaker DAI link means no stream can reach the amp, and please_blow_up_my_speakers can no longer bypass admission. The KUnit admission test now asserts the J775 refusal. The DT only moves the existing nodes into t6050-studio-audio.dtsi and adds ti,bclk-ratio = <250> to the amp. dt-checks reported 0 new warnings on this head.

Rows owed post-merge, with no playback: J775c/J775d card probe, the disabling-speakers line, aplay -l jack, and evtest insert/remove.

@DjDeveloperr
DjDeveloperr merged commit a85fbee into integration/aurora Nov 20, 2026
2 checks passed
@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member

Claude Opus 5.5 on @satchlj's behalf: J775c row for this PR, no playback. Blocked before the card, by the AOP, not by this PR.

Kernel: lobata's cand-5, d2f8af83bf98 = integration/aurora 09c7ad0eb4d6 (includes this PR) + 82 commits, booted 2026-11-20 09:05Z. The J775c DT is #2102's plus #2542.

Row Result
amp 0-0038 sn012776 bound to tas2764
jack codec 1-004b cs42l84 bound (Cirrus Logic CS42L84, Revision: 36)
card not formed: deferred probe pending: snd-soc-macaudio: parsing CPU DAI of link 'Headphone Jack'
"driver can't assure safety on this model, disabling speakers" not reached (macaudio never probes)
aplay -l no J775 card

Cause: the AOP doesn't probe (apple_aop … setup port: boot incomplete … ETIMEDOUT, -110), so its audio DAIs never register. Details are on #2542. I'll post the full row (card probe, the safety line, the jack in aplay -l) once the AOP binds. evtest on the jack is Satya's step.

🤖 Generated with Claude Code

@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member

Claude Opus 5.5 on @satchlj's behalf: J775c (Mac Studio, M5 Max) no-playback row. Nothing opened a playback stream or wrote a control.

Kernel: lobata's cand-9, df1005dceaa0 = integration/aurora f0c51766e9c5 + 84. That is the current tip plus lobata's candidate composition, including #2102's J775c DT and #2556 (AOP setup-port gate). The AOP DT gives only mbox, and apple_aop binds. Booted 2026-11-20 14:47Z.

  • Card probes: snd-soc-macaudio sound: driver can't assure safety on this model, disabling speakers, then input: Mac Studio J775 Headphone Jack as /devices/platform/sound/sound/card0/input1.
  • aplay -l (as root) lists the jack card:
    card 0: AppleJ775 [Mac Studio J775], device 0: Primary (*) []
    card 0: AppleJ775 [Mac Studio J775], device 1: Secondary (*) []
    
  • Controls include Headphone Jack, Headset Mic Jack, Headphone Switch and Headphone Playback Mux.

The same row on cand-8 showed no soundcards found from a non-root ssh session. The card was registered there too, so that result most likely came from the session's lack of /dev/snd access.

Not done:

🤖 Generated with Claude Code

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.

3 participants