README.rst
1.. zephyr:code-sample:: usb-audio-headphones-microphone
2 :name: USB Audio microphone & headphones
3 :relevant-api: _usb_device_core_api
4
5 Implement a USB Audio microphone + headphones device with audio IN/OUT loopback.
6
7Overview
8********
9
10This sample app demonstrates use of a USB Audio driver by the Zephyr
11project. This very simple sample that performs loopback over IN/OUT
12ISO endpoints. The device will show up as two audio devices. One
13Input (Microphone) and one Output (Headphones) device.
14
15Building and Running
16********************
17
18In order to build the sample an overlay file with required options
19must be provided. By default app.overlay is added. An overlay contains
20software and hardware specific information which allow to fully
21describe the device.
22
23After you have built and flashed the sample app image to your board, plug the
24board into a host device.
25
26Testing
27*******
28
29Steps to test the sample:
30
31- Build and flash the sample as described above.
32- Connect to the HOST.
33- Chose default Audio IN/OUT.
34- Start streaming audio (for example by playing an audio file on the HOST).
35- Start recording audio stream (for example using Audacity).
36- Verify the recorded audio stream.
37
38This sample can be found under
39:zephyr_file:`samples/subsys/usb/audio/headphones_microphone` in the Zephyr project tree.
40