Import 2.3.18pre1
[davej-history.git] / drivers / sound / sound_calls.h
blob1029df1f265e6f5169126ff7232f87cebf162e9e
1 /*
2 * DMA buffer calls
3 */
5 int DMAbuf_open(int dev, int mode);
6 int DMAbuf_release(int dev, int mode);
7 int DMAbuf_getwrbuffer(int dev, char **buf, int *size, int dontblock);
8 int DMAbuf_getrdbuffer(int dev, char **buf, int *len, int dontblock);
9 int DMAbuf_rmchars(int dev, int buff_no, int c);
10 int DMAbuf_start_output(int dev, int buff_no, int l);
11 int DMAbuf_move_wrpointer(int dev, int l);
12 /* int DMAbuf_ioctl(int dev, unsigned int cmd, caddr_t arg, int local); */
13 void DMAbuf_init(int dev, int dma1, int dma2);
14 void DMAbuf_deinit(int dev);
15 int DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode);
16 int DMAbuf_open_dma (int dev);
17 void DMAbuf_close_dma (int dev);
18 void DMAbuf_inputintr(int dev);
19 void DMAbuf_outputintr(int dev, int underflow_flag);
20 struct dma_buffparms;
21 int DMAbuf_space_in_queue (int dev);
22 int DMAbuf_activate_recording (int dev, struct dma_buffparms *dmap);
23 int DMAbuf_get_buffer_pointer (int dev, struct dma_buffparms *dmap, int direction);
24 void DMAbuf_launch_output(int dev, struct dma_buffparms *dmap);
25 unsigned int DMAbuf_poll(struct file *file, int dev, poll_table *wait);
26 void DMAbuf_start_devices(unsigned int devmask);
27 void DMAbuf_reset (int dev);
28 int DMAbuf_sync (int dev);
31 * System calls for /dev/dsp and /dev/audio (audio.c)
34 int audio_read (int dev, struct file *file, char *buf, int count);
35 int audio_write (int dev, struct file *file, const char *buf, int count);
36 int audio_open (int dev, struct file *file);
37 void audio_release (int dev, struct file *file);
38 int audio_ioctl (int dev, struct file *file,
39 unsigned int cmd, caddr_t arg);
40 void audio_init_devices (void);
41 void reorganize_buffers (int dev, struct dma_buffparms *dmap, int recording);
42 int dma_ioctl (int dev, unsigned int cmd, caddr_t arg);
45 * System calls for the /dev/sequencer
48 int sequencer_read (int dev, struct file *file, char *buf, int count);
49 int sequencer_write (int dev, struct file *file, const char *buf, int count);
50 int sequencer_open (int dev, struct file *file);
51 void sequencer_release (int dev, struct file *file);
52 int sequencer_ioctl (int dev, struct file *file, unsigned int cmd, caddr_t arg);
53 unsigned int sequencer_poll(int dev, struct file *file, poll_table * wait);
55 void sequencer_init (void);
56 void sequencer_unload (void);
57 void sequencer_timer(unsigned long dummy);
58 int note_to_freq(int note_num);
59 unsigned long compute_finetune(unsigned long base_freq, int bend, int range,
60 int vibrato_bend);
61 void seq_input_event(unsigned char *event, int len);
62 void seq_copy_to_input (unsigned char *event, int len);
65 * System calls for the /dev/midi
68 int MIDIbuf_read (int dev, struct file *file, char *buf, int count);
69 int MIDIbuf_write (int dev, struct file *file, const char *buf, int count);
70 int MIDIbuf_open (int dev, struct file *file);
71 void MIDIbuf_release (int dev, struct file *file);
72 int MIDIbuf_ioctl (int dev, struct file *file, unsigned int cmd, caddr_t arg);
73 unsigned int MIDIbuf_poll(int dev, struct file *file, poll_table * wait);
74 int MIDIbuf_avail(int dev);
76 void MIDIbuf_bytes_received(int dev, unsigned char *buf, int count);
77 void MIDIbuf_init(void);
81 * Misc calls from various sources
84 /* From soundcard.c */
85 void request_sound_timer (int count);
86 void sound_stop_timer(void);
87 void conf_printf(char *name, struct address_info *hw_config);
88 void conf_printf2(char *name, int base, int irq, int dma, int dma2);
90 /* From opl3.c */
91 int opl3_detect (int ioaddr, int *osp);
92 int opl3_init(int ioaddr, int *osp);
94 /* From sb_card.c */
95 void attach_sb_card(struct address_info *hw_config);
96 int probe_sb(struct address_info *hw_config);
98 /* From sb_common.c */
99 void sb_dsp_disable_midi(int port);
100 void sb_dsp_disable_recording(int port);
101 void attach_sbmpu (struct address_info *hw_config);
102 int probe_sbmpu (struct address_info *hw_config);
103 void unload_sbmpu (struct address_info *hw_config);
105 /* From uart401.c */
106 void attach_uart401 (struct address_info *hw_config);
107 int probe_uart401 (struct address_info *hw_config);
108 void unload_uart401 (struct address_info *hw_config);
109 void uart401intr (int irq, void *dev_id, struct pt_regs * dummy);
111 /* From adlib_card.c */
112 void attach_adlib_card(struct address_info *hw_config);
113 int probe_adlib(struct address_info *hw_config);
115 /* From pas_card.c */
116 void attach_pas_card(struct address_info *hw_config);
117 int probe_pas(struct address_info *hw_config);
118 int pas_set_intr(int mask);
119 int pas_remove_intr(int mask);
120 unsigned char pas_read(int ioaddr);
121 void pas_write(unsigned char data, int ioaddr);
123 /* From pas_audio.c */
124 void pas_pcm_interrupt(unsigned char status, int cause);
125 void pas_pcm_init(struct address_info *hw_config);
127 /* From pas_mixer.c */
128 int pas_init_mixer(void);
130 /* From pas_midi.c */
131 void pas_midi_init(void);
132 void pas_midi_interrupt(void);
134 /* From gus_card.c */
135 void attach_gus_card(struct address_info * hw_config);
136 int probe_gus(struct address_info *hw_config);
137 int gus_set_midi_irq(int num);
138 void gusintr(int irq, void *dev_id, struct pt_regs * dummy);
139 void attach_gus_db16(struct address_info * hw_config);
140 int probe_gus_db16(struct address_info *hw_config);
142 /* From gus_wave.c */
143 int gus_wave_detect(int baseaddr);
144 void gus_wave_init(struct address_info *hw_config);
145 void gus_wave_unload (struct address_info *hw_config);
146 void gus_voice_irq(void);
147 void gus_write8(int reg, unsigned int data);
148 void guswave_dma_irq(void);
149 void gus_delay(void);
150 int gus_default_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg);
151 void gus_timer_command (unsigned int addr, unsigned int val);
153 /* From gus_midi.c */
154 void gus_midi_init(struct address_info *hw_config);
155 void gus_midi_interrupt(int dummy);
157 /* From mpu401.c */
158 void attach_mpu401(struct address_info * hw_config);
159 int probe_mpu401(struct address_info *hw_config);
160 int intchk_mpu401(void *dev_id);
161 void mpuintr(int irq, void *dev_id, struct pt_regs * dummy);
163 /* From uart6850.c */
164 void attach_uart6850(struct address_info * hw_config);
165 int probe_uart6850(struct address_info *hw_config);
167 /* From opl3.c */
168 void enable_opl3_mode(int left, int right, int both);
170 /* From ics2101.c */
171 int ics2101_mixer_init(void);
173 /* From sound_timer.c */
174 void sound_timer_interrupt(void);
175 void sound_timer_syncinterval(unsigned int new_usecs);
177 /* From ad1848.c */
178 int ad1848_init (char *name, int io_base, int irq, int dma_playback, int dma_capture, int share_dma, int *osp);
179 void ad1848_unload (int io_base, int irq, int dma_playback, int dma_capture, int share_dma);
181 int ad1848_detect (int io_base, int *flags, int *osp);
182 #define AD_F_CS4231 0x0001 /* Returned if a CS4232 (or compatible) detected */
183 #define AD_F_CS4248 0x0001 /* Returned if a CS4248 (or compatible) detected */
185 int ad1848_control(int cmd, int arg);
186 #define AD1848_SET_XTAL 1
187 #define AD1848_MIXER_REROUTE 2
188 #define AD1848_REROUTE(oldctl, newctl) \
189 ad1848_control(AD1848_MIXER_REROUTE, ((oldctl)<<8)|(newctl))
191 void adintr(int irq, void *dev_id, struct pt_regs * dummy);
192 void attach_ms_sound(struct address_info * hw_config);
193 int probe_ms_sound(struct address_info *hw_config);
195 /* From pss.c */
196 int probe_pss (struct address_info *hw_config);
197 void attach_pss (struct address_info *hw_config);
198 int probe_pss_mpu (struct address_info *hw_config);
199 void attach_pss_mpu (struct address_info *hw_config);
200 int probe_pss_mss (struct address_info *hw_config);
201 void attach_pss_mss (struct address_info *hw_config);
203 /* From sscape.c */
204 int probe_sscape (struct address_info *hw_config);
205 void attach_sscape (struct address_info *hw_config);
206 int probe_ss_ms_sound (struct address_info *hw_config);
207 void attach_ss_ms_sound(struct address_info * hw_config);
209 /* From ad1816.c */
210 void unload_ad1816(struct address_info *hw_info);
211 int probe_ad1816 (struct address_info *hw_config);
212 void attach_ad1816 (struct address_info *hw_config);
214 /* From aedsp16.c */
215 int InitAEDSP16_SBPRO(struct address_info *hw_config);
216 int InitAEDSP16_MSS(struct address_info *hw_config);
217 int InitAEDSP16_MPU401(struct address_info *hw_config);
219 /* From midi_synth.c */
220 void do_midi_msg (int synthno, unsigned char *msg, int mlen);
222 /* From trix.c */
223 void attach_trix_wss (struct address_info *hw_config);
224 int probe_trix_wss (struct address_info *hw_config);
225 void attach_trix_sb (struct address_info *hw_config);
226 int probe_trix_sb (struct address_info *hw_config);
227 void attach_trix_mpu (struct address_info *hw_config);
228 int probe_trix_mpu (struct address_info *hw_config);
230 /* From mad16.c */
231 void attach_mad16 (struct address_info *hw_config);
232 int probe_mad16 (struct address_info *hw_config);
233 void attach_mad16_mpu (struct address_info *hw_config);
234 int probe_mad16_mpu (struct address_info *hw_config);
236 /* Unload routines from various source files*/
237 void unload_pss(struct address_info *hw_info);
238 void unload_pss_mpu(struct address_info *hw_info);
239 void unload_pss_mss(struct address_info *hw_info);
240 void unload_mad16(struct address_info *hw_info);
241 void unload_mad16_mpu(struct address_info *hw_info);
242 void unload_adlib(struct address_info *hw_info);
243 void unload_pas(struct address_info *hw_info);
244 void unload_mpu401(struct address_info *hw_info);
245 void unload_maui(struct address_info *hw_info);
246 void unload_uart6850(struct address_info *hw_info);
247 void unload_sb(struct address_info *hw_info);
248 void unload_sb16(struct address_info *hw_info);
249 void unload_sb16midi(struct address_info *hw_info);
250 void unload_gus_db16(struct address_info *hw_info);
251 void unload_ms_sound(struct address_info *hw_info);
252 void unload_gus(struct address_info *hw_info);
253 void unload_sscape(struct address_info *hw_info);
254 void unload_ss_ms_sound(struct address_info *hw_info);
255 void unload_trix_wss(struct address_info *hw_info);
256 void unload_trix_sb(struct address_info *hw_info);
257 void unload_trix_mpu(struct address_info *hw_info);
258 void unload_cs4232(struct address_info *hw_info);
259 void unload_cs4232_mpu(struct address_info *hw_info);
260 void unload_opl3sa_wss(struct address_info *hw_info);
261 void unload_opl3sa_sb(struct address_info *hw_info);
262 void unload_opl3sa_mpu(struct address_info *hw_info);
263 void unload_opl3sa2(struct address_info *hw_info);
264 void unload_opl3sa2_mpu(struct address_info *hw_info);
265 void unload_opl3sa2_mss(struct address_info *hw_info);
266 void unload_softsyn (struct address_info *hw_config);
268 /* From cs4232.c */
269 int probe_cs4232 (struct address_info *hw_config);
270 void attach_cs4232 (struct address_info *hw_config);
271 int probe_cs4232_mpu (struct address_info *hw_config);
272 void attach_cs4232_mpu (struct address_info *hw_config);
274 /* From opl3sa.c */
275 void attach_opl3sa_wss (struct address_info *hw_config);
276 int probe_opl3sa_wss (struct address_info *hw_config);
277 void attach_opl3sa_sb (struct address_info *hw_config);
278 int probe_opl3sa_sb (struct address_info *hw_config);
279 void attach_opl3sa_mpu (struct address_info *hw_config);
280 int probe_opl3sa_mpu (struct address_info *hw_config);
282 /* From opl3sa2.c */
283 int probe_opl3sa2 (struct address_info *hw_config);
284 void attach_opl3sa2 (struct address_info *hw_config);
285 int probe_opl3sa2_mpu (struct address_info *hw_config);
286 void attach_opl3sa2_mpu (struct address_info *hw_config);
287 int probe_opl3sa2_mss (struct address_info *hw_config);
288 void attach_opl3sa2_mss (struct address_info *hw_config);
290 /* From softoss.c */
291 void attach_softsyn_card (struct address_info *hw_config);
292 int probe_softsyn (struct address_info *hw_config);
294 /* From maui.c */
295 void attach_maui(struct address_info * hw_config);
296 int probe_maui(struct address_info *hw_config);
298 /* From v_midi.c */
299 void attach_v_midi (struct address_info *hw_config);
300 int probe_v_midi (struct address_info *hw_config);
301 void unload_v_midi (struct address_info *hw_config);
303 /* From vidc.c */
304 void attach_vidc(struct address_info *hw_config);
305 int probe_vidc(struct address_info *hw_config);
306 void unload_vidc(struct address_info *hw_config);
308 /* From waveartist.c */
309 void attach_waveartist(struct address_info *hw_config);
310 int probe_waveartist(struct address_info *hw_config);
311 void unload_waveartist(struct address_info *hw_config);
313 /* From wavefront.c */
314 void attach_wavefront (struct address_info *hw_config);
315 int probe_wavefront (struct address_info *hw_config);
316 void unload_wavefront (struct address_info *hw_config);
318 /* From wf_midi.c */
319 void attach_wf_mpu(struct address_info * hw_config);
320 int probe_wf_mpu(struct address_info *hw_config);
321 void unload_wf_mpu(struct address_info *hw_config);
322 int virtual_midi_enable (void);
323 int virtual_midi_disable (void);