Failed to record by I2S microphone SPH0645 by 40pin I2S with Orin nx on R35.2.1

Hi Nvidia,
I tried a I2S Mic - SPH0645 but got the following errors:
amixer -c APE cset name=‘ADMAIF1 Mux’ I2S2
arecord -D hw:APE,0 -c1 -d 5 -r 48000 -f S32_LE ~/Desktop/test.wav
Recording WAVE ‘/home/nvidia/Desktop/test.wav’ : Signed 32 bit Little Endian, Rate 48000 Hz, Mono
arecord: pcm_read:2178: read error: Input/output error

And this is my debug tracing:
sudo cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 30/30 #P:4
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _—=> hardirq/softirq
# || / _–=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
** arecord-10200 [002] … 5106.778549: snd_soc_dapm_start: card=NVIDIA Jetson Orin NX APE**
** arecord-10200 [002] … 5106.778781: snd_soc_dapm_widget_power: widget=ADMAIF1 Capture val=1**
** arecord-10200 [002] … 5106.778782: snd_soc_dapm_widget_power: widget=ADMAIF1 XBAR-Capture val=1**
** arecord-10200 [002] … 5106.778783: snd_soc_dapm_widget_power: widget=ADMAIF1 XBAR-TX val=1**
** arecord-10200 [002] … 5106.778784: snd_soc_dapm_widget_power: widget=ADMAIF1 Mux val=1**
** arecord-10200 [002] … 5106.778810: snd_soc_dapm_widget_power: widget=I2S2 XBAR-RX val=1**
** arecord-10200 [002] … 5106.778811: snd_soc_dapm_widget_power: widget=I2S2 XBAR-Playback val=1**
** arecord-10200 [002] … 5106.778812: snd_soc_dapm_widget_power: widget=tegra-dlink-65-capture val=1**
** arecord-10200 [002] … 5106.778813: snd_soc_dapm_widget_power: widget=I2S2 CIF-Capture val=1**
** arecord-10200 [002] … 5106.778813: snd_soc_dapm_widget_power: widget=I2S2 TX val=1**
** arecord-10200 [002] … 5106.778814: snd_soc_dapm_widget_power: widget=I2S2 DAP-Playback val=1**
** arecord-10200 [002] … 5106.778815: snd_soc_dapm_widget_power: widget=tegra-dlink-77-capture val=1**
** arecord-10200 [002] … 5106.778816: snd_soc_dapm_widget_power: widget=I2S2 Dummy-Capture val=1**
** arecord-10200 [002] … 5106.778817: snd_soc_dapm_widget_power: widget=I2S2 MIC val=1**
** arecord-10200 [002] … 5106.779047: snd_soc_dapm_walk_done: NVIDIA Jetson Orin NX APE: checks 14 power, 13 path, 89 neighbour**
** arecord-10200 [000] … 5116.808718: snd_soc_dapm_start: card=NVIDIA Jetson Orin NX APE**
** arecord-10200 [000] … 5116.808930: snd_soc_dapm_widget_power: widget=ADMAIF1 Capture val=0**
** arecord-10200 [000] … 5116.808932: snd_soc_dapm_widget_power: widget=ADMAIF1 XBAR-Capture val=0**
** arecord-10200 [000] … 5116.808932: snd_soc_dapm_widget_power: widget=ADMAIF1 XBAR-TX val=0**
** arecord-10200 [000] … 5116.808933: snd_soc_dapm_widget_power: widget=ADMAIF1 Mux val=0**
** arecord-10200 [000] … 5116.808961: snd_soc_dapm_widget_power: widget=I2S2 XBAR-RX val=0**
** arecord-10200 [000] … 5116.808962: snd_soc_dapm_widget_power: widget=I2S2 XBAR-Playback val=0**
** arecord-10200 [000] … 5116.808963: snd_soc_dapm_widget_power: widget=tegra-dlink-65-capture val=0**
** arecord-10200 [000] … 5116.808963: snd_soc_dapm_widget_power: widget=I2S2 CIF-Capture val=0**
** arecord-10200 [000] … 5116.808964: snd_soc_dapm_widget_power: widget=I2S2 TX val=0**
** arecord-10200 [000] … 5116.808965: snd_soc_dapm_widget_power: widget=I2S2 DAP-Playback val=0**
** arecord-10200 [000] … 5116.808966: snd_soc_dapm_widget_power: widget=tegra-dlink-77-capture val=0**
** arecord-10200 [000] … 5116.808966: snd_soc_dapm_widget_power: widget=I2S2 Dummy-Capture val=0**
** arecord-10200 [000] … 5116.808967: snd_soc_dapm_widget_power: widget=I2S2 MIC val=0**
** arecord-10200 [000] … 5116.809172: snd_soc_dapm_walk_done: NVIDIA Jetson Orin NX APE: checks 13 power, 13 path, 91 neighbour**

And my connection is following Raspberry Pi Wiring & Test | Adafruit I2S MEMS Microphone Breakout | Adafruit Learning System

I also double confirmed 40 pins setting by jetson-io tool:
=================== Jetson Expansion Header Tool ===================
| |
| |
| Select desired functions (for pins): |
| |
| aud (7) |
| [] i2s2 (12,35,38,40) |
| [
] spi1 (19,21,23,24,26) |
| [] spi3 (13,16,18,22,37) |
| [
] uarta-cts/rts (11,36) |
| |
| Back |
How to fix this issue?
If I used the command arecord -D hw:APE,0 -c2 -d 5 -r 48000 -f S32_LE ~/Desktop/test.wav
There is error message but the test.wav is no any voice there.

I checked the sound card setting by cat /proc/asound/cards
0 [HDA ]: tegra-hda - NVIDIA Jetson Orin NX HDA
NVIDIA Jetson Orin NX HDA at 0x3518000 irq 112
1 [APE ]: tegra-ape - NVIDIA Jetson Orin NX APE
Unknown-NVIDIAOrinNXDeveloperKit-NotSpecified

But the APE is showing Unknown-NVIDIAOrinNXDeveloperKit-NotSpecified, is this correct?

I’m closing this topic due to there is no update from you for a period, assuming this issue was resolved.
If still need the support, please open a new topic. Thanks

Can you list what kind of error seen with this command.

Also attach the pinmux info on target with below command

cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups

Is it possible to probe the I2S2 from 40 pin header to check the I2S2_SCLK and I2S2_FS clocks freq.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.