I2S audio output not working

Hi,

I’m trying to configure nano I2S audio output as below:
aud_mclk
I2S3_LRCK
I2S3_SDATA_IN
I2S3_SDATA_OUT
I2S3_SCLK

I’ve done some dtsi modifications, compile to DTB and signed, flash to mmcblk0p10.
Build u-boot and flash via command

sudo ./flash.sh -k LNX jetson-nano-qspi-sd mmcblk0p1

Got aud_mclk working with 12.2MHz.

Test with command, but still not working.

speaker-test -c2 -twav -D plughw:CARD=tegrasndt210ref,DEV=0

Could anyone give me a hint? Many thanks.

diff --git a/u-boot/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h b/u-boot/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h
index 49df131..f050f5d 100644
--- a/u-boot/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h
+++ b/u-boot/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h
@@ -70,7 +70,6 @@ static const struct tegra_gpio_config p3450_porg_gpio_inits[] = {
        GPIO_INIT(Z,    0,   IN),
        GPIO_INIT(Z,    2,   IN),
        GPIO_INIT(Z,    3,   OUT0),
-       GPIO_INIT(BB,   0,   IN),
        GPIO_INIT(CC,   4,   IN),
        GPIO_INIT(CC,   7,   OUT1),
        GPIO_INIT(DD,   0,   IN),
@@ -116,7 +115,7 @@ static const struct pmux_pingrp_config p3450_porg_pingrps[] = {
        PINCFG(UART3_CTS_PD4,        UARTC,      UP,     NORMAL,   INPUT,   DISABLE, DEFAULT),
        PINCFG(DMIC1_CLK_PE0,        I2S3,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
        PINCFG(DMIC1_DAT_PE1,        I2S3,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
-       PINCFG(DMIC2_CLK_PE2,        I2S3,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
+       PINCFG(DMIC2_CLK_PE2,        I2S3,       NORMAL, NORMAL,   OUTPUT,  DISABLE, DEFAULT),
        PINCFG(DMIC2_DAT_PE3,        I2S3,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
        PINCFG(DMIC3_CLK_PE4,        RSVD2,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
        PINCFG(DMIC3_DAT_PE5,        RSVD2,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
@@ -216,7 +215,7 @@ static const struct pmux_pingrp_config p3450_porg_pingrps[] = {
        PINCFG(DAP2_SCLK_PAA1,       I2S2,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
        PINCFG(DAP2_DIN_PAA2,        I2S2,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
        PINCFG(DAP2_DOUT_PAA3,       I2S2,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
-       PINCFG(AUD_MCLK_PBB0,        DEFAULT,    UP,     NORMAL,   INPUT,   DISABLE, DEFAULT),
+       PINCFG(AUD_MCLK_PBB0,        AUD,        UP,     NORMAL,   OUTPUT,  DISABLE, DEFAULT),
        PINCFG(DVFS_PWM_PBB1,        CLDVFS,     NORMAL, TRISTATE, OUTPUT,  DISABLE, DEFAULT),
        PINCFG(DVFS_CLK_PBB2,        RSVD0,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
        PINCFG(GPIO_X1_AUD_PBB3,     RSVD0,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
diff --git a/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-gpio-p3448-0000-a02.dtsi b/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-gpio-p3448-0000-a02.dtsi
index 6acdc55..530ab08 100755
--- a/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-gpio-p3448-0000-a02.dtsi
+++ b/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-gpio-p3448-0000-a02.dtsi
@@ -20,13 +20,13 @@
 #include <dt-bindings/gpio/tegra-gpio.h>
 
 / {
 	gpio: gpio@6000d000 {
 		gpio-init-names = "default";
 		gpio-init-0 = <&gpio_default>;
 
 		gpio_default: default {
 			gpio-input = <
-				TEGRA_GPIO(BB, 0)
 				TEGRA_GPIO(B, 4)
 				TEGRA_GPIO(B, 5)
 				TEGRA_GPIO(B, 6)
diff --git a/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0000-a02.dtsi b/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0000-a02.dtsi
index b226e1a..03916f8 100755
--- a/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0000-a02.dtsi
+++ b/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0000-a02.dtsi
@@ -29,6 +29,14 @@
 
 		pinmux_default: common {
 			/* SFIO Pin Configuration */
+			aud_mclk_pbb0 {
+				nvidia,pins = "aud_mclk_pbb0";
+				nvidia,function = "aud";
+				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+				nvidia,tristate = <TEGRA_PIN_DISABLE>;
+				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+			};
+
 			dvfs_pwm_pbb1 {
 				nvidia,pins = "dvfs_pwm_pbb1";
 				nvidia,function = "cldvfs";
@@ -58,7 +66,7 @@
 				nvidia,function = "i2s3";
 				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
 				nvidia,tristate = <TEGRA_PIN_DISABLE>;
-				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
 			};
 
 			dmic2_dat_pe3 {
@@ -591,14 +599,6 @@
 			};
 
 			/* GPIO Pin Configuration */
-			aud_mclk_pbb0 {
-				nvidia,pins = "aud_mclk_pbb0";
-				nvidia,function = "rsvd1";
-				nvidia,pull = <TEGRA_PIN_PULL_UP>;
-				nvidia,tristate = <TEGRA_PIN_DISABLE>;
-				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
-			};
-
 			spi2_mosi_pb4 {
 				nvidia,pins = "spi2_mosi_pb4";
 				nvidia,function = "rsvd2";

and check…

~# cat /sys/kernel/debug/pinctrl/700008d4.pinmux/pinmux-pins
pin 218 (DVFS_CLK PBB2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 219 (GPIO_X1_AUD PBB3): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 220 (GPIO_X3_AUD PBB4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 224 (HDMI_CEC PCC0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 225 (HDMI_INT_DP_HPD PCC1): (MUX UNCLAIMED) tegra-gpio:225
pin 226 (SPDIF_OUT PCC2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 227 (SPDIF_IN PCC3): (MUX UNCLAIMED) (GPIO UNCLAIMED)

and

~#  cat /sys/kernel/debug/pinctrl/700008d4.pinmux/pinmux-functions | grep -i i2s3
function: i2s3, groups = [ dmic1_clk_pe0 dmic1_dat_pe1 dmic2_clk_pe2 dmic2_dat_pe3 ]

root@efrd-desktop:~# cat /sys/kernel/debug/pinctrl/pinctrl-handles | grep i2s3
    type: MUX_GROUP controller 700008d4.pinmux group: dmic1_clk_pe0 (52) function: i2s3 (24)
    type: MUX_GROUP controller 700008d4.pinmux group: dmic1_dat_pe1 (53) function: i2s3 (24)
    type: MUX_GROUP controller 700008d4.pinmux group: dmic2_clk_pe2 (54) function: i2s3 (24)
    type: MUX_GROUP controller 700008d4.pinmux group: dmic2_dat_pe3 (55) function: i2s3 (24)

and

root@efrd-desktop:~# cat /sys/kernel/debug/tegra_gpio
Name:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL
 A: 0:0 64 40 40 04 00 00 000000
 B: 0:1 f0 00 00 00 00 00 000000
 C: 0:2 1f 00 00 18 00 00 000000
 D: 0:3 00 00 00 00 00 00 000000
 E: 1:0 40 00 00 00 00 00 000000
 F: 1:1 00 00 00 00 00 00 000000
 G: 1:2 0c 00 00 0c 00 00 000000
 H: 1:3 fd 99 00 60 00 00 000000
 I: 2:0 07 07 02 00 00 00 000000
 J: 2:1 f0 00 00 00 00 00 000000
 K: 2:2 00 00 00 00 00 00 000000
 L: 2:3 00 00 00 00 00 00 000000
 M: 3:0 00 00 00 00 00 00 000000
 N: 3:1 00 00 00 00 00 00 000000
 O: 3:2 00 00 00 00 00 00 000000
 P: 3:3 00 00 00 00 00 00 000000
 Q: 4:0 00 00 00 00 00 00 000000
 R: 4:1 00 00 00 00 00 00 000000
 S: 4:2 a0 80 00 20 00 00 000000
 T: 4:3 01 01 00 00 00 00 000000
 U: 5:0 00 00 00 00 00 00 000000
 V: 5:1 03 00 00 00 00 00 000000
 W: 5:2 00 00 00 00 00 00 000000
 X: 5:3 78 08 08 70 00 60 606000
 Y: 6:0 06 00 00 02 00 00 000000
 Z: 6:1 0f 08 08 05 00 06 020600
AA: 6:2 00 00 00 00 00 00 000000
BB: 6:3 00 00 00 00 00 00 000000
CC: 7:0 92 80 80 10 00 12 121200
DD: 7:1 01 00 00 00 00 00 000000
EE: 7:2 00 00 00 00 00 00 000000
FF: 7:3 00 00 00 00 00 00 000000

Hi Brandon,

I don’t see any issue with I2S3 configuration and it should have worked.

On Nano, AUD_MCLK and I2S4 (not I2S3) signals are exposed via 40 Pin header. However, I observe that you are trying to use I2S3 along with AUD_MCLK. Is it intentional?

For I2S4 signals (exposed via 40Pin Header), pinmux-config-p3450-porg.h should be updated for I2S4 as well as below:

diff --git a/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h b/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h
index 49df131..bd1bf08 100644
--- a/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h
+++ b/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h
@@ -52,10 +52,6 @@
 	GPIO_INIT(I,    0,   OUT0),
 	GPIO_INIT(I,    1,   OUT1),
 	GPIO_INIT(I,    2,   OUT0),
-	GPIO_INIT(J,    4,   IN),
-	GPIO_INIT(J,    5,   IN),
-	GPIO_INIT(J,    6,   IN),
-	GPIO_INIT(J,    7,   IN),
 	GPIO_INIT(S,    5,   IN),
 	GPIO_INIT(S,    7,   OUT0),
 	GPIO_INIT(T,    0,   OUT0),
@@ -70,7 +66,6 @@
 	GPIO_INIT(Z,    0,   IN),
 	GPIO_INIT(Z,    2,   IN),
 	GPIO_INIT(Z,    3,   OUT0),
-	GPIO_INIT(BB,   0,   IN),
 	GPIO_INIT(CC,   4,   IN),
 	GPIO_INIT(CC,   7,   OUT1),
 	GPIO_INIT(DD,   0,   IN),
@@ -148,6 +143,10 @@
 	PINCFG(GEN1_I2C_SCL_PJ1,     I2C1,       NORMAL, NORMAL,   INPUT,   DISABLE, HIGH),
 	PINCFG(GEN2_I2C_SCL_PJ2,     I2C2,       NORMAL, NORMAL,   INPUT,   DISABLE, HIGH),
 	PINCFG(GEN2_I2C_SDA_PJ3,     I2C2,       NORMAL, NORMAL,   INPUT,   DISABLE, HIGH),
+	PINCFG(DAP4_FS_PJ4,          I2S4B,      DOWN,   NORMAL,   INPUT,   DISABLE, DEFAULT),
+	PINCFG(DAP4_DIN_PJ5,         I2S4B,      DOWN,   NORMAL,   INPUT,   DISABLE, DEFAULT),
+	PINCFG(DAP4_DOUT_PJ6,        I2S4B,      DOWN,   NORMAL,   OUTPUT,  DISABLE, DEFAULT),
+	PINCFG(DAP4_SCLK_PJ7,        I2S4B,      DOWN,   NORMAL,   INPUT,   DISABLE, DEFAULT),
 	PINCFG(PK0,                  RSVD2,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(PK1,                  RSVD2,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(PK2,                  RSVD2,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
@@ -216,7 +215,7 @@
 	PINCFG(DAP2_SCLK_PAA1,       I2S2,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
 	PINCFG(DAP2_DIN_PAA2,        I2S2,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
 	PINCFG(DAP2_DOUT_PAA3,       I2S2,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
-	PINCFG(AUD_MCLK_PBB0,        DEFAULT,    UP,     NORMAL,   INPUT,   DISABLE, DEFAULT),
+	PINCFG(AUD_MCLK_PBB0,        AUD,        UP,     NORMAL,   OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(DVFS_PWM_PBB1,        CLDVFS,     NORMAL, TRISTATE, OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(DVFS_CLK_PBB2,        RSVD0,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(GPIO_X1_AUD_PBB3,     RSVD0,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),

With JetPack 4.2.1, No need to modify DTS files for pinmux settings. Which Jetpack version are you using?

Also, Please provide mixer control settings configured before the test.

Thanks,
Sharad

Hi sharadg,

Really thanks to your reply.

I’m using L4T Jetson Nano R32.2 for my environment.

About the mixer control settings, can you give me a hint.
I found there are many items when I use this command.

alsamixer -c 1
┌──────────────────────────────── AlsaMixer v1.1.3 ─────────────────────────────────┐
│ Card: tegra-snd-t210ref-mobile-rt565x                     F1:  Help               │
│ Chip:                                                     F2:  System information │
│ View: F3:[Playback] F4: Capture  F5: All                  F6:  Select sound card  │
│ Item: I2S1 Mux [ADMAIF4]                                  Esc: Exit               │
│                                                                                   │
│                                                                                   →
│                                                                                   →
│                                                                                   →
│                  ADMAIF4                                  None                    →
│                                                                                   →
│                                                                                   │
│                                                                                   │
│  <               I2S1 Mux               >               I2S2 Mux                  │
│                                                                                   │
└───────────────────────────────────────────────────────────────────────────────────┘

One other thing, do I have to modify this part in
hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi?

nvidia,audio-routing =
			"x Headphone",	"x OUT",
			"x IN",		"x Mic",
			"y Headphone",	"y OUT",
			"y IN",		"y Mic",
			"a IN",		"a Mic",
			"b IN",		"b Mic";

		nvidia,xbar = <&tegra_axbar>;

		i2s_dai_link1: nvidia,dai-link-1 {
			link-name = "spdif-dit-0";
			cpu-dai = <&tegra_i2s4>;
			codec-dai = <&spdif_dit0>;
			cpu-dai-name = "I2S4";
			codec-dai-name = "dit-hifi";
			format = "i2s";
			bitclock-slave;
			frame-slave;
			bitclock-noninversion;
			frame-noninversion;
			bit-format = "s16_le";
			bclk_ratio = <1>;
			srate = <48000>;
			num-channel = <2>;
			ignore_suspend;
			name-prefix = "x";
			status = "okay";
		};

If I modified and update dtb into mmcblk0p10, is it necessary to update kernel too?

Thanks,

Brandon

Hi Brandon,

  1. Pinmux for AUD_MCLK and I2S4 (40 Pin Header): Please update “pinmux-config-p3450-porg.h” as suggested in my previous comment. (https://devtalk.nvidia.com/default/topic/1061108/jetson-nano/i2s-audio-output-not-working/post/5374074/#5374074)

  2. Build & Flash Nano

  3. Set Mixer controls (Please refer to the documentation provided along with the BSP https://developer.nvidia.com/embedded/dlc/NVIDIA_Tegra_Linux_Driver_Package - Section “ASoC Driver for Jetson Products”)

Playback and Capture examples:

To playback via I2S4 with ADMA I/F 1

# amixer -c tegrasndt210ref cset name=“I2S4 Mux” ADMAIF1
# aplay -D hw:tegrasndt210ref,0 <inputfile.wav>

To use I2S4 with ADMA I/F 1 for capture

# amixer -c tegrasndt210ref cset name=“ADMAIF1 Mux” I2S4
# arecord -D hw:tegrasndt210ref,0 -r <rate> -c <no.of channels> -b <bits per sample> <outputfile.wav>

No need to modify “hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi” if you just want to probe I2S4 signals. However if you interface I2S4 with external codec, sound node needs to be updated.

For DTB update, kernel update is not required. Let us know if you have further queries on this.

Thanks,
Sharad

Hi Sharad,

Thanks for your quick reply.

I’ve done few modifications(HW/SW) using I2S4, and successfully get audio playback/record work with the external audio codec.
Thanks for your help.

But I have reason to use I2S3 and need to get it work.
Following the same logic of modification, I2S3 seems still has something wrong.
I found even I checked “pinmux-config-p3450-porg.h”, there is no GPIO_INIT on
GPIO3_PE.00,
GPIO3_PE.01,
GPIO3_PE.02 and
GPIO3_PE.03,

and set

PINCFG(DMIC1_CLK_PE0,        I2S3,       DOWN,   NORMAL,   INPUT,   DISABLE, DEFAULT),
PINCFG(DMIC1_DAT_PE1,        I2S3,       DOWN,   NORMAL,   INPUT,   DISABLE, DEFAULT),
PINCFG(DMIC2_CLK_PE2,        I2S3,       DOWN,   NORMAL,   OUTPUT,  DISABLE, DEFAULT),
PINCFG(DMIC2_DAT_PE3,        I2S3,       DOWN,   NORMAL,   INPUT,   DISABLE, DEFAULT),

I still get the result

sudo grep "Name:\|E:\|BB:" /sys/kernel/debug/tegra_gpio
[sudo] password for efrd: 
Name:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL
 E: 1:0 <b>40</b> 00 00 40 00 00 000000
BB: 6:3 00 00 00 00 00 00 000000
EE: 7:2 00 00 00 00 00 00 000000

No information about Pin 222:

sudo cat /sys/kernel/debug/pinctrl/700008d4.pinmux/pinmux-pins | grep "224\|222\|220\|226"
pin 220 (GPIO_X3_AUD PBB4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 224 (HDMI_CEC PCC0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 226 (SPDIF_OUT PCC2): (MUX UNCLAIMED) (GPIO UNCLAIMED)

Am I encounter same issue with this?
[https://devtalk.nvidia.com/default/topic/1057982/jetson-nano/audio-pins-config-on-r32-2/post/5364914/#5364914]

I’m running out my further ideas and time.
If I’m right, I maybe just one step away to get this done.
Really need your help. Thank you.

Brandon

Hi Brandon,

I2S3 should work with 32.2 out of the box. There is no extra pinmux setting required for I2S3. I am trying to re-test I2S3 signals but my setup requires some HW reworks, so it is taking time. Hopefully I will be able to provide concrete info by tomorrow.

You are looking at wrong info as “sudo cat /sys/kernel/debug/pinctrl/700008d4.pinmux/pinmux-pins” doesn’t print CVM connector Pin numbers. (224, 222, 220, 226 are CVM connector pin numbers for DAP3 signals)

You could grep based on signal names:

sudo cat /sys/kernel/debug/pinctrl/700008d4.pinmux/pinmux-pins | grep "DMIC1\|DMIC2"

Can you share output of :

sudo cat /sys/kernel/debug/tegra_pinctrl_reg | grep dmic

Thanks,
Sharad

Hi Brandon,

Confirmed I2S3 works with Jetpack 4.2.1 (BSP 32.2). No extra pinmux settings required for I2S3.

Please make sure you are probing right I2S3 pins from CVM/CVB J2 (CON_SODIMM260_JETSON_NANO) connector.
Pins: 220, 222, 224, 226.

Please refer to Jetson_Nano_Carrier_Board_Concept_Schematics.pdf (page 5) : “Jetson Nano Carrier Board Reference Design Files” @ https://developer.nvidia.com/embedded/downloads.

cat /sys/kernel/debug/tegra_pinctrl_reg | grep dmic
Bank: 1 Reg: 0x700030a4 Val: 0x00000041 -> dmic1_clk_pe0
Bank: 1 Reg: 0x700030a8 Val: 0x00000041 -> dmic1_dat_pe1
Bank: 1 Reg: 0x700030ac Val: 0x00000041 -> dmic2_clk_pe2
Bank: 1 Reg: 0x700030b0 Val: 0x00000041 -> dmic2_dat_pe3

Thanks,
Sharad

I am doing something similar for audio playback thru a rpi compatible card.

AUDIO_MCLK - PIN 7
I2S_4_LRCK - PIN 35
I2S_4_SDOUT - PIN 40
I2S_4_SCLK - PIN 12

Connected to ES9023
http://www.raspberrypiwiki.com/index.php/X450

I have JetPack 4.2.2 running. However unable to verify L4T version…

ajusr@airplay-nano:~$ head -1 /etc/nv_tegra_release
head: cannot open '/etc/nv_tegra_release' for reading: No such file or directory

ajusr@airplay-nano:~$ amixer -c tegrasndt210ref cset name=“I2S2 Mux” "ADMAIF3"
amixer: Cannot find the given element from control hw:1

OR

ajusr@airplay-nano:~$ amixer -c tegrasndt210ref cset name=“I2S3 Mux” "ADMAIF3"
amixer: Cannot find the given element from control hw:1

The documentation says - The pins for the audio interface must be configured as special function IOs (SFIOs) and not GPIOs. Then the pinmux settings for the SFIO must select the desired audio function.

However reading the comment above I believe no extra pinmux settings required for I2S3.

I might be doing something really silly. I would like to get the sound setup through this board. Any guidance is appreciated!

Hi,

  1. Syntax is wrong. Please execute below:
amixer -c tegrasndt210ref cset name="I2S3 Mux" "ADMAIF3"
amixer -c tegrasndt210ref cset name="I2S4 Mux" "ADMAIF3"
  1. However reading the comment above I believe no extra pinmux settings required for I2S3.

It is true that for I2S3 there is no extra Pinmux setting required. However I believe you are using 40Pin Header which exposes I2S4 and requires extra Pinmux configuration. Please refer to the comment : https://devtalk.nvidia.com/default/topic/1061108/jetson-nano/i2s-audio-output-not-working/post/5374780/#5374780

Thanks,
Sharad

Thank you! I will test this and report back.

Looks like I did not apply the patch/flash the board correctly.
Not seeing i2s4

ajusr@airplay-nano:~$ sudo cat /sys/kernel/debug/pinctrl/pinctrl-handles | grep i2s
    type: MUX_GROUP controller 700008d4.pinmux group: dmic1_clk_pe0 (52) function: i2s3 (24)
    type: MUX_GROUP controller 700008d4.pinmux group: dmic1_dat_pe1 (53) function: i2s3 (24)
    type: MUX_GROUP controller 700008d4.pinmux group: dmic2_clk_pe2 (54) function: i2s3 (24)
    type: MUX_GROUP controller 700008d4.pinmux group: dmic2_dat_pe3 (55) function: i2s3 (24)
    type: MUX_GROUP controller 700008d4.pinmux group: dap2_din_paa2 (89) function: i2s2 (23)
    type: MUX_GROUP controller 700008d4.pinmux group: dap2_dout_paa3 (90) function: i2s2 (23)
    type: MUX_GROUP controller 700008d4.pinmux group: dap2_fs_paa0 (88) function: i2s2 (23)
    type: MUX_GROUP controller 700008d4.pinmux group: dap2_sclk_paa1 (91) function: i2s2 (23)
device: tegra210-i2s.2 current state: none
device: tegra210-i2s.3 current state: dap_inactive

I did execute this before.

amixer -c tegrasndt210ref cset name="I2S3 Mux" "ADMAIF3"
amixer -c tegrasndt210ref cset name="I2S4 Mux" "ADMAIF3"

I will try again by reading the manual properly. Jetson Nano Developer Kit 40-Pin Expansion Header Configuration.https://developer.nvidia.com/embedded/dlc/Jetson-Nano-40-Pin-Expansion-Header-1.1

Hi Sharad,

Thank you for your great support.

I test audio function on the SD card version of Jetson Nano.
Do you think it’s the reason that I failed?

Due to reasons, we have some adjustment on our hardware and the issue is kind of resolved.

Thanks again for your time.

The i2s4 is the default in jetpack 4.2.1? Because i’m trying to access and i can’t see the i2s interface enabled.

Hi,

I2S4 is not enabled by default with Jetpack 4.2.1. To enable I2S4 with JetPack 4.2.1, please update “pinmux-config-p3450-porg.h” as below -

diff --git a/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h b/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h
index 49df131..bd1bf08 100644
--- a/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h
+++ b/board/nvidia/p3450-porg/pinmux-config-p3450-porg.h
@@ -52,10 +52,6 @@
 	GPIO_INIT(I,    0,   OUT0),
 	GPIO_INIT(I,    1,   OUT1),
 	GPIO_INIT(I,    2,   OUT0),
-	GPIO_INIT(J,    4,   IN),
-	GPIO_INIT(J,    5,   IN),
-	GPIO_INIT(J,    6,   IN),
-	GPIO_INIT(J,    7,   IN),
 	GPIO_INIT(S,    5,   IN),
 	GPIO_INIT(S,    7,   OUT0),
 	GPIO_INIT(T,    0,   OUT0),
@@ -70,7 +66,6 @@
 	GPIO_INIT(Z,    0,   IN),
 	GPIO_INIT(Z,    2,   IN),
 	GPIO_INIT(Z,    3,   OUT0),
-	GPIO_INIT(BB,   0,   IN),
 	GPIO_INIT(CC,   4,   IN),
 	GPIO_INIT(CC,   7,   OUT1),
 	GPIO_INIT(DD,   0,   IN),
@@ -148,6 +143,10 @@
 	PINCFG(GEN1_I2C_SCL_PJ1,     I2C1,       NORMAL, NORMAL,   INPUT,   DISABLE, HIGH),
 	PINCFG(GEN2_I2C_SCL_PJ2,     I2C2,       NORMAL, NORMAL,   INPUT,   DISABLE, HIGH),
 	PINCFG(GEN2_I2C_SDA_PJ3,     I2C2,       NORMAL, NORMAL,   INPUT,   DISABLE, HIGH),
+	PINCFG(DAP4_FS_PJ4,          I2S4B,      DOWN,   NORMAL,   INPUT,   DISABLE, DEFAULT),
+	PINCFG(DAP4_DIN_PJ5,         I2S4B,      DOWN,   NORMAL,   INPUT,   DISABLE, DEFAULT),
+	PINCFG(DAP4_DOUT_PJ6,        I2S4B,      DOWN,   NORMAL,   OUTPUT,  DISABLE, DEFAULT),
+	PINCFG(DAP4_SCLK_PJ7,        I2S4B,      DOWN,   NORMAL,   INPUT,   DISABLE, DEFAULT),
 	PINCFG(PK0,                  RSVD2,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(PK1,                  RSVD2,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(PK2,                  RSVD2,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
@@ -216,7 +215,7 @@
 	PINCFG(DAP2_SCLK_PAA1,       I2S2,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
 	PINCFG(DAP2_DIN_PAA2,        I2S2,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
 	PINCFG(DAP2_DOUT_PAA3,       I2S2,       NORMAL, NORMAL,   INPUT,   DISABLE, DEFAULT),
-	PINCFG(AUD_MCLK_PBB0,        DEFAULT,    UP,     NORMAL,   INPUT,   DISABLE, DEFAULT),
+	PINCFG(AUD_MCLK_PBB0,        AUD,        UP,     NORMAL,   OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(DVFS_PWM_PBB1,        CLDVFS,     NORMAL, TRISTATE, OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(DVFS_CLK_PBB2,        RSVD0,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
 	PINCFG(GPIO_X1_AUD_PBB3,     RSVD0,      DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),

Thanks,
Sharad

Hi is this the final solution ? could you tell how to compile u-boot and deploy to sdk ?

Hi,
Please follow the steps mentioned @ https://developer.nvidia.com/embedded/downloads#?search=Jetson%20Nano%20Developer%20Kit%2040-Pin%20Expansion%20Header%20Configuration for compiling u-boot and flashing.

I patched the u-boot and this works forme … but one question

how to flash the u-boot.bin only.

sudo ./flash.sh jetson-nano-qspi-sd mmcblk0p1 this will flash everything seems.

Hello!

Please see the following instructions for flashing only the u-boot binary …

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fuboot_guide.html%23wwpID0E04H0HA

Regards,
Jon