<?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>How can i receive stereo audio signal on the nrf5340 audio DK configured for headset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105655/how-can-i-receive-stereo-audio-signal-on-the-nrf5340-audio-dk-configured-for-headset</link><description>Although I know that the nrf5340 audio dk only has a mono codec(CS47l63), I still want to try whether the headset can receive and process stereo signals in the same time, as I must evaluate this feature in our project. Both in BIS mode and CIS mode. </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Dec 2023 02:14:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105655/how-can-i-receive-stereo-audio-signal-on-the-nrf5340-audio-dk-configured-for-headset" /><item><title>RE: How can i receive stereo audio signal on the nrf5340 audio DK configured for headset</title><link>https://devzone.nordicsemi.com/thread/458852?ContentTypeID=1</link><pubDate>Tue, 05 Dec 2023 02:14:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7edfbc17-3f34-42e9-93cb-ec6243147c43</guid><dc:creator>huma</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello, Karl.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for your reply.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now&amp;nbsp;I am currently facing some difficulties that I cannot solve, and I hope you can help me.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My requirement is to enable stereo signals to be input from one headset (possibly mic or I2S), transmitted to the gateway, and then relay them to another headset through the gateway.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If my gateway only connects to one headset(just like the example), it can transmit stereo signals. I think the problem is that when I try to connect to the second headset, the code will automatically allocate relevant resources, and the required resources will be doubled. So i had to&amp;nbsp;reduce the sampling rate to 24K to reduce the sdu size.&amp;nbsp;But that&amp;#39;s not what I wanted. You can check my code from&amp;nbsp;&lt;a href="https://github.com/huma911/sdk-nrf5340-audio-cis/tree/cis_stereo_headset_v240"&gt;github.com/.../cis_stereo_headset_v240&lt;/a&gt; , the cis_stereo_headset_v240 branch. I just made some change to make the gateway can connect two headset and transmit the stereo signal to the two headset(sampling rate is 24K).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But according to my needs, the second headset does not need to receive audio signals from the gateway, but instead transmits the audio signals it receives to the gateway and gateway can relay them to the first headset. Therefore, I am trying to find and modify this part of the code to see if it can save resources and use a 48K sampling rate.If you have any suggestions, please also provide them. Thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and should i post a new ticket so that you can quickly see the problem? how can i invite you to reply my question？and there is another ticket i had posted, If it&amp;#39;s convenient, you can answer me below that post.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/105890/when-i-receive-stereo-audio-signal-on-the-nrf5340-audio-dk-it-has-many-limitations"&gt;when i receive stereo audio signal on the nrf5340 audio DK, it has many limitations - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i receive stereo audio signal on the nrf5340 audio DK configured for headset</title><link>https://devzone.nordicsemi.com/thread/456909?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2023 12:23:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33199b38-ec29-416e-b17f-69bf523f2d85</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Sorry for the terribly late reply - the ticket had got the &amp;#39;verified answer&amp;#39; status internally, so I was not notified about your comment unfortunately.&lt;/p&gt;
[quote user="huma"]Thank you very much for your help. I have tried the CIS version of the code and it works very well. I have learned a lot of skills from this example.[/quote]
&lt;p&gt;No problem at all, I am happy to help and glad to read that the example was useful! :)&amp;nbsp;&lt;/p&gt;
[quote user="huma"]What makes me curious is that this codec only supports single channel but seems to be able to receive stereo i2s data, and can output the signal to the headphones when I test left or right inputs separately. I will check the data manual of CS47L63 to verify it.[/quote]
&lt;p&gt;Part of the confusion here could be with the fact that there are two things referred to as &amp;#39;the codec&amp;#39; in the application - the hardware codec (CS47L63) and the software codec (LC3).&lt;br /&gt;You are also correct that both of these are mono codecs - they can only process one channel at the time - and while the LC3 codec is still able to process stereo data (by processing the mono in sequence), but CS47L63 can only input and output mono.&lt;br /&gt;For this reason you are not able to input stereo data through the LINE_IN input, but you can do so through the USB option.&lt;br /&gt;If you need to input stereo data as I2S you will need to use an external stereo hardware codec, in which case you can include it in your project using the following steps:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/4760.externalCodec.PNG" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="huma"]Next, I will test the BIS code, but I think it may take some time as you mentioned. But I can&amp;#39;t wait to confirm your reply as the answer, so if I encounter any problems while debugging BIS code in the future, I will continue to ask you questions under this ticket. I hope you can continue to help me if you have time. Thank you.[/quote]
&lt;p&gt;Regarding stereo BIS&amp;#39;s - I was in the beginning of the week made aware that there is an issue with the BIS headsets when receiving stereo through BIS, so I am not sure if this will work right off the bat unfortunately.&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if any parts of this should be unclear! :)&amp;nbsp;&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: How can i receive stereo audio signal on the nrf5340 audio DK configured for headset</title><link>https://devzone.nordicsemi.com/thread/455691?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 06:01:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10d8c288-3c0e-45a3-b763-c088c9ca7713</guid><dc:creator>huma</dc:creator><description>&lt;p&gt;Hello, Karl.&lt;/p&gt;
&lt;p&gt;Thank you very much for your help. I have tried the CIS version of the code and it works very well. I have learned a lot of skills from this example.&lt;/p&gt;
&lt;p&gt;I also implemented the function by myself in CIS mode. I found that the gateway sends the whole signal containing the left and right channels to the headset, while in the default configuration, only the first half of the data (left) or the second half of the data (right) is sent to the corresponding headset. After receiving the signal stream, the headset processes the data in stereo mode(sw_codec_cfg.decoder.num_ch = SW_CODEC_STEREO;), decodes the left and right channels signals separately, and then combines the mono PCM data into a stereo PCM data and output to the codec, What makes me curious is that this codec only supports single channel but seems to be able to receive stereo i2s data, and can output the signal to the headphones when I test left or right inputs separately. I will check the data manual of CS47L63 to verify it.&lt;/p&gt;
&lt;p&gt;I am not sure if my understanding above is correct. If there are any errors, please point them out. Thank you.&lt;/p&gt;
&lt;p&gt;Next, I will test the BIS code, but I think it may take some time as you mentioned. But I can&amp;#39;t wait to confirm your reply as the answer, so if I encounter any problems while debugging BIS code in the future, I will continue to ask you questions under this ticket. I hope you can continue to help me if you have time. Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i receive stereo audio signal on the nrf5340 audio DK configured for headset</title><link>https://devzone.nordicsemi.com/thread/455479?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2023 09:48:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a37d7cc4-6295-4ced-b9d3-2298c0575c5b</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;&lt;a href="https://github.com/rick1082/sdk-nrf/commit/705b532c9e16dcc59f68918d4d8eb69c6228749c"&gt;For a CIS stereo headset, please take a look at this brief sample that illustrates the necessary changes to achieve this&lt;/a&gt;.&lt;br /&gt;There is also &lt;a href="https://github.com/rick1082/sdk-nrf/commit/fe73ed708a20cf1e8a16e44292a7323162216c42"&gt;another such sample you could take a look at for the BIS stereo headset&lt;/a&gt;, though this is last tested on a much older NCS version and so it might require more work to get up and running with the newest NCS release.&lt;br /&gt;&lt;br /&gt;Please keep in mind that these samples are just quick tests thrown together by one of our engineers, so it is not samples that we officially support or will keep up to date - but they can serve as a useful reference to see how specific configurations and changes can be made, at least :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if any parts of this should be unclear, or if you should have any follow-up questions!&amp;nbsp;&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: How can i recive stereo audio signal on the nrf5340 audio DK configured for headset</title><link>https://devzone.nordicsemi.com/thread/455437?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2023 02:24:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e47b110f-85d4-4d21-bb43-d6b9ff1a131d</guid><dc:creator>huma</dc:creator><description>&lt;p&gt;Forgot to say, I used the 2.4.2 SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>