Repository navigation
[Joshua's agent] soc: apple: aop: Start AFK endpoints 0x2f and 0x30 - #1850
joshuaswarren wants to merge 1 commit into
Conversation
The AFK endpoint table covered 0x20 to 0x2e. The T6050 firmware also lists 0x2f and 0x30 in its endpoint map. With those two not started, the firmware stalled after its early boot lines: it logged one notice about endpoint 0x2f in a loop, sent hellos on five endpoints only and never printed its ready line. The sound cards did not register. Raise AFK_ENDPOINT_COUNT to 0x11. Endpoints the firmware does not advertise are still skipped by has_endpoint(). Tested on a MacBook Pro 14-inch (M5 Max, k114c): with 0x2f and 0x30 started the firmware prints its ready line, all 16 endpoints complete the AFK handshake and two ALSA cards register. That run used a debug build with a different start order; this exact patch is not yet run on hardware. The unit tests check the default start order and the index helper. They fail with the old count and pass with the new one (run in a host harness; the kunit run is not done). Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
|
[Joshua's agent] w7H: Hardware result for this patch's change. A kernel with AFK_ENDPOINT_COUNT set to 0x11 (the same one-line change) ran on the MacBook Pro 14-inch (M5 Max, k114c). The AOP module loaded once. The firmware reached its ready state, both ALSA cards registered (AOP audio capture and macaudio), and a 440 Hz tone played through the speaker PCM. The tone was heard at the machine. Amp fault status read zero on all six amps after each tone. Speaker volumes stay at the lock ceiling until a speaker protection daemon unlocks them. That part is separate from this change and is why the first tones at low gain were silent. Still open: the kunit run of apple_aop (host-side harness only so far), other chips (T6040, T8142), and jack and microphone tests. Marking this ready for review. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Thanks @joshuaswarren, and thanks for tracking down the T6050 stall. This is the same one-line change as #1645 (@sithglan, opened earlier, on behalf of Jens). That PR has hardware runs on K116s, M1 Pro, M2 and M4 Pro. It's approved and merges once CI on its updated branch is green, so this PR is superseded. Credit to both of you: your M5 Max report showed that the T6050 firmware needs 0x2f and 0x30 too. For the record, Could you close this one? The KUnit tests would make a welcome follow-up PR. Today no CI job builds |
|
[Joshua's agent] Closing as superseded by #1645, thanks. We'll send the KUnit tests as a separate follow-up PR, with a CI job that builds aop. |
The AFK endpoint table covers 0x20 to 0x2e. The T6050 firmware lists 0x2f and 0x30 in its endpoint map as well.
Without those two endpoints started, the AOP firmware on the MacBook Pro 14-inch (M5 Max, k114c) stalls after its early boot lines. We read its log from the host OSLog buffer (the pages rtkit allocates, read through /proc/kcore). The log shows one notice about endpoint 0x2f, repeated about 170 times. Only five endpoints send hellos. The firmware never prints its ready line and no sound card registers ("No soundcards found").
With 0x2f and 0x30 started and initialised, the repeat stops. The firmware prints its ready line, all 16 endpoints finish the AFK handshake, and two ALSA cards register (the AOP audio capture card and the macaudio card).
The change raises
AFK_ENDPOINT_COUNTfrom 0xf to 0x11.has_endpoint()still skips endpoints a chip does not advertise. Two unit tests check the default start order andafk_endpoint_index().Tested:
Not tested:
required_endpoints, a failed start of 0x2f or 0x30 now fails probe. Chips that do not advertise those endpoints are unaffected. A review from someone with T6040 or T8142 hardware would help.