Linux-Amlogic Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card
@ 2020-07-01  9:45 Jerome Brunet
  2020-07-01  9:45 ` [PATCH 1/2] arm64: dts: meson: odroid-n2: enable audio loopback Jerome Brunet
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Jerome Brunet @ 2020-07-01  9:45 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-amlogic, devicetree, linux-kernel, Jerome Brunet

This patchset adds the support for the TDM loopback and audio on the jack
output using the internal codec.

Jerome Brunet (2):
  arm64: dts: meson: odroid-n2: enable audio loopback
  arm64: dts: meson: odroid-n2: add jack audio output support

 .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 136 +++++++++++++++++-
 1 file changed, 131 insertions(+), 5 deletions(-)

-- 
2.25.4


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH 1/2] arm64: dts: meson: odroid-n2: enable audio loopback
  2020-07-01  9:45 [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card Jerome Brunet
@ 2020-07-01  9:45 ` Jerome Brunet
  2020-07-01  9:45 ` [PATCH 2/2] arm64: dts: meson: odroid-n2: add jack audio output support Jerome Brunet
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Jerome Brunet @ 2020-07-01  9:45 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-amlogic, devicetree, linux-kernel, Jerome Brunet

Add capture pcm interfaces and loopback routes to the odroid-n2

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 65 +++++++++++++++++--
 1 file changed, 61 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
index 169ea283d4ee..d4421ad164bd 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
@@ -209,11 +209,28 @@ hdmi_connector_in: endpoint {
 	sound {
 		compatible = "amlogic,axg-sound-card";
 		model = "G12B-ODROID-N2";
-		audio-aux-devs = <&tdmout_b>;
+		audio-aux-devs = <&tdmout_b>, <&tdmin_a>, <&tdmin_b>,
+				 <&tdmin_c>, <&tdmin_lb>;
 		audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
 				"TDMOUT_B IN 1", "FRDDR_B OUT 1",
 				"TDMOUT_B IN 2", "FRDDR_C OUT 1",
-				"TDM_B Playback", "TDMOUT_B OUT";
+				"TDM_B Playback", "TDMOUT_B OUT",
+				"TDMIN_A IN 4", "TDM_B Loopback",
+				"TDMIN_B IN 4", "TDM_B Loopback",
+				"TDMIN_C IN 4", "TDM_B Loopback",
+				"TDMIN_LB IN 1", "TDM_B Loopback",
+				"TODDR_A IN 0", "TDMIN_A OUT",
+				"TODDR_B IN 0", "TDMIN_A OUT",
+				"TODDR_C IN 0", "TDMIN_A OUT",
+				"TODDR_A IN 1", "TDMIN_B OUT",
+				"TODDR_B IN 1", "TDMIN_B OUT",
+				"TODDR_C IN 1", "TDMIN_B OUT",
+				"TODDR_A IN 2", "TDMIN_C OUT",
+				"TODDR_B IN 2", "TDMIN_C OUT",
+				"TODDR_C IN 2", "TDMIN_C OUT",
+				"TODDR_A IN 6", "TDMIN_LB OUT",
+				"TODDR_B IN 6", "TDMIN_LB OUT",
+				"TODDR_C IN 6", "TDMIN_LB OUT";
 
 		assigned-clocks = <&clkc CLKID_MPLL2>,
 				  <&clkc CLKID_MPLL0>,
@@ -236,8 +253,20 @@ dai-link-2 {
 			sound-dai = <&frddr_c>;
 		};
 
-		/* 8ch hdmi interface */
 		dai-link-3 {
+			sound-dai = <&toddr_a>;
+		};
+
+		dai-link-4 {
+			sound-dai = <&toddr_b>;
+		};
+
+		dai-link-5 {
+			sound-dai = <&toddr_c>;
+		};
+
+		/* 8ch hdmi interface */
+		dai-link-6 {
 			sound-dai = <&tdmif_b>;
 			dai-format = "i2s";
 			dai-tdm-slot-tx-mask-0 = <1 1>;
@@ -252,7 +281,7 @@ codec {
 		};
 
 		/* hdmi glue */
-		dai-link-4 {
+		dai-link-7 {
 			sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
 
 			codec {
@@ -476,6 +505,22 @@ &tdmif_b {
 	status = "okay";
 };
 
+&tdmin_a {
+	status = "okay";
+};
+
+&tdmin_b {
+	status = "okay";
+};
+
+&tdmin_c {
+	status = "okay";
+};
+
+&tdmin_lb {
+	status = "okay";
+};
+
 &tdmout_b {
 	status = "okay";
 };
@@ -484,6 +529,18 @@ &tohdmitx {
 	status = "okay";
 };
 
+&toddr_a {
+	status = "okay";
+};
+
+&toddr_b {
+	status = "okay";
+};
+
+&toddr_c {
+	status = "okay";
+};
+
 &uart_AO {
 	status = "okay";
 	pinctrl-0 = <&uart_ao_a_pins>;
-- 
2.25.4


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH 2/2] arm64: dts: meson: odroid-n2: add jack audio output support
  2020-07-01  9:45 [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card Jerome Brunet
  2020-07-01  9:45 ` [PATCH 1/2] arm64: dts: meson: odroid-n2: enable audio loopback Jerome Brunet
@ 2020-07-01  9:45 ` Jerome Brunet
  2020-07-29  9:00 ` [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card Neil Armstrong
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Jerome Brunet @ 2020-07-01  9:45 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-amlogic, devicetree, linux-kernel, Jerome Brunet

Add support for audio on jack socket of the odroid-n2

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 79 +++++++++++++++++--
 1 file changed, 74 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
index d4421ad164bd..34fffa6d859d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
@@ -9,6 +9,7 @@
 #include "meson-g12b-s922x.dtsi"
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/sound/meson-g12a-toacodec.h>
 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
 
 / {
@@ -20,6 +21,14 @@ aliases {
 		ethernet0 = &ethmac;
 	};
 
+	dioo2133: audio-amplifier-0 {
+		compatible = "simple-audio-amplifier";
+		enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+		VCC-supply = <&vcc_5v>;
+		sound-name-prefix = "U19";
+		status = "okay";
+	};
+
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
@@ -209,16 +218,26 @@ hdmi_connector_in: endpoint {
 	sound {
 		compatible = "amlogic,axg-sound-card";
 		model = "G12B-ODROID-N2";
-		audio-aux-devs = <&tdmout_b>, <&tdmin_a>, <&tdmin_b>,
-				 <&tdmin_c>, <&tdmin_lb>;
+		audio-widgets = "Line", "Lineout";
+		audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>,
+				 <&tdmin_b>, <&tdmin_c>, <&tdmin_lb>,
+				 <&dioo2133>;
 		audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
 				"TDMOUT_B IN 1", "FRDDR_B OUT 1",
 				"TDMOUT_B IN 2", "FRDDR_C OUT 1",
 				"TDM_B Playback", "TDMOUT_B OUT",
+				"TDMOUT_C IN 0", "FRDDR_A OUT 2",
+				"TDMOUT_C IN 1", "FRDDR_B OUT 2",
+				"TDMOUT_C IN 2", "FRDDR_C OUT 2",
+				"TDM_C Playback", "TDMOUT_C OUT",
 				"TDMIN_A IN 4", "TDM_B Loopback",
 				"TDMIN_B IN 4", "TDM_B Loopback",
 				"TDMIN_C IN 4", "TDM_B Loopback",
 				"TDMIN_LB IN 1", "TDM_B Loopback",
+				"TDMIN_A IN 5", "TDM_C Loopback",
+				"TDMIN_B IN 5", "TDM_C Loopback",
+				"TDMIN_C IN 5", "TDM_C Loopback",
+				"TDMIN_LB IN 2", "TDM_C Loopback",
 				"TODDR_A IN 0", "TDMIN_A OUT",
 				"TODDR_B IN 0", "TDMIN_A OUT",
 				"TODDR_C IN 0", "TDMIN_A OUT",
@@ -230,7 +249,11 @@ sound {
 				"TODDR_C IN 2", "TDMIN_C OUT",
 				"TODDR_A IN 6", "TDMIN_LB OUT",
 				"TODDR_B IN 6", "TDMIN_LB OUT",
-				"TODDR_C IN 6", "TDMIN_LB OUT";
+				"TODDR_C IN 6", "TDMIN_LB OUT",
+				"U19 INL", "ACODEC LOLP",
+				"U19 INR", "ACODEC LORP",
+				"Lineout", "U19 OUTL",
+				"Lineout", "U19 OUTR";
 
 		assigned-clocks = <&clkc CLKID_MPLL2>,
 				  <&clkc CLKID_MPLL0>,
@@ -275,22 +298,56 @@ dai-link-6 {
 			dai-tdm-slot-tx-mask-3 = <1 1>;
 			mclk-fs = <256>;
 
-			codec {
+			codec-0 {
 				sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
 			};
+
+			codec-1 {
+				sound-dai = <&toacodec TOACODEC_IN_B>;
+			};
 		};
 
-		/* hdmi glue */
+		/* i2s jack output interface */
 		dai-link-7 {
+			sound-dai = <&tdmif_c>;
+			dai-format = "i2s";
+			dai-tdm-slot-tx-mask-0 = <1 1>;
+			mclk-fs = <256>;
+
+			codec-0 {
+				sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
+			};
+
+			codec-1 {
+				sound-dai = <&toacodec TOACODEC_IN_C>;
+			};
+		};
+
+		/* hdmi glue */
+		dai-link-8 {
 			sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
 
 			codec {
 				sound-dai = <&hdmi_tx>;
 			};
 		};
+
+		/* acodec glue */
+		dai-link-9 {
+			sound-dai = <&toacodec TOACODEC_OUT>;
+
+			codec {
+				sound-dai = <&acodec>;
+			};
+		};
 	};
 };
 
+&acodec {
+	AVDD-supply = <&vddao_1v8>;
+	status = "okay";
+};
+
 &arb {
 	status = "okay";
 };
@@ -505,6 +562,10 @@ &tdmif_b {
 	status = "okay";
 };
 
+&tdmif_c {
+	status = "okay";
+};
+
 &tdmin_a {
 	status = "okay";
 };
@@ -525,6 +586,14 @@ &tdmout_b {
 	status = "okay";
 };
 
+&tdmout_c {
+	status = "okay";
+};
+
+&toacodec {
+	status = "okay";
+};
+
 &tohdmitx {
 	status = "okay";
 };
-- 
2.25.4


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card
  2020-07-01  9:45 [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card Jerome Brunet
  2020-07-01  9:45 ` [PATCH 1/2] arm64: dts: meson: odroid-n2: enable audio loopback Jerome Brunet
  2020-07-01  9:45 ` [PATCH 2/2] arm64: dts: meson: odroid-n2: add jack audio output support Jerome Brunet
@ 2020-07-29  9:00 ` Neil Armstrong
  2020-07-29 19:19   ` Kevin Hilman
  2020-07-29 19:21 ` patchwork-bot+linux-amlogic
  2020-08-10 22:17 ` Kevin Hilman
  4 siblings, 1 reply; 7+ messages in thread
From: Neil Armstrong @ 2020-07-29  9:00 UTC (permalink / raw)
  To: linux-amlogic

On 01/07/2020 11:45, Jerome Brunet wrote:
> This patchset adds the support for the TDM loopback and audio on the jack
> output using the internal codec.
> 
> Jerome Brunet (2):
>   arm64: dts: meson: odroid-n2: enable audio loopback
>   arm64: dts: meson: odroid-n2: add jack audio output support
> 
>  .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 136 +++++++++++++++++-
>  1 file changed, 131 insertions(+), 5 deletions(-)
> 

Kevin, seems you forgot these 2 patches

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

Neil

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card
  2020-07-29  9:00 ` [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card Neil Armstrong
@ 2020-07-29 19:19   ` Kevin Hilman
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin Hilman @ 2020-07-29 19:19 UTC (permalink / raw)
  To: Neil Armstrong, linux-amlogic

Neil Armstrong <narmstrong@baylibre.com> writes:

> On 01/07/2020 11:45, Jerome Brunet wrote:
>> This patchset adds the support for the TDM loopback and audio on the jack
>> output using the internal codec.
>> 
>> Jerome Brunet (2):
>>   arm64: dts: meson: odroid-n2: enable audio loopback
>>   arm64: dts: meson: odroid-n2: add jack audio output support
>> 
>>  .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 136 +++++++++++++++++-
>>  1 file changed, 131 insertions(+), 5 deletions(-)
>> 
>
> Kevin, seems you forgot these 2 patches
>
> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

Oops, yes I did.  Thanks for the reminder.  Will queue these for v5.9,

Kevin



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card
  2020-07-01  9:45 [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card Jerome Brunet
                   ` (2 preceding siblings ...)
  2020-07-29  9:00 ` [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card Neil Armstrong
@ 2020-07-29 19:21 ` patchwork-bot+linux-amlogic
  2020-08-10 22:17 ` Kevin Hilman
  4 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+linux-amlogic @ 2020-07-29 19:21 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: linux-amlogic, khilman

Hello:

This series was applied to khilman/linux-amlogic.git (refs/heads/for-next).

On Wed,  1 Jul 2020 11:45:54 +0200 you wrote:
> This patchset adds the support for the TDM loopback and audio on the jack
> output using the internal codec.
> 
> Jerome Brunet (2):
>   arm64: dts: meson: odroid-n2: enable audio loopback
>   arm64: dts: meson: odroid-n2: add jack audio output support
> 
> [...]


Here is a summary with links:
  - [1/2] arm64: dts: meson: odroid-n2: enable audio loopback
    https://git.kernel.org/khilman/linux-amlogic/c/a7a80474069842c27282a5e991704a0a1f26f243
  - [2/2] arm64: dts: meson: odroid-n2: add jack audio output support
    https://git.kernel.org/khilman/linux-amlogic/c/67d141c1f8e604a9c02d6a60f7827443d7f44762

You are awesome, thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/pwbot

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card
  2020-07-01  9:45 [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card Jerome Brunet
                   ` (3 preceding siblings ...)
  2020-07-29 19:21 ` patchwork-bot+linux-amlogic
@ 2020-08-10 22:17 ` Kevin Hilman
  4 siblings, 0 replies; 7+ messages in thread
From: Kevin Hilman @ 2020-08-10 22:17 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: devicetree, linux-kernel, linux-amlogic

On Wed, 1 Jul 2020 11:45:54 +0200, Jerome Brunet wrote:
> This patchset adds the support for the TDM loopback and audio on the jack
> output using the internal codec.
> 
> Jerome Brunet (2):
>   arm64: dts: meson: odroid-n2: enable audio loopback
>   arm64: dts: meson: odroid-n2: add jack audio output support
> 
> [...]

Applied, thanks!

[1/2] arm64: dts: meson: odroid-n2: enable audio loopback
      (no commit info)
[2/2] arm64: dts: meson: odroid-n2: add jack audio output support
      (no commit info)

Best regards,
-- 
Kevin Hilman <khilman@baylibre.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01  9:45 [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card Jerome Brunet
2020-07-01  9:45 ` [PATCH 1/2] arm64: dts: meson: odroid-n2: enable audio loopback Jerome Brunet
2020-07-01  9:45 ` [PATCH 2/2] arm64: dts: meson: odroid-n2: add jack audio output support Jerome Brunet
2020-07-29  9:00 ` [PATCH 0/2] arm64: dts: meson: odroid-n2: update sound card Neil Armstrong
2020-07-29 19:19   ` Kevin Hilman
2020-07-29 19:21 ` patchwork-bot+linux-amlogic
2020-08-10 22:17 ` Kevin Hilman

Linux-Amlogic Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-amlogic/0 linux-amlogic/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-amlogic linux-amlogic/ https://lore.kernel.org/linux-amlogic \
		linux-amlogic@lists.infradead.org
	public-inbox-index linux-amlogic

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-amlogic


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git