1 /* $DragonFly: src/sys/dev/sound/isa/i386/Attic/sound_calls.h,v 1.2 2005/01/31 23:44:35 joerg Exp $ */
7 int DMAbuf_open(int dev, int mode);
8 int DMAbuf_release(int dev, int mode);
9 int DMAbuf_getwrbuffer(int dev, char **buf, int *size, int dontblock);
10 int DMAbuf_getrdbuffer(int dev, char **buf, int *len, int dontblock);
11 int DMAbuf_rmchars(int dev, int buff_no, int c);
12 int DMAbuf_start_output(int dev, int buff_no, int l);
13 int DMAbuf_ioctl(int dev, u_int cmd, ioctl_arg arg, int local);
14 void DMAbuf_init(void);
15 int DMAbuf_start_dma (int dev, u_long physaddr, int count, int dma_mode);
16 int DMAbuf_open_dma (int dev);
17 void DMAbuf_close_dma (int dev);
18 void DMAbuf_reset_dma (int dev);
19 void DMAbuf_inputintr(int dev);
20 void DMAbuf_outputintr(int dev, int underflow_flag);
21 void DMAbuf_start_devices(u_int devmask);
23 int DMAbuf_select(int dev, struct fileinfo *file, int sel_type, select_table * wait);
27 * System calls for /dev/dsp and /dev/audio
30 int audio_read (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
31 int audio_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
32 int audio_open (int dev, struct fileinfo *file);
33 void audio_release (int dev, struct fileinfo *file);
34 int audio_ioctl (int dev, struct fileinfo *file,
35 u_int cmd, ioctl_arg arg);
36 int audio_lseek (int dev, struct fileinfo *file, off_t offset, int orig);
37 /* long audio_init (void); */
40 int audio_poll(int dev, struct fileinfo *file, int events, select_table * wait);
44 * System calls for the /dev/sequencer
47 int sequencer_read (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
48 int sequencer_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
49 int sequencer_open (int dev, struct fileinfo *file);
50 void sequencer_release (int dev, struct fileinfo *file);
51 int sequencer_ioctl (int dev, struct fileinfo *file,
52 u_int cmd, ioctl_arg arg);
53 int sequencer_lseek (int dev, struct fileinfo *file, off_t offset, int orig);
54 void sequencer_init (void);
55 void sequencer_timer(void *dummy);
56 int note_to_freq(int note_num);
57 u_long compute_finetune(u_long base_freq, int bend, int range);
58 void seq_input_event(u_char *event, int len);
59 void seq_copy_to_input (u_char *event, int len);
63 * System calls for the /dev/midi
66 int MIDIbuf_read (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
67 int MIDIbuf_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
68 int MIDIbuf_open (int dev, struct fileinfo *file);
69 void MIDIbuf_release (int dev, struct fileinfo *file);
70 int MIDIbuf_ioctl (int dev, struct fileinfo *file,
71 u_int cmd, ioctl_arg arg);
72 int MIDIbuf_lseek (int dev, struct fileinfo *file, off_t offset, int orig);
73 void MIDIbuf_bytes_received(int dev, u_char *buf, int count);
77 * Misc calls from various sources
80 /* From soundcard.c */
81 void soundcard_init(void);
82 void tenmicrosec(int);
83 void request_sound_timer (int count);
84 void sound_stop_timer(void);
85 int snd_ioctl_return(int *addr, int value);
86 int snd_set_irq_handler (int int_lvl, void(*hndlr)(int), sound_os_info *osp);
87 void sound_dma_malloc(int dev);
88 void sound_dma_free(int dev);
89 void conf_printf(char *name, struct address_info *hw_config);
90 void conf_printf2(char *name, int base, int irq, int dma, int dma2);
92 /* From sound_switch.c */
93 int sound_read_sw (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
94 int sound_write_sw (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
95 int sound_open_sw (int dev, struct fileinfo *file);
96 void sound_release_sw (int dev, struct fileinfo *file);
97 int sound_ioctl_sw (int dev, struct fileinfo *file, u_int cmd, ioctl_arg arg);
100 int sb_dsp_detect (struct address_info *hw_config);
101 void sb_dsp_init (struct address_info *hw_config);
102 void sb_dsp_disable_midi(void);
103 int sb_dsp_command (u_char val);
105 int sb_reset_dsp (void);
107 /* From sb16_dsp.c */
108 void sb16_dsp_interrupt (int irq);
109 void sb16_dsp_init(struct address_info *hw_config);
110 int sb16_dsp_detect(struct address_info *hw_config);
112 /* From sb16_midi.c */
113 void sb16midiintr (int unit);
114 void attach_sb16midi(struct address_info * hw_config);
115 int probe_sb16midi(struct address_info *hw_config);
116 void sb_midi_interrupt(int dummy);
119 void sb_midi_init(int model);
121 /* From sb_mixer.c */
122 void sb_setmixer (u_int port, u_int value);
123 int sb_getmixer (u_int port);
124 void sb_mixer_set_stereo(int mode);
125 int sb_mixer_init(int major_model);
128 int opl3_detect (int ioaddr, sound_os_info *osp);
129 void opl3_init(int ioaddr, sound_os_info *osp);
132 void attach_sb_card(struct address_info *hw_config);
133 int probe_sb(struct address_info *hw_config);
135 /* From adlib_card.c */
136 void attach_adlib_card(struct address_info *hw_config);
137 int probe_adlib(struct address_info *hw_config);
139 /* From pas_card.c */
140 void attach_pas_card(struct address_info *hw_config);
141 int probe_pas(struct address_info *hw_config);
143 int pas_set_intr(int mask);
144 int pas_remove_intr(int mask);
145 u_char pas_read(int ioaddr);
146 void pas_write(u_char data, int ioaddr);
148 /* From pas_audio.c */
149 void pas_pcm_interrupt(u_char status, int cause);
150 void pas_pcm_init(struct address_info *hw_config);
152 /* From pas_mixer.c */
153 int pas_init_mixer(void);
155 /* From pas_midi.c */
156 void pas_midi_init(void);
157 void pas_midi_interrupt(void);
159 /* From gus_card.c */
160 void attach_gus_card(struct address_info * hw_config);
161 int probe_gus(struct address_info *hw_config);
162 int gus_set_midi_irq(int num);
164 void attach_gus_db16(struct address_info * hw_config);
165 int probe_gus_db16(struct address_info *hw_config);
167 /* From gus_wave.c */
168 int gus_wave_detect(int baseaddr);
169 void gus_wave_init(struct address_info *hw_config);
170 void gus_voice_irq(void);
171 u_char gus_read8 (int reg);
172 void gus_write8(int reg, u_int data);
173 void guswave_dma_irq(void);
174 void gus_delay(void);
175 int gus_default_mixer_ioctl (int dev, u_int cmd, ioctl_arg arg);
176 void gus_timer_command (u_int addr, u_int val);
178 /* From gus_midi.c */
179 void gus_midi_init(void);
180 void gus_midi_interrupt(int dummy);
183 void attach_mpu401(struct address_info * hw_config);
184 int probe_mpu401(struct address_info *hw_config);
187 /* From uart6850.c */
188 void attach_uart6850(struct address_info * hw_config);
189 ointhand2_t m6850intr;
190 int probe_uart6850(struct address_info *hw_config);
193 void enable_opl3_mode(int left, int right, int both);
196 int pmgr_open(int dev);
197 void pmgr_release(int dev);
198 int pmgr_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count);
199 int pmgr_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count);
200 int pmgr_access(int dev, struct patmgr_info *rec);
201 int pmgr_inform(int dev, int event, u_long parm1, u_long parm2,
202 u_long parm3, u_long parm4);
205 void ics2101_mixer_init(void);
207 /* From sound_timer.c */
208 void sound_timer_interrupt(void);
209 void sound_timer_syncinterval(u_int new_usecs);
212 void ad1848_init (char *name, int io_base, int irq, int dma_playback, int dma_capture, int share_dma, sound_os_info *osp);
215 int ad1848_detect (int io_base, int *flags, sound_os_info *osp);
216 #define AD_F_CS4231 0x0001 /* Returned if a CS4232 (or compatible) detected */
217 #define AD_F_CS4248 0x0001 /* Returned if a CS4248 (or compatible) detected */
219 void ad1848_interrupt (int irq);
220 void attach_mss(struct address_info * hw_config);
221 int probe_mss(struct address_info *hw_config);
222 void attach_pnp_ad1848(struct address_info * hw_config);
223 int probe_pnp_ad1848(struct address_info *hw_config);
226 int probe_pss (struct address_info *hw_config);
227 void attach_pss (struct address_info *hw_config);
228 int probe_pss_mpu (struct address_info *hw_config);
229 void attach_pss_mpu (struct address_info *hw_config);
230 int probe_pss_mss (struct address_info *hw_config);
231 void attach_pss_mss (struct address_info *hw_config);
234 int probe_sscape (struct address_info *hw_config);
235 void attach_sscape (struct address_info *hw_config);
236 int probe_ss_mss(struct address_info *hw_config);
237 void attach_ss_mss(struct address_info * hw_config);
238 ointhand2_t sscapeintr;
240 int pss_read (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
241 int pss_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count);
242 int pss_open (int dev, struct fileinfo *file);
243 void pss_release (int dev, struct fileinfo *file);
244 int pss_ioctl (int dev, struct fileinfo *file,
245 u_int cmd, ioctl_arg arg);
246 int pss_lseek (int dev, struct fileinfo *file, off_t offset, int orig);
250 int InitAEDSP16_SBPRO(struct address_info *hw_config);
251 int InitAEDSP16_MSS(struct address_info *hw_config);
252 int InitAEDSP16_MPU401(struct address_info *hw_config);
254 /* From midi_synth.c */
255 void do_midi_msg (int synthno, u_char *msg, int mlen);
258 void attach_trix_wss (struct address_info *hw_config);
259 int probe_trix_wss (struct address_info *hw_config);
260 void attach_trix_sb (struct address_info *hw_config);
261 int probe_trix_sb (struct address_info *hw_config);
262 void attach_trix_mpu (struct address_info *hw_config);
263 int probe_trix_mpu (struct address_info *hw_config);
266 void attach_mad16 (struct address_info *hw_config);
267 int probe_mad16 (struct address_info *hw_config);
268 void attach_mad16_mpu (struct address_info *hw_config);
269 int probe_mad16_mpu (struct address_info *hw_config);
270 int mad16_sb_dsp_detect (struct address_info *hw_config);
271 void mad16_sb_dsp_init (struct address_info *hw_config);
275 int probe_cs4232 (struct address_info *hw_config);
276 void attach_cs4232 (struct address_info *hw_config);
277 int probe_cs4232_mpu (struct address_info *hw_config);
278 void attach_cs4232_mpu (struct address_info *hw_config);
281 void attach_maui(struct address_info * hw_config);
282 int probe_maui(struct address_info *hw_config);
284 /* From sound_pnp.c */
285 void sound_pnp_init(void);
286 void sound_pnp_disconnect(void);
289 void attach_nss(struct address_info * hw_config);
290 int probe_nss(struct address_info *hw_config);