linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Detlev Casanova <detlev.casanova@collabora.com>
To: Piotr Oniszczuk <piotr.oniszczuk@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Algea Cao <algea.cao@rock-chips.com>,
	Heiko Stuebner <heiko@sntech.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	dri-devel@lists.freedesktop.org,
	Niklas Cassel <cassel@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	kernel@collabora.com, David Airlie <airlied@gmail.com>,
	Dragan Simic <dsimic@manjaro.org>,
	Simona Vetter <simona@ffwll.ch>, Rob Herring <robh@kernel.org>,
	Robert Foss <rfoss@kernel.org>,
	Sebastian Reichel <sebastian.reichel@collabora.com>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Sugar Zhang <sugar.zhang@rock-chips.com>,
	linux-rockchip@lists.infradead.org, Chen-Yu Tsai <wens@csie.org>,
	FUKAUMI Naoki <naoki@radxa.com>,
	devicetree@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>,
	Jonas Karlman <jonas@kwiboo.se>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Johan Jonker <jbx6244@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Alexey Charkov <alchark@gmail.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>
Subject: Re: [PATCH v7 0/3] Add HDMI audio on the rk3588 SoC
Date: Thu, 20 Feb 2025 12:03:09 -0500	[thread overview]
Message-ID: <2357838.ElGaqSPkdT@earth> (raw)
In-Reply-To: <B8EF5196-55FB-44EC-B93C-E327C791225B@gmail.com>

Hi Piotr,

On Thursday, 20 February 2025 06:16:20 EST Piotr Oniszczuk wrote:
> > Wiadomość napisana przez Detlev Casanova <detlev.casanova@collabora.com> w
> > dniu 17 lut 2025, o godz. 22:47:
> > 
> > To support HDMI audio on the rk3588 based devices, the generic HDMI
> > Codec framework is used in the dw-hdmi-qp DRM bridge driver.
> > 
> > The implementation is mainly based on the downstream driver, ported to the
> > generic HDMI Codec framework [1] recently merged in the master branch.
> > The parameters computation has been kept as is and the data stored in the
> > dw_hdmi_qp struct as been cleaned up.
> > 
> > The table for the N values has been edited to reflect N recommended values
> > as well as CTS recommended values.
> > 
> > The downstream kernel also implements a machine driver for HDMI audio but
> > it is doing exactly what the simple-audio-card driver does, so use that
> > instead in the RK3588 SoC device tree.
> > 
> > This adds HDMI audio support for both HDMI TX ports.
> > 
> > *** Dependencies ***
> > 
> > Based on Linus' master branch, but also needs Cristian's dts patches for
> > HDMI1 support [2], which depends on Heiko's patchset for
> > phy-rockchip-samsung-hdptx [3]. Patches will apply without [3], but HDMI
> > will not work (at all).
> > 
> > [1]:
> > https://lore.kernel.org/all/20241224-drm-bridge-hdmi-connector-v10-0-dc89
> > 577cd438@linaro.org [2]:
> > https://lore.kernel.org/linux-rockchip/20241211-rk3588-hdmi1-v2-0-02cdca2
> > 2ff68@collabora.com [3]:
> > https://lore.kernel.org/lkml/20241206103401.1780416-3-heiko@sntech.de/
> > 
> > Changes since v6:
> > - Fix arguments alignement (checkpatch --strict warnings)
> > - Add hdmi1 audio support too
> > - Move hdmi0_sound node under hdmi0_out_con
> > 
> > Changes since v5:
> > - Simplify audio math computation for N
> > - Move hdmi0-sound node up with other address-less nodes
> > 
> > Changes since v4:
> > - Moved hdmi0_audio node the rk3588-base.dtsi
> > - Enable hdmi0_audio in rk3588-rock-5b.dts
> > 
> > Changes since v3:
> > - Renamed function to start with dw_hdmi_qp
> > 
> > Changes since v2:
> > - Also clear the audio infoframe
> > - Write AUDI_CONTENTS0 to its default value in case it gets overwritten.
> > - Store tmds_char_rate in the dw_hdmi_qp struct in atomic_enable
> > - Clear tmds_char_rate in atomic_disable and only write registers when
> > 
> >   tmds_char_rate is not 0.
> > 
> > - Do not use connector_state duplicates
> > 
> > Changes since v1:
> > - Remove useless audio_mutex (was used downstream for multiple drivers
> > access> 
> >   to audio functions)
> > 
> > - Let hdmi_codec build and setup audio infoframes
> > - Only access audio registers when connector is connected
> > - Rebased on master branch
> > 
> > Detlev Casanova (2):
> >  arm64: dts: rockchip: Add HDMI audio outputs for rk3588 SoC
> >  arm64: dts: rockchip: Enable HDMI audio outputs for Rock 5B
> > 
> > Sugar Zhang (1):
> >  drm/bridge: synopsys: Add audio support for dw-hdmi-qp
> > 
> > arch/arm64/boot/dts/rockchip/rk3588-base.dtsi |  17 +
> > .../arm64/boot/dts/rockchip/rk3588-extra.dtsi |  17 +
> > .../boot/dts/rockchip/rk3588-rock-5b.dts      |  16 +
> > drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c  | 489 ++++++++++++++++++
> > 4 files changed, 539 insertions(+)
> 
> Detelv,
> 
> Just curious of your opinion:
> 
> I’m on 6.14-rc3 and using
> https://gitlab.collabora.com/cristicc/linux-next/-/commits/rk3588-hdmi-brid
> ge + this v7 series.

Do you have the branch available somewhere ?

> On mine rock5b all works nicely but - at boot time - i’m getting some oops
> in kernel like this:
> https://gist.github.com/warpme/e1668acbef7817e5d2a88a6840328722

I did notice that at one point but it disappeard after a rebase on the the 
latest master so I didn't look further into that.
Could it be related to 2518a0e1b878042f9afa45ae063e544a16efc1a3 "ASoC: simple-
card: use __free(device_node) for device node" ?

I'm not exactly sure how __free(device_node) works though, but reverting that 
commit could fix the issue.

> I’m not sure where issue is but it looks to me like kind of interference
> between analog audio and hdmi audio as commenting analog audio in dts (
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/
> arm64/boot/dts/rockchip/rk3588-rock-5b.dts?h=v6.14-rc3#n24 ) stops kernel
> from oops’ing….

I cannot reproduce anymore, so if you have a branch/config that you use, I 
could try, looking into that.
I don't see any relevant commits that would change this behavior on master 
since v6.14-rc3, so I'm not sure what is going on.

>  rock5b dts i’m using is like this:
> https://gist.github.com/warpme/a8a32afd4a05d4b7f25d2808984b05ac

Regards,
Detlev.




  reply	other threads:[~2025-02-20 17:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-17 21:47 [PATCH v7 0/3] Add HDMI audio on the rk3588 SoC Detlev Casanova
2025-02-17 21:47 ` [PATCH v7 1/3] drm/bridge: synopsys: Add audio support for dw-hdmi-qp Detlev Casanova
2025-02-17 21:47 ` [PATCH v7 2/3] arm64: dts: rockchip: Add HDMI audio outputs for rk3588 SoC Detlev Casanova
2025-02-17 21:47 ` [PATCH v7 3/3] arm64: dts: rockchip: Enable HDMI audio outputs for Rock 5B Detlev Casanova
2025-02-20 11:16 ` [PATCH v7 0/3] Add HDMI audio on the rk3588 SoC Piotr Oniszczuk
2025-02-20 17:03   ` Detlev Casanova [this message]
2025-02-20 18:31     ` Piotr Oniszczuk
2025-02-21 11:42       ` Piotr Oniszczuk
2025-02-21 14:43         ` Detlev Casanova
2025-02-25  1:03           ` Kuninori Morimoto
2025-02-25  6:16             ` Kuninori Morimoto
2025-02-25 14:58               ` Detlev Casanova
2025-02-26  1:14                 ` Kuninori Morimoto
2025-03-01  9:11                 ` Piotr Oniszczuk
2025-03-01 18:27                   ` Heiko Stübner
2025-02-27 10:55 ` (subset) " Heiko Stuebner
2025-02-27 13:37 ` Heiko Stuebner

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=2357838.ElGaqSPkdT@earth \
    --to=detlev.casanova@collabora.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=alchark@gmail.com \
    --cc=algea.cao@rock-chips.com \
    --cc=andrzej.hajda@intel.com \
    --cc=cassel@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=dsimic@manjaro.org \
    --cc=geert+renesas@glider.be \
    --cc=heiko@sntech.de \
    --cc=jbx6244@gmail.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel@collabora.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=naoki@radxa.com \
    --cc=neil.armstrong@linaro.org \
    --cc=piotr.oniszczuk@gmail.com \
    --cc=rfoss@kernel.org \
    --cc=robh@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=simona@ffwll.ch \
    --cc=sugar.zhang@rock-chips.com \
    --cc=tzimmermann@suse.de \
    --cc=wens@csie.org \
    /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;
as well as URLs for NNTP newsgroup(s).