On Wed, Sep 10, 2025 at 01:05:47PM +0200, Maxime Ripard wrote:
> On Tue, Sep 09, 2025 at 05:52:08PM +0300, Dmitry Baryshkov wrote:
> > Sending Audio InfoFrames is mandatory for getting audio to work over the
> > HDMI link. Warn if the driver requests HDMI audio support for the HDMI
> > connector, but there is no support for Audio InfoFrames.
> >
> > Suggested-by: Maxime Ripard <mripard@kernel.org>
> > Acked-by: Daniel Stone <daniels@collabora.com>
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> > drivers/gpu/drm/display/drm_hdmi_audio_helper.c | 12 ++++++++++++
> > 1 file changed, 12 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/display/drm_hdmi_audio_helper.c b/drivers/gpu/drm/display/drm_hdmi_audio_helper.c
> > index 7d78b02c144621de528b40b1425f25e465edd1ae..35e0e79cb683a68af813344aa86c154c3a5531fe 100644
> > --- a/drivers/gpu/drm/display/drm_hdmi_audio_helper.c
> > +++ b/drivers/gpu/drm/display/drm_hdmi_audio_helper.c
> > @@ -10,6 +10,7 @@
> >
> > #include <drm/drm_connector.h>
> > #include <drm/drm_device.h>
> > +#include <drm/drm_print.h>
> > #include <drm/display/drm_hdmi_audio_helper.h>
> >
> > #include <sound/hdmi-codec.h>
> > @@ -178,6 +179,17 @@ int drm_connector_hdmi_audio_init(struct drm_connector *connector,
> > !funcs->shutdown)
> > return -EINVAL;
> >
> > + if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
> > + connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) {
> > + unsigned long supported_infoframes =
> > + connector->hdmi.supported_infoframes;
> > +
> > + if (supported_infoframes &&
> > + !(supported_infoframes & DRM_CONNECTOR_INFOFRAME_AUDIO))
> > + drm_warn(connector->dev, "HDMI Audio with no support for Audio InfoFrames\n");
> > + }
> > +
> > +
>
> That's not what I suggested. What I suggested was that we tould check
> the return code of write_infoframe, and warn if it is set by the
> framework, but returns EOPNOTSUPP.
I see, I misunderstood you then. I will respond to the comment at patch
1.
--
With best wishes
Dmitry