nrf5340_audio example sample rate issue with bidirectional streaming

SDK version: 3.2.4

I am using two nRF5340 Audio DK boards configured as gateway and left headset.

I added "CONFIG_STREAM_BIDIRECTIONAL=y" to prj.conf and I built everything with: "python tools/buildprog/buildprog.py -c both -b debug -d both -t unicast -p --pristine".

When just recording from "Headset Microphone (nRF5340 USB Audio)" everything is fine.

When just playing back something to "Headset Earphone (nRF5340 USB Audio)" that also works.

But when playing and recording at the same time, the audio output is choppy and playing at half the speed. There seems to be some sample rate mismatch.

To reproduce with Audacity: Load some audio data, check Preferences->Recording->"Record on a new track", make sure the right playback and recording devices are selected and hit the record button. Audacity should now play and record as an additional track at the same time. Listen to the headphone output on the headset device.

I saw an old issue posted here stating that bidirectional audio was not possible, but as this option is now available, I assume it should work by now?

I let CoPilot (GPT-5.3-Codex) analyze the issue and got a lengthy Root Cause Analysis that I can share if you want. As I am not familiar with your audio framework, I cannot judge its accuracy.

I have read your AI generated response claiming that it is a resource issue, but I think it is not the full picture. Well, indeed, hard to tell.

Actually, I wanted to test a certain scenario to evaluate Bluetooth LE Audio synchronization where I output audio data from USB directly at the gateway and record microphone data coming from the headset via BLE audio. That would only involve one path via BLE Audio. Would such a setup work?

Kind regards,

Guido

Related