USB Audio Class

Entities

Entity: Addressable logical object inside an audio or a MIDI function.
Each Entity is assigned a unique identification number, the EntityID.

Audio

  • Terminals
    • Input Terminal
    • Output Terminal
  • Units
    • Mixer Unit
    • Selector Unit
    • Feature Unit
    • Processing Unit
    • Extension Unit

MIDI

  • MIDI Jacks
    • Embedded MIDI Jacks
      • Embedded MIDI IN Jacks
        • The information flowing from the Host to a MIDI OUT endpoint is routed to the USB-MIDI function through one or more Embedded MIDI IN Jacks, associated with that endpoint.
      • Embedded MIDI OUT Jacks
        • Information going to the Host leaves the USB-MIDI function through one or more Embedded MIDI OUT Jacks and flows through the MIDI IN endpoint to which the Embedded MIDI Out Jacks are associated.
    • External MIDI Jacks
      • External MIDI IN Jacks
      • External MIDI OUT Jacks
  • Elements: A USB-MIDI function contains one or more processing engines, called Elements
    • Synthesizer engines
    • External Time Code to MIDI Time Code (MTC) converters
    • MIDI controlled audio effects processors
    • other MIDI controlled engines

Descriptors

  • AIC ::= ACI SI{1, n}
    • SI = {ASI, MSI}
  • ACI ::= sACI; cACI ACE
    • cACI ::= cACI_Header cTerminal{0, n} cUnit{0, n}
      • cTerminal = {cInputTerminal, cOutputTerminal}
        • no use for MSI
      • cUnit = {cMixerUnit, cSelectorUnit, cFeatureUnit, cProcessingUnit, cExtensionUnit}
        • no use for MSI
    • ACE ::= sACE_Interrupt{0, 1}
      • sACE_Interrupt = {EP_Interrupt_IN}
      • no use for MSI
      • optional for ASI
  • ASI ::= sASI; cASI ASE
    • sASI ::= sASI_alt0 sASI_alt1
      • sASI_alt0: zero-bandwidth alternate setting
      • sASI_alt1: operational alternate setting
    • cASI ::= cASI_General cAS_FormatType cAS_FormatSpecific{0, 1}
    • ASE ::= ASE_ISO_AudioData{0, 1} sASE_ISO_Synch{0, 1}
      • ASE_ISO_AudioData ::= sASE_ISO_AudioData; cASE_ISO_AudioData
        • sASE_ISO_AudioData = {EP_Isochronous_IN, EP_Isochronous_OUT}
      • sASE_ISO_Synch = {EP_Isochronous}
  • MSI ::= sMSI; cMSI MSE_BulkData{0, n} sMSE_TransferBulkData{0, n}
    • cMSI ::= cMSI_Header cIN_Jack{0, n} cElement{0, n} cOUT_Jack{0, n}
    • MSE_BulkData ::= sMSE_BulkData cMSE_BulkData
      • sMSE_BulkData = {EP_Bulk_IN, EP_Bulk_OUT}
    • sMSE_TransferBulkData = {EP_Bulk_IN, EP_Bulk_OUT}

Note

  • By incorporating a low-bandwidth or even zero-bandwidth alternate setting for each AudioStreaming interface, a device offers to the Host software the option to temporarily relinquish USB bandwidth by switching to this low-bandwidth alternate setting.
  • If such an alternate setting is implemented, it must be the default alternate setting (alternate setting zero).

Abbreviation

  • AIC: Audio Interface Collection
  • ACI: AudioControl Interface
  • SI: Streaming Interface
    • ASI: AudioStreaming Interface
    • MSI: MIDIStreaming Interface
  • ACE: AudioControl Endpoint
  • ASE: AudioStreaming Endpoint
  • MSE: MIDIStreaming Endpoint
  • EP: Endpoint
  • s: standard
  • c: class-specific

Class-specific Requests

  • AudioControl Requests
    • Terminal Control Requests
      • Copy Protect
    • Mixer Control Requests
    • Selector Unit Control Requests
    • Feature Unit Control Requests
      • Mute/Volume
      • Bass/Mid/Treble
      • Graphic Equalizer
      • Automatic Gain/Delay/Bass Boost/Loudness
    • Processing Unit Control Requests
      • Up/Down-mix
        • 提供設備,以便從 n 個輸入音訊通道來驅動 m 個輸出音訊通道
      • Dolby PrologicTM
        • 擷取額外的音訊資料
      • 3D Stereo Extender
        • 處理現有立體聲音軌,以增加一種寬敞的音效
      • Reverberation
        • 增加室內音質的音效
      • Chorus
        • 加強合唱的音效
      • Dynamic Range Compressor
        • 智慧地限制動態範圍
    • Extension Unit Control Requests
  • AudioStreaming Requests
    • Interface Control Requests
    • Endpoint Control Requests
      • Sampling Frequency/Pitch
  • MIDIStreaming Requests
    • Endpoint Control Requests
      • Association Control
  • Additional Requests
    • Set/Get Memory Request
    • Get Status Request

Audio Streams

Composition

  • Stream ::= Framems
    • Frame ::= SubFramechannels
      • SubFrame ::= Bytebytes
        • low byte first (i.e. from LSB to MSB)

Data Formats

  • Type I
    • PCM
    • PCM8
    • IEEE_FLOAT
    • ALaw
    • uLaw
  • Type II
    • MPEG
    • AC-3
  • Type III
    • IEC1937_AC-3
    • IEC1937_MPEG-1_Layer1
    • IEC1937_MPEG-1_Layer2/3 or IEC1937_MPEG-2_NOEXT
    • IEC1937_MPEG-2_EXT
    • IEC1937_MPEG-2_Layer1_LS

An example of a PCM stream

Audio class PCM ISO OUT 的資料格式,是根據你的宣告而定的:

  1. 取樣頻率
    • ISO 是 1ms 送一次,若是 8K 取樣一個聲道 1ms 就有 16 bytes 資料
  2. 左右聲道
    • 格式先是左聲道然後是右聲道數據
  3. Byte Order
    • low byte first; 先是低8位元然後是高8位元

所以一般的 48K 立體聲資料長度 = 48*2*2 bytes/ms

Operating system support

Microsoft Windows

  • Evolution
    • Audio
      • Windows 98 Gold with USB 1.0
    • Audio: MIDI
      • Windows Me with USB 1.1
    • Audio: MIDI, improved
      • Windows XP with USB 1.1; USB2.0
  • The usbaudio.sys minidriver supports USB audio devices, including MIDI devices.
  • Applications can access USB audio devices using the DirectMusic and DirectSound components of Windows’ DirectX technology or using Windows Multimedia audio functions.

Apple Mac OS X

  • OS X 10.1.3 supports stereo in/out on a system level.
    • A USB device that registers as "USB Audio" (e.g. Griffin iMic) works perfectly well.

Linux

References

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License