<?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>nrf5340 Stereo Audio output</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94607/nrf5340-stereo-audio-output</link><description>Hello, 
 I am using nrf5340 module with external hardware audio codec to test stereo audio output. 
 I use nrf5340 module as the headset to connect with Pixel 7 mobile phone,and refer to this post ,I modify the code to below: 
 
 When playing audio,the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Dec 2022 01:51:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94607/nrf5340-stereo-audio-output" /><item><title>RE: nrf5340 Stereo Audio output</title><link>https://devzone.nordicsemi.com/thread/399798?ContentTypeID=1</link><pubDate>Fri, 09 Dec 2022 01:51:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3710898c-5d34-4843-8d44-a752168062cb</guid><dc:creator>LandyWang</dc:creator><description>&lt;p&gt;Thank you for your replay.&lt;/p&gt;
&lt;p&gt;We have referred to this example and tried to modify the code.&lt;/p&gt;
&lt;p&gt;The headset can output stereo channels right now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Stereo Audio output</title><link>https://devzone.nordicsemi.com/thread/399730?ContentTypeID=1</link><pubDate>Thu, 08 Dec 2022 14:21:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e9cdb97-4f42-4270-991c-19d6cd357079</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="LandyWang"]HL [00:00:34.537,078] &amp;lt;inf&amp;gt; cis_headset: Frequency: 48000 Hz&lt;br /&gt;HL [00:00:34.537,078] &amp;lt;inf&amp;gt; cis_headset: Frame Duration: 10000 us&lt;br /&gt;HL [00:00:34.537,078] &amp;lt;inf&amp;gt; cis_headset: Channel allocation: 0x1&lt;br /&gt;HL [00:00:34.537,109] &amp;lt;inf&amp;gt; cis_headset: Octets per frame: 120 (96000 kbps)&lt;br /&gt;HL [00:00:34.537,109] &amp;lt;inf&amp;gt; cis_headset: Frames per SDU: 1[/quote]
&lt;p&gt;Seems that it only modified the headset for decoding the received packet in stereo mode. However, the Published Audio Capabilities Service (PACS) is not adjusted for that the headset supports 2 channels. And the default PACS in our project is for TWS topology, which means the headset will only accept one channel audio stream.&amp;nbsp;So mobile phone sends a single-channel encoded frame to the headset, and the headset tries to decode it as stereo audio.&lt;/p&gt;
[quote user="LandyWang"]HL [00:00:34.537,078] &amp;lt;inf&amp;gt; cis_headset: Channel allocation: 0x1[/quote]
&lt;p&gt;Mobile phone only sends left-channel data&lt;/p&gt;
&lt;p&gt;Here is a quick example, (CAUTION: no guarantee and no warranty, just for reference)&lt;/p&gt;
&lt;p&gt;&lt;a title="https://github.com/rick1082/sdk-nrf/commit/70e89352cbc429c29ebe725a7af5ac9a562211d0#diff-42e1fc6ae4cf6357455296de58f9d6343fecd9b4da84da826d9fdf71e5e86eb8" href="https://github.com/rick1082/sdk-nrf/commit/70e89352cbc429c29ebe725a7af5ac9a562211d0#diff-42e1fc6ae4cf6357455296de58f9d6343fecd9b4da84da826d9fdf71e5e86eb8" rel="noopener noreferrer" target="_blank"&gt;https://github.com/rick1082/sdk-nrf/commit/70e89352cbc429c29ebe725a7af5ac9a562211d0#diff-42e1fc6ae4cf6357455296de58f9d6343fecd9b4da84da826d9fdf71e5e86eb8&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;We have to expose that the support channel count is 2&lt;/li&gt;
&lt;li&gt;We have to expose that the support channel allocation is left and right&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;-Amanda H&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Stereo Audio output</title><link>https://devzone.nordicsemi.com/thread/399552?ContentTypeID=1</link><pubDate>Thu, 08 Dec 2022 01:24:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b84e466-e369-4858-ac83-e2b79c879de1</guid><dc:creator>LandyWang</dc:creator><description>&lt;p&gt;Hello Amanda,&lt;/p&gt;
&lt;p&gt;This is the RTT log from the headset.&lt;/p&gt;
&lt;p&gt;HL [00:00:00.253,540] &amp;lt;inf&amp;gt; fw_info: HEADSET left device&lt;br /&gt;HL [00:00:00.277,648] &amp;lt;wrn&amp;gt; bt_hci_core: Controller to host flow control not supported&lt;br /&gt;HL [00:00:00.280,761] &amp;lt;inf&amp;gt; bt_hci_core: No ID address. App must call settings_load()&lt;br /&gt;HL [00:00:00.280,822] &amp;lt;inf&amp;gt; ble: MAC: 00:00:00:00:00:00 (public)&lt;br /&gt;HL [00:00:00.281,372] &amp;lt;inf&amp;gt; ble: Controller version: 3310&lt;br /&gt;HL [00:00:00.377,166] &amp;lt;inf&amp;gt; cis_headset: Advertising successfully started&lt;br /&gt;HL [00:00:16.464,355] &amp;lt;inf&amp;gt; cis_headset: Connected: 75:0D:76:D9:5D:2F (random)&lt;br /&gt;HL [00:00:27.787,231] &amp;lt;inf&amp;gt; ble_audio_services: Volume = 193, mute state = 0&lt;br /&gt;HL [00:00:34.537,048] &amp;lt;inf&amp;gt; cis_headset: Codec config for LC3:&lt;br /&gt;HL [00:00:34.537,078] &amp;lt;inf&amp;gt; cis_headset: Frequency: 48000 Hz&lt;br /&gt;HL [00:00:34.537,078] &amp;lt;inf&amp;gt; cis_headset: Frame Duration: 10000 us&lt;br /&gt;HL [00:00:34.537,078] &amp;lt;inf&amp;gt; cis_headset: Channel allocation: 0x1&lt;br /&gt;HL [00:00:34.537,109] &amp;lt;inf&amp;gt; cis_headset: Octets per frame: 120 (96000 kbps)&lt;br /&gt;HL [00:00:34.537,109] &amp;lt;inf&amp;gt; cis_headset: Frames per SDU: 1&lt;br /&gt;HL [00:00:34.627,380] &amp;lt;inf&amp;gt; cis_headset: Presentation delay 4000 ms is set by initiator&lt;br /&gt;HL [00:00:34.716,979] &amp;lt;wrn&amp;gt; bt_ascs: CCID 2 is unknown&lt;br /&gt;HL [00:00:34.732,238] &amp;lt;wrn&amp;gt; audio_datapath: I2S RX overrun. Single msg&lt;br /&gt;HL [00:00:35.599,182] &amp;lt;inf&amp;gt; audio_datapath: Drft comp state: CALIB&lt;br /&gt;HL [00:00:35.601,135] &amp;lt;wrn&amp;gt; audio_datapath: Data received, total underruns: 876&lt;br /&gt;HL [00:00:35.699,157] &amp;lt;inf&amp;gt; audio_datapath: Drft comp state: OFFSET&lt;br /&gt;HL [00:00:35.732,147] &amp;lt;wrn&amp;gt; audio_datapath: Data received, total underruns: 877&lt;br /&gt;HL [00:00:35.943,084] &amp;lt;inf&amp;gt; audio_datapath: Drft comp state: LOCKED&lt;br /&gt;HL [00:00:35.948,699] &amp;lt;inf&amp;gt; audio_datapath: Pres comp state: MEAS&lt;br /&gt;HL [00:00:36.058,715] &amp;lt;inf&amp;gt; audio_datapath: Pres comp state: WAIT&lt;br /&gt;HL [00:00:36.158,691] &amp;lt;inf&amp;gt; audio_datapath: Pres comp state: INIT&lt;br /&gt;HL [00:00:36.168,701] &amp;lt;inf&amp;gt; audio_datapath: Pres comp state: MEAS&lt;br /&gt;HL [00:00:36.278,686] &amp;lt;inf&amp;gt; audio_datapath: Pres comp state: LOCKED&lt;br /&gt;HL [00:00:37.438,629] &amp;lt;inf&amp;gt; audio_datapath: sdu_ref_us not from consecutive frames&lt;br /&gt;HL [00:00:37.438,629] &amp;lt;inf&amp;gt; audio_datapath: Pres comp state: WAIT&lt;br /&gt;HL [00:00:37.440,948] &amp;lt;wrn&amp;gt; audio_datapath: Data received, total underruns: 887&lt;br /&gt;HL [00:00:37.528,625] &amp;lt;inf&amp;gt; audio_datapath: Pres comp state: INIT&lt;br /&gt;HL [00:00:37.538,604] &amp;lt;inf&amp;gt; audio_datapath: Pres comp state: MEAS&lt;br /&gt;HL [00:00:37.648,620] &amp;lt;inf&amp;gt; audio_datapath: Pres comp state: LOCKED&lt;br /&gt;HL [00:00:39.891,815] &amp;lt;wrn&amp;gt; audio_datapath: Data received, total underruns: 888&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Stereo Audio output</title><link>https://devzone.nordicsemi.com/thread/399473?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 14:29:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7489de8-064e-48cb-86cb-b9afbd705c1a</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is it possible to provide the log from the headset? That would be very helpful for us to investigate the issue.&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>