1#ifndef __EMUX_VOICE_H
2#define __EMUX_VOICE_H
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25#include <sound/driver.h>
26#include <linux/wait.h>
27#include <linux/sched.h>
28#include <sound/core.h>
29#include <sound/emux_synth.h>
30
31
32int snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index);
33void snd_emux_detach_seq(struct snd_emux *emu);
34struct snd_emux_port *snd_emux_create_port(struct snd_emux *emu, char *name,
35 int max_channels, int type,
36 struct snd_seq_port_callback *callback);
37void snd_emux_reset_port(struct snd_emux_port *port);
38int snd_emux_event_input(struct snd_seq_event *ev, int direct, void *private,
39 int atomic, int hop);
40int snd_emux_inc_count(struct snd_emux *emu);
41void snd_emux_dec_count(struct snd_emux *emu);
42int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card);
43int snd_emux_delete_virmidi(struct snd_emux *emu);
44
45
46void snd_emux_init_voices(struct snd_emux *emu);
47
48void snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
49void snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
50void snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan);
51void snd_emux_terminate_note(void *p, int note, struct snd_midi_channel *chan);
52void snd_emux_control(void *p, int type, struct snd_midi_channel *chan);
53
54void snd_emux_sounds_off_all(struct snd_emux_port *port);
55void snd_emux_update_channel(struct snd_emux_port *port,
56 struct snd_midi_channel *chan, int update);
57void snd_emux_update_port(struct snd_emux_port *port, int update);
58
59void snd_emux_timer_callback(unsigned long data);
60
61
62#ifdef SNDRV_EMUX_USE_RAW_EFFECT
63void snd_emux_create_effect(struct snd_emux_port *p);
64void snd_emux_delete_effect(struct snd_emux_port *p);
65void snd_emux_clear_effect(struct snd_emux_port *p);
66void snd_emux_setup_effect(struct snd_emux_voice *vp);
67void snd_emux_send_effect_oss(struct snd_emux_port *port,
68 struct snd_midi_channel *chan, int type, int val);
69void snd_emux_send_effect(struct snd_emux_port *port,
70 struct snd_midi_channel *chan, int type, int val, int mode);
71#endif
72
73
74void snd_emux_sysex(void *private_data, unsigned char *buf, int len,
75 int parsed, struct snd_midi_channel_set *chset);
76int snd_emux_xg_control(struct snd_emux_port *port,
77 struct snd_midi_channel *chan, int param);
78void snd_emux_nrpn(void *private_data, struct snd_midi_channel *chan,
79 struct snd_midi_channel_set *chset);
80
81
82void snd_emux_init_seq_oss(struct snd_emux *emu);
83void snd_emux_detach_seq_oss(struct snd_emux *emu);
84
85
86#ifdef CONFIG_PROC_FS
87void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device);
88void snd_emux_proc_free(struct snd_emux *emu);
89#endif
90
91#define STATE_IS_PLAYING(s) ((s) & SNDRV_EMUX_ST_ON)
92
93
94int snd_emux_init_hwdep(struct snd_emux *emu);
95void snd_emux_delete_hwdep(struct snd_emux *emu);
96
97#endif
98