Skip to contentSkip to conversation

arm64: dts: renesas: Simple-Card / Audio-Graph-Card/Card2 dts for ULCB/KF

PATCH Superseded Kuninori Morimoto 2 participants 21 messages Dec 14, 2022 – Jan 15, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover arm64: dts: renesas: Simple-Card / Audio-Graph-Card/Card2 dts for ULCB/KF

Hi Geert

ALSA SoC is now supporting generic Sound Card driver such as Simple-Card / Audio-Graph-Card/Card2, and it supports "normal connection" and "special connections".
I'm its maintainer, thus I need/want to test these.

I have been tested these by using my local patches to switching card, but maintenance it locally is not useful for me, and users who want to know the sample DT settings.

And I have noticed that some local patch had bug, but no one noticed about it (of course :)

ULCB/KF is very good board to test these.
So, I want to upstream these.

One note here is that this patch *should not* have effect to existing normal users, but useful for test user.
So, this patch-set adds "3 card" x "2 use case" dtsi file, and ulcb/ulcb-kf "include" one of them which doesn't change anything. test user can switch to other card or other use case by changing "include" dtsi.

[1/8][2/8] are small tidyup patches for all SoC sound.

Kuninori Morimoto (8):
ARM: dts: renesas: #sound-dai-cells is used when simple-card
arm64: dts: renesas: #sound-dai-cells is used when simple-card
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi
arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi
arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi

 arch/arm/boot/dts/r8a7742.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7743.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7744.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7745.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7778.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7790.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7791.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7793.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7794.dtsi                |   2 +-
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a774c0.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a774e1.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77951.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77960.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77961.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77965.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77990.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77995.dtsi     |   2 +-
 .../boot/dts/renesas/salvator-common.dtsi     |   3 -
 .../ulcb-audio-graph-card-mix+split.dtsi      |  89 +++++++++
 .../dts/renesas/ulcb-audio-graph-card.dtsi    |  85 +++++++++
 .../ulcb-audio-graph-card2-mix+split.dtsi     | 111 +++++++++++
 .../dts/renesas/ulcb-audio-graph-card2.dtsi   |  26 +++
 .../ulcb-kf-audio-graph-card-mix+split.dtsi   | 162 ++++++++++++++++
 .../dts/renesas/ulcb-kf-audio-graph-card.dtsi |  88 +++++++++
 .../ulcb-kf-audio-graph-card2-mix+split.dtsi  | 177 ++++++++++++++++++
 .../renesas/ulcb-kf-audio-graph-card2.dtsi    |  30 +++
 .../ulcb-kf-simple-audio-card-mix+split.dtsi  | 137 ++++++++++++++
 .../renesas/ulcb-kf-simple-audio-card.dtsi    |  85 +++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      |  66 ++-----
 .../ulcb-simple-audio-card-mix+split.dtsi     |  86 +++++++++
 .../dts/renesas/ulcb-simple-audio-card.dtsi   |  89 +++++++++
 arch/arm64/boot/dts/renesas/ulcb.dtsi         |  60 ++----
 34 files changed, 1212 insertions(+), 120 deletions(-)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card.dtsi
Signature · 11 lines
2.25.1





Thank you for your help !!

Best regards
---
Kuninori Morimoto
#1 lore raw

PATCH 1/8 ARM: dts: renesas: #sound-dai-cells is used when simple-card

From: Kuninori Morimoto <[email protected]>

Current sound comment is indicating that #sound-dai-cells is required, but it is needed if board is using simple-card. This patch tidyup the comment.

---
 arch/arm/boot/dts/r8a7742.dtsi | 2 +-
 arch/arm/boot/dts/r8a7743.dtsi | 2 +-
 arch/arm/boot/dts/r8a7744.dtsi | 2 +-
 arch/arm/boot/dts/r8a7745.dtsi | 2 +-
 arch/arm/boot/dts/r8a7778.dtsi | 2 +-
 arch/arm/boot/dts/r8a7790.dtsi | 2 +-
 arch/arm/boot/dts/r8a7791.dtsi | 2 +-
 arch/arm/boot/dts/r8a7793.dtsi | 2 +-
 arch/arm/boot/dts/r8a7794.dtsi | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
arch/arm/boot/dts/r8a7742.dtsi +1 -1
index 758a1bf02fae..d1c256d8bd56 100644
@@ -1155,7 +1155,7 @@ vin3: video@e6ef3000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7743.dtsi +1 -1
index 20f1d98a048d..2245d19a23bb 100644
@@ -1190,7 +1190,7 @@ vin2: video@e6ef2000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7744.dtsi +1 -1
index 96b2d5a4e8f6..aa13841f9781 100644
@@ -1190,7 +1190,7 @@ vin2: video@e6ef2000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7745.dtsi +1 -1
index afc902e532d8..44688b8431c3 100644
@@ -1120,7 +1120,7 @@ vin1: video@e6ef1000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>; <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>; <&rcar_sound N>;
arch/arm/boot/dts/r8a7778.dtsi +1 -1
index 95efbafb0b70..8d4530ed2fc6 100644
@@ -241,7 +241,7 @@ tmu2: timer@ffd82000 {
 
 	rcar_sound: sound@ffd90000 {
 		/*
-		 * #sound-dai-cells is required
+		 * #sound-dai-cells is required if simple-card
 		 *
 		 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 		 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7790.dtsi +1 -1
index db171e3c62f2..b5e362fab418 100644
@@ -1109,7 +1109,7 @@ vin3: video@e6ef3000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7791.dtsi +1 -1
index d8f91d9f42ae..853eef9e031d 100644
@@ -1223,7 +1223,7 @@ vin2: video@e6ef2000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7793.dtsi +1 -1
index 9ebe7bfaf0ed..8bc3e19f8adf 100644
@@ -988,7 +988,7 @@ vin2: video@e6ef2000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7794.dtsi +1 -1
index 7aa781ff3bff..371dd4715dde 100644
@@ -955,7 +955,7 @@ vin1: video@e6ef1000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/8 arm64: dts: renesas: #sound-dai-cells is used when simple-card

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

Current sound comment is indicating that #sound-dai-cells is required, but it is needed if board is using "simple-card". This patch tidyup the comment.
Because it is already using "audio-graph", this patch removes unneeded #sound-dai-cells from ulcb.dtsi / salvator-common.dtsi.

---
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a774c0.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a774e1.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a77951.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a77960.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a77961.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a77965.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a77990.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a77995.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/salvator-common.dtsi | 3 ---
 arch/arm64/boot/dts/renesas/ulcb.dtsi            | 3 ---
 12 files changed, 10 insertions(+), 16 deletions(-)
arch/arm64/boot/dts/renesas/r8a774a1.dtsi +1 -1
index 7e643243c3be..c21b78685123 100644
@@ -1678,7 +1678,7 @@ vin7csi40: endpoint@2 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a774b1.dtsi +1 -1
index d541b48c7e38..82216ce7a92a 100644
@@ -1562,7 +1562,7 @@ vin7csi40: endpoint@2 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a774c0.dtsi +1 -1
index 151e32ac0368..e21653d86228 100644
@@ -1317,7 +1317,7 @@ vin5csi40: endpoint@2 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a774e1.dtsi +1 -1
index c5a0e7866b2f..2828e05b40b3 100644
@@ -1774,7 +1774,7 @@ vin7csi20: endpoint@0 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a77951.dtsi +1 -1
index 07c8763c1e77..f770d160e948 100644
@@ -1998,7 +1998,7 @@ drif31: rif@e6fb0000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a77960.dtsi +1 -1
index 1424d4ad941f..09c61696f7fb 100644
@@ -1870,7 +1870,7 @@ drif31: rif@e6fb0000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a77961.dtsi +1 -1
index 3c744b7d0dc4..59a18dfcb8cc 100644
@@ -1750,7 +1750,7 @@ vin7csi40: endpoint@2 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a77965.dtsi +1 -1
index 997f29521f66..9b4f7ad95ca8 100644
@@ -1733,7 +1733,7 @@ drif31: rif@e6fb0000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a77990.dtsi +1 -1
index 3053b4b21497..d4718f144e33 100644
@@ -1469,7 +1469,7 @@ drif31: rif@e6fb0000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a77995.dtsi +1 -1
index f040d03e0a87..e25024a7b66c 100644
@@ -1037,7 +1037,7 @@ vin4: video@e6ef4000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/salvator-common.dtsi +0 -3
index d97473401819..4a3d5037821f 100644
@@ -799,9 +799,6 @@ &rcar_sound {
 	pinctrl-0 = <&sound_pins>, <&sound_clk_pins>;
 	pinctrl-names = "default";
 
-	/* Single DAI */
-	#sound-dai-cells = <0>;
-
 	/* audio_clkout0/1/2/3 */
 	#clock-cells = <1>;
 	clock-frequency = <12288000 11289600>;
arch/arm64/boot/dts/renesas/ulcb.dtsi +0 -3
index 29cedf4dc1a9..4b6562fc1bdf 100644
@@ -381,9 +381,6 @@ &rcar_sound {
 	pinctrl-0 = <&sound_pins>, <&sound_clk_pins>;
 	pinctrl-names = "default";
 
-	/* Single DAI */
-	#sound-dai-cells = <0>;
-
 	/* audio_clkout0/1/2/3 */
 	#clock-cells = <1>;
 	clock-frequency = <12288000 11289600>;
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/8 arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Audio Graph Card" DT setting file for ULCB/KF. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

---
 .../dts/renesas/ulcb-audio-graph-card.dtsi    | 85 ++++++++++++++++++
 .../dts/renesas/ulcb-kf-audio-graph-card.dtsi | 88 +++++++++++++++++++
 2 files changed, 173 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi new file +85 -0
new file mode 100644
index 000000000000..8a1ca100cef8
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Audio Graph Card
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ *	(A) CPU0 ------ ak4613
+ *	(B) CPU1 ------ HDMI
+ *
+ *	(A) aplay   -D plughw:0,0 xxx.wav
+ *	(B) aplay   -D plughw:0,1 xxx.wav
+ *
+ *	(A) arecord -D plughw:0,0 xxx.wav
+ */
+
+/ {
+	sound_card: sound {
+		compatible = "audio-graph-card";
+		label = "rcar-sound";
+
+		dais = <&rsnd_port0	/* (A) ak4613 */
+			&rsnd_port1	/* (B) HDMI0  */
+		>;
+	};
+};
+
+&ak4613 {
+	#sound-dai-cells = <0>;
+
+	port {
+		/*
+		 * (A) CPU0 <-> ak4613
+		 */
+		ak4613_endpoint: endpoint {
+			remote-endpoint = <&rsnd_for_ak4613>;
+		};
+	};
+};
+
+&hdmi0 {
+	ports {
+		port@2 {
+			/*
+			 * (B) CPU1 <-> HDMI
+			 */
+			dw_hdmi0_snd_in: endpoint {
+				remote-endpoint = <&rsnd_for_hdmi>;
+			};
+		};
+	};
+};
+
+&rcar_sound {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		rsnd_port0: port@0 {
+			/*
+			 * (A) CPU0 <-> ak4613
+			 */
+			reg = <0>;
+			rsnd_for_ak4613: endpoint {
+				remote-endpoint = <&ak4613_endpoint>;
+				bitclock-master;
+				frame-master;
+				playback = <&ssi0>, <&src0>, <&dvc0>;
+				capture  = <&ssi1>, <&src1>, <&dvc1>;
+			};
+		};
+		rsnd_port1: port@1 {
+			/*
+			 * (B) CPU1 <-> HDMI
+			 */
+			reg = <1>;
+			rsnd_for_hdmi: endpoint {
+				remote-endpoint = <&dw_hdmi0_snd_in>;
+				bitclock-master;
+				frame-master;
+				playback = <&ssi2>;
+			};
+		};
+	};
+};
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi new file +88 -0

88 lines not on this page · raw message

Signature · 1 line
2.25.1
#4 lore raw

Re: [PATCH 3/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi

Hi Morimoto-san,

Quoted 25 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

Quoted 7 lines

This patch adds "Audio Graph Card" DT setting file for ULCB/KF. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

Thanks for your patch!

Quoted 11 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi new file +8 -0
 
+&ak4613 {
+       #sound-dai-cells = <0>;
+
+       port {
+               /*
+                * (A) CPU0 <-> ak4613
+                */
+               ak4613_endpoint: endpoint {

arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi line 46

Quoted 10 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi new file +10 -0
+                       remote-endpoint = <&rsnd_for_ak4613>;
+               };
+       };
+};
+
+&hdmi0 {
+       ports {
+               port@2 {
+                       /*
+                        * (B) CPU1 <-> HDMI

As this is used for playback only, "CPU1 -> HDMI"?

Quoted 18 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi new file +18 -0
+                        */
+                       dw_hdmi0_snd_in: endpoint {
+                               remote-endpoint = <&rsnd_for_hdmi>;
+                       };
+               };
+       };
+};
+
+&rcar_sound {
+       ports {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               rsnd_port0: port@0 {
+                       /*
+                        * (A) CPU0 <-> ak4613
+                        */
+                       reg = <0>;
+                       rsnd_for_ak4613: endpoint {

arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi line 74

Quoted 10 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi new file +10 -0
+                               remote-endpoint = <&ak4613_endpoint>;
+                               bitclock-master;
+                               frame-master;
+                               playback = <&ssi0>, <&src0>, <&dvc0>;
+                               capture  = <&ssi1>, <&src1>, <&dvc1>;
+                       };
+               };
+               rsnd_port1: port@1 {
+                       /*
+                        * (B) CPU1 <-> HDMI

CPU1 -> HDMI

Quoted 14 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi new file +11 -0
+                        */
+                       reg = <1>;
+                       rsnd_for_hdmi: endpoint {
+                               remote-endpoint = <&dw_hdmi0_snd_in>;
+                               bitclock-master;
+                               frame-master;
+                               playback = <&ssi2>;
+                       };
+               };
+       };
+};

arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi line 36

Quoted 8 lines
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi new file +7 -0
 
+&pcm3168a {
+       ports {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               mclk-fs = <512>;
+               /*
+                * (C) CPU2 <-> PCM3168A-p

CPU2 -> PCM3168A-p

arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi line 46

Quoted 10 lines
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi new file +10 -0
+                */
+               port@0 {
+                       reg = <0>;
+                       pcm3168a_endpoint_p: endpoint {
+                               remote-endpoint = <&rsnd_for_pcm3168a_play>;
+                               clocks = <&clksndsel>;
+                       };
+               };
+               /*
+                * (D) CPU3 <-> PCM3168A-c

As this is used for capture only, "CPU3 <- PCM3168A-c"?

Quoted 6 lines
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi new file +6 -0
+                */
+               port@1 {
+                       reg = <1>;
+                       pcm3168a_endpoint_c: endpoint {
+                               remote-endpoint = <&rsnd_for_pcm3168a_capture>;
+                               clocks = <&clksndsel>;

arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi line 62

Quoted 10 lines
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi new file +10 -0
+                       };
+               };
+       };
+};
+
+&rcar_sound {
+       ports {
+               /* rsnd_port0/1 are defined in ulcb.dtsi */
+               /*
+                * (C) CPU2 <-> PCM3168A-p

CPU2 -> PCM3168A-p

arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi line 75

Quoted 13 lines
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi new file +13 -0
+                */
+               rsnd_port2: port@2 {
+                       reg = <2>;
+                       rsnd_for_pcm3168a_play: endpoint {
+                               remote-endpoint = <&pcm3168a_endpoint_p>;
+                               bitclock-master;
+                               frame-master;
+                               dai-tdm-slot-num = <8>;
+                               playback = <&ssi3>;
+                       };
+               };
+               /*
+                * (D) CPU3 <-> PCM3168A-c

CPU3 <- PCM3168A-c

arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi line 88

Quoted 13 lines
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi new file +13 -0
+                */
+               rsnd_port3: port@3 {
+                       reg = <3>;
+                       rsnd_for_pcm3168a_capture: endpoint {
+                               remote-endpoint = <&pcm3168a_endpoint_c>;
+                               bitclock-master;
+                               frame-master;
+                               dai-tdm-slot-num = <6>;
+                               capture = <&ssi4>;
+                       };
+               };
+       };
+};

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#5 lore raw

PATCH 4/8 arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Audio Graph Card2" DT setting file for ULCB/KF, and switch to use it. We can switch to other Generic Audio Graph driver if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

---
 .../dts/renesas/ulcb-audio-graph-card2.dtsi   | 26 ++++++++
 .../renesas/ulcb-kf-audio-graph-card2.dtsi    | 30 +++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      | 62 +++----------------
 arch/arm64/boot/dts/renesas/ulcb.dtsi         | 52 +++-------------
 4 files changed, 75 insertions(+), 95 deletions(-)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2.dtsi
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2.dtsi new file +26 -0
new file mode 100644
index 000000000000..4668ee5383fc
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Audio Graph Card2
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ *	(A) CPU0 ------ ak4613
+ *	(B) CPU1 ------ HDMI
+ *
+ *	(A) aplay   -D plughw:0,0 xxx.wav
+ *	(B) aplay   -D plughw:0,1 xxx.wav
+ *
+ *	(A) arecord -D plughw:0,0 xxx.wav
+ */
+#include "ulcb-audio-graph-card.dtsi"
+
+&sound_card {
+	compatible = "audio-graph-card2";
+
+	/delete-property/ dais;
+	links = <&rsnd_port0	/* (A) ak4613 */
+		 &rsnd_port1	/* (B) HDMI0  */
+		>;
+};
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2.dtsi new file +30 -0
new file mode 100644
index 000000000000..7b4ed8fc8cc2
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Kingfisher + Audio Graph Card2
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ *	(A) CPU0 ------ ak4613
+ *	(B) CPU1 ------ HDMI
+ *	(C) CPU2 ------ PCM3168A-p (8ch)
+ *	(D) CPU3 ------ PCM3168A-c (6ch)
+ *
+ *	(A) aplay   -D plughw:0,0 xxx.wav
+ *	(B) aplay   -D plughw:0,1 xxx.wav
+ *	(C) aplay   -D plughw:0,2 xxx.wav
+ *
+ *	(A) arecord -D plughw:0,0 xxx.wav
+ *	(D) arecord -D plughw:0,3 xxx.wav
+ */
+#include "ulcb-kf-audio-graph-card.dtsi"
+
+&sound_card {
+	/delete-property/ dais;
+	links = <&rsnd_port0	/* (A) ak4613 */
+		 &rsnd_port1	/* (B) HDMI0  */
+		 &rsnd_port2	/* (C) pcm3168a playback */
+		 &rsnd_port3	/* (D) pcm3168a capture  */
+		>;
+};
arch/arm64/boot/dts/renesas/ulcb-kf.dtsi +10 -52

83 lines not on this page · raw message

arch/arm64/boot/dts/renesas/ulcb.dtsi +9 -43

85 lines not on this page · raw message

Signature · 1 line
2.25.1
#6 lore raw

Re: [PATCH 4/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi

Hi Morimoto-san,

Quoted 25 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

Quoted 8 lines

This patch adds "Audio Graph Card2" DT setting file for ULCB/KF, and switch to use it. We can switch to other Generic Audio Graph driver if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

Thanks for your patch!

Quoted 8 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2.dtsi new file +5 -0
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Audio Graph Card2
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.

arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2.dtsi line 15

Quoted 10 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2.dtsi new file +10 -0
+ */
+
+/*
+ *     (A) CPU0 ------ ak4613
+ *     (B) CPU1 ------ HDMI
+ *
+ *     (A) aplay   -D plughw:0,0 xxx.wav
+ *     (B) aplay   -D plughw:0,1 xxx.wav
+ *
+ *     (A) arecord -D plughw:0,0 xxx.wav

I think you should remove the existing aplay/arecord commands from ulcb.dtsi (and ulcb-kf.dtsi).

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#7 lore raw

PATCH 5/8 arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Simle Audio Card" DT setting file for ULCB/KF. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

---
 .../renesas/ulcb-kf-simple-audio-card.dtsi    | 85 ++++++++++++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      |  1 +
 .../dts/renesas/ulcb-simple-audio-card.dtsi   | 89 +++++++++++++++++++
 arch/arm64/boot/dts/renesas/ulcb.dtsi         |  1 +
 4 files changed, 176 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card.dtsi
arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi new file +85 -0
new file mode 100644
index 000000000000..8949145d447d
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Kingfisher + Simple Audio Card
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ *	(A) CPU0 ------ ak4613
+ *	(B) CPU1 ------ HDMI
+ *	(C) CPU2 ------ PCM3168A-p
+ *	(D) CPU3 ------ PCM3168A-c
+ *
+ *	(A) aplay   -D plughw:0,0 xxx.wav
+ *	(B) aplay   -D plughw:0,1 xxx.wav
+ *	(C) aplay   -D plughw:0,2 xxx.wav
+ *
+ *	(A) arecord -D plughw:0,0 xxx.wav
+ *	(D) arecord -D plughw:0,3 xxx.wav
+ */
+
+&sound_card {
+	/* dai-link@0/1 are defined in ulcb.dtsi */
+
+	/*
+	 * (C) CPU2 <-> PCM3168A-p
+	 */
+	simple-audio-card,dai-link@2 {
+		reg = <2>;
+		cpu {
+			bitclock-master;
+			frame-master;
+			dai-tdm-slot-num = <8>;
+			sound-dai = <&rcar_sound 2>;
+		};
+		codec {
+			mclk-fs = <512>;
+			sound-dai = <&pcm3168a 0>;
+		};
+	};
+	/*
+	 * (D) CPU3 <-> PCM3168A-c
+	 */
+	simple-audio-card,dai-link@3 {
+		reg = <3>;
+		cpu {
+			bitclock-master;
+			frame-master;
+			dai-tdm-slot-num = <6>;
+			sound-dai = <&rcar_sound 3>;
+		};
+		codec {
+			mclk-fs = <512>;
+			sound-dai = <&pcm3168a 1>;
+		};
+	};
+};
+
+&pcm3168a {
+	/*
+	 * (C) CPU2 <-> PCM3168A-p
+	 * (D) CPU3 <-> PCM3168A-c
+	 */
+	#sound-dai-cells = <1>;
+};
+
+&rcar_sound {
+
+	/* dai0-1 are defined in ulcb.dtsi */
+
+	rcar_sound,dai {
+		/*
+		 * (C) CPU2 <-> PCM3168A-p
+		 */
+		dai2 {
+			playback = <&ssi3>;
+		};
+		/*
+		 * (D) CPU3 <-> PCM3168A-c
+		 */
+		dai3 {
+			capture = <&ssi4>;
+		};
+	};
+};
arch/arm64/boot/dts/renesas/ulcb-kf.dtsi +1 -0
index b5877120ab46..6913d778a40b 100644
@@ -453,6 +453,7 @@ &xhci0 {
  * We can switch Audio Card for testing
  * see also ulcb.dtsi
  *
+ * #include "ulcb-kf-simple-audio-card.dtsi"
  * #include "ulcb-kf-audio-graph-card.dtsi"
  */
 #include "ulcb-kf-audio-graph-card2.dtsi"
arch/arm64/boot/dts/renesas/ulcb-simple-audio-card.dtsi new file +89 -0

89 lines not on this page · raw message

arch/arm64/boot/dts/renesas/ulcb.dtsi +1 -0
index 6196494452c9..497d07df6944 100644
@@ -501,6 +501,7 @@ &usb2_phy1 {
  *
  * We can switch Audio Card for testing
  *
+ * #include "ulcb-simple-audio-card.dtsi"
  * #include "ulcb-audio-graph-card.dtsi"
  */
 #include "ulcb-audio-graph-card2.dtsi"
Signature · 1 line
2.25.1
#8 lore raw

Re: [PATCH 5/8] arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi

Hi Morimoto-san,

Quoted 25 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

Quoted 7 lines

This patch adds "Simle Audio Card" DT setting file for ULCB/KF. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

Thanks for your patch!

Quoted 19 lines
arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi new file +16 -0
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Kingfisher + Simple Audio Card
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ *     (A) CPU0 ------ ak4613
+ *     (B) CPU1 ------ HDMI
+ *     (C) CPU2 ------ PCM3168A-p
+ *     (D) CPU3 ------ PCM3168A-c
+ *
+ *     (A) aplay   -D plughw:0,0 xxx.wav
+ *     (B) aplay   -D plughw:0,1 xxx.wav
+ *     (C) aplay   -D plughw:0,2 xxx.wav

arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi line 26

Quoted 10 lines
arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi new file +10 -0
+ *
+ *     (A) arecord -D plughw:0,0 xxx.wav
+ *     (D) arecord -D plughw:0,3 xxx.wav
+ */
+
+&sound_card {
+       /* dai-link@0/1 are defined in ulcb.dtsi */
+
+       /*
+        * (C) CPU2 <-> PCM3168A-p

"->", as this is used for playback only (everywhere, in all patches).

arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi line 69

Quoted 3 lines
arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi new file +3 -0
+&rcar_sound {
+
+       /* dai0-1 are defined in ulcb.dtsi */

I think this comment belongs under "rcar_sound,dai" below.

Quoted 6 lines
arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi new file +6 -0
+
+       rcar_sound,dai {
+               /*
+                * (C) CPU2 <-> PCM3168A-p
+                */
+               dai2 {

arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi line 85

Quoted 10 lines
arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi new file +10 -0
+                       playback = <&ssi3>;
+               };
+               /*
+                * (D) CPU3 <-> PCM3168A-c
+                */
+               dai3 {
+                       capture = <&ssi4>;
+               };
+       };
+};

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#9 lore raw

PATCH 6/8 arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Audio Graph Card2 + MIXer + TDM Split" DT setting file for ULCB/KF. Because it reach to subdevice maximum, it ignore HDMI. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

---
 .../ulcb-audio-graph-card2-mix+split.dtsi     | 111 +++++++++++
 .../ulcb-kf-audio-graph-card2-mix+split.dtsi  | 177 ++++++++++++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      |   1 +
 arch/arm64/boot/dts/renesas/ulcb.dtsi         |   1 +
 4 files changed, 290 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi new file +111 -0
new file mode 100644
index 000000000000..af84b03c2a94
@@ -0,0 +1,111 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Audio Graph Card2 (MIX + TDM Split)
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ * Note:
+ * Because there is subdevice maximum, it will ignore HDMI output
+ *
+ *	(A) CPU0 (2ch) ------ (2ch) (X) ak4613  (MIX-0)
+ *	(B) CPU1 (2ch) --/                      (MIX-1)
+ *
+ *	(A) aplay   -D plughw:0,0 xxx.wav
+ *	(B) aplay   -D plughw:0,1 xxx.wav
+ *
+ *	(A) arecord -D plughw:0,0 xxx.wav
+ */
+/ {
+	sound_card: sound {
+		compatible = "audio-graph-card2";
+		label = "rcar-sound";
+
+		routing = "ak4613 Playback", "DAI0 Playback",
+		"ak4613 Playback", "DAI1 Playback",
+		"DAI0 Capture",    "ak4613 Capture";
+
+		/delete-property/ dais;
+		links = <&fe_a		/* (A) CPU0   */
+			 &fe_b		/* (B) CPU1   */
+			 &be_x		/* (X) ak4613 */
+		>;
+
+		dpcm {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			ports@0 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				reg = <0>;
+				/*
+				 * FE
+				 * (A) CPU0 (MIX-0)
+				 * (B) CPU1 (MIX-1)
+				 */
+			fe_a:	port@0 { reg = <0>; fe_a_ep: endpoint { remote-endpoint = <&rsnd_a_ep>; }; };
+			fe_b:	port@1 { reg = <1>; fe_b_ep: endpoint { remote-endpoint = <&rsnd_b_ep>; }; };
+			};
+
+			ports@1 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				reg = <1>;
+				/*
+				 * BE
+				 * (X) ak4613
+				 */
+			be_x:	port@0 { reg = <0>; be_x_ep: endpoint { remote-endpoint = <&ak4613_x_ep>; }; };
+			};
+		};
+	};
+};
+
+&ak4613 {
+	port {
+		/*
+		 * (X) ak4613
+		 */
+		prefix = "ak4613";
+		convert-rate = <48000>;
+
+		ak4613_x_ep: endpoint {
+			remote-endpoint = <&be_x_ep>;
+		};
+	};
+};
+
+&rcar_sound {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/*
+		 * (A) CPU0 (MIX-0)
+		 */
+		port@0 {
+			reg = <0>;
+			rsnd_a_ep: endpoint {
+				remote-endpoint = <&fe_a_ep>;
+				bitclock-master;
+				frame-master;
+				playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
+				capture  = <&ssi1 &src0 &dvc1>;
+			};
+		};
+		/*
+		 * (B) CPU1 (MIX-1)
+		 */
+		port@1 {
+			reg = <1>;
+			rsnd_b_ep: endpoint {
+				remote-endpoint = <&fe_b_ep>;
+				bitclock-master;
+				frame-master;
+				playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
+			};
+		};
+	};
+};
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi new file +177 -0

177 lines not on this page · raw message

arch/arm64/boot/dts/renesas/ulcb-kf.dtsi +1 -0
index 6913d778a40b..0690c1b1b5e9 100644
@@ -455,5 +455,6 @@ &xhci0 {
  *
  * #include "ulcb-kf-simple-audio-card.dtsi"
  * #include "ulcb-kf-audio-graph-card.dtsi"
+ * #include "ulcb-kf-audio-graph-card2-mix+split.dtsi"
  */
 #include "ulcb-kf-audio-graph-card2.dtsi"
arch/arm64/boot/dts/renesas/ulcb.dtsi +1 -0
index 497d07df6944..b357267a9083 100644
@@ -503,5 +503,6 @@ &usb2_phy1 {
  *
  * #include "ulcb-simple-audio-card.dtsi"
  * #include "ulcb-audio-graph-card.dtsi"
+ * #include "ulcb-audio-graph-card2-mix+split.dtsi"
  */
 #include "ulcb-audio-graph-card2.dtsi"
Signature · 1 line
2.25.1
#10 lore raw

Re: [PATCH 6/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi

Hi Morimoto-san,

Quoted 25 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

Quoted 8 lines

This patch adds "Audio Graph Card2 + MIXer + TDM Split" DT setting file for ULCB/KF. Because it reach to subdevice maximum, it ignore HDMI. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

Thanks for your patch!

Quoted 37 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi new file +34 -0
@@ -0,0 +1,111 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Audio Graph Card2 (MIX + TDM Split)
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ * Note:
+ * Because there is subdevice maximum, it will ignore HDMI output
+ *
+ *     (A) CPU0 (2ch) ------ (2ch) (X) ak4613  (MIX-0)
+ *     (B) CPU1 (2ch) --/                      (MIX-1)
+ *
+ *     (A) aplay   -D plughw:0,0 xxx.wav
+ *     (B) aplay   -D plughw:0,1 xxx.wav
+ *
+ *     (A) arecord -D plughw:0,0 xxx.wav
+ */
+/ {
+       sound_card: sound {
+               compatible = "audio-graph-card2";
+               label = "rcar-sound";
+
+               routing = "ak4613 Playback", "DAI0 Playback",
+               "ak4613 Playback", "DAI1 Playback",
+               "DAI0 Capture",    "ak4613 Capture";
+
+               /delete-property/ dais;
+               links = <&fe_a          /* (A) CPU0   */
+                        &fe_b          /* (B) CPU1   */
+                        &be_x          /* (X) ak4613 */
+               >;
+

arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi line 44

Quoted 10 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi new file +10 -0
+               dpcm {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       ports@0 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0>;
+                               /*
+                                * FE

FE = Front End?

arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi line 49

Quoted 5 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi new file +5 -0
+                                * (A) CPU0 (MIX-0)
+                                * (B) CPU1 (MIX-1)
+                                */
+                       fe_a:   port@0 { reg = <0>; fe_a_ep: endpoint { remote-endpoint = <&rsnd_a_ep>; }; };
+                       fe_b:   port@1 { reg = <1>; fe_b_ep: endpoint { remote-endpoint = <&rsnd_b_ep>; }; };

Please preserve alignment (i.e. insert TAB before fe_[ab] labels).

arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi line 57

Quoted 8 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi new file +8 -0
+                       };
+
+                       ports@1 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <1>;
+                               /*
+                                * BE

Back End? (I guess not Big Endian ;-)

arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi line 60

Quoted 3 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi new file +3 -0
+                                * (X) ak4613
+                                */
+                       be_x:   port@0 { reg = <0>; be_x_ep: endpoint { remote-endpoint = <&ak4613_x_ep>; }; };

Likewise

arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi line 69

Quoted 9 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi new file +9 -0
+                       };
+               };
+       };
+};
+
+&ak4613 {
+       port {
+               /*
+                * (X) ak4613

Perhaps add an arrow, and a target, like in the other patches? (everywhere)

arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi line 78

Quoted 9 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi new file +9 -0
+                */
+               prefix = "ak4613";
+               convert-rate = <48000>;
+
+               ak4613_x_ep: endpoint {
+                       remote-endpoint = <&be_x_ep>;
+               };
+       };
+};

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#11 lore raw

Re: [PATCH 6/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi

Hi Geert

Quoted 1 line

FE = Front End?

(snip)

Quoted 1 line

Back End? (I guess not Big Endian ;-)

Yes

Quoted 5 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+               /*
+                * (X) ak4613

Perhaps add an arrow, and a target, like in the other patches? (everywhere)

It is difficult to explain via text, but on normal connection case, SoC <-> Codec are connected, thus the comment like
"CPU0 <-> ak4613" is correct.

But On MIX+Split case, it is using DPCM which connects "FE" and "BE" at runtime.
So there are no connection between (FE)SoC <-> (BE)Codec at this time. So the above comment (= no arrow) is correct.

Thank you for your help !!

Best regards
---
Kuninori Morimoto

#12 lore raw

Re: [PATCH 6/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi

Hi Morimoto-san,

Quoted 6 lines · Kuninori Morimoto
Quoted 5 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+               /*
+                * (X) ak4613

Perhaps add an arrow, and a target, like in the other patches? (everywhere)

Quoted 8 lines

It is difficult to explain via text, but on normal connection case, SoC <-> Codec are connected, thus the comment like
"CPU0 <-> ak4613" is correct.

But On MIX+Split case, it is using DPCM which connects "FE" and "BE" at runtime.
So there are no connection between (FE)SoC <-> (BE)Codec at this time. So the above comment (= no arrow) is correct.

So this is software policy, not hardware description? Does it belong in DTS?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#13 lore raw

Re: [PATCH 6/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi

Hi Geert

Quoted 11 lines
Quoted 8 lines

It is difficult to explain via text, but on normal connection case, SoC <-> Codec are connected, thus the comment like
"CPU0 <-> ak4613" is correct.

But On MIX+Split case, it is using DPCM which connects "FE" and "BE" at runtime.
So there are no connection between (FE)SoC <-> (BE)Codec at this time. So the above comment (= no arrow) is correct.

So this is software policy, not hardware description? Does it belong in DTS?

I'm not sure how to answer to it.
It is the description to indicate switchable hardware connection.

Thank you for your help !!

Best regards
---
Kuninori Morimoto

#14 lore raw

PATCH 7/8 arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Audio Graph Card + MIXer + TDM Split" DT setting file for ULCB/KF. Because it reach to subdevice maximum, it ignore HDMI. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

---
 .../ulcb-audio-graph-card-mix+split.dtsi      |  89 ++++++++++
 .../ulcb-kf-audio-graph-card-mix+split.dtsi   | 162 ++++++++++++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      |   1 +
 arch/arm64/boot/dts/renesas/ulcb.dtsi         |   1 +
 4 files changed, 253 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi new file +89 -0
new file mode 100644
index 000000000000..55acfe6c1268
@@ -0,0 +1,89 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Audio Graph Card (MIX)
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ * Note:
+ * Because there is subdevice maximum, it will ignore HDMI output
+ *
+ *	(A) CPU0 (2ch) ------ (2ch) ak4613     (MIX-0)
+ *	(B) CPU1 (2ch) --/                     (MIX-1)
+ *
+ *	(A) aplay   -D plughw:0,0 xxx.wav
+ *	(B) aplay   -D plughw:0,1 xxx.wav
+ *
+ *	(A) arecord -D plughw:0,0 xxx.wav
+ */
+
+/ {
+	sound_card: sound {
+		compatible = "audio-graph-scu-card";
+		label = "rcar-sound";
+
+		routing = "ak4613 Playback", "DAI0 Playback",
+			  "ak4613 Playback", "DAI1 Playback",
+			  "DAI0 Capture",    "ak4613 Capture";
+
+		dais = <&rsnd_port0 /* (A) ak4613 (MIX-0) */
+			&rsnd_port1 /* (B) ak4613 (MIX-1) */
+		>;
+	};
+};
+
+&ak4613 {
+	port {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/*
+		 * (A)/(B) ak4613
+		 */
+		prefix = "ak4613";
+		convert-rate = <48000>;
+
+		ak4613_ep1: endpoint@0 {
+			reg = <0>;
+			remote-endpoint = <&rsnd_for_ak4613_1>;
+		};
+		ak4613_ep2: endpoint@1 {
+			reg = <1>;
+			remote-endpoint = <&rsnd_for_ak4613_2>;
+		};
+	};
+};
+
+&rcar_sound {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/*
+		 * (A) CPU0
+		 */
+		rsnd_port0: port@0 {
+			reg = <0>;
+			rsnd_for_ak4613_1: endpoint {
+				remote-endpoint = <&ak4613_ep1>;
+				bitclock-master;
+				frame-master;
+				playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
+				capture  = <&ssi1 &src0 &dvc1>;
+			};
+		};
+		/*
+		 * (B) CPU1
+		 */
+		rsnd_port1: port@1 {
+			reg = <1>;
+			rsnd_for_ak4613_2: endpoint {
+				remote-endpoint = <&ak4613_ep2>;
+				bitclock-master;
+				frame-master;
+				playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
+			};
+		};
+	};
+};
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi new file +162 -0

162 lines not on this page · raw message

arch/arm64/boot/dts/renesas/ulcb-kf.dtsi +1 -0
index 0690c1b1b5e9..131846dde002 100644
@@ -455,6 +455,7 @@ &xhci0 {
  *
  * #include "ulcb-kf-simple-audio-card.dtsi"
  * #include "ulcb-kf-audio-graph-card.dtsi"
+ * #include "ulcb-kf-audio-graph-card-mix+split.dtsi"
  * #include "ulcb-kf-audio-graph-card2-mix+split.dtsi"
  */
 #include "ulcb-kf-audio-graph-card2.dtsi"
arch/arm64/boot/dts/renesas/ulcb.dtsi +1 -0
index b357267a9083..d8b0b07404ca 100644
@@ -503,6 +503,7 @@ &usb2_phy1 {
  *
  * #include "ulcb-simple-audio-card.dtsi"
  * #include "ulcb-audio-graph-card.dtsi"
+ * #include "ulcb-audio-graph-card-mix+split.dtsi"
  * #include "ulcb-audio-graph-card2-mix+split.dtsi"
  */
 #include "ulcb-audio-graph-card2.dtsi"
Signature · 1 line
2.25.1
#15 lore raw

PATCH 8/8 arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Simle Audio Card + MIXer + TDM Split" DT setting file for ULCB/KF. Because it reach to subdevice maximum, it ignore HDMI. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

---
 .../ulcb-kf-simple-audio-card-mix+split.dtsi  | 137 ++++++++++++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      |   1 +
 .../ulcb-simple-audio-card-mix+split.dtsi     |  86 +++++++++++
 arch/arm64/boot/dts/renesas/ulcb.dtsi         |   2 +
 4 files changed, 226 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card-mix+split.dtsi
arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi new file +137 -0
new file mode 100644
index 000000000000..fba226fae0a4
@@ -0,0 +1,137 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Kingfisher + Simple Audio Card (MIX + TDM Split)
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ * Note:
+ * Because there is subdevice maximum, it will ignore HDMI output
+ *
+ *	(A) CPU0 ------ ak4613      (MIX-0)
+ *	(B) CPU1 --/                (MIX-1)
+ *	(C) CPU2 ------ PCM3168A-p  (TDM-0 : 0,1ch)
+ *	(D) CPU3 ------ PCM3168A-p  (TDM-1 : 2,3ch)
+ *	(E) CPU4 ------ PCM3168A-p  (TDM-2 : 4,5ch)
+ *	(F) CPU5 ------ PCM3168A-p  (TDM-3 : 6,7ch)
+ *	(G) CPU6 ------ PCM3168A-c
+ *
+ *	(A) aplay   -D plughw:0,0 xxx.wav (MIX-0)
+ *	(B) aplay   -D plughw:0,1 xxx.wav (MIX-1)
+ *	(C) aplay   -D plughw:0,2 xxx.wav (TDM-0)
+ *	(D) aplay   -D plughw:0,3 xxx.wav (TDM-1)
+ *	(E) aplay   -D plughw:0,4 xxx.wav (TDM-2)
+ *	(F) aplay   -D plughw:0,5 xxx.wav (TDM-3)
+ *
+ *	(A) arecord -D plughw:0,0 xxx.wav
+ *	(G) arecord -D plughw:0,6 xxx.wav
+ */
+
+&sound_card {
+
+	simple-audio-card,routing = "ak4613 Playback",   "DAI0 Playback",
+				    "ak4613 Playback",   "DAI1 Playback",
+				    "DAI0 Capture",      "ak4613 Capture",
+				    "pcm3168a Playback", "DAI2 Playback",
+				    "pcm3168a Playback", "DAI3 Playback",
+				    "pcm3168a Playback", "DAI4 Playback",
+				    "pcm3168a Playback", "DAI5 Playback";
+
+	/* dai-link@0 is defined in ulcb.dtsi */
+
+	/*
+	 * (C) CPU2 <-> PCM3168A-p  (TDM-0 : 0,1ch)
+	 * (D) CPU3 <-> PCM3168A-p  (TDM-1 : 2,3ch)
+	 * (E) CPU4 <-> PCM3168A-p  (TDM-2 : 4,5ch)
+	 * (F) CPU5 <-> PCM3168A-p  (TDM-3 : 6,7ch)
+	 */
+	simple-audio-card,dai-link@1 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <1>;
+		convert-channels = <8>; /* to 8ch TDM */
+
+		cpu@0 {
+			reg = <0>;
+			bitclock-master;
+			frame-master;
+			sound-dai = <&rcar_sound 2>;
+		};
+		cpu@1 {
+			reg = <1>;
+			sound-dai = <&rcar_sound 3>;
+		};
+		cpu@2 {
+			reg = <2>;
+			sound-dai = <&rcar_sound 4>;
+		};
+		cpu@3 {
+			reg = <3>;
+			sound-dai = <&rcar_sound 5>;
+		};
+		codec {
+			prefix = "pcm3168a";
+			mclk-fs = <512>;
+			sound-dai = <&pcm3168a 0>;
+		};
+	};
+	/*
+	 * (G) CPU6 <-> PCM3168A-c
+	 */
+	simple-audio-card,dai-link@2 {
+		reg = <2>;
+		cpu {
+			bitclock-master;
+			frame-master;
+			sound-dai = <&rcar_sound 6>;
+		};
+		codec {
+			prefix = "pcm3168a";
+			mclk-fs = <512>;
+			sound-dai = <&pcm3168a 1>;
+		};
+	};
+};
+
+&pcm3168a {
+	/*
+	 * (C) CPU2 <-> PCM3168A-p  (TDM-0 : 0,1ch)
+	 * (D) CPU3 <-> PCM3168A-p  (TDM-1 : 2,3ch)
+	 * (E) CPU4 <-> PCM3168A-p  (TDM-2 : 4,5ch)
+	 * (F) CPU5 <-> PCM3168A-p  (TDM-3 : 6,7ch)
+	 * (G) CPU6 <-> PCM3168A-c
+	 */
+	#sound-dai-cells = <1>;
+};
+
+&rcar_sound {
+
+	/* dai0-1 are defined in ulcb.dtsi */
+
+	rcar_sound,dai {
+		/*
+		 * (C) CPU2 <-> PCM3168A-p  (TDM-0 : 0,1ch)
+		 * (D) CPU3 <-> PCM3168A-p  (TDM-1 : 2,3ch)
+		 * (E) CPU4 <-> PCM3168A-p  (TDM-2 : 4,5ch)
+		 * (F) CPU5 <-> PCM3168A-p  (TDM-3 : 6,7ch)
+		 */
+		dai2 {
+			playback = <&ssiu30 &ssi3>;
+		};
+		dai3 {
+			playback = <&ssiu31 &ssi3>;
+		};
+		dai4 {
+			playback = <&ssiu32 &ssi3>;
+		};
+		dai5 {
+			playback = <&ssiu33 &ssi3>;
+		};
+		/*
+		 * (G) CPU6 <-> PCM3168A-c
+		 */
+		dai6 {
+			capture = <&ssi4>;
+	};	};
+};
arch/arm64/boot/dts/renesas/ulcb-kf.dtsi +1 -0
index 131846dde002..ec115124035b 100644
@@ -454,6 +454,7 @@ &xhci0 {
  * see also ulcb.dtsi
  *
  * #include "ulcb-kf-simple-audio-card.dtsi"
+ * #include "ulcb-kf-simple-audio-card-mix+split.dtsi"
  * #include "ulcb-kf-audio-graph-card.dtsi"
  * #include "ulcb-kf-audio-graph-card-mix+split.dtsi"
  * #include "ulcb-kf-audio-graph-card2-mix+split.dtsi"
arch/arm64/boot/dts/renesas/ulcb-simple-audio-card-mix+split.dtsi new file +86 -0

86 lines not on this page · raw message

arch/arm64/boot/dts/renesas/ulcb.dtsi +2 -0
index d8b0b07404ca..377fe6891c57 100644
@@ -496,12 +496,14 @@ &usb2_phy1 {
 	status = "okay";
 };
 
+
 /*
  * For sound-test.
  *
  * We can switch Audio Card for testing
  *
  * #include "ulcb-simple-audio-card.dtsi"
+ * #include "ulcb-simple-audio-card-mix+split.dtsi"
  * #include "ulcb-audio-graph-card.dtsi"
  * #include "ulcb-audio-graph-card-mix+split.dtsi"
  * #include "ulcb-audio-graph-card2-mix+split.dtsi"
Signature · 1 line
2.25.1
#16 lore raw
In reply to Kuninori Morimoto

Hi Geert

Quoted 24 lines

ALSA SoC is now supporting generic Sound Card driver such as Simple-Card / Audio-Graph-Card/Card2, and it supports "normal connection" and "special connections".
I'm its maintainer, thus I need/want to test these.

I have been tested these by using my local patches to switching card, but maintenance it locally is not useful for me, and users who want to know the sample DT settings.

And I have noticed that some local patch had bug, but no one noticed about it (of course :)

ULCB/KF is very good board to test these.
So, I want to upstream these.

One note here is that this patch *should not* have effect to existing normal users, but useful for test user.
So, this patch-set adds "3 card" x "2 use case" dtsi file, and ulcb/ulcb-kf "include" one of them which doesn't change anything. test user can switch to other card or other use case by changing "include" dtsi.

[1/8][2/8] are small tidyup patches for all SoC sound.

Quoted 9 lines

Kuninori Morimoto (8):
ARM: dts: renesas: #sound-dai-cells is used when simple-card
arm64: dts: renesas: #sound-dai-cells is used when simple-card
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi
arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi
arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi

Are these rejected ? or can I post these again ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto

#17 lore raw
In reply to Kuninori Morimoto

Hi Morimoto-san,

CC DT/ASoC

Quoted 15 lines · Kuninori Morimoto

ALSA SoC is now supporting generic Sound Card driver such as Simple-Card / Audio-Graph-Card/Card2, and it supports "normal connection" and "special connections".
I'm its maintainer, thus I need/want to test these.

I have been tested these by using my local patches to switching card, but maintenance it locally is not useful for me, and users who want to know the sample DT settings.

And I have noticed that some local patch had bug, but no one noticed about it (of course :)

ULCB/KF is very good board to test these.
So, I want to upstream these.

Quoted 8 lines

One note here is that this patch *should not* have effect to existing normal users, but useful for test user.
So, this patch-set adds "3 card" x "2 use case" dtsi file, and ulcb/ulcb-kf "include" one of them which doesn't change anything. test user can switch to other card or other use case by changing "include" dtsi.

[1/8][2/8] are small tidyup patches for all SoC sound.

Thanks for your series!

I really wanted to review this earlier, but I am held back by my lack of understanding of the audio subsystem and the audio bindings. It is also not clear to me what really is hardware description (i.e. to be described in DT), and what is software policy (i.e. not to be described in DT)...
Hence I have lots of questions ("A fool can ask more questions in a minute than a wise man can answer in an hour." ;-)

What is the difference between "Simple Audio Card", "Audio Graph Card", and "Audio Graph Card2"? Why do we need to support all three of them?

How come we can have no #sound-dai-cells, #sound-dai-cells = <0>, and #sound-dai-cells = <1>, for the same hardware?
What is the real difference between Single DAI and Multi DAI? Why do we need to support both?

Quoted 6 lines

Kuninori Morimoto (8):
ARM: dts: renesas: #sound-dai-cells is used when simple-card
arm64: dts: renesas: #sound-dai-cells is used when simple-card
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi
arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi

The above three all describe the same hardware configuration?

Quoted 3 lines

arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi
arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi

Is MIX and TDM Split a different hardware configuration, or software policy?

Thanks!

Quoted 39 lines
 arch/arm/boot/dts/r8a7742.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7743.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7744.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7745.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7778.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7790.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7791.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7793.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7794.dtsi                |   2 +-
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a774c0.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a774e1.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77951.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77960.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77961.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77965.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77990.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77995.dtsi     |   2 +-
 .../boot/dts/renesas/salvator-common.dtsi     |   3 -
 .../ulcb-audio-graph-card-mix+split.dtsi      |  89 +++++++++
 .../dts/renesas/ulcb-audio-graph-card.dtsi    |  85 +++++++++
 .../ulcb-audio-graph-card2-mix+split.dtsi     | 111 +++++++++++
 .../dts/renesas/ulcb-audio-graph-card2.dtsi   |  26 +++
 .../ulcb-kf-audio-graph-card-mix+split.dtsi   | 162 ++++++++++++++++
 .../dts/renesas/ulcb-kf-audio-graph-card.dtsi |  88 +++++++++
 .../ulcb-kf-audio-graph-card2-mix+split.dtsi  | 177 ++++++++++++++++++
 .../renesas/ulcb-kf-audio-graph-card2.dtsi    |  30 +++
 .../ulcb-kf-simple-audio-card-mix+split.dtsi  | 137 ++++++++++++++
 .../renesas/ulcb-kf-simple-audio-card.dtsi    |  85 +++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      |  66 ++-----
 .../ulcb-simple-audio-card-mix+split.dtsi     |  86 +++++++++
 .../dts/renesas/ulcb-simple-audio-card.dtsi   |  89 +++++++++
 arch/arm64/boot/dts/renesas/ulcb.dtsi         |  60 ++----
 34 files changed, 1212 insertions(+), 120 deletions(-)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2.dtsi
Quoted 8 lines
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card.dtsi

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#18 lore raw

Hi Geert

Quoted 5 lines

I really wanted to review this earlier, but I am held back by my lack of understanding of the audio subsystem and the audio bindings. It is also not clear to me what really is hardware description (i.e. to be described in DT), and what is software policy (i.e. not to be described in DT)...

OK, I will try to answer your question, here.

Quoted 2 lines

Hence I have lots of questions ("A fool can ask more questions in a minute than a wise man can answer in an hour." ;-)

No problem, your are very wise man :)

Quoted 2 lines

What is the difference between "Simple Audio Card", "Audio Graph Card", and "Audio Graph Card2"? Why do we need to support all three of them?

The answer is because of "history" and "compatibility".

"Simple Audio Card" was created before DT support, now it is supporting DT too. But it is for very simple sound connection. It is using own DT style.

"Audio Graph Card" is almost same as "Simple Audio Card", but it is using "Of Graph" style. It is needed for HDMI support (= Sound with Video). "Audio Graph Card" was created because it is difficult to keep compatibility for both "Of Graph style" and "own style" on "Simple Audio Card".

"Audio Graph Card2" is expand version of "Audio Graph Card", but it is supporting more complex connections.
Because of this complex connection, it is difficult to keep compatibility with "Audio Graph Card".

For normal user case, selecting one of them is very enough.
But for me, I need to test all of them, thus I want to switch these easily. And ULCB is good board for testing.

Basically, people don't need to care about this patch-set. It separates DT file, but nothing change.
It is just easy for testing.

Quoted 4 lines

How come we can have no #sound-dai-cells, #sound-dai-cells = <0>, and #sound-dai-cells = <1>, for the same hardware?
What is the real difference between Single DAI and Multi DAI? Why do we need to support both?

It is used on "Simple Audio Card".
We need <0> if the board is using SSI x 1,
and need <1> if the board is using SSI x N.
It is not mandatory if the board is using "Audio Graph Card/Card2".

Quoted 8 lines
Quoted 6 lines

Kuninori Morimoto (8):
ARM: dts: renesas: #sound-dai-cells is used when simple-card
arm64: dts: renesas: #sound-dai-cells is used when simple-card
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi
arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi

The above three all describe the same hardware configuration?

Yes, same hardware, but is using different connection style (= driver).

Quoted 6 lines
Quoted 3 lines

arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi
arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi

Is MIX and TDM Split a different hardware configuration, or software policy?

Same hardware, but different connection (= mixing, split).

Hmm, it is difficult to explain via text...
But this patch-set has no effect for users, but expand to easy to switch driver for testing for me.

Thank you for your help !!

Best regards
---
Kuninori Morimoto

#19 lore raw

Hi Morimoto-san,

Quoted 13 lines · Kuninori Morimoto
Quoted 2 lines

What is the difference between "Simple Audio Card", "Audio Graph Card", and "Audio Graph Card2"? Why do we need to support all three of them?

The answer is because of "history" and "compatibility".

"Simple Audio Card" was created before DT support, now it is supporting DT too. But it is for very simple sound connection. It is using own DT style.

"Audio Graph Card" is almost same as "Simple Audio Card", but it is using "Of Graph" style. It is needed for HDMI support (= Sound with Video). "Audio Graph Card" was created because it is difficult to keep compatibility for both "Of Graph style" and "own style" on "Simple Audio Card".

Quoted 4 lines

"Audio Graph Card2" is expand version of "Audio Graph Card", but it is supporting more complex connections.
Because of this complex connection, it is difficult to keep compatibility with "Audio Graph Card".

So they are different ways (generations) of representing the audio topology on the board? Like "operating-points" and "operating-points-v2" for cpufreq?

Hence these are orthogonal to (and independent of) the underlying audio hardware in the SoC?

Quoted 7 lines

For normal user case, selecting one of them is very enough.
But for me, I need to test all of them, thus I want to switch these easily. And ULCB is good board for testing.

Basically, people don't need to care about this patch-set. It separates DT file, but nothing change.
It is just easy for testing.

OK. And I guess you intend to use them as examples to point people to, too?

Quoted 9 lines
Quoted 4 lines

How come we can have no #sound-dai-cells, #sound-dai-cells = <0>, and #sound-dai-cells = <1>, for the same hardware?
What is the real difference between Single DAI and Multi DAI? Why do we need to support both?

It is used on "Simple Audio Card".
We need <0> if the board is using SSI x 1,
and need <1> if the board is using SSI x N.
It is not mandatory if the board is using "Audio Graph Card/Card2".

So #sound-dai-cells should be in the board DTS, and never in the SoC .dtsi? Hence it should be moved out of arch/arm/boot/dts/{r8a7740,sh73a0}.dtsi and arch/arm64/boot/dts/renesas/r9a07g0{43,44,54}.dtsi?

Quoted 10 lines
Quoted 8 lines
Quoted 6 lines

Kuninori Morimoto (8):
ARM: dts: renesas: #sound-dai-cells is used when simple-card
arm64: dts: renesas: #sound-dai-cells is used when simple-card
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi
arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi

The above three all describe the same hardware configuration?

Yes, same hardware, but is using different connection style (= driver).

OK.

Quoted 10 lines
Quoted 6 lines
Quoted 3 lines

arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi
arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi

Is MIX and TDM Split a different hardware configuration, or software policy?

Same hardware, but different connection (= mixing, split).

Hmm, it is difficult to explain via text...

IC, this is more complicated...

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#20 lore raw

Hi Geert

Quoted 9 lines
Quoted 4 lines

It is used on "Simple Audio Card".
We need <0> if the board is using SSI x 1,
and need <1> if the board is using SSI x N.
It is not mandatory if the board is using "Audio Graph Card/Card2".

So #sound-dai-cells should be in the board DTS, and never in the SoC .dtsi? Hence it should be moved out of arch/arm/boot/dts/{r8a7740,sh73a0}.dtsi and arch/arm64/boot/dts/renesas/r9a07g0{43,44,54}.dtsi?

Hmm, it is difficult to explain via text...

On rsnd case, how many DAIs exist is based on the board, and its connection (= R-Car SoC).
But FSI has fixed DAIs (= SH), thus having #sound-dai-cells on SoC is not strange (= r8a7740/sh73a0).

And I'm not sure how it works on r9a07g0xx,
it is not my drivers.

Thank you for your help !!

Best regards
---
Kuninori Morimoto