linux-old/drivers/usb/audio.h
<<
>>
Prefs
   1#define USB_DT_CS_DEVICE                0x21
   2#define USB_DT_CS_CONFIG                0x22
   3#define USB_DT_CS_STRING                0x23
   4#define USB_DT_CS_INTERFACE             0x24
   5#define USB_DT_CS_ENDPOINT              0x25
   6
   7#define CS_AUDIO_UNDEFINED              0x20
   8#define CS_AUDIO_DEVICE                 0x21
   9#define CS_AUDIO_CONFIGURATION          0x22
  10#define CS_AUDIO_STRING                 0x23
  11#define CS_AUDIO_INTERFACE              0x24
  12#define CS_AUDIO_ENDPOINT               0x25
  13
  14#define HEADER                          0x01
  15#define INPUT_TERMINAL                  0x02
  16#define OUTPUT_TERMINAL                 0x03
  17#define MIXER_UNIT                      0x04
  18#define SELECTOR_UNIT                   0x05
  19#define FEATURE_UNIT                    0x06
  20#define PROCESSING_UNIT                 0x07
  21#define EXTENSION_UNIT                  0x08
  22
  23#define AS_GENERAL                      0x01
  24#define FORMAT_TYPE                     0x02
  25#define FORMAT_SPECIFIC                 0x03
  26
  27#define EP_GENERAL                      0x01
  28
  29#define MAX_CHAN                        9
  30#define MAX_FREQ                        16
  31#define MAX_IFACE                       8
  32#define MAX_FORMAT                      8
  33#define MAX_ALT                         32      /* Sorry, we need quite a few for the Philips webcams */
  34
  35struct usb_audio_terminal
  36{       
  37        u8      flags;
  38        u8      assoc;
  39        u16     type;                   /* Mic etc */
  40        u8      channels;
  41        u8      source;
  42        u16     chancfg;
  43};
  44
  45struct usb_audio_format
  46{
  47        u8      type;
  48        u8      channels;
  49        u8      num_freq;
  50        u8      sfz;
  51        u8      bits;
  52        u16     freq[MAX_FREQ];
  53};
  54
  55struct usb_audio_interface
  56{
  57        u8      terminal;
  58        u8      delay;
  59        u16     num_formats;
  60        u16     format_type;
  61        u8      flags;
  62        u8      idleconf;       /* Idle config */
  63#define AU_IFACE_FOUND  1
  64        struct  usb_audio_format format[MAX_FORMAT];
  65};
  66
  67struct usb_audio_device
  68{
  69        struct list_head list;
  70        u8      mixer;
  71        u8      selector;
  72        void    *irq_handle;
  73        u8      num_channels;
  74        u8      num_dsp_iface;
  75        u8      channel_map[MAX_CHAN];
  76        struct usb_audio_terminal terminal[MAX_CHAN];
  77        struct usb_audio_interface interface[MAX_IFACE][MAX_ALT];
  78};
  79
  80
  81
  82/* Audio Class specific Request Codes */
  83
  84#define SET_CUR    0x01
  85#define GET_CUR    0x81
  86#define SET_MIN    0x02
  87#define GET_MIN    0x82
  88#define SET_MAX    0x03
  89#define GET_MAX    0x83
  90#define SET_RES    0x04
  91#define GET_RES    0x84
  92#define SET_MEM    0x05
  93#define GET_MEM    0x85
  94#define GET_STAT   0xff
  95
  96/* Terminal Control Selectors */
  97
  98#define COPY_PROTECT_CONTROL       0x01
  99
 100/* Feature Unit Control Selectors */
 101
 102#define MUTE_CONTROL               0x01
 103#define VOLUME_CONTROL             0x02
 104#define BASS_CONTROL               0x03
 105#define MID_CONTROL                0x04
 106#define TREBLE_CONTROL             0x05
 107#define GRAPHIC_EQUALIZER_CONTROL  0x06
 108#define AUTOMATIC_GAIN_CONTROL     0x07
 109#define DELAY_CONTROL              0x08
 110#define BASS_BOOST_CONTROL         0x09
 111#define LOUDNESS_CONTROL           0x0a
 112
 113/* Endpoint Control Selectors */
 114
 115#define SAMPLING_FREQ_CONTROL      0x01
 116#define PITCH_CONTROL              0x02
 117
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.