Expand description
USB Audio Class (UAC) and HDMI Audio drivers
Provides USB Audio Class 1.0/2.0 device support and HDMI audio output:
§USB Audio Class (UAC)
- UAC 1.0 and 2.0 descriptor parsing (Audio Control, Audio Streaming)
- Terminal types: Input Terminal, Output Terminal, Feature Unit, Mixer Unit
- Audio format descriptors: PCM, sample rates (8000-192000), bit depths (16/24/32)
- Isochronous endpoint management (adaptive, synchronous, asynchronous)
- Sample rate control (SET_CUR/GET_CUR)
- Volume/mute control via Feature Unit (dB scaling, 8.8 fixed-point)
§HDMI Audio
- HDMI audio infoframe (CEA-861) construction
- Channel allocation (2ch stereo, 5.1, 7.1)
- Audio Clock Regeneration (N/CTS values)
- ELD (EDID-Like Data) parsing for sink capabilities
- Integration with GPU driver (HDA codec over HDMI)
All arithmetic uses integer/fixed-point math only (no FPU).
Structs§
- Audio
Clock Regeneration - Audio Clock Regeneration (ACR) parameters
- Audio
Format Descriptor - Audio format type descriptor
- Audio
Streaming Interface - An audio streaming interface alternate setting
- Clock
Source - Clock source descriptor (UAC 2.0)
- Feature
Unit - Feature unit descriptor – provides volume/mute/tone controls
- Hdmi
Audio Infoframe - HDMI Audio InfoFrame packet (CEA-861)
- Hdmi
Audio Output - HDMI audio output configuration for HDA codec
- HdmiEld
- ELD (EDID-Like Data) for HDMI audio sink capabilities
- Input
Terminal - Input terminal descriptor
- Mixer
Unit - Mixer unit descriptor
- Mute
Control Request - Mute control request
- Output
Terminal - Output terminal descriptor
- Sample
Rate Range - Supported sample rate entry
- Sample
Rate Request - Sample rate control request
- Short
Audio Descriptor - CEA Short Audio Descriptor (SAD)
- UsbAudio
Device - A parsed USB Audio device with all its audio topology
- Volume
Control Request - Volume control request
- Volume
Db - Volume in 8.8 fixed-point dB format (USB Audio spec)
Enums§
- Audio
Unit - Audio unit – variant type for all unit/terminal descriptors
- HdaWidget
Type - HDA codec widget types relevant to HDMI audio
- Hdmi
Audio Coding - HDMI audio coding types
- Hdmi
Channel Allocation - HDMI channel allocation codes (CEA-861-D Table 20)
- Hdmi
Sample Rate - HDMI audio sample rate encoding for infoframe
- Hdmi
Sample Size - HDMI audio sample size encoding for infoframe
- IsoSync
Type - Isochronous endpoint synchronization type
- Terminal
Direction - Audio terminal type classification
- UacVersion
- UAC version supported by a device
Constants§
- CS_
ENDPOINT - CS_
INTERFACE - Class-specific descriptor types
- HDMI_
AUDIO_ INFOFRAME_ LENGTH - HDMI audio infoframe length (fixed at 10 bytes)
- HDMI_
AUDIO_ INFOFRAME_ TYPE - HDMI audio infoframe type code (CEA-861)
- HDMI_
AUDIO_ INFOFRAME_ VERSION - HDMI audio infoframe version
- STANDARD_
SAMPLE_ RATES - Standard USB audio sample rates in Hz
- UAC2_
CLOCK_ MULTIPLIER - Clock multiplier (UAC 2.0)
- UAC2_
CLOCK_ SELECTOR - Clock selector (UAC 2.0)
- UAC2_
CLOCK_ SOURCE - Clock source (UAC 2.0)
- UAC_
AC_ HEADER - AC interface header
- UAC_
AS_ FORMAT_ TYPE - AS format type descriptor
- UAC_
AS_ GENERAL - AS interface general descriptor
- UAC_
EP_ SYNC_ ADAPTIVE - Adaptive: device adapts to host clock
- UAC_
EP_ SYNC_ ASYNC - Asynchronous: device sets its own clock
- UAC_
EP_ SYNC_ NONE - No synchronization
- UAC_
EP_ SYNC_ SYNC - Synchronous: device uses SOF synchronization
- UAC_
EXTENSION_ UNIT - Extension unit descriptor (UAC 1.0)
- UAC_
FEATURE_ UNIT - Feature unit descriptor
- UAC_
FORMAT_ ALAW - A-Law format
- UAC_
FORMAT_ IEEE_ FLOAT - IEEE 754 float format
- UAC_
FORMAT_ MULAW - Mu-Law format
- UAC_
FORMAT_ PCM - PCM format (uncompressed)
- UAC_
FORMAT_ PCM8 - PCM8 format (8-bit unsigned)
- UAC_
FU_ AUTOMATIC_ GAIN - UAC_
FU_ BASS_ CONTROL - UAC_
FU_ MUTE_ CONTROL - UAC_
FU_ TREBLE_ CONTROL - UAC_
FU_ VOLUME_ CONTROL - UAC_
GET_ CUR - UAC_
GET_ MAX - UAC_
GET_ MIN - UAC_
GET_ RES - UAC_
INPUT_ TERMINAL - Input terminal descriptor
- UAC_
MIXER_ UNIT - Mixer unit descriptor
- UAC_
OUTPUT_ TERMINAL - Output terminal descriptor
- UAC_
PROCESSING_ UNIT - Processing unit descriptor (UAC 1.0)
- UAC_
PROTOCOL_ IP_ VERSION_ 02_ 00 - UAC_
PROTOCOL_ NONE - Audio protocol codes
- UAC_
SELECTOR_ UNIT - Selector unit descriptor
- UAC_
SET_ CUR - UAC_
SET_ MAX - UAC_
SET_ MIN - UAC_
SET_ RES - UAC_
TERMINAL_ DESKTOP_ MIC - Desktop microphone
- UAC_
TERMINAL_ DESKTOP_ SPEAKER - Desktop speaker
- UAC_
TERMINAL_ HDMI - HDMI output terminal
- UAC_
TERMINAL_ HEADPHONES - Headphones output
- UAC_
TERMINAL_ HEADSET_ MIC - Headset microphone
- UAC_
TERMINAL_ MICROPHONE - Generic microphone input
- UAC_
TERMINAL_ SPDIF - S/PDIF digital output
- UAC_
TERMINAL_ SPEAKER - Generic speaker output
- UAC_
TERMINAL_ USB_ STREAMING - USB streaming terminal (host connection)
- USB_
CLASS_ AUDIO - USB Audio device class code
- USB_
SUBCLASS_ AUDIO_ CONTROL - Audio subclass codes
- USB_
SUBCLASS_ AUDIO_ STREAMING - USB_
SUBCLASS_ MIDI_ STREAMING - VOLUME_
MAX - Maximum volume (+127.99 dB)
- VOLUME_
SILENCE - Silence volume (minimum, -128.0 dB)
- VOLUME_
UNITY - Unity gain (0.0 dB)