1 /**************************************************************************/ 2 /* */ 3 /* Copyright (c) Microsoft Corporation. All rights reserved. */ 4 /* */ 5 /* This software is licensed under the Microsoft Software License */ 6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */ 7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ 8 /* and in the root directory of this software. */ 9 /* */ 10 /**************************************************************************/ 11 12 13 /**************************************************************************/ 14 /**************************************************************************/ 15 /** */ 16 /** USBX Component */ 17 /** */ 18 /** Audio Class */ 19 /** */ 20 /**************************************************************************/ 21 /**************************************************************************/ 22 23 24 /**************************************************************************/ 25 /* */ 26 /* COMPONENT DEFINITION RELEASE */ 27 /* */ 28 /* ux_class_audio10.h PORTABLE C */ 29 /* 6.1.12 */ 30 /* AUTHOR */ 31 /* */ 32 /* Chaoqiong Xiao, Microsoft Corporation */ 33 /* */ 34 /* DESCRIPTION */ 35 /* */ 36 /* This file contains all the header and structures used by the */ 37 /* USBX Audio Class (UAC) 1.0. */ 38 /* */ 39 /* RELEASE HISTORY */ 40 /* */ 41 /* DATE NAME DESCRIPTION */ 42 /* */ 43 /* 07-29-2022 Chaoqiong Xiao Initial Version 6.1.12 */ 44 /* */ 45 /**************************************************************************/ 46 47 #ifndef UX_CLASS_AUDIO10_H 48 #define UX_CLASS_AUDIO10_H 49 50 /* Define Audio Class Codes. */ 51 52 #define UX_CLASS_AUDIO10_CLASS 0x01 53 #define UX_CLASS_AUDIO10_SUBCLASS_UNDEFINED 0x00 54 #define UX_CLASS_AUDIO10_SUBCLASS_AUDIOCONTROL 0x01 55 #define UX_CLASS_AUDIO10_SUBCLASS_AUDIOSTREAMING 0x02 56 #define UX_CLASS_AUDIO10_SUBCLASS_MIDISTREAMING 0x03 57 #define UX_CLASS_AUDIO10_PROTOCOL_UNDEFINED 0x00 58 59 60 /* Define Audio Class desctiptor types. */ 61 #define UX_CLASS_AUDIO10_CS_UNDEFINED 0x20 62 #define UX_CLASS_AUDIO10_CS_DEVICE 0x21 63 #define UX_CLASS_AUDIO10_CS_CONFIGURATION 0x22 64 #define UX_CLASS_AUDIO10_CS_STRING 0x23 65 #define UX_CLASS_AUDIO10_CS_INTERFACE 0x24 66 #define UX_CLASS_AUDIO10_CS_ENDPOINT 0x25 67 68 69 /* Define Audio Class AC interface descriptor subclasses. */ 70 71 #define UX_CLASS_AUDIO10_AC_UNDEFINED 0x00 72 #define UX_CLASS_AUDIO10_AC_HEADER 0x01 73 #define UX_CLASS_AUDIO10_AC_INPUT_TERMINAL 0x02 74 #define UX_CLASS_AUDIO10_AC_OUTPUT_TERMINAL 0x03 75 #define UX_CLASS_AUDIO10_AC_MIXER_UNIT 0x04 76 #define UX_CLASS_AUDIO10_AC_SELECTOR_UNIT 0x05 77 #define UX_CLASS_AUDIO10_AC_FEATURE_UNIT 0x06 78 #define UX_CLASS_AUDIO10_AC_PROCESSING_UNIT 0x07 79 #define UX_CLASS_AUDIO10_AC_EXTENSION_UNIT 0x08 80 81 82 /* Define Audio Class Processing Unit (PU) Process Types (PT). */ 83 84 #define UX_CLASS_AUDIO10_PROCESS_UNDEFINED 0x00 85 #define UX_CLASS_AUDIO10_PROCESS_UP_DOWN_MIX 0x01 86 #define UX_CLASS_AUDIO10_PROCESS_DOLBY_PROLOGIC 0x02 87 #define UX_CLASS_AUDIO10_PROCESS_3D_STEREO_EXTENDER 0x03 88 #define UX_CLASS_AUDIO10_PROCESS_REVERBERATION 0x04 89 #define UX_CLASS_AUDIO10_PROCESS_CHORUS 0x05 90 #define UX_CLASS_AUDIO10_PROCESS_DYN_RANGE_COMP 0x06 91 92 93 /* Define Audio Class AS interface descriptor subclasses. */ 94 95 #define UX_CLASS_AUDIO10_AS_UNDEFINED 0x00 96 #define UX_CLASS_AUDIO10_AS_GENERAL 0x01 97 #define UX_CLASS_AUDIO10_AS_FORMAT_TYPE 0x02 98 #define UX_CLASS_AUDIO10_AS_FORMAT_SPECIFIC 0x03 99 100 101 /* Define Audio Class endpoint descriptor subtypes. */ 102 103 #define UX_CLASS_AUDIO10_EP_UNDEFINED 0x00 104 #define UX_CLASS_AUDIO10_EP_GENERAL 0x01 105 106 107 /* Define Audio Class request codes. */ 108 109 #define UX_CLASS_AUDIO10_REQUEST_CODE_UNDEFINED 0x00 110 #define UX_CLASS_AUDIO10_SET_CUR 0x01 111 #define UX_CLASS_AUDIO10_GET_CUR 0x81 112 #define UX_CLASS_AUDIO10_SET_MIN 0x02 113 #define UX_CLASS_AUDIO10_GET_MIN 0x82 114 #define UX_CLASS_AUDIO10_SET_MAX 0x03 115 #define UX_CLASS_AUDIO10_GET_MAX 0x83 116 #define UX_CLASS_AUDIO10_SET_RES 0x04 117 #define UX_CLASS_AUDIO10_GET_RES 0x84 118 #define UX_CLASS_AUDIO10_SET_MEM 0x05 119 #define UX_CLASS_AUDIO10_GET_MEM 0x85 120 #define UX_CLASS_AUDIO10_GET_STAT 0xFF 121 122 123 /* Define Audio Class terminal control selectors. */ 124 125 #define UX_CLASS_AUDIO10_TE_CONTROL_UNDEFINED 0x00 126 #define UX_CLASS_AUDIO10_TE_COPY_PROTECT_CONTROL 0x01 127 128 /* Define Audio Class feature unit control selectors. */ 129 130 #define UX_CLASS_AUDIO10_FU_CONTROL_UNDEFINED 0x00 131 #define UX_CLASS_AUDIO10_FU_MUTE_CONTROL 0x01 132 #define UX_CLASS_AUDIO10_FU_VOLUME_CONTROL 0x02 133 #define UX_CLASS_AUDIO10_FU_BASS_CONTROL 0x03 134 #define UX_CLASS_AUDIO10_FU_MID_CONTROL 0x04 135 #define UX_CLASS_AUDIO10_FU_TREBLE_CONTROL 0x05 136 #define UX_CLASS_AUDIO10_FU_GRAPHIC_EQUALIZER_CONTROL 0x06 137 #define UX_CLASS_AUDIO10_FU_AUTOMATIC_GAIN_CONTROL 0x07 138 #define UX_CLASS_AUDIO10_FU_DELAY_CONTROL 0x08 139 #define UX_CLASS_AUDIO10_FU_BASS_BOOST_CONTROL 0x09 140 #define UX_CLASS_AUDIO10_FU_LOUNDNESS_CONTROL 0x0A 141 142 143 /* Define Audio Class processing unit control selectors. */ 144 145 /* Define Audio Class up/down-mix (UD) processing unit control selectors. */ 146 147 #define UX_CLASS_AUDIO10_UD_CONTROL_UNDEFINED 0x00 148 #define UX_CLASS_AUDIO10_UD_ENABLE_CONTROL 0x01 149 #define UX_CLASS_AUDIO10_UD_MODE_SELECT_CONTROL 0x02 150 151 /* Define Audio Class dolby prologic (DP) processing unit control selectors. */ 152 153 #define UX_CLASS_AUDIO10_DP_CONTROL_UNDEFINED 0x00 154 #define UX_CLASS_AUDIO10_DP_ENABLE_CONTROL 0x01 155 #define UX_CLASS_AUDIO10_DP_MODE_SELECT_CONTROL 0x02 156 157 /* Define Audio Class 3D stereo extender (3D) processing unit control selectors. */ 158 159 #define UX_CLASS_AUDIO10_3D_CONTROL_UNDEFINED 0x00 160 #define UX_CLASS_AUDIO10_3D_ENABLE_CONTROL 0x01 161 #define UX_CLASS_AUDIO10_3D_SPACIOUSNESS_CONTROL 0x02 162 163 /* Define Audio Class reverberation (RV) processing unit control selectors. */ 164 165 #define UX_CLASS_AUDIO10_RV_CONTROL_UNDEFINED 0x00 166 #define UX_CLASS_AUDIO10_RV_ENABLE_CONTROL 0x01 167 #define UX_CLASS_AUDIO10_RV_LEVEL_CONTROL 0x02 168 #define UX_CLASS_AUDIO10_RV_TIME_CONTROL 0x03 169 #define UX_CLASS_AUDIO10_RV_FEEDBACK_CONTROL 0x04 170 171 /* Define Audio Class chorus (CH) processing unit control selectors. */ 172 173 #define UX_CLASS_AUDIO10_CHORUS_CONTROL_UNDEFINED 0x00 174 #define UX_CLASS_AUDIO10_CHORUS_ENABLE_CONTROL 0x01 175 #define UX_CLASS_AUDIO10_CHORUS_LEVEL_CONTROL 0x02 176 #define UX_CLASS_AUDIO10_CHORUS_RATE_CONTROL 0x03 177 #define UX_CLASS_AUDIO10_CHORUS_DEPTH_CONTROL 0x04 178 179 /* Define Audio Class dynamic range compressor (DR) processing unit control selectors. */ 180 181 #define UX_CLASS_AUDIO10_DR_CONTROL_UNDEFINED 0x00 182 #define UX_CLASS_AUDIO10_DR_ENABLE_CONTROL 0x01 183 #define UX_CLASS_AUDIO10_DR_COMPRESSION_RATE_CONTROL 0x02 184 #define UX_CLASS_AUDIO10_DR_MAXAMPL_CONTROL 0x03 185 #define UX_CLASS_AUDIO10_DR_THRESHOLD_CONTROL 0x04 186 #define UX_CLASS_AUDIO10_DR_ATTACK_TIME 0x05 187 #define UX_CLASS_AUDIO10_DR_RELEASE_TIME 0x06 188 189 /* Define Audio Class extension unit (XU) control selectors. */ 190 191 #define UX_CLASS_AUDIO10_XU_CONTROL_UNDEFINED 0x00 192 #define UX_CLASS_AUDIO10_XU_ENABLE_CONTROL 0x01 193 194 195 /* Define Audio Class endpoint control selectors. */ 196 197 #define UX_CLASS_AUDIO10_EP_CONTROL_UNDEFINED 0x00 198 #define UX_CLASS_AUDIO10_EP_SAMPLING_FREQ_CONTROL 0x01 199 #define UX_CLASS_AUDIO10_EP_PITCH_CONTROL 0x02 200 201 202 /* Define Audio Class format type codes. */ 203 204 #define UX_CLASS_AUDIO10_FORMAT_TYPE_UNDEFINED 0x00 205 #define UX_CLASS_AUDIO10_FORMAT_TYPE_I 0x01 206 #define UX_CLASS_AUDIO10_FORMAT_TYPE_II 0x02 207 #define UX_CLASS_AUDIO10_FORMAT_TYPE_III 0x03 208 209 /* Define Audio Class format tag codes. */ 210 211 #define UX_CLASS_AUDIO10_FORMAT_TYPE_I_UNDEFINED 0x0000 212 #define UX_CLASS_AUDIO10_FORMAT_TYPE_I_PCM 0x0001 213 #define UX_CLASS_AUDIO10_FORMAT_TYPE_I_PCM8 0x0002 214 #define UX_CLASS_AUDIO10_FORMAT_TYPE_I_IEEE_FLOAT 0x0003 215 #define UX_CLASS_AUDIO10_FORMAT_TYPE_I_ALAW 0x0004 216 #define UX_CLASS_AUDIO10_FORMAT_TYPE_I_MULAW 0x0005 217 218 #define UX_CLASS_AUDIO10_FORMAT_TYPE_II_UNDEFINED 0x1000 219 #define UX_CLASS_AUDIO10_FORMAT_TYPE_II_MPEG 0x1001 220 #define UX_CLASS_AUDIO10_FORMAT_TYPE_II_AC3 0x1002 221 222 #define UX_CLASS_AUDIO10_FORMAT_TYPE_III_UNDEFINED 0x2000 223 #define UX_CLASS_AUDIO10_FORMAT_TYPE_III_IEC1937_AC3 0x2001 224 #define UX_CLASS_AUDIO10_FORMAT_TYPE_III_IEC1937_MPEG1_L1 0x2002 225 #define UX_CLASS_AUDIO10_FORMAT_TYPE_III_IEC1937_MPEG1_L2_3 0x2003 226 #define UX_CLASS_AUDIO10_FORMAT_TYPE_III_IEC1937_MPEG2_NOEXT 0x2003 227 #define UX_CLASS_AUDIO10_FORMAT_TYPE_III_IEC1937_MPEG2_EXT 0x2004 228 #define UX_CLASS_AUDIO10_FORMAT_TYPE_III_IEC1937_MPEG2_L1_LS 0x2005 229 #define UX_CLASS_AUDIO10_FORMAT_TYPE_III_IEC1937_MPEG2_L2_3_LS 0x2006 230 231 232 /* Define Audio Class MPEG (MP) control selectors. */ 233 234 #define UX_CLASS_AUDIO10_MP_CONTROL_UNDEFINED 0x00 235 #define UX_CLASS_AUDIO10_MP_DUAL_CHANNEL_CONTROL 0x01 236 #define UX_CLASS_AUDIO10_MP_SECOND_STEREO_CONTROL 0x02 237 #define UX_CLASS_AUDIO10_MP_MULTILINGUAL_CONTROL 0x03 238 #define UX_CLASS_AUDIO10_MP_DYN_RANGE_CONTROL 0x04 239 #define UX_CLASS_AUDIO10_MP_SCALING_CONTROL 0x05 240 #define UX_CLASS_AUDIO10_MP_HILO_SCALING_CONTROL 0x06 241 242 /* Define Audio Class AC-3 (AC) control selectors. */ 243 244 #define UX_CLASS_AUDIO10_AC_CONTROL_UNDEFINED 0x00 245 #define UX_CLASS_AUDIO10_AC_MODE_CONTROL 0x01 246 #define UX_CLASS_AUDIO10_AC_DYN_RANGE_CONTROL 0x02 247 #define UX_CLASS_AUDIO10_AC_SCALING_CONTROL 0x03 248 #define UX_CLASS_AUDIO10_AC_HILO_SCALING_CONTROL 0x04 249 250 251 /* Class descriptor structures (packed). 252 * Typedefs to be used: 253 * - for byte : UCHAR/CHAR 254 * - for word : USHORT/SHORT 255 * - for double word (dword): ULONG/LONG 256 * - for 64-bit-width word : ULONG64 257 * Field offset considerations inside descriptor: 258 * - Minimum fields alignment: byte (8-bit) 259 * - Field is not byte and not aligned : field declared as bytes array (UCHAR[]) 260 * - Field is word and word aligned : field declared as USHORT/SHORT 261 * - Field is dword and dword aligned : field declared as ULONG/LONG 262 */ 263 264 265 /* Audio Class AC interface header descriptors (bInCollection=1). */ 266 267 typedef struct UX_CLASS_AUDIO10_AC_HEADER_DESCRIPTOR_STRUCT 268 { 269 UCHAR bLength; 270 UCHAR bDescriptorType; 271 UCHAR bDescriptorSubtype; 272 UCHAR bcdADC[2]; 273 UCHAR wTotalLength[2]; 274 UCHAR bInCollection; 275 UCHAR baInterfaceNr[1]; 276 } UX_CLASS_AUDIO10_AC_HEADER_DESCRIPTOR; 277 278 /* Define Audio Class input terminal descriptor (ITD). */ 279 280 typedef struct UX_CLASS_AUDIO10_AC_INPUT_TERMINAL_DESCRIPTOR_STRUCT 281 { 282 UCHAR bLength; 283 UCHAR bDescriptorType; 284 UCHAR bDescriptorSubtype; 285 UCHAR bTerminalID; 286 USHORT wTerminalType; 287 UCHAR bAssocTerminal; 288 UCHAR bNrChannels; 289 USHORT wChannelConfig; 290 UCHAR iChannelNames; 291 UCHAR iTerminal; 292 } UX_CLASS_AUDIO10_AC_INPUT_TERMINAL_DESCRIPTOR, UX_CLASS_AUDIO10_AC_ITD; 293 294 /* Define Audio Class output terminal descriptor (OTD). */ 295 296 typedef struct UX_CLASS_AUDIO10_AC_OUTPUT_TERMINAL_DESCRIPTOR_STRUCT 297 { 298 UCHAR bLength; 299 UCHAR bDescriptorType; 300 UCHAR bDescriptorSubtype; 301 UCHAR bTerminalID; 302 USHORT wTerminalType; 303 UCHAR bAssocTerminal; 304 UCHAR bSourceID; 305 UCHAR iTerminal; 306 } UX_CLASS_AUDIO10_AC_OUTPUT_TERMINAL_DESCRIPTOR, UX_CLASS_AUDIO10_AC_OTD; 307 308 /* Define Audio Class mixer unit descriptor (MUD, bNrInPins=1, bmMixerControls N=1). */ 309 310 typedef struct UX_CLASS_AUDIO10_AC_MIXER_UNIT_DESCRIPTOR_STRUCT 311 { 312 UCHAR bLength; 313 UCHAR bDescriptorType; 314 UCHAR bDescriptorSubtype; 315 UCHAR bUnitID; 316 UCHAR bNrInPins; 317 UCHAR baSourceID[1]; 318 UCHAR bNrChannels; 319 UCHAR wChannelConfig[2]; 320 UCHAR iChannelNames; 321 UCHAR bmControls[1]; 322 UCHAR iMixer; 323 } UX_CLASS_AUDIO10_AC_MIXER_UNIT_DESCRIPTOR, UX_CLASS_AUDIO10_AC_MUD; 324 325 /* Define Audio Class selector unit descriptor (SUD, bNrInPins=1). */ 326 327 typedef struct UX_CLASS_AUDIO10_AC_SELECTOR_UNIT_DESCRIPTOR_STRUCT 328 { 329 UCHAR bLength; 330 UCHAR bDescriptorType; 331 UCHAR bDescriptorSubtype; 332 UCHAR bUnitID; 333 UCHAR bNrInPins; 334 UCHAR baSourceID[1]; 335 UCHAR iSelector; 336 } UX_CLASS_AUDIO10_AC_SELECTOR_UNIT_DESCRIPTOR, UX_CLASS_AUDIO10_AC_SUD; 337 338 /* Define Audio Class feature unit descriptor (FUD, ch=1, bControlSize=2). */ 339 340 typedef struct UX_CLASS_AUDIO10_AC_FEATURE_UNIT_DESCRIPTOR_STRUCT 341 { 342 UCHAR bLength; 343 UCHAR bDescriptorType; 344 UCHAR bDescriptorSubtype; 345 UCHAR bUnitID; 346 UCHAR bSourceID; 347 UCHAR bControlSize; 348 UCHAR bmaControls[2 * 2]; 349 UCHAR iFeature; 350 } UX_CLASS_AUDIO10_AC_FEATURE_UNIT_DESCRIPTOR, UX_CLASS_AUDIO10_AC_FUD; 351 352 /* FUD::bmControls. */ 353 #define UX_CLASS_AUDIO10_FUD_CONTROL_MUTE (1u << 0) 354 #define UX_CLASS_AUDIO10_FUD_CONTROL_VOLUME (1u << 1) 355 #define UX_CLASS_AUDIO10_FUD_CONTROL_BASS (1u << 2) 356 #define UX_CLASS_AUDIO10_FUD_CONTROL_MID (1u << 3) 357 #define UX_CLASS_AUDIO10_FUD_CONTROL_TREBLE (1u << 4) 358 #define UX_CLASS_AUDIO10_FUD_CONTROL_GRAPHIC_EQ (1u << 5) 359 #define UX_CLASS_AUDIO10_FUD_CONTROL_AUTO_GAIN (1u << 6) 360 #define UX_CLASS_AUDIO10_FUD_CONTROL_DELAY (1u << 7) 361 #define UX_CLASS_AUDIO10_FUD_CONTROL_BASS_BOOST (1u << 8) 362 #define UX_CLASS_AUDIO10_FUD_CONTROL_LOUDNESS (1u << 9) 363 364 /* Define Audio Class processing unit descriptor (PUD, bNrInPins=1,bControlSize=1). */ 365 366 typedef struct UX_CLASS_AUDIO10_AC_PROCESSING_UNIT_DESCRIPTOR_STRUCT 367 { 368 UCHAR bLength; 369 UCHAR bDescriptorType; 370 UCHAR bDescriptorSubtype; 371 UCHAR bUnitID; 372 USHORT wProcessType; 373 UCHAR bNrInPins; 374 UCHAR baSourceID[1]; 375 UCHAR bNrChannels; 376 UCHAR wChannelConfig; 377 UCHAR iChannelNames; 378 UCHAR bControlSize; 379 UCHAR bmControls[1]; 380 UCHAR iProcessing; 381 } UX_CLASS_AUDIO10_AC_PROCESSING_UNIT_DESCRIPTOR, UX_CLASS_AUDIO10_AC_PUD; 382 383 /* Define Audio Class up/down processing unit descriptor (PUD, bNrInPins=1,bControlSize=1,bNrModes=1). */ 384 385 typedef struct UX_CLASS_AUDIO10_AC_UP_DOWN_PROCESSING_UNIT_DESCRIPTOR_STRUCT 386 { 387 UCHAR bLength; 388 UCHAR bDescriptorType; 389 UCHAR bDescriptorSubtype; 390 UCHAR bUnitID; 391 USHORT wProcessType; 392 UCHAR bNrInPins; 393 UCHAR bSourceID; 394 UCHAR bNrChannels; 395 UCHAR wChannelConfig[2]; 396 UCHAR iChannelNames; 397 UCHAR bControlSize; 398 UCHAR bmControls[1]; 399 UCHAR iProcessing; 400 UCHAR bNrModes; 401 UCHAR waModes[2 * 1]; 402 } UX_CLASS_AUDIO10_AC_UP_DOWN_PROCESSING_UNIT_DESCRIPTOR, UX_CLASS_AUDIO10_AC_UDD; 403 404 /* UDD::bmControls. */ 405 #define UX_CLASS_AUDIO10_UDD_CONTROL_ENABLE (1u << 0) 406 #define UX_CLASS_AUDIO10_UDD_CONTROL_MODE_SELECT (1u << 1) 407 408 /* Define Audio Class dolby prologic processing unit descriptor (DPD, bNrInPins=1,bControlSize=1,bNrModes=1). */ 409 410 typedef struct UX_CLASS_AUDIO10_AC_DOLBY_PROCESSING_UNIT_DESCRIPTOR_STRUCT 411 { 412 UCHAR bLength; 413 UCHAR bDescriptorType; 414 UCHAR bDescriptorSubtype; 415 UCHAR bUnitID; 416 USHORT wProcessType; 417 UCHAR bNrInPins; 418 UCHAR bSourceID; 419 UCHAR bNrChannels; 420 UCHAR wChannelConfig[2]; 421 UCHAR iChannelNames; 422 UCHAR bControlSize; 423 UCHAR bmControls[1]; 424 UCHAR iProcessing; 425 UCHAR bNrModes; 426 UCHAR daModes[2 * 1]; 427 } UX_CLASS_AUDIO10_AC_DOLBY_PROCESSING_UNIT_DESCRIPTOR, UX_CLASS_AUDIO10_AC_DPD; 428 429 /* DPD::bmaControls. */ 430 #define UX_CLASS_AUDIO10_DPD_CONTROL_ENABLE (1u << 0) 431 #define UX_CLASS_AUDIO10_DPD_CONTROL_MODE_SELECT (1u << 1) 432 433 /* Define Audio Class 3D Stereo Extender (3D) Processing Unit Descriptor. */ 434 typedef UX_CLASS_AUDIO10_AC_PUD UX_CLASS_AUDIO10_AC_3D_STEREO_EXT_PROCESSING_UNIT_DESCRIPTOR; 435 typedef UX_CLASS_AUDIO10_AC_PUD UX_CLASS_AUDIO10_AC_3DD; 436 437 /* 3DD::bmaControls. */ 438 #define UX_CLASS_AUDIO10_3DD_CONTROL_ENABLE (1u << 0) 439 #define UX_CLASS_AUDIO10_3DD_CONTROL_MODE_SELECT (1u << 1) 440 441 /* Define Audio Class Reverberation (RV) Processing Unit Descriptor. */ 442 typedef UX_CLASS_AUDIO10_AC_PUD UX_CLASS_AUDIO10_AC_REVERBERATION_PROCESSING_UNIT_DESCRIPTOR; 443 typedef UX_CLASS_AUDIO10_AC_PUD UX_CLASS_AUDIO10_AC_RVD; 444 445 /* RVD::bmaControls. */ 446 #define UX_CLASS_AUDIO10_RVD_CONTROL_ENABLE (1u << 0) 447 #define UX_CLASS_AUDIO10_RVD_CONTROL_REVERB_TYPE (1u << 1) 448 #define UX_CLASS_AUDIO10_RVD_CONTROL_REVERB_LEVEL (1u << 2) 449 #define UX_CLASS_AUDIO10_RVD_CONTROL_REVERB_TIME (1u << 3) 450 #define UX_CLASS_AUDIO10_RVD_CONTROL_REVERB_DELAY_FEEDBACK (1u << 4) 451 452 /* Define Audio Class Chorus (CH) Processing Unit Descriptor. */ 453 typedef UX_CLASS_AUDIO10_AC_PUD UX_CLASS_AUDIO10_AC_CHORUS_PROCESSING_UNIT_DESCRIPTOR; 454 typedef UX_CLASS_AUDIO10_AC_PUD UX_CLASS_AUDIO10_AC_CHORUSD; 455 456 /* CHORUSD::bmaControls. */ 457 #define UX_CLASS_AUDIO10_CHORUSD_CONTROL_ENABLE (1u << 0) 458 #define UX_CLASS_AUDIO10_CHORUSD_CONTROL_CHORUS_LEVEL (1u << 1) 459 #define UX_CLASS_AUDIO10_CHORUSD_CONTROL_CHORUS_MODULATION_RATE (1u << 2) 460 #define UX_CLASS_AUDIO10_CHORUSD_CONTROL_CHORUS_MODULATION_DEPTH (1u << 3) 461 462 /* Define Audio Class Dynamic Range Compressor (DR) Processing Unit Descriptor. */ 463 typedef UX_CLASS_AUDIO10_AC_PUD UX_CLASS_AUDIO10_AC_DYN_RNG_COMP_PROCESSING_UNIT_DESCRIPTOR; 464 typedef UX_CLASS_AUDIO10_AC_PUD UX_CLASS_AUDIO10_AC_DRD; 465 466 /* DRD::bmaControls. */ 467 #define UX_CLASS_AUDIO10_DRD_CONTROL_ENABLE (1u << 0) 468 #define UX_CLASS_AUDIO10_DRD_CONTROL_COMPRESSION_RATIO (1u << 1) 469 #define UX_CLASS_AUDIO10_DRD_CONTROL_MAXAMPL (1u << 2) 470 #define UX_CLASS_AUDIO10_DRD_CONTROL_THRESHOLD (1u << 3) 471 #define UX_CLASS_AUDIO10_DRD_CONTROL_ATTACH_TIME (1u << 4) 472 #define UX_CLASS_AUDIO10_DRD_CONTROL_RELEASE_TIME (1u << 5) 473 474 /* Define Audio Class Extension unit descriptor (XUD, bNrInPins=1,bControlSize=1). */ 475 476 typedef struct UX_CLASS_AUDIO10_AC_EXTENSION_UNIT_DESCRIPTOR_STRUCT 477 { 478 UCHAR bLength; 479 UCHAR bDescriptorType; 480 UCHAR bDescriptorSubtype; 481 UCHAR bUnitID; 482 USHORT wExtensionCode; 483 UCHAR bNrInPins; 484 UCHAR baSourceID[1]; 485 UCHAR bNrChannels; 486 UCHAR wChannelConfig[2]; 487 UCHAR iChannelNames; 488 UCHAR bControlSize; 489 UCHAR bmControls[1]; 490 UCHAR iExtension; 491 } UX_CLASS_AUDIO10_AC_EXTENSION_UNIT_DESCRIPTOR, UX_CLASS_AUDIO10_AC_XUD; 492 493 /* XUD::bmaControls. */ 494 #define UX_CLASS_AUDIO10_XUD_CONTROL_ENABLE (1u << 0) 495 496 /* Define Audio Class Associated Interface descriptor (Association-specific x=1). */ 497 498 typedef struct UX_CLASS_AUDIO10_ASSOCIATED_INTERFACE_DESCRIPTOR_STRUCT 499 { 500 UCHAR bLength; 501 UCHAR bDescriptorType; 502 UCHAR bDescriptorSubtype; 503 UCHAR bInterfaceNr; 504 UCHAR assoc_specific; 505 } UX_CLASS_AUDIO10_ASSOCIATED_INTERFACE_DESCRIPTOR; 506 507 /* Define Audio Class Interrupt/Isochronous Endpoint Descriptor. */ 508 509 typedef struct UX_CLASS_AUDIO10_ENDPOINT_DESCRIPTOR_STRUCT 510 { 511 UCHAR bLength; 512 UCHAR bDescriptorType; 513 UCHAR bEndpointAddress; 514 UCHAR bmAttributes; 515 UCHAR wMaxPacketSize; 516 UCHAR bInterval; 517 UCHAR bRefresh; 518 UCHAR bSynchAddress; 519 } UX_CLASS_AUDIO10_ENDPOINT_DESCRIPTOR, UX_CLASS_AUDIO10_EPD; 520 521 /* Audio class-specific AS interface descriptor. */ 522 523 typedef struct UX_CLASS_AUDIO10_AS_INTERFACE_DESCRIPTOR_STRUCT 524 { 525 UCHAR bLength; 526 UCHAR bDescriptorType; 527 UCHAR bDescriptorSubtype; 528 UCHAR bTerminalLink; 529 UCHAR bDelay; 530 UCHAR wFormatTag[2]; 531 } UX_CLASS_AUDIO10_AS_INTERFACE_DESCRIPTOR, UX_CLASS_AUDIO10_AS_IFACED; 532 533 534 /* Audio class-specific isochronous audio data endpoint descriptor (EPD). */ 535 536 typedef struct UX_CLASS_AUDIO10_ISOCH_ENDPOINT_DESCRIPTOR_STRUCT 537 { 538 UCHAR bLength; 539 UCHAR bDescriptorType; 540 UCHAR bDescriptorSubtype; 541 UCHAR bmAttributes; 542 UCHAR bLockDelayUnits; 543 UCHAR wLockDelay[2]; 544 } UX_CLASS_AUDIO10_ISOCH_ENDPOINT_DESCRIPTOR, UX_CLASS_AUDIO10_ISOCH_EPD; 545 546 /* EPD::bmAttributes. */ 547 #define UX_CLASS_AUDIO10_ISOCH_EPD_ATTR_SAMPLING_FREQ (0x1u << 0) 548 #define UX_CLASS_AUDIO10_ISOCH_EPD_ATTR_PITCH (0x1u << 1) 549 #define UX_CLASS_AUDIO10_ISOCH_EPD_ATTR_MAX_PACKET_SIZE_ONLY (0x1u << 7) 550 551 /* EPD::bLockDelayUnits. */ 552 #define UX_CLASS_AUDIO10_EPD_LOCK_DELAY_UNITS_UNDEFINED 0 553 #define UX_CLASS_AUDIO10_EPD_LOCK_DELAY_UNITS_MS 1 554 #define UX_CLASS_AUDIO10_EPD_LOCK_DELAY_UNITS_DEC_PCM_SAMPLES 2 555 556 557 /* Audio class control request layout. */ 558 559 typedef struct UX_CLASS_AUDIO10_REQUEST_VALUE_CS_STRUCT { 560 UCHAR unused_zero; 561 UCHAR control_sel; /* Control Selector (CS) */ 562 } UX_CLASS_AUDIO10_REQUEST_VALUE_CS; 563 564 typedef struct UX_CLASS_AUDIO10_REQUEST_VALUE_MIXER_STRUCT { 565 UCHAR output_ch_num; /* Output Channel Number (OCN) */ 566 UCHAR input_ch_num; /* Input Channel Number (ICN) */ 567 } UX_CLASS_AUDIO10_REQUEST_VALUE_MIXER; 568 569 typedef struct UX_CLASS_AUDIO10_REQUEST_VALUE_CONTROL_STRUCT { 570 UCHAR unused_zero; 571 UCHAR cs; /* CS */ 572 } UX_CLASS_AUDIO10_REQUEST_VALUE_CONTROL; 573 574 typedef struct UX_CLASS_AUDIO10_REQUEST_INDEX_EP_STRUCT { 575 UCHAR ep_addr; /* Endpoint Address */ 576 UCHAR unused_zero; 577 } UX_CLASS_AUDIO10_REQUEST_INDEX_EP; 578 579 typedef struct UX_CLASS_AUDIO10_REQUEST_INDEX_INTERFACE_STRUCT { 580 UCHAR iface_num; /* Interface number */ 581 UCHAR entity_id; 582 } UX_CLASS_AUDIO10_REQUEST_INDEX_INTERFACE; 583 584 typedef struct UX_CLASS_AUDIO10_REQUEST_INDEX_CONTROL_STRUCT { 585 UCHAR ep_iface; /* Endpoint Address/Interface Number */ 586 UCHAR entity_id_zero; /* Entity ID/Zero */ 587 } UX_CLASS_AUDIO10_REQUEST_INDEX_CONTROL; 588 589 typedef struct UX_CLASS_AUDIO10_REQUEST_STRUCT 590 { 591 UCHAR bmRequestType; 592 UCHAR bRequest; 593 union UX_CLASS_AUDIO10_REQUEST_VALUE_UNION { 594 USHORT value; 595 UX_CLASS_AUDIO10_REQUEST_VALUE_CS 596 control_cs; 597 UX_CLASS_AUDIO10_REQUEST_VALUE_MIXER 598 control_mixer; 599 UX_CLASS_AUDIO10_REQUEST_VALUE_CONTROL 600 control; 601 USHORT mem_offset; 602 } wValue; 603 union UX_CLASS_AUDIO10_REQUEST_INDEX_UNION { 604 USHORT value; 605 UX_CLASS_AUDIO10_REQUEST_INDEX_EP 606 ep; 607 UX_CLASS_AUDIO10_REQUEST_INDEX_INTERFACE 608 iface; 609 UX_CLASS_AUDIO10_REQUEST_INDEX_CONTROL 610 control; 611 } wIndex; 612 USHORT wLength; 613 } UX_CLASS_AUDIO10_REQUEST; 614 615 /* Audio Class 1.0 Copy Protect Control Parameter */ 616 617 typedef struct UX_CLASS_AUDIO10_COPY_PROTECT_CONTROL_PARAMETER_STRUCT 618 { 619 UCHAR bCopyProtect; 620 } UX_CLASS_AUDIO10_COPY_PROTECT_CONTROL_PARAMETER; 621 622 #define UX_CLASS_AUDIO10_COPY_PROTECT_CONTROL_CPL0 (1u << 0) 623 #define UX_CLASS_AUDIO10_COPY_PROTECT_CONTROL_CPL1 (1u << 1) 624 #define UX_CLASS_AUDIO10_COPY_PROTECT_CONTROL_CPL2 (1u << 2) 625 626 /* Audio Class 1.0 Mixer Control Parameter (specific control or 0xFF) */ 627 628 typedef struct UX_CLASS_AUDIO10_MIXER_CONTROL_PARAMETER_STRUCT 629 { 630 USHORT wMixer; 631 } UX_CLASS_AUDIO10_MIXER_CONTROL_PARAMETER; 632 633 typedef struct UX_CLASS_AUDIO10_MIXER_CONTROL_PARAMETER_FF_STRUCT 634 { 635 USHORT wMixer[1]; 636 } UX_CLASS_AUDIO10_MIXER_CONTROL_PARAMETER_FF; 637 638 /* Audio Class 1.0 Selector Control Parameter */ 639 640 typedef struct UX_CLASS_AUDIO10_SELECTOR_CONTROL_PARAMETER_STRUCT 641 { 642 UCHAR bSelector; 643 } UX_CLASS_AUDIO10_SELECTOR_CONTROL_PARAMETER; 644 645 /* Audio Class 1.0 Mute Control Parameter (specific CH or 0xFF) */ 646 647 typedef struct UX_CLASS_AUDIO10_MUTE_CONTROL_PARAMETER_STRUCT 648 { 649 UCHAR bMute; 650 } UX_CLASS_AUDIO10_MUTE_CONTROL_PARAMETER; 651 652 typedef struct UX_CLASS_AUDIO10_MUTE_CONTROL_PARAMETER_FF_STRUCT 653 { 654 UCHAR bMute[1]; 655 } UX_CLASS_AUDIO10_MUTE_CONTROL_PARAMETER_FF; 656 657 /* Audio Class 1.0 Volume Control Parameter (specific CH or 0xFF) */ 658 659 typedef struct UX_CLASS_AUDIO10_VOLUME_CONTROL_PARAMETER_STRUCT 660 { 661 SHORT wVolume; 662 } UX_CLASS_AUDIO10_VOLUME_CONTROL_PARAMETER; 663 664 typedef struct UX_CLASS_AUDIO10_VOLUME_CONTROL_PARAMETER_FF_STRUCT 665 { 666 SHORT wVolume[1]; 667 } UX_CLASS_AUDIO10_VOLUME_CONTROL_PARAMETER_FF; 668 669 /* Audio Class 1.0 Bass Control Parameter (specific CH or 0xFF) */ 670 671 typedef struct UX_CLASS_AUDIO10_BASS_CONTROL_PARAMETER_STRUCT 672 { 673 UCHAR bBass; 674 } UX_CLASS_AUDIO10_BASS_CONTROL_PARAMETER; 675 676 typedef struct UX_CLASS_AUDIO10_BASS_CONTROL_PARAMETER_FF_STRUCT 677 { 678 UCHAR bBass[1]; 679 } UX_CLASS_AUDIO10_BASS_CONTROL_PARAMETER_FF; 680 681 /* Audio Class 1.0 Mid Control Parameter (specific CH or 0xFF) */ 682 683 typedef struct UX_CLASS_AUDIO10_MID_CONTROL_PARAMETER_STRUCT 684 { 685 UCHAR bMid; 686 } UX_CLASS_AUDIO10_MID_CONTROL_PARAMETER; 687 688 typedef struct UX_CLASS_AUDIO10_MID_CONTROL_PARAMETER_FF_STRUCT 689 { 690 UCHAR bMid[1]; 691 } UX_CLASS_AUDIO10_MID_CONTROL_PARAMETER_FF; 692 693 /* Audio Class 1.0 Treble Control Parameter (specific CH or 0xFF) */ 694 695 typedef struct UX_CLASS_AUDIO10_TREBLE_CONTROL_PARAMETER_STRUCT 696 { 697 UCHAR bTreble; 698 } UX_CLASS_AUDIO10_TREBLE_CONTROL_PARAMETER; 699 700 typedef struct UX_CLASS_AUDIO10_TREBLE_CONTROL_PARAMETER_FF_STRUCT 701 { 702 UCHAR bTreble[1]; 703 } UX_CLASS_AUDIO10_TREBLE_CONTROL_PARAMETER_FF; 704 705 /* Audio Class 1.0 Graphic Equalizer Control Parameter (NrBits=1) */ 706 707 typedef struct UX_CLASS_AUDIO10_GRAPHIC_EQ_CONTROL_PARAMETER_STRUCT 708 { 709 ULONG bmBandsPresent; 710 UCHAR bBand[1]; 711 } UX_CLASS_AUDIO10_GRAPHIC_EQ_CONTROL_PARAMETER; 712 713 /* Audio Class 1.0 Automatic Gain Control Parameter (specific CH or 0xFF) */ 714 715 typedef struct UX_CLASS_AUDIO10_AG_CONTROL_PARAMETER_STRUCT 716 { 717 UCHAR bAGC; 718 } UX_CLASS_AUDIO10_AG_CONTROL_PARAMETER; 719 720 typedef struct UX_CLASS_AUDIO10_AG_CONTROL_PARAMETER_FF_STRUCT 721 { 722 UCHAR bAGC[1]; 723 } UX_CLASS_AUDIO10_AG_CONTROL_PARAMETER_FF; 724 725 /* Audio Class 1.0 Delay Control Parameter (specific CH or 0xFF) */ 726 727 typedef struct UX_CLASS_AUDIO10_DELAY_CONTROL_PARAMETER_STRUCT 728 { 729 SHORT wDelay; 730 } UX_CLASS_AUDIO10_DELAY_CONTROL_PARAMETER; 731 732 typedef struct UX_CLASS_AUDIO10_DELAY_CONTROL_PARAMETER_FF_STRUCT 733 { 734 SHORT wDelay[1]; 735 } UX_CLASS_AUDIO10_DELAY_CONTROL_PARAMETER_FF; 736 737 /* Audio Class 1.0 BassBoost Control Parameter (specific CH or 0xFF) */ 738 739 typedef struct UX_CLASS_AUDIO10_BASSBOOST_CONTROL_PARAMETER_STRUCT 740 { 741 UCHAR bBassBoost; 742 } UX_CLASS_AUDIO10_BASSBOOST_CONTROL_PARAMETER; 743 744 typedef struct UX_CLASS_AUDIO10_BASSBOOST_CONTROL_PARAMETER_FF_STRUCT 745 { 746 UCHAR bBassBoost[1]; 747 } UX_CLASS_AUDIO10_BASSBOOST_CONTROL_PARAMETER_FF; 748 749 /* Audio Class 1.0 Loudness Control Parameter (specific CH or 0xFF) */ 750 751 typedef struct UX_CLASS_AUDIO10_LOUDNESS_CONTROL_PARAMETER_STRUCT 752 { 753 UCHAR bLoudness; 754 } UX_CLASS_AUDIO10_LOUDNESS_CONTROL_PARAMETER; 755 756 typedef struct UX_CLASS_AUDIO10_LOUDNESS_CONTROL_PARAMETER_FF_STRUCT 757 { 758 UCHAR bLoudness[1]; 759 } UX_CLASS_AUDIO10_LOUDNESS_CONTROL_PARAMETER_FF; 760 761 /* Audio Class 1.0 Enable Processing Control Parameter */ 762 763 typedef struct UX_CLASS_AUDIO10_ENABLE_PROCESSING_CONTROL_PARAMETER_STRUCT 764 { 765 UCHAR bEnable; 766 } UX_CLASS_AUDIO10_ENABLE_PROCESSING_CONTROL_PARAMETER; 767 768 /* Audio Class 1.0 Spaciousness Control Parameter */ 769 770 typedef struct UX_CLASS_AUDIO10_SPACIOUSNESS_CONTROL_PARAMETER_STRUCT 771 { 772 UCHAR bSpaciousness; 773 } UX_CLASS_AUDIO10_SPACIOUSNESS_CONTROL_PARAMETER; 774 775 /* Audio Class 1.0 ReverbType Control Parameter */ 776 777 typedef struct UX_CLASS_AUDIO10_REVERB_TYPE_CONTROL_PARAMETER_STRUCT 778 { 779 UCHAR bReverbType; 780 } UX_CLASS_AUDIO10_REVERB_TYPE_CONTROL_PARAMETER; 781 782 #define UX_CLASS_AUDIO10_REVERB_TYPE_ROOM_1 0 783 #define UX_CLASS_AUDIO10_REVERB_TYPE_SMALL_ROOM 0 784 #define UX_CLASS_AUDIO10_REVERB_TYPE_ROOM_2 1 785 #define UX_CLASS_AUDIO10_REVERB_TYPE_MEDIUM_ROOM 1 786 #define UX_CLASS_AUDIO10_REVERB_TYPE_ROOM_3 2 787 #define UX_CLASS_AUDIO10_REVERB_TYPE_LARGE_ROOM 2 788 #define UX_CLASS_AUDIO10_REVERB_TYPE_HALL_1 3 789 #define UX_CLASS_AUDIO10_REVERB_TYPE_MEDIUM_CONCERT_HALL 3 790 #define UX_CLASS_AUDIO10_REVERB_TYPE_HALL_2 4 791 #define UX_CLASS_AUDIO10_REVERB_TYPE_LARGE_CONCERT_HALL 4 792 #define UX_CLASS_AUDIO10_REVERB_TYPE_PLATE 5 793 #define UX_CLASS_AUDIO10_REVERB_TYPE_PLATE_REVERBERATION 5 794 #define UX_CLASS_AUDIO10_REVERB_TYPE_DELAY 6 795 #define UX_CLASS_AUDIO10_REVERB_TYPE_PANNING_DELAY 7 796 797 /* Audio Class 1.0 ReverbLevel Control Parameter */ 798 799 typedef struct UX_CLASS_AUDIO10_REVERB_LEVEL_CONTROL_PARAMETER_STRUCT 800 { 801 UCHAR bReverbLevel; 802 } UX_CLASS_AUDIO10_REVERB_LEVEL_CONTROL_PARAMETER; 803 804 /* Audio Class 1.0 ReverTime Control Parameter */ 805 806 typedef struct UX_CLASS_AUDIO10_REVERB_TIME_CONTROL_PARAMETER_STRUCT 807 { 808 USHORT wReverTime; 809 } UX_CLASS_AUDIO10_REVERB_TIME_CONTROL_PARAMETER; 810 811 /* Audio Class 1.0 ReverbDelayFeedback Control Parameter */ 812 813 typedef struct UX_CLASS_AUDIO10_REVERB_FEEDBACK_CONTROL_PARAMETER_STRUCT 814 { 815 UCHAR bReverbFeedback; 816 } UX_CLASS_AUDIO10_REVERB_FEEDBACK_CONTROL_PARAMETER; 817 818 /* Audio Class 1.0 ChorusLevel Control Parameter */ 819 820 typedef struct UX_CLASS_AUDIO10_CHORUS_LEVEL_CONTROL_PARAMETER_STRUCT 821 { 822 UCHAR bChorusLevel; 823 } UX_CLASS_AUDIO10_CHORUS_LEVEL_CONTROL_PARAMETER; 824 825 /* Audio Class 1.0 ChorusRate Control Parameter */ 826 827 typedef struct UX_CLASS_AUDIO10_CHORUS_RATE_CONTROL_PARAMETER_STRUCT 828 { 829 USHORT wChorusRate; 830 } UX_CLASS_AUDIO10_CHORUS_RATE_CONTROL_PARAMETER; 831 832 /* Audio Class 1.0 ChorusModulationDepth Control Parameter */ 833 834 typedef struct UX_CLASS_AUDIO10_CHORUS_DEPTH_CONTROL_PARAMETER_STRUCT 835 { 836 USHORT wChorusDepth; 837 } UX_CLASS_AUDIO10_CHORUS_DEPTH_CONTROL_PARAMETER; 838 839 /* Audio Class 1.0 Dynamic Range Compressor Compression Ratio Control Parameter */ 840 841 typedef struct UX_CLASS_AUDIO10_COMPRESSION_RATIO_CONTROL_PARAMETER_STRUCT 842 { 843 USHORT wRatio; 844 } UX_CLASS_AUDIO10_COMPRESSION_RATIO_CONTROL_PARAMETER; 845 846 /* Audio Class 1.0 Dynamic Range Compressor MaxAmpl Control Parameter */ 847 848 typedef struct UX_CLASS_AUDIO10_MAXAMPL_CONTROL_PARAMETER_STRUCT 849 { 850 USHORT wMaxAmpl; 851 } UX_CLASS_AUDIO10_MAXAMPL_CONTROL_PARAMETER; 852 853 /* Audio Class 1.0 Dynamic Range Compressor Threshold Control Parameter */ 854 855 typedef struct UX_CLASS_AUDIO10_THRESHOLD_CONTROL_PARAMETER_STRUCT 856 { 857 USHORT wThreshold; 858 } UX_CLASS_AUDIO10_THRESHOLD_CONTROL_PARAMETER; 859 860 /* Audio Class 1.0 Dynamic Range Compressor AttachTime Control Parameter */ 861 862 typedef struct UX_CLASS_AUDIO10_ATTACK_TIME_CONTROL_PARAMETER_STRUCT 863 { 864 USHORT wAttachTime; 865 } UX_CLASS_AUDIO10_ATTACK_TIME_CONTROL_PARAMETER; 866 867 /* Audio Class 1.0 Dynamic Range Compressor ReleaseTime Control Parameter */ 868 869 typedef struct UX_CLASS_AUDIO10_RELEASE_TIME_CONTROL_PARAMETER_STRUCT 870 { 871 USHORT wReleaseTime; 872 } UX_CLASS_AUDIO10_RELEASE_TIME_CONTROL_PARAMETER; 873 874 /* Audio Class 1.0 Enable Processing Control (XU_ENABLE_CONTROL) Parameter */ 875 876 typedef struct UX_CLASS_AUDIO10_XU_ENABLE_CONTROL_PARAMETER_STRUCT 877 { 878 UCHAR bOn; 879 } UX_CLASS_AUDIO10_XU_ENABLE_CONTROL_PARAMETER; 880 881 /* Audio Class 1.0 Sampling Frequency Control (SAMPLING_FREQ_CONTROL) Parameter */ 882 883 typedef struct UX_CLASS_AUDIO10_SAMPLING_FREQ_CONTROL_PARAMETER_STRUCT 884 { 885 UCHAR tSampleFreq[3]; 886 } UX_CLASS_AUDIO10_SAMPLING_FREQ_CONTROL_PARAMETER; 887 888 /* Audio Class 1.0 Pitch Control (PITCH_CONTROL) Parameter */ 889 890 typedef struct UX_CLASS_AUDIO10_PITCH_CONTROL_PARAMETER_STRUCT 891 { 892 UCHAR bPitchEnable; 893 } UX_CLASS_AUDIO10_PITCH_CONTROL_PARAMETER; 894 895 /* Audio Class 1.0 Continuous Sampling Frequency. */ 896 897 typedef struct UX_CLASS_AUDIO10_CONTINUOUS_SAMPLING_FREQ_STRUCT 898 { 899 UCHAR tLowerSamFreq[3]; 900 UCHAR tUpperSamFreq[3]; 901 } UX_CLASS_AUDIO10_CONTINUOUS_SAMPLING_FREQ; 902 903 /* Audio Class 1.0 Discrete Sampling Frequency (N=1). */ 904 905 typedef struct UX_CLASS_AUDIO10_DISCRETE_SAMPLING_FREQ_STRUCT 906 { 907 UCHAR tSamFreq[3 * 1]; 908 } UX_CLASS_AUDIO10_DISCRETE_SAMPLING_FREQ; 909 910 /* Audio Class 1.0 Type I Format Type Descriptor */ 911 912 typedef struct UX_CLASS_AUDIO10_TYPE_I_FORMAT_TYPE_DESCRIPTOR_STRUCT 913 { 914 UCHAR bLength; 915 UCHAR bDescriptorType; 916 UCHAR bDescriptorSubtype; 917 UCHAR bFormatType; 918 UCHAR bNrChannels; 919 UCHAR bSubframeSize; 920 UCHAR bBitResolution; 921 UCHAR bSamFreqType; 922 } UX_CLASS_AUDIO10_TYPE_I_FORMAT_TYPE_DESCRIPTOR; 923 924 typedef struct UX_CLASS_AUDIO10_TYPE_I_FORMAT_TYPE_CONTINUOUS_DESCRIPTOR_STRUCT 925 { 926 UCHAR bLength; 927 UCHAR bDescriptorType; 928 UCHAR bDescriptorSubtype; 929 UCHAR bFormatType; 930 UCHAR bNrChannels; 931 UCHAR bSubframeSize; 932 UCHAR bBitResolution; 933 UCHAR bSamFreqType; /* 0 */ 934 UCHAR tLowerSamFreq[3]; 935 UCHAR tUpperSamFreq[3]; 936 } 937 UX_CLASS_AUDIO10_TYPE_I_FORMAT_TYPE_CONTINUOUS_DESCRIPTOR, 938 UX_CLASS_AUDIO10_TYPE_I_FORMAT_TYPE_DESCRIPTOR_0; 939 940 typedef struct UX_CLASS_AUDIO10_TYPE_I_FORMAT_TYPE_DISCRETE_DESCRIPTOR_STRUCT 941 { 942 UCHAR bLength; 943 UCHAR bDescriptorType; 944 UCHAR bDescriptorSubtype; 945 UCHAR bFormatType; 946 UCHAR bNrChannels; 947 UCHAR bSubframeSize; 948 UCHAR bBitResolution; 949 UCHAR bSamFreqType; /* 1 */ 950 UCHAR tSamFreq[3 * 1]; 951 } 952 UX_CLASS_AUDIO10_TYPE_I_FORMAT_TYPE_DISCRETE_DESCRIPTOR, 953 UX_CLASS_AUDIO10_TYPE_I_FORMAT_TYPE_DESCRIPTOR_1; 954 955 typedef struct UX_CLASS_AUDIO10_TYPE_II_FORMAT_TYPE_DESCRIPTOR_STRUCT 956 { 957 UCHAR bLength; 958 UCHAR bDescriptorType; 959 UCHAR bDescriptorSubtype; 960 UCHAR bFormatType; 961 USHORT wMaxBitRate; 962 USHORT wSamplesPerFrame; 963 UCHAR bSamFreqType; 964 } UX_CLASS_AUDIO10_TYPE_II_FORMAT_TYPE_DESCRIPTOR; 965 966 typedef struct UX_CLASS_AUDIO10_TYPE_II_FORMAT_TYPE_CONTINUOUS_DESCRIPTOR_STRUCT 967 { 968 UCHAR bLength; 969 UCHAR bDescriptorType; 970 UCHAR bDescriptorSubtype; 971 UCHAR bFormatType; 972 USHORT wMaxBitRate; 973 USHORT wSamplesPerFrame; 974 UCHAR bSamFreqType; /* 0 */ 975 UCHAR tLowerSamFreq[3]; 976 UCHAR tUpperSamFreq[3]; 977 } 978 UX_CLASS_AUDIO10_TYPE_II_FORMAT_TYPE_CONTINUOUS_DESCRIPTOR, 979 UX_CLASS_AUDIO10_TYPE_II_FORMAT_TYPE_DESCRIPTOR_0; 980 981 typedef struct UX_CLASS_AUDIO10_TYPE_II_FORMAT_TYPE_DISCRETE_DESCRIPTOR_STRUCT 982 { 983 UCHAR bLength; 984 UCHAR bDescriptorType; 985 UCHAR bDescriptorSubtype; 986 UCHAR bFormatType; 987 USHORT wMaxBitRate; 988 USHORT wSamplesPerFrame; 989 UCHAR bSamFreqType; /* 1 */ 990 UCHAR tSamFreq[3 * 1]; 991 } 992 UX_CLASS_AUDIO10_TYPE_II_FORMAT_TYPE_DISCRETE_DESCRIPTOR, 993 UX_CLASS_AUDIO10_TYPE_II_FORMAT_TYPE_DESCRIPTOR_1; 994 995 996 /* Audio Class 1.0 MPEG (MP) Format-Specific Descriptor (MPEGD) */ 997 998 typedef struct UX_CLASS_AUDIO10_MPEG_DESCRIPTOR_STRUCT 999 { 1000 UCHAR bLength; 1001 UCHAR bDescriptorType; 1002 UCHAR bDescriptorSubtype; 1003 UCHAR wFormatTag[2]; 1004 UCHAR bmMPEGCapabilities[2]; 1005 UCHAR bmMPEGFeatures; 1006 } UX_CLASS_AUDIO10_MPEG_DESCRIPTOR, UX_CLASS_AUDIO10_MPEGD; 1007 1008 /* MPEG::bmMPEGCapabilities. */ 1009 #define UX_CLASS_AUDIO10_MPEGD_CAP_LAYER_MASK (0x7u << 0) 1010 #define UX_CLASS_AUDIO10_MPEGD_CAP_LAYER_I (0x1u << 0) 1011 #define UX_CLASS_AUDIO10_MPEGD_CAP_LAYER_II (0x1u << 1) 1012 #define UX_CLASS_AUDIO10_MPEGD_CAP_LAYER_III (0x1u << 2) 1013 #define UX_CLASS_AUDIO10_MPEGD_CAP_MPEG1_ONLY (0x1u << 3) 1014 #define UX_CLASS_AUDIO10_MPEGD_CAP_MPEG1_DUAL_CH (0x1u << 4) 1015 #define UX_CLASS_AUDIO10_MPEGD_CAP_MPEG2_STEREO (0x1u << 5) 1016 #define UX_CLASS_AUDIO10_MPEGD_CAP_MPEG2_7_1_CH (0x1u << 6) 1017 #define UX_CLASS_AUDIO10_MPEGD_CAP_ADAPTIVE_MULTI_CH_PREDICT (0x1u << 7) 1018 #define UX_CLASS_AUDIO10_MPEGD_CAP_MPEG2_MULTILINGUAL_MASK (0x3u << 8) 1019 #define UX_CLASS_AUDIO10_MPEGD_CAP_MPEG2_MULTI_NOT_SUPPORT (0x0u << 8) 1020 #define UX_CLASS_AUDIO10_MPEGD_CAP_MPEG2_MULTI_FS (0x1u << 8) 1021 #define UX_CLASS_AUDIO10_MPEGD_CAP_MPEG2_MULTI_FS_HALF_FS (0x3u << 8) 1022 1023 /* MPEG::bmMPEGFeatures. */ 1024 #define UX_CLASS_AUDIO10_MPEGD_FEAT_IDYN_RNG_CTRL_MASK (0x3u << 4) /* Internal Dynamic Range Control */ 1025 #define UX_CLASS_AUDIO10_MPEGD_FEAT_IDYN_RNG_CTRL_NOT_SUP (0x0u << 4) /* Not support */ 1026 #define UX_CLASS_AUDIO10_MPEGD_FEAT_IDYN_RNG_CTRL_NOT_SCAL (0x1u << 4) /* Not scalable */ 1027 #define UX_CLASS_AUDIO10_MPEGD_FEAT_IDYN_RNG_CTRL_SCAL_COMMON (0x2u << 4) /* Common boost and cut scaling value */ 1028 #define UX_CLASS_AUDIO10_MPEGD_FEAT_IDYN_RNG_CTRL_SCAL_SEPARA (0x3u << 4) /* Separate boost and cut scaling value */ 1029 1030 /* Audio Class 1.0 Dual Channel Control */ 1031 1032 typedef struct UX_CLASS_AUDIO10_MP_DUAL_CHANNEL_CONTROL_PARAMETER_STRUCT 1033 { 1034 UCHAR BChannel2Enable; 1035 } UX_CLASS_AUDIO10_MP_DUAL_CHANNEL_CONTROL_PARAMETER; 1036 1037 /* Audio Class 1.0 Second Stereo Control */ 1038 1039 typedef struct UX_CLASS_AUDIO10_MP_2ND_STEREO_CONTROL_PARAMETER_STRUCT 1040 { 1041 UCHAR B2ndStereoEnable; 1042 } UX_CLASS_AUDIO10_MP_2ND_STEREO_CONTROL_PARAMETER; 1043 1044 /* Audio Class 1.0 Multilingual Control */ 1045 1046 typedef struct UX_CLASS_AUDIO10_MP_MULTILINGUAL_CONTROL_PARAMETER_STRUCT 1047 { 1048 UCHAR bMultiLingual; 1049 } UX_CLASS_AUDIO10_MP_MULTILINGUAL_CONTROL_PARAMETER; 1050 1051 /* bMultiLingual */ 1052 #define UX_CLASS_AUDIO10_MP_MULTILINGUAL_DECODE_NO_CHANNEL 0 1053 #define UX_CLASS_AUDIO10_MP_MULTILINGUAL_DECODE_CHANNEL_1 1 1054 #define UX_CLASS_AUDIO10_MP_MULTILINGUAL_DECODE_CHANNEL_2 2 1055 #define UX_CLASS_AUDIO10_MP_MULTILINGUAL_DECODE_CHANNEL_3 3 1056 #define UX_CLASS_AUDIO10_MP_MULTILINGUAL_DECODE_CHANNEL_4 4 1057 #define UX_CLASS_AUDIO10_MP_MULTILINGUAL_DECODE_CHANNEL_5 5 1058 #define UX_CLASS_AUDIO10_MP_MULTILINGUAL_DECODE_CHANNEL_6 6 1059 #define UX_CLASS_AUDIO10_MP_MULTILINGUAL_DECODE_CHANNEL_7 7 1060 1061 /* Audio Class 1.0 Dynamic Range Control (MP_DYN_RANGE_CONTROL) */ 1062 1063 typedef struct UX_CLASS_AUDIO10_MP_DYN_RANGE_CONTROL_PARAMETER_STRUCT 1064 { 1065 UCHAR bEnable; 1066 } UX_CLASS_AUDIO10_MP_DYN_RANGE_CONTROL_PARAMETER; 1067 1068 /* Audio Class 1.0 Scaling Control */ 1069 1070 typedef struct UX_CLASS_AUDIO10_MP_SCALING_CONTROL_PARAMETER_STRUCT 1071 { 1072 UCHAR bScale; 1073 } UX_CLASS_AUDIO10_MP_SCALING_CONTROL_PARAMETER; 1074 1075 /* Audio Class 1.0 High/Low (HILO) Scaling Control */ 1076 1077 typedef struct UX_CLASS_AUDIO10_MP_HILO_SCALING_CONTROL_PARAMETER_STRUCT 1078 { 1079 UCHAR bLowScale; 1080 UCHAR bHighScale; 1081 } UX_CLASS_AUDIO10_MP_HILO_SCALING_CONTROL_PARAMETER; 1082 1083 1084 /* Audio Class 1.0 AC-3 Format Descriptor */ 1085 1086 typedef struct UX_CLASS_AUDIO10_AS_AC_DESCRIPTOR_STRUCT 1087 { 1088 UCHAR bLength; 1089 UCHAR bDescriptorType; 1090 UCHAR bDescriptorSubType; 1091 UCHAR wFormatTag[2]; 1092 UCHAR bmBSID[4]; 1093 UCHAR bmAC3Features; 1094 } UX_CLASS_AUDIO10_AS_AC_DESCRIPTOR, UX_CLASS_AUDIO10_AS_ACD; 1095 1096 /* AC3 DECODER::bmAC3Features. */ 1097 #define UX_CLASS_AUDIO10_ACD_FEAT_RF_MODE (0x1u << 0) 1098 #define UX_CLASS_AUDIO10_ACD_FEAT_LINE_MODE (0x1u << 1) 1099 #define UX_CLASS_AUDIO10_ACD_FEAT_CUSTOM0_MODE (0x1u << 2) 1100 #define UX_CLASS_AUDIO10_ACD_FEAT_CUSTOM1_MODE (0x1u << 3) 1101 #define UX_CLASS_AUDIO10_ACD_FEAT_IDYN_RNG_CTRL_MASK (0x3u << 4) /* Internal Dynamic Range Control */ 1102 #define UX_CLASS_AUDIO10_ACD_FEAT_IDYN_RNG_CTRL_NOT_SUP (0x0u << 4) /* Not support */ 1103 #define UX_CLASS_AUDIO10_ACD_FEAT_IDYN_RNG_CTRL_NOT_SCAL (0x3u << 4) /* Not scalable */ 1104 #define UX_CLASS_AUDIO10_ACD_FEAT_IDYN_RNG_CTRL_SCAL_COMMON (0x3u << 4) /* Common boost and cut scaling value */ 1105 #define UX_CLASS_AUDIO10_ACD_FEAT_IDYN_RNG_CTRL_SCAL_SEPARATE (0x3u << 4) /* Separate boost and cut scaling value */ 1106 1107 /* Audio Class 1.0 AC-3 Mode Control (AC_MODE_CONTROL) */ 1108 1109 typedef struct UX_CLASS_AUDIO10_AS_AC_MODE_CONTROL_PARAMETER_STRUCT 1110 { 1111 UCHAR bMode; 1112 } UX_CLASS_AUDIO10_AS_AC_MODE_CONTROL_PARAMETER; 1113 1114 /* AC-3 Compression Mode Control. */ 1115 #define UX_CLASS_AUDIO10_AC_MODE_RF (0x1u << 0) 1116 #define UX_CLASS_AUDIO10_AC_MODE_LINE (0x1u << 1) 1117 #define UX_CLASS_AUDIO10_AC_MODE_CUSTOM0 (0x1u << 2) 1118 #define UX_CLASS_AUDIO10_AC_MODE_CUSTOM1 (0x1u << 3) 1119 1120 /* Audio Class 1.0 AC-3 Dynamic Range Control (AC_DYN_RANGE_CONTROL) */ 1121 1122 typedef struct UX_CLASS_AUDIO10_AS_AC_DYN_RANGE_CONTROL_PARAMETER_STRUCT 1123 { 1124 UCHAR bMode; 1125 } UX_CLASS_AUDIO10_AS_AC_DYN_RANGE_CONTROL_PARAMETER; 1126 1127 /* Audio Class 1.0 AC-3 Scaling Control (AC_SCALING_CONTROL) */ 1128 1129 typedef struct UX_CLASS_AUDIO10_AS_AC_SCALING_CONTROL_PARAMETER_STRUCT 1130 { 1131 UCHAR bScale; 1132 } UX_CLASS_AUDIO10_AS_AC_SCALING_CONTROL_PARAMETER; 1133 1134 /* Audio Class 1.0 AC-3 High/Low Scaling Control (AC_HILO_SCALING_CONTROL) */ 1135 1136 typedef struct UX_CLASS_AUDIO10_AS_AC_HILO_SCALING_CONTROL_PARAMETER_STRUCT 1137 { 1138 UCHAR bLowScale; 1139 UCHAR bHighScale; 1140 } UX_CLASS_AUDIO10_AS_AC_HILO_SCALING_CONTROL_PARAMETER; 1141 1142 typedef struct UX_CLASS_AUDIO10_TYPE_III_FORMAT_TYPE_DESCRIPTOR_STRUCT 1143 { 1144 UCHAR bLength; 1145 UCHAR bDescriptorType; 1146 UCHAR bDescriptorSubtype; 1147 UCHAR bFormatType; 1148 UCHAR bNrChannels; 1149 UCHAR bSubframeSize; 1150 UCHAR bBitResolution; 1151 UCHAR bSamFreqType; 1152 } UX_CLASS_AUDIO10_TYPE_III_FORMAT_TYPE_DESCRIPTOR; 1153 1154 typedef struct UX_CLASS_AUDIO10_TYPE_III_FORMAT_TYPE_CONTINUOUS_DESCRIPTOR_STRUCT 1155 { 1156 UCHAR bLength; 1157 UCHAR bDescriptorType; 1158 UCHAR bDescriptorSubtype; 1159 UCHAR bFormatType; 1160 UCHAR bNrChannels; 1161 UCHAR bSubframeSize; 1162 UCHAR bBitResolution; 1163 UCHAR bSamFreqType; /* 0 */ 1164 UCHAR tLowerSamFreq[3]; 1165 UCHAR tUpperSamFreq[3]; 1166 } 1167 UX_CLASS_AUDIO10_TYPE_III_FORMAT_TYPE_CONTINUOUS_DESCRIPTOR, 1168 UX_CLASS_AUDIO10_TYPE_III_FORMAT_TYPE_DESCRIPTOR_0; 1169 1170 typedef struct UX_CLASS_AUDIO10_TYPE_III_FORMAT_TYPE_DISCRETE_DESCRIPTOR_STRUCT 1171 { 1172 UCHAR bLength; 1173 UCHAR bDescriptorType; 1174 UCHAR bDescriptorSubtype; 1175 UCHAR bFormatType; 1176 UCHAR bNrChannels; 1177 UCHAR bSubframeSize; 1178 UCHAR bBitResolution; 1179 UCHAR bSamFreqType; /* 1 */ 1180 UCHAR tSamFreq[3 * 1]; 1181 } 1182 UX_CLASS_AUDIO10_TYPE_III_FORMAT_TYPE_DISCRETE_DESCRIPTOR, 1183 UX_CLASS_AUDIO10_TYPE_III_FORMAT_TYPE_DESCRIPTOR_1; 1184 1185 /* Audio Class 1.0 Interrupt Status Word */ 1186 typedef struct UX_CLASS_AUDIO10_INT_STATUS_STRUCT 1187 { 1188 UCHAR bStatusType; 1189 UCHAR bOriginator; 1190 } UX_CLASS_AUDIO10_INT_STATUS; 1191 1192 /* Status Word::bStatusType. */ 1193 #define UX_CLASS_AUDIO10_INT_STATUS_TYPE_PENDING (0x1u << 7) 1194 #define UX_CLASS_AUDIO10_INT_STATUS_TYPE_MEM_CHANGED (0x1u << 6) 1195 #define UX_CLASS_AUDIO10_INT_STATUS_TYPE_ORIGINATOR_MASK (0xFu << 0) 1196 #define UX_CLASS_AUDIO10_INT_STATUS_TYPE_ORIGINATOR_AC (0x0u << 0) /* AudioControl interface */ 1197 #define UX_CLASS_AUDIO10_INT_STATUS_TYPE_ORIGINATOR_AS (0x1u << 0) /* AudioStreaming interface */ 1198 #define UX_CLASS_AUDIO10_INT_STATUS_TYPE_ORIGINATOR_AS_EP (0x2u << 0) /* AudioStreaming endpoint */ 1199 1200 1201 #endif 1202