📄 audio.h
字号:
/*----------------------------------------------------------------------------
* U S B - K e r n e l
*----------------------------------------------------------------------------
* Name: AUDIO.H
* Purpose: USB Audio Device Class Definitions
* Version: V1.10
*----------------------------------------------------------------------------
* This software is supplied "AS IS" without any warranties, express,
* implied or statutory, including but not limited to the implied
* warranties of fitness for purpose, satisfactory quality and
* noninfringement. Keil extends you a royalty-free right to reproduce
* and distribute executable files created using this software for use
* on Philips LPC2xxx microcontroller devices only. Nothing else gives
* you the right to use this software.
*
* Copyright (c) 2005-2006 Keil Software.
*---------------------------------------------------------------------------*/
#ifndef __AUDIO_H__
#define __AUDIO_H__
/* Audio Interface Subclass Codes */
#define AUDIO_SUBCLASS_UNDEFINED 0x00
#define AUDIO_SUBCLASS_AUDIOCONTROL 0x01
#define AUDIO_SUBCLASS_AUDIOSTREAMING 0x02
#define AUDIO_SUBCLASS_MIDISTREAMING 0x03
/* Audio Interface Protocol Codes */
#define AUDIO_PROTOCOL_UNDEFINED 0x00
/* Audio Descriptor Types */
#define AUDIO_UNDEFINED_DESCRIPTOR_TYPE 0x20
#define AUDIO_DEVICE_DESCRIPTOR_TYPE 0x21
#define AUDIO_CONFIGURATION_DESCRIPTOR_TYPE 0x22
#define AUDIO_STRING_DESCRIPTOR_TYPE 0x23
#define AUDIO_INTERFACE_DESCRIPTOR_TYPE 0x24
#define AUDIO_ENDPOINT_DESCRIPTOR_TYPE 0x25
/* Audio Control Interface Descriptor Subtypes */
#define AUDIO_CONTROL_UNDEFINED 0x00
#define AUDIO_CONTROL_HEADER 0x01
#define AUDIO_CONTROL_INPUT_TERMINAL 0x02
#define AUDIO_CONTROL_OUTPUT_TERMINAL 0x03
#define AUDIO_CONTROL_MIXER_UNIT 0x04
#define AUDIO_CONTROL_SELECTOR_UNIT 0x05
#define AUDIO_CONTROL_FEATURE_UNIT 0x06
#define AUDIO_CONTROL_PROCESSING_UNIT 0x07
#define AUDIO_CONTROL_EXTENSION_UNIT 0x08
/* Audio Streaming Interface Descriptor Subtypes */
#define AUDIO_STREAMING_UNDEFINED 0x00
#define AUDIO_STREAMING_GENERAL 0x01
#define AUDIO_STREAMING_FORMAT_TYPE 0x02
#define AUDIO_STREAMING_FORMAT_SPECIFIC 0x03
/* Audio Endpoint Descriptor Subtypes */
#define AUDIO_ENDPOINT_UNDEFINED 0x00
#define AUDIO_ENDPOINT_GENERAL 0x01
/* Audio Descriptor Sizes */
#define AUDIO_CONTROL_INTERFACE_DESC_SZ(n) 0x08+n
#define AUDIO_STREAMING_INTERFACE_DESC_SIZE 0x07
#define AUDIO_INPUT_TERMINAL_DESC_SIZE 0x0C
#define AUDIO_OUTPUT_TERMINAL_DESC_SIZE 0x09
#define AUDIO_MIXER_UNIT_DESC_SZ(p,n) 0x0A+p+n
#define AUDIO_SELECTOR_UNIT_DESC_SZ(p) 0x06+p
#define AUDIO_FEATURE_UNIT_DESC_SZ(ch,n) 0x07+(ch+1)*n
#define AUDIO_PROCESSING_UNIT_DESC_SZ(p,n,x) 0x0D+p+n+x
#define AUDIO_EXTENSION_UNIT_DESC_SZ(p,n) 0x0D+p+n
#define AUDIO_STANDARD_ENDPOINT_DESC_SIZE 0x09
#define AUDIO_STREAMING_ENDPOINT_DESC_SIZE 0x07
/* Audio Processing Unit Process Types */
#define AUDIO_UNDEFINED_PROCESS 0x00
#define AUDIO_UP_DOWN_MIX_PROCESS 0x01
#define AUDIO_DOLBY_PROLOGIC_PROCESS 0x02
#define AUDIO_3D_STEREO_PROCESS 0x03
#define AUDIO_REVERBERATION_PROCESS 0x04
#define AUDIO_CHORUS_PROCESS 0x05
#define AUDIO_DYN_RANGE_COMP_PROCESS 0x06
/* Audio Request Codes */
#define AUDIO_REQUEST_UNDEFINED 0x00
#define AUDIO_REQUEST_SET_CUR 0x01
#define AUDIO_REQUEST_GET_CUR 0x81
#define AUDIO_REQUEST_SET_MIN 0x02
#define AUDIO_REQUEST_GET_MIN 0x82
#define AUDIO_REQUEST_SET_MAX 0x03
#define AUDIO_REQUEST_GET_MAX 0x83
#define AUDIO_REQUEST_SET_RES 0x04
#define AUDIO_REQUEST_GET_RES 0x84
#define AUDIO_REQUEST_SET_MEM 0x05
#define AUDIO_REQUEST_GET_MEM 0x85
#define AUDIO_REQUEST_GET_STAT 0xFF
/* Audio Control Selector Codes */
#define AUDIO_CONTROL_UNDEFINED 0x00 /* Common Selector */
/* Terminal Control Selectors */
#define AUDIO_COPY_PROTECT_CONTROL 0x01
/* Feature Unit Control Selectors */
#define AUDIO_MUTE_CONTROL 0x01
#define AUDIO_VOLUME_CONTROL 0x02
#define AUDIO_BASS_CONTROL 0x03
#define AUDIO_MID_CONTROL 0x04
#define AUDIO_TREBLE_CONTROL 0x05
#define AUDIO_GRAPHIC_EQUALIZER_CONTROL 0x06
#define AUDIO_AUTOMATIC_GAIN_CONTROL 0x07
#define AUDIO_DELAY_CONTROL 0x08
#define AUDIO_BASS_BOOST_CONTROL 0x09
#define AUDIO_LOUDNESS_CONTROL 0x0A
/* Processing Unit Control Selectors: */
#define AUDIO_ENABLE_CONTROL 0x01 /* Common Selector */
#define AUDIO_MODE_SELECT_CONTROL 0x02 /* Common Selector */
/* - Up/Down-mix Control Selectors */
/* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
/* AUDIO_MODE_SELECT_CONTROL 0x02 Common Selector */
/* - Dolby Prologic Control Selectors */
/* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
/* AUDIO_MODE_SELECT_CONTROL 0x02 Common Selector */
/* - 3D Stereo Extender Control Selectors */
/* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
#define AUDIO_SPACIOUSNESS_CONTROL 0x02
/* - Reverberation Control Selectors */
/* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
#define AUDIO_REVERB_LEVEL_CONTROL 0x02
#define AUDIO_REVERB_TIME_CONTROL 0x03
#define AUDIO_REVERB_FEEDBACK_CONTROL 0x04
/* - Chorus Control Selectors */
/* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
#define AUDIO_CHORUS_LEVEL_CONTROL 0x02
#define AUDIO_SHORUS_RATE_CONTROL 0x03
#define AUDIO_CHORUS_DEPTH_CONTROL 0x04
/* - Dynamic Range Compressor Control Selectors */
/* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
#define AUDIO_COMPRESSION_RATE_CONTROL 0x02
#define AUDIO_MAX_AMPL_CONTROL 0x03
#define AUDIO_THRESHOLD_CONTROL 0x04
#define AUDIO_ATTACK_TIME_CONTROL 0x05
#define AUDIO_RELEASE_TIME_CONTROL 0x06
/* Extension Unit Control Selectors */
/* AUDIO_ENABLE_CONTROL 0x01 Common Selector */
/* Endpoint Control Selectors */
#define AUDIO_SAMPLING_FREQ_CONTROL 0x01
#define AUDIO_PITCH_CONTROL 0x02
/* Audio Format Specific Control Selectors */
/* MPEG Control Selectors */
#define AUDIO_MPEG_CONTROL_UNDEFINED 0x00
#define AUDIO_MPEG_DUAL_CHANNEL_CONTROL 0x01
#define AUDIO_MPEG_SECOND_STEREO_CONTROL 0x02
#define AUDIO_MPEG_MULTILINGUAL_CONTROL 0x03
#define AUDIO_MPEG_DYN_RANGE_CONTROL 0x04
#define AUDIO_MPEG_SCALING_CONTROL 0x05
#define AUDIO_MPEG_HILO_SCALING_CONTROL 0x06
/* AC-3 Control Selectors */
#define AUDIO_AC3_CONTROL_UNDEFINED 0x00
#define AUDIO_AC3_MODE_CONTROL 0x01
#define AUDIO_AC3_DYN_RANGE_CONTROL 0x02
#define AUDIO_AC3_SCALING_CONTROL 0x03
#define AUDIO_AC3_HILO_SCALING_CONTROL 0x04
/* Audio Format Types */
#define AUDIO_FORMAT_TYPE_UNDEFINED 0x00
#define AUDIO_FORMAT_TYPE_I 0x01
#define AUDIO_FORMAT_TYPE_II 0x02
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -