Hi,
I am working with the i.MX8ULP EVK9, and I am trying to record audio using the external IM69D130 MicrophoneShield2Go. However, no data is being recorded.
Below are my pin configurations and the clock states observed on the logic analyzer:
| i.MX8ULP Pin | IM69D130 Pin | Logic Analyzer State |
|------------------------------------|--------------|----------------------|
| MX8ULP_PAD_PTF26__I2S5_TX_BCLK | BCLK | Clock present |
| MX8ULP_PAD_PTF27__I2S5_TX_FS | WCLK | Clock present |
| MX8ULP_PAD_PTF21__I2S5_RXD0 | DATA | Clock present |
### Capture Hardware Devices:
```
root@imx8ulp-9x9-lpddr4-evk:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: adau7002 [adau7002], device 0: 29890000.sai-adau7002-hifi adau7002-hifi-0 [29890000.sai-adau7002-hifi adau7002-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: wm8960audio [wm8960-audio], device 0: rpmsg hifi rpmsg-codec-wm8960.0-001a-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
I am using I2S5 for audio capture, and to record audio, I ran the following command:
```
$ arecord -D hw:0,0 -f S16_LE -r 16000 -c 2 -d 10 test.wav
```
I have made some modifications to the device tree to configure the microphone correctly. Below is the relevant patch that I applied:
--- a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
...
+ sound_adau7002: sound-adau7002 {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "adau7002";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,widgets = "Microphone", "Microphone Jack";
+ simple-audio-card,routing =
+ "Capture", "PDM_DAT",
+ "Capture", "IOVDD";
+ simple-audio-card,bitclock-master = <&dailink_master>;
+ simple-audio-card,frame-master = <&dailink_master>;
+ codec_dai_name = "adau7002-hifi";
+ status = "okay";
+ };
...
+ adau7002: pdm-to-i2s {
+ compatible = "adi,adau7002";
+ assigned-clocks = <&cgc1 IMX8ULP_CLK_SAI5_SEL>, <&pcc4 IMX8ULP_CLK_SAI5>;
+ assigned-clock-rates = <786432000>, <49152000>, <12288000>, <12288000>;
+ status = "okay";
+ IOVDD-supply = <®_5v>;
+ };
Despite the configuration, I am not able to record audio. Could you please help me identify what might be wrong and how I can resolve the issue?
Hello,
I suggest you take a look in the next post that can be used as reference:
Configuring adau7002 device doesn't work - NXP Community
Best regards.