Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# sw_usb_audio: USB Audio reference designs

The XMOS USB Audio solution provides USB Audio Class compliant devices over USB 2.0 (high-speed or full-speed). Based on the XMOS xcore-200 (XS2) and xcore.ai (XS3) architectures, it supports USB Audio Class 2.0 and USB Audio Class 1.0, asynchronous mode (synchronous as an option) and sample rates up to 384kHz.

The complete source code, together with the free XMOS XTC development tools and xcore multi-core micro-controller devices, allow the developer to select the exact mix of interfaces and processing required.

The XMOS USB Audio solution is deployed as a framework (see lib_xua) with reference design applications extending and customising this framework. These reference designs have particular qualified feature sets and an accompanying reference hardware platform.

This software user guide assumes the reader is familiar with the XC language and xcore devices. For more information see XMOS Programming Guide.

The reader should also familiarise themselves with the XMOS USB device library (lib_xud) and the XMOS USB audio library (lib_xua)

Note

The reader should always refer to the supplied CHANGELOG and README files for known issues relating to a specific release

- Overview
- Hardware platforms
- Driver support
  - OS support for UAC 1.0
  - OS support for UAC 2.0
  - Third party Windows drivers
- Quick start
  - USB Audio reference software
  - USB Audio Class (UAC) 2.0 evaluation driver for Windows
  - XMOS XTC development tools
  - Building the firmware
  - Running the firmware
  - Writing the application binary to flash
  - Playing/recording audio
- Programming guide
  - Project structure
    - Build system
    - Applications and libraries
  - Build configurations
  - Configuration naming
  - Quality & testing
  - A typical USB Audio application
    - `lib_xua` configuration
    - User functions
    - The main program
  - Adding custom code
    - Example: Changing output format
    - Example: Adding DSP to the output stream
- USB Audio applications
  - The xcore.ai Multi-Channel Audio Board
    - Audio hardware
      - Clocking and clock selection
      - DAC and ADC
    - Configuring audio hardware
    - Validated build options
  - The xcore-200 Multi-Channel Audio Board
    - Audio hardware
      - Clocking and Clock Selection
      - DAC and ADC
    - Configuring audio hardware
    - Validated build options
- API
  - Configuration defines
    - Code location (tile)
      - `AUDIO_IO_TILE`
      - `XUD_TILE`
      - `MIDI_TILE`
      - `PLL_REF_TILE`
      - `SPDIF_TX_TILE`
    - Channel counts
      - `NUM_USB_CHAN_OUT`
      - `NUM_USB_CHAN_IN`
      - `I2S_CHANS_DAC`
      - `I2S_CHANS_ADC`
      - `DSD_CHANS_DAC`
    - Frequencies and clocks
      - `MAX_FREQ`
      - `MIN_FREQ`
      - `MCLK_441`
      - `MCLK_48`
    - Audio Class
      - `AUDIO_CLASS`
    - System feature configuration
      - MIDI
        - `MIDI`
        - `MIDI_RX_PORT_WIDTH`
      - S/PDIF
        - `XUA_SPDIF_TX_EN`
        - `SPDIF_TX_INDEX`
        - `XUA_SPDIF_RX_EN`
        - `SPDIF_RX_INDEX`
      - ADAT
        - `XUA_ADAT_TX_EN`
        - `ADAT_TX_INDEX`
        - `XUA_ADAT_RX_EN`
        - `ADAT_RX_INDEX`
      - PDM Microphones
        - `XUA_NUM_PDM_MICS`
      - DFU
        - `XUA_DFU_EN`
      - HID
        - `HID_CONTROLS`
      - CODEC Interface
        - `CODEC_MASTER`
    - USB device configuration
      - `VENDOR_STR`
      - `VENDOR_ID`
      - `PRODUCT_STR`
      - `PRODUCT_STR_A2`
      - `PRODUCT_STR_A1`
      - `PID_AUDIO_1`
      - `PID_AUDIO_2`
      - `BCD_DEVICE`
    - Volume control
      - `OUTPUT_VOLUME_CONTROL`
      - `INPUT_VOLUME_CONTROL`
    - Mixing parameters
      - `MIXER`
      - `MAX_MIX_COUNT`
      - `MIX_INPUTS`
    - Power
      - `XUA_POWERMODE`
      - `XUA_CHAN_BUFF_CTRL`
      - `XUA_LOW_POWER_NON_STREAMING`
  - User function definitions
    - External audio hardware configuration
      - `AudioHwInit()`
      - `AudioHwConfig()`
      - `AudioHwConfig_Mute()`
      - `AudioHwConfig_UnMute()`
      - `AudioHwShutdown()`
    - Audio streaming notification
      - `UserAudioStreamState()`
    - HID controls
      - `UserHIDGetData()`
- Frequently asked questions