From: Detlev Casanova <detlev.casanova@collabora.com>
To: linux-kernel@vger.kernel.org, Quentin Schulz <quentin.schulz@cherry.de>
Cc: Algea Cao <algea.cao@rock-chips.com>,
Heiko Stuebner <heiko@sntech.de>,
Geert Uytterhoeven <geert+renesas@glider.be>,
dri-devel@lists.freedesktop.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,
Alexey Charkov <alchark@gmail.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>, FUKAUMI Naoki <naoki@radxa.com>,
linux-arm-kernel@lists.infradead.org,
Neil Armstrong <neil.armstrong@linaro.org>,
Jianfeng Liu <liujianfeng1994@gmail.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
Krzysztof Kozlowski <krzk+dt@kernel.org>
Subject: Re: [PATCH v3 2/2] arm64: dts: rockchip: Add HDMI0 audio output on rock-5b
Date: Fri, 31 Jan 2025 12:18:23 -0500 [thread overview]
Message-ID: <3668702.iIbC2pHGDl@trenzalore> (raw)
In-Reply-To: <8ad30e14-e785-4e3a-ba92-644e7fb07759@cherry.de>
Hi Quentin,
On Friday, 31 January 2025 11:38:34 EST Quentin Schulz wrote:
> Hi Detlev,
>
> On 1/30/25 5:45 PM, Detlev Casanova wrote:
> > Use the simple-audio-card driver with the hdmi0 QP node as CODEC and
> > the i2s5 device as CPU.
> >
> > The simple-audio-card,mclk-fs value is set to 128 as it is done in
> > the downstream driver.
> >
> > The #sound-dai-cells value is set to 0 in the hdmi0 node so that it can be
> > used as an audio codec node.
> >
> > Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> > ---
> >
> > arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 1 +
> > .../boot/dts/rockchip/rk3588-rock-5b.dts | 19 +++++++++++++++++++
> > 2 files changed, 20 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
> > b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi index
> > 8cfa30837ce72..790c1c25a3e41 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
> > +++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
> > @@ -1394,6 +1394,7 @@ hdmi0: hdmi@fde80000 {
> >
> > reset-names = "ref", "hdp";
> > rockchip,grf = <&sys_grf>;
> > rockchip,vo-grf = <&vo1_grf>;
> >
> > + #sound-dai-cells = <0>;
> >
> > status = "disabled";
> >
> > ports {
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts index
> > d597112f1d5b8..1909078538367 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > @@ -49,6 +49,21 @@ hdmi0_con_in: endpoint {
> >
> > };
> >
> > };
> >
> > + hdmi0-sound {
> > + compatible = "simple-audio-card";
> > + simple-audio-card,format = "i2s";
> > + simple-audio-card,mclk-fs = <128>;
> > + simple-audio-card,name = "hdmi0";
> > +
> > + simple-audio-card,codec {
> > + sound-dai = <&hdmi0>;
> > + };
> > +
> > + simple-audio-card,cpu {
> > + sound-dai = <&i2s5_8ch>;
> > + };
> > + };
> > +
>
> This is SoC specific and not board specific I believe. I2S5 is not
> usable anywhere else but with HDMI0 controller if I've read the TRM
> properly.
>
> Therefore, I would suggest to move this to rk3588-base.dtsi (with
> status=disabled; and when hdmi1-sound comes up, to rk3588-extra.dtsi),
> the same way we've done for RK3399 for example.
Indeed, I only could test on a Rock 5B, but I think it can be moved to the SoC
DTS.
> The only hesitation I have is that HDMI0 can use either I2S or SPDIF for
> audio, both audio controllers internal exclusive to HDMI0/1 controller.
> But the user could anyway define their own simple audio card for spdif
> or modify this one if they wanted to.
So some boards will use I2S and some SPDIF ? Or any board can be used with one
or the other ?
The disabled status makes sense as hdmi is disabled in the SoC tree as well.
So if a user wants to use SPDIF instead, they could keep hdmi0-sound disabled
and add their own simple-audio-card compatible node.
> I've tested with my suggested change and same changes than for Rock 5B
> DTS on RK3588 Tiger Haikou with speaker-test -c 2 -t wav, left is left,
> right is right :)
>
> I'm not giving my Tb here as the commit title is specifically about Rock
> 5B and I haven't tested this series on it. If you had a separate patch
> for the hdmi sound node and enabling it on Rock 5b, I would have given
> my Tb on the former and not the latter.
Thank you for testing anyway ! I will move the node and enable it in all board
dts that already enable hdmi0.
Detlev.
next prev parent reply other threads:[~2025-01-31 17:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-30 16:45 [PATCH v3 0/2] Add HDMI audio on the Radxa ROCK 5B Detlev Casanova
2025-01-30 16:45 ` [PATCH v3 1/2] drm/bridge: synopsys: Add audio support for dw-hdmi-qp Detlev Casanova
2025-01-30 22:01 ` Dmitry Baryshkov
2025-01-31 16:39 ` Quentin Schulz
2025-01-30 16:45 ` [PATCH v3 2/2] arm64: dts: rockchip: Add HDMI0 audio output on rock-5b Detlev Casanova
2025-01-31 16:38 ` Quentin Schulz
2025-01-31 17:18 ` Detlev Casanova [this message]
2025-02-03 9:29 ` Quentin Schulz
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=3668702.iIbC2pHGDl@trenzalore \
--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=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=liujianfeng1994@gmail.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=naoki@radxa.com \
--cc=neil.armstrong@linaro.org \
--cc=quentin.schulz@cherry.de \
--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 \
/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