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