0001
0002 #ifndef __EMUX_VOICE_H
0003 #define __EMUX_VOICE_H
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <linux/wait.h>
0013 #include <linux/sched.h>
0014 #include <sound/core.h>
0015 #include <sound/emux_synth.h>
0016
0017
0018 int snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index);
0019 void snd_emux_detach_seq(struct snd_emux *emu);
0020 struct snd_emux_port *snd_emux_create_port(struct snd_emux *emu, char *name,
0021 int max_channels, int type,
0022 struct snd_seq_port_callback *callback);
0023 void snd_emux_reset_port(struct snd_emux_port *port);
0024 int snd_emux_event_input(struct snd_seq_event *ev, int direct, void *private,
0025 int atomic, int hop);
0026 int snd_emux_inc_count(struct snd_emux *emu);
0027 void snd_emux_dec_count(struct snd_emux *emu);
0028 int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card);
0029 int snd_emux_delete_virmidi(struct snd_emux *emu);
0030
0031
0032 void snd_emux_init_voices(struct snd_emux *emu);
0033
0034 void snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
0035 void snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
0036 void snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan);
0037 void snd_emux_terminate_note(void *p, int note, struct snd_midi_channel *chan);
0038 void snd_emux_control(void *p, int type, struct snd_midi_channel *chan);
0039
0040 void snd_emux_sounds_off_all(struct snd_emux_port *port);
0041 void snd_emux_update_channel(struct snd_emux_port *port,
0042 struct snd_midi_channel *chan, int update);
0043 void snd_emux_update_port(struct snd_emux_port *port, int update);
0044
0045 void snd_emux_timer_callback(struct timer_list *t);
0046
0047
0048 #ifdef SNDRV_EMUX_USE_RAW_EFFECT
0049 void snd_emux_create_effect(struct snd_emux_port *p);
0050 void snd_emux_delete_effect(struct snd_emux_port *p);
0051 void snd_emux_clear_effect(struct snd_emux_port *p);
0052 void snd_emux_setup_effect(struct snd_emux_voice *vp);
0053 void snd_emux_send_effect_oss(struct snd_emux_port *port,
0054 struct snd_midi_channel *chan, int type, int val);
0055 void snd_emux_send_effect(struct snd_emux_port *port,
0056 struct snd_midi_channel *chan, int type, int val, int mode);
0057 #endif
0058
0059
0060 void snd_emux_sysex(void *private_data, unsigned char *buf, int len,
0061 int parsed, struct snd_midi_channel_set *chset);
0062 int snd_emux_xg_control(struct snd_emux_port *port,
0063 struct snd_midi_channel *chan, int param);
0064 void snd_emux_nrpn(void *private_data, struct snd_midi_channel *chan,
0065 struct snd_midi_channel_set *chset);
0066
0067
0068 void snd_emux_init_seq_oss(struct snd_emux *emu);
0069 void snd_emux_detach_seq_oss(struct snd_emux *emu);
0070
0071
0072 #ifdef CONFIG_SND_PROC_FS
0073 void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device);
0074 void snd_emux_proc_free(struct snd_emux *emu);
0075 #else
0076 static inline void snd_emux_proc_init(struct snd_emux *emu,
0077 struct snd_card *card, int device) {}
0078 static inline void snd_emux_proc_free(struct snd_emux *emu) {}
0079 #endif
0080
0081 #define STATE_IS_PLAYING(s) ((s) & SNDRV_EMUX_ST_ON)
0082
0083
0084 int snd_emux_init_hwdep(struct snd_emux *emu);
0085 void snd_emux_delete_hwdep(struct snd_emux *emu);
0086
0087 #endif