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.
-
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 -
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
-
driver code
tegra234-p3767-common-audio.dtsi
tegra234-p3767-common-audio.dtsi.txt (8.7 KB) -
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
- 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
-
sudo i2cdetect -y -r 3160000.i2c
-
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
-
sudo cat /sys/kernel/debug/asoc/components > components.txt
components.txt (879 Bytes) -
zcat /proc/config.gz | grep rt5640
-
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!!