About using PCM3010 with jetson NANO

Hello,

I compared the devkit module and the production module with your command. Please comment when you confirm the comparison.

Thank you.

Hello!

In the above bit 0 is set and so this means that the I2S4 function is not selected. I am not sure exactly what version of the Nano you have (A02 or B00), but the DTSI generated by the spreadsheet should yield changes such as the following …

diff --git a/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0002-a02.dtsi b/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0002-a02.dtsi
index 5d889ec53050..006ee00a2804 100644
--- a/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0002-a02.dtsi
+++ b/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0002-a02.dtsi
@@ -681,23 +681,23 @@
                        dap4_din_pj5 {
                                nvidia,pins = "dap4_din_pj5";
-                               nvidia,function = "rsvd1";
+                               nvidia,function = "i2s4b";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
-                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
                        dap4_dout_pj6 {
                                nvidia,pins = "dap4_dout_pj6";
-                               nvidia,function = "rsvd1";
+                               nvidia,function = "i2s4b";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
-                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
                        dap4_fs_pj4 {
                                nvidia,pins = "dap4_fs_pj4";
-                               nvidia,function = "rsvd1";
+                               nvidia,function = "i2s4b";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
@@ -705,7 +705,7 @@
                        dap4_sclk_pj7 {
                                nvidia,pins = "dap4_sclk_pj7";
-                               nvidia,function = "rsvd1";
+                               nvidia,function = "i2s4b";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;

So check what changes were made the the DTSI file.

Regards,
Jon

1 Like

Hello,

I did exactly as I was told to change the excel file.

Is there an additional work to modify the dtsi file after the excel file is changed?
Can I simply edit the dtsi file as you tell me?

Thank you.

Hello,

I have modified the files in the following path to: Is that right?

/home/nanohostpc/coding/Audio/Linux_for_Tegra/source/public/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0000-b00.dtsi

…------------------------------------------------
dap4_din_pj5 {
nvidia,pins = “dap4_din_pj5”;
nvidia,function = “i2s4b”;^M
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;^M
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};

		dap4_dout_pj6 {
			nvidia,pins = "dap4_dout_pj6";
			nvidia,function = "i2s4b";^M
			nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
			nvidia,tristate = <TEGRA_PIN_DISABLE>;
			nvidia,enable-input = <TEGRA_PIN_DISABLE>;^M
		};

		dap4_fs_pj4 {
			nvidia,pins = "dap4_fs_pj4";
			nvidia,function = "i2s4b";^M
			nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
			nvidia,tristate = <TEGRA_PIN_DISABLE>;
			nvidia,enable-input = <TEGRA_PIN_ENABLE>;
		};

		dap4_sclk_pj7 {
			nvidia,pins = "dap4_sclk_pj7";
			nvidia,function = "i2s4b";^M
			nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
			nvidia,tristate = <TEGRA_PIN_DISABLE>;
			nvidia,enable-input = <TEGRA_PIN_ENABLE>;
		};

…------------------------------------------------

Thank you.

Hello,

The dtsi file from the excel file was as follows.

/home/nanohostpc/coding/Audio/Linux_for_Tegra/source/public/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0002-b00.dtsi

dap4_din_pj5 {
nvidia,pins = “dap4_din_pj5”;
nvidia,function = “i2s4b”;
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};

		dap4_dout_pj6 {
			nvidia,pins = "dap4_dout_pj6";
			nvidia,function = "i2s4b";
			nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
			nvidia,tristate = <TEGRA_PIN_DISABLE>;
			nvidia,enable-input = <TEGRA_PIN_DISABLE>;
		};

		dap4_fs_pj4 {
			nvidia,pins = "dap4_fs_pj4";
			nvidia,function = "i2s4b";
			nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
			nvidia,tristate = <TEGRA_PIN_DISABLE>;
			nvidia,enable-input = <TEGRA_PIN_ENABLE>;
		};

		dap4_sclk_pj7 {
			nvidia,pins = "dap4_sclk_pj7";
			nvidia,function = "i2s4b";
			nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
			nvidia,tristate = <TEGRA_PIN_DISABLE>;
			nvidia,enable-input = <TEGRA_PIN_ENABLE>;
		};

Thank you.

Should ^M be appended?

Thank you.

Hello,


In the process of copying the dtb file, I copied the command as the following as the guide says, but should it be 0002?

Thank you.

Hello,

editing dtsi file as you mentioned.
after flashing

On production module.

realwave@realwave-desktop:~$ speaker-test -D hw:tegrasndt210ref,0 -c 2 -r 48000 -F S32_LE -t pink -f 500

speaker-test 1.1.3

Playback device is hw:tegrasndt210ref,0
Stream parameters are 48000Hz, S32_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
Playback open error: -19,No such device
realwave@realwave-desktop:~$ sudo grep dap4 /sys/kernel/debug/tegra_pinctrl_reg
Bank: 1 Reg: 0x70003144 Val: 0x00000044 → dap4_fs_pj4
Bank: 1 Reg: 0x70003148 Val: 0x00000054 → dap4_din_pj5
Bank: 1 Reg: 0x7000314c Val: 0x00000004 → dap4_dout_pj6
Bank: 1 Reg: 0x70003150 Val: 0x00000044 → dap4_sclk_pj7

What am I suppose to do?

Thank you.

Hello!

The pinmux settings now look good, but it appears that the soundcard is no longer registered. What does the following show …

$ cat /proc/asound/cards
$ dmesg

Regards,
Jon

1 Like

Hello!

No that is just an editor artefact.

Regards,
Jon

1 Like

Hello!

I would compare the original dtb with that you have generated. You can use fdtdump to extract the contents of the DTB file.

Regards
Jon

1 Like

0 [tegrahda ]: tegra-hda - tegra-hda
tegra-hda at 0x70038000 irq 82

Hello!

I think it’s been a lot thanks to your answers thank you.

Can you show me an example?
I don’t know what to compare with.

Thank you.

Hello,

jetson8@jetson8-desktop:~$ cat /proc/asound/cards
0 [tegrahda ]: tegra-hda - tegra-hda
tegra-hda at 0x70038000 irq 83
1 [tegrasndt210ref]: tegra-snd-t210r - tegra-snd-t210ref-mobile-rt565x
tegra-snd-t210ref-mobile-rt565x

====================================================================
dmesg.txt (66.7 KB)

Hello,

Originally, pinmux should be set up normally with only the dtsi file created from the excel file without manually modifying the dtsi file like this?

Thank you.[quote=“jonathanh, post:43, topic:155840”]

                        dap4_din_pj5 {
                                nvidia,pins = "dap4_din_pj5";
-                               nvidia,function = "rsvd1";
+                               nvidia,function = "i2s4b";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
-                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };

[/quote]

In the dtsi file I created in the excel file,

in dap4_din_pj5 {}
nvidia,tristate = <TEGRA_PIN_DISABLE>
It was supposed to be.

What you showed with DIFF
nvidia,tristate = <TEGRA_PIN_ENABLE>
is.

Could you cross-check once more?

Hello,

I am using b00 and attach dtsi file created from excel file.

Thank you.

Hello!

So this would indicate that both soundcards are present. So does speaker-test still fail? Maybe try …

$ alsactl init tegrasndt210ref
$ speaker-test -D hw:tegrasndt210ref,0 -c 2 -r 48000 -F S32_LE -t sine -f 500

Regards
Jon

1 Like

To be honest, this is not critical. Either setting should work. For the DIN, which is only an input, we do not need to enable the output driver and hence I set tristate to ENABLE.

Regards,
Jon

1 Like

Hello,

this result is result of devkit module,

In the production module it looks like this:

What am I supposed to do?

Thank you.

Hello!

Can you provide the dmesg output for this board?

Thanks
Jon