nRF5340 Audio DKs losing sync in external I2S loopback

I am trying to send / receive bi-directional audio between two nRF5340 Audio DKs with an external I2S bus on the gateway DK.  I am modifying the nrf5340_audio example from SDK V2.6.0.

I have added CONFIG_STREAM_BIDIRECTIONAL=y and CONFIG_AUDIO_SOURCE_I2S=y to the gateway and headset apps.  I have also set gpio pin 21 in unicast_client main.c to enable external I2S in the gateway and tied I2S DIN and DOUT together on the gateway external I2S to loop back the audio.  I am sending audio from the headset DK to the gateway DK and looping it back to the headset DK using the external I2S bus on the gateway DK

Audio loops back fine until I try to disable the gateway DKs on-board hardware codec.  When I disable the hardware codec I get loud ticks in the loop-back audio at the headset DK.  I think the audio stream between the two DKs is losing sync.  Since I am not using the gateway on-board hardware codec, I am not sure why this should affect the synchronization of the audio streams.  How can I correct this?

Parents Reply Children
  • In addition, do you see any changes when when upgrading to NCS v2.7.0? We've done some improvements for the sync on unicast scenario.

    And to emphasize the logs, it would be great to get the application log so we can see what's happening.

    Could you verify if you set the nRF5340 as I2S master?

    The sync is mechanism is relying on

    • The I2S block completed callback which triggered every 10ms
    • The timestamp from controller

    So if the I2S is still working as expected, then there should be no issue on the sync mech. If I2S is not working as expected however..

    Kind regards,
    Andreas

     

  • Thank you very much for your assistance.

    Audio synchronization appears to work when running external I2S with debug code & logging.  It just doesn't quite sync when running external I2S with release mode code.

    I would like to try the nrf5340_audio example from SDK v2.7.0.  However buildprog.py in 2.7.0 fails to program the DK - error message is "NET core hex not found.  Built as APP core child image.  I suspect this has to do with sysbuild changes.  How do I build / program the DK with the new version of the nrf5340 Audio App?

Related