when i receive stereo audio signal on the nrf5340 audio DK, it has many limitations

In my last ticket, I consulted on how to use nrf5340 audio dk to achieve stereo audio transmission (from gateway to one headset), and I received the answer.

(+) How can i receive stereo audio signal on the nrf5340 audio DK configured for headset - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)

However, during my debugging process on the CIS code, what ever the answer code or my own code. I found that implementing this feature would have significant limitations, such as the gateway being able to only connect to one headset at same time. I have changed the BT_MAX_CONN to 2, also the BT_BAP_UNICAST_CLIENT_GROUP_STREAM_COUNT and BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT, but it still some err logged out. Then i remembered that the sdu size is doubled, so i enable the CONFIG_BT_BAP_UNICAST_24_2_1 to reduce the sdu size,  and the gateway finally can connected two headset.

But the audio sampling rate will decrease to 24KHz as a result, which cannot meet my requirements. 

What I need is that in CIS mode, the Gateway can connect two Headsets with an audio sampling rate of at least 48KHz, and not only can it receive external input audio data from the Gateway, but it can also input audio data from one Headset and transmit it to another Headset through the Gateway(realy function). If it woke as mono mode(gateway only send mono audio data to corresponding Headset), I have already implemented it on a standard sample, But it too hard for me when i want to send the stereo audio data to every Headset.

So i want to ask for help, what is the true problem and how can i resolv it.

Parents
  • Hello,

    I will discuss this with our LE Audio engineers and get back to you when I know more. Thank you for your patience.

    Best regards,

    Maria

  • Hello, Maria.

    Thank you very much. I will wait for you.

  • Hello,

    I am not completely sure that I have the correct understanding of your wanted topology, so please correct me if I have made any wrong assumptions. If you need further support after my reply: Please share a simple diagram of your wanted system. It will make it a bit easier to visualize what you need.

    From your linked ticket I can see that you are aware of the work you need to do to make stereo audio work, so I will not address this here.

    You can set up the Gateway and Headsets to be bidirectional with CONFIG_STREAM_BIDIRECTIONAL=y. This will allow the device to encode and decode audio. The decoding may not be needed on the Gateway, depending on how you organize the input audio streams on the Gateway. Note that if you need to mix the streams, the relay functionality will be more involved to implement. If you just wish to forward the already encoded stream to the other headset, you only need to implement a reroute on the Gateway for the stream from the first Headset to the second Headset.

    What I need is that in CIS mode, the Gateway can connect two Headsets with an audio sampling rate of at least 48KHz

    Using CONFIG_BT_BAP_UNICAST_CONFIGURABLE=y will allow you to set up other combinations of sampling frequency/bit rates/retransmissions. See the BAP Specification available here, and see the possible combination in table 5.2. An important note is that we only support 10ms frame duration now.

    Best regards,

    Maria

Reply
  • Hello,

    I am not completely sure that I have the correct understanding of your wanted topology, so please correct me if I have made any wrong assumptions. If you need further support after my reply: Please share a simple diagram of your wanted system. It will make it a bit easier to visualize what you need.

    From your linked ticket I can see that you are aware of the work you need to do to make stereo audio work, so I will not address this here.

    You can set up the Gateway and Headsets to be bidirectional with CONFIG_STREAM_BIDIRECTIONAL=y. This will allow the device to encode and decode audio. The decoding may not be needed on the Gateway, depending on how you organize the input audio streams on the Gateway. Note that if you need to mix the streams, the relay functionality will be more involved to implement. If you just wish to forward the already encoded stream to the other headset, you only need to implement a reroute on the Gateway for the stream from the first Headset to the second Headset.

    What I need is that in CIS mode, the Gateway can connect two Headsets with an audio sampling rate of at least 48KHz

    Using CONFIG_BT_BAP_UNICAST_CONFIGURABLE=y will allow you to set up other combinations of sampling frequency/bit rates/retransmissions. See the BAP Specification available here, and see the possible combination in table 5.2. An important note is that we only support 10ms frame duration now.

    Best regards,

    Maria

Children
  • Hello,Maria

    Sorry,my description may be a bit confusing. The function I want to implement is to send the stereo audio signal received by one headset (I can try to input an external signal from one headset's codec) through the gateway to another headset. However, once the 48K sampling rate is maintained, the gateway cannot connect two headsets at the same time, even if I use BT_ MAX_ CONN is set to 2, and when connecting to any headset, it will log out “disconnect Reason 13”, I found that the error code that 13 means CONNECTION REJUCTED DUE TO LIMITED  RESOURCES, that why i tried to reduce the audio sample rate to 24K.


    So I don't know what can i do now. I think although I need to connect the gateway to two Headsets, I can temporarily only send audio data to one Headset and the other Headset is only used to receive audio data.But it seems that the current default setting is that once a connection is established, it will occupy resources, and I don't know where to modify these. I hope you can give me some advice, thank you.

  • Hello,

    I would like to reproduce this. Are you able to share the code? I can make the ticket private if needed.

    Best regards,

    Maria

  • Hello,Maria

    Sorry for the late reply. you can check the code from github.com/.../cis_stereo_headset_v240 , the cis_stereo_headset_v240 branch. I already enable the CONFIG_BT_BAP_UNICAST_24_2_1 and CONFIG_AUDIO_SOURCE_I2S, you can change it by yourself to test it, thank you very much.


    If my gateway only connects to one headset, it can transmit stereo signals with 48K sampling rate. I think the problem is that when I try to connect to the second headset, the code will automatically allocate relevant resources, and the required resources will be doubled. But according to my needs, the second headset does not need to receive audio signals from the gateway, but instead transmits the audio signals it receives to the gateway and gateway can relay them to the first headset. Therefore, I am trying to find and modify this part of the code to see if it can save resources and use a 48K sampling rate.If you have any suggestions, please also provide them. Thank you.

  • Hello,

    Sorry about the delay. I will test this as soon as I can.

    BR,

    Maria

  • Hello, Maria

    Thank you very much for your help!

    I will waiting for you.

Related