diff options
Diffstat (limited to 'sound/isa/gus/gus_main.c')
-rw-r--r-- | sound/isa/gus/gus_main.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c index 4f57ff4ab351..6d15b3d18a87 100644 --- a/sound/isa/gus/gus_main.c +++ b/sound/isa/gus/gus_main.c | |||
@@ -35,21 +35,21 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); | |||
35 | MODULE_DESCRIPTION("Routines for Gravis UltraSound soundcards"); | 35 | MODULE_DESCRIPTION("Routines for Gravis UltraSound soundcards"); |
36 | MODULE_LICENSE("GPL"); | 36 | MODULE_LICENSE("GPL"); |
37 | 37 | ||
38 | static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches); | 38 | static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches); |
39 | 39 | ||
40 | int snd_gus_use_inc(snd_gus_card_t * gus) | 40 | int snd_gus_use_inc(struct snd_gus_card * gus) |
41 | { | 41 | { |
42 | if (!try_module_get(gus->card->module)) | 42 | if (!try_module_get(gus->card->module)) |
43 | return 0; | 43 | return 0; |
44 | return 1; | 44 | return 1; |
45 | } | 45 | } |
46 | 46 | ||
47 | void snd_gus_use_dec(snd_gus_card_t * gus) | 47 | void snd_gus_use_dec(struct snd_gus_card * gus) |
48 | { | 48 | { |
49 | module_put(gus->card->module); | 49 | module_put(gus->card->module); |
50 | } | 50 | } |
51 | 51 | ||
52 | static int snd_gus_joystick_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 52 | static int snd_gus_joystick_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
53 | { | 53 | { |
54 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 54 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
55 | uinfo->count = 1; | 55 | uinfo->count = 1; |
@@ -58,17 +58,17 @@ static int snd_gus_joystick_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * | |||
58 | return 0; | 58 | return 0; |
59 | } | 59 | } |
60 | 60 | ||
61 | static int snd_gus_joystick_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 61 | static int snd_gus_joystick_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
62 | { | 62 | { |
63 | snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol); | 63 | struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); |
64 | 64 | ||
65 | ucontrol->value.integer.value[0] = gus->joystick_dac & 31; | 65 | ucontrol->value.integer.value[0] = gus->joystick_dac & 31; |
66 | return 0; | 66 | return 0; |
67 | } | 67 | } |
68 | 68 | ||
69 | static int snd_gus_joystick_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 69 | static int snd_gus_joystick_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
70 | { | 70 | { |
71 | snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol); | 71 | struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); |
72 | unsigned long flags; | 72 | unsigned long flags; |
73 | int change; | 73 | int change; |
74 | unsigned char nval; | 74 | unsigned char nval; |
@@ -82,7 +82,7 @@ static int snd_gus_joystick_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t | |||
82 | return change; | 82 | return change; |
83 | } | 83 | } |
84 | 84 | ||
85 | static snd_kcontrol_new_t snd_gus_joystick_control = { | 85 | static struct snd_kcontrol_new snd_gus_joystick_control = { |
86 | .iface = SNDRV_CTL_ELEM_IFACE_CARD, | 86 | .iface = SNDRV_CTL_ELEM_IFACE_CARD, |
87 | .name = "Joystick Speed", | 87 | .name = "Joystick Speed", |
88 | .info = snd_gus_joystick_info, | 88 | .info = snd_gus_joystick_info, |
@@ -90,7 +90,7 @@ static snd_kcontrol_new_t snd_gus_joystick_control = { | |||
90 | .put = snd_gus_joystick_put | 90 | .put = snd_gus_joystick_put |
91 | }; | 91 | }; |
92 | 92 | ||
93 | static void snd_gus_init_control(snd_gus_card_t *gus) | 93 | static void snd_gus_init_control(struct snd_gus_card *gus) |
94 | { | 94 | { |
95 | if (!gus->ace_flag) | 95 | if (!gus->ace_flag) |
96 | snd_ctl_add(gus->card, snd_ctl_new1(&snd_gus_joystick_control, gus)); | 96 | snd_ctl_add(gus->card, snd_ctl_new1(&snd_gus_joystick_control, gus)); |
@@ -100,7 +100,7 @@ static void snd_gus_init_control(snd_gus_card_t *gus) | |||
100 | * | 100 | * |
101 | */ | 101 | */ |
102 | 102 | ||
103 | static int snd_gus_free(snd_gus_card_t *gus) | 103 | static int snd_gus_free(struct snd_gus_card *gus) |
104 | { | 104 | { |
105 | if (gus->gf1.res_port2 == NULL) | 105 | if (gus->gf1.res_port2 == NULL) |
106 | goto __hw_end; | 106 | goto __hw_end; |
@@ -129,24 +129,24 @@ static int snd_gus_free(snd_gus_card_t *gus) | |||
129 | return 0; | 129 | return 0; |
130 | } | 130 | } |
131 | 131 | ||
132 | static int snd_gus_dev_free(snd_device_t *device) | 132 | static int snd_gus_dev_free(struct snd_device *device) |
133 | { | 133 | { |
134 | snd_gus_card_t *gus = device->device_data; | 134 | struct snd_gus_card *gus = device->device_data; |
135 | return snd_gus_free(gus); | 135 | return snd_gus_free(gus); |
136 | } | 136 | } |
137 | 137 | ||
138 | int snd_gus_create(snd_card_t * card, | 138 | int snd_gus_create(struct snd_card *card, |
139 | unsigned long port, | 139 | unsigned long port, |
140 | int irq, int dma1, int dma2, | 140 | int irq, int dma1, int dma2, |
141 | int timer_dev, | 141 | int timer_dev, |
142 | int voices, | 142 | int voices, |
143 | int pcm_channels, | 143 | int pcm_channels, |
144 | int effect, | 144 | int effect, |
145 | snd_gus_card_t **rgus) | 145 | struct snd_gus_card **rgus) |
146 | { | 146 | { |
147 | snd_gus_card_t *gus; | 147 | struct snd_gus_card *gus; |
148 | int err; | 148 | int err; |
149 | static snd_device_ops_t ops = { | 149 | static struct snd_device_ops ops = { |
150 | .dev_free = snd_gus_dev_free, | 150 | .dev_free = snd_gus_dev_free, |
151 | }; | 151 | }; |
152 | 152 | ||
@@ -238,7 +238,7 @@ int snd_gus_create(snd_card_t * card, | |||
238 | * Memory detection routine for plain GF1 soundcards | 238 | * Memory detection routine for plain GF1 soundcards |
239 | */ | 239 | */ |
240 | 240 | ||
241 | static int snd_gus_detect_memory(snd_gus_card_t * gus) | 241 | static int snd_gus_detect_memory(struct snd_gus_card * gus) |
242 | { | 242 | { |
243 | int l, idx, local; | 243 | int l, idx, local; |
244 | unsigned char d; | 244 | unsigned char d; |
@@ -273,9 +273,9 @@ static int snd_gus_detect_memory(snd_gus_card_t * gus) | |||
273 | return 0; /* some memory were detected */ | 273 | return 0; /* some memory were detected */ |
274 | } | 274 | } |
275 | 275 | ||
276 | static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches) | 276 | static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches) |
277 | { | 277 | { |
278 | snd_card_t *card; | 278 | struct snd_card *card; |
279 | unsigned long flags; | 279 | unsigned long flags; |
280 | int irq, dma1, dma2; | 280 | int irq, dma1, dma2; |
281 | static unsigned char irqs[16] = | 281 | static unsigned char irqs[16] = |
@@ -360,11 +360,11 @@ static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches) | |||
360 | return 0; | 360 | return 0; |
361 | } | 361 | } |
362 | 362 | ||
363 | static int snd_gus_check_version(snd_gus_card_t * gus) | 363 | static int snd_gus_check_version(struct snd_gus_card * gus) |
364 | { | 364 | { |
365 | unsigned long flags; | 365 | unsigned long flags; |
366 | unsigned char val, rev; | 366 | unsigned char val, rev; |
367 | snd_card_t *card; | 367 | struct snd_card *card; |
368 | 368 | ||
369 | card = gus->card; | 369 | card = gus->card; |
370 | spin_lock_irqsave(&gus->reg_lock, flags); | 370 | spin_lock_irqsave(&gus->reg_lock, flags); |
@@ -409,14 +409,14 @@ static int snd_gus_check_version(snd_gus_card_t * gus) | |||
409 | } | 409 | } |
410 | 410 | ||
411 | #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) | 411 | #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) |
412 | static void snd_gus_seq_dev_free(snd_seq_device_t *seq_dev) | 412 | static void snd_gus_seq_dev_free(struct snd_seq_device *seq_dev) |
413 | { | 413 | { |
414 | snd_gus_card_t *gus = seq_dev->private_data; | 414 | struct snd_gus_card *gus = seq_dev->private_data; |
415 | gus->seq_dev = NULL; | 415 | gus->seq_dev = NULL; |
416 | } | 416 | } |
417 | #endif | 417 | #endif |
418 | 418 | ||
419 | int snd_gus_initialize(snd_gus_card_t *gus) | 419 | int snd_gus_initialize(struct snd_gus_card *gus) |
420 | { | 420 | { |
421 | int err; | 421 | int err; |
422 | 422 | ||
@@ -432,9 +432,9 @@ int snd_gus_initialize(snd_gus_card_t *gus) | |||
432 | return err; | 432 | return err; |
433 | #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) | 433 | #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) |
434 | if (snd_seq_device_new(gus->card, 1, SNDRV_SEQ_DEV_ID_GUS, | 434 | if (snd_seq_device_new(gus->card, 1, SNDRV_SEQ_DEV_ID_GUS, |
435 | sizeof(snd_gus_card_t*), &gus->seq_dev) >= 0) { | 435 | sizeof(struct snd_gus_card *), &gus->seq_dev) >= 0) { |
436 | strcpy(gus->seq_dev->name, "GUS"); | 436 | strcpy(gus->seq_dev->name, "GUS"); |
437 | *(snd_gus_card_t**)SNDRV_SEQ_DEVICE_ARGPTR(gus->seq_dev) = gus; | 437 | *(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(gus->seq_dev) = gus; |
438 | gus->seq_dev->private_data = gus; | 438 | gus->seq_dev->private_data = gus; |
439 | gus->seq_dev->private_free = snd_gus_seq_dev_free; | 439 | gus->seq_dev->private_free = snd_gus_seq_dev_free; |
440 | } | 440 | } |