Home | History | Annotate | Line # | Download | only in usb
uaudioreg.h revision 1.17
      1  1.17   mlelstv /*	$NetBSD: uaudioreg.h,v 1.17 2023/04/02 14:43:35 mlelstv Exp $	*/
      2   1.1  augustss 
      3   1.1  augustss /*
      4   1.1  augustss  * Copyright (c) 1999 The NetBSD Foundation, Inc.
      5   1.1  augustss  * All rights reserved.
      6   1.1  augustss  *
      7   1.5  augustss  * This code is derived from software contributed to The NetBSD Foundation
      8   1.5  augustss  * by Lennart Augustsson (lennart (at) augustsson.net) at
      9   1.5  augustss  * Carlstedt Research & Technology.
     10   1.1  augustss  *
     11   1.1  augustss  * Redistribution and use in source and binary forms, with or without
     12   1.1  augustss  * modification, are permitted provided that the following conditions
     13   1.1  augustss  * are met:
     14   1.1  augustss  * 1. Redistributions of source code must retain the above copyright
     15   1.1  augustss  *    notice, this list of conditions and the following disclaimer.
     16   1.1  augustss  * 2. Redistributions in binary form must reproduce the above copyright
     17   1.1  augustss  *    notice, this list of conditions and the following disclaimer in the
     18   1.1  augustss  *    documentation and/or other materials provided with the distribution.
     19   1.1  augustss  *
     20   1.1  augustss  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     21   1.1  augustss  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     22   1.1  augustss  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     23   1.1  augustss  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     24   1.1  augustss  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     25   1.1  augustss  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     26   1.1  augustss  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     27   1.1  augustss  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     28   1.1  augustss  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     29   1.1  augustss  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     30   1.1  augustss  * POSSIBILITY OF SUCH DAMAGE.
     31   1.1  augustss  */
     32   1.1  augustss 
     33  1.17   mlelstv #define UAUDIO_VERSION1		0x100
     34  1.17   mlelstv #define UAUDIO_VERSION2		0x200
     35   1.1  augustss 
     36   1.1  augustss #define UDESC_CS_CONFIG		0x22
     37   1.1  augustss #define UDESC_CS_STRING		0x23
     38   1.1  augustss #define UDESC_CS_INTERFACE	0x24
     39   1.1  augustss #define UDESC_CS_ENDPOINT	0x25
     40   1.1  augustss 
     41   1.1  augustss #define UDESCSUB_AC_HEADER	1
     42   1.1  augustss #define UDESCSUB_AC_INPUT	2
     43   1.1  augustss #define UDESCSUB_AC_OUTPUT	3
     44   1.1  augustss #define UDESCSUB_AC_MIXER	4
     45   1.1  augustss #define UDESCSUB_AC_SELECTOR	5
     46   1.1  augustss #define UDESCSUB_AC_FEATURE	6
     47  1.17   mlelstv #define UDESCSUB_AC_EFFECT      7
     48  1.17   mlelstv #define UDESCSUB_AC_PROCESSING	8
     49  1.17   mlelstv #define UDESCSUB_AC_EXTENSION	9
     50  1.17   mlelstv #define UDESCSUB_AC_CLKSRC	10
     51  1.17   mlelstv #define UDESCSUB_AC_CLKSEL	11
     52  1.17   mlelstv #define UDESCSUB_AC_CLKMULT	12
     53  1.17   mlelstv #define UDESCSUB_AC_RATECONV    13
     54   1.1  augustss 
     55   1.1  augustss /* The first fields are identical to usb_endpoint_descriptor_t */
     56   1.1  augustss typedef struct {
     57   1.1  augustss 	uByte		bLength;
     58   1.1  augustss 	uByte		bDescriptorType;
     59   1.1  augustss 	uByte		bEndpointAddress;
     60   1.1  augustss 	uByte		bmAttributes;
     61   1.1  augustss 	uWord		wMaxPacketSize;
     62   1.1  augustss 	uByte		bInterval;
     63   1.9  augustss 	/*
     64   1.1  augustss 	 * The following two entries are only used by the Audio Class.
     65   1.1  augustss 	 * And according to the specs the Audio Class is the only one
     66   1.1  augustss 	 * allowed to extend the endpoint descriptor.
     67   1.1  augustss 	 * Who knows what goes on in the minds of the people in the USB
     68   1.1  augustss 	 * standardization?  :-(
     69   1.1  augustss 	 */
     70   1.1  augustss 	uByte		bRefresh;
     71   1.1  augustss 	uByte		bSynchAddress;
     72   1.6  augustss } UPACKED usb_endpoint_descriptor_audio_t;
     73   1.1  augustss 
     74  1.14  drochner /* generic, for iteration */
     75  1.14  drochner typedef struct {
     76  1.14  drochner 	uByte		bLength;
     77  1.14  drochner 	uByte		bDescriptorType;
     78  1.14  drochner 	uByte		bDescriptorSubtype;
     79  1.14  drochner } UPACKED uaudio_cs_descriptor_t;
     80  1.14  drochner 
     81   1.1  augustss struct usb_audio_control_descriptor {
     82   1.1  augustss 	uByte		bLength;
     83   1.1  augustss 	uByte		bDescriptorType;
     84   1.1  augustss 	uByte		bDescriptorSubtype;
     85   1.1  augustss 	uWord		bcdADC;
     86   1.1  augustss 	uWord		wTotalLength;
     87   1.1  augustss 	uByte		bInCollection;
     88   1.1  augustss 	uByte		baInterfaceNr[1];
     89   1.6  augustss } UPACKED;
     90   1.1  augustss 
     91  1.17   mlelstv struct usb_audio_streaming_interface_v1_descriptor {
     92   1.1  augustss 	uByte		bLength;
     93   1.1  augustss 	uByte		bDescriptorType;
     94   1.1  augustss 	uByte		bDescriptorSubtype;
     95   1.1  augustss 	uByte		bTerminalLink;
     96   1.1  augustss 	uByte		bDelay;
     97   1.1  augustss 	uWord		wFormatTag;
     98   1.6  augustss } UPACKED;
     99   1.1  augustss 
    100  1.17   mlelstv struct usb_audio_streaming_interface_v2_descriptor {
    101  1.17   mlelstv 	uByte		bLength;
    102  1.17   mlelstv 	uByte		bDescriptorType;
    103  1.17   mlelstv 	uByte		bDescriptorSubtype;
    104  1.17   mlelstv 	uByte		bTerminalLink;
    105  1.17   mlelstv 	uByte		bmControls;
    106  1.17   mlelstv 	uByte		bFormatType;
    107  1.17   mlelstv 	uDWord		bmFormats;
    108  1.17   mlelstv 	uByte		bNrChannels;
    109  1.17   mlelstv 	uDWord		bmChannelConfig;
    110  1.17   mlelstv 	uByte		iChannelNames;
    111  1.17   mlelstv } UPACKED;
    112  1.17   mlelstv 
    113  1.17   mlelstv union usb_audio_streaming_interface_descriptor {
    114  1.17   mlelstv 	struct usb_audio_streaming_interface_v1_descriptor v1;
    115  1.17   mlelstv 	struct usb_audio_streaming_interface_v2_descriptor v2;
    116  1.17   mlelstv };
    117  1.17   mlelstv 
    118   1.1  augustss struct usb_audio_streaming_endpoint_descriptor {
    119   1.1  augustss 	uByte		bLength;
    120   1.1  augustss 	uByte		bDescriptorType;
    121   1.1  augustss 	uByte		bDescriptorSubtype;
    122   1.1  augustss 	uByte		bmAttributes;
    123   1.8      kent #define UA_SED_FREQ_CONTROL	0x01
    124   1.8      kent #define UA_SED_PITCH_CONTROL	0x02
    125   1.8      kent #define UA_SED_MAXPACKETSONLY	0x80
    126   1.1  augustss 	uByte		bLockDelayUnits;
    127   1.1  augustss 	uWord		wLockDelay;
    128   1.6  augustss } UPACKED;
    129   1.1  augustss 
    130  1.17   mlelstv struct usb_audio_streaming_type1_v1_descriptor {
    131   1.1  augustss 	uByte		bLength;
    132   1.1  augustss 	uByte		bDescriptorType;
    133   1.1  augustss 	uByte		bDescriptorSubtype;
    134   1.1  augustss 	uByte		bFormatType;
    135   1.1  augustss 	uByte		bNrChannels;
    136   1.1  augustss 	uByte		bSubFrameSize;
    137   1.1  augustss 	uByte		bBitResolution;
    138   1.1  augustss 	uByte		bSamFreqType;
    139  1.17   mlelstv #define UA_SAMP_CONTINUOUS 0
    140  1.16       jdc 	uByte		tSamFreq[3*AUFMT_MAX_FREQUENCIES];
    141   1.1  augustss #define UA_GETSAMP(p, n) ((p)->tSamFreq[(n)*3+0] | ((p)->tSamFreq[(n)*3+1] << 8) | ((p)->tSamFreq[(n)*3+2] << 16))
    142   1.1  augustss #define UA_SAMP_LO(p) UA_GETSAMP(p, 0)
    143   1.1  augustss #define UA_SAMP_HI(p) UA_GETSAMP(p, 1)
    144   1.6  augustss } UPACKED;
    145   1.1  augustss 
    146  1.17   mlelstv struct usb_audio_streaming_type1_v2_descriptor {
    147  1.17   mlelstv 	uByte		bLength;
    148  1.17   mlelstv 	uByte		bDescriptorType;
    149  1.17   mlelstv 	uByte		bDescriptorSubtype;
    150  1.17   mlelstv 	uByte		bFormatType;
    151  1.17   mlelstv 	uByte		bSubslotSize;
    152  1.17   mlelstv 	uByte		bBitResolution;
    153  1.17   mlelstv } UPACKED;
    154  1.17   mlelstv 
    155  1.17   mlelstv union usb_audio_streaming_type1_descriptor {
    156  1.17   mlelstv 	struct usb_audio_streaming_type1_v1_descriptor v1;
    157  1.17   mlelstv 	struct usb_audio_streaming_type1_v2_descriptor v2;
    158  1.17   mlelstv };
    159  1.17   mlelstv 
    160   1.1  augustss struct usb_audio_cluster {
    161   1.1  augustss 	uByte		bNrChannels;
    162   1.1  augustss 	uWord		wChannelConfig;
    163  1.12      kent #define	UA_CHANNEL_LEFT		0x0001
    164  1.12      kent #define	UA_CHANNEL_RIGHT	0x0002
    165  1.12      kent #define	UA_CHANNEL_CENTER	0x0004
    166  1.12      kent #define	UA_CHANNEL_LFE		0x0008
    167  1.12      kent #define	UA_CHANNEL_L_SURROUND	0x0010
    168  1.12      kent #define	UA_CHANNEL_R_SURROUND	0x0020
    169  1.12      kent #define	UA_CHANNEL_L_CENTER	0x0040
    170  1.12      kent #define	UA_CHANNEL_R_CENTER	0x0080
    171  1.12      kent #define	UA_CHANNEL_SURROUND	0x0100
    172  1.12      kent #define	UA_CHANNEL_L_SIDE	0x0200
    173  1.12      kent #define	UA_CHANNEL_R_SIDE	0x0400
    174  1.12      kent #define	UA_CHANNEL_TOP		0x0800
    175   1.1  augustss 	uByte		iChannelNames;
    176   1.6  augustss } UPACKED;
    177  1.10  augustss 
    178  1.10  augustss /* Shared by all units and terminals */
    179  1.10  augustss struct usb_audio_unit {
    180  1.10  augustss 	uByte		bLength;
    181  1.10  augustss 	uByte		bDescriptorType;
    182  1.10  augustss 	uByte		bDescriptorSubtype;
    183  1.10  augustss 	uByte		bUnitId;
    184  1.10  augustss };
    185   1.1  augustss 
    186   1.1  augustss /* UDESCSUB_AC_INPUT */
    187   1.1  augustss struct usb_audio_input_terminal {
    188   1.1  augustss 	uByte		bLength;
    189   1.1  augustss 	uByte		bDescriptorType;
    190   1.1  augustss 	uByte		bDescriptorSubtype;
    191   1.1  augustss 	uByte		bTerminalId;
    192   1.1  augustss 	uWord		wTerminalType;
    193   1.1  augustss 	uByte		bAssocTerminal;
    194   1.1  augustss 	uByte		bNrChannels;
    195   1.1  augustss 	uWord		wChannelConfig;
    196   1.1  augustss 	uByte		iChannelNames;
    197   1.1  augustss 	uByte		iTerminal;
    198   1.6  augustss } UPACKED;
    199   1.1  augustss 
    200   1.1  augustss /* UDESCSUB_AC_OUTPUT */
    201   1.1  augustss struct usb_audio_output_terminal {
    202   1.1  augustss 	uByte		bLength;
    203   1.1  augustss 	uByte		bDescriptorType;
    204   1.1  augustss 	uByte		bDescriptorSubtype;
    205   1.1  augustss 	uByte		bTerminalId;
    206   1.1  augustss 	uWord		wTerminalType;
    207   1.1  augustss 	uByte		bAssocTerminal;
    208   1.1  augustss 	uByte		bSourceId;
    209   1.1  augustss 	uByte		iTerminal;
    210   1.6  augustss } UPACKED;
    211   1.1  augustss 
    212   1.1  augustss /* UDESCSUB_AC_MIXER */
    213   1.1  augustss struct usb_audio_mixer_unit {
    214   1.1  augustss 	uByte		bLength;
    215   1.1  augustss 	uByte		bDescriptorType;
    216   1.1  augustss 	uByte		bDescriptorSubtype;
    217   1.1  augustss 	uByte		bUnitId;
    218   1.1  augustss 	uByte		bNrInPins;
    219   1.4  augustss 	uByte		baSourceId[255]; /* [bNrInPins] */
    220   1.1  augustss 	/* struct usb_audio_mixer_unit_1 */
    221   1.6  augustss } UPACKED;
    222   1.1  augustss struct usb_audio_mixer_unit_1 {
    223   1.1  augustss 	uByte		bNrChannels;
    224   1.1  augustss 	uWord		wChannelConfig;
    225   1.1  augustss 	uByte		iChannelNames;
    226   1.4  augustss 	uByte		bmControls[255]; /* [bNrChannels] */
    227   1.1  augustss 	/*uByte		iMixer;*/
    228   1.6  augustss } UPACKED;
    229   1.1  augustss 
    230   1.1  augustss /* UDESCSUB_AC_SELECTOR */
    231   1.1  augustss struct usb_audio_selector_unit {
    232   1.1  augustss 	uByte		bLength;
    233   1.1  augustss 	uByte		bDescriptorType;
    234   1.1  augustss 	uByte		bDescriptorSubtype;
    235   1.1  augustss 	uByte		bUnitId;
    236   1.1  augustss 	uByte		bNrInPins;
    237   1.4  augustss 	uByte		baSourceId[255]; /* [bNrInPins] */
    238   1.1  augustss 	/* uByte	iSelector; */
    239   1.6  augustss } UPACKED;
    240   1.1  augustss 
    241   1.1  augustss /* UDESCSUB_AC_FEATURE */
    242   1.1  augustss struct usb_audio_feature_unit {
    243   1.1  augustss 	uByte		bLength;
    244   1.1  augustss 	uByte		bDescriptorType;
    245   1.1  augustss 	uByte		bDescriptorSubtype;
    246   1.1  augustss 	uByte		bUnitId;
    247   1.1  augustss 	uByte		bSourceId;
    248   1.1  augustss 	uByte		bControlSize;
    249   1.1  augustss 	uByte		bmaControls[255]; /* size for more than enough */
    250   1.1  augustss 	/* uByte	iFeature; */
    251   1.6  augustss } UPACKED;
    252   1.1  augustss 
    253   1.1  augustss /* UDESCSUB_AC_PROCESSING */
    254   1.1  augustss struct usb_audio_processing_unit {
    255   1.1  augustss 	uByte		bLength;
    256   1.1  augustss 	uByte		bDescriptorType;
    257   1.1  augustss 	uByte		bDescriptorSubtype;
    258   1.1  augustss 	uByte		bUnitId;
    259   1.1  augustss 	uWord		wProcessType;
    260   1.1  augustss 	uByte		bNrInPins;
    261   1.4  augustss 	uByte		baSourceId[255]; /* [bNrInPins] */
    262   1.1  augustss 	/* struct usb_audio_processing_unit_1 */
    263   1.6  augustss } UPACKED;
    264   1.1  augustss struct usb_audio_processing_unit_1{
    265   1.1  augustss 	uByte		bNrChannels;
    266   1.1  augustss 	uWord		wChannelConfig;
    267   1.1  augustss 	uByte		iChannelNames;
    268   1.1  augustss 	uByte		bControlSize;
    269   1.4  augustss 	uByte		bmControls[255]; /* [bControlSize] */
    270   1.3  augustss #define UA_PROC_ENABLE_MASK 1
    271   1.6  augustss } UPACKED;
    272   1.4  augustss 
    273   1.4  augustss struct usb_audio_processing_unit_updown {
    274   1.4  augustss 	uByte		iProcessing;
    275   1.4  augustss 	uByte		bNrModes;
    276   1.4  augustss 	uWord		waModes[255]; /* [bNrModes] */
    277   1.6  augustss } UPACKED;
    278   1.1  augustss 
    279   1.1  augustss /* UDESCSUB_AC_EXTENSION */
    280   1.1  augustss struct usb_audio_extension_unit {
    281   1.1  augustss 	uByte		bLength;
    282   1.1  augustss 	uByte		bDescriptorType;
    283   1.1  augustss 	uByte		bDescriptorSubtype;
    284   1.1  augustss 	uByte		bUnitId;
    285   1.1  augustss 	uWord		wExtensionCode;
    286   1.1  augustss 	uByte		bNrInPins;
    287   1.4  augustss 	uByte		baSourceId[255]; /* [bNrInPins] */
    288   1.1  augustss 	/* struct usb_audio_extension_unit_1 */
    289   1.6  augustss } UPACKED;
    290   1.1  augustss struct usb_audio_extension_unit_1 {
    291   1.1  augustss 	uByte		bNrChannels;
    292   1.1  augustss 	uWord		wChannelConfig;
    293   1.1  augustss 	uByte		iChannelNames;
    294   1.1  augustss 	uByte		bControlSize;
    295   1.4  augustss 	uByte		bmControls[255]; /* [bControlSize] */
    296   1.3  augustss #define UA_EXT_ENABLE_MASK 1
    297   1.3  augustss #define UA_EXT_ENABLE 1
    298   1.1  augustss 	/*uByte		iExtension;*/
    299   1.6  augustss } UPACKED;
    300   1.1  augustss 
    301  1.17   mlelstv /* UDESCSUB_AC_CLKSRC */
    302  1.17   mlelstv struct usb_audio_clksrc_unit {
    303  1.17   mlelstv 	uByte		bLength;
    304  1.17   mlelstv 	uByte		bDescriptorType;
    305  1.17   mlelstv 	uByte		bDescriptorSubtype;
    306  1.17   mlelstv 	uByte		bClockId;
    307  1.17   mlelstv 	uByte		bmAttributes;
    308  1.17   mlelstv 	uByte		bmControls;
    309  1.17   mlelstv 	uByte		bAssocTerminal;
    310  1.17   mlelstv 	uByte		iClockSource;
    311  1.17   mlelstv } UPACKED;
    312  1.17   mlelstv 
    313  1.17   mlelstv /* UDESCSUB_AC_CLKSEL */
    314  1.17   mlelstv struct usb_audio_clksel_unit {
    315  1.17   mlelstv 	uByte		bLength;
    316  1.17   mlelstv 	uByte		bDescriptorType;
    317  1.17   mlelstv 	uByte		bDescriptorSubtype;
    318  1.17   mlelstv 	uByte		bClockId;
    319  1.17   mlelstv 	uByte		bNrInPins;
    320  1.17   mlelstv 	uByte		baCSourceId[255];
    321  1.17   mlelstv 	/*uByte		bmControls;*/
    322  1.17   mlelstv 	/*uByte		iClockSelector;*/
    323  1.17   mlelstv } UPACKED;
    324  1.17   mlelstv 
    325  1.17   mlelstv /* UDESCSUB_AC_CLKMULT */
    326  1.17   mlelstv struct usb_audio_clkmult_unit {
    327  1.17   mlelstv 	uByte		bLength;
    328  1.17   mlelstv 	uByte		bDescriptorType;
    329  1.17   mlelstv 	uByte		bDescriptorSubtype;
    330  1.17   mlelstv 	uByte		bClockId;
    331  1.17   mlelstv 	uByte		bCSourceId;
    332  1.17   mlelstv 	uByte		bmControls;
    333  1.17   mlelstv 	uByte		iClockMultiplier;
    334  1.17   mlelstv } UPACKED;
    335  1.17   mlelstv 
    336   1.7  augustss /* USB terminal types */
    337   1.7  augustss #define UAT_UNDEFINED		0x0100
    338   1.7  augustss #define UAT_STREAM		0x0101
    339   1.7  augustss #define UAT_VENDOR		0x01ff
    340   1.7  augustss /* input terminal types */
    341   1.7  augustss #define UATI_UNDEFINED		0x0200
    342   1.7  augustss #define UATI_MICROPHONE		0x0201
    343   1.7  augustss #define UATI_DESKMICROPHONE	0x0202
    344   1.7  augustss #define UATI_PERSONALMICROPHONE	0x0203
    345   1.7  augustss #define UATI_OMNIMICROPHONE	0x0204
    346   1.7  augustss #define UATI_MICROPHONEARRAY	0x0205
    347   1.7  augustss #define UATI_PROCMICROPHONEARR	0x0206
    348   1.7  augustss /* output terminal types */
    349   1.7  augustss #define UATO_UNDEFINED		0x0300
    350   1.7  augustss #define UATO_SPEAKER		0x0301
    351   1.7  augustss #define UATO_HEADPHONES		0x0302
    352   1.7  augustss #define UATO_DISPLAYAUDIO	0x0303
    353   1.7  augustss #define UATO_DESKTOPSPEAKER	0x0304
    354   1.7  augustss #define UATO_ROOMSPEAKER	0x0305
    355   1.7  augustss #define UATO_COMMSPEAKER	0x0306
    356   1.7  augustss #define UATO_SUBWOOFER		0x0307
    357   1.7  augustss /* bidir terminal types */
    358   1.7  augustss #define UATB_UNDEFINED		0x0400
    359   1.7  augustss #define UATB_HANDSET		0x0401
    360   1.7  augustss #define UATB_HEADSET		0x0402
    361   1.7  augustss #define UATB_SPEAKERPHONE	0x0403
    362   1.7  augustss #define UATB_SPEAKERPHONEESUP	0x0404
    363   1.7  augustss #define UATB_SPEAKERPHONEECANC	0x0405
    364   1.7  augustss /* telephony terminal types */
    365   1.7  augustss #define UATT_UNDEFINED		0x0500
    366   1.7  augustss #define UATT_PHONELINE		0x0501
    367   1.7  augustss #define UATT_TELEPHONE		0x0502
    368   1.7  augustss #define UATT_DOWNLINEPHONE	0x0503
    369   1.7  augustss /* external terminal types */
    370   1.7  augustss #define UATE_UNDEFINED		0x0600
    371   1.7  augustss #define UATE_ANALOGCONN		0x0601
    372   1.7  augustss #define UATE_DIGITALAUIFC	0x0602
    373   1.7  augustss #define UATE_LINECONN		0x0603
    374   1.7  augustss #define UATE_LEGACYCONN		0x0604
    375   1.7  augustss #define UATE_SPDIF		0x0605
    376   1.7  augustss #define UATE_1394DA		0x0606
    377   1.7  augustss #define UATE_1394DV		0x0607
    378   1.7  augustss /* embedded function terminal types */
    379   1.7  augustss #define UATF_UNDEFINED		0x0700
    380   1.7  augustss #define UATF_CALIBNOISE		0x0701
    381   1.7  augustss #define UATF_EQUNOISE		0x0702
    382   1.7  augustss #define UATF_CDPLAYER		0x0703
    383   1.7  augustss #define UATF_DAT		0x0704
    384   1.7  augustss #define UATF_DCC		0x0705
    385   1.7  augustss #define UATF_MINIDISK		0x0706
    386   1.7  augustss #define UATF_ANALOGTAPE		0x0707
    387   1.7  augustss #define UATF_PHONOGRAPH		0x0708
    388   1.7  augustss #define UATF_VCRAUDIO		0x0709
    389   1.7  augustss #define UATF_VIDEODISCAUDIO	0x070a
    390   1.7  augustss #define UATF_DVDAUDIO		0x070b
    391   1.7  augustss #define UATF_TVTUNERAUDIO	0x070c
    392   1.7  augustss #define UATF_SATELLITE		0x070d
    393   1.7  augustss #define UATF_CABLETUNER		0x070e
    394   1.7  augustss #define UATF_DSS		0x070f
    395   1.7  augustss #define UATF_RADIORECV		0x0710
    396   1.7  augustss #define UATF_RADIOXMIT		0x0711
    397   1.7  augustss #define UATF_MULTITRACK		0x0712
    398   1.7  augustss #define UATF_SYNTHESIZER	0x0713
    399   1.7  augustss 
    400   1.1  augustss 
    401   1.1  augustss #define SET_CUR 0x01
    402   1.1  augustss #define GET_CUR 0x81
    403   1.1  augustss #define SET_MIN 0x02
    404   1.1  augustss #define GET_MIN 0x82
    405   1.1  augustss #define SET_MAX 0x03
    406   1.1  augustss #define GET_MAX 0x83
    407   1.1  augustss #define SET_RES 0x04
    408   1.1  augustss #define GET_RES 0x84
    409   1.1  augustss #define SET_MEM 0x05
    410   1.1  augustss #define GET_MEM 0x85
    411   1.1  augustss #define GET_STAT 0xff
    412  1.17   mlelstv #define V2_CUR        0x01
    413  1.17   mlelstv #define V2_RANGES     0x02
    414  1.17   mlelstv 
    415  1.17   mlelstv #define V2_CUR_CLKFREQ	0x01
    416  1.17   mlelstv #define V2_CUR_CLKSEL	0x01
    417  1.17   mlelstv 
    418   1.1  augustss 
    419   1.1  augustss #define MUTE_CONTROL	0x01
    420   1.1  augustss #define VOLUME_CONTROL	0x02
    421   1.1  augustss #define BASS_CONTROL	0x03
    422   1.1  augustss #define MID_CONTROL	0x04
    423   1.1  augustss #define TREBLE_CONTROL	0x05
    424   1.1  augustss #define GRAPHIC_EQUALIZER_CONTROL	0x06
    425   1.1  augustss #define AGC_CONTROL	0x07
    426   1.1  augustss #define DELAY_CONTROL	0x08
    427   1.1  augustss #define BASS_BOOST_CONTROL 0x09
    428   1.1  augustss #define LOUDNESS_CONTROL 0x0a
    429  1.17   mlelstv #define GAIN_CONTROL	0x0b
    430  1.17   mlelstv #define GAINPAD_CONTROL	0x0c
    431  1.17   mlelstv #define PHASEINV_CONTROL 0x0d
    432   1.1  augustss 
    433   1.1  augustss #define FU_MASK(u) (1 << ((u)-1))
    434   1.1  augustss 
    435   1.2  augustss #define MASTER_CHAN	0
    436   1.1  augustss 
    437   1.2  augustss #define AS_GENERAL	1
    438   1.2  augustss #define FORMAT_TYPE	2
    439   1.1  augustss #define FORMAT_SPECIFIC 3
    440   1.1  augustss 
    441   1.2  augustss #define UA_FMT_PCM	1
    442   1.2  augustss #define UA_FMT_PCM8	2
    443   1.2  augustss #define UA_FMT_IEEE_FLOAT 3
    444   1.2  augustss #define UA_FMT_ALAW	4
    445   1.2  augustss #define UA_FMT_MULAW	5
    446   1.8      kent #define UA_FMT_MPEG	0x1001
    447   1.8      kent #define UA_FMT_AC3	0x1002
    448   1.1  augustss 
    449  1.17   mlelstv #define UA_V2_FMT_PCM		0x01
    450  1.17   mlelstv #define UA_V2_FMT_PCM8		0x02
    451  1.17   mlelstv #define UA_V2_FMT_IEEE_FLOAT	0x04
    452  1.17   mlelstv #define UA_V2_FMT_ALAW		0x08
    453  1.17   mlelstv #define UA_V2_FMT_MULAW		0x10
    454  1.17   mlelstv 
    455   1.8      kent #define SAMPLING_FREQ_CONTROL	0x01
    456   1.8      kent #define PITCH_CONTROL		0x02
    457   1.2  augustss 
    458   1.2  augustss #define FORMAT_TYPE_UNDEFINED 0
    459   1.2  augustss #define FORMAT_TYPE_I 1
    460   1.2  augustss #define FORMAT_TYPE_II 2
    461   1.2  augustss #define FORMAT_TYPE_III 3
    462   1.3  augustss 
    463   1.4  augustss #define UA_PROC_MASK(n) (1<< ((n)-1))
    464   1.3  augustss #define PROCESS_UNDEFINED		0
    465   1.3  augustss #define  XX_ENABLE_CONTROL			1
    466   1.3  augustss #define UPDOWNMIX_PROCESS		1
    467   1.3  augustss #define  UD_ENABLE_CONTROL			1
    468   1.3  augustss #define  UD_MODE_SELECT_CONTROL			2
    469   1.3  augustss #define DOLBY_PROLOGIC_PROCESS		2
    470   1.3  augustss #define  DP_ENABLE_CONTROL			1
    471   1.3  augustss #define  DP_MODE_SELECT_CONTROL			2
    472   1.3  augustss #define P3D_STEREO_EXTENDER_PROCESS	3
    473   1.3  augustss #define  P3D_ENABLE_CONTROL			1
    474   1.3  augustss #define  P3D_SPACIOUSNESS_CONTROL		2
    475   1.3  augustss #define REVERBATION_PROCESS		4
    476   1.3  augustss #define  RV_ENABLE_CONTROL			1
    477   1.3  augustss #define  RV_LEVEL_CONTROL			2
    478   1.3  augustss #define  RV_TIME_CONTROL			3
    479   1.3  augustss #define  RV_FEEDBACK_CONTROL			4
    480   1.3  augustss #define CHORUS_PROCESS			5
    481   1.3  augustss #define  CH_ENABLE_CONTROL			1
    482   1.3  augustss #define  CH_LEVEL_CONTROL			2
    483   1.3  augustss #define  CH_RATE_CONTROL			3
    484   1.3  augustss #define  CH_DEPTH_CONTROL			4
    485   1.3  augustss #define DYN_RANGE_COMP_PROCESS		6
    486   1.3  augustss #define  DR_ENABLE_CONTROL			1
    487   1.3  augustss #define  DR_COMPRESSION_RATE_CONTROL		2
    488   1.3  augustss #define  DR_MAXAMPL_CONTROL			3
    489   1.3  augustss #define  DR_THRESHOLD_CONTROL			4
    490   1.3  augustss #define  DR_ATTACK_TIME_CONTROL			5
    491   1.3  augustss #define  DR_RELEASE_TIME_CONTROL		6
    492