<?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 SAI2 using (DMA) in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1597212#M201365</link>
    <description>&lt;P&gt;I would like to connect a microphone to the SAI 2 on the imx8qm. For this I integrated the microphone in the DTB file.&lt;BR /&gt;...&lt;BR /&gt;cpu-dai = &amp;lt;&amp;amp;sai2&amp;gt;;&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;As a result, when I create the microphone as a card, I get an error.&lt;/P&gt;&lt;P&gt;fsl-sai 59060000.sai: Missing dma channel for stream: (in the dmaengine_pcm_new function)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is due to the fact that the SAI2 only has one DMA. (only RX)&lt;BR /&gt;1.)Is there any way I can take that into account?&lt;/P&gt;&lt;P&gt;The error no longer occurs if you define an additional DMA in SAI2.&lt;BR /&gt;2.) Is this acceptable?&lt;BR /&gt;3.) Or will I get the following problem?&lt;BR /&gt;4.) Or is there another solution?&lt;/P&gt;&lt;P&gt;sai2: sai@59060000 {&lt;BR /&gt;compatible = "fsl,imx8qm-sai";&lt;BR /&gt;reg = &amp;lt;0x59060000 0x10000&amp;gt;;&lt;BR /&gt;interrupts = &amp;lt;GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH&amp;gt;;&lt;BR /&gt;clocks = &amp;lt;&amp;amp;sai2_lpcg 1&amp;gt;,&lt;BR /&gt;&amp;lt;&amp;amp;clk_dummy&amp;gt;,&lt;BR /&gt;&amp;lt;&amp;amp;sai2_lpcg 0&amp;gt;,&lt;BR /&gt;&amp;lt;&amp;amp;clk_dummy&amp;gt;,&lt;BR /&gt;&amp;lt;&amp;amp;clk_dummy&amp;gt;;&lt;BR /&gt;clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";&lt;BR /&gt;/* dma-names = "rx";&lt;BR /&gt;dmas = &amp;lt;&amp;amp;edma0 16 0 1&amp;gt;; */&lt;BR /&gt;dma-names = "rx", "tx";&lt;BR /&gt;dmas = &amp;lt;&amp;amp;edma0 16 0 1&amp;gt;, &amp;lt;&amp;amp;edma0 17 0 0&amp;gt;;&lt;BR /&gt;power-domains = &amp;lt;&amp;amp;pd IMX_SC_R_SAI_2&amp;gt;;&lt;BR /&gt;status = "disabled";&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2023 09:42:11 GMT</pubDate>
    <dc:creator>kschauties</dc:creator>
    <dc:date>2023-02-10T09:42:11Z</dc:date>
    <item>
      <title>SAI2 using (DMA)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1597212#M201365</link>
      <description>&lt;P&gt;I would like to connect a microphone to the SAI 2 on the imx8qm. For this I integrated the microphone in the DTB file.&lt;BR /&gt;...&lt;BR /&gt;cpu-dai = &amp;lt;&amp;amp;sai2&amp;gt;;&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;As a result, when I create the microphone as a card, I get an error.&lt;/P&gt;&lt;P&gt;fsl-sai 59060000.sai: Missing dma channel for stream: (in the dmaengine_pcm_new function)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is due to the fact that the SAI2 only has one DMA. (only RX)&lt;BR /&gt;1.)Is there any way I can take that into account?&lt;/P&gt;&lt;P&gt;The error no longer occurs if you define an additional DMA in SAI2.&lt;BR /&gt;2.) Is this acceptable?&lt;BR /&gt;3.) Or will I get the following problem?&lt;BR /&gt;4.) Or is there another solution?&lt;/P&gt;&lt;P&gt;sai2: sai@59060000 {&lt;BR /&gt;compatible = "fsl,imx8qm-sai";&lt;BR /&gt;reg = &amp;lt;0x59060000 0x10000&amp;gt;;&lt;BR /&gt;interrupts = &amp;lt;GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH&amp;gt;;&lt;BR /&gt;clocks = &amp;lt;&amp;amp;sai2_lpcg 1&amp;gt;,&lt;BR /&gt;&amp;lt;&amp;amp;clk_dummy&amp;gt;,&lt;BR /&gt;&amp;lt;&amp;amp;sai2_lpcg 0&amp;gt;,&lt;BR /&gt;&amp;lt;&amp;amp;clk_dummy&amp;gt;,&lt;BR /&gt;&amp;lt;&amp;amp;clk_dummy&amp;gt;;&lt;BR /&gt;clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";&lt;BR /&gt;/* dma-names = "rx";&lt;BR /&gt;dmas = &amp;lt;&amp;amp;edma0 16 0 1&amp;gt;; */&lt;BR /&gt;dma-names = "rx", "tx";&lt;BR /&gt;dmas = &amp;lt;&amp;amp;edma0 16 0 1&amp;gt;, &amp;lt;&amp;amp;edma0 17 0 0&amp;gt;;&lt;BR /&gt;power-domains = &amp;lt;&amp;amp;pd IMX_SC_R_SAI_2&amp;gt;;&lt;BR /&gt;status = "disabled";&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 09:42:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1597212#M201365</guid>
      <dc:creator>kschauties</dc:creator>
      <dc:date>2023-02-10T09:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAI2 using (DMA)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1598993#M201498</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Using imx8qm-ss-audio.dtsi as a reference, you shouldn't gen any error using just one DMA but, if you fixed that error adding one DMA there is no problem. Please refer to attached code on the next link.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8qm-ss-audio.dtsi?h=lf-5.15.32-2.0.0" target="_blank"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8qm-ss-audio.dtsi?h=lf-5.15.32-2.0.0&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 16:18:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1598993#M201498</guid>
      <dc:creator>JorgeCas</dc:creator>
      <dc:date>2023-02-14T16:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAI2 using (DMA)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1599685#M201559</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;if i remove my hack i keep getting the error. (sl-sai 59060000.sai: Missing dma channel for stream: (in the dmaengine_pcm_new function))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;And the micro (card) is not created!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;fsl-sai 59060000.sai: Missing dma channel for stream: 0&lt;BR /&gt;[ 2.633632] fsl-sai 59060000.sai: ASoC: error at snd_soc_pcm_component_new on 59060000.sai: -22&lt;BR /&gt;[ 2.642361] imx-sph0645: ASoC: pcm imx-sph0645 snd-soc-dummy-dai-0 constructor failed for dailink imx-sph0645: -22&lt;BR /&gt;[ 2.652816] imx-mic-sph0645 imx-sph0645: ASoC: can't create pcm imx-sph0645 :-22&lt;BR /&gt;[ 2.660371] imx-mic-sph0645 imx-sph0645: Failed to register card: -22&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Feb 2023 15:46:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1599685#M201559</guid>
      <dc:creator>kschauties</dc:creator>
      <dc:date>2023-02-15T15:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAI2 using (DMA)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1599776#M201567</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please share me your entire device tree?&lt;/P&gt;
&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 18:12:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1599776#M201567</guid>
      <dc:creator>JorgeCas</dc:creator>
      <dc:date>2023-02-15T18:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAI2 using (DMA)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1600274#M201597</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Here is my device tree.&lt;/P&gt;&lt;P&gt;With a hack with the second dma channel for sai i get a card . But i can not change the or set the clock on the sai port!&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;4.858522] random: crng init done&lt;BR /&gt;[ 4.874511] ALSA device list:&lt;BR /&gt;[ 4.877497] #0: Dummy 1&lt;BR /&gt;[ 4.880114] #1: imx-audio-sph0645&lt;BR /&gt;[ 4.883608] #2: Sound-Card&lt;BR /&gt;[ 4.907909] VFS: Mounted root (nfs filesystem) on device 0:21.&lt;BR /&gt;[ 4.914969] devtmpfs: mounted&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;When i start a record i get this error:&lt;/P&gt;&lt;P&gt;arecord -D hw:1,0 -r 48000 -f S32_LE -c 1 -d 5 -t wav -v test2_32_1.&lt;BR /&gt;wav&lt;BR /&gt;Recording WAVE 'test2_32_1.wav' : [ 92.510820] [imx_sph0645_hw_params]&lt;BR /&gt;Signed 32 bit Little Endian, Rate 48000 Hz, Mono&lt;BR /&gt;[ 92.517134] channels: 1, sampling rate : 48000, sampling bits : 32&lt;BR /&gt;[ 92.527629] bclk : 3072000&lt;BR /&gt;[ 92.634864] fsl_sai_set_bclk clk_rate:0 continue&lt;BR /&gt;[ 92.639934] fsl-sai 59060000.sai: failed to derive required Rx rate: 3072000&lt;BR /&gt;[ 92.647180] fsl-sai 59060000.sai: ASoC: error at snd_soc_dai_hw_params on 59060000.sai: -22&lt;BR /&gt;arecord: set_params:1407: Unable to install hw params:&lt;BR /&gt;ACCESS: RW_INTERLEAVED&lt;BR /&gt;FORMAT: S32_LE&lt;BR /&gt;SUBFORMAT: STD&lt;BR /&gt;SAMPLE_BITS: 32&lt;BR /&gt;FRAME_BITS: 32&lt;BR /&gt;CHANNELS: 1&lt;BR /&gt;RATE: 48000&lt;BR /&gt;PERIOD_TIME: 125000&lt;BR /&gt;PERIOD_SIZE: 6000&lt;BR /&gt;PERIOD_BYTES: 24000&lt;BR /&gt;PERIODS: 4&lt;BR /&gt;BUFFER_TIME: 500000&lt;BR /&gt;BUFFER_SIZE: 24000&lt;BR /&gt;BUFFER_BYTES: 96000&lt;BR /&gt;TICK_TIME: 0&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 07:36:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1600274#M201597</guid>
      <dc:creator>kschauties</dc:creator>
      <dc:date>2023-02-16T07:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAI2 using (DMA)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1600326#M201602</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;One point more.&lt;/P&gt;&lt;P&gt;I see by the start following:&lt;/P&gt;&lt;P&gt;(my debug)&lt;/P&gt;&lt;P&gt;[ 3.192721] !!!!!! soc_init_pcm_runtime !!!!!!!!&lt;BR /&gt;[ 3.197363] !!!!!! asoc_simple_init_dai !!!!!!!!!&lt;BR /&gt;[ 3.202165] !!!!! snd_soc_dai_set_sysclk freq:12000000 !!!!&lt;BR /&gt;[ 3.207836] !!!!!! asoc_simple_init_dai !!!!!!!!!&lt;BR /&gt;[ 3.212638] !!!!! snd_soc_dai_set_sysclk freq:175000000 !!!!&lt;/P&gt;&lt;P&gt;The sai1 get 12MHz that is ok this is the soundcard and the sai2 get 175MHz&amp;nbsp; (the micro conected)&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Why it can't be neatly divided down. Do you know where the 175 MHz come from?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 Feb 2023 08:36:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1600326#M201602</guid>
      <dc:creator>kschauties</dc:creator>
      <dc:date>2023-02-16T08:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAI2 using (DMA)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1600658#M201626</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;All seems to be ok on your device tree but, there is something that is making noise to me, your mux configuration on SAI2 it is configured to use ESAI1 functions I think you should try using 0xCE000040.&lt;/P&gt;
&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 18:59:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1600658#M201626</guid>
      <dc:creator>JorgeCas</dc:creator>
      <dc:date>2023-02-16T18:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAI2 using (DMA)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1603761#M201874</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;the sai2 is only work with "tx" definition !&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;dma-names = "rx", "tx";&lt;BR /&gt;dmas = &amp;lt;&amp;amp;edma0 16 0 1&amp;gt;, &amp;lt;&amp;amp;edma0 17 0 0&amp;gt;;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;and i found in the fsl-sai.txt the &lt;SPAN class=""&gt;sentence&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"Two dmas have to be defined, "tx" and "rx".&lt;/P&gt;&lt;P&gt;For me is this a way i can go, i don't used sai3&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 14:33:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1603761#M201874</guid>
      <dc:creator>kschauties</dc:creator>
      <dc:date>2023-02-22T14:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAI2 using (DMA)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1606306#M202076</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;gt; "Two dmas have to be defined, "tx" and "rx".&lt;/P&gt;
&lt;P&gt;It also could be defined with one (tx or rx)&lt;/P&gt;
&lt;P&gt;Maybe you have declared on DMA channels tx and rx. Causing an error when you skip tx and working when you include tx on your declaration.&lt;/P&gt;
&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 18:34:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1606306#M202076</guid>
      <dc:creator>JorgeCas</dc:creator>
      <dc:date>2023-02-27T18:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAI2 using (DMA)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1606599#M202099</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;"Maybe you have declared on DMA channels tx and rx"&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Where should I have done this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I only know if I don't set both, it doesn't work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 06:28:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1606599#M202099</guid>
      <dc:creator>kschauties</dc:creator>
      <dc:date>2023-02-28T06:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAI2 using (DMA)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1607097#M202150</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Here is an &lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8qm-ss-audio.dtsi?h=lf-5.15.32-2.0.0" target="_self"&gt;example&lt;/A&gt; of how to configure DMA on iMX8QM. As you can see there are some SAI ports configured with both (tx and rx) or only one.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 19:57:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1607097#M202150</guid>
      <dc:creator>JorgeCas</dc:creator>
      <dc:date>2023-02-28T19:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAI2 using (DMA)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1607619#M202189</link>
      <description>&lt;P&gt;We can close this point. Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 10:56:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SAI2-using-DMA/m-p/1607619#M202189</guid>
      <dc:creator>kschauties</dc:creator>
      <dc:date>2023-03-01T10:56:20Z</dc:date>
    </item>
  </channel>
</rss>

