Skip to content

ASoC: apple: macaudio: no PCM for the J616s route-only front-ends - #591

Merged
RyanTheTide merged 1 commit into
aurora-wipfrom
fix/j616s-route-only-fes
Oct 30, 2026
Merged

RyanTheTide merged 1 commit into
aurora-wipfrom
fix/j616s-route-only-fes

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Every J616s boot logs this once the user session starts:

Primary: ASoC: no backend DAIs enabled for Primary, possibly missing ALSA mixer-based routing or UCM profile

The UCM profile is there and correct (alsa-ucm-conf-asahi macaudio/MacBook Pro J616.conf, HiFi sets Speaker Playback Mux to Secondary). The line comes from hw:AppleJ616,0. On the speaker card the Primary front-end (j616-pcm-0) is only there so the fixed mux routes resolve. The AOP component has no stream for it and the card has no headphone codec, since the jack is its own card. The jack card has the same kind of placeholder in j616-jack-pcm-1. When the PipeWire pro-audio profile probes every PCM of the card, opening pcm0 finds no back-end and soc-pcm prints the line above. No setting can make that PCM work.

This leaves those two front-end links unbound (link->ignore), using a new route_only_fes mask in the machine data. The DAI widgets stay, because a component creates widgets for all its DAIs, so the mux controls and routes don't change and UCM works as before. The AOP component now sets use_dai_pcm_id, so the PCM device number stays the link number: speakers stay hw:AppleJ616,1 and speaker sense hw:AppleJ616,2, which UCM, asahi-audio, speakersafetyd and speakerguardd open by number. Back-end internal PCMs move to 16 and up.

Nothing here touches speaker protection, volume limits or the speaker admission path.

Needs audio review before merge.

Testing so far

  • Builds in the J616s fleet9 config together with the gamma diagnostic (kernel 7.3.0-aurora-fleet9g). The sound files are identical between that base and aurora-wip.
  • Not booted yet. Checks for the J616s boot: /proc/asound/AppleJ616 has pcm1p and pcm2c and no pcm0p, /proc/asound/AppleJack has pcm0p/pcm0c and no pcm1p, journalctl -b -k | grep 'backend DAIs' is empty after login, speakerguardd and speakersafetyd attach to the same devices, and the HiFi profile and the j616 speaker filter come up in WirePlumber. Muted, no playback.

🤖 Generated with Claude Code

The J616s speaker card has no headphone codec (the jack is a card of
its own), and the jack card has no second output. Their CPU DAIs
j616-pcm-0 and j616-jack-pcm-1 exist only so the fixed Speaker and
Headphone mux routes resolve; the AOP component has no stream for
them. The cards still create PCM devices for them, hw:AppleJ616,0 and
hw:AppleJack,1. When the PipeWire pro-audio profile probes every PCM
of the speaker card at session start, opening hw:AppleJ616,0 finds no
back-end and logs at boot

  Primary: ASoC: no backend DAIs enabled for Primary, possibly missing
  ALSA mixer-based routing or UCM profile

even though UCM routes the speakers through Secondary as it should.

Mark those front-ends in the machine data and leave their links
unbound. The DAI widgets still exist, since a component creates them
for all its DAIs, so the mux routes and controls do not change and
UCM sets "Speaker Playback Mux" to Secondary as before. The AOP
component uses the link number as the PCM device number, so the
speakers stay hw:AppleJ616,1 and the speaker sense hw:AppleJ616,2,
which UCM, asahi-audio and the speaker protection daemons open by
number. Back-end internal PCMs move above the front-ends.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

J616s boot test, one-shot 7.3.0-aurora-fleet9h (fleet9 695d974 + this PR + #614 + the gamma debug commit, src e2ce1e6e).

  • No no backend DAIs enabled for Primary line in the journal (fleet9 and fleet10 both log it once per boot).
  • /proc/asound/AppleJ616/ lists only pcm1p (Secondary, playback) and pcm2c (Speaker Sense, capture), so the speakers stay hw:AppleJ616,1 and the sense stays hw:AppleJ616,2.
  • speakerguardd active with 0 restarts. It opened the speakers with sense capture running at 48 kHz and closed them again as on fleet9. The sinks stayed muted and nothing was played.
  • p3 for the boot is down to 3 lines (power-controller@490 twice, brcmf assoc info), WARN/BUG/Oops 0.

Pass from the J616s side. Full dmesg: reports/j616s-night-20261030/fleet9h-dmesg.txt.

🤖 Generated with Claude Code

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Audio review: the change is confined to the J616s. route_only_fes is set only in the two J616s configs, and aop_spkr.rs only registers the t6040 AOP speaker and jack components, so no other machine's PCM numbering moves. use_dai_pcm_id keys the PCM number on the link id that macaudio already indexes its link props by, and the fleet9h boot confirms hw:AppleJ616,1 and ,2 are unchanged with speakerguardd attached and nothing played. No speaker protection path is touched. Tested with no regression, merging.

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

1 participant