3 * A driver for sound cards, misc. configuration parameters.
6 * Copyright (C) by Hannu Savolainen 1993-1997
8 * OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
9 * Version 2 (June 1991). See the "COPYING" file distributed with this software
14 #ifndef _SOUND_CONFIG_H_
15 #define _SOUND_CONFIG_H_
18 #include <linux/sound.h>
21 #include "soundvers.h"
24 #ifndef SND_DEFAULT_ENABLE
25 #define SND_DEFAULT_ENABLE 1
28 #ifndef MAX_REALTIME_FACTOR
29 #define MAX_REALTIME_FACTOR 4
33 * Use always 64k buffer size. There is no reason to use shorter.
36 #define DSP_BUFFSIZE (64*1024)
39 #define DSP_BUFFCOUNT 1 /* 1 is recommended. */
42 #define FM_MONO 0x388 /* This is the I/O address used by AdLib */
44 #ifndef CONFIG_PAS_BASE
45 #define CONFIG_PAS_BASE 0x388
48 /* SEQ_MAX_QUEUE is the maximum number of sequencer events buffered by the
49 driver. (There is no need to alter this) */
50 #define SEQ_MAX_QUEUE 1024
52 #define SBFM_MAXINSTR (256) /* Size of the FM Instrument bank */
53 /* 128 instruments for general MIDI setup and 16 unassigned */
55 #define SND_NDEVS 256 /* Number of supported devices */
57 #define DSP_DEFAULT_SPEED 8000
59 #define MAX_AUDIO_DEV 5
60 #define MAX_MIXER_DEV 5
61 #define MAX_SYNTH_DEV 5
62 #define MAX_MIDI_DEV 6
63 #define MAX_TIMER_DEV 4
70 int always_detect
; /* 1=Trust me, it's there */
72 int driver_use_1
; /* Driver defined field 1 */
73 int driver_use_2
; /* Driver defined field 2 */
74 int *osp
; /* OS specific info */
75 int card_subtype
; /* Driver specific. Usually 0 */
76 void *memptr
; /* Module memory chainer */
77 int slots
[6]; /* To remember driver slot ids */
80 #define SYNTH_MAX_VOICES 32
82 struct voice_alloc_info
{
85 int ptr
; /* For device specific use */
86 unsigned short map
[SYNTH_MAX_VOICES
]; /* (ch << 8) | (note+1) */
88 int alloc_times
[SYNTH_MAX_VOICES
];
95 unsigned char controllers
[128];
99 * Process wakeup reasons
102 #define WK_WAKEUP 0x01
103 #define WK_TIMEOUT 0x02
104 #define WK_SIGNAL 0x04
105 #define WK_SLEEP 0x08
106 #define WK_SELECT 0x10
107 #define WK_ABORT 0x20
109 #define OPEN_READ PCM_ENABLE_INPUT
110 #define OPEN_WRITE PCM_ENABLE_OUTPUT
111 #define OPEN_READWRITE (OPEN_READ|OPEN_WRITE)
113 #if OPEN_READ == FMODE_READ && OPEN_WRITE == FMODE_WRITE
115 static inline int translate_mode(struct file
*file
)
122 static inline int translate_mode(struct file
*file
)
124 return ((file
->f_mode
& FMODE_READ
) ? OPEN_READ
: 0) |
125 ((file
->f_mode
& FMODE_WRITE
) ? OPEN_WRITE
: 0);
131 #include "sound_calls.h"
132 #include "dev_table.h"
139 #define DDB(x) do {} while (0)
150 #define TIMER_ARMED 121234
151 #define TIMER_NOT_ARMED 1