OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [drivers/] [sound/] [dev_table.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1626 jcastillo
/*
2
 *      dev_table.h
3
 *
4
 *      Global definitions for device call tables
5
 */
6
/*
7
 * Copyright (C) by Hannu Savolainen 1993-1996
8
 *
9
 * USS/Lite for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
10
 * Version 2 (June 1991). See the "COPYING" file distributed with this software
11
 * for more info.
12
 */
13
 
14
 
15
#ifndef _DEV_TABLE_H_
16
#define _DEV_TABLE_H_
17
 
18
#include <linux/config.h>
19
 
20
/*
21
 * Sound card numbers 27 to 999. (1 to 26 are defined in soundcard.h)
22
 * Numbers 1000 to N are reserved for driver's internal use.
23
 */
24
#define SNDCARD_DESKPROXL               27      /* Compaq Deskpro XL */
25
 
26
/*
27
 *      NOTE!   NOTE!   NOTE!   NOTE!
28
 *
29
 *      If you modify this file, please check the dev_table.c also.
30
 *
31
 *      NOTE!   NOTE!   NOTE!   NOTE!
32
 */
33
 
34
extern int sound_started;
35
 
36
struct driver_info {
37
        char *driver_id;
38
        int card_subtype;       /* Driver specific. Usually 0 */
39
        int card_type;          /*      From soundcard.h        */
40
        char *name;
41
        void (*attach) (struct address_info *hw_config);
42
        int (*probe) (struct address_info *hw_config);
43
        void (*unload) (struct address_info *hw_config);
44
};
45
 
46
struct card_info {
47
        int card_type;  /* Link (search key) to the driver list */
48
        struct address_info config;
49
        int enabled;
50
        void *for_driver_use;
51
};
52
 
53
typedef struct pnp_sounddev
54
{
55
        int id;
56
        void (*setup)(void *dev);
57
        char *driver_name;
58
}pnp_sounddev;
59
 
60
/*
61
 * Device specific parameters (used only by dmabuf.c)
62
 */
63
#define MAX_SUB_BUFFERS         (32*MAX_REALTIME_FACTOR)
64
 
65
#define DMODE_NONE              0
66
#define DMODE_OUTPUT            PCM_ENABLE_OUTPUT
67
#define DMODE_INPUT             PCM_ENABLE_INPUT
68
 
69
struct dma_buffparms {
70
        int      dma_mode;      /* DMODE_INPUT, DMODE_OUTPUT or DMODE_NONE */
71
        int      closing;
72
 
73
        /*
74
         * Pointers to raw buffers
75
         */
76
 
77
        char     *raw_buf;
78
        unsigned long   raw_buf_phys;
79
 
80
        /*
81
         * Device state tables
82
         */
83
 
84
        unsigned 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_EMPTY       0x00000010      
90
#define DMA_ALLOC_DONE  0x00000020
91
#define DMA_SYNCING     0x00000040
92
#define DMA_CLEAN       0x00000080
93
 
94
        int      open_mode;
95
 
96
        /*
97
         * Queue parameters.
98
         */
99
        int      qlen;
100
        int      qhead;
101
        int      qtail;
102
        int      cfrag; /* Current incomplete fragment (write) */
103
 
104
        int      nbufs;
105
        int      counts[MAX_SUB_BUFFERS];
106
        int      subdivision;
107
 
108
        int      fragment_size;
109
        int      max_fragments;
110
 
111
        int      bytes_in_use;
112
 
113
        int      underrun_count;
114
        int      byte_counter;
115
 
116
        int      mapping_flags;
117
#define                 DMA_MAP_MAPPED          0x00000001
118
        char    neutral_byte;
119
#ifdef OS_DMA_PARMS
120
        OS_DMA_PARMS
121
#endif
122
};
123
 
124
/*
125
 * Structure for use with various microcontrollers and DSP processors
126
 * in the recent soundcards.
127
 */
128
typedef struct coproc_operations {
129
                char name[32];
130
                int (*open) (void *devc, int sub_device);
131
                void (*close) (void *devc, int sub_device);
132
                int (*ioctl) (void *devc, unsigned int cmd, caddr_t arg, int local);
133
                void (*reset) (void *devc);
134
 
135
                void *devc;             /* Driver specific info */
136
        } coproc_operations;
137
 
138
struct audio_driver {
139
        int (*open) (int dev, int mode);
140
        void (*close) (int dev);
141
        void (*output_block) (int dev, unsigned long buf,
142
                              int count, int intrflag, int dma_restart);
143
        void (*start_input) (int dev, unsigned long buf,
144
                             int count, int intrflag, int dma_restart);
145
        int (*ioctl) (int dev, unsigned int cmd, caddr_t arg, int local);
146
        int (*prepare_for_input) (int dev, int bufsize, int nbufs);
147
        int (*prepare_for_output) (int dev, int bufsize, int nbufs);
148
        void (*reset) (int dev);
149
        void (*halt_xfer) (int dev);
150
        int (*local_qlen)(int dev);
151
        void (*copy_from_user)(int dev, char *localbuf, int localoffs,
152
                               const char *userbuf, int useroffs, int len);
153
        void (*halt_input) (int dev);
154
        void (*halt_output) (int dev);
155
        void (*trigger) (int dev, int bits);
156
        int (*set_speed)(int dev, int speed);
157
        unsigned int (*set_bits)(int dev, unsigned int bits);
158
        short (*set_channels)(int dev, short channels);
159
};
160
 
161
struct audio_operations {
162
        char name[32];
163
        int flags;
164
#define NOTHING_SPECIAL         0x00
165
#define NEEDS_RESTART           0x01
166
#define DMA_AUTOMODE            0x02
167
#define DMA_DUPLEX              0x04
168
#define DMA_PSEUDO_AUTOMODE     0x08
169
#define DMA_HARDSTOP            0x10
170
        int  format_mask;       /* Bitmask for supported audio formats */
171
        void *devc;             /* Driver specific info */
172
        struct audio_driver *d;
173
        long buffsize;
174
        int dmachan1, dmachan2;
175
        struct dma_buffparms *dmap_in, *dmap_out;
176
        struct coproc_operations *coproc;
177
        int mixer_dev;
178
        int enable_bits;
179
        int open_mode;
180
        int go;
181
        int min_fragment;       /* 0 == unlimited */
182
};
183
 
184
struct mixer_operations {
185
        char id[16];
186
        char name[32];
187
        int (*ioctl) (int dev, unsigned int cmd, caddr_t arg);
188
 
189
        void *devc;
190
};
191
 
192
struct synth_operations {
193
        struct synth_info *info;
194
        int midi_dev;
195
        int synth_type;
196
        int synth_subtype;
197
 
198
        int (*open) (int dev, int mode);
199
        void (*close) (int dev);
200
        int (*ioctl) (int dev, unsigned int cmd, caddr_t arg);
201
        int (*kill_note) (int dev, int voice, int note, int velocity);
202
        int (*start_note) (int dev, int voice, int note, int velocity);
203
        int (*set_instr) (int dev, int voice, int instr);
204
        void (*reset) (int dev);
205
        void (*hw_control) (int dev, unsigned char *event);
206
        int (*load_patch) (int dev, int format, const char *addr,
207
             int offs, int count, int pmgr_flag);
208
        void (*aftertouch) (int dev, int voice, int pressure);
209
        void (*controller) (int dev, int voice, int ctrl_num, int value);
210
        void (*panning) (int dev, int voice, int value);
211
        void (*volume_method) (int dev, int mode);
212
        int (*pmgr_interface) (int dev, struct patmgr_info *info);
213
        void (*bender) (int dev, int chn, int value);
214
        int (*alloc_voice) (int dev, int chn, int note, struct voice_alloc_info *alloc);
215
        void (*setup_voice) (int dev, int voice, int chn);
216
        int (*send_sysex)(int dev, unsigned char *bytes, int len);
217
 
218
        struct voice_alloc_info alloc;
219
        struct channel_info chn_info[16];
220
};
221
 
222
struct midi_input_info { /* MIDI input scanner variables */
223
#define MI_MAX  10
224
                int             m_busy;
225
                unsigned char   m_buf[MI_MAX];
226
                unsigned char   m_prev_status;  /* For running status */
227
                int             m_ptr;
228
#define MST_INIT                        0
229
#define MST_DATA                        1
230
#define MST_SYSEX                       2
231
                int             m_state;
232
                int             m_left;
233
        };
234
 
235
struct midi_operations {
236
        struct midi_info info;
237
        struct synth_operations *converter;
238
        struct midi_input_info in_info;
239
        int (*open) (int dev, int mode,
240
                void (*inputintr)(int dev, unsigned char data),
241
                void (*outputintr)(int dev)
242
                );
243
        void (*close) (int dev);
244
        int (*ioctl) (int dev, unsigned int cmd, caddr_t arg);
245
        int (*putc) (int dev, unsigned char data);
246
        int (*start_read) (int dev);
247
        int (*end_read) (int dev);
248
        void (*kick)(int dev);
249
        int (*command) (int dev, unsigned char *data);
250
        int (*buffer_status) (int dev);
251
        int (*prefix_cmd) (int dev, unsigned char status);
252
        struct coproc_operations *coproc;
253
        void *devc;
254
};
255
 
256
struct sound_lowlev_timer {
257
                int dev;
258
                unsigned int (*tmr_start)(int dev, unsigned int usecs);
259
                void (*tmr_disable)(int dev);
260
                void (*tmr_restart)(int dev);
261
        };
262
 
263
struct sound_timer_operations {
264
        struct sound_timer_info info;
265
        int priority;
266
        int devlink;
267
        int (*open)(int dev, int mode);
268
        void (*close)(int dev);
269
        int (*event)(int dev, unsigned char *ev);
270
        unsigned long (*get_time)(int dev);
271
        int (*ioctl) (int dev, unsigned int cmd, caddr_t arg);
272
        void (*arm_timer)(int dev, long time);
273
};
274
 
275
#ifdef _DEV_TABLE_C_   
276
        struct audio_operations *audio_devs[MAX_AUDIO_DEV] = {NULL}; int num_audiodevs = 0;
277
        struct mixer_operations *mixer_devs[MAX_MIXER_DEV] = {NULL}; int num_mixers = 0;
278
        struct synth_operations *synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV] = {NULL}; int num_synths = 0;
279
        struct midi_operations *midi_devs[MAX_MIDI_DEV] = {NULL}; int num_midis = 0;
280
 
281
#ifdef CONFIG_SEQUENCER
282
        extern struct sound_timer_operations default_sound_timer;
283
        struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] =
284
                {&default_sound_timer, NULL};
285
        int num_sound_timers = 1;
286
#else
287
        struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] =
288
                {NULL};
289
        int num_sound_timers = 0;
290
#endif
291
 
292
/*
293
 * List of low level drivers compiled into the kernel.
294
 */
295
 
296
        struct driver_info sound_drivers[] = {
297
#ifdef CONFIG_PSS
298
          {"PSS", 0, SNDCARD_PSS, "Echo Personal Sound System PSS (ESC614)", attach_pss, probe_pss, unload_pss},
299
          {"PSSMPU", 0, SNDCARD_PSS_MPU, "PSS-MPU", attach_pss_mpu, probe_pss_mpu, unload_pss_mpu},
300
          {"PSSMSS", 0, SNDCARD_PSS_MSS, "PSS-MSS", attach_pss_mss, probe_pss_mss, unload_pss_mss},
301
#endif
302
#ifdef CONFIG_MSS
303
                {"MSS", 0, SNDCARD_MSS,  "MS Sound System",      attach_ms_sound, probe_ms_sound, unload_ms_sound},
304
        /* MSS without IRQ/DMA config registers (for DEC Alphas) */
305
                {"PCXBJ", 1, SNDCARD_PSEUDO_MSS,        "MS Sound System (AXP)",        attach_ms_sound, probe_ms_sound, unload_ms_sound},
306
        /* Compaq Deskpro XL */
307
                {"DESKPROXL", 2, SNDCARD_DESKPROXL,     "Compaq Deskpro XL",    attach_ms_sound, probe_ms_sound, unload_ms_sound},
308
#endif
309
#ifdef CONFIG_MAD16
310
                {"MAD16", 0, SNDCARD_MAD16,      "MAD16/Mozart (MSS)",           attach_mad16, probe_mad16, unload_mad16},
311
                {"MAD16MPU", 0, SNDCARD_MAD16_MPU,       "MAD16/Mozart (MPU)",           attach_mad16_mpu, probe_mad16_mpu, unload_mad16_mpu},
312
#endif
313
#ifdef CONFIG_CS4232
314
                {"CS4232", 0, SNDCARD_CS4232,    "CS4232",               attach_cs4232, probe_cs4232, unload_cs4232},
315
                {"CS4232MPU", 0, SNDCARD_CS4232_MPU,     "CS4232 MIDI",          attach_cs4232_mpu, probe_cs4232_mpu, unload_cs4232_mpu},
316
#endif
317
#ifdef CONFIG_YM3812
318
                {"OPL3", 0, SNDCARD_ADLIB,       "OPL-2/OPL-3 FM",               attach_adlib_card, probe_adlib, unload_adlib},
319
#endif
320
#ifdef CONFIG_PAS
321
                {"PAS16", 0, SNDCARD_PAS,        "ProAudioSpectrum",     attach_pas_card, probe_pas, unload_pas},
322
#endif
323
#if defined(CONFIG_MPU401) && defined(CONFIG_MIDI)
324
                {"MPU401", 0, SNDCARD_MPU401,"Roland MPU-401",   attach_mpu401, probe_mpu401, unload_mpu401},
325
#endif
326
#if defined(CONFIG_MAUI)
327
                {"MAUI", 0, SNDCARD_MAUI,"TB Maui",      attach_maui, probe_maui, unload_maui},
328
#endif
329
#if defined(CONFIG_UART6850) && defined(CONFIG_MIDI)
330
                {"MIDI6850", 0, SNDCARD_UART6850,"6860 UART Midi",       attach_uart6850, probe_uart6850, unload_uart6850},
331
#endif
332
#ifdef CONFIG_SB
333
                {"SBLAST", 0, SNDCARD_SB,        "Sound Blaster",                attach_sb_card, probe_sb, unload_sb},
334
#ifdef CONFIG_MIDI
335
                {"SBMPU", 0, SNDCARD_SB16MIDI,"SB MPU-401",      attach_sbmpu, probe_sbmpu, unload_sbmpu},
336
#endif
337
#endif
338
#ifdef CONFIG_GUS16
339
                {"GUS16", 0, SNDCARD_GUS16,      "Ultrasound 16-bit opt.",       attach_gus_db16, probe_gus_db16, unload_gus_db16},
340
#endif
341
#ifdef CONFIG_GUS
342
                {"GUS", 0, SNDCARD_GUS,  "Gravis Ultrasound",    attach_gus_card, probe_gus, unload_gus},
343
                {"GUSPNP", 1, SNDCARD_GUSPNP,   "GUS PnP",      attach_gus_card, probe_gus, unload_gus},
344
#endif
345
#ifdef CONFIG_SSCAPE
346
                {"SSCAPE", 0, SNDCARD_SSCAPE, "Ensoniq SoundScape",      attach_sscape, probe_sscape, unload_sscape},
347
                {"SSCAPEMSS", 0, SNDCARD_SSCAPE_MSS,     "MS Sound System (SoundScape)", attach_ss_ms_sound, probe_ss_ms_sound, unload_ss_ms_sound},
348
#endif
349
#ifdef CONFIG_TRIX
350
                {"TRXPRO", 0, SNDCARD_TRXPRO, "MediaTrix AudioTrix Pro", attach_trix_wss, probe_trix_wss, unload_trix_wss},
351
                {"TRXPROSB", 0, SNDCARD_TRXPRO_SB, "AudioTrix (SB mode)",        attach_trix_sb, probe_trix_sb, unload_trix_sb},
352
                {"TRXPROMPU", 0, SNDCARD_TRXPRO_MPU, "AudioTrix MIDI",   attach_trix_mpu, probe_trix_mpu, unload_trix_mpu},
353
#endif
354
                {NULL, 0, 0,              "*?*",                  NULL, NULL, NULL}
355
        };
356
 
357
        int num_sound_drivers =
358
            sizeof(sound_drivers) / sizeof (struct driver_info);
359
        int max_sound_drivers =
360
            sizeof(sound_drivers) / sizeof (struct driver_info);
361
 
362
 
363
#ifndef FULL_SOUND
364
/*
365
 *      List of devices actually configured in the system.
366
 *
367
 *      Note! The detection order is significant. Don't change it.
368
 */
369
 
370
        struct card_info snd_installed_cards[] = {
371
#ifdef CONFIG_PSS
372
             {SNDCARD_PSS, {PSS_BASE, 0, -1, -1}, SND_DEFAULT_ENABLE},
373
#       ifdef PSS_MPU_BASE
374
             {SNDCARD_PSS_MPU, {PSS_MPU_BASE, PSS_MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
375
#       endif
376
#       ifdef PSS_MSS_BASE
377
             {SNDCARD_PSS_MSS, {PSS_MSS_BASE, PSS_MSS_IRQ, PSS_MSS_DMA, -1}, SND_DEFAULT_ENABLE},
378
#       endif
379
#endif
380
#ifdef CONFIG_TRIX
381
#ifndef TRIX_DMA2
382
#define TRIX_DMA2 TRIX_DMA
383
#endif
384
             {SNDCARD_TRXPRO, {TRIX_BASE, TRIX_IRQ, TRIX_DMA, TRIX_DMA2}, SND_DEFAULT_ENABLE},
385
#       ifdef TRIX_SB_BASE
386
             {SNDCARD_TRXPRO_SB, {TRIX_SB_BASE, TRIX_SB_IRQ, TRIX_SB_DMA, -1}, SND_DEFAULT_ENABLE},
387
#       endif
388
#       ifdef TRIX_MPU_BASE
389
             {SNDCARD_TRXPRO_MPU, {TRIX_MPU_BASE, TRIX_MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
390
#       endif
391
#endif
392
#ifdef CONFIG_SSCAPE
393
             {SNDCARD_SSCAPE, {SSCAPE_BASE, SSCAPE_IRQ, SSCAPE_DMA, -1}, SND_DEFAULT_ENABLE},
394
             {SNDCARD_SSCAPE_MSS, {SSCAPE_MSS_BASE, SSCAPE_MSS_IRQ, SSCAPE_DMA, -1}, SND_DEFAULT_ENABLE},
395
#endif
396
#ifdef CONFIG_MAD16
397
#ifndef MAD16_DMA2
398
#define MAD16_DMA2 MAD16_DMA
399
#endif
400
             {SNDCARD_MAD16, {MAD16_BASE, MAD16_IRQ, MAD16_DMA, MAD16_DMA2}, SND_DEFAULT_ENABLE},
401
#       ifdef MAD16_MPU_BASE
402
             {SNDCARD_MAD16_MPU, {MAD16_MPU_BASE, MAD16_MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
403
#       endif
404
#endif
405
 
406
#ifdef CONFIG_CS4232
407
#ifndef CS4232_DMA2
408
#define CS4232_DMA2 CS4232_DMA
409
#endif
410
#       ifdef CS4232_MPU_BASE
411
             {SNDCARD_CS4232_MPU, {CS4232_MPU_BASE, CS4232_MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
412
#       endif
413
             {SNDCARD_CS4232, {CS4232_BASE, CS4232_IRQ, CS4232_DMA, CS4232_DMA2}, SND_DEFAULT_ENABLE},
414
#endif
415
 
416
 
417
#ifdef CONFIG_MSS
418
#       ifdef DESKPROXL
419
                {SNDCARD_DESKPROXL, {MSS_BASE, MSS_IRQ, MSS_DMA, -1}, SND_DEFAULT_ENABLE},
420
#       else
421
                {SNDCARD_MSS, {MSS_BASE, MSS_IRQ, MSS_DMA, -1}, SND_DEFAULT_ENABLE},
422
#       endif
423
#       ifdef MSS2_BASE
424
                {SNDCARD_MSS, {MSS2_BASE, MSS2_IRQ, MSS2_DMA, -1}, SND_DEFAULT_ENABLE},
425
#       endif
426
#endif
427
 
428
 
429
#ifdef CONFIG_PAS
430
                {SNDCARD_PAS, {PAS_BASE, PAS_IRQ, PAS_DMA, -1}, SND_DEFAULT_ENABLE},
431
#endif
432
 
433
#ifdef CONFIG_SB
434
#       ifndef SBC_DMA
435
#               define SBC_DMA          1
436
#       endif
437
#       ifndef SB_DMA2
438
#               define SB_DMA2          -1
439
#       endif
440
                {SNDCARD_SB, {SBC_BASE, SBC_IRQ, SBC_DMA, SB_DMA2}, SND_DEFAULT_ENABLE},
441
#       ifdef SB2_BASE
442
                {SNDCARD_SB, {SB2_BASE, SB2_IRQ, SB2_DMA, SB2_DMA2}, SND_DEFAULT_ENABLE},
443
#       endif
444
#endif
445
#if defined(CONFIG_MAUI) 
446
                {SNDCARD_MAUI, {MAUI_BASE, MAUI_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
447
#endif
448
 
449
#if defined(CONFIG_MPU401) && defined(CONFIG_MIDI)
450
                {SNDCARD_MPU401, {MPU_BASE, MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
451
#ifdef MPU2_BASE
452
                {SNDCARD_MPU401, {MPU2_BASE, MPU2_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
453
#endif
454
#ifdef MPU3_BASE
455
                {SNDCARD_MPU401, {MPU3_BASE, MPU2_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
456
#endif
457
#endif
458
 
459
#if defined(CONFIG_UART6850) && defined(CONFIG_MIDI)
460
                {SNDCARD_UART6850, {U6850_BASE, U6850_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
461
#endif
462
 
463
#if defined(CONFIG_SB) 
464
#if defined(CONFIG_MIDI) && defined(SB_MPU_BASE)
465
                {SNDCARD_SB16MIDI,{SB_MPU_BASE, SB_MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
466
#endif
467
#endif
468
 
469
#ifdef CONFIG_GUS
470
#ifndef GUS_DMA2
471
#define GUS_DMA2 GUS_DMA
472
#endif
473
#ifdef CONFIG_GUS16
474
                {SNDCARD_GUS16, {GUS16_BASE, GUS16_IRQ, GUS16_DMA, -1}, SND_DEFAULT_ENABLE},
475
#endif
476
                {SNDCARD_GUS, {GUS_BASE, GUS_IRQ, GUS_DMA, GUS_DMA2}, SND_DEFAULT_ENABLE},
477
#endif
478
 
479
#ifdef CONFIG_YM3812
480
                {SNDCARD_ADLIB, {FM_MONO, 0, 0, -1}, SND_DEFAULT_ENABLE},
481
#endif
482
/* Define some expansion space */
483
                {0, {0}, 0},
484
                {0, {0}, 0},
485
                {0, {0}, 0},
486
                {0, {0}, 0},
487
                {0, {0}, 0}
488
        };
489
 
490
        int num_sound_cards =
491
            sizeof(snd_installed_cards) / sizeof (struct card_info);
492
        int max_sound_cards =
493
            sizeof(snd_installed_cards) / sizeof (struct card_info);
494
 
495
#else
496
        int num_sound_cards = 0;
497
        struct card_info snd_installed_cards[20] = {{0}};
498
        int max_sound_cards = 20;
499
#endif
500
 
501
#   ifdef MODULE
502
        int trace_init = 0;
503
#   else
504
        int trace_init = 1;
505
#   endif
506
#else
507
        extern struct audio_operations * audio_devs[MAX_AUDIO_DEV]; extern int num_audiodevs;
508
        extern struct mixer_operations * mixer_devs[MAX_MIXER_DEV]; extern int num_mixers;
509
        extern struct synth_operations * synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV]; extern int num_synths;
510
        extern struct midi_operations * midi_devs[MAX_MIDI_DEV]; extern int num_midis;
511
        extern struct sound_timer_operations * sound_timer_devs[MAX_TIMER_DEV]; extern int num_sound_timers;
512
 
513
        extern struct driver_info sound_drivers[];
514
        extern int num_sound_drivers;
515
        extern int max_sound_drivers;
516
        extern struct card_info snd_installed_cards[];
517
        extern int num_sound_cards;
518
        extern int max_sound_cards;
519
 
520
        extern int trace_init;
521
#endif  /* _DEV_TABLE_C_ */
522
 
523
void sndtable_init(void);
524
int sndtable_get_cardcount (void);
525
struct address_info *sound_getconf(int card_type);
526
void sound_chconf(int card_type, int ioaddr, int irq, int dma);
527
int snd_find_driver(int type);
528
void sound_unload_drivers(void);
529
void sound_unload_driver(int type);
530
int sndtable_identify_card(char *name);
531
void sound_setup (char *str, int *ints);
532
 
533
int sound_alloc_dmap (int dev, struct dma_buffparms *dmap, int chan);
534
void sound_free_dmap (int dev, struct dma_buffparms *dmap);
535
extern int sound_map_buffer (int dev, struct dma_buffparms *dmap, buffmem_desc *info);
536
void install_pnp_sounddrv(struct pnp_sounddev *drv);
537
int sndtable_probe (int unit, struct address_info *hw_config);
538
int sndtable_init_card (int unit, struct address_info *hw_config);
539
int sndtable_start_card (int unit, struct address_info *hw_config);
540
void sound_timer_init (struct sound_lowlev_timer *t, char *name);
541
int sound_start_dma (   int dev, struct dma_buffparms *dmap, int chan,
542
                        unsigned long physaddr,
543
                        int count, int dma_mode, int autoinit);
544
void sound_dma_intr (int dev, struct dma_buffparms *dmap, int chan);
545
 
546
#define AUDIO_DRIVER_VERSION    1
547
#define MIXER_DRIVER_VERSION    1
548
int sound_install_audiodrv(int vers,
549
                           char *name,
550
                           struct audio_driver *driver,
551
                           int driver_size,
552
                           int flags,
553
                           unsigned int format_mask,
554
                           void *devc,
555
                           int dma1,
556
                           int dma2);
557
int sound_install_mixer(int vers,
558
                        char *name,
559
                        struct mixer_operations *driver,
560
                        int driver_size,
561
                        void *devc);
562
 
563
#endif  /* _DEV_TABLE_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.