Linux Audio

Check our new training course

Loading...
v6.13.7
 1/* SPDX-License-Identifier: GPL-2.0-or-later */
 2#ifndef __EMUX_VOICE_H
 3#define __EMUX_VOICE_H
 4
 5/*
 6 * A structure to keep track of each hardware voice
 7 *
 8 *  Copyright (C) 1999 Steve Ratcliffe
 9 *  Copyright (c) 1999-2000 Takashi Iwai <tiwai@suse.de>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10 */
11
12#include <linux/wait.h>
13#include <linux/sched.h>
14#include <sound/core.h>
15#include <sound/emux_synth.h>
16
17/* Prototypes for emux_seq.c */
18int snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index);
19void snd_emux_detach_seq(struct snd_emux *emu);
20struct snd_emux_port *snd_emux_create_port(struct snd_emux *emu, char *name,
21					   int max_channels, int type,
22					   struct snd_seq_port_callback *callback);
23void snd_emux_reset_port(struct snd_emux_port *port);
24int snd_emux_event_input(struct snd_seq_event *ev, int direct, void *private,
25			 int atomic, int hop);
26int snd_emux_inc_count(struct snd_emux *emu);
27void snd_emux_dec_count(struct snd_emux *emu);
28int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card);
29int snd_emux_delete_virmidi(struct snd_emux *emu);
30
31/* Prototypes for emux_synth.c */
32void snd_emux_init_voices(struct snd_emux *emu);
33
34void snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
35void snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
36void snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan);
37void snd_emux_terminate_note(void *p, int note, struct snd_midi_channel *chan);
38void snd_emux_control(void *p, int type, struct snd_midi_channel *chan);
39
40void snd_emux_sounds_off_all(struct snd_emux_port *port);
41void snd_emux_update_channel(struct snd_emux_port *port,
42			     struct snd_midi_channel *chan, int update);
43void snd_emux_update_port(struct snd_emux_port *port, int update);
44
45void snd_emux_timer_callback(struct timer_list *t);
46
47/* emux_effect.c */
48#ifdef SNDRV_EMUX_USE_RAW_EFFECT
49void snd_emux_create_effect(struct snd_emux_port *p);
50void snd_emux_delete_effect(struct snd_emux_port *p);
51void snd_emux_clear_effect(struct snd_emux_port *p);
52void snd_emux_setup_effect(struct snd_emux_voice *vp);
53void snd_emux_send_effect_oss(struct snd_emux_port *port,
54			      struct snd_midi_channel *chan, int type, int val);
55void snd_emux_send_effect(struct snd_emux_port *port,
56			  struct snd_midi_channel *chan, int type, int val, int mode);
57#endif
58
59/* emux_nrpn.c */
60void snd_emux_sysex(void *private_data, unsigned char *buf, int len,
61		    int parsed, struct snd_midi_channel_set *chset);
62int snd_emux_xg_control(struct snd_emux_port *port,
63			struct snd_midi_channel *chan, int param);
64void snd_emux_nrpn(void *private_data, struct snd_midi_channel *chan,
65		   struct snd_midi_channel_set *chset);
66
67/* emux_oss.c */
68void snd_emux_init_seq_oss(struct snd_emux *emu);
69void snd_emux_detach_seq_oss(struct snd_emux *emu);
70
71/* emux_proc.c */
72#ifdef CONFIG_SND_PROC_FS
73void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device);
74void snd_emux_proc_free(struct snd_emux *emu);
75#else
76static inline void snd_emux_proc_init(struct snd_emux *emu,
77				      struct snd_card *card, int device) {}
78static inline void snd_emux_proc_free(struct snd_emux *emu) {}
79#endif
80
81#define STATE_IS_PLAYING(s) ((s) & SNDRV_EMUX_ST_ON)
82
83/* emux_hwdep.c */
84int snd_emux_init_hwdep(struct snd_emux *emu);
85void snd_emux_delete_hwdep(struct snd_emux *emu);
86
87#endif
v3.5.6
 
 1#ifndef __EMUX_VOICE_H
 2#define __EMUX_VOICE_H
 3
 4/*
 5 * A structure to keep track of each hardware voice
 6 *
 7 *  Copyright (C) 1999 Steve Ratcliffe
 8 *  Copyright (c) 1999-2000 Takashi Iwai <tiwai@suse.de>
 9 *
10 *   This program is free software; you can redistribute it and/or modify
11 *   it under the terms of the GNU General Public License as published by
12 *   the Free Software Foundation; either version 2 of the License, or
13 *   (at your option) any later version.
14 *
15 *   This program is distributed in the hope that it will be useful,
16 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
17 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 *   GNU General Public License for more details.
19 *
20 *   You should have received a copy of the GNU General Public License
21 *   along with this program; if not, write to the Free Software
22 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
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/* Prototypes for emux_seq.c */
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/* Prototypes for emux_synth.c */
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/* emux_effect.c */
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/* emux_nrpn.c */
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/* emux_oss.c */
81void snd_emux_init_seq_oss(struct snd_emux *emu);
82void snd_emux_detach_seq_oss(struct snd_emux *emu);
83
84/* emux_proc.c */
85#ifdef CONFIG_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#endif
89
90#define STATE_IS_PLAYING(s) ((s) & SNDRV_EMUX_ST_ON)
91
92/* emux_hwdep.c */
93int snd_emux_init_hwdep(struct snd_emux *emu);
94void snd_emux_delete_hwdep(struct snd_emux *emu);
95
96#endif