<?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>Implementing Equalizer into nrf5340 Audio DK application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98384/implementing-equalizer-into-nrf5340-audio-dk-application</link><description>Hello, i am looking to implement an equalizer into the Audio application for the nrf5340 Audio DK. I want to implement this, specifically on the gateway side, and alter the sound before sending it to the headset. 
 My question is where in the code would</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Apr 2023 13:29:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98384/implementing-equalizer-into-nrf5340-audio-dk-application" /><item><title>RE: Implementing Equalizer into nrf5340 Audio DK application</title><link>https://devzone.nordicsemi.com/thread/420270?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2023 13:29:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a731b08-61be-4504-9fd4-43717fae4bfe</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The data is split into the left and right channels in pscm_two_channel_split which is in sw_codec_encode().&lt;/p&gt;
&lt;p&gt;So if you want to equalize the left and right separately I would do it here: &lt;a title="https://github.com/nrfconnect/sdk-nrf/blob/main/applications/nrf5340_audio/src/audio/sw_codec_select.c#l64" href="https://github.com/nrfconnect/sdk-nrf/blob/main/applications/nrf5340_audio/src/audio/sw_codec_select.c#L64" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/applications/nrf5340_audio/src/audio/sw_codec_select.c#L64&lt;/a&gt;. The char pcm_data_mono is just pure PCM data.&lt;/p&gt;
&lt;p&gt;pcm_raw_data is PCM data as well, but it&amp;#39;s both left and right and the bit depth is 16 bits, so every two bytes it will alternate between the two channels.&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing Equalizer into nrf5340 Audio DK application</title><link>https://devzone.nordicsemi.com/thread/420119?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2023 08:02:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4eb0dc27-eca8-4dd5-8f71-8cb9d6ef0dc9</guid><dc:creator>flamefire</dc:creator><description>&lt;p&gt;Thanks for reply! That was also where we thought would be the best place. We have a problem with unpacking the&amp;nbsp; char pcm_raw_data, as we dont know the structure of the data, could you provide more information or point me in a direction? And how can we split it into left and right channel?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing Equalizer into nrf5340 Audio DK application</title><link>https://devzone.nordicsemi.com/thread/419303?ContentTypeID=1</link><pubDate>Wed, 05 Apr 2023 14:27:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b729d506-5a54-4a23-bcdd-fc08bf86143b</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for misunderstanding the question (since the audio_datapath_stream_out() function was mentioned).&lt;/p&gt;
&lt;p&gt;The proper position to manipulate the audio PCM data is before the&amp;nbsp;&lt;span&gt;sw_codec_encode()&lt;/span&gt;:&lt;br /&gt;&lt;a title="https://github.com/nrfconnect/sdk-nrf/blob/8d552d2f049c096a6c7188299d39c5b4afe1b64e/applications/nrf5340_audio/src/audio/audio_system.c#l146" href="https://github.com/nrfconnect/sdk-nrf/blob/8d552d2f049c096a6c7188299d39c5b4afe1b64e/applications/nrf5340_audio/src/audio/audio_system.c#L146" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/blob/8d552d2f049c096a6c7188299d39c5b4afe1b64e/applications/nrf5340_audio/src/audio/audio_system.c#L146&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing Equalizer into nrf5340 Audio DK application</title><link>https://devzone.nordicsemi.com/thread/419219?ContentTypeID=1</link><pubDate>Wed, 05 Apr 2023 10:34:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17d15308-67f5-462f-90c8-5175dad4b68c</guid><dc:creator>flamefire</dc:creator><description>&lt;p&gt;Thanks for the reply.&lt;br /&gt;&lt;br /&gt;There is something i dont quite understand. sumup: I want to equalize the audio data on the gateway between receiving it from I2S or USB and sending it to headset with BLE. The headset it just the standard configuration and recieves equalized audio.&lt;br /&gt;&lt;br /&gt;Im wondering where the data is coming from in le_audio_rx_data_handler(), i see that it is connected to the callback function&amp;nbsp;&lt;span&gt;le_audio_enable&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;le_audio_receive_cb&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;recv_cb&lt;/span&gt;&lt;span&gt;) in the file&amp;nbsp;&lt;/span&gt;(in my case) le_audio_bis_gateway.c, which starts the broadcast gateway, but where does &lt;span&gt;le_audio_enable&lt;/span&gt;&amp;nbsp;get the data from? &lt;br /&gt;&lt;br /&gt;I have setup my input data to be from USB, and i presume thats where&amp;nbsp;&lt;strong&gt;le_audio_enable&lt;/strong&gt; gets the data from. Or if i change it to I2S then it would be from that input. Is this wrong?&lt;br /&gt;&lt;br /&gt;Presumably its the right data from USB or I2S, the&amp;nbsp;&lt;span&gt;pointer to received data in&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;le_audio_rx_data_handler()&lt;/strong&gt; seems like its encoded, since its of type &lt;/span&gt;&lt;strong&gt;const uint8_t *const data&amp;nbsp;&lt;/strong&gt;so we should decode it?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing Equalizer into nrf5340 Audio DK application</title><link>https://devzone.nordicsemi.com/thread/419060?ContentTypeID=1</link><pubDate>Tue, 04 Apr 2023 13:32:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f83b5613-5b6d-4bf3-a237-feb62a82e10a</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you going to implement the equalizer directly in the application core firmware?&lt;/p&gt;
&lt;p&gt;The team would suggest to implement this new &amp;quot;step&amp;quot; in the &lt;span&gt;le_audio_rx_data_handler() callback function in streamctrl.c.&amp;nbsp;&lt;/span&gt;It is possible to access BLE send functions from streamctrl.c, in addition to the audio_datapath_stream_out(). You&amp;nbsp;of course have to remember to account for the time delay this new equalizing introduces. Maybe the presentation delay has to be increased.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing Equalizer into nrf5340 Audio DK application</title><link>https://devzone.nordicsemi.com/thread/418910?ContentTypeID=1</link><pubDate>Mon, 03 Apr 2023 21:42:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7a6f826-bfdf-4f15-a7cd-a8061c58312a</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Due to the Easter holidays in Norway, we are less staffed than usual. During this time, you may receive late responses. After next Monday, staff will return to normal. Sorry for the inconvenience and thanks for your patience.&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;--&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I am looking into your case and will reply later.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>