Running Adafruit SPH0645 microphone with the Nvidia Nx

I am trying to run the Adafruit microphone with the Nvidia Nx using the I2S0 interface that is exposed on the 40 pin connector:
Currently, I have the following pins connected on the 40 pin connector to the Adafruit board:
1- 3.3V
6- GND
12- BCLK
40- DOUT
35- LRCK
I first enabled the I2S0 interface using the following commands:

sudo /opt/nvidia/jetson-io/ -o dtb i2s5
sudo reboot

I then tried running the following command to save a sound file:

arecord -D hw:1,0 -c2 -d 10 -r 44100 -f S16_LE ~/Desktop/test.wav

I then reboot and disconnect the microphone and connect my Adafruit speaker board(Running Adafruit I2S 3W Stereo Speaker Bonnet with the Nvidia Nx) to I2S0. The speaker works properly when I test other sounds, but when I try to play the test.wav file that I recorder with the microphone there is no sound. Is there a step that I missed?


Please connect the DOUT of the Adafruit board to the DIN on the Jetson which is pin-38 and not pin-40. Also if you refer to the MEMS Mic datasheet on the Adafruit website, you will find that it does not support 16-bit samples and so you should use "-f S32_LE’ instead.


Hey Jon,

Thanks for your answer, but unfortunately it is still not working. I connected the microphone as you specified, with the DOUT of the Adafruit board connected to the DIN of the NX (pin 38) and I changed S16_LE to S32_LE, but I still do not get anything from the microphone. I also tried changing the frequency to 16000 instead of 44100 since that is what Adafruit uses on their example code, but nothing seems to work. I also tried setting the SEL pin to both GND and 3.3V, which also did not work. Also, if I go to the sound settings and select input, I expect the input level to change when noise is generated, but it does not do that.
Is there something else that I may be missing?
Thank you!


Can you verify that that subdevice 0 is connected to the I2S5?

$ amixer -c jetsonxaviernxa sget "ADMAIF1 Mux"

Are you able to probe the I2S pins to see if there the bit clock and fsync are active?

Does jetson-io report that the pins are enabled?

$ sudo /opt/nvidia/jetson-io/ -l enabled


Here is what I get:
$ amixer -c jetsonxaviernxa sget “ADMAIF1 Mux”
Simple mixer control ‘ADMAIF1 Mux’,0
Capabilities: enum
Items: ‘None’ ‘ADMAIF1’ ‘ADMAIF2’ ‘ADMAIF3’ ‘ADMAIF4’ ‘ADMAIF5’ ‘ADMAIF6’ ‘ADMAIF7’ ‘ADMAIF8’ ‘ADMAIF9’ ‘ADMAIF10’ ‘ADMAIF11’ ‘ADMAIF12’ ‘ADMAIF13’ ‘ADMAIF14’ ‘ADMAIF15’ ‘ADMAIF16’ ‘I2S1’ ‘I2S2’ ‘I2S3’ ‘I2S4’ ‘I2S5’ ‘I2S6’ ‘SFC1’ ‘SFC2’ ‘SFC3’ ‘SFC4’ ‘MIXER1-1’ ‘MIXER1-2’ ‘MIXER1-3’ ‘MIXER1-4’ ‘MIXER1-5’ ‘AMX1’ ‘AMX2’ ‘AMX3’ ‘AMX4’ ‘ARAD1’ ‘AFC1’ ‘AFC2’ ‘AFC3’ ‘AFC4’ ‘AFC5’ ‘AFC6’ ‘OPE1’ ‘SPKPROT1’ ‘MVC1’ ‘MVC2’ ‘IQC1-1’ ‘IQC1-2’ ‘IQC2-1’ ‘IQC2-2’ ‘DMIC1’ ‘DMIC2’ ‘DMIC3’ ‘DMIC4’ ‘ADX1-1’ ‘ADX1-2’ ‘ADX1-3’ ‘ADX1-4’ ‘ADX2-1’ ‘ADX2-2’ ‘ADX2-3’ ‘ADX2-4’ ‘ADX3-1’ ‘ADX3-2’ ‘ADX3-3’ ‘ADX3-4’ ‘ADX4-1’ ‘ADX4-2’ ‘ADX4-3’ ‘ADX4-4’ ‘ADMAIF17’ ‘ADMAIF18’ ‘ADMAIF19’ ‘ADMAIF20’ ‘ASRC1-1’ ‘ASRC1-2’ ‘ASRC1-3’ ‘ASRC1-4’ ‘ASRC1-5’ ‘ASRC1-6’
Item0: ‘I2S5’

$ sudo /opt/nvidia/jetson-io/ -l enabled
The following functions are enabled on the 40-pin header:

  1. i2s5

I was able to probe the I2S pins and this is what I found when I ran an arecord command:
DOUT on the Adafruit board is sending data.
BCLK on the Adafruit board is 2.8MHz.
LRCL on the Adafruit board is 44MHz.

Again, I tried recording a wav file, but there were no sounds in the file. Maybe I just have a bad Adafruit board?


Is the voltage level of the data on the DOUT around 3.3V?

The jetson-io tool does include a configuration for the adafruit mems mic, but it is essentially the same thing as you are doing.

$ sudo /opt/nvidia/jetson-io/ -n "Adafruit SPH0645LM4H"
$ sudo reboot