I2s audio jetson nano production

Similarly to question I2s on jetson nano produciton I am also trying to get audio from the i2s interface on the Auvidea JN30B carrier board.

Beforehand I have done the following:

  1. Install the software on the JN30B according to the documentation of auvidea

  2. This all went fine and after accepting the license agreement in the first boot I had a working device

  3. /opt/nvidia/jetson-io/jetson-io.py only showed the CSI connector as this production unit does not seem to have a 40 pin header

I have then tried to follow the instructions described in this original question.

  1. Download the pinmux spreadsheat linked in the original question and follow the instructions documented here on the jetson archives on the nvidia website (I am not allowed to put more than 1 link in my post)

  2. I changed the I2S0_DIN, I2S0_DOUT, I2S0_FS, I2S0_SCLK to I2S4B_SDATA_IN, I2S4B_SDATA_OUT, I2S4B_LRCK, I2S4B_SCLK and generated the .dtsi files

  3. I downloaded the latest firmware from auvidea website, for the JN30B which at the time was version 5.0

  4. Extracted the files on the Jetson Nano and inside the kernel_src I added <prefix>-pinmux.dtsi to <src>/hardware/‌nvidia/platform/‌t210/<code>/‌kernel-dts/<code>-platforms/‌tegra210-<code>-pinmux-p3448-<sku_ver>.dtsi as documented

  5. I then build the dtb using


cd <src_path>/kernel/kernel-4.9/

make ARCH=arm64 tegra_defconfig

make ARCH=arm64 dtbs

  1. and finally copied the arch/arm64/boot/dts/tegra210-p3448-<sku>-<carrier>-0000.dtb to a ubuntu 18 machine (required by auvidea) that I use for flashing <path-to-L4T-release>/kernel/dtb/ where the path is defined as `/home/<YOUR_USERNAME>/nvidia/nvidia_sdk/JetPack_<Jetpack_version>Linux<Jetson_

module>/Linux_for_Tegra`

  1. Flash the jetson nano using sudo ./flash jetson-nano-emmc mmcblk0p1

However after booting I do not seem to get audio using arecord test.wav. It generates a wave file but with only zeros

I’m not quite sure where I made the mistake, so let’s say if I wanted to verify if I did all the steps correctly up until the midway mark. How would I verify that the dtb that is currently loaded on the jetson nano is correct?

I have been able to build the dtb and flash it to the jetson nano production unit and see that it is loaded by the system because the build time is displayed in the journal as the time that I build this module.

So now, how do I verify that the I2s is configured correctly?

Hi ling.hong1
Apologies for delayed response, Let me try to help you to resolve the issue.

Before we get into debugging, I would need few information as requested below.

  1. I understand, you have changed the 40 pin header I2S0_* pinmux config, to validate if the configuration applied properly after the dtb flash with the changes, please dump the below command and attach the output

sudo grep dap4 /sys/kernel/debug/tegra_pinctrl_reg
sudo cat /sys/kernel/debug/pinctrl/700008d4.pinmux/pinconf-groups | grep dap4

  1. The record command “arecord test.wav” is incomplete info. Can you try below commands for the usecase execution to make sure we are not missing any mixer control configs.

amixer -c “card name” cset name=“ADMAIF2 Mux” “Ï2S4”
arecord -Dhw:“card name”,1 -r 48000 -c 2 -f S16_LE -d 20 test.wav

Note: get the “card name” with cat /proc/asound/cards and choose ape sound card name (not the hda)

  1. If still seeing silence, try to probe the I2S clock pins (12, 35) on the 40 pin header for the I2S4 clocks.

Thank you for getting back to me, my apologies I wasn’t able to execute the steps you provided earlier, I haven’t been in the office for a while.


Bank: 1 Reg: 0x70003144 Val: 0x00000040 -> dap4_fs_pj4

Bank: 1 Reg: 0x70003148 Val: 0x00000040 -> dap4_din_pj5

Bank: 1 Reg: 0x7000314c Val: 0x00000040 -> dap4_dout_pj6

Bank: 1 Reg: 0x70003150 Val: 0x00000040 -> dap4_sclk_pj7

and


92 (dap4_fs_pj4):

93 (dap4_din_pj5):

94 (dap4_dout_pj6):

95 (dap4_sclk_pj7):

running


sudo amixer -c tegrasndt210ref cset name="ADMAIF2 Mux" "I2S4"

arecord -Dhw:tegrasndt210ref,1 -r 48000 -c 2 -f S16_LE -d 20 test.wav

still produces a wav file with only zeros

Which 40 pin header are you referring to? I thought that only the development boards had a 40 pin header, but not this Auvidea JN30B carrier board unit?

Hi,
Looks like you not configure the I2S pinmux on the 40 pin header. By default it would be configured as gpio, you need to explicitly re-configure to SFIO using jetson io tool @ https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3261/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/hw_setup_jetson_io.html#wwpID0E02D0HA

Can you follow the above link to configure the I2S pinmux and then test again

The problem is that when I run jetson-io.py there is no 40 pin header option, the only option I see is for the CSI connector. I believe this production unit from Auvidea the JN30B does not have a 40 pin header?

Ok got it,
In that case, can you please follow manual process to update the pinmux @ https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3271/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/adaptation_and_bringup_tx1.html#wwpID0E06M0HA

I have tried to update the pinmux according to this documentation already but I guess that did not go correctly or I made a mistake somewhere along the line. Also the documentation links to this page Jetson Download Center | NVIDIA Developer for obtain the pinmux but this page has no results.

What I’ve tried is download the pinmux from the original question and modify the I2S0pins, but I’m guessing I did not do this correctly. This forum prevents me from attaching the xls sheet that I used. Could you please provide a correct pinmux so I can compare the one that I have with yours so that I can verify if my pinmux sheet is correct?

Hi ling.hong1,
Can you provide the info on which Jetpack release version used for your testing. So I can provide you a patch to try out.

I have used the following firmware provided by Auvidea for the JN30B board https://www.auvidea.eu/download/firmware/Jetpack_4.6/JetPack_4.6_NANO_JN30B_v1.zip

Which seems to be based on JetPack 4.6

I also see now that they provide another newer generic version https://f000.backblazeb2.com/file/auvidea-download/images/Jetpack_4_6/BSP/Jetpack4.6_Nano_BSP.tar.gz but this one seems to also be based on Jetpack 4.6

Hi ling.hong1,
Please the update the below nodes inside pinmux@700008d4 { } in the board pinmux dts file , build and flash to verify. Make sure you applied this config in right board pinmux dts file by referring the flash log for checking the dtb file name.

dap4_fs_pj4 {
nvidia,pins = “dap4_fs_pj4”;
nvidia,function = “i2s4b”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,open-drain = <TEGRA_PIN_DISABLE>;
};
dap4_din_pj5 {
nvidia,pins = “dap4_din_pj5”;
nvidia,function = “i2s4b”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,open-drain = <TEGRA_PIN_DISABLE>;
};
dap4_dout_pj6 {
nvidia,pins = “dap4_dout_pj6”;
nvidia,function = “i2s4b”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,open-drain = <TEGRA_PIN_DISABLE>;
};
dap4_sclk_pj7 {
nvidia,pins = “dap4_sclk_pj7”;
nvidia,function = “i2s4b”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,open-drain = <TEGRA_PIN_DISABLE>;
};

If everything set right, then below command will confirm the configs

sudo grep dap4 /sys/kernel/debug/tegra_pinctrl_reg
sudo cat /sys/kernel/debug/pinctrl/700008d4.pinmux/pinconf-groups | grep dap4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.