usb_mixer.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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
* or http://www.opensolaris.org/os/licensing.
* 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 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_USB_MIXER_H
#define _SYS_USB_MIXER_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define USB_AUDIO_MIXER_REGISTRATION 1
/* Valid for the current alternate */
typedef struct usb_audio_formats {
uchar_t fmt_alt; /* current alternate */
uchar_t fmt_chns; /* MONO or STEREO */
uchar_t fmt_precision; /* 8 or 16 */
uchar_t fmt_encoding; /* AUDIO_ENCODING_LINEAR, etc. */
uchar_t fmt_termlink; /* for feature unit */
uint_t fmt_sr; /* current sample rate */
} usb_audio_formats_t;
_NOTE(SCHEME_PROTECTS_DATA("unshared", usb_audio_formats))
typedef struct usb_audio_play_req {
int up_samples;
audiohdl_t up_handle;
} usb_audio_play_req_t;
#define USB_AS_N_SRS 20
#define USB_AS_N_FORMATS 20
#define USB_AS_N_COMBINATIONS USB_AS_N_FORMATS
#define USB_AS_N_CHANNELS 3
typedef struct usb_as_registration {
uchar_t reg_valid;
uchar_t reg_mode; /* play or record */
uchar_t reg_n_formats;
int reg_ifno;
am_ad_sample_rates_t reg_mixer_srs;
am_ad_sample_rates_t reg_compat_srs;
uint_t reg_mixer_srs_list[USB_AS_N_SRS];
uint_t reg_compat_srs_list[USB_AS_N_SRS];
usb_audio_formats_t reg_formats[USB_AS_N_FORMATS];
uint_t reg_channels[USB_AS_N_CHANNELS];
am_ad_cap_comb_t reg_combinations[USB_AS_N_COMBINATIONS];
} usb_as_registration_t;
/* MCTLs between usb_ac and usb_as */
#define USB_AUDIO_SETUP 0x0100
#define USB_AUDIO_TEARDOWN 0x0200
#define USB_AUDIO_START_PLAY 0x0300
#define USB_AUDIO_STOP_PLAY 0x0400
#define USB_AUDIO_PAUSE_PLAY 0x0500
#define USB_AUDIO_START_RECORD 0x0600
#define USB_AUDIO_STOP_RECORD 0x0700
#define USB_AUDIO_SET_FORMAT 0x0800
#define USB_AUDIO_SET_SAMPLE_FREQ 0x0900
/* MCTLs between usb_ac and usb_ah */
#define USB_AUDIO_VOL_CHANGE 0x1
#define USB_AUDIO_BALANCE 0x2
#define USB_AUDIO_MUTE 0x3
#define USB_AUDIO_BASS 0x4
#define USB_AUDIO_TREBLE 0x5
#ifdef __cplusplus
}
#endif
#endif /* _SYS_USB_MIXER_H */