The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: fsl: expose individual DAIs per ASRC/EASRC conversion pair/context
@ 2026-07-20  9:54 shengjiu.wang
  2026-07-20  9:54 ` [PATCH 1/4] dt-bindings: sound: fsl,imx-asrc: update port binding to support multiple pairs shengjiu.wang
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: shengjiu.wang @ 2026-07-20  9:54 UTC (permalink / raw)
  To: lgirdwood, broonie, robh, krzk+dt, conor+dt, Frank.Li, s.hauer,
	kernel, festevam, shawnguo, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel, shengjiu.wang, Xiubo.Lee,
	nicoleotsuka, perex, tiwai, linuxppc-dev
  Cc: Shengjiu Wang

From: Shengjiu Wang <shengjiu.wang@nxp.com>

The i.MX ASRC and EASRC hardware each support multiple independent
conversion pairs or contexts, but both drivers previously registered
only a single DAI with generic stream names. This prevented individual
pairs or contexts from being routed to separate audio paths at the same
time.

This series updates the DT bindings and drivers to expose one DAI per
conversion unit:

- fsl,imx-asrc: add a ports container (port@0/1/2 for pairs A/B/C)
  alongside the deprecated single port property
- fsl,easrc: add a ports container (port@0/1/2/3 for contexts A/B/C/D)
- fsl_asrc: register three DAIs (paira/pairb/pairc); pair A keeps the
  original stream names for backward compatibility
- fsl_easrc: register four DAIs (ctxa/ctxb/ctxc/ctxd); context A keeps
  the original stream names for backward compatibility

Shengjiu Wang (4):
  dt-bindings: sound: fsl,imx-asrc: update port binding to support
    multiple pairs
  dt-bindings: sound: fsl,easrc: add ports binding for multiple contexts
  ASoC: fsl_asrc: expose individual DAIs per conversion pair
  ASoC: fsl_easrc: expose individual DAIs per conversion context

 .../devicetree/bindings/sound/fsl,easrc.yaml  |  79 ++++++++++++
 .../bindings/sound/fsl,imx-asrc.yaml          |  78 ++++++++++++
 sound/soc/fsl/fsl_asrc.c                      |  89 ++++++++++----
 sound/soc/fsl/fsl_easrc.c                     | 112 ++++++++++++++----
 4 files changed, 318 insertions(+), 40 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/4] dt-bindings: sound: fsl,imx-asrc: update port binding to support multiple pairs
  2026-07-20  9:54 [PATCH 0/4] ASoC: fsl: expose individual DAIs per ASRC/EASRC conversion pair/context shengjiu.wang
@ 2026-07-20  9:54 ` shengjiu.wang
  2026-07-20 14:28   ` Mark Brown
  2026-07-31 22:59   ` Rob Herring
  2026-07-20  9:54 ` [PATCH 2/4] dt-bindings: sound: fsl,easrc: add ports binding for multiple contexts shengjiu.wang
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 8+ messages in thread
From: shengjiu.wang @ 2026-07-20  9:54 UTC (permalink / raw)
  To: lgirdwood, broonie, robh, krzk+dt, conor+dt, Frank.Li, s.hauer,
	kernel, festevam, shawnguo, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel, shengjiu.wang, Xiubo.Lee,
	nicoleotsuka, perex, tiwai, linuxppc-dev
  Cc: Shengjiu Wang

From: Shengjiu Wang <shengjiu.wang@nxp.com>

The i.MX ASRC hardware supports up to three conversion pairs (A, B, C).
The existing binding exposed only a single generic audio-graph port,
which cannot represent the individual pair endpoints.

Add a ports container that enumerates three named sub-ports:
  port@0 -- pair A
  port@1 -- pair B
  port@2 -- pair C

Each sub-port references audio-graph-port.yaml as before.

For backwards compatibility, keep the old single port property but mark
it deprecated. A schema constraint (not: required: [port, ports]) ensures
that both forms cannot be used at the same time. Update the examples to
show both the new ports form and the deprecated port form.

No existing upstream DTS file for fsl,imx-asrc uses the previously
documented single 'port' node, so this change does not break any
in-tree device tree.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 .../bindings/sound/fsl,imx-asrc.yaml          | 78 +++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml b/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
index 608defc93c1e..18d252722aa8 100644
--- a/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
@@ -78,9 +78,29 @@ properties:
   power-domains:
     maxItems: 1
 
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+    properties:
+      port@0:
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+        description: port for pair A
+
+      port@1:
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+        description: port for pair B
+
+      port@2:
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+        description: port for pair C
+
   port:
     $ref: audio-graph-port.yaml#
     unevaluatedProperties: false
+    deprecated: true
+    description: deprecated, use ports instead
 
   fsl,asrc-rate:
     $ref: /schemas/types.yaml#/definitions/uint32
@@ -125,6 +145,10 @@ required:
   - fsl,asrc-width
 
 allOf:
+  - not:
+      required:
+        - port
+        - ports
   - $ref: dai-common.yaml#
   - if:
       properties:
@@ -188,3 +212,57 @@ examples:
             };
        };
     };
+
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/clock/imx6qdl-clock.h>
+    asrc1: asrc@2034000 {
+        compatible = "fsl,imx53-asrc";
+        reg = <0x02034000 0x4000>;
+        interrupts = <0 50 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&clks IMX6QDL_CLK_ASRC_IPG>,
+                 <&clks IMX6QDL_CLK_ASRC_MEM>, <&clks 0>,
+                 <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
+                 <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
+                 <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
+                 <&clks IMX6QDL_CLK_ASRC>, <&clks 0>, <&clks 0>,
+                 <&clks IMX6QDL_CLK_SPBA>;
+        clock-names = "mem", "ipg", "asrck_0",
+                "asrck_1", "asrck_2", "asrck_3", "asrck_4",
+                "asrck_5", "asrck_6", "asrck_7", "asrck_8",
+                "asrck_9", "asrck_a", "asrck_b", "asrck_c",
+                "asrck_d", "asrck_e", "asrck_f", "spba";
+        dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>,
+               <&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>;
+        dma-names = "rxa", "rxb", "rxc",
+                    "txa", "txb", "txc";
+        fsl,asrc-rate = <48000>;
+        fsl,asrc-width = <16>;
+
+        ports {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            port@0 {
+                reg = <0>;
+                playback-only;
+                asrc1_endpoint0: endpoint {
+                    remote-endpoint = <&fe00_ep>;
+                };
+            };
+
+            port@1 {
+                reg = <1>;
+                capture-only;
+                asrc1_endpoint1: endpoint {
+                };
+            };
+
+            port@2 {
+                reg = <2>;
+                capture-only;
+                asrc1_endpoint2: endpoint {
+                };
+            };
+        };
+    };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/4] dt-bindings: sound: fsl,easrc: add ports binding for multiple contexts
  2026-07-20  9:54 [PATCH 0/4] ASoC: fsl: expose individual DAIs per ASRC/EASRC conversion pair/context shengjiu.wang
  2026-07-20  9:54 ` [PATCH 1/4] dt-bindings: sound: fsl,imx-asrc: update port binding to support multiple pairs shengjiu.wang
@ 2026-07-20  9:54 ` shengjiu.wang
  2026-07-20  9:54 ` [PATCH 3/4] ASoC: fsl_asrc: expose individual DAIs per conversion pair shengjiu.wang
  2026-07-20  9:54 ` [PATCH 4/4] ASoC: fsl_easrc: expose individual DAIs per conversion context shengjiu.wang
  3 siblings, 0 replies; 8+ messages in thread
From: shengjiu.wang @ 2026-07-20  9:54 UTC (permalink / raw)
  To: lgirdwood, broonie, robh, krzk+dt, conor+dt, Frank.Li, s.hauer,
	kernel, festevam, shawnguo, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel, shengjiu.wang, Xiubo.Lee,
	nicoleotsuka, perex, tiwai, linuxppc-dev
  Cc: Shengjiu Wang

From: Shengjiu Wang <shengjiu.wang@nxp.com>

The i.MX EASRC hardware supports up to four conversion contexts
(A, B, C, D). Add a ports container property to the binding to allow
each context to be represented as an individual audio-graph port:

  port@0 -- context A
  port@1 -- context B
  port@2 -- context C
  port@3 -- context D

Each sub-port references audio-graph-port.yaml and follows the standard
audio-graph binding conventions.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 .../devicetree/bindings/sound/fsl,easrc.yaml  | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/fsl,easrc.yaml b/Documentation/devicetree/bindings/sound/fsl,easrc.yaml
index d5727f8bfb0b..0f579870110d 100644
--- a/Documentation/devicetree/bindings/sound/fsl,easrc.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,easrc.yaml
@@ -55,6 +55,29 @@ properties:
       - const: imx/easrc/easrc-imx8mn.bin
     description: The coefficient table for the filters
 
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+    properties:
+      port@0:
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+        description: port for context A
+
+      port@1:
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+        description: port for context B
+
+      port@2:
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+        description: port for context C
+
+      port@3:
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+        description: port for context D
+
   fsl,asrc-rate:
     $ref: /schemas/types.yaml#/definitions/uint32
     minimum: 8000
@@ -107,3 +130,59 @@ examples:
         fsl,asrc-rate = <8000>;
         fsl,asrc-format = <2>;
     };
+
+  - |
+    #include <dt-bindings/clock/imx8mn-clock.h>
+
+    easrc1: easrc@300c0000 {
+        compatible = "fsl,imx8mn-easrc";
+        reg = <0x300c0000 0x10000>;
+        interrupts = <0x0 122 0x4>;
+        clocks = <&clk IMX8MN_CLK_ASRC_ROOT>;
+        clock-names = "mem";
+        dmas = <&sdma2 16 23 0> , <&sdma2 17 23 0>,
+               <&sdma2 18 23 0> , <&sdma2 19 23 0>,
+               <&sdma2 20 23 0> , <&sdma2 21 23 0>,
+               <&sdma2 22 23 0> , <&sdma2 23 23 0>;
+        dma-names = "ctx0_rx", "ctx0_tx",
+                    "ctx1_rx", "ctx1_tx",
+                    "ctx2_rx", "ctx2_tx",
+                    "ctx3_rx", "ctx3_tx";
+        firmware-name = "imx/easrc/easrc-imx8mn.bin";
+        fsl,asrc-rate = <8000>;
+        fsl,asrc-format = <2>;
+
+        ports {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            port@0 {
+                reg = <0>;
+                playback-only;
+                easrc1_endpoint0: endpoint {
+                    remote-endpoint = <&fe00_ep>;
+                };
+            };
+
+            port@1 {
+                reg = <1>;
+                capture-only;
+                easrc1_endpoint1: endpoint {
+                };
+            };
+
+            port@2 {
+                reg = <2>;
+                capture-only;
+                easrc1_endpoint2: endpoint {
+                };
+            };
+
+            port@3 {
+                reg = <3>;
+                capture-only;
+                easrc1_endpoint3: endpoint {
+                };
+            };
+        };
+    };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/4] ASoC: fsl_asrc: expose individual DAIs per conversion pair
  2026-07-20  9:54 [PATCH 0/4] ASoC: fsl: expose individual DAIs per ASRC/EASRC conversion pair/context shengjiu.wang
  2026-07-20  9:54 ` [PATCH 1/4] dt-bindings: sound: fsl,imx-asrc: update port binding to support multiple pairs shengjiu.wang
  2026-07-20  9:54 ` [PATCH 2/4] dt-bindings: sound: fsl,easrc: add ports binding for multiple contexts shengjiu.wang
@ 2026-07-20  9:54 ` shengjiu.wang
  2026-07-20  9:54 ` [PATCH 4/4] ASoC: fsl_easrc: expose individual DAIs per conversion context shengjiu.wang
  3 siblings, 0 replies; 8+ messages in thread
From: shengjiu.wang @ 2026-07-20  9:54 UTC (permalink / raw)
  To: lgirdwood, broonie, robh, krzk+dt, conor+dt, Frank.Li, s.hauer,
	kernel, festevam, shawnguo, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel, shengjiu.wang, Xiubo.Lee,
	nicoleotsuka, perex, tiwai, linuxppc-dev
  Cc: Shengjiu Wang

From: Shengjiu Wang <shengjiu.wang@nxp.com>

The i.MX ASRC hardware supports three independent conversion pairs
(A, B, C). The driver previously registered a single DAI with generic
stream names "ASRC-Playback" and "ASRC-Capture", which prevents
individual pairs from being routed to separate audio paths simultaneously.

Replace the single fsl_asrc_dai instance with an array of three DAI
drivers, one per pair:

  paira -- ASRC-Playback / ASRC-Capture (backward compatible)
  pairb -- ASRCB-Playback / ASRCB-Capture
  pairc -- ASRCC-Playback / ASRCC-Capture

Pair A retains the original generic stream names to preserve backward
compatibility with existing machine drivers and board configurations.
Each DAI retains the same channel, rate and format capabilities as the
original. Update the devm_snd_soc_register_component() call to register
all three DAIs.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 sound/soc/fsl/fsl_asrc.c | 89 +++++++++++++++++++++++++++++++---------
 1 file changed, 69 insertions(+), 20 deletions(-)

diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index 0b28bcfa47fe..f83d6cdc6412 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -803,27 +803,76 @@ static const struct snd_soc_dai_ops fsl_asrc_dai_ops = {
 				 SNDRV_PCM_FMTBIT_S16_LE | \
 				 SNDRV_PCM_FMTBIT_S24_3LE)
 
-static struct snd_soc_dai_driver fsl_asrc_dai = {
-	.playback = {
-		.stream_name = "ASRC-Playback",
-		.channels_min = 1,
-		.channels_max = 10,
-		.rate_min = 5512,
-		.rate_max = 192000,
-		.rates = SNDRV_PCM_RATE_KNOT,
-		.formats = FSL_ASRC_FORMATS |
-			   SNDRV_PCM_FMTBIT_S8,
+static struct snd_soc_dai_driver fsl_asrc_dai[] = {
+	{
+		.name = "paira",
+		.playback = {
+			.stream_name = "ASRC-Playback",
+			.channels_min = 1,
+			.channels_max = 10,
+			.rate_min = 5512,
+			.rate_max = 192000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_ASRC_FORMATS |
+				   SNDRV_PCM_FMTBIT_S8,
+		},
+		.capture = {
+			.stream_name = "ASRC-Capture",
+			.channels_min = 1,
+			.channels_max = 10,
+			.rate_min = 5512,
+			.rate_max = 192000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_ASRC_FORMATS,
+		},
+		.ops = &fsl_asrc_dai_ops,
+	},
+	{
+		.name = "pairb",
+		.playback = {
+			.stream_name = "ASRCB-Playback",
+			.channels_min = 1,
+			.channels_max = 10,
+			.rate_min = 5512,
+			.rate_max = 192000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_ASRC_FORMATS |
+				   SNDRV_PCM_FMTBIT_S8,
+		},
+		.capture = {
+			.stream_name = "ASRCB-Capture",
+			.channels_min = 1,
+			.channels_max = 10,
+			.rate_min = 5512,
+			.rate_max = 192000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_ASRC_FORMATS,
+		},
+		.ops = &fsl_asrc_dai_ops,
 	},
-	.capture = {
-		.stream_name = "ASRC-Capture",
-		.channels_min = 1,
-		.channels_max = 10,
-		.rate_min = 5512,
-		.rate_max = 192000,
-		.rates = SNDRV_PCM_RATE_KNOT,
-		.formats = FSL_ASRC_FORMATS,
+	{
+		.name = "pairc",
+		.playback = {
+			.stream_name = "ASRCC-Playback",
+			.channels_min = 1,
+			.channels_max = 10,
+			.rate_min = 5512,
+			.rate_max = 192000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_ASRC_FORMATS |
+				   SNDRV_PCM_FMTBIT_S8,
+		},
+		.capture = {
+			.stream_name = "ASRCC-Capture",
+			.channels_min = 1,
+			.channels_max = 10,
+			.rate_min = 5512,
+			.rate_max = 192000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_ASRC_FORMATS,
+		},
+		.ops = &fsl_asrc_dai_ops,
 	},
-	.ops = &fsl_asrc_dai_ops,
 };
 
 static bool fsl_asrc_readable_reg(struct device *dev, unsigned int reg)
@@ -1404,7 +1453,7 @@ static int fsl_asrc_probe(struct platform_device *pdev)
 		goto err_pm_get_sync;
 
 	ret = devm_snd_soc_register_component(&pdev->dev, &fsl_asrc_component,
-					      &fsl_asrc_dai, 1);
+					      fsl_asrc_dai, ARRAY_SIZE(fsl_asrc_dai));
 	if (ret) {
 		dev_err(&pdev->dev, "failed to register ASoC DAI\n");
 		goto err_pm_get_sync;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/4] ASoC: fsl_easrc: expose individual DAIs per conversion context
  2026-07-20  9:54 [PATCH 0/4] ASoC: fsl: expose individual DAIs per ASRC/EASRC conversion pair/context shengjiu.wang
                   ` (2 preceding siblings ...)
  2026-07-20  9:54 ` [PATCH 3/4] ASoC: fsl_asrc: expose individual DAIs per conversion pair shengjiu.wang
@ 2026-07-20  9:54 ` shengjiu.wang
  3 siblings, 0 replies; 8+ messages in thread
From: shengjiu.wang @ 2026-07-20  9:54 UTC (permalink / raw)
  To: lgirdwood, broonie, robh, krzk+dt, conor+dt, Frank.Li, s.hauer,
	kernel, festevam, shawnguo, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel, shengjiu.wang, Xiubo.Lee,
	nicoleotsuka, perex, tiwai, linuxppc-dev
  Cc: Shengjiu Wang

From: Shengjiu Wang <shengjiu.wang@nxp.com>

The i.MX EASRC hardware supports four independent conversion contexts
(A, B, C, D). The driver previously registered a single DAI with generic
stream names "ASRC-Playback" and "ASRC-Capture", which prevents
individual contexts from being routed to separate audio paths
simultaneously.

Replace the single fsl_easrc_dai instance with an array of four DAI
drivers, one per context:

  ctxa -- ASRC-Playback / ASRC-Capture (backward compatible)
  ctxb -- ASRCB-Playback / ASRCB-Capture
  ctxc -- ASRCC-Playback / ASRCC-Capture
  ctxd -- ASRCD-Playback / ASRCD-Capture

Context A retains the original generic stream names to preserve backward
compatibility with existing machine drivers and board configurations.
Each DAI retains the same channel, rate and format capabilities as the
original, including IEC958 subframe support on the capture side. Update
the devm_snd_soc_register_component() call to register all four DAIs.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 sound/soc/fsl/fsl_easrc.c | 112 +++++++++++++++++++++++++++++++-------
 1 file changed, 92 insertions(+), 20 deletions(-)

diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c
index edfd943197a0..3c5303d9b9cf 100644
--- a/sound/soc/fsl/fsl_easrc.c
+++ b/sound/soc/fsl/fsl_easrc.c
@@ -1600,27 +1600,99 @@ static const struct snd_soc_dai_ops fsl_easrc_dai_ops = {
 	.hw_free	= fsl_easrc_hw_free,
 };
 
-static struct snd_soc_dai_driver fsl_easrc_dai = {
-	.playback = {
-		.stream_name = "ASRC-Playback",
-		.channels_min = 1,
-		.channels_max = 32,
-		.rate_min = 8000,
-		.rate_max = 768000,
-		.rates = SNDRV_PCM_RATE_KNOT,
-		.formats = FSL_EASRC_FORMATS,
+static struct snd_soc_dai_driver fsl_easrc_dai[] = {
+	{
+		.name = "ctxa",
+		.playback = {
+			.stream_name = "ASRC-Playback",
+			.channels_min = 1,
+			.channels_max = 32,
+			.rate_min = 8000,
+			.rate_max = 768000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_EASRC_FORMATS,
+		},
+		.capture = {
+			.stream_name = "ASRC-Capture",
+			.channels_min = 1,
+			.channels_max = 32,
+			.rate_min = 8000,
+			.rate_max = 768000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_EASRC_FORMATS |
+				   SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE,
+		},
+		.ops = &fsl_easrc_dai_ops,
 	},
-	.capture = {
-		.stream_name = "ASRC-Capture",
-		.channels_min = 1,
-		.channels_max = 32,
-		.rate_min = 8000,
-		.rate_max = 768000,
-		.rates = SNDRV_PCM_RATE_KNOT,
-		.formats = FSL_EASRC_FORMATS |
-			   SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE,
+	{
+		.name = "ctxb",
+		.playback = {
+			.stream_name = "ASRCB-Playback",
+			.channels_min = 1,
+			.channels_max = 32,
+			.rate_min = 8000,
+			.rate_max = 768000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_EASRC_FORMATS,
+		},
+		.capture = {
+			.stream_name = "ASRCB-Capture",
+			.channels_min = 1,
+			.channels_max = 32,
+			.rate_min = 8000,
+			.rate_max = 768000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_EASRC_FORMATS |
+				   SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE,
+		},
+		.ops = &fsl_easrc_dai_ops,
+	},
+	{
+		.name = "ctxc",
+		.playback = {
+			.stream_name = "ASRCC-Playback",
+			.channels_min = 1,
+			.channels_max = 32,
+			.rate_min = 8000,
+			.rate_max = 768000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_EASRC_FORMATS,
+		},
+		.capture = {
+			.stream_name = "ASRCC-Capture",
+			.channels_min = 1,
+			.channels_max = 32,
+			.rate_min = 8000,
+			.rate_max = 768000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_EASRC_FORMATS |
+				   SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE,
+		},
+		.ops = &fsl_easrc_dai_ops,
+	},
+	{
+		.name = "ctxd",
+		.playback = {
+			.stream_name = "ASRCD-Playback",
+			.channels_min = 1,
+			.channels_max = 32,
+			.rate_min = 8000,
+			.rate_max = 768000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_EASRC_FORMATS,
+		},
+		.capture = {
+			.stream_name = "ASRCD-Capture",
+			.channels_min = 1,
+			.channels_max = 32,
+			.rate_min = 8000,
+			.rate_max = 768000,
+			.rates = SNDRV_PCM_RATE_KNOT,
+			.formats = FSL_EASRC_FORMATS |
+				   SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE,
+		},
+		.ops = &fsl_easrc_dai_ops,
 	},
-	.ops = &fsl_easrc_dai_ops,
 };
 
 static const struct snd_soc_component_driver fsl_easrc_component = {
@@ -2245,7 +2317,7 @@ static int fsl_easrc_probe(struct platform_device *pdev)
 	regcache_cache_only(easrc->regmap, true);
 
 	ret = devm_snd_soc_register_component(dev, &fsl_easrc_component,
-					      &fsl_easrc_dai, 1);
+					      fsl_easrc_dai, ARRAY_SIZE(fsl_easrc_dai));
 	if (ret) {
 		dev_err(dev, "failed to register ASoC DAI\n");
 		goto err_pm_disable;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/4] dt-bindings: sound: fsl,imx-asrc: update port binding to support multiple pairs
  2026-07-20  9:54 ` [PATCH 1/4] dt-bindings: sound: fsl,imx-asrc: update port binding to support multiple pairs shengjiu.wang
@ 2026-07-20 14:28   ` Mark Brown
  2026-07-21  8:58     ` Shengjiu Wang
  2026-07-31 22:59   ` Rob Herring
  1 sibling, 1 reply; 8+ messages in thread
From: Mark Brown @ 2026-07-20 14:28 UTC (permalink / raw)
  To: shengjiu.wang
  Cc: lgirdwood, robh, krzk+dt, conor+dt, Frank.Li, s.hauer, kernel,
	festevam, shawnguo, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel, shengjiu.wang, Xiubo.Lee,
	nicoleotsuka, perex, tiwai, linuxppc-dev, Shengjiu Wang

[-- Attachment #1: Type: text/plain, Size: 668 bytes --]

On Mon, Jul 20, 2026 at 05:54:47PM +0800, shengjiu.wang@oss.nxp.com wrote:
> From: Shengjiu Wang <shengjiu.wang@nxp.com>
> 
> The i.MX ASRC hardware supports up to three conversion pairs (A, B, C).
> The existing binding exposed only a single generic audio-graph port,
> which cannot represent the individual pair endpoints.

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/4] dt-bindings: sound: fsl,imx-asrc: update port binding to support multiple pairs
  2026-07-20 14:28   ` Mark Brown
@ 2026-07-21  8:58     ` Shengjiu Wang
  0 siblings, 0 replies; 8+ messages in thread
From: Shengjiu Wang @ 2026-07-21  8:58 UTC (permalink / raw)
  To: Mark Brown
  Cc: shengjiu.wang, lgirdwood, robh, krzk+dt, conor+dt, Frank.Li,
	s.hauer, kernel, festevam, shawnguo, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel, Xiubo.Lee, nicoleotsuka, perex,
	tiwai, linuxppc-dev, Shengjiu Wang

On Mon, Jul 20, 2026 at 10:28 PM Mark Brown <broonie@kernel.org> wrote:
>
> On Mon, Jul 20, 2026 at 05:54:47PM +0800, shengjiu.wang@oss.nxp.com wrote:
> > From: Shengjiu Wang <shengjiu.wang@nxp.com>
> >
> > The i.MX ASRC hardware supports up to three conversion pairs (A, B, C).
> > The existing binding exposed only a single generic audio-graph port,
> > which cannot represent the individual pair endpoints.
>
> Please submit patches using subject lines reflecting the style for the
> subsystem, this makes it easier for people to identify relevant patches.
> Look at what existing commits in the area you're changing are doing and
> make sure your subject lines visually resemble what they're doing.
> There's no need to resubmit to fix this alone.

Thanks for pointing this out. There are also some comments from sashiko.dev
I will try to address in the next version.

Best regards
Shengjiu Wang

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/4] dt-bindings: sound: fsl,imx-asrc: update port binding to support multiple pairs
  2026-07-20  9:54 ` [PATCH 1/4] dt-bindings: sound: fsl,imx-asrc: update port binding to support multiple pairs shengjiu.wang
  2026-07-20 14:28   ` Mark Brown
@ 2026-07-31 22:59   ` Rob Herring
  1 sibling, 0 replies; 8+ messages in thread
From: Rob Herring @ 2026-07-31 22:59 UTC (permalink / raw)
  To: shengjiu.wang
  Cc: lgirdwood, broonie, krzk+dt, conor+dt, Frank.Li, s.hauer, kernel,
	festevam, shawnguo, linux-sound, devicetree, imx,
	linux-arm-kernel, linux-kernel, shengjiu.wang, Xiubo.Lee,
	nicoleotsuka, perex, tiwai, linuxppc-dev, Shengjiu Wang

On Mon, Jul 20, 2026 at 05:54:47PM +0800, shengjiu.wang@oss.nxp.com wrote:
> From: Shengjiu Wang <shengjiu.wang@nxp.com>
> 
> The i.MX ASRC hardware supports up to three conversion pairs (A, B, C).
> The existing binding exposed only a single generic audio-graph port,
> which cannot represent the individual pair endpoints.
> 
> Add a ports container that enumerates three named sub-ports:
>   port@0 -- pair A
>   port@1 -- pair B
>   port@2 -- pair C
> 
> Each sub-port references audio-graph-port.yaml as before.
> 
> For backwards compatibility, keep the old single port property but mark
> it deprecated. A schema constraint (not: required: [port, ports]) ensures
> that both forms cannot be used at the same time. Update the examples to
> show both the new ports form and the deprecated port form.
> 
> No existing upstream DTS file for fsl,imx-asrc uses the previously
> documented single 'port' node, so this change does not break any
> in-tree device tree.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
>  .../bindings/sound/fsl,imx-asrc.yaml          | 78 +++++++++++++++++++
>  1 file changed, 78 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml b/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
> index 608defc93c1e..18d252722aa8 100644
> --- a/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
> +++ b/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml
> @@ -78,9 +78,29 @@ properties:
>    power-domains:
>      maxItems: 1
>  
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +    properties:
> +      port@0:
> +        $ref: audio-graph-port.yaml#
> +        unevaluatedProperties: false
> +        description: port for pair A
> +
> +      port@1:
> +        $ref: audio-graph-port.yaml#
> +        unevaluatedProperties: false
> +        description: port for pair B
> +
> +      port@2:
> +        $ref: audio-graph-port.yaml#
> +        unevaluatedProperties: false
> +        description: port for pair C
> +
>    port:
>      $ref: audio-graph-port.yaml#
>      unevaluatedProperties: false
> +    deprecated: true
> +    description: deprecated, use ports instead
>  
>    fsl,asrc-rate:
>      $ref: /schemas/types.yaml#/definitions/uint32
> @@ -125,6 +145,10 @@ required:
>    - fsl,asrc-width
>  
>  allOf:
> +  - not:
> +      required:
> +        - port
> +        - ports
>    - $ref: dai-common.yaml#
>    - if:
>        properties:
> @@ -188,3 +212,57 @@ examples:
>              };
>         };
>      };
> +
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/clock/imx6qdl-clock.h>
> +    asrc1: asrc@2034000 {

Drop unused label.

Presumably the existing example uses the deprecated 'port'. If so, just 
modify it to use ports and drop the deprecated part.

Rob

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-07-31 22:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20  9:54 [PATCH 0/4] ASoC: fsl: expose individual DAIs per ASRC/EASRC conversion pair/context shengjiu.wang
2026-07-20  9:54 ` [PATCH 1/4] dt-bindings: sound: fsl,imx-asrc: update port binding to support multiple pairs shengjiu.wang
2026-07-20 14:28   ` Mark Brown
2026-07-21  8:58     ` Shengjiu Wang
2026-07-31 22:59   ` Rob Herring
2026-07-20  9:54 ` [PATCH 2/4] dt-bindings: sound: fsl,easrc: add ports binding for multiple contexts shengjiu.wang
2026-07-20  9:54 ` [PATCH 3/4] ASoC: fsl_asrc: expose individual DAIs per conversion pair shengjiu.wang
2026-07-20  9:54 ` [PATCH 4/4] ASoC: fsl_easrc: expose individual DAIs per conversion context shengjiu.wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox