Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: fsl_audmix: support audio graph card for audmix
@ 2025-02-26 10:05 Shengjiu Wang
  2025-02-26 10:05 ` [PATCH 1/4] ASoC: dt-bindings: fsl,sai: Document audio graph port Shengjiu Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Shengjiu Wang @ 2025-02-26 10:05 UTC (permalink / raw)
  To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
	broonie, perex, tiwai, linux-sound, linuxppc-dev, linux-kernel,
	robh, krzk+dt, conor+dt, devicetree

Change 'dais' property to be optional, that fsl_audmix device can be
linked with SAI device by audio graph card.

Shengjiu Wang (4):
  ASoC: dt-bindings: fsl,sai: Document audio graph port
  ASoC: dt-bindings: fsl,audmix: Document audio graph port
  ASoC: dt-bindings: fsl,audmix: make 'dais' property to be optional
  ASoC: fsl_audmix: register card device depends on 'dais' property

 .../devicetree/bindings/sound/fsl,audmix.yaml | 61 ++++++++++++++++++-
 .../devicetree/bindings/sound/fsl,sai.yaml    | 51 ++++++++++++++++
 sound/soc/fsl/fsl_audmix.c                    | 16 +++--
 3 files changed, 122 insertions(+), 6 deletions(-)

-- 
2.34.1


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

* [PATCH 1/4] ASoC: dt-bindings: fsl,sai: Document audio graph port
  2025-02-26 10:05 [PATCH 0/4] ASoC: fsl_audmix: support audio graph card for audmix Shengjiu Wang
@ 2025-02-26 10:05 ` Shengjiu Wang
  2025-03-03 13:03   ` Rob Herring (Arm)
  2025-02-26 10:05 ` [PATCH 2/4] ASoC: dt-bindings: fsl,audmix: " Shengjiu Wang
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Shengjiu Wang @ 2025-02-26 10:05 UTC (permalink / raw)
  To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
	broonie, perex, tiwai, linux-sound, linuxppc-dev, linux-kernel,
	robh, krzk+dt, conor+dt, devicetree

This device can be used in conjunction with audio-graph-card to provide
an endpoint for binding with the other side of the audio link.

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

diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
index a5d9c246cc47..5c95508ee707 100644
--- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
@@ -93,6 +93,24 @@ properties:
     items:
       - description: receive and transmit interrupt
 
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+    properties:
+      port@0:
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+        description: port for TX and RX
+
+      port@1:
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+        description: port for TX only
+
+      port@2:
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+        description: port for RX only
+
   big-endian:
     description: |
       required if all the SAI registers are big-endian rather than little-endian.
@@ -204,4 +222,37 @@ examples:
         dma-names = "rx", "tx";
         fsl,dataline = <1 0xff 0xff 2 0xff 0x11>;
         #sound-dai-cells = <0>;
+
+        ports {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            port@1 {
+                reg = <1>;
+                playback-only;
+
+                sai1_endpoint0: endpoint {
+                   dai-tdm-slot-num = <8>;
+                   dai-tdm-slot-width = <32>;
+                   dai-tdm-slot-width-map = <32 8 32>;
+                   dai-format = "dsp_a";
+                   bitclock-master;
+                   frame-master;
+                   remote-endpoint = <&mcodec01_ep>;
+                };
+            };
+
+            port@2 {
+                reg = <2>;
+                capture-only;
+
+                sai1_endpoint1: endpoint {
+                    dai-tdm-slot-num = <8>;
+                    dai-tdm-slot-width = <32>;
+                    dai-tdm-slot-width-map = <32 8 32>;
+                    dai-format = "dsp_a";
+                    remote-endpoint = <&fe02_ep>;
+                };
+            };
+        };
     };
-- 
2.34.1


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

* [PATCH 2/4] ASoC: dt-bindings: fsl,audmix: Document audio graph port
  2025-02-26 10:05 [PATCH 0/4] ASoC: fsl_audmix: support audio graph card for audmix Shengjiu Wang
  2025-02-26 10:05 ` [PATCH 1/4] ASoC: dt-bindings: fsl,sai: Document audio graph port Shengjiu Wang
@ 2025-02-26 10:05 ` Shengjiu Wang
  2025-03-03 13:04   ` Rob Herring (Arm)
  2025-02-26 10:05 ` [PATCH 3/4] ASoC: dt-bindings: fsl,audmix: make 'dais' property to be optional Shengjiu Wang
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Shengjiu Wang @ 2025-02-26 10:05 UTC (permalink / raw)
  To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
	broonie, perex, tiwai, linux-sound, linuxppc-dev, linux-kernel,
	robh, krzk+dt, conor+dt, devicetree

This device can be used in conjunction with audio-graph-card to provide
an endpoint for binding with the other side of the audio link.

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

diff --git a/Documentation/devicetree/bindings/sound/fsl,audmix.yaml b/Documentation/devicetree/bindings/sound/fsl,audmix.yaml
index 9413b901cf77..d3b93407b4f0 100644
--- a/Documentation/devicetree/bindings/sound/fsl,audmix.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,audmix.yaml
@@ -61,6 +61,20 @@ properties:
       - description: serial audio input 2
         maxItems: 1
 
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+    patternProperties:
+      '^port@[0-1]':
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+        description: Input port from SAI TX
+
+    properties:
+      port@2:
+        $ref: audio-graph-port.yaml#
+        unevaluatedProperties: false
+        description: Output port to SAI RX
+
 required:
   - compatible
   - reg
@@ -80,4 +94,50 @@ examples:
       clock-names = "ipg";
       power-domains = <&pd_audmix>;
       dais = <&sai4>, <&sai5>;
+
+      ports {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        port@0 {
+          reg = <0>;
+          playback-only;
+
+          amix_endpoint0: endpoint {
+            dai-tdm-slot-num = <8>;
+            dai-tdm-slot-width = <32>;
+            dai-tdm-slot-width-map = <32 8 32>;
+            dai-format = "dsp_a";
+            remote-endpoint = <&be00_ep>;
+          };
+        };
+
+        port@1 {
+          reg = <1>;
+          playback-only;
+
+          amix_endpoint1: endpoint {
+            dai-tdm-slot-num = <8>;
+            dai-tdm-slot-width = <32>;
+            dai-tdm-slot-width-map = <32 8 32>;
+            dai-format = "dsp_a";
+            remote-endpoint = <&be01_ep>;
+          };
+        };
+
+        port@2 {
+          reg = <2>;
+          capture-only;
+
+          amix_endpoint2: endpoint {
+            dai-tdm-slot-num = <8>;
+            dai-tdm-slot-width = <32>;
+            dai-tdm-slot-width-map = <32 8 32>;
+            dai-format = "dsp_a";
+            bitclock-master;
+            frame-master;
+            remote-endpoint = <&be02_ep>;
+          };
+        };
+      };
     };
-- 
2.34.1


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

* [PATCH 3/4] ASoC: dt-bindings: fsl,audmix: make 'dais' property to be optional
  2025-02-26 10:05 [PATCH 0/4] ASoC: fsl_audmix: support audio graph card for audmix Shengjiu Wang
  2025-02-26 10:05 ` [PATCH 1/4] ASoC: dt-bindings: fsl,sai: Document audio graph port Shengjiu Wang
  2025-02-26 10:05 ` [PATCH 2/4] ASoC: dt-bindings: fsl,audmix: " Shengjiu Wang
@ 2025-02-26 10:05 ` Shengjiu Wang
  2025-03-03 13:04   ` Rob Herring (Arm)
  2025-02-26 10:05 ` [PATCH 4/4] ASoC: fsl_audmix: register card device depends on 'dais' property Shengjiu Wang
  2025-03-04 19:21 ` [PATCH 0/4] ASoC: fsl_audmix: support audio graph card for audmix Mark Brown
  4 siblings, 1 reply; 9+ messages in thread
From: Shengjiu Wang @ 2025-02-26 10:05 UTC (permalink / raw)
  To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
	broonie, perex, tiwai, linux-sound, linuxppc-dev, linux-kernel,
	robh, krzk+dt, conor+dt, devicetree

Make 'dais' property to be optional. When there is no 'dais' property,
driver won't register the card, dts should have audio graph card node
for linking this device.

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

diff --git a/Documentation/devicetree/bindings/sound/fsl,audmix.yaml b/Documentation/devicetree/bindings/sound/fsl,audmix.yaml
index d3b93407b4f0..3ad197b3c82c 100644
--- a/Documentation/devicetree/bindings/sound/fsl,audmix.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,audmix.yaml
@@ -81,7 +81,6 @@ required:
   - clocks
   - clock-names
   - power-domains
-  - dais
 
 unevaluatedProperties: false
 
-- 
2.34.1


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

* [PATCH 4/4] ASoC: fsl_audmix: register card device depends on 'dais' property
  2025-02-26 10:05 [PATCH 0/4] ASoC: fsl_audmix: support audio graph card for audmix Shengjiu Wang
                   ` (2 preceding siblings ...)
  2025-02-26 10:05 ` [PATCH 3/4] ASoC: dt-bindings: fsl,audmix: make 'dais' property to be optional Shengjiu Wang
@ 2025-02-26 10:05 ` Shengjiu Wang
  2025-03-04 19:21 ` [PATCH 0/4] ASoC: fsl_audmix: support audio graph card for audmix Mark Brown
  4 siblings, 0 replies; 9+ messages in thread
From: Shengjiu Wang @ 2025-02-26 10:05 UTC (permalink / raw)
  To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
	broonie, perex, tiwai, linux-sound, linuxppc-dev, linux-kernel,
	robh, krzk+dt, conor+dt, devicetree

In order to make the audmix device linked by audio graph card, make
'dais' property to be optional.

If 'dais' property exists, then register the imx-audmix card driver.
otherwise, it should be linked by audio graph card.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 sound/soc/fsl/fsl_audmix.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c
index 3cd9a66b70a1..7981d598ba13 100644
--- a/sound/soc/fsl/fsl_audmix.c
+++ b/sound/soc/fsl/fsl_audmix.c
@@ -488,11 +488,17 @@ static int fsl_audmix_probe(struct platform_device *pdev)
 		goto err_disable_pm;
 	}
 
-	priv->pdev = platform_device_register_data(dev, "imx-audmix", 0, NULL, 0);
-	if (IS_ERR(priv->pdev)) {
-		ret = PTR_ERR(priv->pdev);
-		dev_err(dev, "failed to register platform: %d\n", ret);
-		goto err_disable_pm;
+	/*
+	 * If dais property exist, then register the imx-audmix card driver.
+	 * otherwise, it should be linked by audio graph card.
+	 */
+	if (of_find_property(pdev->dev.of_node, "dais", NULL)) {
+		priv->pdev = platform_device_register_data(dev, "imx-audmix", 0, NULL, 0);
+		if (IS_ERR(priv->pdev)) {
+			ret = PTR_ERR(priv->pdev);
+			dev_err(dev, "failed to register platform: %d\n", ret);
+			goto err_disable_pm;
+		}
 	}
 
 	return 0;
-- 
2.34.1


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

* Re: [PATCH 1/4] ASoC: dt-bindings: fsl,sai: Document audio graph port
  2025-02-26 10:05 ` [PATCH 1/4] ASoC: dt-bindings: fsl,sai: Document audio graph port Shengjiu Wang
@ 2025-03-03 13:03   ` Rob Herring (Arm)
  0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring (Arm) @ 2025-03-03 13:03 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: shengjiu.wang, Xiubo.Lee, broonie, nicoleotsuka, krzk+dt,
	festevam, linux-sound, lgirdwood, devicetree, linuxppc-dev,
	linux-kernel, perex, conor+dt, tiwai


On Wed, 26 Feb 2025 18:05:05 +0800, Shengjiu Wang wrote:
> This device can be used in conjunction with audio-graph-card to provide
> an endpoint for binding with the other side of the audio link.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
>  .../devicetree/bindings/sound/fsl,sai.yaml    | 51 +++++++++++++++++++
>  1 file changed, 51 insertions(+)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH 2/4] ASoC: dt-bindings: fsl,audmix: Document audio graph port
  2025-02-26 10:05 ` [PATCH 2/4] ASoC: dt-bindings: fsl,audmix: " Shengjiu Wang
@ 2025-03-03 13:04   ` Rob Herring (Arm)
  0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring (Arm) @ 2025-03-03 13:04 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: linux-kernel, conor+dt, broonie, nicoleotsuka, tiwai, linux-sound,
	krzk+dt, linuxppc-dev, shengjiu.wang, festevam, perex, devicetree,
	Xiubo.Lee, lgirdwood


On Wed, 26 Feb 2025 18:05:06 +0800, Shengjiu Wang wrote:
> This device can be used in conjunction with audio-graph-card to provide
> an endpoint for binding with the other side of the audio link.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
>  .../devicetree/bindings/sound/fsl,audmix.yaml | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH 3/4] ASoC: dt-bindings: fsl,audmix: make 'dais' property to be optional
  2025-02-26 10:05 ` [PATCH 3/4] ASoC: dt-bindings: fsl,audmix: make 'dais' property to be optional Shengjiu Wang
@ 2025-03-03 13:04   ` Rob Herring (Arm)
  0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring (Arm) @ 2025-03-03 13:04 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: tiwai, Xiubo.Lee, devicetree, linux-kernel, lgirdwood, krzk+dt,
	broonie, perex, shengjiu.wang, linuxppc-dev, conor+dt,
	nicoleotsuka, festevam, linux-sound


On Wed, 26 Feb 2025 18:05:07 +0800, Shengjiu Wang wrote:
> Make 'dais' property to be optional. When there is no 'dais' property,
> driver won't register the card, dts should have audio graph card node
> for linking this device.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
>  Documentation/devicetree/bindings/sound/fsl,audmix.yaml | 1 -
>  1 file changed, 1 deletion(-)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH 0/4] ASoC: fsl_audmix: support audio graph card for audmix
  2025-02-26 10:05 [PATCH 0/4] ASoC: fsl_audmix: support audio graph card for audmix Shengjiu Wang
                   ` (3 preceding siblings ...)
  2025-02-26 10:05 ` [PATCH 4/4] ASoC: fsl_audmix: register card device depends on 'dais' property Shengjiu Wang
@ 2025-03-04 19:21 ` Mark Brown
  4 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2025-03-04 19:21 UTC (permalink / raw)
  To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
	perex, tiwai, linux-sound, linuxppc-dev, linux-kernel, robh,
	krzk+dt, conor+dt, devicetree, Shengjiu Wang

On Wed, 26 Feb 2025 18:05:04 +0800, Shengjiu Wang wrote:
> Change 'dais' property to be optional, that fsl_audmix device can be
> linked with SAI device by audio graph card.
> 
> Shengjiu Wang (4):
>   ASoC: dt-bindings: fsl,sai: Document audio graph port
>   ASoC: dt-bindings: fsl,audmix: Document audio graph port
>   ASoC: dt-bindings: fsl,audmix: make 'dais' property to be optional
>   ASoC: fsl_audmix: register card device depends on 'dais' property
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/4] ASoC: dt-bindings: fsl,sai: Document audio graph port
      commit: abcb9a1fd89144536f3ef604f700e94424867366
[2/4] ASoC: dt-bindings: fsl,audmix: Document audio graph port
      commit: 5fee78e517ce0765def9387659fc56a1d5532c60
[3/4] ASoC: dt-bindings: fsl,audmix: make 'dais' property to be optional
      commit: 597acf1a04bede55e3ad8a7922bba286c11112d3
[4/4] ASoC: fsl_audmix: register card device depends on 'dais' property
      commit: 294a60e5e9830045c161181286d44ce669f88833

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


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

end of thread, other threads:[~2025-03-04 19:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-26 10:05 [PATCH 0/4] ASoC: fsl_audmix: support audio graph card for audmix Shengjiu Wang
2025-02-26 10:05 ` [PATCH 1/4] ASoC: dt-bindings: fsl,sai: Document audio graph port Shengjiu Wang
2025-03-03 13:03   ` Rob Herring (Arm)
2025-02-26 10:05 ` [PATCH 2/4] ASoC: dt-bindings: fsl,audmix: " Shengjiu Wang
2025-03-03 13:04   ` Rob Herring (Arm)
2025-02-26 10:05 ` [PATCH 3/4] ASoC: dt-bindings: fsl,audmix: make 'dais' property to be optional Shengjiu Wang
2025-03-03 13:04   ` Rob Herring (Arm)
2025-02-26 10:05 ` [PATCH 4/4] ASoC: fsl_audmix: register card device depends on 'dais' property Shengjiu Wang
2025-03-04 19:21 ` [PATCH 0/4] ASoC: fsl_audmix: support audio graph card for audmix Mark Brown

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