nrf5340 Audio - 4 streams broadcasting ncs v2.6.0

Dear Nordic team,

I'm evaluating nRF5340 Audio DK for the use-case of broadcasting multiple streams; NCS v2.6.0-rc1.

Until now I've succeeded broadcasted 4 streams (LC4 bitrate set up to 48kbps) in NCS v2.2.0, now I've migrated the nrf5340_audio application (to ncs 2.6.0-RC1) and I obtain the error:

GW [00:00:00.457,550] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8584
GW [00:00:00.457,763] <inf> bt_mgmt: Local identity addr: F9:1F:05:AB:3A:5C (random)
GW [00:00:00.458,038] <inf> broadcast_source: Enabling broadcast_source NRF5340_BROADCASTER
GW [00:00:00.461,853] <inf> bt_mgmt_adv: Local addr: 04:E2:D2:83:D1:D1 (random)
GW [00:00:00.463,958] <inf> main: Ext adv ready
GW [00:00:00.463,958] <inf> broadcast_source: Starting broadcast source
GW [00:00:00.464,385] <wrn> bt_hci_core: opcode 0x2068 status 0x0d
GW [00:00:00.464,416] <wrn> broadcast_source: Failed to start broadcast, ret: -12
GW [00:00:00.464,416] <err> main: Failed to start broadcaster: -12
GW [00:00:00.464,416] <inf> bt_mgmt_adv: Advertising successfully started

As far as I understand, this is produced by the binary from the network core (flashed from the corresponding path: C:\ncs\v2.6.0-rc1\nrf\lib\bin\bt_ll_acs_nrf53\bin\).

So, is my assumption right? Were the 2 broadcasted streams limited somewhere between ncs v2.2 and v2.6? Am I missing some configuration or code change?

I'm attaching the prj.conf (modified)

# nRF5340 Audio
CONFIG_NRF5340_AUDIO=y

CONFIG_SAMPLE_RATE_CONVERTER=y
CONFIG_SAMPLE_RATE_CONVERTER_FILTER_SIMPLE=y

# Custom config
CONFIG_AUDIO_SOURCE_I2S=y
CONFIG_TRANSPORT_BIS=y

CONFIG_BT_ISO_MAX_CHAN=4
CONFIG_BT_ISO_TX_BUF_COUNT=4
CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT=4
CONFIG_BT_AUDIO_RETRANSMITS=1

CONFIG_BT_AUDIO_BROADCAST_CONFIGURABLE=y
CONFIG_BT_BAP_BROADCAST_16_2_1=y

CONFIG_BT_AUDIO_PREF_SAMPLE_RATE_16KHZ=y

CONFIG_AUDIO_SAMPLE_RATE_16000_HZ=y
CONFIG_AUDIO_BIT_DEPTH_16=y

CONFIG_LC3_ENC_CHAN_MAX=4

Thank you?

Parents
  • Hi Karl,

    Now, I've just modified the .\child_image\hci_ipc.conf; I've attached the modified content, but the ENOMEM error is still there.

    I've increased the CONFIG_BT_CTLR_CONN_ISO_STREAMS to 4, and the CONFIG_BT_MAX_CONN to 5.

    hci_ipc.conf

    Thanks,

    Catalin

  • Hello Catalin,

    catalinio said:
    I have duplicated the application from ncs v2.6 (verified it and it works fine on my boards, 2 gateway scenario also fine) and added manually my code modifications from the old project based on v2.2

    Are you certain that you are using the same iso channel and audio quality configuration now as previously? The rule of thumb for encoding of a 96 kbps audio stream is that it will take roughly ~31% CPU to encode, and ~15% CPU to decode, so you will be nearing that if you intend to encode 4 channels concurrently.

    catalinio said:

    Now, I've just modified the .\child_image\hci_ipc.conf; I've attached the modified content, but the ENOMEM error is still there.

    I've increased the CONFIG_BT_CTLR_CONN_ISO_STREAMS to 4, and the CONFIG_BT_MAX_CONN to 5.

    In your hci_ipc.conf you are also enabling 

    CONFIG_BT_CTLR_CONN_ISO_GROUPS
    and
    CONFIG_BT_CTLR_CONN_ISO_STREAMS

    Which will both are for CIS's, but in your description you explicitly mentions broadcasting 4 streams (BIS).
    Is your intentions to have concurrent BIS and CISs, and if so, how many of each?
    Please keep in mind that each CIS will require 1 ISO channel and 1 ACL channel.

    Best regards,
    Karl

  • Hi Karl,

    Are you certain that you are using the same iso channel and audio quality configuration now as previously? The rule of thumb for encoding of a 96 kbps audio stream is that it will take roughly ~31% CPU to encode, and ~15% CPU to decode, so you will be nearing that if you intend to encode 4 channels concurrently.

    I'm encoding 32kbps streams, in ncs 2.2, the CPU was used ~85% for encoding 6 streams; I think for 4 low bitrate streams the CPU should be fine.

    Is your intentions to have concurrent BIS and CISs, and if so, how many of each?

    I'm just using the default hci_ipc.conf from here.I want to stream just 4 broadcast streams, no CIS. Which CONF_BT_CTLR_xxx should be set for BIS?

    thanks,

    catalin

  • Hello Catalin,

    catalinio said:
    I'm encoding 32kbps streams, in ncs 2.2, the CPU was used ~85% for encoding 6 streams; I think for 4 low bitrate streams the CPU should be fine.

    Yes, with lower quality audio that should be fine - I was just mentioning the rule of thumb since I was not sure which bitrates you intended to use. Glad to hear that you have already tested the CPU load previously for this configuration as well!

    catalinio said:
    I'm just using the default hci_ipc.conf from here.I want to stream just 4 broadcast streams, no CIS. Which CONF_BT_CTLR_xxx should be set for BIS?

    You can see the necessary strictly for the broadcast source channels kconfig configurations here.
    These would be in addition to the ones you already have in place regarding the LC3 and the rest of the application in general.
    You should then remove the CIS related kconfigs since these too will allocate memory in the controller if left in place.

    Best regards,
    Karl

  • Hi Karl,

    I still can't make 4 streams broadcast, as BIG can't be created. I'll resume debug some weeks later.

    For the reference, I'm attaching the prj.conf, hci_ipc.conf and build\dev_gateway\build_debug\zephyr\.config files.

    Also the last debug output is here:

    *** Booting nRF Connect SDK v3.5.99-ncs1-rc1 ***
    GW [00:00:00.430,541] <inf> board_version: Compatible board/HW version found: 1.0.0
    GW [00:00:00.481,872] <inf> fw_info:
    nRF5340 Audio nRF5340 Audio DK cpuapp
    NCS base version: 2.6.0-rc1
    Cmake run : Fri Mar 22 08:43:22 2024
    GW [00:00:00.481,872] <inf> fw_info: ------- DEBUG BUILD -------
    GW [00:00:00.481,903] <inf> fw_info: Compiled for GATEWAY device
    GW [00:00:00.491,485] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    GW [00:00:00.491,516] <inf> bt_hci_core: HW Variant: nRF53x (0x0003)
    GW [00:00:00.491,516] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 230.392 Build 2708674828
    GW [00:00:00.492,004] <inf> bt_hci_core: Identity: F9:1F:05:AB:3A:5C (random)
    GW [00:00:00.492,004] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x2188, manufacturer 0x0059
    GW [00:00:00.492,034] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x2188
    GW [00:00:00.492,431] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8584
    GW [00:00:00.492,645] <inf> bt_mgmt: Local identity addr: F9:1F:05:AB:3A:5C (random)
    GW [00:00:00.492,919] <inf> broadcast_source: Enabling broadcast_source NRF5340_BROADCASTER
    GW [00:00:00.496,734] <inf> bt_mgmt_adv: Local addr: 24:F7:01:A1:61:A2 (random)
    GW [00:00:00.498,809] <inf> main: Ext adv ready
    GW [00:00:00.498,809] <inf> broadcast_source: Starting broadcast source
    GW [00:00:00.499,267] <wrn> bt_hci_core: Z opcode 0x2068 status 0x0d
    GW [00:00:00.499,267] <wrn> bt_iso: Could not create BIG -12
    GW [00:00:00.499,267] <wrn> bt_bap_broadcast_source: Failed to create BIG: -12
    GW [00:00:00.499,267] <wrn> broadcast_source: Failed to start broadcast, ret: -12
    GW [00:00:00.499,298] <err> main: Failed to start broadcaster: -12
    GW [00:00:00.499,298] <inf> bt_mgmt_adv: Advertising successfully started

    7026.zephyr_config.txt  3716.hci_ipc.conf  8507.prj.conf

    Thanks,

    Catalin

Reply
  • Hi Karl,

    I still can't make 4 streams broadcast, as BIG can't be created. I'll resume debug some weeks later.

    For the reference, I'm attaching the prj.conf, hci_ipc.conf and build\dev_gateway\build_debug\zephyr\.config files.

    Also the last debug output is here:

    *** Booting nRF Connect SDK v3.5.99-ncs1-rc1 ***
    GW [00:00:00.430,541] <inf> board_version: Compatible board/HW version found: 1.0.0
    GW [00:00:00.481,872] <inf> fw_info:
    nRF5340 Audio nRF5340 Audio DK cpuapp
    NCS base version: 2.6.0-rc1
    Cmake run : Fri Mar 22 08:43:22 2024
    GW [00:00:00.481,872] <inf> fw_info: ------- DEBUG BUILD -------
    GW [00:00:00.481,903] <inf> fw_info: Compiled for GATEWAY device
    GW [00:00:00.491,485] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    GW [00:00:00.491,516] <inf> bt_hci_core: HW Variant: nRF53x (0x0003)
    GW [00:00:00.491,516] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 230.392 Build 2708674828
    GW [00:00:00.492,004] <inf> bt_hci_core: Identity: F9:1F:05:AB:3A:5C (random)
    GW [00:00:00.492,004] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x2188, manufacturer 0x0059
    GW [00:00:00.492,034] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x2188
    GW [00:00:00.492,431] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8584
    GW [00:00:00.492,645] <inf> bt_mgmt: Local identity addr: F9:1F:05:AB:3A:5C (random)
    GW [00:00:00.492,919] <inf> broadcast_source: Enabling broadcast_source NRF5340_BROADCASTER
    GW [00:00:00.496,734] <inf> bt_mgmt_adv: Local addr: 24:F7:01:A1:61:A2 (random)
    GW [00:00:00.498,809] <inf> main: Ext adv ready
    GW [00:00:00.498,809] <inf> broadcast_source: Starting broadcast source
    GW [00:00:00.499,267] <wrn> bt_hci_core: Z opcode 0x2068 status 0x0d
    GW [00:00:00.499,267] <wrn> bt_iso: Could not create BIG -12
    GW [00:00:00.499,267] <wrn> bt_bap_broadcast_source: Failed to create BIG: -12
    GW [00:00:00.499,267] <wrn> broadcast_source: Failed to start broadcast, ret: -12
    GW [00:00:00.499,298] <err> main: Failed to start broadcaster: -12
    GW [00:00:00.499,298] <inf> bt_mgmt_adv: Advertising successfully started

    7026.zephyr_config.txt  3716.hci_ipc.conf  8507.prj.conf

    Thanks,

    Catalin

Children
  • Hi, 

    Karl is out of the office for the Easter holiday, so I take this case.

    Please update the hci_ipc.conf with:

    CONFIG_BT_CTLR_ADV_ISO_STREAM_COUNT=4

     

    According to the description, this is for:

    "Maximum Broadcast ISO Streams supported in the Controller across all Broadcast ISO groups"

    And now that is 2 in the default.

    Please note that we are a bit low on staff due to the Easter holidays in Norway. So please expect some delays and thanks for your patience in advance.

    Best regards,
    Amanda H.

Related