imx.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Shengjiu Wang <shengjiu.wang@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Shengjiu Wang <shengjiu.wang@nxp.com>,
	andrzej.hajda@intel.com,  neil.armstrong@linaro.org,
	rfoss@kernel.org,  Laurent.pinchart@ideasonboard.com,
	jonas@kwiboo.se, jernej.skrabec@gmail.com,
	 maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	tzimmermann@suse.de,  airlied@gmail.com, simona@ffwll.ch,
	lumag@kernel.org, dianders@chromium.org,
	 cristian.ciocaltea@collabora.com, luca.ceresoli@bootlin.com,
	 dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	 victor.liu@nxp.com, shawnguo@kernel.org, s.hauer@pengutronix.de,
	 kernel@pengutronix.de, festevam@gmail.com, imx@lists.linux.dev,
	 linux-arm-kernel@lists.infradead.org, robh@kernel.org,
	krzk+dt@kernel.org,  conor+dt@kernel.org, p.zabel@pengutronix.de,
	devicetree@vger.kernel.org,  l.stach@pengutronix.de,
	perex@perex.cz, tiwai@suse.com,  linux-sound@vger.kernel.org
Subject: Re: [PATCH v2 1/6] dt-bindings: display: imx: add HDMI PAI for i.MX8MP
Date: Thu, 24 Jul 2025 18:10:10 +0800	[thread overview]
Message-ID: <CAA+D8ANV74k1=_m7HfCO2n7nCU7mH=QMrd0CS5eMqGqDHn9HEw@mail.gmail.com> (raw)
In-Reply-To: <20250724-straight-lorikeet-of-novelty-9124f8@kuoka>

On Thu, Jul 24, 2025 at 4:52 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Thu, Jul 24, 2025 at 03:22:43PM +0800, Shengjiu Wang wrote:
> > Add binding for the i.MX8MP HDMI parallel Audio interface block.
> >
> > In fsl,imx8mp-hdmi-tx.yaml, add port@2 that linked to pai_to_hdmi_tx.
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> >  .../display/bridge/fsl,imx8mp-hdmi-tx.yaml    | 12 ++++
> >  .../display/imx/fsl,imx8mp-hdmi-pai.yaml      | 69 +++++++++++++++++++
> >  2 files changed, 81 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8mp-hdmi-pai.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/display/bridge/fsl,imx8mp-hdmi-tx.yaml b/Documentation/devicetree/bindings/display/bridge/fsl,imx8mp-hdmi-tx.yaml
> > index 05442d437755..6211ab8bbb0e 100644
> > --- a/Documentation/devicetree/bindings/display/bridge/fsl,imx8mp-hdmi-tx.yaml
> > +++ b/Documentation/devicetree/bindings/display/bridge/fsl,imx8mp-hdmi-tx.yaml
> > @@ -49,6 +49,10 @@ properties:
> >          $ref: /schemas/graph.yaml#/properties/port
> >          description: HDMI output port
> >
> > +      port@2:
> > +        $ref: /schemas/graph.yaml#/properties/port
> > +        description: Parallel audio input port
>
> Which data path this represents? Feels like you are duplicating ASoC
> dai-links/cells...

Here it means from HDMI PAI to HDMI TX controller. not the ASoC dai link.

On i.MX8MP, for HDMI audio, it is separated into several hardware modules:
1. Aud2HTX
   driver:  sound/soc/fsl/fsl_aud2htx.c
2. HDMI PAI
   driver:  this patch set
3. HDMI TX controller audio part
    driver: drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c

Aud2HTX is in the Audio subsystem,  HDMI PAI and HDMI TX are in the
HDMI subsystem. The full data path is
Aud2htx -> HDMI PAI -> HDMI TX controller.

>
>
> > +
> >      required:
> >        - port@0
> >        - port@1
> > @@ -98,5 +102,13 @@ examples:
> >                      remote-endpoint = <&hdmi0_con>;
> >                  };
> >              };
> > +
> > +            port@2 {
> > +                reg = <2>;
> > +
> > +                endpoint {
> > +                    remote-endpoint = <&pai_to_hdmi_tx>;
> > +                };
> > +            };
> >          };
> >      };
> > diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8mp-hdmi-pai.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8mp-hdmi-pai.yaml
> > new file mode 100644
> > index 000000000000..4f99682a308d
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8mp-hdmi-pai.yaml
> > @@ -0,0 +1,69 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/display/imx/fsl,imx8mp-hdmi-pai.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Freescale i.MX8MP HDMI Parallel Audio Interface
> > +
> > +maintainers:
> > +  - Shengjiu Wang <shengjiu.wang@nxp.com>
> > +
> > +description:
> > +  The HDMI TX Parallel Audio Interface (HTX_PAI) is a bridge between the
> > +  Audio Subsystem to the HDMI TX Controller.
>
> What is Audio Subsystem? Like Linux Audio or some name matching actual
> hardware?

Audio subsystem is the name for hardware.

>
>
> > +
> > +properties:
> > +  compatible:
> > +    const: fsl,imx8mp-hdmi-pai
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    maxItems: 1
> > +
> > +  clock-names:
> > +    const: apb
> > +
> > +  power-domains:
> > +    maxItems: 1
> > +
> > +  port:
> > +    $ref: /schemas/graph.yaml#/properties/port
> > +    description: Output to the HDMI TX controller.
>
> And how do you plug it into sound card? Where are any DAI links?

The hardware data path is Aud2htx -> HDMI PAI -> HDMI TX controller.

From a software point of view. the path is
Aud2htx -> hdmi_codec  (ALSA sound card)
hdmi_codec -> dw-hdmi-gp-audio -> hdmi_pai

hdmi_codec is registered by dw-hdmi-gp-audio.c,  hdmi_codec will call
the function in dw-hdmi-gp-audio.c, dw-hdmi-gp-audio.c will call the
function in hdmi pai driver.

Aud2htx is cpu dai in ALSA
hdmi-codec.c is the codec dai in ALSA
Above is the dai link for ALSA, they already exist in the kernel.

The HDMI PAI is the bridge, which is covered by this patch set.

Best regards
Shengjiu Wang
>
> Best regards,
> Krzysztof
>

  reply	other threads:[~2025-07-24 10:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-24  7:22 [PATCH v2 0/6] drm/bridge: imx: Add HDMI PAI driver on i.MX8MP Shengjiu Wang
2025-07-24  7:22 ` [PATCH v2 1/6] dt-bindings: display: imx: add HDMI PAI for i.MX8MP Shengjiu Wang
2025-07-24  8:52   ` Krzysztof Kozlowski
2025-07-24 10:10     ` Shengjiu Wang [this message]
2025-07-24  7:22 ` [PATCH v2 2/6] ALSA: Add definitions for the bits in IEC958 subframe Shengjiu Wang
2025-07-24  7:37   ` Takashi Iwai
2025-07-24  7:40     ` Marc Kleine-Budde
2025-07-24 10:14       ` Shengjiu Wang
2025-07-24 10:55         ` Takashi Iwai
2025-07-24  7:22 ` [PATCH v2 3/6] drm/bridge: dw-hdmi: Add API dw_hdmi_to_plat_data() to get plat_data Shengjiu Wang
2025-07-24  7:22 ` [PATCH v2 4/6] drm/bridge: dw-hdmi: Add API dw_hdmi_set_sample_iec958() for iec958 format Shengjiu Wang
2025-07-24  7:22 ` [PATCH v2 5/6] drm/bridge: imx: add driver for HDMI TX Parallel Audio Interface Shengjiu Wang
2025-07-25 11:06   ` kernel test robot
2025-07-24  7:22 ` [PATCH v2 6/6] arm64: dts: imx8mp: Add hdmi parallel audio interface node Shengjiu Wang

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='CAA+D8ANV74k1=_m7HfCO2n7nCU7mH=QMrd0CS5eMqGqDHn9HEw@mail.gmail.com' \
    --to=shengjiu.wang@gmail.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=cristian.ciocaltea@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=lumag@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=perex@perex.cz \
    --cc=rfoss@kernel.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=shengjiu.wang@nxp.com \
    --cc=simona@ffwll.ch \
    --cc=tiwai@suse.com \
    --cc=tzimmermann@suse.de \
    --cc=victor.liu@nxp.com \
    /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).