Rev. 0.1 6/06 Copyright © 2006 by Silicon Laboratories AN295
AN295
USB AUDIO CLASS TUTORIAL
1. Introduction
Isochronous data transfers can be used by universal serial bus (USB) devices designed to transfer data to or from
a host at a constant rate. Systems streaming audio employ isochronous transfers to transmit audio signals in real-
time. Silicon Laboratories microcontrollers’ robust USB peripheral supports isochronous transfers, and each
family’s assortment of additional high quality peripherals make them excellent single-chip solutions for USB-based
embedded system designs.
This document contains the following:
A USB protocol overview concentrating on isochronous transfers
A Firmware Template that provides a starting point for custom USB Audio Class device firmware
An example system illustrating requirements and operation of USB Audio Class devices
1.1. Overview
The first section of this application note discusses the key points of the USB specification that must be followed by
all USB devices, as well as isochronous transfer protocol requirements. The second section introduces the
Firmware Template for USB Audio Class devices. The last section discusses an example USB Audio Class device.
The example shows an Audio Class device that streams a sine wave to the host.
2. USB, Isochronous Transfers, and the Audio Class
The USB communications protocol outlines specifications for a reliable and fast system of data transfer between a
peripheral and a host such as a PC. The protocol defines four different data transfer types (bulk, interrupt, control,
and isochronous), each with unique characteristics and uses. USB device classes employ transfer types that suit
the needs of particular applications and systems. The USB Audio class uses the isochronous transfer type to
stream audio across a USB link.
2.1. USB Operational Overview
When a USB device connects to a USB port, the host controlling the port retrieves information about the
capabilities of a device through control transfers during a process called enumeration. Devices format this
information into descriptors. USB Specification documents define the structure of descriptors.
USB devices send and receive data through endpoints. All USB devices must have one control endpoint through
which all enumeration data travels. Descriptors read during enumeration describe the device’s other endpoints,
their data flow direction, maximum packet size, transfer type, and other characteristics used after enumeration
successfully completes.
After examining the device’s descriptors, the host determines how to communicate with the device. If the host can
allocate resources (data bandwidth, power) requested by the device, then enumeration completes successfully and
the host begins operations communication with the device. During operations communications, transfer methods
such as those using isochronous endpoint transfers take place.
2.2. Isochronous Transfer Characteristics
The host guarantees bandwidth to isochronous endpoints. This bandwidth guarantee is a feature unique to
isochronous endpoints. The amount of bandwidth allocated to a particular isochronous endpoint is determined by
information requested by that endpoint’s descriptor. Data transfers take place inside USB data frames. For Full
Speed USB devices such as the Silicon Laboratories C8051F32x, a data frame spans 1 millisecond. A device can
be configured to transmit as few as 1 byte per frame or as many as 1023 bytes per frame.