Seeking advice on stereo audio transmission from a single headset device

I’m working with the Audio Application (from the Nordic sample program) on an nRF5340 Audio DK as a gateway, and a custom board with an nRF5340 as a headset. The custom headset board has two audio channels, and my goal is to transmit the stereo audio from the single headset to the gateway in the bidirectional mode.

I’ve made modifications to the Audio Application to enable the gateway device to decode two audio channels and the headset device to encode two channels. However, I'm currently facing an issue with the following error message on the headset device: “<err> bt_le_audio_tx: The encoded data size does not match the SDU size”.

My question is: Is it possible to achieve this stereo audio transmission setup by only configuring Kconfig and making minor changes to the code, or do I need to make more substantial modifications?

Any insights or suggestions would be greatly appreciated!

Thanks in advance!

NCS version: 2.6.1

  • Hi Dejan, thank you for the quick update.

    I’m not quite sure how to apply the modification to my code, as the base code differs from what you’ve provided.

    I got the Audio Application project through the VS Code extension, nRF Connect. Specifically, I selected “Create a new application” > “Copy a sample” > “nRF5340 Audio application”. The toolchains and west workspace are v2.6.1.

    Most of the lines of the code referenced in the commit do not exist in my codebase..

    I also tried downloading the whole sdk-nrf/applications/nrf5340_audio directory in the cis_stereo_audio_sink_pre280 branch and compiling it, but ran into Kconfig warnings that prevented the build from succeeding.

    Is the version I’m using no longer actively supported, or could you provide advice based on the code in that version?

  • Hi,

    similingus said:
    I’m not quite sure how to apply the modification to my code, as the base code differs from what you’ve provided.

    Can you try to upgrade to the latest code base?

    We will look into this issue, but it might take some time. I will get back to you hopefully by the end of this week.

    Best regards,
    Dejan

  • I also tried downloading the whole sdk-nrf/applications/nrf5340_audio directory in the cis_stereo_audio_sink_pre280 branch and compiling it, but ran into Kconfig warnings that prevented the build from succeeding.

    I've tried the entire project in the branch you provided. Do I need to upgrade my SDK version? Also, how can I get the latest codebase?

  • Hi,

    You could upgrade to the NCS version 2.8.0 but please ignore the changes in previously provided link. As mentioned previously, we are looking into this issue, but we need some time. I will get back to you with the status update by the end of this week.

    Best regards,
    Dejan

  • Hi,

    I am sorry for a delayed reply. We have made some progress on this.
    You can look at this branch but please note that this is demo branch, and code is provided without any warranty or guarantee that it is working. Currently, there are no restrictions for the gateway to connect to only one headset which could cause unexpected behavior if 2 headsets want to connect to the gateway. This branch only shows that feature is achievable, but you would need to check whether BAP connection procedure is working properly or not. The gateway configures headset in unidirectional (sends mic return from headset to gateway, not stream from gateway to headset) and MIC return is combined L and R in the same packet.
    There is also an update to this discussion which is covered by this branch. The disclaimer here is the same as mentioned previously - you can evaluate the code provided as-is but there is no warranty or guarantee for it to be working. Here, mechanism is needed on CIS gateway for restricting scanning and connecting to more than one headset.

    Best regards,
    Dejan


Related