Skip to content

drm/vc4: hdmi: Allow audio PCM open/prepare without a connected sink#7495

Open
zjzhao-eda wants to merge 1 commit into
raspberrypi:rpi-6.18.yfrom
edatec:vc4-hdmi-audio-headless
Open

drm/vc4: hdmi: Allow audio PCM open/prepare without a connected sink#7495
zjzhao-eda wants to merge 1 commit into
raspberrypi:rpi-6.18.yfrom
edatec:vc4-hdmi-audio-headless

Conversation

@zjzhao-eda

Copy link
Copy Markdown
Contributor

Remove the early error return from vc4_hdmi_audio_startup() and vc4_hdmi_audio_prepare() when no HDMI sink is connected, allowing userspace to probe the ALSA card profile on headless systems.

In vc4_hdmi_audio_shutdown(), add a guard to skip hardware register access when streaming was never started (e.g. PCM opened only for profile probing), since the HDMI block may be runtime suspended.

Hardware is only touched when a sink is actually connected and streaming begins, ensuring no regression for normal use.

Remove the early error return from vc4_hdmi_audio_startup() and
vc4_hdmi_audio_prepare() when no HDMI sink is connected,
allowing userspace to probe the ALSA card profile on headless
systems.

In vc4_hdmi_audio_shutdown(), add a guard to skip hardware
register access when streaming was never started (e.g. PCM
opened only for profile probing), since the HDMI block may be
runtime suspended.

Hardware is only touched when a sink is actually connected and
streaming begins, ensuring no regression for normal use.

Signed-off-by: zjzhao <zjzhao@edatec.cn>
@6by9

6by9 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

This PR feels like it's only providing half the story.

Audio is only supported by HDMI sinks, not by DVI. How can you know that the sink device is an HDMI device if it isn't connected?

The EDID also provides the information on what audio formats/sample depth/sample rates/channel combinations are supported, so again without the display connected to give you that information, you can potentially be trying to use audio in an unsupported format.

HDMI also inserts the audio packets into the video blanking periods, so video must be running for audio to work. The device therefore can't be headless.

Gut feel is that this is better solved using vc4.force_hotplug to denote that the connector is connected, and providing the relevant EDID via /lib/firmware and drm.edid_firmware=edid.bin

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.

2 participants