SAM3S8/SD8 Software Package: USB Audio Speaker Example

SAM3S8/SD8 Software Package 1.2

# USB Audio Speaker Example

## Purpose

The USB Audio Speaker Example will help you to get familiar with the USB Device Port(UDP) and DACC on SAM microcontrollers. Also it can help you to be familiar with the USB Framework that is used for rapid development of USB-compliant class drivers such as USB Audio Device class.

## Related

- dacc: DACC interface driver
- usb: USB Framework, Audio Device Class driver and UDP interface driver
  - AT91 USB device framework
    - USBD API
  - USB Device Desktop Speaker Driver

You can find following information depends on your needs:

- Sample usage of USB Audio Device Class driver and DACC driver.
- USB Audio Class driver development based on the USB Framework.
- USB enumerate sequence, the standard and class-specific descriptors and requests handling.
- The initialize sequence and usage of UDP interface.
- The initialize sequence and usage of DACC interface with PDC.

## Requirements

This package can be used with SAM3S evaluation kits that have both UDP and DACC.

## Description

The demo simulates an USB Desktop Speaker.

When an EK running this program connected to a host (PC for example), with USB cable, the EK appears as a "Desktop speaker" for the host. Then the host can play sound through host software. The audio stream from the host is then sent to the EK, and eventually sent to audio DAC connected to the amplifier.

## Usage

1. Build the program and download it inside the evaluation board. Please refer to the SAM-BA User Guide, the GNU-Based Software Development application note or to the IAR EWARM User and reference guides, depending on your chosen solution.
2. On the computer, open and configure a terminal application (e.g. HyperTerminal on Microsoft Windows) with these settings:
   - 115200 bauds
   - 8 bits of data
   - No parity
   - 1 stop bit
   - No flow control
3. Start the application.
4. In the terminal window, the following text should appear:

         -- USB Device Audio Speaker Example xxx --
         -- xxxxxx-xx
         -- Compiled: xxx xx xxxx xx:xx:xx --

5. When connecting USB cable to windows, the LED blinks, and the host reports a new USB device attachment (if it's the first time you connect an audio speaker demo board to your host). You can find new "USB Composite Device" and "USB Audio Device" appear in the hardware device list.
6. You can play sound in host side through the USB Audio Device (Desktop speaker), and it can be heard from the earphone connected to the EK.

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines