LE Audio streaming between two dev boards is intermittently dropping

Hello,

I have configured 2 nRF5340 boards for LE audio streaming from my mac. Two things I am noticing:

1. The audio is streaming but it is intermittent. Audio plays for about 1-2 seconds before it drops for another 1-2 seconds and then this cycle repeats.

2. The logs indicate that the LC3 codec is configuring for 24000, but nowhere in my configuration is this happening (I am using the project defaults for the nrf5340 audio demo). 

HL [00:00:01.757,843] <inf> le_audio: LC3 codec config for sink:
HL [00:00:01.757,843] <inf> le_audio: Frequency: 24000 Hz
HL [00:00:01.757,843] <inf> le_audio: Duration: 10000 us
HL [00:00:01.757,843] <inf> le_audio: Channel allocation: 0x1
HL [00:00:01.757,843] <inf> le_audio: Octets per frame: 60 (48000 bps)
HL [00:00:01.757,873] <inf> le_audio: Frames per SDU: 1
HL [00:00:01.777,832] <inf> le_audio: LC3 codec config for source:
HL [00:00:01.777,832] <inf> le_audio: Frequency: 24000 Hz
HL [00:00:01.777,832] <inf> le_audio: Duration: 10000 us
HL [00:00:01.777,862] <inf> le_audio: Channel allocation: 0x1
HL [00:00:01.777,862] <inf> le_audio: Octets per frame: 60 (48000 bps)
HL [00:00:01.777,862] <inf> le_audio: Frames per SDU: 1

Parents
  • Hi, 

    Are you using macOS? If so, it's a known issue

    "OCT-2154: USB audio interface does not work correctly on macOS. The audio stream is intermittent on the headset side after connecting the gateway to a Mac computer and starting the audio stream."

    Regards,
    Amanda H.

  • Thanks Amanda. I'll switch over to using the 3.5mm jack for now.

    Do you know what part of the project is responsible for configuring the LC3 codec to be at 24kHz instead of 48kHz?

  • Hi Amanda,

    I loaded the unmodified project and that seems to be streaming at 48kHz over LC3. This is interesting because the process I followed was copying this example project for the new one -- I'm not exactly sure what caused the sampling rate to change to 24kHz.

    The unmodified audio application stops streaming after a few seconds which seems like a known issue.

    The only change I've made to the unmodified application is

    CONFIG_AUDIO_SOURCE_I2S=y
    so that I can use the LINE_IN and pass in audio via an aux cable. This exhibits the same bird chirping behavior I mentioned earlier. I've attached a video for reference.

    Are there any solutions for this problem? Has an external USB audio sound card been used to try and work around the mac USB issue?

  • Hi,

    mkimhj said:

    The only change I've made to the unmodified application is

    CONFIG_AUDIO_SOURCE_I2S=y
    so that I can use the LINE_IN and pass in audio via an aux cable. This exhibits the same bird chirping behavior I mentioned earlier.

    Could you provide the device logs from both sides?

    -Amanda H.

  • Hi Amanda, Below are the logs:

    *** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
    *** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
    GW [00:00:00.268,249] <inf> board_version: Compatible board/HW version found: 1.1.0
    GW [00:00:00.300,598] <inf> fw_info:
    nRF5340 Audio nRF5340 Audio DK cpuapp
    NCS base version: 2.9.0
    Cmake run : Fri Jan 24 09:23:57 2025
    GW [00:00:00.300,598] <inf> fw_info: ------- DEBUG BUILD -------
    GW [00:00:00.300,628] <inf> fw_info: Compiled for GATEWAY device
    GW [00:00:00.373,748] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 6.0 (0x0e), Revision 8299
    GW [00:00:00.373,931] <inf> bt_mgmt: Local identity addr: D2:5F:7A:D9:31:2B (random)
    GW [00:00:00.405,059] <inf> bt_mgmt_scan: Local addr: 5C:E2:CC:C0:F8:3F (random). May time out. Updates not printed
    GW [00:00:00.405,090] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:00.409,362] <inf> bt_mgmt_scan: Creating connection to bonded device: D0:5B:8C:A4:B4:FE (random)
    GW [00:00:00.414,398] <inf> bt_mgmt: Connected: D0:5B:8C:A4:B4:FE (random)
    GW [00:00:00.414,428] <inf> main: Connection event. Num connections: 1
    GW [00:00:00.484,771] <inf> main: Security changed
    GW [00:00:00.695,007] <inf> bt_vol_ctlr: VCS discover finished
    GW [00:00:01.045,043] <inf> main: Set members found: 1 of 2
    GW [00:00:01.046,173] <inf> bt_mgmt_scan: Local addr: 5C:E2:CC:C0:F8:3F (random). May time out. Updates not printed
    GW [00:00:01.046,173] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:01.344,848] <inf> unicast_client: Discovered 1 sink endpoint(s) for device 0
    GW [00:00:01.366,302] <inf> unicast_client: LEFT sink stream configured
    GW [00:00:01.366,333] <inf> le_audio: LC3 codec config for sink:
    GW [00:00:01.366,333] <inf> le_audio: Frequency: 48000 Hz
    GW [00:00:01.366,333] <inf> le_audio: Duration: 10000 us
    GW [00:00:01.366,333] <inf> le_audio: Channel allocation: 0x1
    GW [00:00:01.366,363] <inf> le_audio: Octets per frame: 120 (96000 bps)
    GW [00:00:01.366,363] <inf> le_audio: Frames per SDU: 1
    GW [00:00:01.804,840] <inf> unicast_client: Stream 0x200122b0 started
    GW [00:00:01.833,038] <inf> audio_datapath: Drft comp state: CALIB
    GW [00:00:01.933,044] <inf> audio_datapath: Drft comp state: OFFSET
    GW [00:00:02.233,001] <inf> audio_datapath: Drft comp state: LOCKED

    _________________________________

    *** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
    *** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
    HL [00:00:00.268,981] <inf> board_version: Compatible board/HW version found: 1.1.0
    HL [00:00:00.301,605] <inf> fw_info:
    nRF5340 Audio nRF5340 Audio DK cpuapp
    NCS base version: 2.9.0
    Cmake run : Fri Jan 24 09:19:34 2025
    HL [00:00:00.301,605] <inf> fw_info: ------- DEBUG BUILD -------
    HL [00:00:00.301,605] <inf> fw_info: HEADSET left device
    HL [00:00:00.374,298] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 6.0 (0x0e), Revision 8299
    HL [00:00:00.374,511] <inf> bt_mgmt: Local identity addr: D0:5B:8C:A4:B4:FE (random)
    HL [00:00:00.403,106] <wrn> unicast_server: CSIP using the default SIRK, must be changed before production
    HL [00:00:00.407,623] <inf> bt_mgmt_adv: Local addr: 5E:FD:8C:4C:92:83 (random)
    HL [00:00:00.407,714] <inf> bt_mgmt_adv: Adv directed to: D2:5F:7A:D9:31:2B (random).
    HL [00:00:00.408,294] <inf> bt_mgmt_adv: Advertising successfully started
    HL [00:00:00.438,903] <inf> bt_mgmt: Connected: D2:5F:7A:D9:31:2B (random)
    HL [00:00:00.438,934] <inf> main: Connection event. Num connections: 1
    HL [00:00:00.439,086] <inf> bt_mgmt_adv: RPA (Resolvable Private Address) expired.
    HL [00:00:00.439,178] <inf> bt_mgmt_adv: Local addr: 5E:FD:8C:4C:92:83 (random)
    HL [00:00:00.509,979] <inf> main: Security changed
    HL [00:00:00.510,192] <wrn> bt_gatt: Device is not subscribed to characteristic
    HL [00:00:00.510,192] <wrn> bt_pacs: PACS notify failed: -22
    HL [00:00:00.989,837] <inf> bt_content_ctrl_media: Discovery of MCS finished
    HL [00:00:01.380,737] <inf> le_audio: LC3 codec config for sink:
    HL [00:00:01.380,737] <inf> le_audio: Frequency: 48000 Hz
    HL [00:00:01.380,767] <inf> le_audio: Duration: 10000 us
    HL [00:00:01.380,767] <inf> le_audio: Channel allocation: 0x1
    HL [00:00:01.380,767] <inf> le_audio: Octets per frame: 120 (96000 bps)
    HL [00:00:01.380,767] <inf> le_audio: Frames per SDU: 1
    HL [00:00:01.400,634] <inf> main: Presentation delay 3000 us is set by initiator
    HL [00:00:01.746,826] <inf> unicast_server: Stream 0x20010fec started
    HL [00:00:01.759,429] <wrn> audio_datapath: Data received, total under-runs: 1
    HL [00:00:01.867,431] <inf> audio_datapath: Drft comp state: CALIB
    HL [00:00:01.967,437] <inf> audio_datapath: Drft comp state: INIT
    HL [00:00:01.968,444] <inf> audio_datapath: Drft comp state: CALIB
    HL [00:00:02.068,450] <inf> audio_datapath: Drft comp state: OFFSET
    HL [00:00:02.468,597] <inf> audio_datapath: Drft comp state: LOCKED
    HL [00:00:02.477,050] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:02.587,066] <inf> audio_datapath: Pres comp state: WAIT
    HL [00:00:02.727,050] <inf> audio_datapath: Pres comp state: INIT
    HL [00:00:02.737,060] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:02.847,045] <inf> audio_datapath: Pres comp state: LOCKED

  • Hi, 

    mkimhj said:
    I'm not exactly sure what caused the sampling rate to change to 24kHz.

    It's usually enabled by CONFIG_STREAM_BIDIRECTIONAL. 

    mkimhj said:
    so that I can use the LINE_IN and pass in audio via an aux cable. This exhibits the same bird chirping behavior I mentioned earlier.

    Do you see the log showing something different while you hear the bird chirping?

    Since your log only shows the first few seconds, not sure it has the bird chirping behavior during that period. 

    Could you provide the log during the bird chirping behavior? Upload it via the toolbar -> insert -> file or code. 

    How do you compile and flash the application? What commands did you use?

    -Amanda H.

  • It's usually enabled by CONFIG_STREAM_BIDIRECTIONAL. 

    Ah I see, so going CONFIG_STREAM_BIDIRECTIONAL=y means that the sampling rate gets cut in half to have enough bandwidth to support 2 out / 2in? Am I understanding this correctly? Is going bidirectional / unidirectional configurable during runtime?

    Since your log only shows the first few seconds, not sure it has the bird chirping behavior during that period. 

    Could you provide the log during the bird chirping behavior? Upload it via the toolbar -> insert -> file or code. 


    There are no more logs after this. The bird chirping starts when the link gets established and never ends.

    How do you compile and flash the application? What commands did you use?

    I use the instructions here: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/nrf5340_audio/doc/building.html

    python buildprog.py -c both -b debug -d both -p
Reply Children
Related