Issue with Stereo Sound from External Codec on nRF5340 DK (SDK v2.6.2)

Hello Team,

I am experiencing an issue with the sound output from an external codec connected to the nRF5340 DK. Currently, the sound is in mono, but my goal is to achieve stereo sound for both the left and right channels.

I read in an article that the configuration may need to be edited to enable stereo output from the external codec. I am using SDK v2.6.2 and would appreciate any guidance or suggestions on how to adjust the configuration to resolve this issue.

Thank you for your support!

Regards,

Abdulmohaimen Algamoudi

Parents
  • Hi,

    Could you please provide more information about your setup?

    Which external codec do you use?

    Best regards,
    Dejan

  • Hi, 

    Thank you for your swift reply.

    I am using the DA7212 evaluation board, and I can hear sound from the jacks on the DA7212 board. I followed the instructions from Nordic to enable the external codec.

    However, I am still working on achieving stereo sound, as the current output is mono. Any further guidance would be greatly appreciated.

    Best regards,

    Abdulmohaimen Algamoudi

  • Hey Dejans,

    While working with v2.6.2, I encountered some recurring errors.
    I found the mentioned code of v2.4.2 from a previous ticket , implemented it, and it worked, allowing me to achieve CIS audio, albeit with limitations, as previously mentioned.

    My approach was to continue working with the functional setup on v2.4.2 to find a concrete solution and resolve all potential problems. After that, I plan to update and attempt to achieve the same results with the newer SDK.

    Best regards 

    Abdulmohaimen

  • BTW, these are the log files from using v2.6.2 in a proper implementation:

    1-Gateway:

       nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.2                            
             Cmake run : Wed Nov 27 13:37:31 2024
    GW [00:00:00.292,602] <inf> fw_info: ------- DEBUG BUILD -------
    GW [00:00:00.292,602] <inf> fw_info: Compiled for GATEWAY device
    GW [00:00:00.311,035] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    GW [00:00:00.311,248] <inf> bt_mgmt: Local identity addr: D3:C8:9D:D1:BE:66 (random)
    GW [00:00:00.315,093] <inf> bt_mgmt_scan: Local addr: 74:00:D2:00:21:08 (random). May time out. Updates not printed
    GW [00:00:00.315,093] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:00.771,606] <inf> bt_mgmt_scan: Creating connection to device: 79:25:96:B0:FA:D0 (random)
    GW [00:00:00.881,622] <inf> bt_mgmt: Connected: 79:25:96:B0:FA:D0 (random)
    GW [00:00:00.882,629] <inf> bt_mgmt_scan: Local addr: 74:00:D2:00:21:08 (random). May time out. Updates not printed
    GW [00:00:00.882,629] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:00.882,659] <inf> main: Device connected
    GW [00:00:01.604,217] <inf> main: Security changed
    GW [00:00:02.204,162] <inf> bt_rend_vol: VCS discover finished
    GW [00:00:05.804,992] <inf> unicast_client: LEFT sink stream configured
    GW [00:00:05.806,732] <inf> unicast_client: LEFT source stream configured
    GW [00:00:05.884,521] <inf> unicast_client: Enable stream 0x20002da0
    GW [00:00:05.885,406] <inf> unicast_client: Enable stream 0x20002ca8
    GW [00:00:06.204,193] <inf> unicast_client: Stream 0x20002ca8 started
    GW [00:00:06.244,567] <inf> unicast_client: Stream 0x20002da0 started
    GW [00:00:07.531,341] <inf> audio_usb: USB TX first data sent.
    GW [00:00:07.593,475] <inf> audio_usb: USB RX first data received.
    GW [00:01:07.684,082] <wrn> bt_att: Not connected
    GW [00:01:07.684,082] <wrn> bt_att: Not connected
    GW [00:01:07.684,112] <inf> unicast_client: Stream 0x20002ca8 stopped. Reason 8
    GW [00:01:07.684,173] <inf> unicast_client: Stream 0x20002da0 stopped. Reason 8
    GW [00:01:07.684,173] <wrn> unicast_client: Unknown stream
    GW [00:01:07.684,265] <inf> bt_mgmt: Disconnected: F0:D2:8E:F5:33:C2 (random) (reason 0x08)
    GW [00:01:07.684,326] <inf> main: Device disconnected
    GW [00:01:07.685,699] <inf> bt_mgmt_scan: Local addr: 74:00:D2:00:21:08 (random). May time out. Updates not printed
    GW [00:01:07.685,699] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:01:07.695,617] <inf> bt_mgmt_scan: Creating connection to bonded device: F0:D2:8E:F5:33:C2 (random)
    GW [00:01:07.705,566] <inf> bt_mgmt: Connected: F0:D2:8E:F5:33:C2 (random)
    GW [00:01:07.706,665] <inf> bt_mgmt_scan: Local addr: 74:00:D2:00:21:08 (random). May time out. Updates not printed
    GW [00:01:07.706,665] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:01:07.706,695] <inf> main: Device connected
    GW [00:01:07.986,053] <inf> main: Security changed
    GW [00:01:08.786,163] <inf> bt_rend_vol: VCS discover finished
    GW [00:01:11.866,729] <inf> unicast_client: LEFT sink stream configured
    GW [00:01:11.868,804] <inf> unicast_client: LEFT source stream configured
    GW [00:01:11.946,716] <inf> unicast_client: Enable stream 0x20002da0
    GW [00:01:11.947,662] <inf> unicast_client: Enable stream 0x20002ca8
    GW [00:01:12.226,226] <inf> unicast_client: Stream 0x20002ca8 started
    GW [00:01:12.227,630] <inf> audio_usb: USB RX first data received.
    GW [00:01:12.266,723] <inf> unicast_client: Stream 0x20002da0 started
    GW [00:01:19.066,162] <wrn> bt_att: Not connected
    GW [00:01:19.066,162] <wrn> bt_att: Not connected
    GW [00:01:19.066,192] <inf> unicast_client: Stream 0x20002ca8 stopped. Reason 8
    GW [00:01:19.066,253] <inf> unicast_client: Stream 0x20002da0 stopped. Reason 8
    GW [00:01:19.066,284] <wrn> unicast_client: Unknown stream
    GW [00:01:19.066,375] <inf> bt_mgmt: Disconnected: F0:D2:8E:F5:33:C2 (random) (reason 0x08)
    GW [00:01:19.066,375] <inf> main: Device disconnected
    GW [00:01:19.067,962] <inf> bt_mgmt_scan: Local addr: 74:00:D2:00:21:08 (random). May time out. Updates not printed
    GW [00:01:19.067,962] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:01:19.067,993] <wrn> unicast_client: Not in streaming state
    

    2-Headset: 

      nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.2                            
             Cmake run : Wed Nov 27 13:46:46 2024
    HL [00:00:00.296,600] <inf> fw_info: ------- DEBUG BUILD -------
    HL [00:00:00.296,600] <inf> fw_info: HEADSET left device
    HL [00:00:00.316,436] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    HL [00:00:00.316,650] <inf> bt_mgmt: Local identity addr: F0:D2:8E:F5:33:C2 (random)
    HL [00:00:00.322,021] <inf> bt_mgmt_adv: Local addr: 4B:AF:01:05:9B:F9 (random)
    HL [00:00:00.322,082] <inf> bt_mgmt_adv: Adv directed to: D3:C8:9D:D1:BE:66 (random).
    HL [00:00:00.322,692] <inf> bt_mgmt_adv: Advertising successfully started
    HL [00:00:00.797,271] <inf> bt_mgmt: Connected: D3:C8:9D:D1:BE:66 (random)
    HL [00:00:00.797,302] <inf> main: Connected
    HL [00:00:00.797,912] <inf> bt_mgmt_adv: RPA (Resolvable Private Address) expired.
    HL [00:00:00.797,973] <inf> bt_mgmt_adv: Local addr: 4B:AF:01:05:9B:F9 (random)
    HL [00:00:01.078,125] <inf> main: Security changed
    HL [00:00:01.078,369] <wrn> bt_gatt: Device is not subscribed to characteristic
    HL [00:00:01.078,399] <wrn> bt_pacs: PACS notify failed: -22
    HL [00:00:02.998,748] <inf> bt_content_ctrl_media: Discovery of MCS finished
    HL [00:00:04.918,640] <inf> unicast_server: LC3 codec config for sink:
    HL [00:00:04.918,640] <inf> unicast_server:     Frequency: 24000 Hz
    HL [00:00:04.918,640] <inf> unicast_server:     Duration: 10000 us
    HL [00:00:04.918,640] <inf> unicast_server:     Channel allocation: 0x1
    HL [00:00:04.918,670] <inf> unicast_server:     Octets per frame: 60 (48000 bps)
    HL [00:00:04.918,670] <inf> unicast_server:     Frames per SDU: 1
    HL [00:00:04.920,227] <inf> unicast_server: LC3 codec config for source:
    HL [00:00:04.920,227] <inf> unicast_server:     Frequency: 24000 Hz
    HL [00:00:04.920,227] <inf> unicast_server:     Duration: 10000 us
    HL [00:00:04.920,257] <inf> unicast_server:     Channel allocation: 0x1
    HL [00:00:04.920,257] <inf> unicast_server:     Octets per frame: 60 (48000 bps)
    HL [00:00:04.920,257] <inf> unicast_server:     Frames per SDU: 1
    HL [00:00:04.999,359] <inf> main: Presentation delay 10000 us is set by initiator
    HL [00:00:04.999,389] <inf> main: Presentation delay 10000 us is set by initiator
    HL [00:00:05.284,881] <inf> unicast_server: Stream 0x2000fbf8 started
    DAC L gain 112   
    DAC R gain 112   
    HL [00:00:05.295,776] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:05.306,030] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    HL [00:00:05.306,060] <wrn> audio_datapath: SW codec decode error: -19
    HL [00:00:05.306,060] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    HL [00:00:05.310,302] <wrn> audio_datapath: I2S RX overrun. Single msg
    HL [00:00:05.316,040] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 6 messages dropped ---
    HL [00:00:05.326,049] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 6 messages dropped ---
    HL [00:00:05.336,517] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 7 messages dropped ---
    HL [00:00:05.364,746] <wrn> audio_datapath: SW codec decode error: -19
    --- 3 messages dropped ---
    HL [00:00:05.384,735] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:05.404,754] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:05.424,743] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:05.444,763] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:05.464,752] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:05.474,761] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:05.494,750] <wrn> audio_datapath: SW codec decode error: -19
    --- 3 messages dropped ---
    HL [00:00:05.514,739] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:05.534,759] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:05.544,769] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 4 messages dropped ---
    HL [00:00:05.564,758] <wrn> audio_datapath: SW codec decode error: -19
    --- 3 messages dropped ---
    HL [00:00:05.584,808] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:05.604,797] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:05.614,807] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 4 messages dropped ---
    HL [00:00:05.634,796] <wrn> audio_datapath: SW codec decode error: -19
    --- 3 messages dropped ---
    HL [00:00:05.654,815] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:05.674,804] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:05.684,814] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 3 messages dropped ---
    HL [00:00:05.704,803] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 5 messages dropped ---
    HL [00:00:05.724,792] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 5 messages dropped ---
    HL [00:00:05.746,307] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 5 messages dropped ---
    HL [00:00:05.764,801] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 2 messages dropped ---
    HL [00:00:05.784,790] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 5 messages dropped ---
    HL [00:00:05.804,809] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 5 messages dropped ---
    HL [00:00:05.824,798] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 5 messages dropped ---
    HL [00:00:05.844,787] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 6 messages dropped ---
    HL [00:00:05.864,807] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 6 messages dropped ---
    HL [00:00:05.884,826] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:05.904,815] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:05.924,804] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:05.944,824] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 5 messages dropped ---
    HL [00:00:05.964,813] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 7 messages dropped ---
    HL [00:00:05.974,822] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:05.994,812] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.014,801] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.034,820] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.054,656] <wrn> audio_datapath: Data received, total under-runs: 751
    --- 5 messages dropped ---
    HL [00:00:06.064,819] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.084,808] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 6 messages dropped ---
    HL [00:00:06.114,807] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 6 messages dropped ---
    HL [00:00:06.134,796] <wrn> audio_datapath: SW codec decode error: -19
    --- 2 messages dropped ---
    HL [00:00:06.154,815] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:06.174,804] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:06.184,814] <wrn> audio_datapath: SW codec decode error: -19
    --- 3 messages dropped ---
    HL [00:00:06.204,559] <inf> audio_datapath: Pres comp state: MEAS
    --- 5 messages dropped ---
    HL [00:00:06.224,792] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 8 messages dropped ---
    HL [00:00:06.244,812] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.264,801] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 4 messages dropped ---
    HL [00:00:06.274,810] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.294,830] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.314,666] <wrn> audio_datapath: Data received, total under-runs: 951
    --- 6 messages dropped ---
    HL [00:00:06.334,777] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 5 messages dropped ---
    HL [00:00:06.354,797] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 5 messages dropped ---
    HL [00:00:06.374,786] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 3 messages dropped ---
    HL [00:00:06.394,805] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:06.414,794] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:06.424,804] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:06.444,793] <wrn> audio_datapath: SW codec decode error: -19
    --- 3 messages dropped ---
    HL [00:00:06.464,538] <inf> audio_datapath: Pres comp state: MEAS
    --- 5 messages dropped ---
    HL [00:00:06.474,792] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 8 messages dropped ---
    HL [00:00:06.504,791] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 4 messages dropped ---
    HL [00:00:06.514,831] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.534,820] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.554,809] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.574,676] <wrn> audio_datapath: Data received, total under-runs: 1151
    --- 5 messages dropped ---
    HL [00:00:06.584,808] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 3 messages dropped ---
    HL [00:00:06.604,797] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 8 messages dropped ---
    HL [00:00:06.634,796] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 3 messages dropped ---
    HL [00:00:06.654,815] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:06.674,804] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:06.684,814] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:06.704,803] <wrn> audio_datapath: SW codec decode error: -19
    --- 3 messages dropped ---
    HL [00:00:06.724,548] <inf> audio_datapath: Pres comp state: MEAS
    --- 5 messages dropped ---
    HL [00:00:06.734,802] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 8 messages dropped ---
    HL [00:00:06.764,801] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 4 messages dropped ---
    HL [00:00:06.774,810] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.794,830] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.814,819] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.834,686] <wrn> audio_datapath: Data received, total under-runs: 1351
    --- 3 messages dropped ---
    HL [00:00:06.844,787] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.864,807] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:06.894,805] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 6 messages dropped ---
    HL [00:00:06.914,794] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:06.934,814] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:06.944,793] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:06.964,813] <wrn> audio_datapath: SW codec decode error: -19
    --- 3 messages dropped ---
    HL [00:00:06.984,558] <inf> audio_datapath: Pres comp state: MEAS
    --- 5 messages dropped ---
    HL [00:00:06.994,812] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 8 messages dropped ---
    HL [00:00:07.024,810] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 4 messages dropped ---
    HL [00:00:07.034,820] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:07.054,809] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:07.074,798] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:07.094,696] <wrn> audio_datapath: Data received, total under-runs: 1551
    --- 3 messages dropped ---
    HL [00:00:07.104,797] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:07.124,816] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:07.154,785] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 6 messages dropped ---
    HL [00:00:07.174,804] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:07.194,793] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:07.204,803] <wrn> audio_datapath: SW codec decode error: -19
    --- 3 messages dropped ---
    HL [00:00:07.224,822] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:07.244,567] <inf> audio_datapath: Pres comp state: MEAS
    --- 5 messages dropped ---
    HL [00:00:07.254,791] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 8 messages dropped ---
    HL [00:00:07.284,790] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 4 messages dropped ---
    HL [00:00:07.294,830] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:07.314,819] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 3 messages dropped ---
    HL [00:00:07.334,808] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 7 messages dropped ---
    HL [00:00:07.354,675] <wrn> audio_datapath: Data received, total under-runs: 1751
    --- 3 messages dropped ---
    HL [00:00:07.364,807] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:07.384,796] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:07.414,794] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 6 messages dropped ---
    HL [00:00:07.434,814] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:07.444,793] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:07.464,813] <wrn> audio_datapath: SW codec decode error: -19
    --- 3 messages dropped ---
    HL [00:00:07.484,802] <wrn> audio_datapath: SW codec decode error: -19
    --- 5 messages dropped ---
    HL [00:00:07.504,547] <inf> audio_datapath: Pres comp state: MEAS
    --- 5 messages dropped ---
    HL [00:00:07.514,801] <err> sw_codec_select: Unsupported channel mode for decoder: 0
    --- 7 messages dropped ---
    HL [00:00:07.534,820] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:07.554,809] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:07.574,829] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 3 messages dropped ---
    HL [00:00:07.594,818] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 4 messages dropped ---
    HL [00:00:07.614,685] <wrn> audio_datapath: Data received, total under-runs: 1951
    --- 6 messages dropped ---
    HL [00:00:07.624,816] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920
    --- 5 messages dropped ---
    HL [00:00:07.644,805] <wrn> audio_datapath: Decoded audio has wrong size: 0. Expected: 1920

  • Hi Abdulmohaimen,

    Are these logs in NCS v2.6.2 obtained after you implemented the same code changes as when you used NCS v2.4.2?

    Best regards,
    Dejan

  • Hi Abdulmohaimen,

    The error "<err> sw_codec_select: Unsupported channel mode for decoder: 0" in your NCS v2.6.2 log indicates that channel mode for decoder is not properly selected.

    You can look at m_config.decoder.channel_mode, struct sw_codec_decoder and enum sw_codec_channel_mode for the place where channel_mode is set. This is how sw_codec_channel_mode looks like in sw_codec_select.h

    enum sw_codec_channel_mode {
    	SW_CODEC_MONO = 1,
    	SW_CODEC_STEREO,
    };

    You could try to check how m_config.decoder.channel_mode is set.

    Best regards,
    Dejan

  • Good mrning Dejans, 

    I would like to express my thanks again. I was able to configure CIS Stereo mode using the v2.6.2 SDK by following this article and making some modifications to my code.

    While attempting to achieve a bidirectional configuration by enabling CONFIG_STREAM_BIDIRECTIONAL=y to get input from the microphone, I encountered the following error from the headset: (Left)

    *** Booting nRF Connect SDK v3.5.99-ncs1-2 ***
    HL [00:00:00.269,775] <inf> board_version: Compatible board/HW version found: 1.0.0
    HL [00:00:00.295,471] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.2                            
             Cmake run : Wed Dec 11 14:29:37 2024
    HL [00:00:00.295,471] <inf> fw_info: ------- DEBUG BUILD -------
    HL [00:00:00.295,471] <inf> fw_info: HEADSET left device
    HL [00:00:00.314,483] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    HL [00:00:00.314,697] <inf> bt_mgmt: Local identity addr: F0:D2:8E:F5:33:C2 (random)
    HL [00:00:00.319,122] <inf> bt_mgmt_adv: Local addr: 4A:4A:60:EC:FA:38 (random)
    HL [00:00:00.319,671] <inf> bt_mgmt_adv: Advertising successfully started
    HL [00:00:00.544,799] <inf> bt_mgmt: Connected: 5D:F5:9F:2E:A1:2A (random)
    HL [00:00:00.544,830] <inf> main: Connected
    HL [00:00:01.312,683] <inf> main: Security changed
    HL [00:00:03.952,850] <inf> bt_content_ctrl_media: Discovery of MCS finished
    HL [00:00:06.432,891] <inf> unicast_server: LC3 codec config for sink:
    HL [00:00:06.432,922] <inf> unicast_server:     Frequency: 24000 Hz
    HL [00:00:06.432,922] <inf> unicast_server:     Duration: 10000 us
    HL [00:00:06.432,922] <inf> unicast_server:     Channel allocation: 0x1
    HL [00:00:06.432,922] <inf> unicast_server:     Octets per frame: 60 (48000 bps)
    HL [00:00:06.432,922] <inf> unicast_server:     Frames per SDU: 1
    HL [00:00:06.434,326] <inf> unicast_server: LC3 codec config for source:
    HL [00:00:06.434,326] <inf> unicast_server:     Frequency: 24000 Hz
    HL [00:00:06.434,326] <inf> unicast_server:     Duration: 10000 us
    HL [00:00:06.434,356] <inf> unicast_server:     Channel allocation: 0x1
    HL [00:00:06.434,356] <inf> unicast_server:     Octets per frame: 60 (48000 bps)
    HL [00:00:06.434,356] <inf> unicast_server:     Frames per SDU: 1
    HL [00:00:06.553,558] <inf> main: Presentation delay 10000 us is set by initiator
    HL [00:00:06.553,588] <inf> main: Presentation delay 10000 us is set by initiator
    HL [00:00:06.919,097] <inf> unicast_server: Stream 0x2000f6a0 started
    HL [00:00:06.924,041] <err> sw_codec_lc3: LC3 dec ch: 1 already initialized
    HL [00:00:06.924,072] <err> audio_system: Failed to set up codec
    HL [00:00:06.924,072] <err> audio_system: ERR_CHK Err_code: [-120] @ line: 399
    HL [00:00:06.924,072] <err> os: r0/a1:  0x00000003  r1/a2:  0x00000006  r2/a3:  0x00000005
    HL [00:00:06.924,072] <err> os: r3/a4:  0x00059009 r12/ip:  0x20002d48 r14/lr:  0x00059093
    HL [00:00:06.924,102] <err> os:  xpsr:  0x41100000
    HL [00:00:06.924,102] <err> os: s[ 0]:  0x20001440  s[ 1]:  0x0005922d  s[ 2]:  0xffffff88  s[ 3]:  0x00000004
    HL [00:00:06.924,102] <err> os: s[ 4]:  0x20012250  s[ 5]:  0x20012230  s[ 6]:  0xffffff88  s[ 7]:  0x20012230
    HL [00:00:06.924,133] <err> os: s[ 8]:  0x20012250  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00059279
    HL [00:00:06.924,133] <err> os: s[12]:  0x20004540  s[13]:  0x000699f0  s[14]:  0xffffff88  s[15]:  0x0000018f
    HL [00:00:06.924,133] <err> os: fpscr:  0x00000000
    HL [00:00:06.924,133] <err> os: Faulting instruction address (r15/pc): 0x00004536
    HL [00:00:06.924,163] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
    HL [00:00:06.924,194] <err> os: Current thread: 0x20001cf8 (LE_AUDIO_MSG_SUB)
    HL [00:00:06.924,194] <err> error_handler: Caught system error -- reason 3. Entering infinite loop
    

    (Right)

    *** Booting nRF Connect SDK v3.5.99-ncs1-2 ***
    HR [00:00:00.269,622] <inf> board_version: Compatible board/HW version found: 1.0.0
    HR [00:00:00.295,318] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.2                            
             Cmake run : Wed Dec 11 14:29:37 2024
    HR [00:00:00.295,318] <inf> fw_info: ------- DEBUG BUILD -------
    HR [00:00:00.295,318] <inf> fw_info: HEADSET right device
    HR [00:00:00.314,270] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    HR [00:00:00.314,483] <inf> bt_mgmt: Local identity addr: F0:CB:62:43:5B:62 (random)
    HR [00:00:00.318,908] <inf> bt_mgmt_adv: Local addr: 78:FC:74:C4:67:5D (random)
    HR [00:00:00.319,427] <inf> bt_mgmt_adv: Advertising successfully started
    HR [00:00:00.433,471] <inf> bt_mgmt: Connected: 5D:F5:9F:2E:A1:2A (random)
    HR [00:00:00.433,502] <inf> main: Connected
    HR [00:00:01.195,648] <inf> main: Security changed
    HR [00:00:03.475,921] <inf> bt_content_ctrl_media: Discovery of MCS finished
    HR [00:00:05.515,960] <inf> unicast_server: LC3 codec config for sink:
    HR [00:00:05.515,991] <inf> unicast_server:     Frequency: 24000 Hz
    HR [00:00:05.515,991] <inf> unicast_server:     Duration: 10000 us
    HR [00:00:05.515,991] <inf> unicast_server:     Channel allocation: 0x1
    HR [00:00:05.515,991] <inf> unicast_server:     Octets per frame: 60 (48000 bps)
    HR [00:00:05.515,991] <inf> unicast_server:     Frames per SDU: 1
    HR [00:00:05.517,395] <inf> unicast_server: LC3 codec config for source:
    HR [00:00:05.517,395] <inf> unicast_server:     Frequency: 24000 Hz
    HR [00:00:05.517,395] <inf> unicast_server:     Duration: 10000 us
    HR [00:00:05.517,425] <inf> unicast_server:     Channel allocation: 0x2
    HR [00:00:05.517,425] <inf> unicast_server:     Octets per frame: 60 (48000 bps)
    HR [00:00:05.517,425] <inf> unicast_server:     Frames per SDU: 1
    HR [00:00:05.596,618] <inf> main: Presentation delay 10000 us is set by initiator
    HR [00:00:05.596,649] <inf> main: Presentation delay 10000 us is set by initiator
    HR [00:00:05.918,731] <inf> unicast_server: Stream 0x2000f6a0 started
    HR [00:00:05.923,645] <err> sw_codec_lc3: LC3 dec ch: 1 already initialized
    HR [00:00:05.923,675] <err> audio_system: Failed to set up codec
    HR [00:00:05.923,675] <err> audio_system: ERR_CHK Err_code: [-120] @ line: 399
    HR [00:00:05.923,675] <err> os: r0/a1:  0x00000003  r1/a2:  0x00000004  r2/a3:  0x00000003
    HR [00:00:05.923,706] <err> os: r3/a4:  0x00059009 r12/ip:  0x20002d48 r14/lr:  0x00059093
    HR [00:00:05.923,706] <err> os:  xpsr:  0x41100000
    HR [00:00:05.923,706] <err> os: s[ 0]:  0x20001440  s[ 1]:  0x0005922d  s[ 2]:  0xffffff88  s[ 3]:  0x00000004
    HR [00:00:05.923,706] <err> os: s[ 4]:  0x20012250  s[ 5]:  0x20012230  s[ 6]:  0xffffff88  s[ 7]:  0x20012230
    HR [00:00:05.923,736] <err> os: s[ 8]:  0x20012250  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00059279
    HR [00:00:05.923,736] <err> os: s[12]:  0x20004540  s[13]:  0x000699f0  s[14]:  0xffffff88  s[15]:  0x0000018f
    HR [00:00:05.923,736] <err> os: fpscr:  0x00000000
    HR [00:00:05.923,767] <err> os: Faulting instruction address (r15/pc): 0x00004536
    HR [00:00:05.923,767] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
    HR [00:00:05.923,797] <err> os: Current thread: 0x20001cf8 (LE_AUDIO_MSG_SUB)
    HR [00:00:05.923,797] <err> error_handler: Caught system error -- reason 3. Entering infinite loop


    The line 399 in audio_system is:

    	ret = sw_codec_init(sw_codec_cfg);
    	ERR_CHK_MSG(ret, "Failed to set up codec");

    I have tried several methods to change the number of data channels to 2, but none of them have worked. Could you please assist me with this issue?

    I would like to mention that with the current working SDK I am using, both headsets are connected and synchronized, but there is no sound coming from the right headset. the log file of the right headset with out  enabling CONFIG_STREAM_BIDIRECTIONAL=y, when the left one output sound:
    .

    *** Booting nRF Connect SDK v3.5.99-ncs1-2 ***
    HR [00:00:00.270,568] <inf> board_version: Compatible board/HW version found: 1.0.0
    HR [00:00:00.296,081] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.2                            
             Cmake run : Wed Dec 11 10:07:20 2024
    HR [00:00:00.296,081] <inf> fw_info: ------- DEBUG BUILD -------
    HR [00:00:00.296,112] <inf> fw_info: HEADSET right device
    HR [00:00:00.315,826] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    HR [00:00:00.316,009] <inf> bt_mgmt: Local identity addr: F0:D2:8E:F5:33:C2 (random)
    HR [00:00:00.321,197] <inf> bt_mgmt_adv: Local addr: 59:BE:31:34:72:20 (random)
    HR [00:00:00.321,289] <inf> bt_mgmt_adv: Adv directed to: D3:C8:9D:D1:BE:66 (random).
    HR [00:00:00.321,899] <inf> bt_mgmt_adv: Advertising successfully started
    HR [00:00:00.845,428] <inf> bt_mgmt: Connected: D3:C8:9D:D1:BE:66 (random)
    HR [00:00:00.845,458] <inf> main: Connected
    HR [00:00:00.845,855] <inf> bt_mgmt_adv: RPA (Resolvable Private Address) expired.
    HR [00:00:00.845,916] <inf> bt_mgmt_adv: Local addr: 59:BE:31:34:72:20 (random)
    HR [00:00:01.414,123] <inf> main: Security changed
    HR [00:00:01.414,367] <wrn> bt_gatt: Device is not subscribed to characteristic
    HR [00:00:01.414,367] <wrn> bt_pacs: PACS notify failed: -22
    HR [00:00:07.973,968] <inf> bt_content_ctrl_media: Discovery of MCS finished
    HR [00:00:08.774,108] <inf> unicast_server: LC3 codec config for sink:
    HR [00:00:08.774,108] <inf> unicast_server:     Frequency: 48000 Hz
    HR [00:00:08.774,108] <inf> unicast_server:     Duration: 10000 us
    HR [00:00:08.774,139] <inf> unicast_server:     Channel allocation: 0x2
    HR [00:00:08.774,139] <inf> unicast_server:     Octets per frame: 120 (96000 bps)
    HR [00:00:08.774,139] <inf> unicast_server:     Frames per SDU: 1
    HR [00:00:09.014,648] <inf> main: Presentation delay 10000 us is set by initiator
    HR [00:00:09.576,477] <inf> unicast_server: Stream 0x2000f698 started
    DAC L gain 112   
    DAC R gain 112   
    HR [00:00:09.587,707] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HR [00:00:09.599,639] <wrn> audio_datapath: Data received, total under-runs: 5
    HR [00:00:09.666,656] <inf> audio_datapath: Drft comp state: CALIB
    HR [00:00:09.766,662] <inf> audio_datapath: Drft comp state: OFFSET
    HR [00:00:09.966,674] <inf> audio_datapath: Drft comp state: LOCKED
    HR [00:00:09.966,827] <inf> audio_datapath: Pres comp state: MEAS
    HR [00:00:10.076,812] <inf> audio_datapath: Pres comp state: WAIT
    HR [00:00:10.216,796] <inf> audio_datapath: Pres comp state: INIT
    HR [00:00:10.226,806] <inf> audio_datapath: Pres comp state: MEAS
    HR [00:00:10.336,791] <inf> audio_datapath: Pres comp state: LOCKED

    For any further information, I am ready to assist or provide details as needed.

    Thanks in advance.

    Best regards 

    Abdulmohaimen 



Reply
  • Good mrning Dejans, 

    I would like to express my thanks again. I was able to configure CIS Stereo mode using the v2.6.2 SDK by following this article and making some modifications to my code.

    While attempting to achieve a bidirectional configuration by enabling CONFIG_STREAM_BIDIRECTIONAL=y to get input from the microphone, I encountered the following error from the headset: (Left)

    *** Booting nRF Connect SDK v3.5.99-ncs1-2 ***
    HL [00:00:00.269,775] <inf> board_version: Compatible board/HW version found: 1.0.0
    HL [00:00:00.295,471] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.2                            
             Cmake run : Wed Dec 11 14:29:37 2024
    HL [00:00:00.295,471] <inf> fw_info: ------- DEBUG BUILD -------
    HL [00:00:00.295,471] <inf> fw_info: HEADSET left device
    HL [00:00:00.314,483] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    HL [00:00:00.314,697] <inf> bt_mgmt: Local identity addr: F0:D2:8E:F5:33:C2 (random)
    HL [00:00:00.319,122] <inf> bt_mgmt_adv: Local addr: 4A:4A:60:EC:FA:38 (random)
    HL [00:00:00.319,671] <inf> bt_mgmt_adv: Advertising successfully started
    HL [00:00:00.544,799] <inf> bt_mgmt: Connected: 5D:F5:9F:2E:A1:2A (random)
    HL [00:00:00.544,830] <inf> main: Connected
    HL [00:00:01.312,683] <inf> main: Security changed
    HL [00:00:03.952,850] <inf> bt_content_ctrl_media: Discovery of MCS finished
    HL [00:00:06.432,891] <inf> unicast_server: LC3 codec config for sink:
    HL [00:00:06.432,922] <inf> unicast_server:     Frequency: 24000 Hz
    HL [00:00:06.432,922] <inf> unicast_server:     Duration: 10000 us
    HL [00:00:06.432,922] <inf> unicast_server:     Channel allocation: 0x1
    HL [00:00:06.432,922] <inf> unicast_server:     Octets per frame: 60 (48000 bps)
    HL [00:00:06.432,922] <inf> unicast_server:     Frames per SDU: 1
    HL [00:00:06.434,326] <inf> unicast_server: LC3 codec config for source:
    HL [00:00:06.434,326] <inf> unicast_server:     Frequency: 24000 Hz
    HL [00:00:06.434,326] <inf> unicast_server:     Duration: 10000 us
    HL [00:00:06.434,356] <inf> unicast_server:     Channel allocation: 0x1
    HL [00:00:06.434,356] <inf> unicast_server:     Octets per frame: 60 (48000 bps)
    HL [00:00:06.434,356] <inf> unicast_server:     Frames per SDU: 1
    HL [00:00:06.553,558] <inf> main: Presentation delay 10000 us is set by initiator
    HL [00:00:06.553,588] <inf> main: Presentation delay 10000 us is set by initiator
    HL [00:00:06.919,097] <inf> unicast_server: Stream 0x2000f6a0 started
    HL [00:00:06.924,041] <err> sw_codec_lc3: LC3 dec ch: 1 already initialized
    HL [00:00:06.924,072] <err> audio_system: Failed to set up codec
    HL [00:00:06.924,072] <err> audio_system: ERR_CHK Err_code: [-120] @ line: 399
    HL [00:00:06.924,072] <err> os: r0/a1:  0x00000003  r1/a2:  0x00000006  r2/a3:  0x00000005
    HL [00:00:06.924,072] <err> os: r3/a4:  0x00059009 r12/ip:  0x20002d48 r14/lr:  0x00059093
    HL [00:00:06.924,102] <err> os:  xpsr:  0x41100000
    HL [00:00:06.924,102] <err> os: s[ 0]:  0x20001440  s[ 1]:  0x0005922d  s[ 2]:  0xffffff88  s[ 3]:  0x00000004
    HL [00:00:06.924,102] <err> os: s[ 4]:  0x20012250  s[ 5]:  0x20012230  s[ 6]:  0xffffff88  s[ 7]:  0x20012230
    HL [00:00:06.924,133] <err> os: s[ 8]:  0x20012250  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00059279
    HL [00:00:06.924,133] <err> os: s[12]:  0x20004540  s[13]:  0x000699f0  s[14]:  0xffffff88  s[15]:  0x0000018f
    HL [00:00:06.924,133] <err> os: fpscr:  0x00000000
    HL [00:00:06.924,133] <err> os: Faulting instruction address (r15/pc): 0x00004536
    HL [00:00:06.924,163] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
    HL [00:00:06.924,194] <err> os: Current thread: 0x20001cf8 (LE_AUDIO_MSG_SUB)
    HL [00:00:06.924,194] <err> error_handler: Caught system error -- reason 3. Entering infinite loop
    

    (Right)

    *** Booting nRF Connect SDK v3.5.99-ncs1-2 ***
    HR [00:00:00.269,622] <inf> board_version: Compatible board/HW version found: 1.0.0
    HR [00:00:00.295,318] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.2                            
             Cmake run : Wed Dec 11 14:29:37 2024
    HR [00:00:00.295,318] <inf> fw_info: ------- DEBUG BUILD -------
    HR [00:00:00.295,318] <inf> fw_info: HEADSET right device
    HR [00:00:00.314,270] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    HR [00:00:00.314,483] <inf> bt_mgmt: Local identity addr: F0:CB:62:43:5B:62 (random)
    HR [00:00:00.318,908] <inf> bt_mgmt_adv: Local addr: 78:FC:74:C4:67:5D (random)
    HR [00:00:00.319,427] <inf> bt_mgmt_adv: Advertising successfully started
    HR [00:00:00.433,471] <inf> bt_mgmt: Connected: 5D:F5:9F:2E:A1:2A (random)
    HR [00:00:00.433,502] <inf> main: Connected
    HR [00:00:01.195,648] <inf> main: Security changed
    HR [00:00:03.475,921] <inf> bt_content_ctrl_media: Discovery of MCS finished
    HR [00:00:05.515,960] <inf> unicast_server: LC3 codec config for sink:
    HR [00:00:05.515,991] <inf> unicast_server:     Frequency: 24000 Hz
    HR [00:00:05.515,991] <inf> unicast_server:     Duration: 10000 us
    HR [00:00:05.515,991] <inf> unicast_server:     Channel allocation: 0x1
    HR [00:00:05.515,991] <inf> unicast_server:     Octets per frame: 60 (48000 bps)
    HR [00:00:05.515,991] <inf> unicast_server:     Frames per SDU: 1
    HR [00:00:05.517,395] <inf> unicast_server: LC3 codec config for source:
    HR [00:00:05.517,395] <inf> unicast_server:     Frequency: 24000 Hz
    HR [00:00:05.517,395] <inf> unicast_server:     Duration: 10000 us
    HR [00:00:05.517,425] <inf> unicast_server:     Channel allocation: 0x2
    HR [00:00:05.517,425] <inf> unicast_server:     Octets per frame: 60 (48000 bps)
    HR [00:00:05.517,425] <inf> unicast_server:     Frames per SDU: 1
    HR [00:00:05.596,618] <inf> main: Presentation delay 10000 us is set by initiator
    HR [00:00:05.596,649] <inf> main: Presentation delay 10000 us is set by initiator
    HR [00:00:05.918,731] <inf> unicast_server: Stream 0x2000f6a0 started
    HR [00:00:05.923,645] <err> sw_codec_lc3: LC3 dec ch: 1 already initialized
    HR [00:00:05.923,675] <err> audio_system: Failed to set up codec
    HR [00:00:05.923,675] <err> audio_system: ERR_CHK Err_code: [-120] @ line: 399
    HR [00:00:05.923,675] <err> os: r0/a1:  0x00000003  r1/a2:  0x00000004  r2/a3:  0x00000003
    HR [00:00:05.923,706] <err> os: r3/a4:  0x00059009 r12/ip:  0x20002d48 r14/lr:  0x00059093
    HR [00:00:05.923,706] <err> os:  xpsr:  0x41100000
    HR [00:00:05.923,706] <err> os: s[ 0]:  0x20001440  s[ 1]:  0x0005922d  s[ 2]:  0xffffff88  s[ 3]:  0x00000004
    HR [00:00:05.923,706] <err> os: s[ 4]:  0x20012250  s[ 5]:  0x20012230  s[ 6]:  0xffffff88  s[ 7]:  0x20012230
    HR [00:00:05.923,736] <err> os: s[ 8]:  0x20012250  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00059279
    HR [00:00:05.923,736] <err> os: s[12]:  0x20004540  s[13]:  0x000699f0  s[14]:  0xffffff88  s[15]:  0x0000018f
    HR [00:00:05.923,736] <err> os: fpscr:  0x00000000
    HR [00:00:05.923,767] <err> os: Faulting instruction address (r15/pc): 0x00004536
    HR [00:00:05.923,767] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
    HR [00:00:05.923,797] <err> os: Current thread: 0x20001cf8 (LE_AUDIO_MSG_SUB)
    HR [00:00:05.923,797] <err> error_handler: Caught system error -- reason 3. Entering infinite loop


    The line 399 in audio_system is:

    	ret = sw_codec_init(sw_codec_cfg);
    	ERR_CHK_MSG(ret, "Failed to set up codec");

    I have tried several methods to change the number of data channels to 2, but none of them have worked. Could you please assist me with this issue?

    I would like to mention that with the current working SDK I am using, both headsets are connected and synchronized, but there is no sound coming from the right headset. the log file of the right headset with out  enabling CONFIG_STREAM_BIDIRECTIONAL=y, when the left one output sound:
    .

    *** Booting nRF Connect SDK v3.5.99-ncs1-2 ***
    HR [00:00:00.270,568] <inf> board_version: Compatible board/HW version found: 1.0.0
    HR [00:00:00.296,081] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.2                            
             Cmake run : Wed Dec 11 10:07:20 2024
    HR [00:00:00.296,081] <inf> fw_info: ------- DEBUG BUILD -------
    HR [00:00:00.296,112] <inf> fw_info: HEADSET right device
    HR [00:00:00.315,826] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    HR [00:00:00.316,009] <inf> bt_mgmt: Local identity addr: F0:D2:8E:F5:33:C2 (random)
    HR [00:00:00.321,197] <inf> bt_mgmt_adv: Local addr: 59:BE:31:34:72:20 (random)
    HR [00:00:00.321,289] <inf> bt_mgmt_adv: Adv directed to: D3:C8:9D:D1:BE:66 (random).
    HR [00:00:00.321,899] <inf> bt_mgmt_adv: Advertising successfully started
    HR [00:00:00.845,428] <inf> bt_mgmt: Connected: D3:C8:9D:D1:BE:66 (random)
    HR [00:00:00.845,458] <inf> main: Connected
    HR [00:00:00.845,855] <inf> bt_mgmt_adv: RPA (Resolvable Private Address) expired.
    HR [00:00:00.845,916] <inf> bt_mgmt_adv: Local addr: 59:BE:31:34:72:20 (random)
    HR [00:00:01.414,123] <inf> main: Security changed
    HR [00:00:01.414,367] <wrn> bt_gatt: Device is not subscribed to characteristic
    HR [00:00:01.414,367] <wrn> bt_pacs: PACS notify failed: -22
    HR [00:00:07.973,968] <inf> bt_content_ctrl_media: Discovery of MCS finished
    HR [00:00:08.774,108] <inf> unicast_server: LC3 codec config for sink:
    HR [00:00:08.774,108] <inf> unicast_server:     Frequency: 48000 Hz
    HR [00:00:08.774,108] <inf> unicast_server:     Duration: 10000 us
    HR [00:00:08.774,139] <inf> unicast_server:     Channel allocation: 0x2
    HR [00:00:08.774,139] <inf> unicast_server:     Octets per frame: 120 (96000 bps)
    HR [00:00:08.774,139] <inf> unicast_server:     Frames per SDU: 1
    HR [00:00:09.014,648] <inf> main: Presentation delay 10000 us is set by initiator
    HR [00:00:09.576,477] <inf> unicast_server: Stream 0x2000f698 started
    DAC L gain 112   
    DAC R gain 112   
    HR [00:00:09.587,707] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HR [00:00:09.599,639] <wrn> audio_datapath: Data received, total under-runs: 5
    HR [00:00:09.666,656] <inf> audio_datapath: Drft comp state: CALIB
    HR [00:00:09.766,662] <inf> audio_datapath: Drft comp state: OFFSET
    HR [00:00:09.966,674] <inf> audio_datapath: Drft comp state: LOCKED
    HR [00:00:09.966,827] <inf> audio_datapath: Pres comp state: MEAS
    HR [00:00:10.076,812] <inf> audio_datapath: Pres comp state: WAIT
    HR [00:00:10.216,796] <inf> audio_datapath: Pres comp state: INIT
    HR [00:00:10.226,806] <inf> audio_datapath: Pres comp state: MEAS
    HR [00:00:10.336,791] <inf> audio_datapath: Pres comp state: LOCKED

    For any further information, I am ready to assist or provide details as needed.

    Thanks in advance.

    Best regards 

    Abdulmohaimen 



Children
Related