The problem: We want to use the microphone connected to the i2s interface to record the sound. We got a “static noise” that doesn’t change. Check the .wav file attached.
What we tried to do:
The microphone is connected, via a MIPI (CSI) cable, to the following pins:
Jetson nano signal name <-> Customer Usage <-> Pin Direction
I2S0_DIN <-> I2S4B_SDATA_IN <-> Input
I2S0_FS <-> I2S4B_LRCK <-> Output
I2S0_SCLK <-> I2S4B_SCLK <-> Output
These values were updated in the jetson nano pinmux template by the people who made the custom carrier board and all the connections. I’ve followed the tutorial from the official site  (Updating the Bootloader Pinmux), generated the gpio and pinmux .dtsi files, copied them to the porg-platforms, and then generated the dtb file. Then, I copied the dtb file to the kernel/dtb and reflashed the jetson module.
– I’ve executed the following command to see pinctrl:
→ sudo grep dap4 /sys/kernel/debug/tegra_pinctrl_reg
and got the result:
Bank: 1 Reg: 0x70003144 Val: 0x00000000 → dap4_fs_pj4
Bank: 1 Reg: 0x70003148 Val: 0x00000044 → dap4_din_pj5
Bank: 1 Reg: 0x7000314c Val: 0x00000015 → dap4_dout_pj6
Bank: 1 Reg: 0x70003150 Val: 0x00000000 → dap4_sclk_pj7
This means that the dtb was flashed with the new changes. (With the default pinmux there were other Val)
I’ve tried to record from the microphone using this command and settings from this post :
→ arecord -D hw:tegrasndt210ref,0 -r 44100 -f S32_LE -c 1 -d 10 -v test.wav
The output was:
Recording WAVE ‘test.wav’ : Signed 32 bit Little Endian, Rate 44100 Hz, Mono
Hardware PCM card 1 ‘tegra-snd-t210ref-mobile-rt565x’ device 0 subdevice 0
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S32_LE
subformat : STD
channels : 1
rate : 44100
exact rate : 44100 (44100/1)
msbits : 32
buffer_size : 8192
period_size : 2048
period_time : 46439
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 2048
period_event : 0
start_threshold : 1
stop_threshold : 8192
silence_size : 0
boundary : 4611686018427387904
appl_ptr : 0
hw_ptr : 0
Using a production module with eMMC, I could not enable the i2s interface using jetson-IO. From this post  and this , it seems that it is necessary only to update the pinmux (for production module, if r32.3+) and the i2s will be enabled.
I’ve tried other settings for amixer (changing the number of channels, sample rate, fsync) and also I’ve tried to force the pins to the I2S, like in this post . Or changed codec frame mode as in this post .
The solution, for the developer kit, seems to be enabling i2s4 vi jetson-io, and for the production module should have been changing the pinmux config.
Can someone give me a hint or some other ideas?
If you need other details let me know. Thanks in advance.
Could you probe the Jetson SCLK, FS and DATA lines while running the record and quote the behaviour.
SCLK should be operating at Fs*sample_width*channel_count while FS should be running at a frequency equal to sample rate. Also is the i2s mic independently verified with any other board to rule out that its not an issue with mic?
Also, ensure below mixer settings are set and share the mixer setting dump f no issue with clocks (amixer -c tegrasndt210ref contents > ~/settings_dump)
Unfortunately, I do not have the necessary tools for probing.
I don’t know if the mic was verified with any other board, but I think I’ll try that. Also, maybe I’ll try with the original carrier board and developer module.
I know that the mic is activated if the frequency is > 1kHz, else the mic is in sleep mode. I’ll check those frequencies.
Looks like the i2s numbering in clk summary starts from 0. so i2s3 is the right entry to be looked at and its running at 2822400 which implies that you might have played 44100*2*32 (Fs * chan * sample width) wav file. so I2S bit clock form Jetson I2S is fine. Since FS is derived from this line, I suppose it will also be fine
If you had oscilloscope, could have probed data Line to see if data input from mic is noisy even when clocks are fine. So, you may need to check if there is no issue with mic with some other board when supplied with same power voltage and clocks