emUSB-Device Audio
emUSB-Device Audio allows easy transmission of digital audio data via the standardized USB interface by means of plug-and-play on any operating system, without any drivers needed.
Overview
Using emUSB-Device Audio, an embedded device can be transformed into an audio recorder or an audio speaker. An audio jack and dedicated audio hardware is not necessarily available on every design. emUSB-Device Audio allows the device to handle audio data irrespective of the available hardware, for example audio data played from a PC (Linux/Windows/Mac) can be saved directly onto an SD card.
Key features
- Compatible to USB Audio version 1 and version 2 device class
- Record audio from the host
- Send audio to the host
- Arbitrary number of input and output audio streams
- Arbitrary number of channels for each audio stream
- Sample resolution from 8- to 32-bit
- Arbitrary number of audio control units
- Synchronous, asynchronous, adaptive and implicit synchronization for each audio stream
- Audio interrupt messages
- Multi-platform, no drivers needed on Linux, macOS or Windows
- High performance
- Small footprint
Technical details
SEGGER’s implementation of the Audio class is designed with minimal resource usage in mind, especially targeted to embedded devices. The implementation supports the usage of one or more audio input streams (e.g. to implement a speaker), and one or more audio output streams (e.g. to implement a microphone). All audio streams can be used independently of each other; all may be enabled at the same time allowing audio transfer in either direction.
The Audio class supports all synchronization methods, including methods using feedback endpoints. Audio controls like feature units (volume, mute, etc.), mixer units, and selector units can be configured. emUSB-Device Audio does not provide drivers/codecs for any audio peripherals. Writing a driver to interface with the audio hardware is the customer's responsibility.
Example project
Download the emUSB-Device Audio demo for the emPower board:
- Program the emPower with the default application using Embedded Studio
- Connect the HS USB connector to your PC
- Select the emUSB-Device Audio demo as your default sound output and sound input device
- Play audio which will be saved onto the SD card
- Loopback the emUSB-Device Audio microphone to your speakers to listen to the audio demo
Use cases
The audio class is the foundation for any embedded device handling audio data. Whether it has a microphone or speaker, or whether it simply functions as an audio editor.
Typical applications range from speaker phones, conferencing systems, or headsets, to music instruments, voice recorders, music players, or sports wearables.
Media gallery
Videos
May 2018 | 4:06 min
emUSB-Device Audio — Intro
May 2022 | 6:13 min
emUSB-Device — Getting started
Requirements
Components
Using the Audio class requires the following components:
- emUSB-Device Audio
- emUSB-Device core
- emUSB-Device target driver
- Real-time operating system (embOS or other)