<?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: imx6q, issues i2s redirected to HDMI in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/imx6q-issues-i2s-redirected-to-HDMI/m-p/481339#M76745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;doing some progresses, the underrun issue happen with the following paths:&lt;/P&gt;&lt;P&gt;i2s (kernel) -&amp;gt; arecord (userspace) -&amp;gt; sound pipe (kernel) -&amp;gt; aplay (userspace) -&amp;gt; hdmi (kernel)&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;esai (kernel) -&amp;gt; arecord (userspace) -&amp;gt; sound pipe (kernel) -&amp;gt; aplay (userspace) -&amp;gt; hdmi (kernel)&lt;/P&gt;&lt;P&gt;So i excluded&lt;/P&gt;&lt;P&gt;1) i2s / esai drivers&lt;/P&gt;&lt;P&gt;2) hdmi driver, used pixelclock is the same of kernel 3.10, play fine from file, don't see issues here&lt;/P&gt;&lt;P&gt;so i concentrated in the middle part, how alsa "pipe" the samples, and found like the issue is in&lt;/P&gt;&lt;P&gt;the PCM/DMA part.&lt;/P&gt;&lt;P&gt;Backporting to 3.14.28 some 3.14.52 changes in sound/core/pcm_dmaengine.c is giving some improvements,&lt;/P&gt;&lt;P&gt;underrun is happening after some hours in 32000 and after several minutes at 44100 so i have at least some improvements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;angelo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 21 May 2016 09:34:02 GMT</pubDate>
    <dc:creator>angelo_d</dc:creator>
    <dc:date>2016-05-21T09:34:02Z</dc:date>
    <item>
      <title>imx6q, issues i2s redirected to HDMI</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx6q-issues-i2s-redirected-to-HDMI/m-p/481338#M76744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the need to play some audio coming from an i2s source (a radio fm) into hdmi card output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am using a simple alsa loop command as:&lt;/P&gt;&lt;P&gt;arecord --rate=48000 --device=sysdefault:CARD=imxaudiosi4745 -B 8000 -F 1000 | aplay --device=sysdefault:CARD=imxhdmisoc&lt;/P&gt;&lt;P&gt;And a simple hdmi CEA setup as below:&lt;/P&gt;&lt;P&gt;mxc_sdc_fb fb.28: 640x480 h_sync,r,l: 96,16,48&amp;nbsp; v_sync,l,u: 2,10,33 pixclock=25174000 Hz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On kernel 3.10.17 (from boundary) the loop plays fine for minutes.&lt;/P&gt;&lt;P&gt;On more recent kernel 3.14.28, i get some underrun messages here and there, after 10 to 40 seconds, and audio is interrupted from some small holes, or fully interrupted sometime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arecord --rate=48000 --device=sysdefault:CARD=imxaudiosi4745 -B 8000 -F 1000 | aplay --device=sysdefault:CARD=imxhdmisoc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Recording WAVE 'stdin' : Unsigned 8 bit, Rate 48000 Hz, Mono&lt;/P&gt;&lt;P&gt;Playing WAVE 'stdin' : Unsigned 8 bit, Rate 48000 Hz, Mono&lt;/P&gt;&lt;P&gt;si4745-codec si4745-codec.355: si4745 codec, setting sample rate as 48000&lt;/P&gt;&lt;P&gt;overrun!!! (at least 0.044 ms long)&lt;/P&gt;&lt;P&gt;overrun!!! (at least 0.870 ms long)&lt;/P&gt;&lt;P&gt;overrun!!! (at least 0.011 ms long)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see btw issues playing a wav file directly to hdmi, so it is like some issue in the i2s-&amp;gt;hdmi conversion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Was some similar issue knows ?&lt;/P&gt;&lt;P&gt;What do you suggest to do know (can't switch to other kernel versions now) ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;angelo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2016 13:33:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx6q-issues-i2s-redirected-to-HDMI/m-p/481338#M76744</guid>
      <dc:creator>angelo_d</dc:creator>
      <dc:date>2016-05-18T13:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: imx6q, issues i2s redirected to HDMI</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx6q-issues-i2s-redirected-to-HDMI/m-p/481339#M76745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;doing some progresses, the underrun issue happen with the following paths:&lt;/P&gt;&lt;P&gt;i2s (kernel) -&amp;gt; arecord (userspace) -&amp;gt; sound pipe (kernel) -&amp;gt; aplay (userspace) -&amp;gt; hdmi (kernel)&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;esai (kernel) -&amp;gt; arecord (userspace) -&amp;gt; sound pipe (kernel) -&amp;gt; aplay (userspace) -&amp;gt; hdmi (kernel)&lt;/P&gt;&lt;P&gt;So i excluded&lt;/P&gt;&lt;P&gt;1) i2s / esai drivers&lt;/P&gt;&lt;P&gt;2) hdmi driver, used pixelclock is the same of kernel 3.10, play fine from file, don't see issues here&lt;/P&gt;&lt;P&gt;so i concentrated in the middle part, how alsa "pipe" the samples, and found like the issue is in&lt;/P&gt;&lt;P&gt;the PCM/DMA part.&lt;/P&gt;&lt;P&gt;Backporting to 3.14.28 some 3.14.52 changes in sound/core/pcm_dmaengine.c is giving some improvements,&lt;/P&gt;&lt;P&gt;underrun is happening after some hours in 32000 and after several minutes at 44100 so i have at least some improvements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;angelo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 May 2016 09:34:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx6q-issues-i2s-redirected-to-HDMI/m-p/481339#M76745</guid>
      <dc:creator>angelo_d</dc:creator>
      <dc:date>2016-05-21T09:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: imx6q, issues i2s redirected to HDMI</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx6q-issues-i2s-redirected-to-HDMI/m-p/481340#M76746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use a simple Gstreamer pipeline with I2S as a source and HDMI Audio as a sink.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Artur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 11:47:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx6q-issues-i2s-redirected-to-HDMI/m-p/481340#M76746</guid>
      <dc:creator>art</dc:creator>
      <dc:date>2016-05-24T11:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: imx6q, issues i2s redirected to HDMI</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx6q-issues-i2s-redirected-to-HDMI/m-p/481341#M76747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Artur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks, i solved with pulseaudio and module-loopback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For other users, in case it is needed: this issue is nothing related to imx6q or kernels.&lt;/P&gt;&lt;P&gt;It is related to a common streaming issue of clock synchronizations between 2 sound cards / devices (live stream).&lt;/P&gt;&lt;P&gt;Even if the 2 devices suppose to use same sample clock, of course, clock is not exactly the same,&lt;/P&gt;&lt;P&gt;so one device is a bit faster, the other a bit slower.&lt;/P&gt;&lt;P&gt;Common way to solve this is to use larger buffers and allow intelligent software to correct the issue also in case inserting&lt;/P&gt;&lt;P&gt;frames or dropping them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;angelo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 13:36:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx6q-issues-i2s-redirected-to-HDMI/m-p/481341#M76747</guid>
      <dc:creator>angelo_d</dc:creator>
      <dc:date>2016-05-24T13:36:56Z</dc:date>
    </item>
  </channel>
</rss>

