mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Igor Paunovic <royalnet026@gmail.com>
To: Detlev Casanova <detlev.casanova@collabora.com>
Cc: Igor Paunovic <royalnet026@gmail.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Sebastian Reichel <sebastian.reichel@collabora.com>,
	Maud Spierings <maud_spierings@hotmail.com>,
	Diederik de Haas <diederik@cknow-tech.com>,
	Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
	Frank Zhang <rmxpzlb@gmail.com>,
	kernel@collabora.com, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/bridge: dw-hdmi-qp: Return -EOPNOTSUPP in HDMI audio functions
Date: Mon,  7 Sep 2026 15:01:30 +0200	[thread overview]
Message-ID: <20260907153000.hdmiqp-audio-2-royalnet026@gmail.com> (raw)
In-Reply-To: <20260519-fix-hdmi-audio-warnings-v1-1-9608966c993f@collabora.com>

Hi Detlev,

One more data point for this one, from an Orange Pi 5 Plus (RK3588).

Without the patch, every prepare on an HDMI PCM whose output is not lit
(tmds_char_rate == 0: early in boot before the compositor enables the
output, or with the output disabled in the compositor) logs

  hdmi-audio-codec hdmi-audio-codec.N.auto: ASoC error (-19): at snd_soc_dai_prepare() on i2s-hifi

On two boots here with the link perfectly fine that was 115 and 114 lines,
in two bursts each (60 and 55 prepares ~1 ms apart at 15.7 s and 28.1 s
after boot on one, 60 and 54 at 14.8 s and 22.0 s on the other) - as far
as I can tell PipeWire probing the cards from the greeter session before
the compositor had lit the outputs. On the boot just before those two,
where the sink had also failed SCDC, there were four of them and then the
SError described in [2].

Disabling one output in the compositor and opening its PCM reproduces
it on demand: exactly one line per prepare - and, on the close that
follows, the abort in clear_audio_infoframe() described in [2].

With the patch applied (rebuilt dw_hdmi_qp module, same kernel), opening
the PCM of an output disabled in the compositor now fails right away in
hdmi_codec_startup() with EOPNOTSUPP - nothing from ASoC or the bridge
in the kernel log, aplay says "Operation not supported" - and audio on
the output that has a link works as before.

Tested-by: Igor Paunovic <royalnet026@gmail.com> # Orange Pi 5 Plus

One more reason I think this and Frank Zhang's patch [1] belong together:
since the startup now fails, ASoC never marks the DAI as started, so for
a PCM opened on a dead link the close never reaches hdmi_codec_shutdown()
-> dw_hdmi_qp_audio_disable() -> clear_audio_infoframe(). That is the
same class of bug as the SError we hit here on 02.09 (PCM closed after a
failed prepare, register access with the PHY down -> SError, panic; full
trace in [2]). I can't be certain this patch alone would have prevented
that particular crash - a PCM that is already open when the output goes
down still walks that path, which is what Frank's guard is for - so both
still look needed to me. (I saw Cristian's question on v4 about
open-coding the clear; either shape works for the crash I hit.)

[1] https://lore.kernel.org/all/20260512103153.8861-1-rmxpzlb@gmail.com/
[2] https://lore.kernel.org/all/20260907153000.hdmiqp-audio-1-royalnet026@gmail.com/

Thanks,
Igor

  parent reply	other threads:[~2026-09-07 13:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 18:00 Detlev Casanova
2026-06-01 11:17 ` Sebastian Reichel
2026-07-06  8:24 ` Maud Spierings
2026-08-06 13:25 ` Detlev Casanova
2026-08-08 11:28 ` Diederik de Haas
2026-09-06 14:39 ` Maud Spierings
2026-09-07 13:01 ` Igor Paunovic [this message]
2026-09-14 17:07   ` Detlev Casanova

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260907153000.hdmiqp-audio-2-royalnet026@gmail.com \
    --to=royalnet026@gmail.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=cristian.ciocaltea@collabora.com \
    --cc=detlev.casanova@collabora.com \
    --cc=diederik@cknow-tech.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maud_spierings@hotmail.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=rmxpzlb@gmail.com \
    --cc=sebastian.reichel@collabora.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®