Repository navigation
drm/apple: clean display power-on for DP audio (refused Open, reopen, ELD refresh) - #1277
Merged
Merged
Conversation
A desktop 26.x DCP refuses a service call by answering with the call's descriptor alone: the request's status, and an IOReturn where the length goes. The reply matcher wanted the call header back for every service call, so a refusal matched nothing: it logged "AFK[ep:2b]: unexpected compact reply c0" and the call waited out its full timeout. On the J616s this happens every time an external display powers on. The display audio sink is reported on the audio interface instance the DCP had, PipeWire opens it within some 25 ms, and that instance, which the firmware replaces about 160 ms later, refuses the Open with kIOReturnOffline (0xe00002d7). Captured on the J616s with the Acer QG270 S3 on a USB-C dock, three DPMS cycles: each Open (group 0, method 4, status tag 0xc00) was answered at once with the 8-byte descriptor 00 0c 00 00 d7 02 00 e0. Match a bare descriptor by its status alone and complete the call with the refusal: -ENODEV for an interface that is offline, not ready or not there, -EREMOTEIO for anything else, at debug level. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
…ed one An Open that the dying audio interface refuses (kIOReturnOffline) now fails at once instead of after its 1 s timeout. The retry looked for the replacement instance right away, but the firmware publishes it some 160 ms later, so the Open would have failed and PipeWire would have dropped the output. On -ENODEV, wait up to 1 s for the next instance to be published, then open that one. After a display wakes up, its audio output is back about 200 ms after the jack turns on instead of a second later. KUnit: apple-av-native-audio gains a refused Open with a successor (reopened on the successor) and without one (fails after the wait). Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
The firmware reports a newly attached sink before the DCP has read its EDID, and reports it again once the mode is set. The card took the ELD only from the first report, so a display plugged in after boot, or one moved to another display processor, kept an ELD with no monitor name and the basic-audio fallback: on the J616s, the Acer QG270 S3 moved to DCPEXT1 showed up as an unnamed HDMI sink while the same display on DCPEXT0 had its name. When a connected sink is reported again with a different ELD, store it and notify the ELD control, as HDMI codecs do when the ELD changes. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
Contributor
Author
|
KUnit (arm64 qemu, buildbox, head 11319ea): apple-av-native-audio 34/34 passed, including the 4 new refused-Open cases. AFK suites (apple-afk-ring, apple-afk-service-lifetime, and the rest matching afk) 16/16 passed. Hardware receipts are in the PR description. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1267 (display audio on by default). Fixes the one kernel warning that came with every external display power-on, and a missing monitor name on a freshly plugged display.
The warning
apple-dcp ...: AFK[ep:2b]: unexpected compact reply c0 on interface N, once per DPMS on, on the J616s with an external display.Cause, from a probe kernel that logged every compact message on endpoint 0x2b (J616s, Acer QG270 S3 on a USB-C dock, three DPMS cycles):
00 0c 00 00 d7 02 00 e0. That is the request's status (0xc00), with IOReturn 0xe00002d7 (kIOReturnOffline) where the length goes, and no call header.Commits
Testing (J616s, silent: streams only into the Acer, which has no speakers)
Test kernel: integration 8c4b5c5 plus these commits, as a one-shot entry with an aura-try Stage 2 trial (#1267 DTB, DPA2 enabled). Bootguard and trial guard were on.
appledrm.typec_hybrid_first=0set at runtime, rebinding the dock port's Type-C controller moves the display to DCPEXT1. Card 9 (DPA2, SIO channel 0x68) turns its jack on and the sinkalsa_output.platform-audio-controller-2.HiFi__HDMI1__sinkappears; streams at all three rates work. Without the third commit, card 9's ELD had no monitor name and reported an HDMI connection. With it, the ELD is version 2, 'QG270 S3', DP.This does not touch sound/soc/apple, mca, macaudio or the speaker DT nodes, so the user-path speaker gate does not apply.
🤖 Generated with Claude Code