root/drivers/sound/sound_config.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /* sound_config.h
   2  *
   3  * A driver for Soundcards, misc configuration parameters.
   4  *
   5  * 
   6  * Copyright by Hannu Savolainen 1993
   7  *
   8  * Redistribution and use in source and binary forms, with or without
   9  * modification, are permitted provided that the following conditions
  10  * are met:
  11  * 1. Redistributions of source code must retain the above copyright
  12  *    notice, this list of conditions and the following disclaimer.
  13  * 2. Redistributions in binary form must reproduce the above copyright
  14  *    notice, this list of conditions and the following disclaimer in the
  15  *    documentation and/or other materials provided with the distribution.
  16  *
  17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27  * SUCH DAMAGE.
  28  *
  29  */
  30 
  31 #include "local.h"
  32 
  33 #if defined(ISC) || defined(SCO) || defined(SVR42)
  34 #define GENERIC_SYSV
  35 #endif
  36 
  37 /*
  38  * Disable the AD1848 driver if there are no other drivers requiring it.
  39  */
  40 
  41 #if defined(EXCLUDE_GUS16) && defined(EXCLUDE_MSS) && defined(EXCLUDE_PSS) && defined(EXCLUDE_GUSMAX)
  42 #define EXCLUDE_AD1848
  43 #endif
  44 
  45 #undef CONFIGURE_SOUNDCARD
  46 #undef DYNAMIC_BUFFER
  47 
  48 #ifdef KERNEL_SOUNDCARD
  49 #define CONFIGURE_SOUNDCARD
  50 #define DYNAMIC_BUFFER
  51 #undef LOADABLE_SOUNDCARD
  52 #endif
  53 
  54 #ifdef EXCLUDE_SEQUENCER
  55 #define EXCLUDE_MIDI
  56 #define EXCLUDE_YM3812
  57 #define EXCLUDE_OPL3
  58 #endif
  59 
  60 #ifndef SND_DEFAULT_ENABLE
  61 #define SND_DEFAULT_ENABLE      1
  62 #endif
  63 
  64 #ifdef CONFIGURE_SOUNDCARD
  65 
  66 /* ****** IO-address, DMA and IRQ settings ****
  67 
  68 If your card has nonstandard I/O address or IRQ number, change defines
  69    for the following settings in your kernel Makefile */
  70 
  71 #ifndef SBC_BASE
  72 #define SBC_BASE        0x220   /* 0x220 is the factory default. */
  73 #endif
  74 
  75 #ifndef SBC_IRQ
  76 #define SBC_IRQ         7       /* IQR7 is the factory default.  */
  77 #endif
  78 
  79 #ifndef SBC_DMA
  80 #define SBC_DMA         1
  81 #endif
  82 
  83 #ifndef SB16_DMA
  84 #define SB16_DMA        6
  85 #endif
  86 
  87 #ifndef SB16MIDI_BASE
  88 #define SB16MIDI_BASE   0x300
  89 #endif
  90 
  91 #ifndef PAS_BASE
  92 #define PAS_BASE        0x388
  93 #endif
  94 
  95 #ifndef PAS_IRQ
  96 #define PAS_IRQ         5
  97 #endif
  98 
  99 #ifndef PAS_DMA
 100 #define PAS_DMA         3
 101 #endif
 102 
 103 #ifndef GUS_BASE
 104 #define GUS_BASE        0x220
 105 #endif
 106 
 107 #ifndef GUS_IRQ
 108 #define GUS_IRQ         15
 109 #endif
 110 
 111 #ifndef GUS_MIDI_IRQ
 112 #define GUS_MIDI_IRQ    GUS_IRQ
 113 #endif
 114 
 115 #ifndef GUS_DMA
 116 #define GUS_DMA         6
 117 #endif
 118 
 119 #ifndef MPU_BASE
 120 #define MPU_BASE        0x330
 121 #endif
 122 
 123 #ifndef MPU_IRQ
 124 #define MPU_IRQ         6
 125 #endif
 126 
 127 /* Echo Personal Sound System */
 128 #ifndef PSS_BASE
 129 #define PSS_BASE        0x220   /* 0x240 or */
 130 #endif
 131 
 132 #ifndef PSS_IRQ
 133 #define PSS_IRQ         7
 134 #endif
 135 
 136 #ifndef PSS_DMA
 137 #define PSS_DMA         1
 138 #endif
 139 
 140 #ifndef MAX_REALTIME_FACTOR
 141 #define MAX_REALTIME_FACTOR     4
 142 #endif
 143 
 144 /************* PCM DMA buffer sizes *******************/
 145 
 146 /* If you are using high playback or recording speeds, the default buffersize
 147    is too small. DSP_BUFFSIZE must be 64k or less.
 148 
 149    A rule of thumb is 64k for PAS16, 32k for PAS+, 16k for SB Pro and
 150    4k for SB.
 151 
 152    If you change the DSP_BUFFSIZE, don't modify this file.
 153    Use the make config command instead. */
 154 
 155 #ifndef DSP_BUFFSIZE
 156 #define DSP_BUFFSIZE            (4096)
 157 #endif
 158 
 159 #ifndef DSP_BUFFCOUNT
 160 #define DSP_BUFFCOUNT           2       /* 2 is recommended. */
 161 #endif
 162 
 163 #define DMA_AUTOINIT            0x10
 164 
 165 #define FM_MONO         0x388   /* This is the I/O address used by AdLib */
 166 
 167 /* SEQ_MAX_QUEUE is the maximum number of sequencer events buffered by the
 168    driver. (There is no need to alter this) */
 169 #define SEQ_MAX_QUEUE   1024
 170 
 171 #define SBFM_MAXINSTR           (256)   /* Size of the FM Instrument bank */
 172 /* 128 instruments for general MIDI setup and 16 unassigned      */
 173 
 174 /*
 175  * Minor numbers for the sound driver.
 176  *
 177  * Unfortunately Creative called the codec chip of SB as a DSP. For this
 178  * reason the /dev/dsp is reserved for digitized audio use. There is a
 179  * device for true DSP processors but it will be called something else.
 180  * In v3.0 it's /dev/sndproc but this could be a temporary solution.
 181  */
 182 
 183 #define SND_NDEVS       256     /* Number of supported devices */
 184 #define SND_DEV_CTL     0       /* Control port /dev/mixer */
 185 #define SND_DEV_SEQ     1       /* Sequencer output /dev/sequencer (FM
 186                                    synthesizer and MIDI output) */
 187 #define SND_DEV_MIDIN   2       /* Raw midi access */
 188 #define SND_DEV_DSP     3       /* Digitized voice /dev/dsp */
 189 #define SND_DEV_AUDIO   4       /* Sparc compatible /dev/audio */
 190 #define SND_DEV_DSP16   5       /* Like /dev/dsp but 16 bits/sample */
 191 #define SND_DEV_STATUS  6       /* /dev/sndstat */
 192 /* #7 not in use now. Was in 2.4. Free for use after v3.0. */
 193 #define SND_DEV_SEQ2    8       /* /dev/sequecer, level 2 interface */
 194 #define SND_DEV_SNDPROC 9       /* /dev/sndproc for programmable devices */
 195 #define SND_DEV_PSS     SND_DEV_SNDPROC
 196 
 197 #define DSP_DEFAULT_SPEED       8000
 198 
 199 #define ON              1
 200 #define OFF             0
 201 
 202 #define MAX_AUDIO_DEV   5
 203 #define MAX_MIXER_DEV   2
 204 #define MAX_SYNTH_DEV   3
 205 #define MAX_MIDI_DEV    6
 206 #define MAX_TIMER_DEV   3
 207 
 208 struct fileinfo {
 209           int mode;     /* Open mode */
 210        };
 211 
 212 struct address_info {
 213         int io_base;
 214         int irq;
 215         int dma;
 216 };
 217 
 218 #define SYNTH_MAX_VOICES        32
 219 
 220 struct voice_alloc_info {
 221                 int max_voice;
 222                 int used_voices;
 223                 int ptr;                /* For device specific use */
 224                 unsigned short map[SYNTH_MAX_VOICES]; /* (ch << 8) | (note+1) */
 225         };
 226 
 227 struct channel_info {
 228                 int pgm_num;
 229                 unsigned char controllers[128];
 230         };
 231 
 232 /*
 233  * Process wakeup reasons
 234  */
 235 #define WK_NONE         0x00
 236 #define WK_WAKEUP       0x01
 237 #define WK_TIMEOUT      0x02
 238 #define WK_SIGNAL       0x04
 239 #define WK_SLEEP        0x08
 240 
 241 #define OPEN_READ       1
 242 #define OPEN_WRITE      2
 243 #define OPEN_READWRITE  3
 244 
 245 #include "os.h"
 246 #include "sound_calls.h"
 247 #include "dev_table.h"
 248 
 249 #ifndef DEB
 250 #define DEB(x)
 251 
 252 #define TIMER_ARMED     121234
 253 #define TIMER_NOT_ARMED 1
 254 
 255 #define FUTURE_VERSION
 256 #endif
 257 
 258 #endif

/* [previous][next][first][last][top][bottom][index][help] */