Repository navigation
drm/apple: display audio on by default, ELD names, J616s DCPEXT1 audio - #1267
Conversation
The DCPs probe before the built-in audio, so a display audio card took the first free slot and moved the speakers, the headphone jack and the microphones up by one (on the J616s macaudio went from card 1 to 2). Anything that names the built-in cards by number then picks the wrong one. Register display cards from slot 8 up. The built-in cards keep the numbers they have without display audio, whatever the probe order. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
On macOS a display that takes audio is an output as soon as it is connected, over HDMI and over DisplayPort, USB-C alt mode and docks included. Here it took appledrm.hdmi_audio=1, so nobody had it. Make hdmi_audio default to on. Every processor whose port@0 links an audio device starts its audio endpoint and registers its card; one without stays as it is. hdmi_audio=0 still turns it all off. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
DCPEXT1 drives USB-C DisplayPort on the J616s, next to DCPEXT0 (HDMI, and USB-C when DCPEXT1 is taken). Its audio interface is DPA2 on SIO channel 0x68, as macOS has it (dp-audio2, DCPAVAudioDMADelegate). With only DPA1 enabled a display on the port DCPEXT1 drives had no audio. Enable DPA2 and its power domain, as DPA1 already is. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
Userspace names a display's audio output after the display, as macOS does, from the ELD control HDMI codecs have: PipeWire and PulseAudio read the monitor name, the channel count and the speaker layout from it. The DCP audio card had none, so every display was "Apple DisplayPort" in GNOME and KDE. Add the ELD control (PCM device 0, read-only, volatile) and fill it on connect from the ELD drm builds for the connector the processor drives. The firmware may hand out an EDID rebuilt from its display metadata, with no CTA-861 audio block: a sink the firmware reports as taking audio then gets the basic audio CTA-861 requires of every sink with audio, two-channel LPCM at 32, 44.1 and 48 kHz. The control is cleared on disconnect and changes before the jack does, so the name is there when the output becomes available. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
When a display wakes up (DPMS on), the DCP reports its sink on the
audio interface instance it had and replaces that instance some 200 ms
later. PipeWire opens the PCM as soon as the jack turns on, the Open
goes to the old instance, the firmware answers it with a reply that
matches no call, and the Open times out a second later. PipeWire then
drops the output for good: on the J616s, with the Acer QG270 S3 on a
USB-C dock, every DPMS cycle left the display without an audio output
("playback open failed: Connection timed out").
Retry the Open once when the published instance changed while it ran.
The second Open goes to the new instance and is answered.
Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
With display audio on, every power-on of a display on a T6041 DCPEXT logged "unable to match compact service" for its DCPAV video interface, which endpoint 0x2b publishes cut to "dispext0:dcpav-video-interface-". The video side runs through IOMFB: take the interface with the no-op service the CEC interface already uses. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
|
Hardware receipts (lane DPA2, 11-09, silent: streams only to the display, which has no speakers; internal speakers untouched) J616s (M4 Pro), test kernel 7.3.0-aurora-dpa2a = this branch at 3241d0c (+ 44f79bc's appledrm.ko in the second run), Stage 2 trial = live image with this branch's j616s DTB (only ps_dpa2 and audio-controller-2 change). Acer QG270 S3 on a Plugable USB-C dock (DP alt, driven by DCPEXT0):
M1 Pro (j316s), same kernel, no display attached: cards 0 HPAI and 1 J316 unchanged, display cards 8 and 9 (jack off, ELD zero), protection granted, Enforcing, 0 AVC, 0 failed, kernel warning classes identical to fleet43. KUnit (44f79bc): apple-av-native-audio 30/30, apple-dcpaud-release-link 11/11, apple-dcp-external-audio-work 2/2, dcp_v14_external_audio 3/3, apple-dcpaud-no-sio skipped. apple-av-audio-lifetime crashes in qemu the same way on the untouched base (seen on #1256 too). |
…T reader (issue 42). The doc now compares against aurora-silicon/linux t6050-j714s-dpaudio.dtsi (ADMAC-fed, same SoC) and t6040-j616s-dpaudio.dtsi (SIO-fed, aurora-silicon/linux#1267) instead of claiming mainline lacks T6050 support. It concludes that K114s display audio is a port of the J714s nodes and lists the real gaps: kernel base, loader ced-ssw alias, external display bring-up. The reader now prints dma-parent (string or resolved phandle), rejects unknown arguments, handles an unparseable ADT, and has a replica test that guards against serial-number and MAC leaks. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>", "pr_body_change": "Replace the 'mainline has no T6050 dpaudio/ADMAC support, needs new kernel work, hand off to TripleU613 and the Asahi audio maintainers' wording and the 'linux #1267 unverified' wording. New text: K114s display audio is a port of the J714s dpaudio nodes in aurora-silicon/linux (t6050-j714s-dpaudio.dtsi, b8e6029323c7), and aurora-silicon/linux#1267 (J616s) was compared. The remaining work is the kernel-base check, the loader alias and external display bring-up. Keep 'Refs #42' rather than 'Closes #42': the issue stays blocked on external display bring-up and an owner-supplied monitor. If the body says 'Closes', change it to 'Refs #42'. Also correct the same claim in the issue #42 comment."
Display audio on every Mac with external outputs, as on macOS (Ryan 11-09: "external displays should show their audio over both HDMI and DP-alt").
Commits
drm/apple: keep display sound cards after the built-in ones: display cards register from slot 8 up, so speakers, headphone jack and mics keep their card numbers with display audio on (on the J616s macaudio moved from card 1 to 2).drm/apple: turn DP/HDMI audio on by default:appledrm.hdmi_audiodefaults to on. Processors without a linked audio device stay as they are;hdmi_audio=0turns it all off.arm64: dts: apple: t6040-j616s: enable DP audio on DCPEXT1: DPA2 (SIO channel 0x68, ps_dpa2), DCPEXT1's audio interface as macOS has it (dp-audio2). With it every J616s port that carries DP alt has audio, not only the ones DCPEXT0 drives.drm/apple: give display audio an ELD control: the HDMI codec ELD control (PCM device 0), filled on connect from drm's connector ELD, with CTA-861 basic audio when the firmware's rebuilt EDID has no audio block. PipeWire reads the monitor name from it (with fedora-aurora#231 / alarm-aurora#188 / nixos-aurora#192 the node is named after the display).drm/apple: retry an audio open the firmware gave to a replaced instance: after every DPMS on, the jack came up on the old audio-interface instance and PipeWire's first open timed out ("playback open failed: Connection timed out"), so WirePlumber dropped the display's output for good. One retry on the newly published instance.drm/apple: take the T6041 DCPEXT video interface on endpoint 0x2b: no "unable to match compact service" warning on every display power-on.Found on hardware (J616s, fleet42 + hdmi_audio=1, Acer QG270 S3 on a Plugable USB-C dock = DCPEXT0 over Type-C): the Acer takes audio (DCP elements: 2 ch, 48 kHz, S24); real streams play (pink noise 2 ch 48 kHz, 44.1/32 kHz requests run at 48 kHz); audio follows display power (DPMS off stops the audio service, jack off); the open-timeout bug above on every DPMS on.
Test receipts: see the comment below (J616s and M1 Pro one-shots, KUnit).
🤖 Generated with Claude Code