Remove redundant panic.
[dragonfly.git] / sys / dev / sound / isa / i386 / dev_table.h
1 /*
2  * dev_table.h
3  * 
4  * Global definitions for device call tables
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 are
10  * met: 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer. 2.
12  * Redistributions in binary form must reproduce the above copyright notice,
13  * this list of conditions and the following disclaimer in the documentation
14  * and/or other materials provided with the distribution.
15  * 
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
20  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  * SUCH DAMAGE.
27  * 
28  * $DragonFly: src/sys/dev/sound/isa/i386/Attic/dev_table.h,v 1.2 2005/01/31 23:44:35 joerg Exp $
29  */
30
31 #ifndef _DEV_TABLE_H_
32 #define _DEV_TABLE_H_
33
34 /*
35  * NOTE!        NOTE!   NOTE!   NOTE!
36  * 
37  * If you modify this file, please check the dev_table.c also.
38  * 
39  * NOTE!        NOTE!   NOTE!   NOTE!
40  */
41
42 extern int      sound_started;
43
44 struct driver_info {
45         char    *driver_id;
46         int      card_subtype;  /* Driver specific. Usually 0 */
47         int      card_type;     /* From soundcard.h      */
48         char    *name;
49         void    (*attach) (struct address_info * hw_config);
50         int     (*probe) (struct address_info * hw_config);
51 };
52
53 struct card_info {
54         int     card_type;      /* Link (search key) to the driver list */
55         struct address_info config;
56         int     enabled;
57 };
58
59 typedef struct pnp_sounddev {
60         int     id;
61         void    (*setup) (void *dev);
62         char    *driver_name;
63 }               pnp_sounddev;
64
65 /*
66  * Device specific parameters (used only by dmabuf.c)
67  */
68 #define MAX_SUB_BUFFERS         (32*MAX_REALTIME_FACTOR)
69
70 #define DMODE_NONE              0
71 #define DMODE_OUTPUT            1
72 #define DMODE_INPUT             2
73
74 struct dma_buffparms {
75         int     dma_mode;       /* DMODE_INPUT, DMODE_OUTPUT or DMODE_NONE */
76
77         char    *raw_buf;       /* Pointers to raw buffers */
78         u_long  raw_buf_phys;
79
80         /*
81          * Device state tables
82          */
83
84         u_long  flags;
85 #define DMA_BUSY        0x00000001
86 #define DMA_RESTART     0x00000002
87 #define DMA_ACTIVE      0x00000004
88 #define DMA_STARTED     0x00000008
89 #define DMA_ALLOC_DONE  0x00000020
90
91         int     open_mode;
92
93         /*
94          * Queue parameters.
95          */
96         int             qlen;
97         int             qhead;
98         int             qtail;
99
100         int             nbufs;
101         int             counts[MAX_SUB_BUFFERS];
102         int             subdivision;
103
104         int             fragment_size;
105         int             max_fragments;
106
107         int             bytes_in_use;
108
109         int             underrun_count;
110         int             byte_counter;
111
112         int             mapping_flags;
113 #define                 DMA_MAP_MAPPED          0x00000001
114         char            neutral_byte;
115         int             dma_chan;
116 };
117
118 /*
119  * Structure for use with various microcontrollers and DSP processors in the
120  * recent soundcards.
121  */
122 typedef struct coproc_operations {
123         char    name[32];
124         int     (*open) (void *devc, int sub_device);
125         void    (*close) (void *devc, int sub_device);
126         int     (*ioctl) (void *devc, u_int cmd, ioctl_arg arg, int local);
127         void    (*reset) (void *devc);
128
129         void    *devc;  /* Driver specific info */
130 }       coproc_operations;
131
132 struct audio_operations {
133         char            name[32];
134         int             flags;
135 #define NOTHING_SPECIAL         0
136 #define NEEDS_RESTART           1
137 #define DMA_AUTOMODE            2
138 #define DMA_DUPLEX              4
139 #define DMA_DISABLE             8
140         int     format_mask;    /* Bitmask for supported audio formats */
141         void    *devc;  /* Driver specific info */
142         int     (*open) (int dev, int mode);
143         void    (*close) (int dev);
144         void    (*output_block) (int dev, unsigned long buf,
145                 int count, int intrflag, int dma_restart);
146         void    (*start_input) (int dev, unsigned long buf,
147                 int count, int intrflag, int dma_restart);
148         int     (*ioctl) (int dev, u_int cmd, ioctl_arg arg, int local);
149         int     (*prepare_for_input) (int dev, int bufsize, int nbufs);
150         int     (*prepare_for_output) (int dev, int bufsize, int nbufs);
151         void    (*reset) (int dev);
152         void    (*halt_xfer) (int dev);
153         int     (*local_qlen) (int dev);
154         void    (*copy_from_user) (int dev, char *localbuf, int localoffs,
155                 snd_rw_buf * userbuf, int useroffs, int len);
156         void    (*halt_input) (int dev);
157         void    (*halt_output) (int dev);
158         void    (*trigger) (int dev, int bits);
159         long    buffsize;
160         int     dmachan1, dmachan2;
161         struct dma_buffparms *dmap_in, *dmap_out;
162         struct coproc_operations *coproc;
163         int     mixer_dev;
164         int     enable_bits;
165         int     open_mode;
166         int     go;
167         int     otherside;
168         int     busy;
169 };
170
171 struct mixer_operations {
172         char    name[32];
173         int     (*ioctl) (int dev, unsigned int cmd, ioctl_arg arg);
174 };
175
176 struct synth_operations {
177         struct synth_info *info;
178         int     midi_dev;
179         int     synth_type;
180         int     synth_subtype;
181
182         int     (*open) (int dev, int mode);
183         void    (*close) (int dev);
184         int     (*ioctl) (int dev, unsigned int cmd, ioctl_arg arg);
185         int     (*kill_note) (int dev, int voice, int note, int velocity);
186         int     (*start_note) (int dev, int voice, int note, int velocity);
187         int     (*set_instr) (int dev, int voice, int instr);
188         void    (*reset) (int dev);
189         void    (*hw_control) (int dev, unsigned char *event);
190         int     (*load_patch) (int dev, int format, snd_rw_buf * addr,
191                 int offs, int count, int pmgr_flag);
192         void    (*aftertouch) (int dev, int voice, int pressure);
193         void    (*controller) (int dev, int voice, int ctrl_num, int value);
194         void    (*panning) (int dev, int voice, int value);
195         void    (*volume_method) (int dev, int mode);
196         int     (*pmgr_interface) (int dev, struct patmgr_info * info);
197         void    (*bender) (int dev, int chn, int value);
198         int     (*alloc_voice) (int dev, int chn, int note, struct voice_alloc_info * alloc);
199         void    (*setup_voice) (int dev, int voice, int chn);
200         int     (*send_sysex) (int dev, unsigned char *bytes, int len);
201
202         struct voice_alloc_info alloc;
203         struct channel_info chn_info[16];
204 };
205
206 struct midi_input_info {        /* MIDI input scanner variables */
207 #define MI_MAX  10
208         int             m_busy;
209         unsigned char   m_buf[MI_MAX];
210         unsigned char   m_prev_status;  /* For running status */
211         int             m_ptr;
212 #define MST_INIT                        0
213 #define MST_DATA                        1
214 #define MST_SYSEX                       2
215         int             m_state;
216         int             m_left;
217 };
218
219 struct midi_operations {
220         struct midi_info info;
221         struct synth_operations *converter;
222         struct midi_input_info in_info;
223         int     (*open) (int dev, int mode,
224                 void (*inputintr) (int dev, unsigned char data),
225                 void (*outputintr) (int dev) );
226         void    (*close) (int dev);
227         int     (*ioctl) (int dev, unsigned int cmd, ioctl_arg arg);
228         int     (*putc) (int dev, unsigned char data);
229         int     (*start_read) (int dev);
230         int     (*end_read) (int dev);
231         void    (*kick) (int dev);
232         int     (*command) (int dev, unsigned char *data);
233         int     (*buffer_status) (int dev);
234         int     (*prefix_cmd) (int dev, unsigned char status);
235         struct coproc_operations *coproc;
236 };
237
238 struct sound_lowlev_timer {
239         int     dev;
240         u_int   (*tmr_start) (int dev, unsigned int usecs);
241         void    (*tmr_disable) (int dev);
242         void    (*tmr_restart) (int dev);
243 };
244
245 struct sound_timer_operations {
246         struct sound_timer_info info;
247         int     priority;
248         int     devlink;
249         int     (*open) (int dev, int mode);
250         void    (*close) (int dev);
251         int     (*event) (int dev, unsigned char *ev);
252         u_long  (*get_time) (int dev);
253         int     (*ioctl) (int dev, unsigned int cmd, ioctl_arg arg);
254         void    (*arm_timer) (int dev, long time);
255 };
256
257 #ifdef _DEV_TABLE_C_
258 struct audio_operations *audio_devs[MAX_AUDIO_DEV] = {NULL};
259 int     num_audiodevs = 0;
260 struct mixer_operations *mixer_devs[MAX_MIXER_DEV] = {NULL};
261 int     num_mixers = 0;
262 struct synth_operations *synth_devs[MAX_SYNTH_DEV + MAX_MIDI_DEV] = {NULL};
263 int     num_synths = 0;
264 struct midi_operations *midi_devs[MAX_MIDI_DEV] = {NULL};
265 int     num_midis = 0;
266
267 #ifdef CONFIG_SEQUENCER
268 extern struct sound_timer_operations default_sound_timer;
269 struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] =
270         {&default_sound_timer, NULL};
271 int             num_sound_timers = 1;
272 #else
273 struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] = {NULL};
274 int             num_sound_timers = 0;
275 #endif
276
277 /*
278  * List of low level drivers compiled into the kernel.
279  *
280  * remember, each entry contains:
281
282         char    *driver_id;
283         int      card_subtype;  (Driver specific. Usually 0)
284         int      card_type;     (From soundcard.h)
285         char    *name;
286         void    (*attach) (struct address_info * hw_config);
287         int     (*probe) (struct address_info * hw_config);
288  *
289  */
290
291 struct driver_info sound_drivers[] = {
292
293 #ifdef CONFIG_PSS
294     {"PSSECHO", 0, SNDCARD_PSS, "Echo Personal Sound System PSS (ESC614)",
295                 attach_pss, probe_pss},
296     {"PSSMPU", 0, SNDCARD_PSS_MPU, "PSS-MPU",
297                 attach_pss_mpu, probe_pss_mpu},
298     {"PSSMSS", 0, SNDCARD_PSS_MSS, "PSS-MSS",
299                 attach_pss_mss, probe_pss_mss},
300 #endif
301
302 #ifdef CONFIG_MSS
303     /* XXX changed type from 0 to 1 -lr 970705 */
304     {"MSS", 1, SNDCARD_MSS, "MS Sound System",
305                 attach_mss, probe_mss},
306     /* MSS without IRQ/DMA config registers (for DEC Alphas) */
307     {"PCXBJ", 1, SNDCARD_PSEUDO_MSS, "MS Sound System (AXP)",
308                 attach_mss, probe_mss},
309 #endif
310
311 #ifdef CONFIG_MAD16
312     {"MAD16", 0, SNDCARD_MAD16, "MAD16/Mozart (MSS)",
313                 attach_mad16, probe_mad16},
314     {"MAD16MPU", 0, SNDCARD_MAD16_MPU, "MAD16/Mozart (MPU)",
315                 attach_mad16_mpu, probe_mad16_mpu},
316 #endif
317
318 #ifdef CONFIG_CS4232
319     {"CS4232", 0, SNDCARD_CS4232, "CS4232",
320                 attach_cs4232, probe_cs4232},
321     {"CS4232MPU", 0, SNDCARD_CS4232_MPU, "CS4232 MIDI",
322                 attach_cs4232_mpu, probe_cs4232_mpu},
323 #endif
324
325 #ifdef CONFIG_YM3812
326     {"OPL3", 0, SNDCARD_ADLIB, "OPL-2/OPL-3 FM",
327                 attach_adlib_card, probe_adlib},
328 #endif
329
330 #ifdef CONFIG_PAS
331     {"PAS16", 0, SNDCARD_PAS, "ProAudioSpectrum",
332                 attach_pas_card, probe_pas},
333 #endif
334
335 #if defined(CONFIG_MPU401) && defined(CONFIG_MIDI)
336     {"MPU401", 0, SNDCARD_MPU401, "Roland MPU-401",
337                 attach_mpu401, probe_mpu401},
338 #endif
339
340 #if defined(CONFIG_MAUI)
341     {"MAUI", 0, SNDCARD_MAUI, "TB Maui",
342                 attach_maui, probe_maui},
343 #endif
344
345 #if defined(CONFIG_UART6850) && defined(CONFIG_MIDI)
346     {"MIDI6850", 0, SNDCARD_UART6850, "6860 UART Midi",
347                 attach_uart6850, probe_uart6850},
348 #endif
349
350 #ifdef CONFIG_SB
351     {"SBLAST", 0, SNDCARD_SB, "SoundBlaster",
352                 attach_sb_card, probe_sb},
353 #endif
354
355 #if defined(CONFIG_SB) && defined(CONFIG_SB16)
356 #ifdef CONFIG_AUDIO
357     {"SB16", 0, SNDCARD_SB16, "SoundBlaster16",
358                 sb16_dsp_init, sb16_dsp_detect},
359 #endif
360 #ifdef CONFIG_MIDI
361     {"SB16MIDI", 0, SNDCARD_SB16MIDI, "SB16 MIDI",
362                 attach_sb16midi, probe_sb16midi},
363 #endif
364 #endif
365
366 #ifdef CONFIG_GUS16
367     {"GUS16", 0, SNDCARD_GUS16, "Ultrasound 16-bit opt.",
368                 attach_gus_db16, probe_gus_db16},
369 #endif
370
371 #ifdef CONFIG_GUS
372     {"GUS", 0, SNDCARD_GUS, "Gravis Ultrasound",
373                 attach_gus_card, probe_gus},
374 #endif
375
376 #ifdef CONFIG_SSCAPE
377     {"SSCAPE", 0, SNDCARD_SSCAPE, "Ensoniq Soundscape",
378                 attach_sscape, probe_sscape},
379     {"SSCAPEMSS", 0, SNDCARD_SSCAPE_MSS, "MS Sound System (SoundScape)",
380                 attach_ss_mss, probe_ss_mss},
381 #endif
382
383 #if     NTRIX > 0
384     {"TRXPRO", 0, SNDCARD_TRXPRO, "MediaTriX AudioTriX Pro",
385                 attach_trix_wss, probe_trix_wss},
386     {"TRXPROSB", 0, SNDCARD_TRXPRO_SB, "AudioTriX (SB mode)",
387                 attach_trix_sb, probe_trix_sb},
388     {"TRXPROMPU", 0, SNDCARD_TRXPRO_MPU, "AudioTriX MIDI",
389                 attach_trix_mpu, probe_trix_mpu},
390 #endif
391
392 #ifdef CONFIG_PNP
393     {"AD1848", 0, 500, "PnP MSS",
394                 attach_pnp_ad1848, probe_pnp_ad1848},
395 #endif
396
397 #ifdef CONFIG_NSS
398     {"NSS", 0, SNDCARD_NSS, "NEC PC-9801-86 Sound System",
399                 attach_nss, probe_nss},
400 #endif
401
402     {NULL, 0, 0, "*?*", NULL, NULL}
403 };
404
405 int             num_sound_drivers =
406 sizeof(sound_drivers) / sizeof(struct driver_info);
407 int             max_sound_drivers =
408 sizeof(sound_drivers) / sizeof(struct driver_info);
409
410 #define FULL_SOUND
411
412 #ifndef FULL_SOUND
413 /*
414  * List of devices actually configured in the system.
415  * 
416  * Note! The detection order is significant. Don't change it.
417  *
418  * remember, the list contains
419  *
420  *      int     card_type;      (Link (search key) to the driver list)
421  *      struct address_info config;
422  *              io_base, irq, dma, dma2,
423  *              always_detect, char *name, struct... *osp
424  *      int     enabled;
425  *      void    *for_driver_use;
426  *
427  */
428
429 struct card_info snd_installed_cards[] = {
430 #ifdef CONFIG_PSS
431     {SNDCARD_PSS, {PSS_BASE, 0, -1, -1}, SND_DEFAULT_ENABLE},
432 #ifdef PSS_MPU_BASE
433     {SNDCARD_PSS_MPU, {PSS_MPU_BASE, PSS_MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
434 #endif
435 #ifdef PSS_MSS_BASE
436     {SNDCARD_PSS_MSS, {PSS_MSS_BASE, PSS_MSS_IRQ, PSS_MSS_DMA, -1}, SND_DEFAULT_ENABLE},
437 #endif
438 #endif  /* config PSS */
439
440 #if     NTRIX > 0
441     {SNDCARD_TRXPRO, {TRIX_BASE, TRIX_IRQ, TRIX_DMA, TRIX_DMA2}, SND_DEFAULT_ENABLE},
442 #ifdef TRIX_SB_BASE
443     {SNDCARD_TRXPRO_SB, {TRIX_SB_BASE, TRIX_SB_IRQ, TRIX_SB_DMA, -1}, SND_DEFAULT_ENABLE},
444 #endif
445 #ifdef TRIX_MPU_BASE
446     {SNDCARD_TRXPRO_MPU, {TRIX_MPU_BASE, TRIX_MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
447 #endif
448 #endif  /*      NTRIX > 0       */
449
450 #ifdef CONFIG_SSCAPE
451     {SNDCARD_SSCAPE, {SSCAPE_BASE, SSCAPE_IRQ, SSCAPE_DMA, -1}, SND_DEFAULT_ENABLE},
452     {SNDCARD_SSCAPE_MSS, {SSCAPE_MSS_BASE, SSCAPE_MSS_IRQ, SSCAPE_MSS_DMA, -1}, SND_DEFAULT_ENABLE},
453 #endif
454
455 #ifdef CONFIG_MAD16
456     {SNDCARD_MAD16, {MAD16_BASE, MAD16_IRQ, MAD16_DMA, MAD16_DMA2}, SND_DEFAULT_ENABLE},
457 #ifdef MAD16_MPU_BASE
458     {SNDCARD_MAD16_MPU, {MAD16_MPU_BASE, MAD16_MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
459 #endif
460 #endif  /* CONFIG_MAD16 */
461
462 #ifdef CONFIG_CS4232
463 #ifdef CS4232_MPU_BASE
464     {SNDCARD_CS4232_MPU, {CS4232_MPU_BASE, CS4232_MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
465 #endif
466     {SNDCARD_CS4232, {CS4232_BASE, CS4232_IRQ, CS4232_DMA, CS4232_DMA2}, SND_DEFAULT_ENABLE},
467 #endif
468
469 #ifdef CONFIG_MSS
470 #ifdef PSEUDO_MSS
471     {SNDCARD_MSS, {MSS_BASE, MSS_IRQ, MSS_DMA, -1}, SND_DEFAULT_ENABLE},
472 #else
473     {SNDCARD_PSEUDO_MSS, {MSS_BASE, MSS_IRQ, MSS_DMA, -1}, SND_DEFAULT_ENABLE},
474 #endif
475 #ifdef MSS2_BASE
476     {SNDCARD_MSS, {MSS2_BASE, MSS2_IRQ, MSS2_DMA, -1}, SND_DEFAULT_ENABLE},
477 #endif
478 #endif  /* CONFIG_MSS */
479
480 #ifdef CONFIG_PAS
481     {SNDCARD_PAS, {PAS_BASE, PAS_IRQ, PAS_DMA, -1}, SND_DEFAULT_ENABLE},
482 #endif
483
484 #ifdef CONFIG_SB
485 #ifndef SBC_DMA
486 #define SBC_DMA         1
487 #endif
488     {SNDCARD_SB, {SBC_BASE, SBC_IRQ, SBC_DMA, -1}, SND_DEFAULT_ENABLE},
489 #endif
490
491 #if defined(CONFIG_MAUI)
492     {SNDCARD_MAUI, {MAUI_BASE, MAUI_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
493 #endif
494
495 #if defined(CONFIG_MPU401) && defined(CONFIG_MIDI)
496     {SNDCARD_MPU401, {MPU_BASE, MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
497 #ifdef MPU2_BASE
498     {SNDCARD_MPU401, {MPU2_BASE, MPU2_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
499 #endif
500 #ifdef MPU3_BASE
501     {SNDCARD_MPU401, {MPU3_BASE, MPU2_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
502 #endif
503 #endif
504
505 #if defined(CONFIG_UART6850) && defined(CONFIG_MIDI)
506     {SNDCARD_UART6850, {U6850_BASE, U6850_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
507 #endif
508
509 #if defined(CONFIG_SB) && defined(CONFIG_SB16)
510 #ifdef CONFIG_AUDIO
511     {SNDCARD_SB16, {SBC_BASE, SBC_IRQ, SB16_DMA, -1}, SND_DEFAULT_ENABLE},
512 #endif
513 #ifdef CONFIG_MIDI
514     {SNDCARD_SB16MIDI, {SB16MIDI_BASE, SBC_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
515 #endif
516 #ifdef CONFIG_AWE32
517     {SNDCARD_AWE32,{AWE32_BASE, 0, 0, -1}, SND_DEFAULT_ENABLE},
518 #endif
519 #endif
520
521 #ifdef CONFIG_GUS
522 #ifdef CONFIG_GUS16
523     {SNDCARD_GUS16, {GUS16_BASE, GUS16_IRQ, GUS16_DMA, -1}, SND_DEFAULT_ENABLE},
524 #endif
525     {SNDCARD_GUS, {GUS_BASE, GUS_IRQ, GUS_DMA, GUS_DMA2}, SND_DEFAULT_ENABLE},
526 #endif
527
528 #ifdef CONFIG_YM3812
529     {SNDCARD_ADLIB, {FM_MONO, 0, 0, -1}, SND_DEFAULT_ENABLE},
530 #endif
531
532 #ifdef CONFIG_NSS
533     {SNDCARD_NSS, {NSS_BASE, NSS_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
534 #endif
535     /* Define some expansion space */
536     {0, {0}, 0},
537     {0, {0}, 0},
538     {0, {0}, 0},
539     {0, {0}, 0},
540     {0, {0}, 0}
541 };
542
543 int num_sound_cards = sizeof(snd_installed_cards) / sizeof(struct card_info);
544 int max_sound_cards = sizeof(snd_installed_cards) / sizeof(struct card_info);
545
546 #else
547 int num_sound_cards = 0;
548 struct card_info snd_installed_cards[20] = {{0}};
549 int max_sound_cards = 20;
550 #endif
551
552 #ifdef MODULE
553 int trace_init = 0;
554 #else
555 int trace_init = 1;
556 #endif
557
558 #else
559 extern struct audio_operations *audio_devs[MAX_AUDIO_DEV];
560 extern int num_audiodevs;
561 extern struct mixer_operations *mixer_devs[MAX_MIXER_DEV];
562 extern int      num_mixers;
563 extern struct synth_operations *synth_devs[MAX_SYNTH_DEV + MAX_MIDI_DEV];
564 extern int      num_synths;
565 extern struct midi_operations *midi_devs[MAX_MIDI_DEV];
566 extern int      num_midis;
567 extern struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV];
568 extern int      num_sound_timers;
569
570 extern struct driver_info sound_drivers[];
571 extern int      num_sound_drivers;
572 extern int      max_sound_drivers;
573 extern struct card_info snd_installed_cards[];
574 extern int      num_sound_cards;
575 extern int      max_sound_cards;
576
577 extern int      trace_init;
578
579 void            sndtable_init(void);
580 int             sndtable_get_cardcount(void);
581 struct address_info *sound_getconf(int card_type);
582 void            sound_chconf(int card_type, int ioaddr, int irq, int dma);
583 int             snd_find_driver(int type);
584 int             sndtable_identify_card(char *name);
585 void            sound_setup(char *str, int *ints);
586
587 int             sound_alloc_dmap(int dev, struct dma_buffparms * dmap, int chan);
588 void            sound_free_dmap(int dev, struct dma_buffparms * dmap);
589 extern int      soud_map_buffer(int dev, struct dma_buffparms * dmap, buffmem_desc * info);
590 void            install_pnp_sounddrv(struct pnp_sounddev * drv);
591 int             sndtable_probe(int unit, struct address_info * hw_config);
592 int             sndtable_init_card(int unit, struct address_info * hw_config);
593 void            sound_timer_init(struct sound_lowlev_timer * t, char *name);
594 int 
595 sound_start_dma(int dev, struct dma_buffparms * dmap, int chan,
596                 unsigned long physaddr,
597                 int count, int dma_mode, int autoinit);
598 void            sound_dma_intr(int dev, struct dma_buffparms * dmap, int chan);
599
600 #endif                          /* _DEV_TABLE_C_ */
601 #endif                          /* _DEV_TABLE_H_ */