diff mbox series

[1/3] arm64: dts: renesas: ulcb/ulcb-kf: switch to use audio-graph-card2 for sound

Message ID 87wnl8wloh.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series arm64: use Audio Graph Card2 on ULCB | expand

Commit Message

Kuninori Morimoto Nov. 16, 2021, 8:26 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current ULCB{-KF} are using audio-graph-card.
Now ALSA is supporting new audio-graph-card2 which can easily handle
more advanced feature. Let's switch to use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 22 ++++++++--------------
 arch/arm64/boot/dts/renesas/ulcb.dtsi    | 20 +++++++-------------
 2 files changed, 15 insertions(+), 27 deletions(-)

Comments

Geert Uytterhoeven Nov. 23, 2021, 11:42 a.m. UTC | #1
Hi Morimoto-san,

On Tue, Nov 16, 2021 at 9:26 AM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Current ULCB{-KF} are using audio-graph-card.
> Now ALSA is supporting new audio-graph-card2 which can easily handle
> more advanced feature. Let's switch to use it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thanks for your patch!

Unfortunately this introduces several errors from "make dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/sound/renesas,rsnd.yaml".
Probably the renesas,rand need to be amended first?

> --- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
> +++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
> @@ -302,12 +302,9 @@ rsnd_port2: port@2 {
>                         reg = <2>;
>                         rsnd_for_pcm3168a_play: endpoint {
>                                 remote-endpoint = <&pcm3168a_endpoint_p>;
> -
> -                               dai-format = "i2s";
> -                               bitclock-master = <&rsnd_for_pcm3168a_play>;
> -                               frame-master = <&rsnd_for_pcm3168a_play>;
> +                               bitclock-master;
> +                               frame-master;

arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dt.yaml: sound@ec500000:
ports:port@2: Unevaluated properties are not allowed ('reg',
'phandle', 'endpoint' were unexpected)
        From schema: Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dt.yaml: sound@ec500000:
ports:port@2:endpoint:frame-master: True is not of type 'array'
        From schema: Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dt.yaml: sound@ec500000:
ports:port@2:endpoint:bitclock-master: True is not of type 'array'
        From schema: Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

>                                 dai-tdm-slot-num = <8>;
> -
>                                 playback = <&ssi3>;
>                         };
>                 };
> @@ -315,12 +312,9 @@ rsnd_port3: port@3 {
>                         reg = <3>;
>                         rsnd_for_pcm3168a_capture: endpoint {
>                                 remote-endpoint = <&pcm3168a_endpoint_c>;
> -
> -                               dai-format = "i2s";
> -                               bitclock-master = <&rsnd_for_pcm3168a_capture>;
> -                               frame-master = <&rsnd_for_pcm3168a_capture>;
> +                               bitclock-master;
> +                               frame-master;

arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dt.yaml: sound@ec500000:
ports:port@3: Unevaluated properties are not allowed ('reg',
'phandle', 'endpoint' were unexpected)
        From schema: Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dt.yaml: sound@ec500000:
ports:port@3:endpoint:frame-master: True is not of type 'array'
        From schema: Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dt.yaml: sound@ec500000:
ports:port@3:endpoint:bitclock-master: True is not of type 'array'
        From schema: Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

>                                 dai-tdm-slot-num = <6>;
> -
>                                 capture  = <&ssi4>;
>                         };
>                 };
> @@ -360,10 +354,10 @@ wlcore: wlcore@2 {
>  };
>
>  &sound_card {
> -       dais = <&rsnd_port0     /* ak4613 */
> -               &rsnd_port1     /* HDMI0  */
> -               &rsnd_port2     /* pcm3168a playback */
> -               &rsnd_port3     /* pcm3168a capture  */
> +       links = <&rsnd_port0    /* ak4613 */
> +                &rsnd_port1    /* HDMI0  */
> +                &rsnd_port2    /* pcm3168a playback */
> +                &rsnd_port3    /* pcm3168a capture  */
>                 >;
>  };
>
> diff --git a/arch/arm64/boot/dts/renesas/ulcb.dtsi b/arch/arm64/boot/dts/renesas/ulcb.dtsi
> index 7edffe7f8cfa..b4e69d212970 100644
> --- a/arch/arm64/boot/dts/renesas/ulcb.dtsi
> +++ b/arch/arm64/boot/dts/renesas/ulcb.dtsi
> @@ -94,11 +94,11 @@ reg_3p3v: regulator1 {
>         };
>
>         sound_card: sound {
> -               compatible = "audio-graph-card";
> +               compatible = "audio-graph-card2";
>                 label = "rcar-sound";
>
> -               dais = <&rsnd_port0     /* ak4613 */
> -                       &rsnd_port1     /* HDMI0  */
> +               links = <&rsnd_port0    /* ak4613 */
> +                        &rsnd_port1    /* HDMI0  */
>                         >;
>         };
>
> @@ -411,11 +411,8 @@ rsnd_port0: port@0 {
>                         reg = <0>;
>                         rsnd_for_ak4613: endpoint {
>                                 remote-endpoint = <&ak4613_endpoint>;
> -
> -                               dai-format = "left_j";
> -                               bitclock-master = <&rsnd_for_ak4613>;
> -                               frame-master = <&rsnd_for_ak4613>;
> -
> +                               bitclock-master;
> +                               frame-master;

arch/arm64/boot/dts/renesas/r8a77951-ulcb.dt.yaml: sound@ec500000:
ports:port@0: Unevaluated properties are not allowed ('reg',
'phandle', 'endpoint' were unexpected)
        From schema: Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
arch/arm64/boot/dts/renesas/r8a77951-ulcb.dt.yaml: sound@ec500000:
ports:port@0:endpoint:frame-master: True is not of type 'array'
        From schema: Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
arch/arm64/boot/dts/renesas/r8a77951-ulcb.dt.yaml: sound@ec500000:
ports:port@0:endpoint:bitclock-master: True is not of type 'array'
        From schema: Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

>                                 playback = <&ssi0>, <&src0>, <&dvc0>;
>                                 capture  = <&ssi1>, <&src1>, <&dvc1>;
>                         };
> @@ -424,11 +421,8 @@ rsnd_port1: port@1 {
>                         reg = <1>;
>                         rsnd_for_hdmi: endpoint {
>                                 remote-endpoint = <&dw_hdmi0_snd_in>;
> -
> -                               dai-format = "i2s";
> -                               bitclock-master = <&rsnd_for_hdmi>;
> -                               frame-master = <&rsnd_for_hdmi>;
> -
> +                               bitclock-master;
> +                               frame-master;

arch/arm64/boot/dts/renesas/r8a77951-ulcb.dt.yaml: sound@ec500000:
ports:port@1: Unevaluated properties are not allowed ('reg',
'phandle', 'endpoint' were unexpected)
        From schema: Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
arch/arm64/boot/dts/renesas/r8a77951-ulcb.dt.yaml: sound@ec500000:
ports:port@1:endpoint:frame-master: True is not of type 'array'
        From schema: Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
arch/arm64/boot/dts/renesas/r8a77951-ulcb.dt.yaml: sound@ec500000:
ports:port@1:endpoint:bitclock-master: True is not of type 'array'
        From schema: Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

>                                 playback = <&ssi2>;
>                         };
>                 };

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
Kuninori Morimoto Nov. 23, 2021, 11:04 p.m. UTC | #2
Hi Geert

Thank you for your feedback

> > Current ULCB{-KF} are using audio-graph-card.
> > Now ALSA is supporting new audio-graph-card2 which can easily handle
> > more advanced feature. Let's switch to use it.
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Thanks for your patch!
> 
> Unfortunately this introduces several errors from "make dtbs_check
> DT_SCHEMA_FILES=Documentation/devicetree/bindings/sound/renesas,rsnd.yaml".
> Probably the renesas,rand need to be amended first?

Hmm ? strange.
Thanks, I will check and fix the issue.

Thank you for your help !!

Best regards
---
Kuninori Morimoto
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
index 61bd4df09df0..7266c02ee31d 100644
--- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
+++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
@@ -302,12 +302,9 @@  rsnd_port2: port@2 {
 			reg = <2>;
 			rsnd_for_pcm3168a_play: endpoint {
 				remote-endpoint = <&pcm3168a_endpoint_p>;
-
-				dai-format = "i2s";
-				bitclock-master = <&rsnd_for_pcm3168a_play>;
-				frame-master = <&rsnd_for_pcm3168a_play>;
+				bitclock-master;
+				frame-master;
 				dai-tdm-slot-num = <8>;
-
 				playback = <&ssi3>;
 			};
 		};
@@ -315,12 +312,9 @@  rsnd_port3: port@3 {
 			reg = <3>;
 			rsnd_for_pcm3168a_capture: endpoint {
 				remote-endpoint = <&pcm3168a_endpoint_c>;
-
-				dai-format = "i2s";
-				bitclock-master = <&rsnd_for_pcm3168a_capture>;
-				frame-master = <&rsnd_for_pcm3168a_capture>;
+				bitclock-master;
+				frame-master;
 				dai-tdm-slot-num = <6>;
-
 				capture  = <&ssi4>;
 			};
 		};
@@ -360,10 +354,10 @@  wlcore: wlcore@2 {
 };
 
 &sound_card {
-	dais = <&rsnd_port0	/* ak4613 */
-		&rsnd_port1	/* HDMI0  */
-		&rsnd_port2	/* pcm3168a playback */
-		&rsnd_port3	/* pcm3168a capture  */
+	links = <&rsnd_port0	/* ak4613 */
+		 &rsnd_port1	/* HDMI0  */
+		 &rsnd_port2	/* pcm3168a playback */
+		 &rsnd_port3	/* pcm3168a capture  */
 		>;
 };
 
diff --git a/arch/arm64/boot/dts/renesas/ulcb.dtsi b/arch/arm64/boot/dts/renesas/ulcb.dtsi
index 7edffe7f8cfa..b4e69d212970 100644
--- a/arch/arm64/boot/dts/renesas/ulcb.dtsi
+++ b/arch/arm64/boot/dts/renesas/ulcb.dtsi
@@ -94,11 +94,11 @@  reg_3p3v: regulator1 {
 	};
 
 	sound_card: sound {
-		compatible = "audio-graph-card";
+		compatible = "audio-graph-card2";
 		label = "rcar-sound";
 
-		dais = <&rsnd_port0	/* ak4613 */
-			&rsnd_port1	/* HDMI0  */
+		links = <&rsnd_port0	/* ak4613 */
+			 &rsnd_port1	/* HDMI0  */
 			>;
 	};
 
@@ -411,11 +411,8 @@  rsnd_port0: port@0 {
 			reg = <0>;
 			rsnd_for_ak4613: endpoint {
 				remote-endpoint = <&ak4613_endpoint>;
-
-				dai-format = "left_j";
-				bitclock-master = <&rsnd_for_ak4613>;
-				frame-master = <&rsnd_for_ak4613>;
-
+				bitclock-master;
+				frame-master;
 				playback = <&ssi0>, <&src0>, <&dvc0>;
 				capture  = <&ssi1>, <&src1>, <&dvc1>;
 			};
@@ -424,11 +421,8 @@  rsnd_port1: port@1 {
 			reg = <1>;
 			rsnd_for_hdmi: endpoint {
 				remote-endpoint = <&dw_hdmi0_snd_in>;
-
-				dai-format = "i2s";
-				bitclock-master = <&rsnd_for_hdmi>;
-				frame-master = <&rsnd_for_hdmi>;
-
+				bitclock-master;
+				frame-master;
 				playback = <&ssi2>;
 			};
 		};