I had a look at Si3050 Spec. It appears to me that Jetson Nano I2S interface needs to be configured in FSYNC master mode to exchange PCM data (corresponding lines PCLK, FSYNC, DTX and DRX on Si3050).
Currently Jetson Nano uses ASoC drivers to setup DMA and I2S interfaces that would be required to read/write PCM data. I think this would be the simplest option to try first. For understanding you can refer to the “Audio Setup and Development” section in the BSP doc and you can specifically refer below for a quick glance.
- ADMAIF in Platform driver section (PCM driver interface)
source code: kernel/nvidia/sound/soc/tegra-alt/tegra210_admaif_alt.c
- I2S in Codec driver section (Applying necessary configurations for I2S)
source code: kernel/nvidia/sound/soc/tegra-alt/tegra210_i2s_alt.c
- I2S mode setting
- Usage and examples
The Jetson Nano I2S interface on 40-pin header by default is connected dummy codec endpoint. Generally depending on the audio cards that are connected to 40-pin header, specific ASoC codec driver (if available) can be plugged in. In your case I assume there is no ASoC codec driver available for Si3050. But that should not stop you from using ASoC framework. Let Jetson Nano I2S drive dummy codec endpoint. What you would need to ensure is, Si3050 is initialized properly and ready for use.
Check if following steps/commands work for you on the Jetson Nano.
Update DT with following
diff --git a/tegra210-porg-p3448-common.dtsi b/tegra210-porg-p3448-common.dtsi
index 2a7d844…689437a 100644
@@ -414,7 +414,8 @@
codec-dai = <&spdif_dit0>;
cpu-dai-name = “I2S4”;
codec-dai-name = “dit-hifi”;
- format = “i2s”;
+ format = “dsp_a”;
+ fsync-width = <0>;
Ensure if pinmux for I2S on 40-pin header is configured properly
amixer -c tegrasndt210ref cset name=“I2S4 Mux” “ADMAIF1” (for sending data to Si3050)
amixer -c tegrasndt210ref cset name=“ADMAIF1 Mux” “I2S4” (for receiving data from Si3050)
Data send/receive commands
aplay -D hw:tegrasndt210ref,0 <send.wav>
arecord -Dhw:tegrasndt210ref,0 -c 8 -r 8000 -f S16_LE -d 15 <receive.wav>
In case you face any difficulties please refer to “Troubleshooting” section or reach out to us.