<?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 Anyone has usb_examples/usb_device_audio_speaker working? in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Anyone-has-usb-examples-usb-device-audio-speaker-working/m-p/651835#M7049</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying the usb audio examples in SDK_2.0 on a TWR-K24F120M and I cannot get usb_device_audio_speaker to work.&amp;nbsp; The USB portion of the example seems to work fine, with the speaker being correctly detected and enumerated by the host, and audio data flowing over USB.&amp;nbsp; The problem is the DMA transfer to the codec: SAI_TransferSendEDMA() is called, but the associated callback() never gets called.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other audio examples that use that mechanism work fine, in particular demo_apps/sai and driver_examples/sai/sai_edma_transfer.c have the same callback() called, and produce sound as expected.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone suggest how to troubleshoot this?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cc:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" data-containerid="-1" data-containertype="-1" data-objectid="279018" data-objecttype="3" href="https://community.nxp.com/people/kylemanna"&gt;Kyle Manna&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Dec 2016 21:00:38 GMT</pubDate>
    <dc:creator>javiercardona</dc:creator>
    <dc:date>2016-12-05T21:00:38Z</dc:date>
    <item>
      <title>Anyone has usb_examples/usb_device_audio_speaker working?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Anyone-has-usb-examples-usb-device-audio-speaker-working/m-p/651835#M7049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying the usb audio examples in SDK_2.0 on a TWR-K24F120M and I cannot get usb_device_audio_speaker to work.&amp;nbsp; The USB portion of the example seems to work fine, with the speaker being correctly detected and enumerated by the host, and audio data flowing over USB.&amp;nbsp; The problem is the DMA transfer to the codec: SAI_TransferSendEDMA() is called, but the associated callback() never gets called.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other audio examples that use that mechanism work fine, in particular demo_apps/sai and driver_examples/sai/sai_edma_transfer.c have the same callback() called, and produce sound as expected.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone suggest how to troubleshoot this?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cc:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" data-containerid="-1" data-containertype="-1" data-objectid="279018" data-objecttype="3" href="https://community.nxp.com/people/kylemanna"&gt;Kyle Manna&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2016 21:00:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Anyone-has-usb-examples-usb-device-audio-speaker-working/m-p/651835#M7049</guid>
      <dc:creator>javiercardona</dc:creator>
      <dc:date>2016-12-05T21:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone has usb_examples/usb_device_audio_speaker working?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Anyone-has-usb-examples-usb-device-audio-speaker-working/m-p/651836#M7050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did get this to work, but not without some effort...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I applied the workaround given here to allow multiple SAI_TransferSendEDMA() to work.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/429152"&gt;How to reuse SAI_TransferSendEDMA in KSDK 2.0&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, I copied over the SAI configuration from sai_edma_transfer.c, in particular&lt;/P&gt;&lt;P&gt;use the default SGTL config:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;- sgtl_config_t codecConfig;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;- codecConfig.bus = kSGTL_BusLeftJustified;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;- codecConfig.master_slave = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;- codecConfig.route = kSGTL_RoutePlayback;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;- SGTL_Init(&amp;amp;codecHandle, &amp;amp;codecConfig);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;+ SGTL_Init(&amp;amp;codecHandle, NULL);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And configure the SGTL as slave (SAI as master):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;-#if !defined(DEMO_CODEC_WM8960)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;- config.masterSlave = kSAI_Slave;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;-#if defined(FSL_FEATURE_SAI_HAS_MCR) &amp;amp;&amp;amp; (FSL_FEATURE_SAI_HAS_MCR)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;- config.mclkOutputEnable = false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;-#endif&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;-#endif&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 06:30:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Anyone-has-usb-examples-usb-device-audio-speaker-working/m-p/651836#M7050</guid>
      <dc:creator>javiercardona</dc:creator>
      <dc:date>2016-12-06T06:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone has usb_examples/usb_device_audio_speaker working?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Anyone-has-usb-examples-usb-device-audio-speaker-working/m-p/651837#M7051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kyle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you mind share your USB audio speaker descriptor with me?&lt;/P&gt;&lt;P&gt;I am also want to use KSDK2.1 to build this application on FRDM-K66F.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Mar 2017 10:02:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Anyone-has-usb-examples-usb-device-audio-speaker-working/m-p/651837#M7051</guid>
      <dc:creator>kyleyang</dc:creator>
      <dc:date>2017-03-16T10:02:13Z</dc:date>
    </item>
  </channel>
</rss>

