Skip to content

J704 (MacBook Pro 14" M5): headphone jack and microphones, speakers off - #2587

Open
term-guy wants to merge 5 commits into
aurora-silicon:integration/aurorafrom
term-guy:j704-audio-jack
Open

term-guy wants to merge 5 commits into
aurora-silicon:integration/aurorafrom
term-guy:j704-audio-jack

Conversation

@term-guy

@term-guy term-guy commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Sound for the J704 without the speakers:

  • dt-bindings: sound: apple,macaudio: Add J704
  • ASoC: apple: macaudio: J704 (MacBook Pro 14" M5), speakers off
  • arm64: dts: apple: t8142-j704: Add the headphone jack and microphones

The J704 ADT shows J813's audio wiring (AOP, dart-aop, admac-base-ns, admac-leap-s at the same addresses and IRQs, the CS42L84 at i2c1 0x4b with its IRQ on AP pin 100 and reset on nub pin 18, the three-microphone LEAP stream), so the tree includes t8142-j813-audio.dtsi as J815 does and renames the card and chassis.

Its six SN012776 speakers are on i2c3 0x38-0x3d, but not in J815's order: the ADT names 0x39 left woofer 2, 0x3a left tweeter, 0x3c right woofer 2 and 0x3d right tweeter, and its speaker-config id list does not map one-to-one onto the six addresses. Until the slots and a speakersafetyd profile are verified on the hardware, neither the amps nor i2c3 are described, and the J704 macaudio entry has no safe level, so macaudio_speakers_allowed() refuses any J704 speaker link
(the admission KUnit case checks it).

Tested on a J704 (Fedora 44, aurora 7.3.0, with the J704 PCIe tree of #2582 underneath):

  • cs42l84 0-004b: Cirrus Logic CS42L84, Revision: 36; cards "MacBook Pro J704" and "MacBook Pro J704 HPAI"
  • jack: playback at several volumes, both channels, volume keys; headphone and headset-mic detection; the headset mic captures
  • microphones: 3 x FLOAT_LE at 48 kHz, levels follow speech (raw, no DSP)
  • KDE/PipeWire with the UCM profiles of macaudio, aop_audio: add the J704's jack and microphones alsa-ucm-conf-asahi#22
  • make dt_binding_check DT_SCHEMA_FILES=sound/apple,macaudio.yaml and CHECK_DTBS=y apple/t8142-j704.dtb clean; macaudio KUnit (kunit.py run --arch=arm64 'apple-*'): 63/63 passed

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

The speakers-off part holds up: no safe level, macaudio_speakers_allowed() refusing the link with a KUnit case for it, and no amp nodes or speaker dai-link, so nothing can drive the SN012776s. Two small points:

  • t8142-j704-audio.dtsi:15-16 says the amplifiers "stay in shutdown", but with i2c3 and the SDZ GPIO both undescribed they stay in whatever state iBoot leaves them in after the chime. Without a bit clock they can't play, so this is safe, but could you either show the SDZ pin's level after boot (/sys/kernel/debug/gpio or pinctrl debugfs, if the pin is known from the ADT) or reword the comment to "are never configured"?
  • macaudio.c, device-id table: the J704 row lists gain 15, while the config has no safe level. - as in the J775 rows would match.

Assisted-by: LLM (Claude:Opus 5.5)

@term-guy

Copy link
Copy Markdown
Contributor Author

Tested on the J704 together with #2582: a local merge of 0bb4e1b and 15a449a (it merges cleanly), t8142-j704.dtb booted as built, and the installed Fedora 44 aurora 7.3.0 kernel.

apple-admac 393800000.dma-controller: Audio DMA Controller
apple-admac 3d3200000.dma-controller: Audio DMA Controller
cs42l84 0-004b: Cirrus Logic CS42L84, Revision: 36
 0 [AppleJ704HPAI  ]: aop_audio - MacBook Pro J704 HPAI
 1 [AppleJ704      ]: macaudio - MacBook Pro J704
  • AppleJ704 has Primary and Secondary playback and the jack capture device, plus the jack controls (Headphone Jack, Headset Mic Jack, the Jack ADC/DAC controls).
  • AppleJ704HPAI (microphone array) records.
  • The speaker amplifiers are not bound, as intended. Nothing was played through any output.

No headset was plugged in for this boot, so jack detection and headset capture were not exercised again. Those were tested before the PR was opened.

AI-assisted (Assisted-by: LLM), tested by me on the hardware.

@term-guy

Copy link
Copy Markdown
Contributor Author

Thanks, both in two commits on top:

  • cb4e267 rewords the comment: with neither i2c3 nor the SDZ line described, Linux never configures the amplifiers, so they keep the state iBoot left them in; with no speaker link there is no bit clock, so they cannot play. (I went with the rewording rather than reading the pin, since the SDZ line isn't described yet.)
  • 569258b: the J704 row in the device table now says - for the gain, as the J775 rows do.

No functional change; both commits change only comments.

AI-assisted (Assisted-by: LLM).

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-review of 569258b: Blockers: 1.

Both points from our last comment are resolved:

  • arch/arm64/boot/dts/apple/t8142-j704-audio.dtsi:16-18: the comment now says the amplifiers are never configured and keep iBoot's state, and that they cannot play without a speaker link. That matches the tree.
  • sound/soc/apple/macaudio.c:4499: the J704 row shows - for the gain, matching macaudio_j704_cfg, which has no safe level.
  1. All five commits end with an Assisted-by: LLM trailer above the Signed-off-by. Please drop it from the commit messages and keep the human Signed-off-by; the place for it is the PR description's last line, as Assisted-by: LLM (<vendor>:<model>) (the current last line is "AI-assisted (Assisted-by: LLM), ..."). No code change is needed.

Assisted-by: LLM (Claude:Opus 5.5)

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

Pre-PR checklist review at 569258bb54cf: 1 blocker (§4 attribution).

Code, DT, and Safety Audit (§1–§3, §6)

  • Clean. Documentation/devicetree/bindings/sound/apple,macaudio.yaml, sound/soc/apple/macaudio.c, sound/soc/apple/macaudio-admission-test.h, arch/arm64/boot/dts/apple/t8142-j704-audio.dtsi, and t8142-j704.dts all check out with no bugs or conflicts across the other t8142-j704-*.dtsi files.
  • Speaker safety (§3): Speakers are strictly off by defense-in-depth — speaker_*, i2c3, and /sound/dai-link@1 are deleted from the J704 DT, macaudio_j704_cfg sets .enable_speakers = false and .safe_vol = 0, and macaudio_speakers_allowed(&macaudio_j704_cfg) is covered by KUnit. (Note for future speaker bring-up: per §3, speaker protection will require speakerguardd v2 rather than legacy speakersafetyd.)
  • CI: dt-checks and host-tests are green.

Blockers

  1. §4 commit trailers: All five commits (9aa30bb068a0, 43c7dec8fc56, 0bb4e1bf3b6b, cb4e2678124c, 569258bb54cf) include an Assisted-by: LLM trailer in the commit message. Per §4 of the pre-PR checklist, commits must carry human author/committer identity and human Signed-off-by: only, with zero Assisted-by: or AI trailers in commit messages (disclosure stays in the PR body only).

§5 Evidence Notes (non-blocking; worth attaching on re-push)

  • The J704 boot was reported at 0bb4e1bf + #2582 (the two commits on top are comment-only), but please include the §5 regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors) on the updated head, and replace the <S2> placeholder in the PR body's alsa-ucm-conf-asahi reference.

Assisted-by: LLM (Gemini 4 Neon)

The MacBook Pro (14-inch, M5) J704 sound card, a J813-style AOP-fed
macaudio card.

Signed-off-by: termg <hello@termg.com>
The J704 has J813's AOP-fed audio: the T8152-style AOP audio driver as
the CPU component and a CS42L84 headphone jack on "cout". Its six
SN012776 speakers (two woofers and a tweeter per side) sit in an order
of their own, not J815's, and have no verified slots or protection
profile yet.

Add a J704 entry with J813's jack format and front-ends, and no safe
level, so macaudio_speakers_allowed() never admits a J704 speaker link.
The admission KUnit case checks that.

Tested on a J704 (Fedora 44) with the J704 audio tree: the jack plays
(volume, both channels), the headset mic captures, no speaker is bound.

Signed-off-by: termg <hello@termg.com>
The J704 (MacBook Pro 14", M5) ADT shows J813's audio wiring: the AOP
(ascwrap-v6, mailbox IRQs 490-493), dart-aop, admac-base-ns (IRQ 549)
and admac-leap-s (IRQ 551) at the same addresses, the CS42L84 jack codec
at i2c1 0x4b (IRQ on AP pin 100, reset on nub pin 18) and the
three-microphone LEAP stream. Reuse t8142-j813-audio.dtsi as J815 does,
with the J704 names.

The six SN012776 speakers on i2c3 (0x38-0x3d) are in an order of their
own (0x39 left woofer 2, 0x3a left tweeter, 0x3c right woofer 2, 0x3d
right tweeter), so until their slots and a protection profile are
verified neither the amps nor i2c3 are described: their driver never
binds and they stay in shutdown. The card is "apple,j704-macaudio",
whose macaudio entry admits no speaker link.

Tested on a J704 (Fedora 44, aurora 7.3.0): the CS42L84 probes
(revision 36), the jack plays with volume and both channels, jack and
headset-mic detection work, and the HPAI card captures the three
microphones (3 x float, 48 kHz).

Signed-off-by: termg <hello@termg.com>
…onfigured

The comment said the J704's SN012776 amplifiers "stay in shutdown". With
neither i2c3 nor their shutdown (SDZ) line described, Linux never touches
them, so they stay in whatever state iBoot left them in after the chime.
They still cannot play: there is no speaker link, so no bit clock. Say
that instead.

Signed-off-by: termg <hello@termg.com>
The J704 row listed a gain of 15, but macaudio_j704_cfg has no safe
level: its speakers are off. Write "-", as the J775 rows do.

Signed-off-by: termg <hello@termg.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Status: still needed. integration/aurora at 4a17f73 has no J704 entry in macaudio and no t8142-j704-audio.dtsi. The five commits merge cleanly onto 4a17f73 (the PMP report change to the J704 tree, d32242d, does not overlap) and they apply without #2582. Neither review found a code, DT or speaker-safety problem. @term-guy, what is left from the 2026-11-22 review is the regression counts on the current head (0 SELinux denials, 0 failed units, 0 new kernel errors) and the <S2> placeholder in the description.

@term-guy

Copy link
Copy Markdown
Contributor Author

Updated: all five commits now carry only my Signed-off-by (9aa30bb..569258b rewritten as f7e582e..9377776, trees identical). The description's <S2> placeholder is now alsa-ucm-conf-asahi#22, and the disclosure is its last line.

J704 boot on this head merged with #2582 (installed 7.3.0 kernel, on-Mac self-test): cards AppleJ704 (macaudio, Primary/Secondary, jack capture) and AppleJ704HPAI (microphone array). A 2 s capture from each: the jack gives peak 0 (no headset), the array gives a signal. 0 SELinux denials (enforcing), 0 failed units, 0 new kernel errors. The ASoC line Secondary: no backend DAIs enabled is the same as before.

The five commits still merge cleanly onto the current integration/aurora tip (da67077).

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks. Everything from the status check is now there: the five commits carry only your Signed-off-by with trees identical to before, the <S2> placeholder is alsa-ucm-conf-asahi#22, and the J704 boot at this head has both cards, a signal on the array, 0 SELinux denials, 0 failed units and 0 new kernel errors. Speakers stay off in this series, so there is nothing for the speaker-safety side to check yet. Approved from my side. DjDeveloperr's earlier change request (at 569258b) still needs to be cleared before merge.

Assisted-by: LLM (Claude:Opus 5.5)

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

Approved at 9377776: J704 boot row and regression counts at this head; speakers off.

@term-guy

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr could you re-review at 9377776ee95f? The §4 blocker from your review at 569258bb is fixed: all five commits carry only my Signed-off-by (trees identical). The §5 notes are done too: the regression counts at this head are in #2587 (comment), and the description's <S2> is now alsa-ucm-conf-asahi#22. Ryan approved at this head.

Assisted-by: LLM (Claude:Opus 5.5)

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

Re-review at 9377776ee95f (checked against integration/aurora 70a00e583b03): Approved — all §1–§6 checks pass.

  • §4 attribution resolved: All five commits (f7e582e04877..9377776ee95f) now carry human author/committer identity and human Signed-off-by: only (zero AI trailers in commit messages). The PR description replaces <S2> with aurora-silicon/alsa-ucm-conf-asahi#22 and carries the Assisted-by: disclosure.
  • §1–§3 & §6 clean: Documentation/devicetree/bindings/sound/apple,macaudio.yaml, sound/soc/apple/macaudio.c, sound/soc/apple/macaudio-admission-test.h, arch/arm64/boot/dts/apple/t8142-j704-audio.dtsi, and t8142-j704.dts remain clean and compatible with current integration/aurora (including recent macaudio.c ceiling updates); not superseded. Speakers remain strictly off by defense-in-depth (enable_speakers = false, safe_vol = 0, amp nodes / i2c3 / dai-link@1 deleted, covered by KUnit). Live CI (dt-checks, host-tests) is green on 9377776ee95f.
  • §5 evidence resolved: Exact-head J704 boot at 9377776ee95f confirms AppleJ704 and AppleJ704HPAI, microphone array signal, speakers unbound, and 0 SELinux denials (enforcing), 0 failed units, 0 new kernel errors (alongside the prior jack playback, headset detection, PipeWire/UCM, and 63/63 KUnit passes on identical trees).

Assisted-by: LLM (Gemini 4 Neon)

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Speakers will be easy to make work by the way. Same chassis as the M5 Pro 14" that I use speakers on just fine.

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