Does anyone have any experience using the SPH0645LM4H Microphone in terms of sound quality? I used it to record a 2Khz tone from a nearby tone generator+speaker, and the recording was awful. Where you could barely hear the tone over the noise, but IRL the tone was of decent loudness.
I don’t expect nearly as much noise in the recording. I’ve tried numerous sample rates, and bit depth setting and nothing seems to give me the expected quality. I initially started with a bit depth of 32, but later changed that to 24.
Here is how I set up the SW.
1.) Install Jetpack 4.3 from the SD Card Image
2.) Configure the I2S pins for the Adafruit I2S Mic
Maximize the Terminal windows, and run the following.
$ sudo find /opt/nvidia/jetson-io/ -mindepth 1 -maxdepth 1 -type d -exec touch {}/init.py ;
$ sudo mkdir /boot/dtb
$ sudo cp -v /boot/tegra210-p3448-0000-p3449-0000-[ab]0[02].dtb /boot/dtb/
$ sudo /opt/nvidia/jetson-io/jetson-io.py
Under “Configure Jetson for compatible devices” select the Adafruit SPH0645LM4H, and then save/reboot.
3.) Verify it by making sure the pinmux configuration is good.
Open the terminal window and run the follow. Everything should match except dout which isn’t used.
$sudo grep dap4 /sys/kernel/debug/tegra_pinctrl_reg
Bank: 1 Reg: 0x70003144 Val: 0x00000044 → dap4_fs_pj4
Bank: 1 Reg: 0x70003148 Val: 0x00000054 → dap4_din_pj5
Bank: 1 Reg: 0x7000314c Val: 0x00000004 → dap4_dout_pj6
Bank: 1 Reg: 0x70003150 Val: 0x00000044 → dap4_sclk_pj7
4.) Set the Mixer controls, and assign the ADMAIF1. The ADMAIF is the DMA interface to the APE (Audio Processing Image). There is 10 of them on the Tegra210.
Reset Mixer Controls
$alsactl init tegrasndt210ref
Map I2S4 to ADMAIF1
$ amixer -c tegrasndt210ref sget “ADMAIF1 Mux”
$ amixer -c tegrasndt210ref sget “I2S4 Mux”
Make sure that the 'MVC1 Channels" is set to 0
amixer -c tegrasndt210ref sget ‘MVC1 Channels’
5.) Record from the microphone
$ arecord -D hw:tegrasnd210ref,0 -r 48000 -f S24_LE -c 1 -d 10 test.wav