/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_USB_AUDIO_H
#define _SYS_USB_AUDIO_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* macros from audio spec 1.0
*
* audio class-specific descriptor types (Appendix A.4)
*/
/* audio class-specific AC Interface Descriptor Subtypes (A.5) */
/* audio class-specific AS Interface descriptor Subtypes (A.6) */
/* Processing Uniti Process Types (A.7) */
/* Audio Class-specific endpoint descriptor Subtypes (A.8) */
/* Audio Class-specific Request Codes */
/* Terminal Control Selectors (A.10.1) */
/* Feature Unit Control Selectors (A.1.10.2) */
/* the spec defines volume control value of 0x8000 as silence */
/* Dolby Prologic Processing Unit Control Selectors (A.10.3.2) */
/* Reverberation Processing Unit Control Selectors (A.10.3.3) */
/* Chorus Processing Unit Control Selectors (A.10.3.5) */
/* Dynamic range compressor Processing Unit Control Selectors (A.10.3.6) */
/* Extension Unit Control Selectors (A.10.4) */
/* Endpoint Control Selectors (A.10.5) */
/* descriptors */
/* Class specific AC interface header descriptor (4.3.2) */
typedef struct usb_audio_cs_if_descr {
/* input terminal descriptor (4.3.2.1) */
typedef struct usb_audio_input_term_descr {
/* output terminal descriptor (4.3.2.2) */
typedef struct usb_audio_output_term_descr {
/*
* mixer unit descriptor (4.3.2.3)
* this is awkward descriptors because of the variable size array in
* the middle (baSourceID).
*/
typedef struct usb_audio_mixer_unit_descr1 {
typedef struct usb_audio_mixer_unit_descr2 {
typedef struct usb_audio_mixer_unit_descr3 {
/* selector unit descriptor (4.3.2.4) */
typedef struct usb_audio_selector_unit_descr1 {
typedef struct usb_audio_selector_unit_descr2 {
/* feature unit descriptor (4.3.2.5) */
typedef struct usb_audio_feature_unit_descr1 {
typedef struct usb_audio_feature_unit_descr2 {
/* processing unit descriptor (4.3.2.6) */
typedef struct usb_audio_processing_unit_descr1 {
typedef struct usb_audio_processing_unit_descr2 {
typedef struct usb_audio_processing_unit_descr3 {
/* extension unit descriptor (4.3.2.7) */
typedef struct usb_audio_extension_unit_descr1 {
typedef struct usb_audio_extension_unit_descr2 {
typedef struct usb_audio_extension_unit_descr3 {
/* associated interface descriptor (4.3.2.8) */
typedef struct usb_audio_associated_if_descr {
/*
* class specific AS interface descriptor (4.5.2)
*/
typedef struct usb_audio_as_if_descr {
/* class specific AS isochronous audio data ep descr (4.6.1.2) */
typedef struct usb_audio_as_isoc_ep_descr {
/*
* data format descriptor, no need for parse format since
* all fields are chars
*/
typedef struct usb_audio_type1_format_descr {
/* audio data format codes */
/* format specific control selectors */
/* From USB Device Class Definition for Terminal Types */
/* USB Terminal Types (2.1) */
/* Input term types (2.2) */
/* output term types (2.3) */
/* bi-directional terminal types (2.4) */
/* telephony terminal types (2.5) */
/* external terminal types (2.6) */
/* embedded function term types (2.7) */
#define USB_AUDIO_MIN_PKTSZ 0
#define USB_AUDIO_MUTE_OFF 0
#ifdef __cplusplus
}
#endif
#endif /* _SYS_USB_AUDIO_H */