The nrf5340 audio application's TX function of Gateway

Hello

I have implemented the stereo function to the nrf5340 audio application on SDK V2.6.0. i can send stereo audio signal to both of the two headset at the same time or one of them.

But i also have some questions and problems want to figure out.

I found that when i enable the "CONFIG_STREAM_BIDIRECTIONAL", both "frequency" of the "Lc3 codec config for sink" and "Lc3 codec config for source" will be set to 24K, "Octets per frame" will be set to 48000, but if i disable the "CONFIG_STREAM_BIDIRECTIONAL", there is only left "Lc3 codec config for sink", and the frequency will be set to 48K, and the "Octets per frame" will be set to 96000. When the frequency is 24K, the stereo signal data size is 120, when the frequency is 48K, the stereo signal data size is 240.

I guess that resources are automatically allocated here, and after enabling "CONFIG_STREAM_BIDIRECTIONAL" function, it will cause half resources to be used to receive headset signals. Is my guess correct?

But when i want to implement the function that headset can send stereo audio signal to gateway, although it works, because i have to enable the "CONFIG_STREAM_BIDIRECTIONAL", which cause the frequency of lc3 codec config can only up to 24K, that means i can not receive the normal audio signal on the gateway, because the frequency what i want at least up to 48K. Because i want to transmit the music signal not only the mic signal. I have tried to force it to 48K, but the data size still only allocated 120 instead of the 240 I needed.

So i try to disable the TX function of gateway, because i guess maybe if i can only enable the RX function of gateway, the all resources can allocated to it, and I have put in a lot of effort, but there still some problems.

So do you have some official ways to disable the TX function of Gateway?

And i have to say this is our product's user scenarios, so i have to do this work.

Thank you very much and looking forward to your reply!

Parents
  • Hi, 

    Would you like to disable the stream from gateway to headset, or headset to gateway?

    Regards,
    Amanada H.

  • Hello Amanda

    Yes, i want to disable the stream from the gateway to the headset but I want to keep stream from the headset to the gateway.

    In reality, I'm guessing that when I can only keep the stream from the headset to the gateway, the system will automatically allocate all resources to this path, just like when "CONF_STREAM_SIDIELECTION" is not enabled, all resources will be allocated to the stream from the gateway to the headset.

    I'm not sure if my guess is correct. I'm not sure if my guess is correct, but it's worth giving it a try.

    Thank you very much and looking forward to your reply!

  • Hello Amanda,

    I have tried following your instructions.

    I also enable the "CONFIG_BT_AUDIO_PREF_SAMPLE_RATE_48KHZ=y"

    Then the headset device will print:

    I found that the size is still 120 and not 240:

    So, how can i increase the size to 240? I think may be i also need to modify the headset code.

    Thank you very much and looking forward to your reply!

  • Hi, 

    The solution is based on v2.7.0 to disable the TX on the gateway and only keep the streams from the headset to the gateway.

    In the default setting, the headset will only send one stream (the left channel) to the gateway.

    Would you want to send a stereo audio stream from each headset to the gateway?

    -Amanda H.

  • Hello Amanda,

    Thank you very  much!

    Yes, i want to send a stereo audio stream from headset to the gateway, at least one headset, two is better. And the important thing is i want the LC3 codec use 48K sampling rate.

    And by the way, in the past, i have tried V2.7.0, seems the nrf5340 audio application has something wrong? Because when i burned the default CIS headset project, it will crash, as follow:

    I have noticed that:

    Does that means i can not use vscode to build the project?

    So i still use the V2.6.0.

    Thank you very much and looking forward to your reply!

  • Hi, 

    huma said:
    in the past, i have tried V2.7.0, seems the nrf5340 audio application has something wrong? Because when i burned the default CIS headset project, it will crash, as follow:

    What is the command you use to build the audio application? Could you provide the instruction to help us reproduce?

    I use "west build -b nrf5340_audio_dk_nrf5340_cpuapp -p -d headset -- -DCONFIG_AUDIO_DEV=1" to build and get

    huma said:

    Does that means i can not use vscode to build the project?

    So i still use the V2.6.0.

    No, Building and programming using the nRF Connect for VS Code extension is currently not supported as the note indicated even on NCS v2.6.0.

    -Amanda H.

  • Hello Amanda,

    Sorry, i found i used the wrong command to build the project.

    Now, i am using the v2.7.0. Thank you very much!

    But there is still the problem:

    It printed by the headset. And i have checked that the gateway is correctly configured.

    I think the headset also need disable the RX function, because i found that there is always allocate the resource for the RX function in the headset. 

    And if i modify the ".codec_cap = &lc3_codec_sink,"  to ".codec_cap = NULL,",  or modify the "

    CONFIG_BT_ASCS_ASE_SNK_COUNT=0" to disbale the RX function of headset, it will be crashed:

    So how can i only allocate resource for the TX function in the headset?

    Thank you very much and looking forward to your reply!

Reply
  • Hello Amanda,

    Sorry, i found i used the wrong command to build the project.

    Now, i am using the v2.7.0. Thank you very much!

    But there is still the problem:

    It printed by the headset. And i have checked that the gateway is correctly configured.

    I think the headset also need disable the RX function, because i found that there is always allocate the resource for the RX function in the headset. 

    And if i modify the ".codec_cap = &lc3_codec_sink,"  to ".codec_cap = NULL,",  or modify the "

    CONFIG_BT_ASCS_ASE_SNK_COUNT=0" to disbale the RX function of headset, it will be crashed:

    So how can i only allocate resource for the TX function in the headset?

    Thank you very much and looking forward to your reply!

Children
No Data
Related