Hi all, we're trying to integrate the SPH0641LM4H-1 PDM microphone and we're having a few issues, we're trying to use this command to test the output;
arecord -f S32_LE -d 10 -r 48000 --device="hw:0,0" -vvv
Seem to just get a continuous stream which is saturated at 99% e.g.;
arecord -f S32_LE -d 10 -r 48000 --device="hw:0,0" -vvv
Recording WAVE 'stdin' : Signed 32 bit Little Endian, Rate 48000 Hz, Mono
Hardware PCM card 0 'imx-audio-micfil' device 0 subdevice 0
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S32_LE
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 32
buffer_size : 16384
period_size : 4096
period_time : 85333
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 4096
period_event : 0
start_threshold : 1
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 4611686018427387904
appl_ptr : 0
hw_ptr : 0
RIFF$LWAVEfmt ��� dataLMax peak (4096 samples): 0x7fffe500 #################### 99%
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Max peak (4096 samples): 0x7fffe000 #################### 99%
The kernel log looks fine, don't see any issues there;
dmesg -wH | grep mic
[ +0.006196] DMA: preallocated 256 KiB pool for atomic allocations
[ +0.011044] fsl-micfil-dai 30ca0000.micfil: GET IRQ: 39
[ +0.005251] fsl-micfil-dai 30ca0000.micfil: GET IRQ: 40
[ +0.005243] fsl-micfil-dai 30ca0000.micfil: GET IRQ: 41
[ +0.005245] fsl-micfil-dai 30ca0000.micfil: GET IRQ: 42
[ +0.008303] debugfs: Directory '30ca0000.micfil' with parent 'imx-audio-micfil' already present!
[ +0.008880] imx-micfil sound-micfil: snd-soc-dummy-dai <-> 30ca0000.micfil mapping ok
[ +0.007843] imx-micfil sound-micfil: ASoC: no DMI vendor name!
[ +0.002977] #0: imx-audio-micfil
The dts entry looks like this;
sound-micfil {
compatible = "fsl,imx-audio-micfil";
model = "imx-audio-micfil";
cpu-dai = <&micfil>;
};
&micfil {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pdm>;
assigned-clocks = <&clk IMX8MP_CLK_PDM>;
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
assigned-clock-rates = <196608000>;
status = "okay";
};
pinctrl_pdm: pdmgrp {
fsl,pins = <
MX8MP_IOMUXC_SAI5_RXC__AUDIOMIX_PDM_CLK 0xd6
MX8MP_IOMUXC_SAI5_RXD0__AUDIOMIX_PDM_BIT_STREAM00 0xd6
MX8MP_IOMUXC_SAI5_RXD1__AUDIOMIX_PDM_BIT_STREAM01 0xd6
MX8MP_IOMUXC_SAI5_RXD2__AUDIOMIX_PDM_BIT_STREAM02 0xd6
MX8MP_IOMUXC_SAI5_RXD3__AUDIOMIX_PDM_BIT_STREAM03 0xd6
>;
};
Does anyone have any idea what could be the issue? note that we haven't had the chance to scope the PDM clock and data lines yet, so can't completely discount an electronics issue. (will be doing this next week).
I've also seen that there is a sound-swpdm node, should this be used instead of sound-micfil? Some clarification would be appreciated!
Thank you