summaryrefslogtreecommitdiff
path: root/src/class/audio
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-07-01 22:38:06 +0700
committerhathach <[email protected]>2019-07-01 22:38:06 +0700
commit6991b28532605ceae685cb8be1fee904e09f12fe (patch)
tree2d383bce7e232d56ee072f5fccdf2b688228da8d /src/class/audio
parent991aaf0158fcb02f7951a895a0caa6637e84fd8a (diff)
improving midi support, adding midi exmaple
rename TUSB_DESC_CLASS_SPECIFIC to TUSB_DESC_CS_INTERFACE
Diffstat (limited to 'src/class/audio')
-rw-r--r--src/class/audio/audio.h44
1 files changed, 39 insertions, 5 deletions
diff --git a/src/class/audio/audio.h b/src/class/audio/audio.h
index c655e79e2..a6f198581 100644
--- a/src/class/audio/audio.h
+++ b/src/class/audio/audio.h
@@ -29,8 +29,8 @@
* Currently only MIDI subclass is supported
* @{ */
-#ifndef _TUSB_CDC_H__
-#define _TUSB_CDC_H__
+#ifndef _TUSB_AUDIO_H__
+#define _TUSB_AUDIO_H__
#include "common/tusb_common.h"
@@ -41,9 +41,9 @@
/// Audio Interface Subclass Codes
typedef enum
{
- AUDIO_SUBCLASS_AUDIO_CONTROL = 0x01 , ///< Audio Control
- AUDIO_SUBCLASS_AUDIO_STREAMING , ///< Audio Streaming
- AUDIO_SUBCLASS_MIDI_STREAMING , ///< MIDI Streaming
+ AUDIO_SUBCLASS_CONTROL = 0x01 , ///< Audio Control
+ AUDIO_SUBCLASS_STREAMING , ///< Audio Streaming
+ AUDIO_SUBCLASS_MIDI_STREAMING , ///< MIDI Streaming
} audio_subclass_type_t;
/// Audio Protocol Codes
@@ -54,6 +54,40 @@ typedef enum
AUDIO_PROTOCOL_V3 = 0x30, ///< Version 3.0
} audio_protocol_type_t;
+/// Audio Function Category Codes
+typedef enum
+{
+ AUDIO_FUNC_DESKTOP_SPEAKER = 0x01,
+ AUDIO_FUNC_HOME_THEATER = 0x02,
+ AUDIO_FUNC_MICROPHONE = 0x03,
+ AUDIO_FUNC_HEADSET = 0x04,
+ AUDIO_FUNC_TELEPHONE = 0x05,
+ AUDIO_FUNC_CONVERTER = 0x06,
+ AUDIO_FUNC_SOUND_RECODER = 0x07,
+ AUDIO_FUNC_IO_BOX = 0x08,
+ AUDIO_FUNC_MUSICAL_INSTRUMENT = 0x09,
+ AUDIO_FUNC_PRO_AUDIO = 0x0A,
+ AUDIO_FUNC_AUDIO_VIDEO = 0x0B,
+ AUDIO_FUNC_CONTROL_PANEL = 0x0C
+} audio_function_t;
+
+/// Audio Class-Specific AC Interface Descriptor Subtypes
+typedef enum
+{
+ AUDIO_CS_INTERFACE_HEADER = 0x01,
+ AUDIO_CS_INTERFACE_INPUT_TERMINAL = 0x02,
+ AUDIO_CS_INTERFACE_OUTPUT_TERMINAL = 0x03,
+ AUDIO_CS_INTERFACE_MIXER_UNIT = 0x04,
+ AUDIO_CS_INTERFACE_SELECTOR_UNIT = 0x05,
+ AUDIO_CS_INTERFACE_FEATURE_UNIT = 0x06,
+ AUDIO_CS_INTERFACE_EFFECT_UNIT = 0x07,
+ AUDIO_CS_INTERFACE_PROCESSING_UNIT = 0x08,
+ AUDIO_CS_INTERFACE_EXTENSION_UNIT = 0x09,
+ AUDIO_CS_INTERFACE_CLOCK_SOURCE = 0x0A,
+ AUDIO_CS_INTERFACE_CLOCK_SELECTOR = 0x0B,
+ AUDIO_CS_INTERFACE_CLOCK_MULTIPLIER = 0x0C,
+ AUDIO_CS_INTERFACE_SAMPLE_RATE_CONVERTER = 0x0D,
+} audio_cs_interface_subtype_t;
/** @} */