@JorgeCas
Thanks for your reply.
I found the codec driver of TI audio codec on imx95 bsp:
vendor/nxp-opensource/kernel_imx/sound/soc/codecs/tlv320aic3x.c
vendor/nxp-opensource/kernel_imx/sound/soc/codecs/tlv320aic3x-i2c.c
I modify defconfig file(arch/arm64/configs/imx95_gki.fragment) to add two drivers into compile:
+CONFIG_SND_SOC_TLV320AIC3X=m
+CONFIG_SND_SOC_TLV320AIC3X_I2C=m
device/nxp/imx9/evk_95/SharedBoardConfig.mk
BOARD_VENDOR_KERNEL_MODULES += \
+ $(KERNEL_OUT)/sound/soc/codecs/snd-soc-tlv320aic3x.ko \
+ $(KERNEL_OUT)/sound/soc/codecs/snd-soc-tlv320aic3x-i2c.ko \
I also take your suggestion and modify dts.
The attached files containing modified dts, imx95-19x19-evk.dts and patch, imx95_evk_dts.patch.
The following section details the changes and their purposes.
(1)&sai3, pinctrl_sai3, pinctrl_sai3_sleep:
BCLK, WCLK, DIN and DOUT gpio of audio codec connect to SAI3 module of soc.
MCLK gpio not connected to soc and comment.
(2)codec_mclk: codec-mclk
add a fixed clock as suggestion
(3)tlv320aic3x: tlv320aic3x@18
audio codec driver node
clocks = <&codec_mclk>; reference to fixed clock codec_mclk
(4)sound-tlv320aic3x
dai connection of sai3 module of soc and TI audio codec
simple-audio-card,bitclock-master and simple-audio-card,frame-master reference dailink_master_codec as master.
The dailink_master_codec set clocks to fixed clock codec_mclk。
I prepare three audio wav files and use tinyplay to test speaker of audio codec.
Although no error messages happened during test prieod of the three wav files, I cannot hear the audio.
ex:
tinyplay /sdcard/rhj08-s3gh1_2.wav -D 2
Playing sample: 2ch, 48000 hz, 16bit 1414376 bytes
Draining... Wait 85333 us
I also use some commands, i2cdetect, lsmod, cat /proc/asound/cards , tinypcminfo -D 2, cat /sys/kernel/debug/clk/clk_summary | grep "codec-mclk" and tinyplay command to test the audio codec.
The results are listed in the attached file, audio_test_commands_results.txt.
I would like to ask if any suggestion about current dts or linux command to check status of audio codec?