<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Play PCM raw data on NRF5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103509/play-pcm-raw-data-on-nrf5340</link><description>Hello, 
 I want to play a .wav audio file on nRF5340 audio dk. 
 I convert the wav file into raw data and store it in an array. 
 After that, I play it using nrfx_i2s_start, but the output sound is very noisy. 
 Here is my code: 
 
 The PCM raw data size</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Jul 2024 12:49:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103509/play-pcm-raw-data-on-nrf5340" /><item><title>RE: Play PCM raw data on NRF5340</title><link>https://devzone.nordicsemi.com/thread/495418?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2024 12:49:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f68f8d48-dd04-49c0-9493-60bb84e09299</guid><dc:creator>PSR</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you please provide source code for playing the PCM HEX data in nRF5340 audio Dk&amp;nbsp; Board.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Regards,&lt;/p&gt;
&lt;p&gt;PSR.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Play PCM raw data on NRF5340</title><link>https://devzone.nordicsemi.com/thread/444945?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 13:12:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:608e55d4-4668-460c-8c3d-29dedc7c53ad</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello LandyWang,&lt;br /&gt;&lt;br /&gt;Thank you for your patience with this.&lt;br /&gt;A mismatch in buffer sizes could definitely cause choppy audio output.&lt;br /&gt;I am glad to read that you now are able to output the sound as expected! :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please do not hesitate to open another ticket if you should encounter any other issues or questions in the future.&lt;br /&gt;&lt;br /&gt;Good luck with your development!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Play PCM raw data on NRF5340</title><link>https://devzone.nordicsemi.com/thread/444854?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 08:00:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eedf0f27-e39a-4e2b-b990-08c389aa1a26</guid><dc:creator>LandyWang</dc:creator><description>&lt;p&gt;I think I have found the cause of this problem. The buffer_size setting in nrfx_i2s_start is too large.&lt;/p&gt;
&lt;p&gt;I modified the code, divided the raw data into several smaller buffers, and then processed them with nrfx_i2s_next_buffers_set. Now the sound can be output normally&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>