When compiling nef5340 audio device, LC3 encoding and decoding mode is selected, and the header device is not available

1,We put LC3 folder in NCS_ 1.9.99_ dev\ncs\nrf\applications\nrf5340_ Under audio\src, modify the makefile and compile it.

2,Migrate the LC3 library to NRF audio and set config config_ SW_ CODEC_ Lc3=y, use the following compilation command:

     python buildprog. py -c both -b debug -d both -p

The gateway device is normal and the green light is on.

The red light of the headset device is on, and an exception occurs.

Through log analysis, when the header device is initialized, although SW is set_ codec_ cfg. sw_ codec = SW_ CODEC_ LC3;

But when calling SW_ codec_ Init,

m_ config. sw_ codec != SW_ CODEC_ LC3,

Cause SW_ codec_ lc3_ Init failed.


  • nRF5340 Audio nRF5340 Audio DK cpuapp
    FW Version: 0.5.0
    Cmake run : Fri Jun 17 17:31:44 2022[0m[0m
    HL [00:00:00.393,310] [0m<inf> fw_info: ------- DEBUG BUILD -------[0m
    HL [00:00:00.393,310] [0m<inf> fw_info: [0;36m
    HEADSET left device[0m[0m
    HL [00:00:00.403,930] [0m<inf> board_version: [0;32mCompatible board/HW version found: 1.0.0[0m[0m
    audio_headset_start

    CONFIG_SW_CODEC_LC3

    HL [00:00:00.468,292] [1;33m<wrn> bt_hci_core: Controller to host flow control not supported[0m
    HL [00:00:00.470,214] [1;33m<wrn> bt_hci_core: opcode 0xfc02 status 0x11[0m
    HL [00:00:00.470,245] [1;33m<wrn> bt_hci_core: Failed to read supported vendor commands[0m
    HL [00:00:00.598,297] [0m<inf> ble: MAC: C1:C0:ED:9B:F8:1E (public)[0m
    HL [00:00:00.598,510] [0m<inf> ble: Controller version: 3247[0m
    HL [00:00:00.666,625] [0m<inf> audio_codec: audio_codec_start[0m
    HL [00:00:00.666,625] [1;33m<wrn> sw_codec_select: sw_codec_init start m_config.sw_codec = 0[0m
    HL [00:00:00.666,625] [1;31m<err> sw_codec_lc3: ret = -5009[0m
    HL [00:00:00.666,625] [1;33m<wrn> sw_codec_select: sw_codec_lc3_init start[0m
    HL [00:00:00.666,656] [1;31m<err> audio_codec: Failed to set up codec[0m
    HL [00:00:00.666,656] [1;31m<err> audio_codec: ERR_CHK Err_code: [-5009] @ line: 147 [0m
    HL [00:00:00.666,656] [1;31m<err> os: r0/a1: 0x00000003 r1/a2: 0x200030a8 r2/a3: 0x200030a8[0m
    HL [00:00:00.666,656] [1;31m<err> os: r3/a4: 0x00000000 r12/ip: 0x00000020 r14/lr: 0x0003c2d3[0m
    HL [00:00:00.666,687] [1;31m<err> os: xpsr: 0x69100000[0m
    HL [00:00:00.666,687] [1;31m<err> os: s[ 0]: 0x00000000 s[ 1]: 0x00000000 s[ 2]: 0x00000000 s[ 3]: 0x00000000[0m
    HL [00:00:00.666,687] [1;31m<err> os: s[ 4]: 0x00000000 s[ 5]: 0x00000000 s[ 6]: 0x00000000 s[ 7]: 0x00000000[0m
    HL [00:00:00.666,687] [1;31m<err> os: s[ 8]: 0x00000000 s[ 9]: 0x00000000 s[10]: 0x00000000 s[11]: 0xffffffff[0m
    HL [00:00:00.666,687] [1;31m<err> os: s[12]: 0x00000000 s[13]: 0x00000000 s[14]: 0x00000000 s[15]: 0x00000000[0m
    HL [00:00:00.666,717] [1;31m<err> os: fpscr: 0x2000f408[0m
    HL [00:00:00.666,717] [1;31m<err> os: Faulting instruction address (r15/pc): 0x00003eee[0m
    HL [00:00:00.666,717] [1;31m<err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0[0m
    HL [00:00:00.666,748] [1;31m<err> os: Current thread: 0x200030a8 (main)[0m
    HL [00:00:00.666,748] [1;31m<err> error_handler: Caught system error -- reason 3. Entering infinite loop[0m

  • Hello!

    I would advise you to upgrade to NCS v2.0.0, as it contains major updates relevant to BLE Audio support, unless you have very good reasons to stay in 1.9.

    Let me know if you still have issues with this.

    Best regards,

    Einar

Related