aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Wahren <stefan.wahren@i2se.com>2020-12-29 16:36:50 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2021-09-09 10:07:17 +0200
commitb00c8a030602dd12a092ff75121fd101fcd20370 (patch)
tree607df09d2a1419ed7758daf9ac070c2e13682e50
parentd21a908c05190aaaf0443446c41e15acc48d4af2 (diff)
drm/vc4: hdmi: Avoid ASoC error messages on startup
During startup of Raspberry Pi 4 there seems to be a race between VC4 probing and Pulseaudio trying to open its PCM device: ASoC: error at snd_soc_dai_startup on fef05700.hdmi: -19 Avoid these errors by returning EPROBE_DEFER in this situation. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
-rw-r--r--drivers/gpu/drm/vc4/vc4_hdmi.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index c2876731ee2d..25792d2dd1ec 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -1237,12 +1237,14 @@ static int vc4_hdmi_audio_startup(struct snd_pcm_substream *substream,
vc4_hdmi->audio.substream = substream;
+ if (!encoder->crtc)
+ return -EPROBE_DEFER;
+
/*
- * If the HDMI encoder hasn't probed, or the encoder is
- * currently in DVI mode, treat the codec dai as missing.
+ * If the HDMI encoder is currently in DVI mode,
+ * treat the codec dai as missing.
*/
- if (!encoder->crtc || !(HDMI_READ(HDMI_RAM_PACKET_CONFIG) &
- VC4_HDMI_RAM_PACKET_ENABLE))
+ if (!(HDMI_READ(HDMI_RAM_PACKET_CONFIG) & VC4_HDMI_RAM_PACKET_ENABLE))
return -ENODEV;
ret = snd_pcm_hw_constraint_eld(substream->runtime, connector->eld);

Privacy Policy