1.. zephyr:code-sample:: uac2-implicit-feedback 2 :name: USB Audio asynchronous implicit feedback sample 3 :relevant-api: usbd_api uac2_device i2s_interface 4 5 USB Audio 2 implicit feedback sample playing stereo and recording mono audio 6 on I2S interface. 7 8Overview 9******** 10 11This sample demonstrates how to implement USB asynchronous bidirectional audio 12with implicit feedback. The host adjusts number of stereo samples sent for 13headphones playback based on the number of mono microphone samples received. 14 15Requirements 16************ 17 18Target must be able to measure I2S block start (i.e. first sample from output 19buffer gets out) relative to USB SOF. The relative offset must be reported with 20single sample accuracy. 21 22This sample has been tested on :ref:`nrf5340dk_nrf5340`. While for actual audio 23experience it is necessary to connect external I2S ADC and I2S DAC, simple echo 24can be accomplished by shorting I2S data output with I2S data input. 25 26Theoretically it should be possible to obtain the timing information based on 27I2S and USB interrupts, but currently neither subsystem currently provides 28necessary timestamp information. 29 30Building and Running 31******************** 32 33The code can be found in :zephyr_file:`samples/subsys/usb/uac2_implicit_feedback`. 34 35To build and flash the application: 36 37.. zephyr-app-commands:: 38 :zephyr-app: samples/subsys/usb/uac2_implicit_feedback 39 :board: nrf5340dk/nrf5340/cpuapp 40 :goals: build flash 41 :compact: 42