diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 08:24:47 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:18:14 -0500 |
commit | 03da312ac080b4f5c9359c233b8812cc93a035fe (patch) | |
tree | 1a6767ca18964b53442ecfd538141b12e81b23be /sound/synth/emux/emux_effect.c | |
parent | ee42381e71c56328db9e9d64d19a4de7a2f09a93 (diff) |
[ALSA] Remove xxx_t typedefs: Emu-X synth
Modules: Common EMU synth,SoundFont,Synth
Remove xxx_t typedefs from the Emu-X synth support.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/synth/emux/emux_effect.c')
-rw-r--r-- | sound/synth/emux/emux_effect.c | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/sound/synth/emux/emux_effect.c b/sound/synth/emux/emux_effect.c index 4764940f11a0..a447218b6160 100644 --- a/sound/synth/emux/emux_effect.c +++ b/sound/synth/emux/emux_effect.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | #define xoffsetof(type,tag) ((long)(&((type)NULL)->tag) - (long)(NULL)) | 33 | #define xoffsetof(type,tag) ((long)(&((type)NULL)->tag) - (long)(NULL)) |
34 | 34 | ||
35 | #define parm_offset(tag) xoffsetof(soundfont_voice_parm_t*, tag) | 35 | #define parm_offset(tag) xoffsetof(struct soundfont_voice_parm *, tag) |
36 | 36 | ||
37 | #define PARM_IS_BYTE (1 << 0) | 37 | #define PARM_IS_BYTE (1 << 0) |
38 | #define PARM_IS_WORD (1 << 1) | 38 | #define PARM_IS_WORD (1 << 1) |
@@ -97,10 +97,10 @@ static struct emux_parm_defs { | |||
97 | 97 | ||
98 | /* set byte effect value */ | 98 | /* set byte effect value */ |
99 | static void | 99 | static void |
100 | effect_set_byte(unsigned char *valp, snd_midi_channel_t *chan, int type) | 100 | effect_set_byte(unsigned char *valp, struct snd_midi_channel *chan, int type) |
101 | { | 101 | { |
102 | short effect; | 102 | short effect; |
103 | snd_emux_effect_table_t *fx = chan->private; | 103 | struct snd_emux_effect_table *fx = chan->private; |
104 | 104 | ||
105 | effect = fx->val[type]; | 105 | effect = fx->val[type]; |
106 | if (fx->flag[type] == EMUX_FX_FLAG_ADD) { | 106 | if (fx->flag[type] == EMUX_FX_FLAG_ADD) { |
@@ -118,10 +118,10 @@ effect_set_byte(unsigned char *valp, snd_midi_channel_t *chan, int type) | |||
118 | 118 | ||
119 | /* set word effect value */ | 119 | /* set word effect value */ |
120 | static void | 120 | static void |
121 | effect_set_word(unsigned short *valp, snd_midi_channel_t *chan, int type) | 121 | effect_set_word(unsigned short *valp, struct snd_midi_channel *chan, int type) |
122 | { | 122 | { |
123 | int effect; | 123 | int effect; |
124 | snd_emux_effect_table_t *fx = chan->private; | 124 | struct snd_emux_effect_table *fx = chan->private; |
125 | 125 | ||
126 | effect = *(unsigned short*)&fx->val[type]; | 126 | effect = *(unsigned short*)&fx->val[type]; |
127 | if (fx->flag[type] == EMUX_FX_FLAG_ADD) | 127 | if (fx->flag[type] == EMUX_FX_FLAG_ADD) |
@@ -135,10 +135,10 @@ effect_set_word(unsigned short *valp, snd_midi_channel_t *chan, int type) | |||
135 | 135 | ||
136 | /* address offset */ | 136 | /* address offset */ |
137 | static int | 137 | static int |
138 | effect_get_offset(snd_midi_channel_t *chan, int lo, int hi, int mode) | 138 | effect_get_offset(struct snd_midi_channel *chan, int lo, int hi, int mode) |
139 | { | 139 | { |
140 | int addr = 0; | 140 | int addr = 0; |
141 | snd_emux_effect_table_t *fx = chan->private; | 141 | struct snd_emux_effect_table *fx = chan->private; |
142 | 142 | ||
143 | if (fx->flag[hi]) | 143 | if (fx->flag[hi]) |
144 | addr = (short)fx->val[hi]; | 144 | addr = (short)fx->val[hi]; |
@@ -153,7 +153,8 @@ effect_get_offset(snd_midi_channel_t *chan, int lo, int hi, int mode) | |||
153 | #ifdef CONFIG_SND_SEQUENCER_OSS | 153 | #ifdef CONFIG_SND_SEQUENCER_OSS |
154 | /* change effects - for OSS sequencer compatibility */ | 154 | /* change effects - for OSS sequencer compatibility */ |
155 | void | 155 | void |
156 | snd_emux_send_effect_oss(snd_emux_port_t *port, snd_midi_channel_t *chan, int type, int val) | 156 | snd_emux_send_effect_oss(struct snd_emux_port *port, |
157 | struct snd_midi_channel *chan, int type, int val) | ||
157 | { | 158 | { |
158 | int mode; | 159 | int mode; |
159 | 160 | ||
@@ -173,13 +174,14 @@ snd_emux_send_effect_oss(snd_emux_port_t *port, snd_midi_channel_t *chan, int ty | |||
173 | * if update is necessary, call emu8000_control | 174 | * if update is necessary, call emu8000_control |
174 | */ | 175 | */ |
175 | void | 176 | void |
176 | snd_emux_send_effect(snd_emux_port_t *port, snd_midi_channel_t *chan, int type, int val, int mode) | 177 | snd_emux_send_effect(struct snd_emux_port *port, struct snd_midi_channel *chan, |
178 | int type, int val, int mode) | ||
177 | { | 179 | { |
178 | int i; | 180 | int i; |
179 | int offset; | 181 | int offset; |
180 | unsigned char *srcp, *origp; | 182 | unsigned char *srcp, *origp; |
181 | snd_emux_t *emu; | 183 | struct snd_emux *emu; |
182 | snd_emux_effect_table_t *fx; | 184 | struct snd_emux_effect_table *fx; |
183 | unsigned long flags; | 185 | unsigned long flags; |
184 | 186 | ||
185 | emu = port->emu; | 187 | emu = port->emu; |
@@ -206,7 +208,7 @@ snd_emux_send_effect(snd_emux_port_t *port, snd_midi_channel_t *chan, int type, | |||
206 | /* modify the register values */ | 208 | /* modify the register values */ |
207 | spin_lock_irqsave(&emu->voice_lock, flags); | 209 | spin_lock_irqsave(&emu->voice_lock, flags); |
208 | for (i = 0; i < emu->max_voices; i++) { | 210 | for (i = 0; i < emu->max_voices; i++) { |
209 | snd_emux_voice_t *vp = &emu->voices[i]; | 211 | struct snd_emux_voice *vp = &emu->voices[i]; |
210 | if (!STATE_IS_PLAYING(vp->state) || vp->chan != chan) | 212 | if (!STATE_IS_PLAYING(vp->state) || vp->chan != chan) |
211 | continue; | 213 | continue; |
212 | srcp = (unsigned char*)&vp->reg.parm + offset; | 214 | srcp = (unsigned char*)&vp->reg.parm + offset; |
@@ -228,10 +230,10 @@ snd_emux_send_effect(snd_emux_port_t *port, snd_midi_channel_t *chan, int type, | |||
228 | 230 | ||
229 | /* copy wavetable registers to voice table */ | 231 | /* copy wavetable registers to voice table */ |
230 | void | 232 | void |
231 | snd_emux_setup_effect(snd_emux_voice_t *vp) | 233 | snd_emux_setup_effect(struct snd_emux_voice *vp) |
232 | { | 234 | { |
233 | snd_midi_channel_t *chan = vp->chan; | 235 | struct snd_midi_channel *chan = vp->chan; |
234 | snd_emux_effect_table_t *fx; | 236 | struct snd_emux_effect_table *fx; |
235 | unsigned char *srcp; | 237 | unsigned char *srcp; |
236 | int i; | 238 | int i; |
237 | 239 | ||
@@ -275,10 +277,11 @@ snd_emux_setup_effect(snd_emux_voice_t *vp) | |||
275 | * effect table | 277 | * effect table |
276 | */ | 278 | */ |
277 | void | 279 | void |
278 | snd_emux_create_effect(snd_emux_port_t *p) | 280 | snd_emux_create_effect(struct snd_emux_port *p) |
279 | { | 281 | { |
280 | int i; | 282 | int i; |
281 | p->effect = kcalloc(p->chset.max_channels, sizeof(snd_emux_effect_table_t), GFP_KERNEL); | 283 | p->effect = kcalloc(p->chset.max_channels, |
284 | sizeof(struct snd_emux_effect_table), GFP_KERNEL); | ||
282 | if (p->effect) { | 285 | if (p->effect) { |
283 | for (i = 0; i < p->chset.max_channels; i++) | 286 | for (i = 0; i < p->chset.max_channels; i++) |
284 | p->chset.channels[i].private = p->effect + i; | 287 | p->chset.channels[i].private = p->effect + i; |
@@ -289,17 +292,18 @@ snd_emux_create_effect(snd_emux_port_t *p) | |||
289 | } | 292 | } |
290 | 293 | ||
291 | void | 294 | void |
292 | snd_emux_delete_effect(snd_emux_port_t *p) | 295 | snd_emux_delete_effect(struct snd_emux_port *p) |
293 | { | 296 | { |
294 | kfree(p->effect); | 297 | kfree(p->effect); |
295 | p->effect = NULL; | 298 | p->effect = NULL; |
296 | } | 299 | } |
297 | 300 | ||
298 | void | 301 | void |
299 | snd_emux_clear_effect(snd_emux_port_t *p) | 302 | snd_emux_clear_effect(struct snd_emux_port *p) |
300 | { | 303 | { |
301 | if (p->effect) { | 304 | if (p->effect) { |
302 | memset(p->effect, 0, sizeof(snd_emux_effect_table_t) * p->chset.max_channels); | 305 | memset(p->effect, 0, sizeof(struct snd_emux_effect_table) * |
306 | p->chset.max_channels); | ||
303 | } | 307 | } |
304 | } | 308 | } |
305 | 309 | ||