RT5640 no sound on Jetson Orin NX 16GB

Hello, I have a question regarding RT5640 control.
We are using a carrier board, and performed the following actions to use RT5640.
This is my first time using Jetson and I don’t know much about it. Sorry, but I would appreciate it if you could leave a detailed answer.

  1. Flash CMD
    sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml” --showlogs --network usb0 jetson-orin-nano-devkit internal

  2. Pinmux
    We connected the RT5640 to the I2S0 slot and changed the settings to I2S2 for the corresponding GPIO.
    bootloader/t186ref/BCT/tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi

  1. driver code
    tegra234-p3767-common-audio.dtsi
    tegra234-p3767-common-audio.dtsi.txt (8.7 KB)

  2. codec CMD

amixer -c 1 cset name=“I2S2 Mux” “ADMAIF1”
amixer -c 1 cset name=“ADMAIF1 Mux” I2S2
amixer -c 1 cset name=“CVB-RT HPO MIX HPVOL Switch” “on”
amixer -c 1 cset name=“CVB-RT HPO MIX DAC1 Switch” “off”
amixer -c 1 cset name=“CVB-RT HPO MIX DAC2 Switch” “off”
amixer -c 1 cset name=“CVB-RT OUT MIXL DAC L1 Switch” “on”
amixer -c 1 cset name=“CVB-RT OUT MIXL BST1 Switch” “off”
amixer -c 1 cset name=“CVB-RT OUT MIXL DAC L2 Switch” “off”
amixer -c 1 cset name=“CVB-RT OUT MIXL DAC R2 Switch” “off”
amixer -c 1 cset name=“CVB-RT OUT MIXL INL Switch” “off”
amixer -c 1 cset name=“CVB-RT OUT MIXL REC MIXL Switch” “off”
amixer -c 1 cset name=“CVB-RT OUT MIXL SPK MIXL Switch” “off”
amixer -c 1 cset name=“CVB-RT HP Channel Switch” “on”
amixer -c 1 cset name=“CVB-RT HP L Playback Switch” “on”
amixer -c 1 cset name=“CVB-RT HP R Playback Switch” “on”
amixer -c 1 cset name=“CVB-RT HP Playback Volume” 20

amixer -c APE cset name=“I2S2 codec master mode” “None”

aplay -D hw:APE,0 tone.wav

  1. current status
  • When you enter the aplay command, it ends immediately, even though it is an 11-second audio file.

  • We confirmed that data and clock are generated on the I2C line when the amixer command is input.

  • As a result of measuring with an oscilloscope, there is no change in all four lines of I2S and mclk line.

  • cat /proc/asound/cards
    image

  • sudo i2cdetect -y -r 3160000.i2c
    image

  • sudo cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups > pinmux.txt
    pinmux.txt (39.3 KB)

  • sudo cat /proc/asound/card1/pcm0c/sub0/hw_params

  • sudo cat /proc/asound/card1/pcm0p/sub0/hw_params
    image

  • sudo cat /sys/kernel/debug/asoc/components > components.txt
    components.txt (879 Bytes)

  • zcat /proc/config.gz | grep rt5640
    image

  • amixer -c APE contents > settings.txt
    settings.txt (801.7 KB)

  • sudo dmesg > kernel_log.txt
    kernel_log.txt (69.4 KB)

  • sudo dtc -I fs -O dts /proc/device-tree >/tmp/dt.log
    dt.log.txt (429.7 KB)

  • sudo cat /sys/kernel/debug/regmap/2901000.i2s/registers > reg_dump.txt
    reg_dump.txt (585 Bytes)

If you need additional information, please let me know at any time. thank you!!

Sorry for the late response.

Is this still an issue to support? Any result can be shared?

Hi,

Sorry for late response.

  • Below RT5640 codec mixer settings seems incomplete.

Could you please try with the settings mentioned here,

Also, no need to make below mixer control setting,
amixer -c APE cset name=“I2S2 codec master mode” “None”

  • Also, please remove below node entry
hdr40_snd_link_i2s: &i2s2_to_codec{
	//add
	link-name = "rt5640-playback";
	ignore_suspend;
	bitclock-master;
	frame-master;	

	format = "i2s";
	codec-dai-name = "rt5640-aif1";
	//bit-format = "s16_le";
	//srate = <48000>;
	//num-channel = <2>;
	ignore_suspend;

	codec{
		sound-dai = <&rt5640 0>;
		prefix = "CVB-RT";
	};
	//add
};
  • Please confirm Codec is slave or master here?

Set Tegra I2S as Master and please share the observation from Tegra I2S lines.

Thank you for answer.

Since I am currently on an external business trip, I will reply within 10 days. Please wait a moment. Thank you.