<?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>i.MX ProcessorsのトピックHow to read pcm data within a linux driver</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-read-pcm-data-within-a-linux-driver/m-p/1279960#M174345</link>
    <description>&lt;P&gt;Im trying to write my own Asterisk DAHDI driver for an si3050 on an imx6ull.&lt;/P&gt;&lt;P&gt;The part I currently dont know how to do (I've just gotten into driver development) is to read and write audio data to the SAI(synchronous audio interface).&lt;/P&gt;&lt;P&gt;I found the fsl-sai driver:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://elixir.bootlin.com/linux/v4.14/source/sound/soc/fsl/fsl_sai.c" target="_blank" rel="nofollow noopener noreferrer"&gt;https://elixir.bootlin.com/linux/v4.14/source/sound/soc/fsl/fsl_sai.c&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;but I'm not sure how much of it I can use since I'm not making an alsa driver.&lt;/P&gt;&lt;P&gt;My ideal solution would be to set up some kind of periodic sdma transfer that could call an interrupt handler that will read/write the audio data and allow me to call my dahdi library functions within.&lt;/P&gt;&lt;P&gt;That fsl-sai driver is also set up to use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#3366FF"&gt;dmas = &amp;lt;&amp;amp;sdma 39 24 0&amp;gt;, &amp;lt;&amp;amp;sdma 40 24 0&amp;gt;;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;so would there be some way to hook into those?&lt;/P&gt;&lt;P&gt;I notice that &lt;A href="https://elixir.bootlin.com/linux/v4.14.78/source/include/linux/platform_data/dma-imx.h" target="_blank"&gt;https://elixir.bootlin.com/linux/v4.14.78/source/include/linux/platform_data/dma-imx.h&lt;/A&gt; has IMX_DMATYPE_SAI, so I'm wondering if its possible to use that somehow?&lt;/P&gt;</description>
    <pubDate>Thu, 20 May 2021 21:35:08 GMT</pubDate>
    <dc:creator>andrwebb</dc:creator>
    <dc:date>2021-05-20T21:35:08Z</dc:date>
    <item>
      <title>How to read pcm data within a linux driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-read-pcm-data-within-a-linux-driver/m-p/1279960#M174345</link>
      <description>&lt;P&gt;Im trying to write my own Asterisk DAHDI driver for an si3050 on an imx6ull.&lt;/P&gt;&lt;P&gt;The part I currently dont know how to do (I've just gotten into driver development) is to read and write audio data to the SAI(synchronous audio interface).&lt;/P&gt;&lt;P&gt;I found the fsl-sai driver:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://elixir.bootlin.com/linux/v4.14/source/sound/soc/fsl/fsl_sai.c" target="_blank" rel="nofollow noopener noreferrer"&gt;https://elixir.bootlin.com/linux/v4.14/source/sound/soc/fsl/fsl_sai.c&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;but I'm not sure how much of it I can use since I'm not making an alsa driver.&lt;/P&gt;&lt;P&gt;My ideal solution would be to set up some kind of periodic sdma transfer that could call an interrupt handler that will read/write the audio data and allow me to call my dahdi library functions within.&lt;/P&gt;&lt;P&gt;That fsl-sai driver is also set up to use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#3366FF"&gt;dmas = &amp;lt;&amp;amp;sdma 39 24 0&amp;gt;, &amp;lt;&amp;amp;sdma 40 24 0&amp;gt;;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;so would there be some way to hook into those?&lt;/P&gt;&lt;P&gt;I notice that &lt;A href="https://elixir.bootlin.com/linux/v4.14.78/source/include/linux/platform_data/dma-imx.h" target="_blank"&gt;https://elixir.bootlin.com/linux/v4.14.78/source/include/linux/platform_data/dma-imx.h&lt;/A&gt; has IMX_DMATYPE_SAI, so I'm wondering if its possible to use that somehow?&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 21:35:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-read-pcm-data-within-a-linux-driver/m-p/1279960#M174345</guid>
      <dc:creator>andrwebb</dc:creator>
      <dc:date>2021-05-20T21:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to read pcm data within a linux driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-read-pcm-data-within-a-linux-driver/m-p/1280007#M174353</link>
      <description>&lt;P&gt;Hi Andriy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;one can look at MX6ULL FreeRTOS&amp;nbsp; examples in ../demo_apps/sai_sdma_freertos&amp;nbsp;&lt;/P&gt;
&lt;UL style="box-sizing: border-box; margin-top: 0.5em; margin-bottom: 0px; padding: 0px; list-style-type: none; color: #64798a; font-family: Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #f6f7f8; text-decoration-style: initial; text-decoration-color: initial;"&gt;
&lt;LI style="box-sizing: border-box; margin-bottom: 0.5em; position: relative; padding: 5px 5px 5px 25px;"&gt;&lt;A class="" style="box-sizing: border-box; background-color: transparent; color: #215bd6; text-decoration: none; cursor: pointer;" href="https://www.nxp.com/webapp/Download?colCode=SDK2.2_iMX6ULL_WIN&amp;amp;appType=license&amp;amp;location=null" target="_blank"&gt;Windows Installer: MCUXpresso SDK2.2 for i.MX 6ULL&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/design/software/embedded-software/i-mx-software:IMX-SW" target="_blank"&gt;https://www.nxp.com/design/software/embedded-software/i-mx-software:IMX-SW&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, 21 May 2021 00:26:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-read-pcm-data-within-a-linux-driver/m-p/1280007#M174353</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-05-21T00:26:33Z</dc:date>
    </item>
  </channel>
</rss>

