<?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のトピックRe: How to write a custom driver for iMx6q for developing a PCM controller with Audio System IC Si3228x?</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-write-a-custom-driver-for-iMx6q-for-developing-a-PCM/m-p/1029679#M152121</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. You can download the Yocto BSP documentation from here:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/design/i.mx-developer-resources/i.mx-software-and-development-tools:IMX-SW" title="https://www.nxp.com/design/i.mx-developer-resources/i.mx-software-and-development-tools:IMX-SW"&gt;i.MX Software and Development Tools | NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g. &lt;A href="https://www.nxp.com/webapp/Download?colCode=L4.14.98_2.2.0_LINUX_DOCS" target="_blank"&gt;Linux 4.14.98_2.2.0 Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In this documentation, there are two documents are useful for your driver development. one is i.MX_Porting_Guide.pdf, and other one is i.MX_Reference_Manual.pdf (Chapter 7 is ALSA)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Then you can find the drivers source code as example/reference for the codec from here:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/sound/soc/codecs?h=imx_4.14.98_2.2.0" title="https://source.codeaurora.org/external/imx/linux-imx/tree/sound/soc/codecs?h=imx_4.14.98_2.2.0"&gt;codecs\soc\sound - linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the machine driver from here:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/sound/soc/fsl?h=imx_4.14.98_2.2.0" title="https://source.codeaurora.org/external/imx/linux-imx/tree/sound/soc/fsl?h=imx_4.14.98_2.2.0"&gt;fsl\soc\sound - linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Nov 2019 08:04:23 GMT</pubDate>
    <dc:creator>jimmychan</dc:creator>
    <dc:date>2019-11-28T08:04:23Z</dc:date>
    <item>
      <title>How to write a custom driver for iMx6q for developing a PCM controller with Audio System IC?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-write-a-custom-driver-for-iMx6q-for-developing-a-PCM/m-p/1029678#M152120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am writing a custom driver for iMx6q for developing a PCM protocol with Audio System IC Si3228x. Till now the approaches that&amp;nbsp;we are following is to get a low-level driver from ALSA codebase or refer to &lt;A href="https://github.com/torvalds/linux/blob/master/sound/soc/soc-pcm.c"&gt;soc-pcm.c&lt;/A&gt; file written by Texas Instruments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For writing the ALSA driver&amp;nbsp;we are&amp;nbsp;referring to:&amp;nbsp;&lt;A class="link-titled" href="https://www.kernel.org/doc/html/latest/sound/index.html" title="https://www.kernel.org/doc/html/latest/sound/index.html"&gt;Linux Sound Subsystem Documentation — The Linux Kernel documentation&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A class="link-titled" href="https://egeeks.github.io/kernal/writing-an-alsa-driver/pcm-interface.html" title="https://egeeks.github.io/kernal/writing-an-alsa-driver/pcm-interface.html"&gt;Chapter&amp;nbsp;5.&amp;nbsp;PCM Interface&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The driver should be able to do basic operations like read and writing on the PCM bus or throwing any garbage value that can be captured. The PCM mode is Network Mode from the iMX side and mulaw 8-bit from the IC's side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/purvi.billore"&gt;purvi.billore&lt;/A&gt;‌&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/bhupeshpatil"&gt;bhupeshpatil&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Nov 2019 07:39:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-write-a-custom-driver-for-iMx6q-for-developing-a-PCM/m-p/1029678#M152120</guid>
      <dc:creator>abhijeet_ghodga</dc:creator>
      <dc:date>2019-11-23T07:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a custom driver for iMx6q for developing a PCM controller with Audio System IC Si3228x?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-write-a-custom-driver-for-iMx6q-for-developing-a-PCM/m-p/1029679#M152121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. You can download the Yocto BSP documentation from here:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/design/i.mx-developer-resources/i.mx-software-and-development-tools:IMX-SW" title="https://www.nxp.com/design/i.mx-developer-resources/i.mx-software-and-development-tools:IMX-SW"&gt;i.MX Software and Development Tools | NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g. &lt;A href="https://www.nxp.com/webapp/Download?colCode=L4.14.98_2.2.0_LINUX_DOCS" target="_blank"&gt;Linux 4.14.98_2.2.0 Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In this documentation, there are two documents are useful for your driver development. one is i.MX_Porting_Guide.pdf, and other one is i.MX_Reference_Manual.pdf (Chapter 7 is ALSA)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Then you can find the drivers source code as example/reference for the codec from here:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/sound/soc/codecs?h=imx_4.14.98_2.2.0" title="https://source.codeaurora.org/external/imx/linux-imx/tree/sound/soc/codecs?h=imx_4.14.98_2.2.0"&gt;codecs\soc\sound - linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the machine driver from here:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/sound/soc/fsl?h=imx_4.14.98_2.2.0" title="https://source.codeaurora.org/external/imx/linux-imx/tree/sound/soc/fsl?h=imx_4.14.98_2.2.0"&gt;fsl\soc\sound - linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2019 08:04:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-write-a-custom-driver-for-iMx6q-for-developing-a-PCM/m-p/1029679#M152121</guid>
      <dc:creator>jimmychan</dc:creator>
      <dc:date>2019-11-28T08:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a custom driver for iMx6q for developing a PCM controller with Audio System IC?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-write-a-custom-driver-for-iMx6q-for-developing-a-PCM/m-p/1029680#M152122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have referred to the porting guide document. I also got I2S whitepaper from the VoIP vendor instructing on the parameters needed to interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In these 3 months, I have been able to send data from processor (sine signal, ramp, wav file), and it is successfully received at the telephone end of the VoIP DSP after uLaw companding, and going through ALSA software filter, VoIP audio block filter and has no problem of data collision or synchronisation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is in sending the data back to the processor, when the VoIP chip makes a 8-bit mu law signal at DTX pin and sends it to the processor, the same alsa_minimal_driver which was able to write on the PCM bus (using snd_pcm_writei()), is unable to read off the PCM bus giving the error:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Read from audio interface failed (Invalid argument/ broken pipe)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The driver is initialized using fsl-ssi-dai and the registers (20C8078, 20C8070, 20C8080, 20C8090, 20C401C, 2024028, 20C407C, 20C4060, 2028010, 2028020, 2028024 and 202801C) are set to give proper I2S settings, (I2S_CLK=512kHz, I2S_WS=8kHz) and SSI settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 32-bit word from the PCM channel should be masked out as a 8-bit data and then loopbacked to the same VoIP, and later sent to some other interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Abhijeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2020 08:08:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-write-a-custom-driver-for-iMx6q-for-developing-a-PCM/m-p/1029680#M152122</guid>
      <dc:creator>abhijeet_ghodga</dc:creator>
      <dc:date>2020-02-13T08:08:53Z</dc:date>
    </item>
  </channel>
</rss>

