<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: IMX8MP PDM Microphone SPH0641LM4H-1 in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1304337#M176573</link>
    <description>&lt;DIV id="bodyDisplay_0" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;Hi Joe&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;Is there any more documentation on the 8MIC board for use with the IMX8M-Plus?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;only I.MX 8Mic Board Quick Start Guide, sect.3 Record Audio&lt;BR /&gt;&lt;A href="https://www.nxp.com/docs/en/quick-reference-guide/IMX-8MIC-QSG.pdf" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.nxp.com/docs/en/quick-reference-guide/IMX-8MIC-QSG.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;It would be good to see the schematic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;was sent you via mail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;Is the imx8mp-evk.dts designed to support the 8MIC board already&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yes, dts file :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mp-evk.dts?h=lf-5.10.y" target="_blank"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mp-evk.dts?h=lf-5.10.y&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 08 Jul 2021 01:10:59 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2021-07-08T01:10:59Z</dc:date>
    <item>
      <title>IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1301951#M176360</link>
      <description>&lt;P&gt;Hi all, we're trying to integrate the&amp;nbsp;&lt;A href="https://www.mouser.co.uk/ProductDetail/Knowles/SPH0641LM4H-1?qs=rpfKl3ntHzP45DqhDYSHWA==" target="_self"&gt;SPH0641LM4H-1&lt;/A&gt;&amp;nbsp;PDM microphone and we're having a few issues, we're trying to use this command to test the output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;arecord -f S32_LE -d 10 -r 48000 --device="hw:0,0" -vvv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seem to just get a continuous stream which is saturated at 99% e.g.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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%&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The kernel log looks fine, don't see any issues there;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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 &amp;lt;-&amp;gt; 30ca0000.micfil mapping ok
[  +0.007843] imx-micfil sound-micfil: ASoC: no DMI vendor name!
[  +0.002977]   #0: imx-audio-micfil&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dts entry looks like this;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sound-micfil {
	compatible = "fsl,imx-audio-micfil";
	model = "imx-audio-micfil";
	cpu-dai = &amp;lt;&amp;amp;micfil&amp;gt;;
};

&amp;amp;micfil {
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_pdm&amp;gt;;
	assigned-clocks = &amp;lt;&amp;amp;clk IMX8MP_CLK_PDM&amp;gt;;
	assigned-clock-parents = &amp;lt;&amp;amp;clk IMX8MP_AUDIO_PLL1_OUT&amp;gt;;
	assigned-clock-rates = &amp;lt;196608000&amp;gt;;
	status = "okay";
};

pinctrl_pdm: pdmgrp {
	fsl,pins = &amp;lt;
		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
	&amp;gt;;
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;I've also seen that there is a&amp;nbsp;&lt;STRONG&gt;sound-swpdm&amp;nbsp;&lt;/STRONG&gt;node, should this be used instead of&amp;nbsp;&lt;STRONG&gt;sound-micfil&lt;/STRONG&gt;? Some clarification would be appreciated!&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 17:49:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1301951#M176360</guid>
      <dc:creator>jgsandom</dc:creator>
      <dc:date>2021-07-02T17:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1302011#M176363</link>
      <description>&lt;P&gt;Hi Joe&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for pdm testing one can look at sect.7.6 PDM Microphone Interface (MICFIL)&lt;/P&gt;
&lt;P&gt;&lt;A style="box-sizing: border-box; background-color: transparent; color: #215bd6; text-decoration: none; cursor: pointer;" href="https://www.nxp.com/docs/en/reference-manual/IMX_REFERENCE_MANUAL.pdf" target="_blank" rel="noopener"&gt;i.MX Linux Reference Manual​&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;unit test&lt;/P&gt;
&lt;P&gt;&lt;A href="https://source.codeaurora.org/external/imx/imx-test/tree/test/mxc_pdm_test?h=lf-5.10.y_2.0.0" target="_blank"&gt;https://source.codeaurora.org/external/imx/imx-test/tree/test/mxc_pdm_test?h=lf-5.10.y_2.0.0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I.MX 8Mic Board Quick Start Guide, sect.3 Record Audio&lt;BR /&gt;&lt;A href="https://www.nxp.com/docs/en/quick-reference-guide/IMX-8MIC-QSG.pdf" target="_blank"&gt;https://www.nxp.com/docs/en/quick-reference-guide/IMX-8MIC-QSG.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;dts file:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mp-evk.dts?h=lf-5.10.y" target="_blank"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mp-evk.dts?h=lf-5.10.y&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 23:34:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1302011#M176363</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-07-02T23:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1303946#M176538</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37066"&gt;@igorpadykov&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;There isn't much information in sect 7.6 PDM Microphone Interface (MICFIL) for testing. Is there anything specific that needs to be set using&amp;nbsp;&lt;STRONG&gt;amixer&amp;nbsp;&lt;/STRONG&gt;or are the defaults sufficient?&lt;/P&gt;&lt;P&gt;Regarding the unit tests, this doesn't work, there is a format mismatch;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;./mxc_pdm_test.out --device hw:0,0 --output test-16k.raw --rate 48000 --seconds 60
Set pcm format not supported
fail setting params error: -22
fail to init alsa pdm -22
root@digitalsurgery-imx8mp:&lt;/LI-CODE&gt;&lt;P&gt;The IMX8MP seems to only support S32_LE as advertised here;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;./mxc_alsa_hw_params.out hw:0,0 c f
S32_LE &lt;/LI-CODE&gt;&lt;P&gt;Whereas the unit test specifies U32_LE;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;priv-&amp;gt;format = SND_PCM_FORMAT_DSD_U32_LE;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yesterday, we scoped the PDM clock and data, we could see a valid clock at ~3MHz and looked like data was present.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that we are using&amp;nbsp;&lt;STRONG&gt;PDM_DAT2&lt;/STRONG&gt; as our data input, is there anything we need to set specifically to receive data on&amp;nbsp;&lt;STRONG&gt;DAT2&lt;/STRONG&gt;? from the evk dts, looks like we are using the exact same micfil setup.&lt;/P&gt;&lt;P&gt;Please let me know your thoughts, thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 11:55:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1303946#M176538</guid>
      <dc:creator>jgsandom</dc:creator>
      <dc:date>2021-07-07T11:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1304053#M176549</link>
      <description>&lt;P&gt;&amp;gt;&lt;SPAN&gt;&amp;nbsp;from the evk dts, looks like we are using the exact same micfil setup.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in such case (using SAI5 as in dts &lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mp-evk.dts?h=lf-5.10.y)" target="_blank" rel="noopener"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mp-evk.dts?h=lf-5.10.y)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;seems it should work with "hw:4,0" as in&amp;nbsp;&lt;A href="https://source.codeaurora.org/external/imx/imx-test/tree/test/mxc_pdm_test/README?h=lf-5.10.y_2.0.0" target="_blank" rel="noopener"&gt;https://source.codeaurora.org/external/imx/imx-test/tree/test/mxc_pdm_test/README?h=lf-5.10.y_2.0.0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;How did yoi find "--device hw:0,0" .&lt;/P&gt;
&lt;P&gt;Some debug info can be obtained with "--log (l): log debug information\n""&amp;nbsp; :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://source.codeaurora.org/external/imx/imx-test/tree/test/mxc_pdm_test/mxc_pdm_test.c?h=lf-5.10.y_2.0.0" target="_blank"&gt;https://source.codeaurora.org/external/imx/imx-test/tree/test/mxc_pdm_test/mxc_pdm_test.c?h=lf-5.10.y_2.0.0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 14:47:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1304053#M176549</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-07-07T14:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1304105#M176553</link>
      <description>&lt;P&gt;When I say exact same micfil setup, I just mean the micfil node as outlined in the original post, I'm not using all of the others e.g.&amp;nbsp;&lt;STRONG&gt;sound-hdmi, sound-bt-sco etc.&amp;nbsp;&lt;/STRONG&gt;I'm just using&amp;nbsp;&lt;STRONG&gt;sound-micfil&lt;/STRONG&gt; in our custom board, that's why it's&amp;nbsp;&lt;STRONG&gt;hw:0,0&lt;/STRONG&gt; instead of&amp;nbsp;&lt;STRONG&gt;hw:4,0&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The log output didn't give anything additional;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;./mxc_pdm_test.out --log --device hw:0,0 --output test-16k.raw --rate 48000 --seconds 60 
Set pcm format not supported
fail setting params error: -22
fail to init alsa pdm -22&lt;/LI-CODE&gt;&lt;P&gt;Is there any more documentation on the 8MIC board for use with the IMX8M-Plus? It would be good to see the schematic. Is the imx8mp-evk.dts designed to support the 8MIC board already or does it require more changes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 15:52:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1304105#M176553</guid>
      <dc:creator>jgsandom</dc:creator>
      <dc:date>2021-07-07T15:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1304337#M176573</link>
      <description>&lt;DIV id="bodyDisplay_0" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;Hi Joe&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;Is there any more documentation on the 8MIC board for use with the IMX8M-Plus?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;only I.MX 8Mic Board Quick Start Guide, sect.3 Record Audio&lt;BR /&gt;&lt;A href="https://www.nxp.com/docs/en/quick-reference-guide/IMX-8MIC-QSG.pdf" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.nxp.com/docs/en/quick-reference-guide/IMX-8MIC-QSG.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;It would be good to see the schematic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;was sent you via mail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;Is the imx8mp-evk.dts designed to support the 8MIC board already&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yes, dts file :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mp-evk.dts?h=lf-5.10.y" target="_blank"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mp-evk.dts?h=lf-5.10.y&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Jul 2021 01:10:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1304337#M176573</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-07-08T01:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1305289#M176660</link>
      <description>&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;I modified mxc_pdm_test unit test to use&amp;nbsp;&lt;STRONG&gt;SND_PCM_FORMAT_S32_LE&lt;/STRONG&gt; as that is what the IMX8MP is supporting. This gets past the previous errors and now the output looks like this;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;./mxc_pdm_test.out --device hw:0,0 --channels 2 -o test2.raw --rate 48000 --seconds 10 --log
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     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 32
  buffer_size  : 8192
  period_size  : 512
  period_time  : 10666
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 512
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 8192
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
  appl_ptr     : 0
  hw_ptr       : 0
Avg time proccess one buffer period: 0.003353
Dhrystones per second:  305.4, DMIPS:    0.2
Read:Write periods 938:933&lt;/LI-CODE&gt;&lt;P&gt;Doesn't seem to be any errors, but the resulting file is just a strange test like tone - almost as if it's not coming from the microphone. (attached)&lt;/P&gt;&lt;P&gt;Does this test at least suggest that the micfil FIFO is being filled by the microphone data and the unit test is grabbing those buffers?&lt;/P&gt;&lt;P&gt;Note that I was playing the file with the following command;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;aplay -t raw -c 2 -f S32_LE -r 48000 test2.raw&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 Jul 2021 08:09:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1305289#M176660</guid>
      <dc:creator>jgsandom</dc:creator>
      <dc:date>2021-07-09T08:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1305432#M176688</link>
      <description>&lt;P&gt;Hi Joe&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what linux used in the case, is it from nxp source.codeaurora.org/external/imx/linux-imx repository,&lt;/P&gt;
&lt;P&gt;also could you provide dts file&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 12:07:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1305432#M176688</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-07-09T12:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1305570#M176698</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I recently upgraded from 5.4.7 BSP 2.3.0 to 5.10.35:&amp;nbsp;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/log/?h=lf-5.10.y" target="_blank" rel="noopener"&gt;https://source.codeaurora.org/external/imx/linux-imx/log/?h=lf-5.10.y&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Attached is the full dts file of the development kit we're working with.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 16:31:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1305570#M176698</guid>
      <dc:creator>jgsandom</dc:creator>
      <dc:date>2021-07-09T16:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1305800#M176727</link>
      <description>&lt;P&gt;thanks, I will ask internally and update.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 00:28:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1305800#M176727</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-07-12T00:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1306564#M176797</link>
      <description>&lt;P&gt;answer from internal team:&lt;/P&gt;
&lt;P&gt;------------&lt;/P&gt;
&lt;P&gt;Please try to add file name while recording.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;root@imx8mpevk:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: imxaudioxcvr [imx-audio-xcvr], device 0: XCVR PCM snd-soc-dummy-dai-0 [XCVR PCM snd-soc-dummy-dai-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: imxaudiomicfil [imx-audio-micfil], device 0: micfil hifi snd-soc-dummy-dai-0 [micfil hifi snd-soc-dummy-dai-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: btscoaudio [bt-sco-audio], device 0: 30c20000.sai-bt-sco-pcm-wb bt-sco-pcm-wb-0 [30c20000.sai-bt-sco-pcm-wb bt-sco-pcm-wb-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: wm8960audio [wm8960-audio], device 0: HiFi wm8960-hifi-0 [HiFi wm8960-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: wm8960audio [wm8960-audio], device 1: HiFi-ASRC-FE (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

root@imx8mpevk:~# arecord -f S32_LE -d 10 -r 48000 --device="hw:1,0" capture.wav -vvv
Recording WAVE 'capture.wav' : Signed 32 bit Little Endian, Rate 48000 Hz, Mono
Hardware PCM card 1 '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  : 24000
  period_size  : 6000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 6000
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 24000
  silence_threshold: 0
  silence_size : 0
  boundary     : 6755399441055744000
  appl_ptr     : 0
  hw_ptr       : 0
Max peak (6000 samples): 0x30ce7100 ########             38%
Max peak (6000 samples): 0x161cea00 ####                 17%
Max peak (6000 samples): 0x066fc700 ##                   5%
Max peak (6000 samples): 0x070dfc00 ##                   5%
Max peak (6000 samples): 0x06bde300 ##                   5%
Max peak (6000 samples): 0x05783000 #                    4%
Max peak (6000 samples): 0x04088900 #                    3%
Max peak (6000 samples): 0x02ea0100 #                    2%
Max peak (6000 samples): 0x02c7b700 #                    2%
Max peak (6000 samples): 0x01c11e00 #                    1%
Max peak (6000 samples): 0x015fb400 #                    1%
Max peak (6000 samples): 0x011c8300 #                    0%
Max peak (6000 samples): 0x00febe00 #                    0%
Max peak (6000 samples): 0x00d98d00 #                    0%
Max peak (6000 samples): 0x00e02f00 #                    0%
Max peak (6000 samples): 0x0163fc00 #                    1%
Max peak (6000 samples): 0x00f8a700 #                    0%
Max peak (6000 samples): 0x009a6300 #                    0%
Max peak (6000 samples): 0x00a46200 #                    0%
Max peak (6000 samples): 0x00b33900 #                    0%
Max peak (6000 samples): 0x01711e00 #                    1%
Max peak (6000 samples): 0x009f9500 #                    0%
Max peak (6000 samples): 0x00cd3300 #                    0%
Max peak (6000 samples): 0x36bf4100 #########            42%
Max peak (6000 samples): 0x6bf24500 #################    84%
Max peak (6000 samples): 0x7ffffb00 #################### 99%
Max peak (6000 samples): 0x01347700 #                    0%
Max peak (6000 samples): 0x086e8200 ##                   6%
Max peak (6000 samples): 0x6a2b3200 #################    82%
Max peak (6000 samples): 0x0c089900 ##                   9%
Max peak (6000 samples): 0x041d8400 #                    3%
Max peak (6000 samples): 0x7f929300 #################### 99%
Max peak (6000 samples): 0x7d62b400 #################### 97%
Max peak (6000 samples): 0x1ec17d00 #####                24%
Max peak (6000 samples): 0x118f9700 ###                  13%
Max peak (6000 samples): 0x1905fc00 ####                 19%
Max peak (6000 samples): 0x1f170a00 #####                24%
Max peak (6000 samples): 0x222f0800 ######               26%
Max peak (6000 samples): 0x22a0fd00 ######               27%
Max peak (6000 samples): 0x22471100 ######               26%
Max peak (6000 samples): 0x2103fe00 ######               25%
Max peak (6000 samples): 0x20145600 ######               25%
Max peak (6000 samples): 0x1e55af00 #####                23%
Max peak (6000 samples): 0x1886dc00 ####                 19%
Max peak (6000 samples): 0x7f878b00 #################### 99%
Max peak (6000 samples): 0x2ee17800 ########             36%
Max peak (6000 samples): 0x123cf000 ###                  14%
Max peak (6000 samples): 0x7f571300 #################### 99%
Max peak (6000 samples): 0x0e6b0700 ###                  11%
Max peak (6000 samples): 0x0cb13600 ##                   9%
Max peak (6000 samples): 0x094e1900 ##                   7%
Max peak (6000 samples): 0x071d6e00 ##                   5%
Max peak (6000 samples): 0x04d5d200 #                    3%
Max peak (6000 samples): 0x02bd5e00 #                    2%
Max peak (6000 samples): 0x01347700 #                    0%
Max peak (6000 samples): 0x01b05700 #                    1%
Max peak (6000 samples): 0x319f4300 ########             38%
Max peak (6000 samples): 0x1579f300 ####                 16%
Max peak (6000 samples): 0x02087900 #                    1%
Max peak (6000 samples): 0x7ea5bc00 #################### 98%
Max peak (6000 samples): 0x46f33c00 ############         55%
Max peak (6000 samples): 0x00a60e00 #                    0%
Max peak (6000 samples): 0x01560000 #                    1%
Max peak (6000 samples): 0x019bf300 #                    1%
Max peak (6000 samples): 0x0264a900 #                    1%
Max peak (6000 samples): 0x0346df00 #                    2%
Max peak (6000 samples): 0x03f2ab00 #                    3%
Max peak (6000 samples): 0x03e9f300 #                    3%
Max peak (6000 samples): 0x0425b400 #                    3%
Max peak (6000 samples): 0x04b64700 #                    3%
Max peak (6000 samples): 0x04d75600 #                    3%
Max peak (6000 samples): 0x04fdff00 #                    3%
Max peak (6000 samples): 0x04df3500 #                    3%
Max peak (6000 samples): 0x0565be00 #                    4%
Max peak (6000 samples): 0x06027200 #                    4%
Max peak (6000 samples): 0x09d3af00 ##                   7%
Max peak (6000 samples): 0x08fd2300 ##                   7%
Max peak (6000 samples): 0x0b7ee800 ##                   8%
Max peak (6000 samples): 0x06f23900 ##                   5%
Max peak (6000 samples): 0x029f4a00 #                    2%
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some more information:&lt;/P&gt;
&lt;P&gt;I was testing with 5.10.35 BSP, with microphone&amp;nbsp;&lt;A href="https://www.adafruit.com/product/3492" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.adafruit.com/product/3492&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Their dts is same as on evk, so the problem is more like on hw side.&lt;/P&gt;
&lt;P&gt;About the difference between swpdm and micfil: they can both convert 1-bit PDM to PCM. MICFIL is described in the 8MP RM14.3 which uses hw decimation filter; swpdm uses software filter to the same job. swpdm was introduced previously to support 24-bit PCM because on 8MM, MICFIL can only convert to 16-bit PCM (see 8MM RM13.8.2.1). For 8MP, customer doesn't need to mind the swpdm.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;------------&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 05:50:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1306564#M176797</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-07-13T05:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1306816#M176817</link>
      <description>&lt;P&gt;Thanks for the response&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37066"&gt;@igorpadykov&lt;/a&gt;&amp;nbsp;, noticed a few differences between the recording parameters when running the same command as what was run internally;&lt;/P&gt;&lt;P&gt;From NXP;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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  : 24000
  period_size  : 6000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 6000
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 24000
  silence_threshold: 0
  silence_size : 0
  boundary     : 6755399441055744000
  appl_ptr     : 0
  hw_ptr       : 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From our setup, nothing has changed from our side with regard to these params, could you clarify if anything was modified on the NXP side to get this setup. Here is what we get; (note the buffer size, period size, period time etc)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 10:01:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1306816#M176817</guid>
      <dc:creator>jgsandom</dc:creator>
      <dc:date>2021-07-13T10:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1307342#M176878</link>
      <description>&lt;P&gt;from team:&lt;/P&gt;
&lt;P&gt;---------------&lt;/P&gt;
&lt;P&gt;I did not change the parameters, these parameters are set from user space (app).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the customer wants to try different parameters, they can get the list with arecord --help&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;root@imx8mpevk:~# arecord --help
Usage: arecord [OPTION]... [FILE]...

-h, --help              help
    --version           print current version
-l, --list-devices      list all soundcards and digital audio devices
-L, --list-pcms         list device names
-D, --device=NAME       select PCM by name
-q, --quiet             quiet mode
-t, --file-type TYPE    file type (voc, wav, raw or au)
-c, --channels=#        channels
-f, --format=FORMAT     sample format (case insensitive)
-r, --rate=#            sample rate
-d, --duration=#        interrupt after # seconds
-s, --samples=#         interrupt after # samples per channel
-M, --mmap              mmap stream
-N, --nonblock          nonblocking mode
-F, --period-time=#     distance between interrupts is # microseconds
-B, --buffer-time=#     buffer duration is # microseconds
    --period-size=#     distance between interrupts is # frames
    --buffer-size=#     buffer duration is # frames
-A, --avail-min=#       min available space for wakeup is # microseconds
-R, --start-delay=#     delay for automatic PCM start is # microseconds
                        (relative to buffer size if &amp;lt;= 0)
-T, --stop-delay=#      delay for automatic PCM stop is # microseconds from xrun
-v, --verbose           show PCM structure and setup (accumulative)
-V, --vumeter=TYPE      enable VU meter (TYPE: mono or stereo)
-I, --separate-channels one file for each channel
-i, --interactive       allow interactive operation from stdin
-m, --chmap=ch1,ch2,..  Give the channel map to override or follow
    --disable-resample  disable automatic rate resample
    --disable-channels  disable automatic channel conversions
    --disable-format    disable automatic format conversions
    --disable-softvol   disable software volume control (softvol)
    --test-position     test ring buffer position
    --test-coef=#       test coefficient for ring buffer position (default 8)
                        expression for validation is: coef * (buffer_size / 2)
    --test-nowait       do not wait for ring buffer - eats whole CPU
    --max-file-time=#   start another output file when the old file has recorded
                        for this many seconds
    --process-id-file   write the process ID here
    --use-strftime      apply the strftime facility to the output file name
    --dump-hw-params    dump hw_params of the device
    --fatal-errors      treat all errors as fatal
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; Then set the parameter like arecord --period-size=xxx --buffer-size=xxx ......&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;---------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 05:03:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1307342#M176878</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-07-14T05:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1307425#M176885</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37066"&gt;@igorpadykov&lt;/a&gt;&amp;nbsp;, I understand that the values can be set from userspace, but I didn't see that in your team members command in the previous message.&lt;/P&gt;&lt;P&gt;It was my understanding that we're using the same BSP and kernel version, shouldn't our default values be the same in that case? it makes me think that something does not quite line up between our setups.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We actually tried to use the same PDM breakout board as your team member as we thought that the PDM microphone on our boards might be damaged. The result was the same, reading 99%.&lt;/P&gt;&lt;P&gt;Is there anything in the meta layers that change the ALSA configuration? perhaps I'm missing that from my build. Could you please ask your team member to send any relevant ALSA conf files so I can compare with my own please?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 06:46:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1307425#M176885</guid>
      <dc:creator>jgsandom</dc:creator>
      <dc:date>2021-07-14T06:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1308955#M177050</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37066"&gt;@igorpadykov&lt;/a&gt;&amp;nbsp;any updates from the internal team about the above? Still not understanding why the default values from your team members traces are different to mine, despite using the same BSP. Is there a specific configuration that needs to be used?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 08:19:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1308955#M177050</guid>
      <dc:creator>jgsandom</dc:creator>
      <dc:date>2021-07-16T08:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1309083#M177064</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Joe&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I sent your questions but did not get answer yet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 10:47:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1309083#M177064</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-07-16T10:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1310422#M177197</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37066"&gt;@igorpadykov&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I have some more info regarding this question.&lt;/P&gt;&lt;P&gt;If we connect the PDM DATA input to RX0, we're able to capture audio (I imagine this is what your team member did). However, RX1/2/3 do not work. Is there a way to select the data input in the device tree? I did see&amp;nbsp;&lt;STRONG&gt;fsl,dataline&lt;/STRONG&gt; option in micfil but it doesn't seem to do anything.&lt;/P&gt;&lt;P&gt;Also, I tried to set the channel in&amp;nbsp;&lt;STRONG&gt;arecord&lt;/STRONG&gt; when using e.g. RX1 to channel 3 or 4 and it didn't make a difference.&lt;/P&gt;&lt;P&gt;We need to use RX2 for our implementation, as this is the only RX line exposed for us.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 11:40:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1310422#M177197</guid>
      <dc:creator>jgsandom</dc:creator>
      <dc:date>2021-07-20T11:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1310584#M177214</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37066"&gt;@igorpadykov&lt;/a&gt;&amp;nbsp;some more info for you, looking at fsl_micfil.h we have the following;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#define MICFIL_CTRL1_CHEN_SHIFT		0
#define MICFIL_CTRL1_CHEN_WIDTH		8
#define MICFIL_CTRL1_CHEN_MASK(x)	(BIT(x) &amp;lt;&amp;lt; MICFIL_CTRL1_CHEN_SHIFT)
#define MICFIL_CTRL1_CHEN(x)		(MICFIL_CTRL1_CHEN_MASK(x))&lt;/LI-CODE&gt;&lt;P&gt;It looks as though CHEN is never set and perhaps it just defaults to channel 0, which explains why RX0 works and not RX1/2/3&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jgsandom_0-1626797216524.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/150335i8068F57BA8C58619/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jgsandom_0-1626797216524.png" alt="jgsandom_0-1626797216524.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;jgsandom_0-1626797216524.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I modified fsl_micfil.c to set CHnEN to 0x30 to enable channel 5 + 6, with this we were able to capture on RX2.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Max peak (4095 samples): 0x150c4b00 ####                 16%
Max peak (4095 samples): 0x0ede2f00 ###                  11%
Max peak (4095 samples): 0x0d808300 ###                  10%
Max peak (4095 samples): 0x08e53b00 ##                   6%
Max peak (4095 samples): 0x08f5b700 ##                   6%
Max peak (4095 samples): 0x0903b900 ##                   7%
Max peak (4095 samples): 0x0831d700 ##                   6%
Max peak (4095 samples): 0x08c83e00 ##                   6%
Max peak (4095 samples): 0x079e1000 ##                   5%
Max peak (4095 samples): 0x19c24f00 #####                20%
Max peak (4095 samples): 0x24988c00 ######               28%
Max peak (4095 samples): 0x1d9e4500 #####                23%
Max peak (4095 samples): 0x56a85900 ##############       67%
Max peak (4095 samples): 0x5fe03600 ###############      74%
Max peak (4095 samples): 0x5cf95300 ###############      72%
Max peak (4095 samples): 0x3cfbd600 ##########           47%
Max peak (4095 samples): 0x480ecf00 ############         56%
Max peak (4095 samples): 0x7faad900 #################### 99%
Max peak (4095 samples): 0x62cb7700 ################     77%
Max peak (4095 samples): 0x59471200 ##############       69%
Max peak (4095 samples): 0x35279800 #########            41%
Max peak (4095 samples): 0x22460100 ######               26%
Max peak (4095 samples): 0x21a6bf00 ######               26%
Max peak (4095 samples): 0x41464c00 ###########          50%
Max peak (4095 samples): 0x14821700 ####                 16%
Max peak (4095 samples): 0x0b0c7c00 ##                   8%
Max peak (4095 samples): 0x0ed65700 ###                  11%&lt;/LI-CODE&gt;&lt;P&gt;Could we raise this for NXP to provide an official patch?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 16:08:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1310584#M177214</guid>
      <dc:creator>jgsandom</dc:creator>
      <dc:date>2021-07-20T16:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1310784#M177237</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Joe&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;all your updates and findings were submitted to team, still no feedback so far.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 00:42:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1310784#M177237</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-07-21T00:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8MP PDM Microphone SPH0641LM4H-1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1310979#M177250</link>
      <description>&lt;P&gt;answer from team :&lt;/P&gt;
&lt;P&gt;-------------------&lt;/P&gt;
&lt;P&gt;According to the customer's finding: recording from RX0 is correct, but from RX1/2/3 is not.&lt;/P&gt;
&lt;P&gt;This is expected to happen. In the design, one data line corresponds to 2 audio channels, and by default DMA carries starting from RX0. You can check the code in&amp;nbsp;sound/soc/fsl/fsl_micfil.c&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;fsl_micfil_probe
2332     micfil-&amp;gt;dma_params_rx.chan_name = "rx";
2333     micfil-&amp;gt;dma_params_rx.addr = res-&amp;gt;start + REG_MICFIL_DATACH0;
2334     micfil-&amp;gt;dma_params_rx.maxburst = MICFIL_DMA_MAXBURST_RX;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Customer's requirement is to record data from PDM_DAT2, then there are two potential ways worth trying:&lt;/P&gt;
&lt;P&gt;1. In the arecord command, add the parameter " - c 6 ", which records 6 channels of data. In the recorded file, channel 5/6 should have correct data, corresponding to RX2.&lt;/P&gt;
&lt;P&gt;2. Still use 2 channels, but in the above code, change&amp;nbsp;REG_MICFIL_DATACH0 to&amp;nbsp;REG_MICFIL_DATACH2, then DMA knows to carry data starting from RX2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--------------------&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 06:13:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8MP-PDM-Microphone-SPH0641LM4H-1/m-p/1310979#M177250</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-07-21T06:13:19Z</dc:date>
    </item>
  </channel>
</rss>

