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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [arch/] [armnommu/] [drivers/] [sound/] [dev_table.h] - Blame information for rev 199

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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