drm/vc4: hdmi: Allow audio PCM open/prepare without a connected sink#7495
drm/vc4: hdmi: Allow audio PCM open/prepare without a connected sink#7495zjzhao-eda wants to merge 1 commit into
Conversation
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>
|
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 |
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.