aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/sb/emu8000_callback.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:34:36 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:25 -0500
commit029d64b0cfa30abc10f722e2f67d282abe09c9da (patch)
treed9a1e72e9792b33e57db2695f6c1a1a4843df0bf /sound/isa/sb/emu8000_callback.c
parentd3a7e476740dc23588ea65fa0df1aacdf8e70003 (diff)
[ALSA] Remove xxx_t typedefs: ISA SB8/SB16/SBAWE
Remove xxx_t typedefs from the ISA SB8/SB16/SBAWE drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/sb/emu8000_callback.c')
-rw-r--r--sound/isa/sb/emu8000_callback.c107
1 files changed, 55 insertions, 52 deletions
diff --git a/sound/isa/sb/emu8000_callback.c b/sound/isa/sb/emu8000_callback.c
index 1cc4101a17a4..9a3c71cc2e07 100644
--- a/sound/isa/sb/emu8000_callback.c
+++ b/sound/isa/sb/emu8000_callback.c
@@ -25,27 +25,30 @@
25/* 25/*
26 * prototypes 26 * prototypes
27 */ 27 */
28static snd_emux_voice_t *get_voice(snd_emux_t *emu, snd_emux_port_t *port); 28static struct snd_emux_voice *get_voice(struct snd_emux *emu,
29static int start_voice(snd_emux_voice_t *vp); 29 struct snd_emux_port *port);
30static void trigger_voice(snd_emux_voice_t *vp); 30static int start_voice(struct snd_emux_voice *vp);
31static void release_voice(snd_emux_voice_t *vp); 31static void trigger_voice(struct snd_emux_voice *vp);
32static void update_voice(snd_emux_voice_t *vp, int update); 32static void release_voice(struct snd_emux_voice *vp);
33static void reset_voice(snd_emux_t *emu, int ch); 33static void update_voice(struct snd_emux_voice *vp, int update);
34static void terminate_voice(snd_emux_voice_t *vp); 34static void reset_voice(struct snd_emux *emu, int ch);
35static void sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset); 35static void terminate_voice(struct snd_emux_voice *vp);
36static void sysex(struct snd_emux *emu, char *buf, int len, int parsed,
37 struct snd_midi_channel_set *chset);
36#ifdef CONFIG_SND_SEQUENCER_OSS 38#ifdef CONFIG_SND_SEQUENCER_OSS
37static int oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2); 39static int oss_ioctl(struct snd_emux *emu, int cmd, int p1, int p2);
38#endif 40#endif
39static int load_fx(snd_emux_t *emu, int type, int mode, const void __user *buf, long len); 41static int load_fx(struct snd_emux *emu, int type, int mode,
40 42 const void __user *buf, long len);
41static void set_pitch(emu8000_t *hw, snd_emux_voice_t *vp); 43
42static void set_volume(emu8000_t *hw, snd_emux_voice_t *vp); 44static void set_pitch(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
43static void set_pan(emu8000_t *hw, snd_emux_voice_t *vp); 45static void set_volume(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
44static void set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp); 46static void set_pan(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
45static void set_tremfreq(emu8000_t *hw, snd_emux_voice_t *vp); 47static void set_fmmod(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
46static void set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp); 48static void set_tremfreq(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
47static void set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp); 49static void set_fm2frq2(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
48static void snd_emu8000_tweak_voice(emu8000_t *emu, int ch); 50static void set_filterQ(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
51static void snd_emu8000_tweak_voice(struct snd_emu8000 *emu, int ch);
49 52
50/* 53/*
51 * Ensure a value is between two points 54 * Ensure a value is between two points
@@ -58,7 +61,7 @@ static void snd_emu8000_tweak_voice(emu8000_t *emu, int ch);
58/* 61/*
59 * set up operators 62 * set up operators
60 */ 63 */
61static snd_emux_operators_t emu8000_ops = { 64static struct snd_emux_operators emu8000_ops = {
62 .owner = THIS_MODULE, 65 .owner = THIS_MODULE,
63 .get_voice = get_voice, 66 .get_voice = get_voice,
64 .prepare = start_voice, 67 .prepare = start_voice,
@@ -78,7 +81,7 @@ static snd_emux_operators_t emu8000_ops = {
78}; 81};
79 82
80void 83void
81snd_emu8000_ops_setup(emu8000_t *hw) 84snd_emu8000_ops_setup(struct snd_emu8000 *hw)
82{ 85{
83 hw->emu->ops = emu8000_ops; 86 hw->emu->ops = emu8000_ops;
84} 87}
@@ -89,10 +92,10 @@ snd_emu8000_ops_setup(emu8000_t *hw)
89 * Terminate a voice 92 * Terminate a voice
90 */ 93 */
91static void 94static void
92release_voice(snd_emux_voice_t *vp) 95release_voice(struct snd_emux_voice *vp)
93{ 96{
94 int dcysusv; 97 int dcysusv;
95 emu8000_t *hw; 98 struct snd_emu8000 *hw;
96 99
97 hw = vp->hw; 100 hw = vp->hw;
98 dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease; 101 dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease;
@@ -105,9 +108,9 @@ release_voice(snd_emux_voice_t *vp)
105/* 108/*
106 */ 109 */
107static void 110static void
108terminate_voice(snd_emux_voice_t *vp) 111terminate_voice(struct snd_emux_voice *vp)
109{ 112{
110 emu8000_t *hw; 113 struct snd_emu8000 *hw;
111 114
112 hw = vp->hw; 115 hw = vp->hw;
113 EMU8000_DCYSUSV_WRITE(hw, vp->ch, 0x807F); 116 EMU8000_DCYSUSV_WRITE(hw, vp->ch, 0x807F);
@@ -117,9 +120,9 @@ terminate_voice(snd_emux_voice_t *vp)
117/* 120/*
118 */ 121 */
119static void 122static void
120update_voice(snd_emux_voice_t *vp, int update) 123update_voice(struct snd_emux_voice *vp, int update)
121{ 124{
122 emu8000_t *hw; 125 struct snd_emu8000 *hw;
123 126
124 hw = vp->hw; 127 hw = vp->hw;
125 if (update & SNDRV_EMUX_UPDATE_VOLUME) 128 if (update & SNDRV_EMUX_UPDATE_VOLUME)
@@ -149,12 +152,12 @@ update_voice(snd_emux_voice_t *vp, int update)
149 * The channel index (vp->ch) must be initialized in this routine. 152 * The channel index (vp->ch) must be initialized in this routine.
150 * In Emu8k, it is identical with the array index. 153 * In Emu8k, it is identical with the array index.
151 */ 154 */
152static snd_emux_voice_t * 155static struct snd_emux_voice *
153get_voice(snd_emux_t *emu, snd_emux_port_t *port) 156get_voice(struct snd_emux *emu, struct snd_emux_port *port)
154{ 157{
155 int i; 158 int i;
156 snd_emux_voice_t *vp; 159 struct snd_emux_voice *vp;
157 emu8000_t *hw; 160 struct snd_emu8000 *hw;
158 161
159 /* what we are looking for, in order of preference */ 162 /* what we are looking for, in order of preference */
160 enum { 163 enum {
@@ -227,13 +230,13 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port)
227/* 230/*
228 */ 231 */
229static int 232static int
230start_voice(snd_emux_voice_t *vp) 233start_voice(struct snd_emux_voice *vp)
231{ 234{
232 unsigned int temp; 235 unsigned int temp;
233 int ch; 236 int ch;
234 int addr; 237 int addr;
235 snd_midi_channel_t *chan; 238 struct snd_midi_channel *chan;
236 emu8000_t *hw; 239 struct snd_emu8000 *hw;
237 240
238 hw = vp->hw; 241 hw = vp->hw;
239 ch = vp->ch; 242 ch = vp->ch;
@@ -307,11 +310,11 @@ start_voice(snd_emux_voice_t *vp)
307 * Start envelope 310 * Start envelope
308 */ 311 */
309static void 312static void
310trigger_voice(snd_emux_voice_t *vp) 313trigger_voice(struct snd_emux_voice *vp)
311{ 314{
312 int ch = vp->ch; 315 int ch = vp->ch;
313 unsigned int temp; 316 unsigned int temp;
314 emu8000_t *hw; 317 struct snd_emu8000 *hw;
315 318
316 hw = vp->hw; 319 hw = vp->hw;
317 320
@@ -329,9 +332,9 @@ trigger_voice(snd_emux_voice_t *vp)
329 * reset voice parameters 332 * reset voice parameters
330 */ 333 */
331static void 334static void
332reset_voice(snd_emux_t *emu, int ch) 335reset_voice(struct snd_emux *emu, int ch)
333{ 336{
334 emu8000_t *hw; 337 struct snd_emu8000 *hw;
335 338
336 hw = emu->hw; 339 hw = emu->hw;
337 EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F); 340 EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F);
@@ -342,7 +345,7 @@ reset_voice(snd_emux_t *emu, int ch)
342 * Set the pitch of a possibly playing note. 345 * Set the pitch of a possibly playing note.
343 */ 346 */
344static void 347static void
345set_pitch(emu8000_t *hw, snd_emux_voice_t *vp) 348set_pitch(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
346{ 349{
347 EMU8000_IP_WRITE(hw, vp->ch, vp->apitch); 350 EMU8000_IP_WRITE(hw, vp->ch, vp->apitch);
348} 351}
@@ -351,7 +354,7 @@ set_pitch(emu8000_t *hw, snd_emux_voice_t *vp)
351 * Set the volume of a possibly already playing note 354 * Set the volume of a possibly already playing note
352 */ 355 */
353static void 356static void
354set_volume(emu8000_t *hw, snd_emux_voice_t *vp) 357set_volume(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
355{ 358{
356 int ifatn; 359 int ifatn;
357 360
@@ -365,7 +368,7 @@ set_volume(emu8000_t *hw, snd_emux_voice_t *vp)
365 * Set pan and loop start address. 368 * Set pan and loop start address.
366 */ 369 */
367static void 370static void
368set_pan(emu8000_t *hw, snd_emux_voice_t *vp) 371set_pan(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
369{ 372{
370 unsigned int temp; 373 unsigned int temp;
371 374
@@ -376,7 +379,7 @@ set_pan(emu8000_t *hw, snd_emux_voice_t *vp)
376#define MOD_SENSE 18 379#define MOD_SENSE 18
377 380
378static void 381static void
379set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp) 382set_fmmod(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
380{ 383{
381 unsigned short fmmod; 384 unsigned short fmmod;
382 short pitch; 385 short pitch;
@@ -394,14 +397,14 @@ set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp)
394 397
395/* set tremolo (lfo1) volume & frequency */ 398/* set tremolo (lfo1) volume & frequency */
396static void 399static void
397set_tremfreq(emu8000_t *hw, snd_emux_voice_t *vp) 400set_tremfreq(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
398{ 401{
399 EMU8000_TREMFRQ_WRITE(hw, vp->ch, vp->reg.parm.tremfrq); 402 EMU8000_TREMFRQ_WRITE(hw, vp->ch, vp->reg.parm.tremfrq);
400} 403}
401 404
402/* set lfo2 pitch & frequency */ 405/* set lfo2 pitch & frequency */
403static void 406static void
404set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp) 407set_fm2frq2(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
405{ 408{
406 unsigned short fm2frq2; 409 unsigned short fm2frq2;
407 short pitch; 410 short pitch;
@@ -419,7 +422,7 @@ set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp)
419 422
420/* set filterQ */ 423/* set filterQ */
421static void 424static void
422set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp) 425set_filterQ(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
423{ 426{
424 unsigned int addr; 427 unsigned int addr;
425 addr = EMU8000_CCCA_READ(hw, vp->ch) & 0xffffff; 428 addr = EMU8000_CCCA_READ(hw, vp->ch) & 0xffffff;
@@ -431,7 +434,7 @@ set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp)
431 * set the envelope & LFO parameters to the default values 434 * set the envelope & LFO parameters to the default values
432 */ 435 */
433static void 436static void
434snd_emu8000_tweak_voice(emu8000_t *emu, int i) 437snd_emu8000_tweak_voice(struct snd_emu8000 *emu, int i)
435{ 438{
436 /* set all mod/vol envelope shape to minimum */ 439 /* set all mod/vol envelope shape to minimum */
437 EMU8000_ENVVOL_WRITE(emu, i, 0x8000); 440 EMU8000_ENVVOL_WRITE(emu, i, 0x8000);
@@ -453,9 +456,9 @@ snd_emu8000_tweak_voice(emu8000_t *emu, int i)
453 * sysex callback 456 * sysex callback
454 */ 457 */
455static void 458static void
456sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset) 459sysex(struct snd_emux *emu, char *buf, int len, int parsed, struct snd_midi_channel_set *chset)
457{ 460{
458 emu8000_t *hw; 461 struct snd_emu8000 *hw;
459 462
460 hw = emu->hw; 463 hw = emu->hw;
461 464
@@ -478,9 +481,9 @@ sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *c
478 * OSS ioctl callback 481 * OSS ioctl callback
479 */ 482 */
480static int 483static int
481oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2) 484oss_ioctl(struct snd_emux *emu, int cmd, int p1, int p2)
482{ 485{
483 emu8000_t *hw; 486 struct snd_emu8000 *hw;
484 487
485 hw = emu->hw; 488 hw = emu->hw;
486 489
@@ -523,9 +526,9 @@ oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2)
523 */ 526 */
524 527
525static int 528static int
526load_fx(snd_emux_t *emu, int type, int mode, const void __user *buf, long len) 529load_fx(struct snd_emux *emu, int type, int mode, const void __user *buf, long len)
527{ 530{
528 emu8000_t *hw; 531 struct snd_emu8000 *hw;
529 hw = emu->hw; 532 hw = emu->hw;
530 533
531 /* skip header */ 534 /* skip header */