<?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>Config for Unicast Client (Gateway) and Unicast Server (Headset) with Bidirectional Audio</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116922/config-for-unicast-client-gateway-and-unicast-server-headset-with-bidirectional-audio</link><description>Hi, 
 I&amp;#39;m trying to set up two nRF5340 Audio boards - one as a unicast client (gateway) and the other as a unicast server (headset). I have seperate config files for both that essentially are the clones of the prj.conf file from the samples, but have</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 Dec 2024 23:17:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116922/config-for-unicast-client-gateway-and-unicast-server-headset-with-bidirectional-audio" /><item><title>RE: Config for Unicast Client (Gateway) and Unicast Server (Headset) with Bidirectional Audio</title><link>https://devzone.nordicsemi.com/thread/515833?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2024 23:17:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d4edef1-70ec-4e97-82bd-709fb91c2e09</guid><dc:creator>SNJY</dc:creator><description>&lt;p&gt;Hi lincoln,&lt;/p&gt;
&lt;p&gt;Yes, External mic in this context is a mic that i connect to the Line-in port in the Audio Dk kit. You are correct, that is what i have done. My prj.conf file is set to select the&amp;nbsp;&lt;span&gt;cs47l63_comm_reg_conf_write(line_in_enable, ARRAY_SIZE(line_in_enable)); config upon build&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Config for Unicast Client (Gateway) and Unicast Server (Headset) with Bidirectional Audio</title><link>https://devzone.nordicsemi.com/thread/515649?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2024 07:46:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:623a3b01-6b6b-47e1-b452-05bb79396a3d</guid><dc:creator>lincoln-lu</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/snjy"&gt;SNJY&lt;/a&gt;&amp;nbsp;I think even if you call&amp;nbsp;cs47l63_comm_reg_conf_write(pdm_mic_enable_configure,&lt;br /&gt;ARRAY_SIZE(pdm_mic_enable_configure)); in headset code, it is still using the on-board PDM mic, instead of your external mic.&lt;br /&gt;&lt;br /&gt;You said you are using an&amp;nbsp;Analog external mic, I assue that would be similar to the &amp;#39;Line-In&amp;#39; of the 5340 Audio DK, so you need to call cs47l63_comm_reg_conf_write(line_in_enable, ARRAY_SIZE(line_in_enable)); and also try to feed your&amp;nbsp;Analog&amp;nbsp;mic data to the line-in iterface of the on-board HW codec&amp;nbsp;cs47l63.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Config for Unicast Client (Gateway) and Unicast Server (Headset) with Bidirectional Audio</title><link>https://devzone.nordicsemi.com/thread/514622?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 23:06:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c4e74a6-a18b-4007-9984-1967054d9ac9</guid><dc:creator>SNJY</dc:creator><description>&lt;p&gt;My Mic is an external contact microphone (Analog). I wanted to use an external contact microphone instead of the pdm mic.&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;am not sure but this might be a bug. The hw_codec.c file consists of configuration for the gateway to set the config according to pdm mic or line-in mic, but there was no config for the headset.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="c_cpp"&gt;#if ((CONFIG_AUDIO_DEV == GATEWAY) &amp;amp;&amp;amp; (CONFIG_AUDIO_SOURCE_I2S))
if (IS_ENABLED(CONFIG_WALKIE_TALKIE_DEMO)) {
ret = cs47l63_comm_reg_conf_write(pdm_mic_enable_configure,
ARRAY_SIZE(pdm_mic_enable_configure));
if (ret) {
return ret;
}
} else {
ret = cs47l63_comm_reg_conf_write(line_in_enable, ARRAY_SIZE(line_in_enable));
if (ret) {
return ret;
}
}
#endif /* ((CONFIG_AUDIO_DEV == GATEWAY) &amp;amp;&amp;amp; (CONFIG_AUDIO_SOURCE_I2S)) */

#if ((CONFIG_AUDIO_DEV == HEADSET) &amp;amp;&amp;amp; CONFIG_STREAM_BIDIRECTIONAL)

if (IS_ENABLED(CONFIG_WALKIE_TALKIE_DEMO)){
ret = cs47l63_comm_reg_conf_write(pdm_mic_enable_configure,
ARRAY_SIZE(pdm_mic_enable_configure));
if (ret){
return ret;
}
} else {
ret = cs47l63_comm_reg_conf_write(line_in_enable, ARRAY_SIZE(line_in_enable));
if (ret){
return ret;
}
}
#endif /* ((CONFIG_AUDIO_DEV == HEADSET) &amp;amp;&amp;amp; CONFIG_STREAM_BIDIRECTIONAL) */

/* Toggle FLL to start up CS47L63 */
ret = cs47l63_comm_reg_conf_write(FLL_toggle, ARRAY_SIZE(FLL_toggle));
if (ret) {
return ret;
}

return 0;
}&lt;/pre&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;The above block of code is what i have added instead in function&amp;nbsp;hw_codec_default_conf_enable() in hw_codec.c.&amp;nbsp;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Config for Unicast Client (Gateway) and Unicast Server (Headset) with Bidirectional Audio</title><link>https://devzone.nordicsemi.com/thread/514317?ContentTypeID=1</link><pubDate>Tue, 10 Dec 2024 15:10:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12556471-d82a-434e-b2bc-3d86fd18524c</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Ah, yes, you&amp;#39;re right. I see now that it does only support PDM. Apologies for mixing it up.&lt;/p&gt;
&lt;p&gt;I had a chat with some of our audio experts to understand this better. They summarized it as follows:&lt;/p&gt;
&lt;p&gt;What you need to do is to modify the data flow from PDM-mic -&amp;gt; HW-codec -&amp;gt; nRF5340 (I2S) to match how you&amp;#39;ve set it up with your external microphone.&amp;nbsp;&lt;em&gt;nrf5340_audio\src\modules\audio_i2s.c&amp;nbsp;&lt;/em&gt;could be relevant for this. I&amp;#39;m assuming that your microphone is an I2S microphone, and in this case you don&amp;#39; have to use HW codec from the microphone to the SoC.&lt;/p&gt;
&lt;p&gt;I hope this is enough to get you started&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Config for Unicast Client (Gateway) and Unicast Server (Headset) with Bidirectional Audio</title><link>https://devzone.nordicsemi.com/thread/513314?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2024 00:54:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b685326-54f0-49be-81bc-815f2fd3c091</guid><dc:creator>SNJY</dc:creator><description>&lt;p&gt;Hi Ahaug,&lt;/p&gt;
&lt;p&gt;Thanks for the response. As I have mentioned, my current config consists of the&amp;nbsp;&lt;span&gt;CONFIG_WALKIE_TALKIE_DEMO set to true. But with this param enabled, i cannot&amp;nbsp;integrate an external Mic. It only works with PDM.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have also tried the other approach using&amp;nbsp;&lt;em&gt;CONFIG_STREAM_BIDIRECTIONAL. In this config setting, the external Mic does not work even after declaring it in config, Only PDM works:&amp;nbsp;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_STREAM_BIDIRECTIONAL&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_AUDIO_SOURCE_I2S&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;em&gt;My end goal is to send audio from headset (client) to gateway (server) using the external mic on nrf5340 Audio DK kit.&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Config for Unicast Client (Gateway) and Unicast Server (Headset) with Bidirectional Audio</title><link>https://devzone.nordicsemi.com/thread/513280?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 16:42:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c04bf4ac-cdec-4a93-806d-ba54b3dc13db</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Unicast client with bidirectional audio: &amp;nbsp;You can enable this feature by setting the `CONFIG_STREAM_BIDIRECTIONAL` Kconfig option to `y` in the configuration file &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/doc/configuration.html#selecting-the-cis-bidirectional-communication"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/doc/configuration.html#selecting-the-cis-bidirectional-communication&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Additionally, there&amp;#39;s a walkie-talkie demo that showcases bidirectional audio streaming. This demo can be enabled by setting the `CONFIG_WALKIE_TALKIE_DEMO` Kconfig option to `y` &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/doc/configuration.html#enabling-the-walkie-talkie-demo"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/doc/configuration.html#enabling-the-walkie-talkie-demo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regarding the bidirectional unicast server: Follow the instructions here &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/unicast_server/README.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/unicast_server/README.html&lt;/a&gt;. The unicast server application implements the CIS headset mode. By default, it&amp;#39;s set up for unidirectional communication, but it can be configured for bidirectional audio.&lt;/p&gt;
&lt;p&gt;To enable bidirectional audio for the unicast server, you need to modify the configuration as follows:&lt;/p&gt;
&lt;p&gt;1. Open the `applications/nrf5340_audio/prj.conf` file (for debug version) or `applications/nrf5340_audio/prj_release.conf` file (for release version).&lt;br /&gt;2. Set the `CONFIG_STREAM_BIDIRECTIONAL` Kconfig option to `y`.&lt;/p&gt;
&lt;p&gt;As stated in&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/doc/configuration.html#selecting-the-cis-bidirectional-communication"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/doc/configuration.html#selecting-the-cis-bidirectional-communication&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;em&gt;&amp;quot;To switch to the bidirectional mode, set the CONFIG_STREAM_BIDIRECTIONAL Kconfig option to y in the applications/nrf5340_audio/prj.conf file (for the debug version) or in the applications/nrf5340_audio/prj_release.conf file (for the release version).&amp;quot;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;In the bidirectional configuration, the headset device (unicast server) will send audio from the on-board PDM microphone, allowing for two-way communication between the server and client.&lt;/p&gt;
&lt;p&gt;Remember that to test this setup, you&amp;#39;ll need at least three nRF5340 Audio Development Kits: one for the unicast client (gateway) and two for the unicast servers (headsets).&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>