10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 57492SZhigang.Lu@Sun.COM * Common Development and Distribution License (the "License"). 67492SZhigang.Lu@Sun.COM * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 229484Sgarrett.damore@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _SYS_USB_MIXER_H 270Sstevel@tonic-gate #define _SYS_USB_MIXER_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate 300Sstevel@tonic-gate 310Sstevel@tonic-gate #ifdef __cplusplus 320Sstevel@tonic-gate extern "C" { 330Sstevel@tonic-gate #endif 340Sstevel@tonic-gate 350Sstevel@tonic-gate #define USB_AUDIO_MIXER_REGISTRATION 1 360Sstevel@tonic-gate 370Sstevel@tonic-gate /* Valid for the current alternate */ 380Sstevel@tonic-gate typedef struct usb_audio_formats { 390Sstevel@tonic-gate uchar_t fmt_alt; /* current alternate */ 400Sstevel@tonic-gate uchar_t fmt_chns; /* MONO or STEREO */ 410Sstevel@tonic-gate uchar_t fmt_precision; /* 8 or 16 */ 420Sstevel@tonic-gate uchar_t fmt_encoding; /* AUDIO_ENCODING_LINEAR, etc. */ 430Sstevel@tonic-gate uchar_t fmt_termlink; /* for feature unit */ 440Sstevel@tonic-gate uint_t fmt_sr; /* current sample rate */ 450Sstevel@tonic-gate } usb_audio_formats_t; 460Sstevel@tonic-gate 470Sstevel@tonic-gate _NOTE(SCHEME_PROTECTS_DATA("unshared", usb_audio_formats)) 480Sstevel@tonic-gate 490Sstevel@tonic-gate 500Sstevel@tonic-gate typedef struct usb_audio_play_req { 510Sstevel@tonic-gate int up_samples; 52*10398SBinzi.Cao@Sun.COM void *up_handle; 530Sstevel@tonic-gate } usb_audio_play_req_t; 540Sstevel@tonic-gate 550Sstevel@tonic-gate #define USB_AS_N_SRS 20 560Sstevel@tonic-gate #define USB_AS_N_FORMATS 20 570Sstevel@tonic-gate #define USB_AS_N_CHANNELS 3 580Sstevel@tonic-gate 590Sstevel@tonic-gate typedef struct usb_as_registration { 600Sstevel@tonic-gate uchar_t reg_valid; 610Sstevel@tonic-gate uchar_t reg_mode; /* play or record */ 620Sstevel@tonic-gate uchar_t reg_n_formats; 630Sstevel@tonic-gate int reg_ifno; 649484Sgarrett.damore@Sun.COM uint_t reg_srs[USB_AS_N_SRS]; 650Sstevel@tonic-gate usb_audio_formats_t reg_formats[USB_AS_N_FORMATS]; 660Sstevel@tonic-gate uint_t reg_channels[USB_AS_N_CHANNELS]; 670Sstevel@tonic-gate } usb_as_registration_t; 680Sstevel@tonic-gate 690Sstevel@tonic-gate /* MCTLs between usb_ac and usb_as */ 700Sstevel@tonic-gate #define USB_AUDIO_SETUP 0x0100 710Sstevel@tonic-gate #define USB_AUDIO_TEARDOWN 0x0200 720Sstevel@tonic-gate #define USB_AUDIO_START_PLAY 0x0300 730Sstevel@tonic-gate #define USB_AUDIO_STOP_PLAY 0x0400 740Sstevel@tonic-gate #define USB_AUDIO_PAUSE_PLAY 0x0500 750Sstevel@tonic-gate #define USB_AUDIO_START_RECORD 0x0600 760Sstevel@tonic-gate #define USB_AUDIO_STOP_RECORD 0x0700 770Sstevel@tonic-gate #define USB_AUDIO_SET_FORMAT 0x0800 780Sstevel@tonic-gate #define USB_AUDIO_SET_SAMPLE_FREQ 0x0900 790Sstevel@tonic-gate 800Sstevel@tonic-gate /* MCTLs between usb_ac and usb_ah */ 810Sstevel@tonic-gate #define USB_AUDIO_VOL_CHANGE 0x1 820Sstevel@tonic-gate #define USB_AUDIO_BALANCE 0x2 830Sstevel@tonic-gate #define USB_AUDIO_MUTE 0x3 840Sstevel@tonic-gate #define USB_AUDIO_BASS 0x4 850Sstevel@tonic-gate #define USB_AUDIO_TREBLE 0x5 860Sstevel@tonic-gate 870Sstevel@tonic-gate #ifdef __cplusplus 880Sstevel@tonic-gate } 890Sstevel@tonic-gate #endif 900Sstevel@tonic-gate 910Sstevel@tonic-gate #endif /* _SYS_USB_MIXER_H */ 92