Cis mode - Mic issues

Hi,

With this setup in Issue with Stereo Sound from External Codec on nRF5340 DK (SDK v2.6.2) , I successfully built a CIS mode using my nRF5340 DKs, enabling stereo sound while the microphone is active.

However, I am currently experiencing several issues:

  • The recorded microphone signal is accelerated, playing back faster than it was recorded.
  • The input signal quality is poor when using an analog microphone, but it improves significantly with a digital microphone.
  • When using the microphone and playing audio through the headset simultaneously, the recorded sound is barely audible (very low signal strength).
  • Occasionally, one of the DKs disconnects, causing a complete loss of audio.

Any insights into what might be causing these issues? and how might they be solved?

Thank you in advance—I truly appreciate your time and support.

Best regards,
Abdulmohaimen Algamoudi 

Parents
  • Hi,

    On which specific board do you experience issues?

    Do you still use NCS v2.6.2?

    Best regards,
    Dejan

  • Hey Dejan,
    The nrf5340 audio DK as well as the BC40C from Fanstel.
    The sdk is V2.8.0

    Thank you in advance

    Best regards,
    Abdulmohaimen Algamoudi 

  • Hi Abdulmohaimen,

    Abdulmohaimen said:
    However, the issue with the accelerated microphone signal persists even when using a single headset board connected to the gateway, running the initial code from the nRF SDK (without no modification with on board codec and using the jack onboard nrf5340 by pluginng headphone with mic to it).

    Is scenario the same as shown in the picture previously, just with one headset instead of two? Which code changes (specified in your second ticket) are now relevant to gateway and headset? Please provide details about the setup and code changes in this case. If you want to keep your code changes private, you can specify changes in your second ticket. If you do so, please let me know here.

    Best regards,
    Dejan 

  • Hi Dejan,

    Is scenario the same as shown in the picture previously, just with one headset instead of two? Which code changes (specified in your second ticket) are now relevant to gateway and headset?


    Yes, it's the same, with the same changes applied. However, as I mentioned earlier, the issue with the accelerated mic signal also occurs with the default configuration of the nRF5340 Audio DK and its original SDK code. Both scenarios are shown in the figure below.

    Best regards,
    Abdulmohaimen

  • Hi Abdulmohaimen,

    The issue might be related to CPU. Bidirectional communication with USB can stress CPU too much on a gateway side so that it cannot handle MIC return properly. This can lead to some packets being dropped which causes audio stream to become distorted. Potential solution could be switching to 16 KHz as default for bidirectional communication. You could try to test (make a trial) using the following latest branch
    https://github.com/rick1082/sdk-nrf/commits/cis_stereo_audio_sink_pre280/
    Please not that this is a demo branch and therefore there is no warranty or support guarantee. The code in this demo branch is provided as-is. You should do your own testing to check and verify desired functionality.

    Best regards,
    Dejan

  • Hi Dejan,

    I’ve tested the demo in both scenarios, and I believe it demonstrates improved performance (especially with the initial configuration scenario, where i think that i have problem with the codec configration or maybe because of the I2S, almost because of the i2S because i tried that with Pixel Google phone and was all fine). Since I’m currently out of the office, I’ll test it again using a different headset with a digital microphone once I’m back. I plan to be there at the beginning of next week and will update you as soon as possible.

    In the meantime, I still have three remaining technical questions regarding this project:

    1. Audio Output Issues in CIS Mode

    Sometimes when using CIS mode, even though the headset and gateway appear to be connected and synchronized, I can't hear any audio output. I’ve noticed that pressing the reset button on both devices—sometimes once, sometimes multiple times—resolves the issue. Do you have any insight into what might be causing this behavior? Is there a known fix or workaround?

    2. Dual Microphone Setup on NRF5340 Audio DK

    Is it possible to use two different microphones with a single NRF5340 Audio DK headset? For my case, I need one microphone for the left channel and another for the right. As far as I know, my hardware codec supports this setup—can you confirm whether this configuration is supported?


    [EXTRA ]3. MCLK Frequency and Synchronization Issues

    What is the exact MCLK frequency that the chip provides over I²S? I tested this with two different operating systems and observed two different values. Additionally, I attempted to bypass the default MCLK and provide an external 12.288 MHz MCLK (as suggested in other DevZone tickets). However, this led to synchronization issues—one board's LED remained off and no audio was output. Could you clarify the expected MCLK configuration and whether external clocking is supported and stable?

    Once again, I want to sincerely thank you for your time, effort, and support. We’re getting very close to resolving all potential issues, and I truly appreciate your continued support.

    Best regards,
    Abdulmohaimen

  • Hi Abdulmohaimen,

    Abdulmohaimen said:

    1. Audio Output Issues in CIS Mode

    Sometimes when using CIS mode, even though the headset and gateway appear to be connected and synchronized, I can't hear any audio output. I’ve noticed that pressing the reset button on both devices—sometimes once, sometimes multiple times—resolves the issue. Do you have any insight into what might be causing this behavior? Is there a known fix or workaround?

    We are not able to see this situation on our end. Can this issue be replicated using nrf5340_audio-dk? Could you please share the log and point out the timing when the issue appears?

    Abdulmohaimen said:

    2. Dual Microphone Setup on NRF5340 Audio DK

    Is it possible to use two different microphones with a single NRF5340 Audio DK headset? For my case, I need one microphone for the left channel and another for the right. As far as I know, my hardware codec supports this setup—can you confirm whether this configuration is supported?

    In our demo branch, we only send single MIC stream and decode one MIC stream on the gateway side. Current audio project does not support what you try to achieve, but you can try to further study application and modify it yourself.

    Abdulmohaimen said:

    [EXTRA ]3. MCLK Frequency and Synchronization Issues

    What is the exact MCLK frequency that the chip provides over I²S? I tested this with two different operating systems and observed two different values. Additionally, I attempted to bypass the default MCLK and provide an external 12.288 MHz MCLK (as suggested in other DevZone tickets). However, this led to synchronization issues—one board's LED remained off and no audio was output. Could you clarify the expected MCLK configuration and whether external clocking is supported and stable?

    Did you configure nRF5340 as I2S slave? Do you want to ignore MCLK from nRF5340 and use another clock source? 
    Since it is nrf5340 that needs to tune I2S clock speed to sync with BLE activity, it is important to use nrf5340 as I2S master and let nrf5340 handle the clock system.

    Best regards,
    Dejan

Reply
  • Hi Abdulmohaimen,

    Abdulmohaimen said:

    1. Audio Output Issues in CIS Mode

    Sometimes when using CIS mode, even though the headset and gateway appear to be connected and synchronized, I can't hear any audio output. I’ve noticed that pressing the reset button on both devices—sometimes once, sometimes multiple times—resolves the issue. Do you have any insight into what might be causing this behavior? Is there a known fix or workaround?

    We are not able to see this situation on our end. Can this issue be replicated using nrf5340_audio-dk? Could you please share the log and point out the timing when the issue appears?

    Abdulmohaimen said:

    2. Dual Microphone Setup on NRF5340 Audio DK

    Is it possible to use two different microphones with a single NRF5340 Audio DK headset? For my case, I need one microphone for the left channel and another for the right. As far as I know, my hardware codec supports this setup—can you confirm whether this configuration is supported?

    In our demo branch, we only send single MIC stream and decode one MIC stream on the gateway side. Current audio project does not support what you try to achieve, but you can try to further study application and modify it yourself.

    Abdulmohaimen said:

    [EXTRA ]3. MCLK Frequency and Synchronization Issues

    What is the exact MCLK frequency that the chip provides over I²S? I tested this with two different operating systems and observed two different values. Additionally, I attempted to bypass the default MCLK and provide an external 12.288 MHz MCLK (as suggested in other DevZone tickets). However, this led to synchronization issues—one board's LED remained off and no audio was output. Could you clarify the expected MCLK configuration and whether external clocking is supported and stable?

    Did you configure nRF5340 as I2S slave? Do you want to ignore MCLK from nRF5340 and use another clock source? 
    Since it is nrf5340 that needs to tune I2S clock speed to sync with BLE activity, it is important to use nrf5340 as I2S master and let nrf5340 handle the clock system.

    Best regards,
    Dejan

Children
  • Hi Dejan,
    Since the latest edit you provided works better with the initial conditiond of nrf5340audio dk, and before continuing with the other potentials. I'd first like to confirm everything with my MCLK before proceeding further.

    Did you configure nRF5340 as I2S slave? Do you want to ignore MCLK from nRF5340 and use another clock source? 
    Since it is nrf5340 that needs to tune I2S clock speed to sync with BLE activity, it is important to use nrf5340 as I2S master and let nrf5340 handle the clock system.

    I'm using the nRF5340 in master mode, where it provides the MCLK to my external hardware codec. I tried measuring the MCLK using two different oscilloscopes, but I got two different values: 3.471 MHz and 6.14386 MHz. And for both:

    • BCLK: 1.536 MHz
    • WCLK: 48,000 Hz

    What are the actual frequencies of the Master Clock (MCLK), Bit Clock (BCLK), and Word Clock (WCLK) generated by the nRF5340 Audio DK via the I²S interface?



    I also tried enabling the Bypass mode in audio_i2s.c to generate a 12.288 MHz MCLK.

    static nrfx_i2s_config_t cfg = {
    	/* Pins are configured by pinctrl. */
    	.skip_gpio_cfg = true,
    	.skip_psel_cfg = true,
    	.irq_priority = DT_IRQ(I2S_NL, priority),
    	.mode = NRF_I2S_MODE_MASTER,
    	.format = NRF_I2S_FORMAT_I2S,
    	.alignment = NRF_I2S_ALIGN_LEFT,
    	.ratio = CONFIG_AUDIO_RATIO,
    	.mck_setup = 0x66666000,
    #if (CONFIG_AUDIO_BIT_DEPTH_16)
    	.sample_width = NRF_I2S_SWIDTH_16BIT,
    #elif (CONFIG_AUDIO_BIT_DEPTH_32)
    	.sample_width = NRF_I2S_SWIDTH_32BIT,
    #else
    #error Invalid bit depth selected
    #endif /* (CONFIG_AUDIO_BIT_DEPTH_16) */
    	.channels = NRF_I2S_CHANNELS_STEREO,
    	.clksrc = NRF_I2S_CLKSRC_ACLK,
    	.enable_bypass = true,
    };
     

    However, after doing this, the boards no longer synchronize—the synchronization LED remains off, and no audio can be heard. i find in the log files the following:


    Headset:

    HL [00:11:00.798,736] <wrn> audio_datapath: Data received, total under-runs: 657816
    --- 13 messages dropped ---
    HL [00:11:00.851,440] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 13 messages dropped ---
    HL [00:11:00.917,785] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:00.968,292] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:01.018,768] <wrn> audio_datapath: Data received, total under-runs: 658036
    --- 13 messages dropped ---
    HL [00:11:01.069,274] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:01.119,781] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:01.170,288] <inf> audio_datapath: Drft comp state: INIT
    --- 10 messages dropped ---
    HL [00:11:01.220,794] <inf> audio_datapath: Drft comp state: INIT
    --- 10 messages dropped ---
    HL [00:11:01.271,270] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:01.318,756] <wrn> audio_datapath: Data received, total under-runs: 658336
    --- 12 messages dropped ---
    HL [00:11:01.371,520] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:01.438,781] <wrn> audio_datapath: Data received, total under-runs: 658456
    --- 12 messages dropped ---
    HL [00:11:01.491,546] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 16 messages dropped ---
    HL [00:11:01.558,776] <wrn> audio_datapath: Data received, total under-runs: 658576
    --- 12 messages dropped ---
    HL [00:11:01.611,450] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:01.671,447] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 12 messages dropped ---
    HL [00:11:01.738,769] <wrn> audio_datapath: Data received, total under-runs: 658756
    --- 13 messages dropped ---
    HL [00:11:01.798,767] <wrn> audio_datapath: Data received, total under-runs: 658816
    --- 13 messages dropped ---
    HL [00:11:01.851,470] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 15 messages dropped ---
    HL [00:11:01.918,792] <wrn> audio_datapath: Data received, total under-runs: 658936
    --- 13 messages dropped ---
    HL [00:11:01.971,466] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 13 messages dropped ---
    HL [00:11:02.029,327] <inf> audio_datapath: Drft comp state: CALIB
    --- 11 messages dropped ---
    HL [00:11:02.079,803] <inf> audio_datapath: Drft comp state: CALIB
    --- 11 messages dropped ---
    HL [00:11:02.130,310] <inf> audio_datapath: Drft comp state: CALIB
    --- 12 messages dropped ---
    HL [00:11:02.180,816] <inf> audio_datapath: Drft comp state: CALIB
    --- 11 messages dropped ---
    HL [00:11:02.231,628] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:02.298,797] <wrn> audio_datapath: Data received, total under-runs: 659316
    --- 15 messages dropped ---
    HL [00:11:02.361,572] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:02.428,802] <wrn> audio_datapath: Data received, total under-runs: 659446
    --- 13 messages dropped ---
    HL [00:11:02.481,475] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:02.551,483] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 13 messages dropped ---
    HL [00:11:02.618,804] <wrn> audio_datapath: Data received, total under-runs: 659636
    --- 15 messages dropped ---
    HL [00:11:02.671,569] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 13 messages dropped ---
    HL [00:11:02.735,839] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:02.781,585] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:02.838,806] <wrn> audio_datapath: Data received, total under-runs: 659856
    --- 12 messages dropped ---
    HL [00:11:02.908,813] <wrn> audio_datapath: Data received, total under-runs: 659926
    --- 12 messages dropped ---
    HL [00:11:02.961,517] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 17 messages dropped ---
    HL [00:11:03.018,829] <wrn> audio_datapath: Data received, total under-runs: 660036
    --- 12 messages dropped ---
    HL [00:11:03.078,826] <wrn> audio_datapath: Data received, total under-runs: 660096
    --- 12 messages dropped ---
    HL [00:11:03.138,824] <wrn> audio_datapath: Data received, total under-runs: 660156
    --- 13 messages dropped ---
    HL [00:11:03.188,842] <wrn> audio_datapath: Data received, total under-runs: 660206
    --- 13 messages dropped ---
    HL [00:11:03.241,363] <inf> audio_datapath: Drft comp state: CALIB
    --- 9 messages dropped ---
    HL [00:11:03.291,534] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:03.358,825] <wrn> audio_datapath: Data received, total under-runs: 660376
    --- 15 messages dropped ---
    HL [00:11:03.418,334] <wrn> audio_datapath: Data received, total under-runs: 660435
    --- 12 messages dropped ---
    HL [00:11:03.471,527] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 13 messages dropped ---
    HL [00:11:03.538,330] <wrn> audio_datapath: Data received, total under-runs: 660555
    --- 13 messages dropped ---
    HL [00:11:03.591,522] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 13 messages dropped ---
    HL [00:11:03.658,355] <wrn> audio_datapath: Data received, total under-runs: 660675
    --- 13 messages dropped ---
    HL [00:11:03.711,547] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 15 messages dropped ---
    HL [00:11:03.778,839] <wrn> audio_datapath: Data received, total under-runs: 660796
    --- 13 messages dropped ---
    HL [00:11:03.831,604] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:03.897,399] <inf> audio_datapath: Drft comp state: INIT
    --- 10 messages dropped ---
    HL [00:11:03.947,875] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:03.991,577] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 13 messages dropped ---
    HL [00:11:04.049,377] <inf> audio_datapath: Drft comp state: CALIB
    --- 12 messages dropped ---
    HL [00:11:04.099,884] <inf> audio_datapath: Drft comp state: CALIB
    --- 11 messages dropped ---
    HL [00:11:04.150,390] <inf> audio_datapath: Drft comp state: CALIB
    --- 11 messages dropped ---
    HL [00:11:04.200,897] <inf> audio_datapath: Drft comp state: CALIB
    --- 10 messages dropped ---
    HL [00:11:04.251,373] <inf> audio_datapath: Drft comp state: CALIB
    --- 10 messages dropped ---
    HL [00:11:04.301,391] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:04.351,684] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:04.402,893] <inf> audio_datapath: Drft comp state: CALIB
    --- 11 messages dropped ---
    HL [00:11:04.453,399] <inf> audio_datapath: Drft comp state: CALIB
    --- 10 messages dropped ---
    HL [00:11:04.503,906] <inf> audio_datapath: Drft comp state: CALIB
    --- 12 messages dropped ---
    HL [00:11:04.553,924] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:04.604,431] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:04.654,907] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:04.705,413] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:04.755,920] <inf> audio_datapath: Drft comp state: INIT
    --- 10 messages dropped ---
    HL [00:11:04.801,605] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 13 messages dropped ---
    HL [00:11:04.858,886] <wrn> audio_datapath: Data received, total under-runs: 661876
    --- 13 messages dropped ---
    HL [00:11:04.928,375] <wrn> audio_datapath: Data received, total under-runs: 661945
    --- 12 messages dropped ---
    HL [00:11:04.988,403] <wrn> audio_datapath: Data received, total under-runs: 662005
    --- 14 messages dropped ---
    HL [00:11:05.041,625] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:05.101,623] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:05.160,430] <inf> audio_datapath: Drft comp state: CALIB
    --- 11 messages dropped ---
    HL [00:11:05.210,418] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:05.260,925] <inf> audio_datapath: Drft comp state: INIT
    --- 10 messages dropped ---
    HL [00:11:05.311,431] <inf> audio_datapath: Drft comp state: INIT
    --- 11 messages dropped ---
    HL [00:11:05.361,694] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 13 messages dropped ---
    HL [00:11:05.421,691] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:05.488,403] <wrn> audio_datapath: Data received, total under-runs: 662505
    --- 15 messages dropped ---
    HL [00:11:05.541,625] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:05.608,428] <wrn> audio_datapath: Data received, total under-runs: 662625
    --- 12 messages dropped ---
    HL [00:11:05.664,947] <inf> audio_datapath: Drft comp state: INIT
    --- 10 messages dropped ---
    HL [00:11:05.711,700] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:05.778,411] <wrn> audio_datapath: Data received, total under-runs: 662795
    --- 12 messages dropped ---
    HL [00:11:05.831,726] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 16 messages dropped ---
    HL [00:11:05.898,437] <wrn> audio_datapath: Data received, total under-runs: 662915
    --- 12 messages dropped ---
    HL [00:11:05.951,721] <wrn> bt_le_audio_tx: HCI ISO TX overrun on stream 0x20010ebc - Single print
    --- 14 messages dropped ---
    HL [00:11:06.018,432] <wrn> audio_datapath: Data received, total under-runs: 663035
    --- 12 messages dropped ---
    HL [00:11:06.069,458] <inf> audio_datapath: Drft comp state: CALIB
    --- 11 messages dropped ---
    HL [00:11:06.119,964] <inf> audio_datapath: Drft comp state: CALIB
    --- 12 messages dropped ---
    HL [00:11:06.170,440] <inf> audio_datapath: Drft comp state: CALIB
    --- 11 messages dropped ---
    HL [00:11:06.220,458] <inf> audio_datapath: Drft comp state: INIT



    gateway:

    *** Using Zephyr OS v3.7.99-0bc3393fb112 ***
    GW [00:00:00.383,789] <inf> board_version: Compatible board/HW version found: 1.0.0
    GW [00:00:00.416,229] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.8.0                            
             Cmake run : Sat Apr 12 17:32:22 2025
    GW [00:00:00.416,229] <inf> fw_info: ------- DEBUG BUILD -------
    GW [00:00:00.416,229] <inf> fw_info: Compiled for GATEWAY device
    GW [00:00:00.487,091] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 6.0 (0x0e), Revision 8270
    GW [00:00:00.487,335] <inf> bt_mgmt: Local identity addr: D3:C8:9D:D1:BE:66 (random)
    GW [00:00:00.487,457] <inf> audio_usb: Ready for USB host to send/receive.
    GW [00:00:00.490,814] <inf> bt_mgmt_scan: Local addr: 52:23:FB:F5:FA:C2 (random). May time out. Updates not printed
    GW [00:00:00.490,814] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:00.928,436] <inf> bt_mgmt_scan: Creating connection to device: 4E:F1:C7:BD:7C:33 (random)
    GW [00:00:01.138,488] <inf> bt_mgmt: Connected: 4E:F1:C7:BD:7C:33 (random)
    GW [00:00:01.138,519] <inf> main: Connection event. Num connections: 1
    GW [00:00:01.381,072] <inf> main: Security changed
    GW [00:00:01.571,136] <inf> bt_vol_ctlr: VCS discover finished
    GW [00:00:01.941,284] <inf> main: Set members found: 1 of 2
    GW [00:00:01.942,474] <inf> bt_mgmt_scan: Local addr: 52:23:FB:F5:FA:C2 (random). May time out. Updates not printed
    GW [00:00:01.942,474] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:02.241,027] <inf> unicast_client: Discovered 1 sink endpoint(s) for device 0
    GW [00:00:02.642,120] <inf> unicast_client: Discovered 1 source endpoint(s) for device 0
    GW [00:00:02.662,139] <inf> unicast_client: LEFT sink stream configured
    GW [00:00:02.662,170] <inf> le_audio: LC3 codec config for sink:
    GW [00:00:02.662,170] <inf> le_audio:   Frequency: 24000 Hz
    GW [00:00:02.662,170] <inf> le_audio:   Duration: 10000 us
    GW [00:00:02.662,170] <inf> le_audio:   Channel allocation: 0x1
    GW [00:00:02.662,170] <inf> le_audio:   Octets per frame: 40 (32000 bps)
    GW [00:00:02.662,170] <inf> le_audio:   Frames per SDU: 1
    GW [00:00:02.701,110] <inf> unicast_client: LEFT source stream configured
    GW [00:00:02.701,141] <inf> le_audio: LC3 codec config for source:
    GW [00:00:02.701,171] <inf> le_audio:   Frequency: 16000 Hz
    GW [00:00:02.701,171] <inf> le_audio:   Duration: 10000 us
    GW [00:00:02.701,171] <inf> le_audio:   Channel allocation: 0x1
    GW [00:00:02.701,171] <inf> le_audio:   Octets per frame: 40 (32000 bps)
    GW [00:00:02.701,171] <inf> le_audio:   Frames per SDU: 1
    GW [00:00:03.461,059] <inf> unicast_client: Stream 0x200121c4 started
    GW [00:00:03.468,017] <inf> audio_usb: USB RX first data received.
    GW [00:00:03.641,418] <inf> unicast_client: Stream 0x200122c4 started
    GW [00:02:28.181,335] <inf> bt_mgmt: Disconnected: F5:FD:57:29:5F:67 (random), reason 0x08 
    GW [00:02:28.181,365] <inf> main: Disconnection event. Num connections: 0
    GW [00:02:28.185,211] <inf> bt_mgmt_scan: Local addr: 52:23:FB:F5:FA:C2 (random). May time out. Updates not printed
    GW [00:02:28.185,211] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:02:28.185,211] <inf> unicast_client: Stream 0x200121c4 stopped. Reason 8
    GW [00:02:28.185,241] <inf> unicast_client: Stream 0x200122c4 stopped. Reason 8
    GW [00:02:28.189,208] <wrn> unicast_client: No active streams
    GW [00:02:28.189,208] <wrn> main: Sending operation cancelled
    *** Booting nRF Connect SDK v2.8.0-a2386bfc8401 ***
    *** Using Zephyr OS v3.7.99-0bc3393fb112 ***
    GW [00:00:00.385,955] <inf> board_version: Compatible board/HW version found: 1.0.0
    GW [00:00:00.418,334] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.8.0                            
             Cmake run : Sun Apr 13 23:16:11 2025
    GW [00:00:00.418,334] <inf> fw_info: ------- DEBUG BUILD -------
    GW [00:00:00.418,334] <inf> fw_info: Compiled for GATEWAY device
    GW [00:00:00.489,166] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 6.0 (0x0e), Revision 8270
    GW [00:00:00.489,379] <inf> bt_mgmt: Local identity addr: D3:C8:9D:D1:BE:66 (random)
    GW [00:00:00.489,501] <inf> audio_usb: Ready for USB host to send/receive.
    GW [00:00:00.492,736] <inf> bt_mgmt_scan: Local addr: 77:B5:09:96:97:D9 (random). May time out. Updates not printed
    GW [00:00:00.492,767] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:00.921,936] <inf> bt_mgmt_scan: Creating connection to device: 40:DC:AC:77:E4:D3 (random)
    GW [00:00:01.030,395] <inf> bt_mgmt: Connected: 40:DC:AC:77:E4:D3 (random)
    GW [00:00:01.030,426] <inf> main: Connection event. Num connections: 1
    GW [00:00:01.272,857] <inf> main: Security changed
    GW [00:00:01.462,951] <inf> bt_vol_ctlr: VCS discover finished
    GW [00:00:01.843,017] <inf> main: Set members found: 1 of 2
    GW [00:00:01.844,268] <inf> bt_mgmt_scan: Local addr: 77:B5:09:96:97:D9 (random). May time out. Updates not printed
    GW [00:00:01.844,299] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:02.142,822] <inf> unicast_client: Discovered 1 sink endpoint(s) for device 0
    GW [00:00:02.543,975] <inf> unicast_client: Discovered 1 source endpoint(s) for device 0
    GW [00:00:02.563,964] <inf> unicast_client: LEFT sink stream configured
    GW [00:00:02.563,995] <inf> le_audio: LC3 codec config for sink:
    GW [00:00:02.563,995] <inf> le_audio:   Frequency: 24000 Hz
    GW [00:00:02.563,995] <inf> le_audio:   Duration: 10000 us
    GW [00:00:02.564,025] <inf> le_audio:   Channel allocation: 0x1
    GW [00:00:02.564,025] <inf> le_audio:   Octets per frame: 40 (32000 bps)
    GW [00:00:02.564,025] <inf> le_audio:   Frames per SDU: 1
    GW [00:00:02.602,935] <inf> unicast_client: LEFT source stream configured
    GW [00:00:02.602,966] <inf> le_audio: LC3 codec config for source:
    GW [00:00:02.602,966] <inf> le_audio:   Frequency: 16000 Hz
    GW [00:00:02.602,966] <inf> le_audio:   Duration: 10000 us
    GW [00:00:02.602,996] <inf> le_audio:   Channel allocation: 0x1
    GW [00:00:02.602,996] <inf> le_audio:   Octets per frame: 40 (32000 bps)
    GW [00:00:02.602,996] <inf> le_audio:   Frames per SDU: 1
    GW [00:00:03.362,792] <inf> unicast_client: Stream 0x200121ec started
    GW [00:00:03.369,689] <inf> audio_usb: USB RX first data received.
    GW [00:00:03.543,304] <inf> unicast_client: Stream 0x200122ec started


    how is it possible to solve this?

    Thanks in advance!
    Best regards,
    Abdulmohaimen

  • Hey Dejan, 

    is there ny news? Looking foewaed for your support.

    Thanks in advance!
    Best regards,
    Abdulmohaimen

  • Hi Abdulmohaimen,

    You could try to check settings on the codec side.

    I expect to get back to you with additional information by the end of next week.

    Best regards,
    Dejan

  • Hi Abdulmohaimen,

    MCLK value should be close to 6.144 MHz. With currently used ratio of 128 and ratio * LRCK = MCLK (see LRCK in the documentation), MCLK is expected to be 6.144 MHz. You could try to check on the oscilloscope using higher sampling rate (more than twice of 6.144 MHz).

    As for bypass mode, it is expected for MCLK to be 12.288 MHz. It might be that your codec is not configured properly. You can check your codec settings.

    Best regards,
    Dejan

  • Hi Dejan,

    Thank you very much for all the support you provided in this ticket. I’ve decided to continue using I²S as the source for my signal, where the USB configuration still shows the accelerated mic signal.

    I do have one remaining question:
    Is it possible to reduce the frequency of the source in the uncast_client.c file,

    #define BT_BAP_LC3_UNICAST_PRESET_STEREO_16_2_1(_loc, _stream_context)                                    \
     	BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
     						    BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1,  \
     						    _stream_context),                              \
     			  BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 80u, 2u, 10u, 40000u))
     
    
    static struct bt_bap_lc3_preset lc3_preset_sink = BT_BAP_LC3_UNICAST_PRESET_NRF5340_AUDIO_SINK;
    static struct bt_bap_lc3_preset lc3_preset_sink_48_4_1 = BT_BAP_LC3_UNICAST_PRESET_48_4_1(
    	BT_AUDIO_LOCATION_ANY, (BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED));
    static struct bt_bap_lc3_preset lc3_preset_sink_24_2_1 = BT_BAP_LC3_UNICAST_PRESET_24_2_1(
    	BT_AUDIO_LOCATION_ANY, (BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED));
    static struct bt_bap_lc3_preset lc3_preset_sink_16_2_1 = BT_BAP_LC3_UNICAST_PRESET_STEREO_16_2_1(
    	BT_AUDIO_LOCATION_ANY, (BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED));
    
    static struct bt_bap_lc3_preset lc3_preset_source = BT_BAP_LC3_UNICAST_PRESET_NRF5340_AUDIO_SOURCE;
    static struct bt_bap_lc3_preset lc3_preset_source_48_4_1 =
    	BT_BAP_LC3_UNICAST_PRESET_48_4_1(BT_AUDIO_LOCATION_ANY, BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
    static struct bt_bap_lc3_preset lc3_preset_source_24_2_1 =
    	BT_BAP_LC3_UNICAST_PRESET_24_2_1(BT_AUDIO_LOCATION_ANY, BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
    static struct bt_bap_lc3_preset lc3_preset_source_16_2_1 =
    	BT_BAP_LC3_UNICAST_PRESET_16_2_1(BT_AUDIO_LOCATION_ANY, BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
    

    similar to how it was reduced to 16 kHz on the sink side? I attempted to configure this myself, but I wasn’t able to do it correctly. Would reducing the frequency on the source side help reduce CPU load and possibly improve signal quality?

    Otherwise, I’ll go ahead and close this ticket and open a new one regarding the use of dual microphones in different setups.

    Thanks again for your support!

    Best regards,


    Abdulmohaimen Algamoudi

Related