All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: rockchip: add spdif sound node for rock64
@ 2018-09-17 12:26 ` Katsuhiro Suzuki
  0 siblings, 0 replies; 9+ messages in thread
From: Katsuhiro Suzuki @ 2018-09-17 12:26 UTC (permalink / raw)
  To: Heiko Stuebner, linux-rockchip
  Cc: linux-arm-kernel, linux-kernel, Katsuhiro Suzuki

This patch adds sound card node for rock64. Currently we can support
S/PDIF only. It seems the lack of codec driver of rk3328 to enable
analog audio out.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
---
 .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
index 5852061e497b..9ee4f57557f3 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
@@ -62,6 +62,23 @@
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 	};
+
+	sound {
+		compatible = "audio-graph-card";
+		label = "rockchip,rk3328";
+		dais = <&spdif_p0>;
+	};
+
+	spdif-dit {
+		compatible = "linux,spdif-dit";
+		#sound-dai-cells = <0>;
+
+		port {
+			dit_p0_0: endpoint {
+				remote-endpoint = <&spdif_p0_0>;
+			};
+		};
+	};
 };
 
 &cpu0 {
@@ -261,6 +278,18 @@
 	status = "okay";
 };
 
+&spdif {
+	pinctrl-0 = <&spdifm0_tx>;
+	status = "okay";
+	#sound-dai-cells = <0>;
+
+	spdif_p0: port {
+		spdif_p0_0: endpoint {
+			remote-endpoint = <&dit_p0_0>;
+		};
+	};
+};
+
 &tsadc {
 	rockchip,hw-tshut-mode = <0>;
 	rockchip,hw-tshut-polarity = <0>;
-- 
2.18.0


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

* [PATCH v2] arm64: dts: rockchip: add spdif sound node for rock64
@ 2018-09-17 12:26 ` Katsuhiro Suzuki
  0 siblings, 0 replies; 9+ messages in thread
From: Katsuhiro Suzuki @ 2018-09-17 12:26 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds sound card node for rock64. Currently we can support
S/PDIF only. It seems the lack of codec driver of rk3328 to enable
analog audio out.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
---
 .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
index 5852061e497b..9ee4f57557f3 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
@@ -62,6 +62,23 @@
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 	};
+
+	sound {
+		compatible = "audio-graph-card";
+		label = "rockchip,rk3328";
+		dais = <&spdif_p0>;
+	};
+
+	spdif-dit {
+		compatible = "linux,spdif-dit";
+		#sound-dai-cells = <0>;
+
+		port {
+			dit_p0_0: endpoint {
+				remote-endpoint = <&spdif_p0_0>;
+			};
+		};
+	};
 };
 
 &cpu0 {
@@ -261,6 +278,18 @@
 	status = "okay";
 };
 
+&spdif {
+	pinctrl-0 = <&spdifm0_tx>;
+	status = "okay";
+	#sound-dai-cells = <0>;
+
+	spdif_p0: port {
+		spdif_p0_0: endpoint {
+			remote-endpoint = <&dit_p0_0>;
+		};
+	};
+};
+
 &tsadc {
 	rockchip,hw-tshut-mode = <0>;
 	rockchip,hw-tshut-polarity = <0>;
-- 
2.18.0

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

* Re: [PATCH v2] arm64: dts: rockchip: add spdif sound node for rock64
@ 2018-09-22 20:52   ` Heiko Stuebner
  0 siblings, 0 replies; 9+ messages in thread
From: Heiko Stuebner @ 2018-09-22 20:52 UTC (permalink / raw)
  To: Katsuhiro Suzuki; +Cc: linux-rockchip, linux-arm-kernel, linux-kernel

Am Montag, 17. September 2018, 14:26:33 CEST schrieb Katsuhiro Suzuki:
> This patch adds sound card node for rock64. Currently we can support
> S/PDIF only. It seems the lack of codec driver of rk3328 to enable
> analog audio out.
> 
> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>

applied for 4.20

Thanks
Heiko



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

* Re: [PATCH v2] arm64: dts: rockchip: add spdif sound node for rock64
@ 2018-09-22 20:52   ` Heiko Stuebner
  0 siblings, 0 replies; 9+ messages in thread
From: Heiko Stuebner @ 2018-09-22 20:52 UTC (permalink / raw)
  To: Katsuhiro Suzuki
  Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Am Montag, 17. September 2018, 14:26:33 CEST schrieb Katsuhiro Suzuki:
> This patch adds sound card node for rock64. Currently we can support
> S/PDIF only. It seems the lack of codec driver of rk3328 to enable
> analog audio out.
> 
> Signed-off-by: Katsuhiro Suzuki <katsuhiro-WKCMddiH/C4xsqv6Oivclw@public.gmane.org>

applied for 4.20

Thanks
Heiko

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

* [PATCH v2] arm64: dts: rockchip: add spdif sound node for rock64
@ 2018-09-22 20:52   ` Heiko Stuebner
  0 siblings, 0 replies; 9+ messages in thread
From: Heiko Stuebner @ 2018-09-22 20:52 UTC (permalink / raw)
  To: linux-arm-kernel

Am Montag, 17. September 2018, 14:26:33 CEST schrieb Katsuhiro Suzuki:
> This patch adds sound card node for rock64. Currently we can support
> S/PDIF only. It seems the lack of codec driver of rk3328 to enable
> analog audio out.
> 
> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>

applied for 4.20

Thanks
Heiko

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

* Re: [PATCH v2] arm64: dts: rockchip: add spdif sound node for rock64
  2018-09-17 12:26 ` Katsuhiro Suzuki
@ 2018-10-03  9:53   ` Chen-Yu Tsai
  -1 siblings, 0 replies; 9+ messages in thread
From: Chen-Yu Tsai @ 2018-10-03  9:53 UTC (permalink / raw)
  To: katsuhiro
  Cc: Heiko Stübner, open list:ARM/Rockchip SoC...,
	linux-kernel, linux-arm-kernel

Hi,

On Mon, Sep 17, 2018 at 8:28 PM Katsuhiro Suzuki
<katsuhiro@katsuster.net> wrote:
>
> This patch adds sound card node for rock64. Currently we can support
> S/PDIF only. It seems the lack of codec driver of rk3328 to enable
> analog audio out.
>
> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
> ---
>  .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 29 +++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
> index 5852061e497b..9ee4f57557f3 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
> @@ -62,6 +62,23 @@
>                 regulator-min-microvolt = <5000000>;
>                 regulator-max-microvolt = <5000000>;
>         };
> +
> +       sound {
> +               compatible = "audio-graph-card";
> +               label = "rockchip,rk3328";

I understand that this patch has been merged. However, seeing this label
I wonder how this works when the analog codec and HDMI audio out are added,
and how userspace is supposed to select an output.

On the side, it seems that extra codecs, such as the rock64 add-on board,
are easier dealt with by adding a separate simple-audio-card node to couple
the codec and i2s nodes.

ChenYu

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

* [PATCH v2] arm64: dts: rockchip: add spdif sound node for rock64
@ 2018-10-03  9:53   ` Chen-Yu Tsai
  0 siblings, 0 replies; 9+ messages in thread
From: Chen-Yu Tsai @ 2018-10-03  9:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Mon, Sep 17, 2018 at 8:28 PM Katsuhiro Suzuki
<katsuhiro@katsuster.net> wrote:
>
> This patch adds sound card node for rock64. Currently we can support
> S/PDIF only. It seems the lack of codec driver of rk3328 to enable
> analog audio out.
>
> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
> ---
>  .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 29 +++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
> index 5852061e497b..9ee4f57557f3 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
> @@ -62,6 +62,23 @@
>                 regulator-min-microvolt = <5000000>;
>                 regulator-max-microvolt = <5000000>;
>         };
> +
> +       sound {
> +               compatible = "audio-graph-card";
> +               label = "rockchip,rk3328";

I understand that this patch has been merged. However, seeing this label
I wonder how this works when the analog codec and HDMI audio out are added,
and how userspace is supposed to select an output.

On the side, it seems that extra codecs, such as the rock64 add-on board,
are easier dealt with by adding a separate simple-audio-card node to couple
the codec and i2s nodes.

ChenYu

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

* Re: [PATCH v2] arm64: dts: rockchip: add spdif sound node for rock64
  2018-10-03  9:53   ` Chen-Yu Tsai
@ 2018-10-05  8:34     ` Katsuhiro Suzuki
  -1 siblings, 0 replies; 9+ messages in thread
From: Katsuhiro Suzuki @ 2018-10-05  8:34 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Heiko Stübner, open list:ARM/Rockchip SoC...,
	linux-kernel, linux-arm-kernel

Hello,

Sorry for late, thank you for your comments.

On 2018年10月03日 18:53, Chen-Yu Tsai wrote:
> Hi,
> 
> On Mon, Sep 17, 2018 at 8:28 PM Katsuhiro Suzuki
> <katsuhiro@katsuster.net> wrote:
>>
>> This patch adds sound card node for rock64. Currently we can support
>> S/PDIF only. It seems the lack of codec driver of rk3328 to enable
>> analog audio out.
>>
>> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
>> ---
>>   .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 29 +++++++++++++++++++
>>   1 file changed, 29 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
>> index 5852061e497b..9ee4f57557f3 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
>> +++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
>> @@ -62,6 +62,23 @@
>>                  regulator-min-microvolt = <5000000>;
>>                  regulator-max-microvolt = <5000000>;
>>          };
>> +
>> +       sound {
>> +               compatible = "audio-graph-card";
>> +               label = "rockchip,rk3328";
> 
> I understand that this patch has been merged. However, seeing this label
> I wonder how this works when the analog codec and HDMI audio out are added,
> and how userspace is supposed to select an output.
> 

I don't know detail of HDMI audio of RK3328, but maybe it has cpu or 
codec DAIs. The audio-graph-card is supporting to use multiple DAIs on
a card. This is same as simple-audio-card.

For example, add I2S0 device as hw:X,0
(and move SPDIF to hw:X,0 -> hw:X,1)

sound {
	compatible = "audio-graph-card";
	label = "rockchip,rk3328";
	dais = <&i2s0_p0
		&spdif_p0>;
};

&i2s0 {
	status = "okay";
	#sound-dai-cells = <0>;

	i2s0_p0: port {
		i2s0_p0_0: endpoint {
			dai-format = "i2s";
			remote-endpoint = <&some_codec_abcd>;
		};
	};
};

We should write special card driver for RK3328 sound if audio-graph-card
is not enough to deal with HDMI audio.


> On the side, it seems that extra codecs, such as the rock64 add-on board,
> are easier dealt with by adding a separate simple-audio-card node to couple
> the codec and i2s nodes.

I think multiple DAIs on single card and single DAI on multiple cards
are both OK to work. But I cannot decide the way for this issue.


> 
> ChenYu
> 

Regards,
--
Katsuhiro Suzuki

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

* [PATCH v2] arm64: dts: rockchip: add spdif sound node for rock64
@ 2018-10-05  8:34     ` Katsuhiro Suzuki
  0 siblings, 0 replies; 9+ messages in thread
From: Katsuhiro Suzuki @ 2018-10-05  8:34 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

Sorry for late, thank you for your comments.

On 2018?10?03? 18:53, Chen-Yu Tsai wrote:
> Hi,
> 
> On Mon, Sep 17, 2018 at 8:28 PM Katsuhiro Suzuki
> <katsuhiro@katsuster.net> wrote:
>>
>> This patch adds sound card node for rock64. Currently we can support
>> S/PDIF only. It seems the lack of codec driver of rk3328 to enable
>> analog audio out.
>>
>> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
>> ---
>>   .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 29 +++++++++++++++++++
>>   1 file changed, 29 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
>> index 5852061e497b..9ee4f57557f3 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
>> +++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
>> @@ -62,6 +62,23 @@
>>                  regulator-min-microvolt = <5000000>;
>>                  regulator-max-microvolt = <5000000>;
>>          };
>> +
>> +       sound {
>> +               compatible = "audio-graph-card";
>> +               label = "rockchip,rk3328";
> 
> I understand that this patch has been merged. However, seeing this label
> I wonder how this works when the analog codec and HDMI audio out are added,
> and how userspace is supposed to select an output.
> 

I don't know detail of HDMI audio of RK3328, but maybe it has cpu or 
codec DAIs. The audio-graph-card is supporting to use multiple DAIs on
a card. This is same as simple-audio-card.

For example, add I2S0 device as hw:X,0
(and move SPDIF to hw:X,0 -> hw:X,1)

sound {
	compatible = "audio-graph-card";
	label = "rockchip,rk3328";
	dais = <&i2s0_p0
		&spdif_p0>;
};

&i2s0 {
	status = "okay";
	#sound-dai-cells = <0>;

	i2s0_p0: port {
		i2s0_p0_0: endpoint {
			dai-format = "i2s";
			remote-endpoint = <&some_codec_abcd>;
		};
	};
};

We should write special card driver for RK3328 sound if audio-graph-card
is not enough to deal with HDMI audio.


> On the side, it seems that extra codecs, such as the rock64 add-on board,
> are easier dealt with by adding a separate simple-audio-card node to couple
> the codec and i2s nodes.

I think multiple DAIs on single card and single DAI on multiple cards
are both OK to work. But I cannot decide the way for this issue.


> 
> ChenYu
> 

Regards,
--
Katsuhiro Suzuki

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

end of thread, other threads:[~2018-10-05  8:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17 12:26 [PATCH v2] arm64: dts: rockchip: add spdif sound node for rock64 Katsuhiro Suzuki
2018-09-17 12:26 ` Katsuhiro Suzuki
2018-09-22 20:52 ` Heiko Stuebner
2018-09-22 20:52   ` Heiko Stuebner
2018-09-22 20:52   ` Heiko Stuebner
2018-10-03  9:53 ` Chen-Yu Tsai
2018-10-03  9:53   ` Chen-Yu Tsai
2018-10-05  8:34   ` Katsuhiro Suzuki
2018-10-05  8:34     ` Katsuhiro Suzuki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.