^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef __SOUND_EMUX_SYNTH_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define __SOUND_EMUX_SYNTH_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Defines for the Emu-series WaveTable chip
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * Copyright (C) 2000 Takashi Iwai <tiwai@suse.de>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <sound/seq_kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <sound/seq_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <sound/soundfont.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <sound/seq_midi_emul.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <sound/seq_oss.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include <sound/emux_legacy.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include <sound/seq_virmidi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) * compile flags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define SNDRV_EMUX_USE_RAW_EFFECT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) struct snd_emux;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) struct snd_emux_port;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) struct snd_emux_voice;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) struct snd_emux_effect_table;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) * operators
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) struct snd_emux_operators {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) struct module *owner;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) struct snd_emux_voice *(*get_voice)(struct snd_emux *emu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) struct snd_emux_port *port);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) int (*prepare)(struct snd_emux_voice *vp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) void (*trigger)(struct snd_emux_voice *vp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) void (*release)(struct snd_emux_voice *vp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) void (*update)(struct snd_emux_voice *vp, int update);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) void (*terminate)(struct snd_emux_voice *vp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) void (*free_voice)(struct snd_emux_voice *vp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) void (*reset)(struct snd_emux *emu, int ch);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) /* the first parameters are struct snd_emux */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) int (*sample_new)(struct snd_emux *emu, struct snd_sf_sample *sp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) struct snd_util_memhdr *hdr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) const void __user *data, long count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) int (*sample_free)(struct snd_emux *emu, struct snd_sf_sample *sp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) struct snd_util_memhdr *hdr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) void (*sample_reset)(struct snd_emux *emu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) int (*load_fx)(struct snd_emux *emu, int type, int arg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) const void __user *data, long count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) void (*sysex)(struct snd_emux *emu, char *buf, int len, int parsed,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) struct snd_midi_channel_set *chset);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) #if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) int (*oss_ioctl)(struct snd_emux *emu, int cmd, int p1, int p2);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) * constant values
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) #define SNDRV_EMUX_MAX_PORTS 32 /* max # of sequencer ports */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) #define SNDRV_EMUX_MAX_VOICES 64 /* max # of voices */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) #define SNDRV_EMUX_MAX_MULTI_VOICES 16 /* max # of playable voices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) * simultineously
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) * flags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) #define SNDRV_EMUX_ACCEPT_ROM (1<<0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) * emuX wavetable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) struct snd_emux {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) struct snd_card *card; /* assigned card */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) /* following should be initialized before registration */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) int max_voices; /* Number of voices */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) int mem_size; /* memory size (in byte) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) int num_ports; /* number of ports to be created */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) int pitch_shift; /* pitch shift value (for Emu10k1) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) struct snd_emux_operators ops; /* operators */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) void *hw; /* hardware */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) unsigned long flags; /* other conditions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) int midi_ports; /* number of virtual midi devices */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) int midi_devidx; /* device offset of virtual midi */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) unsigned int linear_panning: 1; /* panning is linear (sbawe = 1, emu10k1 = 0) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) int hwdep_idx; /* hwdep device index */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) struct snd_hwdep *hwdep; /* hwdep device */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) /* private */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) int num_voices; /* current number of voices */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) struct snd_sf_list *sflist; /* root of SoundFont list */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) struct snd_emux_voice *voices; /* Voices (EMU 'channel') */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) int use_time; /* allocation counter */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) spinlock_t voice_lock; /* Lock for voice access */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) struct mutex register_mutex;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) int client; /* For the sequencer client */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) int ports[SNDRV_EMUX_MAX_PORTS]; /* The ports for this device */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) struct snd_emux_port *portptrs[SNDRV_EMUX_MAX_PORTS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) int used; /* use counter */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) char *name; /* name of the device (internal) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) struct snd_rawmidi **vmidi;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) struct timer_list tlist; /* for pending note-offs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) int timer_active;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) struct snd_util_memhdr *memhdr; /* memory chunk information */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) #ifdef CONFIG_SND_PROC_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) struct snd_info_entry *proc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) #if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) struct snd_seq_device *oss_synth;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) * sequencer port information
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) struct snd_emux_port {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) struct snd_midi_channel_set chset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) struct snd_emux *emu;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) char port_mode; /* operation mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) int volume_atten; /* emuX raw attenuation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) unsigned long drum_flags; /* drum bitmaps */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) int ctrls[EMUX_MD_END]; /* control parameters */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) #ifdef SNDRV_EMUX_USE_RAW_EFFECT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) struct snd_emux_effect_table *effect;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) #if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) struct snd_seq_oss_arg *oss_arg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) /* port_mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) #define SNDRV_EMUX_PORT_MODE_MIDI 0 /* normal MIDI port */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) #define SNDRV_EMUX_PORT_MODE_OSS_SYNTH 1 /* OSS synth port */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) #define SNDRV_EMUX_PORT_MODE_OSS_MIDI 2 /* OSS multi channel synth port */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) * A structure to keep track of each hardware voice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) struct snd_emux_voice {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) int ch; /* Hardware channel number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) int state; /* status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) #define SNDRV_EMUX_ST_OFF 0x00 /* Not playing, and inactive */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) #define SNDRV_EMUX_ST_ON 0x01 /* Note on */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) #define SNDRV_EMUX_ST_RELEASED (0x02|SNDRV_EMUX_ST_ON) /* Note released */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) #define SNDRV_EMUX_ST_SUSTAINED (0x04|SNDRV_EMUX_ST_ON) /* Note sustained */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) #define SNDRV_EMUX_ST_STANDBY (0x08|SNDRV_EMUX_ST_ON) /* Waiting to be triggered */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) #define SNDRV_EMUX_ST_PENDING (0x10|SNDRV_EMUX_ST_ON) /* Note will be released */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) #define SNDRV_EMUX_ST_LOCKED 0x100 /* Not accessible */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) unsigned int time; /* An allocation time */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) unsigned char note; /* Note currently assigned to this voice */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) unsigned char key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) unsigned char velocity; /* Velocity of current note */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) struct snd_sf_zone *zone; /* Zone assigned to this note */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) void *block; /* sample block pointer (optional) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) struct snd_midi_channel *chan; /* Midi channel for this note */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) struct snd_emux_port *port; /* associated port */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) struct snd_emux *emu; /* assigned root info */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) void *hw; /* hardware pointer (emu8000 or emu10k1) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) unsigned long ontime; /* jiffies at note triggered */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) /* Emu8k/Emu10k1 registers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) struct soundfont_voice_info reg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) /* additional registers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) int avol; /* volume attenuation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) int acutoff; /* cutoff target */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) int apitch; /* pitch offset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) int apan; /* pan/aux pair */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) int aaux;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) int ptarget; /* pitch target */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) int vtarget; /* volume target */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) int ftarget; /* filter target */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) * update flags (can be combined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) #define SNDRV_EMUX_UPDATE_VOLUME (1<<0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) #define SNDRV_EMUX_UPDATE_PITCH (1<<1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) #define SNDRV_EMUX_UPDATE_PAN (1<<2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) #define SNDRV_EMUX_UPDATE_FMMOD (1<<3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) #define SNDRV_EMUX_UPDATE_TREMFREQ (1<<4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) #define SNDRV_EMUX_UPDATE_FM2FRQ2 (1<<5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) #define SNDRV_EMUX_UPDATE_Q (1<<6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) #ifdef SNDRV_EMUX_USE_RAW_EFFECT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) * effect table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) struct snd_emux_effect_table {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) /* Emu8000 specific effects */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) short val[EMUX_NUM_EFFECTS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) unsigned char flag[EMUX_NUM_EFFECTS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) #endif /* SNDRV_EMUX_USE_RAW_EFFECT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) * prototypes - interface to Emu10k1 and Emu8k routines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) int snd_emux_new(struct snd_emux **remu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) int snd_emux_register(struct snd_emux *emu, struct snd_card *card, int index, char *name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) int snd_emux_free(struct snd_emux *emu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) * exported functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) void snd_emux_terminate_all(struct snd_emux *emu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) void snd_emux_lock_voice(struct snd_emux *emu, int voice);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) void snd_emux_unlock_voice(struct snd_emux *emu, int voice);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) #endif /* __SOUND_EMUX_SYNTH_H */