Commit 5e2da206 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] Remove xxx_t typedefs: ISA GUS

Remove xxx_t typedefs from the ISA GUS drivers.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 029d64b0
This diff is collapsed.
......@@ -25,7 +25,7 @@
#include <sound/core.h>
#include <sound/gus.h>
static void snd_gf1_dma_ack(snd_gus_card_t * gus)
static void snd_gf1_dma_ack(struct snd_gus_card * gus)
{
unsigned long flags;
......@@ -35,7 +35,7 @@ static void snd_gf1_dma_ack(snd_gus_card_t * gus)
spin_unlock_irqrestore(&gus->reg_lock, flags);
}
static void snd_gf1_dma_program(snd_gus_card_t * gus,
static void snd_gf1_dma_program(struct snd_gus_card * gus,
unsigned int addr,
unsigned long buf_addr,
unsigned int count,
......@@ -91,9 +91,9 @@ static void snd_gf1_dma_program(snd_gus_card_t * gus,
spin_unlock_irqrestore(&gus->reg_lock, flags);
}
static snd_gf1_dma_block_t *snd_gf1_dma_next_block(snd_gus_card_t * gus)
static struct snd_gf1_dma_block *snd_gf1_dma_next_block(struct snd_gus_card * gus)
{
snd_gf1_dma_block_t *block;
struct snd_gf1_dma_block *block;
/* PCM block have bigger priority than synthesizer one */
if (gus->gf1.dma_data_pcm) {
......@@ -123,9 +123,9 @@ static snd_gf1_dma_block_t *snd_gf1_dma_next_block(snd_gus_card_t * gus)
}
static void snd_gf1_dma_interrupt(snd_gus_card_t * gus)
static void snd_gf1_dma_interrupt(struct snd_gus_card * gus)
{
snd_gf1_dma_block_t *block;
struct snd_gf1_dma_block *block;
snd_gf1_dma_ack(gus);
if (gus->gf1.dma_ack)
......@@ -147,7 +147,7 @@ static void snd_gf1_dma_interrupt(snd_gus_card_t * gus)
#endif
}
int snd_gf1_dma_init(snd_gus_card_t * gus)
int snd_gf1_dma_init(struct snd_gus_card * gus)
{
down(&gus->dma_mutex);
gus->gf1.dma_shared++;
......@@ -164,9 +164,9 @@ int snd_gf1_dma_init(snd_gus_card_t * gus)
return 0;
}
int snd_gf1_dma_done(snd_gus_card_t * gus)
int snd_gf1_dma_done(struct snd_gus_card * gus)
{
snd_gf1_dma_block_t *block;
struct snd_gf1_dma_block *block;
down(&gus->dma_mutex);
gus->gf1.dma_shared--;
......@@ -189,13 +189,13 @@ int snd_gf1_dma_done(snd_gus_card_t * gus)
return 0;
}
int snd_gf1_dma_transfer_block(snd_gus_card_t * gus,
snd_gf1_dma_block_t * __block,
int snd_gf1_dma_transfer_block(struct snd_gus_card * gus,
struct snd_gf1_dma_block * __block,
int atomic,
int synth)
{
unsigned long flags;
snd_gf1_dma_block_t *block;
struct snd_gf1_dma_block *block;
block = kmalloc(sizeof(*block), atomic ? GFP_ATOMIC : GFP_KERNEL);
if (block == NULL) {
......
......@@ -26,7 +26,7 @@
#include <sound/info.h>
static int snd_gus_dram_poke(snd_gus_card_t *gus, char __user *_buffer,
static int snd_gus_dram_poke(struct snd_gus_card *gus, char __user *_buffer,
unsigned int address, unsigned int size)
{
unsigned long flags;
......@@ -57,13 +57,13 @@ static int snd_gus_dram_poke(snd_gus_card_t *gus, char __user *_buffer,
}
int snd_gus_dram_write(snd_gus_card_t *gus, char __user *buffer,
int snd_gus_dram_write(struct snd_gus_card *gus, char __user *buffer,
unsigned int address, unsigned int size)
{
return snd_gus_dram_poke(gus, buffer, address, size);
}
static int snd_gus_dram_peek(snd_gus_card_t *gus, char __user *_buffer,
static int snd_gus_dram_peek(struct snd_gus_card *gus, char __user *_buffer,
unsigned int address, unsigned int size,
int rom)
{
......@@ -95,7 +95,7 @@ static int snd_gus_dram_peek(snd_gus_card_t *gus, char __user *_buffer,
return 0;
}
int snd_gus_dram_read(snd_gus_card_t *gus, char __user *buffer,
int snd_gus_dram_read(struct snd_gus_card *gus, char __user *buffer,
unsigned int address, unsigned int size,
int rom)
{
......
......@@ -28,11 +28,11 @@
*
*/
int snd_gus_iwffff_put_sample(void *private_data, iwffff_wave_t *wave,
int snd_gus_iwffff_put_sample(void *private_data, struct iwffff_wave *wave,
char __user *data, long len, int atomic)
{
snd_gus_card_t *gus = private_data;
snd_gf1_mem_block_t *block;
struct snd_gus_card *gus = private_data;
struct snd_gf1_mem_block *block;
int err;
if (wave->format & IWFFFF_WAVE_ROM)
......@@ -58,19 +58,19 @@ int snd_gus_iwffff_put_sample(void *private_data, iwffff_wave_t *wave,
return 0;
}
int snd_gus_iwffff_get_sample(void *private_data, iwffff_wave_t *wave,
int snd_gus_iwffff_get_sample(void *private_data, struct iwffff_wave *wave,
char __user *data, long len, int atomic)
{
snd_gus_card_t *gus = private_data;
struct snd_gus_card *gus = private_data;
return snd_gus_dram_read(gus, data, wave->address.memory, wave->size,
wave->format & IWFFFF_WAVE_ROM ? 1 : 0);
}
int snd_gus_iwffff_remove_sample(void *private_data, iwffff_wave_t *wave,
int snd_gus_iwffff_remove_sample(void *private_data, struct iwffff_wave *wave,
int atomic)
{
snd_gus_card_t *gus = private_data;
struct snd_gus_card *gus = private_data;
if (wave->format & IWFFFF_WAVE_ROM)
return 0; /* it's probably ok - verify the address? */
......@@ -81,11 +81,11 @@ int snd_gus_iwffff_remove_sample(void *private_data, iwffff_wave_t *wave,
*
*/
int snd_gus_gf1_put_sample(void *private_data, gf1_wave_t *wave,
int snd_gus_gf1_put_sample(void *private_data, struct gf1_wave *wave,
char __user *data, long len, int atomic)
{
snd_gus_card_t *gus = private_data;
snd_gf1_mem_block_t *block;
struct snd_gus_card *gus = private_data;
struct snd_gf1_mem_block *block;
int err;
if (wave->format & GF1_WAVE_STEREO)
......@@ -109,18 +109,18 @@ int snd_gus_gf1_put_sample(void *private_data, gf1_wave_t *wave,
return 0;
}
int snd_gus_gf1_get_sample(void *private_data, gf1_wave_t *wave,
int snd_gus_gf1_get_sample(void *private_data, struct gf1_wave *wave,
char __user *data, long len, int atomic)
{
snd_gus_card_t *gus = private_data;
struct snd_gus_card *gus = private_data;
return snd_gus_dram_read(gus, data, wave->address.memory, wave->size, 0);
}
int snd_gus_gf1_remove_sample(void *private_data, gf1_wave_t *wave,
int snd_gus_gf1_remove_sample(void *private_data, struct gf1_wave *wave,
int atomic)
{
snd_gus_card_t *gus = private_data;
struct snd_gus_card *gus = private_data;
return snd_gf1_mem_free(&gus->gf1.mem_alloc, wave->address.memory);
}
......@@ -129,11 +129,11 @@ int snd_gus_gf1_remove_sample(void *private_data, gf1_wave_t *wave,
*
*/
int snd_gus_simple_put_sample(void *private_data, simple_instrument_t *instr,
int snd_gus_simple_put_sample(void *private_data, struct simple_instrument *instr,
char __user *data, long len, int atomic)
{
snd_gus_card_t *gus = private_data;
snd_gf1_mem_block_t *block;
struct snd_gus_card *gus = private_data;
struct snd_gf1_mem_block *block;
int err;
if (instr->format & SIMPLE_WAVE_STEREO)
......@@ -156,18 +156,18 @@ int snd_gus_simple_put_sample(void *private_data, simple_instrument_t *instr,
return 0;
}
int snd_gus_simple_get_sample(void *private_data, simple_instrument_t *instr,
int snd_gus_simple_get_sample(void *private_data, struct simple_instrument *instr,
char __user *data, long len, int atomic)
{
snd_gus_card_t *gus = private_data;
struct snd_gus_card *gus = private_data;
return snd_gus_dram_read(gus, data, instr->address.memory, instr->size, 0);
}
int snd_gus_simple_remove_sample(void *private_data, simple_instrument_t *instr,
int snd_gus_simple_remove_sample(void *private_data, struct simple_instrument *instr,
int atomic)
{
snd_gus_card_t *gus = private_data;
struct snd_gus_card *gus = private_data;
return snd_gf1_mem_free(&gus->gf1.mem_alloc, instr->address.memory);
}
This diff is collapsed.
......@@ -32,7 +32,7 @@
irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
snd_gus_card_t * gus = dev_id;
struct snd_gus_card * gus = dev_id;
unsigned char status;
int loop = 100;
int handled = 0;
......@@ -54,7 +54,7 @@ irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (status & (0x20 | 0x40)) {
unsigned int already, _current_;
unsigned char voice_status, voice;
snd_gus_voice_t *pvoice;
struct snd_gus_voice *pvoice;
already = 0;
while (((voice_status = snd_gf1_i_read8(gus, SNDRV_GF1_GB_VOICES_IRQ)) & 0xc0) != 0xc0) {
......@@ -107,11 +107,11 @@ irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
#ifdef CONFIG_SND_DEBUG
static void snd_gus_irq_info_read(snd_info_entry_t *entry,
snd_info_buffer_t * buffer)
static void snd_gus_irq_info_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
snd_gus_card_t *gus;
snd_gus_voice_t *pvoice;
struct snd_gus_card *gus;
struct snd_gus_voice *pvoice;
int idx;
gus = entry->private_data;
......@@ -131,9 +131,9 @@ static void snd_gus_irq_info_read(snd_info_entry_t *entry,
}
}
void snd_gus_irq_profile_init(snd_gus_card_t *gus)
void snd_gus_irq_profile_init(struct snd_gus_card *gus)
{
snd_info_entry_t *entry;
struct snd_info_entry *entry;
if (! snd_card_proc_new(gus->card, "gusirq", &entry))
snd_info_set_text_ops(entry, gus, 1024, snd_gus_irq_info_read);
......
......@@ -35,21 +35,21 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
MODULE_DESCRIPTION("Routines for Gravis UltraSound soundcards");
MODULE_LICENSE("GPL");
static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches);
static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches);
int snd_gus_use_inc(snd_gus_card_t * gus)
int snd_gus_use_inc(struct snd_gus_card * gus)
{
if (!try_module_get(gus->card->module))
return 0;
return 1;
}
void snd_gus_use_dec(snd_gus_card_t * gus)
void snd_gus_use_dec(struct snd_gus_card * gus)
{
module_put(gus->card->module);
}
static int snd_gus_joystick_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
static int snd_gus_joystick_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 1;
......@@ -58,17 +58,17 @@ static int snd_gus_joystick_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
return 0;
}
static int snd_gus_joystick_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_gus_joystick_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
ucontrol->value.integer.value[0] = gus->joystick_dac & 31;
return 0;
}
static int snd_gus_joystick_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_gus_joystick_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int change;
unsigned char nval;
......@@ -82,7 +82,7 @@ static int snd_gus_joystick_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
return change;
}
static snd_kcontrol_new_t snd_gus_joystick_control = {
static struct snd_kcontrol_new snd_gus_joystick_control = {
.iface = SNDRV_CTL_ELEM_IFACE_CARD,
.name = "Joystick Speed",
.info = snd_gus_joystick_info,
......@@ -90,7 +90,7 @@ static snd_kcontrol_new_t snd_gus_joystick_control = {
.put = snd_gus_joystick_put
};
static void snd_gus_init_control(snd_gus_card_t *gus)
static void snd_gus_init_control(struct snd_gus_card *gus)
{
if (!gus->ace_flag)
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)
*
*/
static int snd_gus_free(snd_gus_card_t *gus)
static int snd_gus_free(struct snd_gus_card *gus)
{
if (gus->gf1.res_port2 == NULL)
goto __hw_end;
......@@ -129,24 +129,24 @@ static int snd_gus_free(snd_gus_card_t *gus)
return 0;
}
static int snd_gus_dev_free(snd_device_t *device)
static int snd_gus_dev_free(struct snd_device *device)
{
snd_gus_card_t *gus = device->device_data;
struct snd_gus_card *gus = device->device_data;
return snd_gus_free(gus);
}
int snd_gus_create(snd_card_t * card,
int snd_gus_create(struct snd_card *card,
unsigned long port,
int irq, int dma1, int dma2,
int timer_dev,
int voices,
int pcm_channels,
int effect,
snd_gus_card_t **rgus)
struct snd_gus_card **rgus)
{
snd_gus_card_t *gus;
struct snd_gus_card *gus;
int err;
static snd_device_ops_t ops = {
static struct snd_device_ops ops = {
.dev_free = snd_gus_dev_free,
};
......@@ -238,7 +238,7 @@ int snd_gus_create(snd_card_t * card,
* Memory detection routine for plain GF1 soundcards
*/
static int snd_gus_detect_memory(snd_gus_card_t * gus)
static int snd_gus_detect_memory(struct snd_gus_card * gus)
{
int l, idx, local;
unsigned char d;
......@@ -273,9 +273,9 @@ static int snd_gus_detect_memory(snd_gus_card_t * gus)
return 0; /* some memory were detected */
}
static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches)
static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches)
{
snd_card_t *card;
struct snd_card *card;
unsigned long flags;
int irq, dma1, dma2;
static unsigned char irqs[16] =
......@@ -360,11 +360,11 @@ static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches)
return 0;
}
static int snd_gus_check_version(snd_gus_card_t * gus)
static int snd_gus_check_version(struct snd_gus_card * gus)
{
unsigned long flags;
unsigned char val, rev;
snd_card_t *card;
struct snd_card *card;
card = gus->card;
spin_lock_irqsave(&gus->reg_lock, flags);
......@@ -409,14 +409,14 @@ static int snd_gus_check_version(snd_gus_card_t * gus)
}
#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
static void snd_gus_seq_dev_free(snd_seq_device_t *seq_dev)
static void snd_gus_seq_dev_free(struct snd_seq_device *seq_dev)
{
snd_gus_card_t *gus = seq_dev->private_data;
struct snd_gus_card *gus = seq_dev->private_data;
gus->seq_dev = NULL;
}
#endif
int snd_gus_initialize(snd_gus_card_t *gus)
int snd_gus_initialize(struct snd_gus_card *gus)
{
int err;
......@@ -432,9 +432,9 @@ int snd_gus_initialize(snd_gus_card_t *gus)
return err;
#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
if (snd_seq_device_new(gus->card, 1, SNDRV_SEQ_DEV_ID_GUS,
sizeof(snd_gus_card_t*), &gus->seq_dev) >= 0) {
sizeof(struct snd_gus_card *), &gus->seq_dev) >= 0) {
strcpy(gus->seq_dev->name, "GUS");
*(snd_gus_card_t**)SNDRV_SEQ_DEVICE_ARGPTR(gus->seq_dev) = gus;
*(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(gus->seq_dev) = gus;
gus->seq_dev->private_data = gus;
gus->seq_dev->private_free = snd_gus_seq_dev_free;
}
......
......@@ -27,11 +27,11 @@
#include <sound/info.h>
#ifdef CONFIG_SND_DEBUG
static void snd_gf1_mem_info_read(snd_info_entry_t *entry,
snd_info_buffer_t * buffer);
static void snd_gf1_mem_info_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer);
#endif
void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup)
void snd_gf1_mem_lock(struct snd_gf1_mem * alloc, int xup)
{
if (!xup) {
down(&alloc->memory_mutex);
......@@ -40,12 +40,12 @@ void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup)
}
}
static snd_gf1_mem_block_t *snd_gf1_mem_xalloc(snd_gf1_mem_t * alloc,
snd_gf1_mem_block_t * block)
static struct snd_gf1_mem_block *snd_gf1_mem_xalloc(struct snd_gf1_mem * alloc,
struct snd_gf1_mem_block * block)
{
snd_gf1_mem_block_t *pblock, *nblock;
struct snd_gf1_mem_block *pblock, *nblock;
nblock = (snd_gf1_mem_block_t *) kmalloc(sizeof(snd_gf1_mem_block_t), GFP_KERNEL);
nblock = kmalloc(sizeof(struct snd_gf1_mem_block), GFP_KERNEL);
if (nblock == NULL)
return NULL;
*nblock = *block;
......@@ -76,7 +76,7 @@ static snd_gf1_mem_block_t *snd_gf1_mem_xalloc(snd_gf1_mem_t * alloc,
return nblock;
}
int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block)
int snd_gf1_mem_xfree(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * block)
{
if (block->share) { /* ok.. shared block */
block->share--;
......@@ -106,10 +106,10 @@ int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block)
return 0;
}
static snd_gf1_mem_block_t *snd_gf1_mem_look(snd_gf1_mem_t * alloc,
static struct snd_gf1_mem_block *snd_gf1_mem_look(struct snd_gf1_mem * alloc,
unsigned int address)
{
snd_gf1_mem_block_t *block;
struct snd_gf1_mem_block *block;
for (block = alloc->first; block; block = block->next) {
if (block->ptr == address) {
......@@ -119,10 +119,10 @@ static snd_gf1_mem_block_t *snd_gf1_mem_look(snd_gf1_mem_t * alloc,
return NULL;
}
static snd_gf1_mem_block_t *snd_gf1_mem_share(snd_gf1_mem_t * alloc,
static struct snd_gf1_mem_block *snd_gf1_mem_share(struct snd_gf1_mem * alloc,
unsigned int *share_id)
{
snd_gf1_mem_block_t *block;
struct snd_gf1_mem_block *block;
if (!share_id[0] && !share_id[1] &&
!share_id[2] && !share_id[3])
......@@ -133,14 +133,14 @@ static snd_gf1_mem_block_t *snd_gf1_mem_share(snd_gf1_mem_t * alloc,
return NULL;
}
static int snd_gf1_mem_find(snd_gf1_mem_t * alloc,
snd_gf1_mem_block_t * block,
static int snd_gf1_mem_find(struct snd_gf1_mem * alloc,
struct snd_gf1_mem_block * block,
unsigned int size, int w_16, int align)
{
snd_gf1_bank_info_t *info = w_16 ? alloc->banks_16 : alloc->banks_8;
struct snd_gf1_bank_info *info = w_16 ? alloc->banks_16 : alloc->banks_8;
unsigned int idx, boundary;
int size1;
snd_gf1_mem_block_t *pblock;
struct snd_gf1_mem_block *pblock;
unsigned int ptr1, ptr2;
align--;
......@@ -186,11 +186,11 @@ static int snd_gf1_mem_find(snd_gf1_mem_t * alloc,
return -ENOMEM;
}
snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner,
struct snd_gf1_mem_block *snd_gf1_mem_alloc(struct snd_gf1_mem * alloc, int owner,
char *name, int size, int w_16, int align,
unsigned int *share_id)
{
snd_gf1_mem_block_t block, *nblock;
struct snd_gf1_mem_block block, *nblock;
snd_gf1_mem_lock(alloc, 0);
if (share_id != NULL) {
......@@ -220,10 +220,10 @@ snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner,
return nblock;
}
int snd_gf1_mem_free(snd_gf1_mem_t * alloc, unsigned int address)
int snd_gf1_mem_free(struct snd_gf1_mem * alloc, unsigned int address)
{
int result;
snd_gf1_mem_block_t *block;
struct snd_gf1_mem_block *block;
snd_gf1_mem_lock(alloc, 0);
if ((block = snd_gf1_mem_look(alloc, address)) != NULL) {
......@@ -235,12 +235,12 @@ int snd_gf1_mem_free(snd_gf1_mem_t * alloc, unsigned int address)
return -EINVAL;
}
int snd_gf1_mem_init(snd_gus_card_t * gus)
int snd_gf1_mem_init(struct snd_gus_card * gus)
{
snd_gf1_mem_t *alloc;
snd_gf1_mem_block_t block;
struct snd_gf1_mem *alloc;
struct snd_gf1_mem_block block;
#ifdef CONFIG_SND_DEBUG
snd_info_entry_t *entry;
struct snd_info_entry *entry;
#endif
alloc = &gus->gf1.mem_alloc;
......@@ -272,10 +272,10 @@ int snd_gf1_mem_init(snd_gus_card_t * gus)
return 0;
}
int snd_gf1_mem_done(snd_gus_card_t * gus)
int snd_gf1_mem_done(struct snd_gus_card * gus)
{
snd_gf1_mem_t *alloc;
snd_gf1_mem_block_t *block, *nblock;
struct snd_gf1_mem *alloc;
struct snd_gf1_mem_block *block, *nblock;
alloc = &gus->gf1.mem_alloc;
block = alloc->first;
......@@ -288,12 +288,12 @@ int snd_gf1_mem_done(snd_gus_card_t * gus)
}
#ifdef CONFIG_SND_DEBUG
static void snd_gf1_mem_info_read(snd_info_entry_t *entry,
snd_info_buffer_t * buffer)
static void snd_gf1_mem_info_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
snd_gus_card_t *gus;
snd_gf1_mem_t *alloc;
snd_gf1_mem_block_t *block;
struct snd_gus_card *gus;
struct snd_gf1_mem *alloc;
struct snd_gf1_mem_block *block;
unsigned int total, used;
int i;
......
......@@ -25,20 +25,20 @@
#include <sound/gus.h>
#include <sound/info.h>
typedef struct gus_proc_private {
struct gus_proc_private {
int rom; /* data are in ROM */
unsigned int address;
unsigned int size;
snd_gus_card_t * gus;
} gus_proc_private_t;
struct snd_gus_card * gus;
};
static long snd_gf1_mem_proc_dump(snd_info_entry_t *entry, void *file_private_data,
static long snd_gf1_mem_proc_dump(struct snd_info_entry *entry, void *file_private_data,
struct file *file, char __user *buf,
unsigned long count, unsigned long pos)
{
long size;
gus_proc_private_t *priv = entry->private_data;
snd_gus_card_t *gus = priv->gus;
struct gus_proc_private *priv = entry->private_data;
struct snd_gus_card *gus = priv->gus;
int err;
size = count;
......@@ -52,13 +52,13 @@ static long snd_gf1_mem_proc_dump(snd_info_entry_t *entry, void *file_private_da
return 0;
}
static long long snd_gf1_mem_proc_llseek(snd_info_entry_t *entry,
static long long snd_gf1_mem_proc_llseek(struct snd_info_entry *entry,
void *private_file_data,
struct file *file,
long long offset,
int orig)
{
gus_proc_private_t *priv = entry->private_data;
struct gus_proc_private *priv = entry->private_data;
switch (orig) {
case 0: /* SEEK_SET */
......@@ -78,9 +78,9 @@ static long long snd_gf1_mem_proc_llseek(snd_info_entry_t *entry,
return file->f_pos;
}
static void snd_gf1_mem_proc_free(snd_info_entry_t *entry)
static void snd_gf1_mem_proc_free(struct snd_info_entry *entry)
{
gus_proc_private_t *priv = entry->private_data;
struct gus_proc_private *priv = entry->private_data;
kfree(priv);
}
......@@ -89,12 +89,12 @@ static struct snd_info_entry_ops snd_gf1_mem_proc_ops = {
.llseek = snd_gf1_mem_proc_llseek,
};
int snd_gf1_mem_proc_init(snd_gus_card_t * gus)
int snd_gf1_mem_proc_init(struct snd_gus_card * gus)
{
int idx;
char name[16];
gus_proc_private_t *priv;
snd_info_entry_t *entry;
struct gus_proc_private *priv;
struct snd_info_entry *entry;
for (idx = 0; idx < 4; idx++) {
if (gus->gf1.mem_alloc.banks_8[idx].size > 0) {
......
......@@ -36,7 +36,7 @@
.get = snd_gf1_get_single, .put = snd_gf1_put_single, \
.private_value = shift | (invert << 8) }
static int snd_gf1_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
static int snd_gf1_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 1;
......@@ -45,9 +45,9 @@ static int snd_gf1_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
return 0;
}
static int snd_gf1_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_gf1_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
int shift = kcontrol->private_value & 0xff;
int invert = (kcontrol->private_value >> 8) & 1;
......@@ -57,9 +57,9 @@ static int snd_gf1_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
return 0;
}
static int snd_gf1_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_gf1_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int shift = kcontrol->private_value & 0xff;
int invert = (kcontrol->private_value >> 8) & 1;
......@@ -86,7 +86,7 @@ static int snd_gf1_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
.get = snd_ics_get_double, .put = snd_ics_put_double, \
.private_value = addr }
static int snd_ics_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
static int snd_ics_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2;
......@@ -95,9 +95,9 @@ static int snd_ics_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
return 0;
}
static int snd_ics_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_ics_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int addr = kcontrol->private_value & 0xff;
unsigned char left, right;
......@@ -111,9 +111,9 @@ static int snd_ics_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
return 0;
}
static int snd_ics_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
static int snd_ics_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
unsigned long flags;
int addr = kcontrol->private_value & 0xff;
int change;
......@@ -146,13 +146,13 @@ static int snd_ics_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
return change;
}
static snd_kcontrol_new_t snd_gf1_controls[] = {
static struct snd_kcontrol_new snd_gf1_controls[] = {
GF1_SINGLE("Master Playback Switch", 0, 1, 1),
GF1_SINGLE("Line Switch", 0, 0, 1),
GF1_SINGLE("Mic Switch", 0, 2, 0)
};
static snd_kcontrol_new_t snd_ics_controls[] = {
static struct snd_kcontrol_new snd_ics_controls[] = {
GF1_SINGLE("Master Playback Switch", 0, 1, 1),
ICS_DOUBLE("Master Playback Volume", 0, SNDRV_ICS_MASTER_DEV),
ICS_DOUBLE("Synth Playback Volume", 0, SNDRV_ICS_GF1_DEV),
......@@ -163,9 +163,9 @@ ICS_DOUBLE("Mic Playback Volume", 0, SNDRV_ICS_MIC_DEV),
ICS_DOUBLE("CD Playback Volume", 0, SNDRV_ICS_CD_DEV)
};
int snd_gf1_new_mixer(snd_gus_card_t * gus)
int snd_gf1_new_mixer(struct snd_gus_card * gus)
{
snd_card_t *card;
struct snd_card *card;
unsigned int idx, max;
int err;
......
This diff is collapsed.
......@@ -25,52 +25,52 @@
#include <sound/core.h>
#include <sound/gus.h>
extern void snd_gf1_timers_init(snd_gus_card_t * gus);
extern void snd_gf1_timers_done(snd_gus_card_t * gus);
extern int snd_gf1_synth_init(snd_gus_card_t * gus);
extern void snd_gf1_synth_done(snd_gus_card_t * gus);
extern void snd_gf1_timers_init(struct snd_gus_card * gus);
extern void snd_gf1_timers_done(struct snd_gus_card * gus);
extern int snd_gf1_synth_init(struct snd_gus_card * gus);
extern void snd_gf1_synth_done(struct snd_gus_card * gus);
/*
* ok.. default interrupt handlers...
*/
static void snd_gf1_default_interrupt_handler_midi_out(snd_gus_card_t * gus)
static void snd_gf1_default_interrupt_handler_midi_out(struct snd_gus_card * gus)
{
snd_gf1_uart_cmd(gus, gus->gf1.uart_cmd &= ~0x20);
}
static void snd_gf1_default_interrupt_handler_midi_in(snd_gus_card_t * gus)
static void snd_gf1_default_interrupt_handler_midi_in(struct snd_gus_card * gus)
{
snd_gf1_uart_cmd(gus, gus->gf1.uart_cmd &= ~0x80);
}
static void snd_gf1_default_interrupt_handler_timer1(snd_gus_card_t * gus)
static void snd_gf1_default_interrupt_handler_timer1(struct snd_gus_card * gus)
{
snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, gus->gf1.timer_enabled &= ~4);
}
static void snd_gf1_default_interrupt_handler_timer2(snd_gus_card_t * gus)
static void snd_gf1_default_interrupt_handler_timer2(struct snd_gus_card * gus)
{
snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, gus->gf1.timer_enabled &= ~8);
}
static void snd_gf1_default_interrupt_handler_wave_and_volume(snd_gus_card_t * gus, snd_gus_voice_t * voice)
static void snd_gf1_default_interrupt_handler_wave_and_volume(struct snd_gus_card * gus, struct snd_gus_voice * voice)
{
snd_gf1_i_ctrl_stop(gus, 0x00);
snd_gf1_i_ctrl_stop(gus, 0x0d);
}
static void snd_gf1_default_interrupt_handler_dma_write(snd_gus_card_t * gus)
static void snd_gf1_default_interrupt_handler_dma_write(struct snd_gus_card * gus)
{
snd_gf1_i_write8(gus, 0x41, 0x00);
}
static void snd_gf1_default_interrupt_handler_dma_read(snd_gus_card_t * gus)
static void snd_gf1_default_interrupt_handler_dma_read(struct snd_gus_card * gus)
{
snd_gf1_i_write8(gus, 0x49, 0x00);
}
void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what)
void snd_gf1_set_default_handlers(struct snd_gus_card * gus, unsigned int what)
{
if (what & SNDRV_GF1_HANDLER_MIDI_OUT)
gus->gf1.interrupt_handler_midi_out = snd_gf1_default_interrupt_handler_midi_out;
......@@ -81,7 +81,7 @@ void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what)
if (what & SNDRV_GF1_HANDLER_TIMER2)
gus->gf1.interrupt_handler_timer2 = snd_gf1_default_interrupt_handler_timer2;
if (what & SNDRV_GF1_HANDLER_VOICE) {
snd_gus_voice_t *voice;
struct snd_gus_voice *voice;
voice = &gus->gf1.voices[what & 0xffff];
voice->handler_wave =
......@@ -99,7 +99,7 @@ void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what)
*/
static void snd_gf1_clear_regs(snd_gus_card_t * gus)
static void snd_gf1_clear_regs(struct snd_gus_card * gus)
{
unsigned long flags;
......@@ -111,7 +111,7 @@ static void snd_gf1_clear_regs(snd_gus_card_t * gus)
spin_unlock_irqrestore(&gus->reg_lock, flags);
}
static void snd_gf1_look_regs(snd_gus_card_t * gus)
static void snd_gf1_look_regs(struct snd_gus_card * gus)
{
unsigned long flags;
......@@ -127,7 +127,7 @@ static void snd_gf1_look_regs(snd_gus_card_t * gus)
* put selected GF1 voices to initial stage...
*/
void snd_gf1_smart_stop_voice(snd_gus_card_t * gus, unsigned short voice)
void snd_gf1_smart_stop_voice(struct snd_gus_card * gus, unsigned short voice)
{
unsigned long flags;
......@@ -141,7 +141,7 @@ void snd_gf1_smart_stop_voice(snd_gus_card_t * gus, unsigned short voice)
spin_unlock_irqrestore(&gus->reg_lock, flags);
}
void snd_gf1_stop_voice(snd_gus_card_t * gus, unsigned short voice)
void snd_gf1_stop_voice(struct snd_gus_card * gus, unsigned short voice)
{
unsigned long flags;
......@@ -161,7 +161,7 @@ void snd_gf1_stop_voice(snd_gus_card_t * gus, unsigned short voice)
#endif
}
static void snd_gf1_clear_voices(snd_gus_card_t * gus, unsigned short v_min,
static void snd_gf1_clear_voices(struct snd_gus_card * gus, unsigned short v_min,
unsigned short v_max)
{
unsigned long flags;
......@@ -203,7 +203,7 @@ static void snd_gf1_clear_voices(snd_gus_card_t * gus, unsigned short v_min,
}
}
void snd_gf1_stop_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned short v_max)
void snd_gf1_stop_voices(struct snd_gus_card * gus, unsigned short v_min, unsigned short v_max)
{
unsigned long flags;
short i, ramp_ok;
......@@ -232,8 +232,8 @@ void snd_gf1_stop_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned sh
snd_gf1_clear_voices(gus, v_min, v_max);
}
static void snd_gf1_alloc_voice_use(snd_gus_card_t * gus,
snd_gus_voice_t * pvoice,
static void snd_gf1_alloc_voice_use(struct snd_gus_card * gus,
struct snd_gus_voice * pvoice,
int type, int client, int port)
{
pvoice->use = 1;
......@@ -255,9 +255,9 @@ static void snd_gf1_alloc_voice_use(snd_gus_card_t * gus,
}
}
snd_gus_voice_t *snd_gf1_alloc_voice(snd_gus_card_t * gus, int type, int client, int port)
struct snd_gus_voice *snd_gf1_alloc_voice(struct snd_gus_card * gus, int type, int client, int port)
{
snd_gus_voice_t *pvoice;
struct snd_gus_voice *pvoice;
unsigned long flags;
int idx;
......@@ -289,10 +289,10 @@ snd_gus_voice_t *snd_gf1_alloc_voice(snd_gus_card_t * gus, int type, int client,
return NULL;
}
void snd_gf1_free_voice(snd_gus_card_t * gus, snd_gus_voice_t *voice)
void snd_gf1_free_voice(struct snd_gus_card * gus, struct snd_gus_voice *voice)
{
unsigned long flags;
void (*private_free)(snd_gus_voice_t *voice);
void (*private_free)(struct snd_gus_voice *voice);
void *private_data;
if (voice == NULL || !voice->use)
......@@ -317,7 +317,7 @@ void snd_gf1_free_voice(snd_gus_card_t * gus, snd_gus_voice_t *voice)
* call this function only by start of driver
*/
int snd_gf1_start(snd_gus_card_t * gus)
int snd_gf1_start(struct snd_gus_card * gus)
{
unsigned long flags;
unsigned int i;
......@@ -400,7 +400,7 @@ int snd_gf1_start(snd_gus_card_t * gus)
* call this function only by shutdown of driver
*/
int snd_gf1_stop(snd_gus_card_t * gus)
int snd_gf1_stop(struct snd_gus_card * gus)
{
snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, 0); /* stop all timers */
snd_gf1_stop_voices(gus, 0, 31); /* stop all voices */
......
......@@ -28,9 +28,9 @@
*
*/
static void select_instrument(snd_gus_card_t * gus, snd_gus_voice_t * v)
static void select_instrument(struct snd_gus_card * gus, struct snd_gus_voice * v)
{
snd_seq_kinstr_t *instr;
struct snd_seq_kinstr *instr;
#if 0
printk("select instrument: cluster = %li, std = 0x%x, bank = %i, prg = %i\n",
......@@ -53,7 +53,8 @@ static void select_instrument(snd_gus_card_t * gus, snd_gus_voice_t * v)
*
*/
static void event_sample(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
static void event_sample(struct snd_seq_event *ev, struct snd_gus_port *p,
struct snd_gus_voice *v)
{
if (v->sample_ops && v->sample_ops->sample_stop)
v->sample_ops->sample_stop(p->gus, v, SAMPLE_STOP_IMMEDIATELY);
......@@ -67,7 +68,8 @@ static void event_sample(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t
select_instrument(p->gus, v);
}
static void event_cluster(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
static void event_cluster(struct snd_seq_event *ev, struct snd_gus_port *p,
struct snd_gus_voice *v)
{
if (v->sample_ops && v->sample_ops->sample_stop)
v->sample_ops->sample_stop(p->gus, v, SAMPLE_STOP_IMMEDIATELY);
......@@ -75,50 +77,58 @@ static void event_cluster(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_
select_instrument(p->gus, v);
}
static void event_start(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
static void event_start(struct snd_seq_event *ev, struct snd_gus_port *p,
struct snd_gus_voice *v)
{
if (v->sample_ops && v->sample_ops->sample_start)
v->sample_ops->sample_start(p->gus, v, ev->data.sample.param.position);
}
static void event_stop(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
static void event_stop(struct snd_seq_event *ev, struct snd_gus_port *p,
struct snd_gus_voice *v)
{
if (v->sample_ops && v->sample_ops->sample_stop)
v->sample_ops->sample_stop(p->gus, v, ev->data.sample.param.stop_mode);
}
static void event_freq(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
static void event_freq(struct snd_seq_event *ev, struct snd_gus_port *p,
struct snd_gus_voice *v)
{
if (v->sample_ops && v->sample_ops->sample_freq)
v->sample_ops->sample_freq(p->gus, v, ev->data.sample.param.frequency);
}
static void event_volume(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
static void event_volume(struct snd_seq_event *ev, struct snd_gus_port *p,
struct snd_gus_voice *v)
{
if (v->sample_ops && v->sample_ops->sample_volume)
v->sample_ops->sample_volume(p->gus, v, &ev->data.sample.param.volume);
}
static void event_loop(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
static void event_loop(struct snd_seq_event *ev, struct snd_gus_port *p,
struct snd_gus_voice *v)
{
if (v->sample_ops && v->sample_ops->sample_loop)
v->sample_ops->sample_loop(p->gus, v, &ev->data.sample.param.loop);
}
static void event_position(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
static void event_position(struct snd_seq_event *ev, struct snd_gus_port *p,
struct snd_gus_voice *v)
{
if (v->sample_ops && v->sample_ops->sample_pos)
v->sample_ops->sample_pos(p->gus, v, ev->data.sample.param.position);
}
static void event_private1(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
static void event_private1(struct snd_seq_event *ev, struct snd_gus_port *p,
struct snd_gus_voice *v)
{
if (v->sample_ops && v->sample_ops->sample_private1)
v->sample_ops->sample_private1(p->gus, v, (unsigned char *)&ev->data.sample.param.raw8);
}
typedef void (gus_sample_event_handler_t)(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v);
typedef void (gus_sample_event_handler_t)(struct snd_seq_event *ev,
struct snd_gus_port *p,
struct snd_gus_voice *v);
static gus_sample_event_handler_t *gus_sample_event_handlers[9] = {
event_sample,
event_cluster,
......@@ -131,11 +141,11 @@ static gus_sample_event_handler_t *gus_sample_event_handlers[9] = {
event_private1
};
void snd_gus_sample_event(snd_seq_event_t *ev, snd_gus_port_t *p)
void snd_gus_sample_event(struct snd_seq_event *ev, struct snd_gus_port *p)
{
int idx, voice;
snd_gus_card_t *gus = p->gus;
snd_gus_voice_t *v;
struct snd_gus_card *gus = p->gus;
struct snd_gus_voice *v;
unsigned long flags;
idx = ev->type - SNDRV_SEQ_EVENT_SAMPLE;
......
......@@ -29,19 +29,19 @@
*
*/
static void interrupt_wave(snd_gus_card_t *gus, snd_gus_voice_t *voice);
static void interrupt_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice);
static void interrupt_effect(snd_gus_card_t *gus, snd_gus_voice_t *voice);
static void sample_start(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_position_t position);
static void sample_stop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_stop_mode_t mode);
static void sample_freq(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_frequency_t freq);
static void sample_volume(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_ev_volume_t *volume);
static void sample_loop(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_ev_loop_t *loop);
static void sample_pos(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_position_t position);
static void sample_private1(snd_gus_card_t *card, snd_gus_voice_t *voice, unsigned char *data);
static snd_gus_sample_ops_t sample_ops = {
static void interrupt_wave(struct snd_gus_card *gus, struct snd_gus_voice *voice);
static void interrupt_volume(struct snd_gus_card *gus, struct snd_gus_voice *voice);
static void interrupt_effect(struct snd_gus_card *gus, struct snd_gus_voice *voice);
static void sample_start(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_position_t position);
static void sample_stop(struct snd_gus_card *gus, struct snd_gus_voice *voice, int mode);
static void sample_freq(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_frequency_t freq);
static void sample_volume(struct snd_gus_card *card, struct snd_gus_voice *voice, struct snd_seq_ev_volume *volume);
static void sample_loop(struct snd_gus_card *card, struct snd_gus_voice *voice, struct snd_seq_ev_loop *loop);
static void sample_pos(struct snd_gus_card *card, struct snd_gus_voice *voice, snd_seq_position_t position);
static void sample_private1(struct snd_gus_card *card, struct snd_gus_voice *voice, unsigned char *data);
static struct snd_gus_sample_ops sample_ops = {
sample_start,
sample_stop,
sample_freq,
......@@ -53,13 +53,13 @@ static snd_gus_sample_ops_t sample_ops = {
#if 0
static void note_stop(snd_gus_card_t *gus, snd_gus_voice_t *voice, int wait);
static void note_wait(snd_gus_card_t *gus, snd_gus_voice_t *voice);
static void note_off(snd_gus_card_t *gus, snd_gus_voice_t *voice);
static void note_volume(snd_gus_card_t *card, snd_gus_voice_t *voice);
static void note_pitchbend(snd_gus_card_t *card, snd_gus_voice_t *voice);
static void note_vibrato(snd_gus_card_t *card, snd_gus_voice_t *voice);
static void note_tremolo(snd_gus_card_t *card, snd_gus_voice_t *voice);
static void note_stop(struct snd_gus_card *gus, struct snd_gus_voice *voice, int wait);
static void note_wait(struct snd_gus_card *gus, struct snd_gus_voice *voice);
static void note_off(struct snd_gus_card *gus, struct snd_gus_voice *voice);
static void note_volume(struct snd_gus_card *card, struct snd_gus_voice *voice);
static void note_pitchbend(struct snd_gus_card *card, struct snd_gus_voice *voice);
static void note_vibrato(struct snd_gus_card *card, struct snd_gus_voice *voice);
static void note_tremolo(struct snd_gus_card *card, struct snd_gus_voice *voice);
static struct snd_gus_note_handlers note_commands = {
note_stop,
......@@ -71,7 +71,7 @@ static struct snd_gus_note_handlers note_commands = {
note_tremolo
};
static void chn_trigger_down(snd_gus_card_t *card, ultra_channel_t *channel, ultra_instrument_t *instrument, unsigned char note, unsigned char velocity, unsigned char priority );
static void chn_trigger_down(struct snd_gus_card *card, ultra_channel_t *channel, ultra_instrument_t *instrument, unsigned char note, unsigned char velocity, unsigned char priority );
static void chn_trigger_up( ultra_card_t *card, ultra_note_t *note );
static void chn_control( ultra_card_t *card, ultra_channel_t *channel, unsigned short p1, unsigned short p2 );
......@@ -83,14 +83,14 @@ static struct ULTRA_STRU_INSTRUMENT_CHANNEL_COMMANDS channel_commands = {
#endif
static void do_volume_envelope(snd_gus_card_t *card, snd_gus_voice_t *voice);
static void do_pan_envelope(snd_gus_card_t *card, snd_gus_voice_t *voice);
static void do_volume_envelope(struct snd_gus_card *card, struct snd_gus_voice *voice);
static void do_pan_envelope(struct snd_gus_card *card, struct snd_gus_voice *voice);
/*
*
*/
static void interrupt_wave(snd_gus_card_t *gus, snd_gus_voice_t *voice)
static void interrupt_wave(struct snd_gus_card *gus, struct snd_gus_voice *voice)
{
spin_lock(&gus->event_lock);
snd_gf1_stop_voice(gus, voice->number);
......@@ -102,7 +102,7 @@ static void interrupt_wave(snd_gus_card_t *gus, snd_gus_voice_t *voice)
spin_unlock(&gus->event_lock);
}
static void interrupt_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice)
static void interrupt_volume(struct snd_gus_card *gus, struct snd_gus_voice *voice)
{
spin_lock(&gus->event_lock);
if (voice->flags & SNDRV_GF1_VFLG_RUNNING)
......@@ -112,7 +112,7 @@ static void interrupt_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice)
spin_unlock(&gus->event_lock);
}
static void interrupt_effect(snd_gus_card_t *gus, snd_gus_voice_t *voice)
static void interrupt_effect(struct snd_gus_card *gus, struct snd_gus_voice *voice)
{
spin_lock(&gus->event_lock);
if ((voice->flags & (SNDRV_GF1_VFLG_RUNNING|SNDRV_GF1_VFLG_EFFECT_TIMER1)) ==
......@@ -125,7 +125,7 @@ static void interrupt_effect(snd_gus_card_t *gus, snd_gus_voice_t *voice)
*
*/
static void do_volume_envelope(snd_gus_card_t *gus, snd_gus_voice_t *voice)
static void do_volume_envelope(struct snd_gus_card *gus, struct snd_gus_voice *voice)
{
unsigned short next, rate, old_volume;
int program_next_ramp;
......@@ -229,7 +229,7 @@ static void do_volume_envelope(snd_gus_card_t *gus, snd_gus_voice_t *voice)
}
}
static void do_pan_envelope(snd_gus_card_t *gus, snd_gus_voice_t *voice)
static void do_pan_envelope(struct snd_gus_card *gus, struct snd_gus_voice *voice)
{
unsigned long flags;
unsigned char old_pan;
......@@ -276,7 +276,7 @@ static void do_pan_envelope(snd_gus_card_t *gus, snd_gus_voice_t *voice)
#endif
}
static void set_enhanced_pan(snd_gus_card_t *gus, snd_gus_voice_t *voice, unsigned short pan)
static void set_enhanced_pan(struct snd_gus_card *gus, struct snd_gus_voice *voice, unsigned short pan)
{
unsigned long flags;
unsigned short vlo, vro;
......@@ -307,13 +307,13 @@ static void set_enhanced_pan(snd_gus_card_t *gus, snd_gus_voice_t *voice, unsign
*
*/
static void sample_start(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_position_t position)
static void sample_start(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_position_t position)
{
unsigned long flags;
unsigned int begin, addr, addr_end, addr_start;
int w_16;
simple_instrument_t *simple;
snd_seq_kinstr_t *instr;
struct simple_instrument *simple;
struct snd_seq_kinstr *instr;
instr = snd_seq_instr_find(gus->gf1.ilist, &voice->instr, 0, 1);
if (instr == NULL)
......@@ -397,7 +397,7 @@ static void sample_start(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_po
snd_seq_instr_free_use(gus->gf1.ilist, instr);
}
static void sample_stop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_stop_mode_t mode)
static void sample_stop(struct snd_gus_card *gus, struct snd_gus_voice *voice, int mode)
{
unsigned char control;
unsigned long flags;
......@@ -433,7 +433,7 @@ static void sample_stop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_sto
}
}
static void sample_freq(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_frequency_t freq)
static void sample_freq(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_frequency_t freq)
{
unsigned long flags;
......@@ -444,7 +444,7 @@ static void sample_freq(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_fre
spin_unlock_irqrestore(&gus->reg_lock, flags);
}
static void sample_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_ev_volume_t *volume)
static void sample_volume(struct snd_gus_card *gus, struct snd_gus_voice *voice, struct snd_seq_ev_volume *volume)
{
if (volume->volume >= 0) {
volume->volume &= 0x3fff;
......@@ -471,13 +471,13 @@ static void sample_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_e
}
}
static void sample_loop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_ev_loop_t *loop)
static void sample_loop(struct snd_gus_card *gus, struct snd_gus_voice *voice, struct snd_seq_ev_loop *loop)
{
unsigned long flags;
int w_16 = voice->control & 0x04;
unsigned int begin, addr_start, addr_end;
simple_instrument_t *simple;
snd_seq_kinstr_t *instr;
struct simple_instrument *simple;
struct snd_seq_kinstr *instr;
#if 0
printk("voice_loop: start = 0x%x, end = 0x%x\n", loop->start, loop->end);
......@@ -500,13 +500,13 @@ static void sample_loop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_ev_
snd_seq_instr_free_use(gus->gf1.ilist, instr);
}
static void sample_pos(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_position_t position)
static void sample_pos(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_position_t position)
{
unsigned long flags;
int w_16 = voice->control & 0x04;
unsigned int begin, addr;
simple_instrument_t *simple;
snd_seq_kinstr_t *instr;
struct simple_instrument *simple;
struct snd_seq_kinstr *instr;
#if 0
printk("voice_loop: start = 0x%x, end = 0x%x\n", loop->start, loop->end);
......@@ -537,7 +537,7 @@ static unsigned char get_effects_mask( ultra_card_t *card, int value )
#endif
static void sample_private1(snd_gus_card_t *card, snd_gus_voice_t *voice, unsigned char *data)
static void sample_private1(struct snd_gus_card *card, struct snd_gus_voice *voice, unsigned char *data)
{
#if 0
unsigned long flags;
......@@ -624,7 +624,7 @@ static void chn_control( ultra_card_t *card, ultra_channel_t *channel, unsigned
#endif
void snd_gf1_simple_init(snd_gus_voice_t *voice)
void snd_gf1_simple_init(struct snd_gus_voice *voice)
{
voice->handler_wave = interrupt_wave;
voice->handler_volume = interrupt_volume;
......
......@@ -34,10 +34,10 @@ MODULE_LICENSE("GPL");
*
*/
static void snd_gus_synth_free_voices(snd_gus_card_t * gus, int client, int port)
static void snd_gus_synth_free_voices(struct snd_gus_card * gus, int client, int port)
{
int idx;
snd_gus_voice_t * voice;
struct snd_gus_voice * voice;
for (idx = 0; idx < 32; idx++) {
voice = &gus->gf1.voices[idx];
......@@ -46,11 +46,11 @@ static void snd_gus_synth_free_voices(snd_gus_card_t * gus, int client, int port
}
}
static int snd_gus_synth_use(void *private_data, snd_seq_port_subscribe_t *info)
static int snd_gus_synth_use(void *private_data, struct snd_seq_port_subscribe *info)
{
snd_gus_port_t * port = (snd_gus_port_t *)private_data;
snd_gus_card_t * gus = port->gus;
snd_gus_voice_t * voice;
struct snd_gus_port * port = private_data;
struct snd_gus_card * gus = port->gus;
struct snd_gus_voice * voice;
unsigned int idx;
if (info->voices > 32)
......@@ -74,10 +74,10 @@ static int snd_gus_synth_use(void *private_data, snd_seq_port_subscribe_t *info)
return 0;
}
static int snd_gus_synth_unuse(void *private_data, snd_seq_port_subscribe_t *info)
static int snd_gus_synth_unuse(void *private_data, struct snd_seq_port_subscribe *info)
{
snd_gus_port_t * port = (snd_gus_port_t *)private_data;
snd_gus_card_t * gus = port->gus;
struct snd_gus_port * port = private_data;
struct snd_gus_card * gus = port->gus;
down(&gus->register_mutex);
snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port);
......@@ -90,19 +90,19 @@ static int snd_gus_synth_unuse(void *private_data, snd_seq_port_subscribe_t *inf
*
*/
static void snd_gus_synth_free_private_instruments(snd_gus_port_t *p, int client)
static void snd_gus_synth_free_private_instruments(struct snd_gus_port *p, int client)
{
snd_seq_instr_header_t ifree;
struct snd_seq_instr_header ifree;
memset(&ifree, 0, sizeof(ifree));
ifree.cmd = SNDRV_SEQ_INSTR_FREE_CMD_PRIVATE;
snd_seq_instr_list_free_cond(p->gus->gf1.ilist, &ifree, client, 0);
}
static int snd_gus_synth_event_input(snd_seq_event_t *ev, int direct,
static int snd_gus_synth_event_input(struct snd_seq_event *ev, int direct,
void *private_data, int atomic, int hop)
{
snd_gus_port_t * p = (snd_gus_port_t *) private_data;
struct snd_gus_port * p = private_data;
snd_assert(p != NULL, return -EINVAL);
if (ev->type >= SNDRV_SEQ_EVENT_SAMPLE &&
......@@ -131,12 +131,12 @@ static int snd_gus_synth_event_input(snd_seq_event_t *ev, int direct,
}
static void snd_gus_synth_instr_notify(void *private_data,
snd_seq_kinstr_t *instr,
struct snd_seq_kinstr *instr,
int what)
{
unsigned int idx;
snd_gus_card_t *gus = private_data;
snd_gus_voice_t *pvoice;
struct snd_gus_card *gus = private_data;
struct snd_gus_voice *pvoice;
unsigned long flags;
spin_lock_irqsave(&gus->event_lock, flags);
......@@ -160,16 +160,16 @@ static void snd_gus_synth_instr_notify(void *private_data,
static void snd_gus_synth_free_port(void *private_data)
{
snd_gus_port_t * p = (snd_gus_port_t *)private_data;
struct snd_gus_port * p = private_data;
if (p)
snd_midi_channel_free_set(p->chset);
}
static int snd_gus_synth_create_port(snd_gus_card_t * gus, int idx)
static int snd_gus_synth_create_port(struct snd_gus_card * gus, int idx)
{
snd_gus_port_t * p;
snd_seq_port_callback_t callbacks;
struct snd_gus_port * p;
struct snd_seq_port_callback callbacks;
char name[32];
int result;
......@@ -210,18 +210,18 @@ static int snd_gus_synth_create_port(snd_gus_card_t * gus, int idx)
*
*/
static int snd_gus_synth_new_device(snd_seq_device_t *dev)
static int snd_gus_synth_new_device(struct snd_seq_device *dev)
{
snd_gus_card_t *gus;
struct snd_gus_card *gus;
int client, i;
snd_seq_client_callback_t callbacks;
snd_seq_client_info_t *cinfo;
snd_seq_port_subscribe_t sub;
snd_iwffff_ops_t *iwops;
snd_gf1_ops_t *gf1ops;
snd_simple_ops_t *simpleops;
gus = *(snd_gus_card_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev);
struct snd_seq_client_callback callbacks;
struct snd_seq_client_info *cinfo;
struct snd_seq_port_subscribe sub;
struct snd_iwffff_ops *iwops;
struct snd_gf1_ops *gf1ops;
struct snd_simple_ops *simpleops;
gus = *(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
if (gus == NULL)
return -EINVAL;
......@@ -293,11 +293,11 @@ static int snd_gus_synth_new_device(snd_seq_device_t *dev)
return 0;
}
static int snd_gus_synth_delete_device(snd_seq_device_t *dev)
static int snd_gus_synth_delete_device(struct snd_seq_device *dev)
{
snd_gus_card_t *gus;
struct snd_gus_card *gus;
gus = *(snd_gus_card_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev);
gus = *(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
if (gus == NULL)
return -EINVAL;
......@@ -312,13 +312,13 @@ static int snd_gus_synth_delete_device(snd_seq_device_t *dev)
static int __init alsa_gus_synth_init(void)
{
static snd_seq_dev_ops_t ops = {
static struct snd_seq_dev_ops ops = {
snd_gus_synth_new_device,
snd_gus_synth_delete_device
};
return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_GUS, &ops,
sizeof(snd_gus_card_t*));
sizeof(struct snd_gus_card *));
}
static void __exit alsa_gus_synth_exit(void)
......
......@@ -30,12 +30,12 @@
* Timer 1 - 80us
*/
static int snd_gf1_timer1_start(snd_timer_t * timer)
static int snd_gf1_timer1_start(struct snd_timer * timer)
{
unsigned long flags;
unsigned char tmp;
unsigned int ticks;
snd_gus_card_t *gus;
struct snd_gus_card *gus;
gus = snd_timer_chip(timer);
spin_lock_irqsave(&gus->reg_lock, flags);
......@@ -48,11 +48,11 @@ static int snd_gf1_timer1_start(snd_timer_t * timer)
return 0;
}
static int snd_gf1_timer1_stop(snd_timer_t * timer)
static int snd_gf1_timer1_stop(struct snd_timer * timer)
{
unsigned long flags;
unsigned char tmp;
snd_gus_card_t *gus;
struct snd_gus_card *gus;
gus = snd_timer_chip(timer);
spin_lock_irqsave(&gus->reg_lock, flags);
......@@ -66,12 +66,12 @@ static int snd_gf1_timer1_stop(snd_timer_t * timer)
* Timer 2 - 320us
*/
static int snd_gf1_timer2_start(snd_timer_t * timer)
static int snd_gf1_timer2_start(struct snd_timer * timer)
{
unsigned long flags;
unsigned char tmp;
unsigned int ticks;
snd_gus_card_t *gus;
struct snd_gus_card *gus;
gus = snd_timer_chip(timer);
spin_lock_irqsave(&gus->reg_lock, flags);
......@@ -84,11 +84,11 @@ static int snd_gf1_timer2_start(snd_timer_t * timer)
return 0;
}
static int snd_gf1_timer2_stop(snd_timer_t * timer)
static int snd_gf1_timer2_stop(struct snd_timer * timer)
{
unsigned long flags;
unsigned char tmp;
snd_gus_card_t *gus;
struct snd_gus_card *gus;
gus = snd_timer_chip(timer);
spin_lock_irqsave(&gus->reg_lock, flags);
......@@ -102,18 +102,18 @@ static int snd_gf1_timer2_stop(snd_timer_t * timer)
*/
static void snd_gf1_interrupt_timer1(snd_gus_card_t * gus)
static void snd_gf1_interrupt_timer1(struct snd_gus_card * gus)
{
snd_timer_t *timer = gus->gf1.timer1;
struct snd_timer *timer = gus->gf1.timer1;
if (timer == NULL)
return;
snd_timer_interrupt(timer, timer->sticks);
}
static void snd_gf1_interrupt_timer2(snd_gus_card_t * gus)
static void snd_gf1_interrupt_timer2(struct snd_gus_card * gus)
{
snd_timer_t *timer = gus->gf1.timer2;
struct snd_timer *timer = gus->gf1.timer2;
if (timer == NULL)
return;
......@@ -124,7 +124,7 @@ static void snd_gf1_interrupt_timer2(snd_gus_card_t * gus)
*/
static struct _snd_timer_hardware snd_gf1_timer1 =
static struct snd_timer_hardware snd_gf1_timer1 =
{
.flags = SNDRV_TIMER_HW_STOP,
.resolution = 80000,
......@@ -133,7 +133,7 @@ static struct _snd_timer_hardware snd_gf1_timer1 =
.stop = snd_gf1_timer1_stop,
};
static struct _snd_timer_hardware snd_gf1_timer2 =
static struct snd_timer_hardware snd_gf1_timer2 =
{
.flags = SNDRV_TIMER_HW_STOP,
.resolution = 320000,
......@@ -142,22 +142,22 @@ static struct _snd_timer_hardware snd_gf1_timer2 =
.stop = snd_gf1_timer2_stop,
};
static void snd_gf1_timer1_free(snd_timer_t *timer)
static void snd_gf1_timer1_free(struct snd_timer *timer)
{
snd_gus_card_t *gus = timer->private_data;
struct snd_gus_card *gus = timer->private_data;
gus->gf1.timer1 = NULL;
}
static void snd_gf1_timer2_free(snd_timer_t *timer)
static void snd_gf1_timer2_free(struct snd_timer *timer)
{
snd_gus_card_t *gus = timer->private_data;
struct snd_gus_card *gus = timer->private_data;
gus->gf1.timer2 = NULL;
}
void snd_gf1_timers_init(snd_gus_card_t * gus)
void snd_gf1_timers_init(struct snd_gus_card * gus)
{
snd_timer_t *timer;
snd_timer_id_t tid;
struct snd_timer *timer;
struct snd_timer_id tid;
if (gus->gf1.timer1 != NULL || gus->gf1.timer2 != NULL)
return;
......@@ -190,7 +190,7 @@ void snd_gf1_timers_init(snd_gus_card_t * gus)
gus->gf1.timer2 = timer;
}
void snd_gf1_timers_done(snd_gus_card_t * gus)
void snd_gf1_timers_done(struct snd_gus_card * gus)
{
snd_gf1_set_default_handlers(gus, SNDRV_GF1_HANDLER_TIMER1 | SNDRV_GF1_HANDLER_TIMER2);
if (gus->gf1.timer1) {
......
......@@ -26,7 +26,7 @@
#include <sound/core.h>
#include <sound/gus.h>
static void snd_gf1_interrupt_midi_in(snd_gus_card_t * gus)
static void snd_gf1_interrupt_midi_in(struct snd_gus_card * gus)
{
int count;
unsigned char stat, data, byte;
......@@ -61,7 +61,7 @@ static void snd_gf1_interrupt_midi_in(snd_gus_card_t * gus)
}
}
static void snd_gf1_interrupt_midi_out(snd_gus_card_t * gus)
static void snd_gf1_interrupt_midi_out(struct snd_gus_card * gus)
{
char byte;
unsigned long flags;
......@@ -81,7 +81,7 @@ static void snd_gf1_interrupt_midi_out(snd_gus_card_t * gus)
spin_unlock_irqrestore(&gus->uart_cmd_lock, flags);
}
static void snd_gf1_uart_reset(snd_gus_card_t * gus, int close)
static void snd_gf1_uart_reset(struct snd_gus_card * gus, int close)
{
snd_gf1_uart_cmd(gus, 0x03); /* reset */
if (!close && gus->uart_enable) {
......@@ -90,10 +90,10 @@ static void snd_gf1_uart_reset(snd_gus_card_t * gus, int close)
}
}
static int snd_gf1_uart_output_open(snd_rawmidi_substream_t * substream)
static int snd_gf1_uart_output_open(struct snd_rawmidi_substream *substream)
{
unsigned long flags;
snd_gus_card_t *gus;
struct snd_gus_card *gus;
gus = substream->rmidi->private_data;
spin_lock_irqsave(&gus->uart_cmd_lock, flags);
......@@ -109,10 +109,10 @@ static int snd_gf1_uart_output_open(snd_rawmidi_substream_t * substream)
return 0;
}
static int snd_gf1_uart_input_open(snd_rawmidi_substream_t * substream)
static int snd_gf1_uart_input_open(struct snd_rawmidi_substream *substream)
{
unsigned long flags;
snd_gus_card_t *gus;
struct snd_gus_card *gus;
int i;
gus = substream->rmidi->private_data;
......@@ -136,10 +136,10 @@ static int snd_gf1_uart_input_open(snd_rawmidi_substream_t * substream)
return 0;
}
static int snd_gf1_uart_output_close(snd_rawmidi_substream_t * substream)
static int snd_gf1_uart_output_close(struct snd_rawmidi_substream *substream)
{
unsigned long flags;
snd_gus_card_t *gus;
struct snd_gus_card *gus;
gus = substream->rmidi->private_data;
spin_lock_irqsave(&gus->uart_cmd_lock, flags);
......@@ -151,10 +151,10 @@ static int snd_gf1_uart_output_close(snd_rawmidi_substream_t * substream)
return 0;
}
static int snd_gf1_uart_input_close(snd_rawmidi_substream_t * substream)
static int snd_gf1_uart_input_close(struct snd_rawmidi_substream *substream)
{
unsigned long flags;
snd_gus_card_t *gus;
struct snd_gus_card *gus;
gus = substream->rmidi->private_data;
spin_lock_irqsave(&gus->uart_cmd_lock, flags);
......@@ -166,9 +166,9 @@ static int snd_gf1_uart_input_close(snd_rawmidi_substream_t * substream)
return 0;
}
static void snd_gf1_uart_input_trigger(snd_rawmidi_substream_t * substream, int up)
static void snd_gf1_uart_input_trigger(struct snd_rawmidi_substream *substream, int up)
{
snd_gus_card_t *gus;
struct snd_gus_card *gus;
unsigned long flags;
gus = substream->rmidi->private_data;
......@@ -184,10 +184,10 @@ static void snd_gf1_uart_input_trigger(snd_rawmidi_substream_t * substream, int
spin_unlock_irqrestore(&gus->uart_cmd_lock, flags);
}
static void snd_gf1_uart_output_trigger(snd_rawmidi_substream_t * substream, int up)
static void snd_gf1_uart_output_trigger(struct snd_rawmidi_substream *substream, int up)
{
unsigned long flags;
snd_gus_card_t *gus;
struct snd_gus_card *gus;
char byte;
int timeout;
......@@ -222,23 +222,23 @@ static void snd_gf1_uart_output_trigger(snd_rawmidi_substream_t * substream, int
spin_unlock_irqrestore(&gus->uart_cmd_lock, flags);
}
static snd_rawmidi_ops_t snd_gf1_uart_output =
static struct snd_rawmidi_ops snd_gf1_uart_output =
{
.open = snd_gf1_uart_output_open,
.close = snd_gf1_uart_output_close,
.trigger = snd_gf1_uart_output_trigger,
};
static snd_rawmidi_ops_t snd_gf1_uart_input =
static struct snd_rawmidi_ops snd_gf1_uart_input =
{
.open = snd_gf1_uart_input_open,
.close = snd_gf1_uart_input_close,
.trigger = snd_gf1_uart_input_trigger,
};
int snd_gf1_rawmidi_new(snd_gus_card_t * gus, int device, snd_rawmidi_t ** rrawmidi)
int snd_gf1_rawmidi_new(struct snd_gus_card * gus, int device, struct snd_rawmidi ** rrawmidi)
{
snd_rawmidi_t *rmidi;
struct snd_rawmidi *rmidi;
int err;
if (rrawmidi)
......
......@@ -72,7 +72,7 @@ unsigned int snd_gf1_gvol_to_lvol_raw(unsigned short gf1_vol)
return rvol | (m >> (8 - e));
}
unsigned int snd_gf1_calc_ramp_rate(snd_gus_card_t * gus,
unsigned int snd_gf1_calc_ramp_rate(struct snd_gus_card * gus,
unsigned short start,
unsigned short end,
unsigned int us)
......@@ -112,7 +112,7 @@ unsigned int snd_gf1_calc_ramp_rate(snd_gus_card_t * gus,
#endif /* 0 */
unsigned short snd_gf1_translate_freq(snd_gus_card_t * gus, unsigned int freq16)
unsigned short snd_gf1_translate_freq(struct snd_gus_card * gus, unsigned int freq16)
{
freq16 >>= 3;
if (freq16 < 50)
......
......@@ -70,11 +70,11 @@ MODULE_PARM_DESC(channels, "GF1 channels for GUS Classic driver.");
module_param_array(pcm_channels, int, NULL, 0444);
MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Classic driver.");
static snd_card_t *snd_gusclassic_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
static struct snd_card *snd_gusclassic_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
#define PFX "gusclassic: "
static int __init snd_gusclassic_detect(snd_gus_card_t * gus)
static int __init snd_gusclassic_detect(struct snd_gus_card * gus)
{
unsigned char d;
......@@ -93,7 +93,7 @@ static int __init snd_gusclassic_detect(snd_gus_card_t * gus)
return 0;
}
static void __init snd_gusclassic_init(int dev, snd_gus_card_t * gus)
static void __init snd_gusclassic_init(int dev, struct snd_gus_card * gus)
{
gus->equal_irq = 0;
gus->codec_flag = 0;
......@@ -106,9 +106,9 @@ static int __init snd_gusclassic_probe(int dev)
static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, 4, -1};
static int possible_dmas[] = {5, 6, 7, 1, 3, -1};
int xirq, xdma1, xdma2;
snd_card_t *card;
struct snd_card *card;
struct snd_gusclassic *guscard;
snd_gus_card_t *gus = NULL;
struct snd_gus_card *gus = NULL;
int err;
card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
......
......@@ -85,14 +85,14 @@ MODULE_PARM_DESC(channels, "GF1 channels for GUS Extreme driver.");
module_param_array(pcm_channels, int, NULL, 0444);
MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Extreme driver.");
static snd_card_t *snd_gusextreme_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
static struct snd_card *snd_gusextreme_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
#define PFX "gusextreme: "
static int __init snd_gusextreme_detect(int dev,
snd_card_t * card,
snd_gus_card_t * gus,
es1688_t *es1688)
struct snd_card *card,
struct snd_gus_card * gus,
struct snd_es1688 *es1688)
{
unsigned long flags;
unsigned char d;
......@@ -139,15 +139,15 @@ static int __init snd_gusextreme_detect(int dev,
return 0;
}
static void __init snd_gusextreme_init(int dev, snd_gus_card_t * gus)
static void __init snd_gusextreme_init(int dev, struct snd_gus_card * gus)
{
gus->joystick_dac = joystick_dac[dev];
}
static int __init snd_gusextreme_mixer(es1688_t *chip)
static int __init snd_gusextreme_mixer(struct snd_es1688 *chip)
{
snd_card_t *card = chip->card;
snd_ctl_elem_id_t id1, id2;
struct snd_card *card = chip->card;
struct snd_ctl_elem_id id1, id2;
int err;
memset(&id1, 0, sizeof(id1));
......@@ -173,11 +173,11 @@ static int __init snd_gusextreme_probe(int dev)
static int possible_gf1_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
static int possible_gf1_dmas[] = {5, 6, 7, 1, 3, -1};
int xgf1_irq, xgf1_dma, xess_irq, xmpu_irq, xess_dma;
snd_card_t *card;
struct snd_card *card;
struct snd_gusextreme *acard;
snd_gus_card_t *gus;
es1688_t *es1688;
opl3_t *opl3;
struct snd_gus_card *gus;
struct snd_es1688 *es1688;
struct snd_opl3 *opl3;
int err;
card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
......@@ -345,7 +345,7 @@ static int __init alsa_card_gusextreme_init(void)
static void __exit alsa_card_gusextreme_exit(void)
{
int idx;
snd_card_t *card;
struct snd_card *card;
struct snd_gusextreme *acard;
for (idx = 0; idx < SNDRV_CARDS; idx++) {
......
......@@ -73,18 +73,18 @@ MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS MAX driver.");
struct snd_gusmax {
int irq;
snd_card_t *card;
snd_gus_card_t *gus;
cs4231_t *cs4231;
struct snd_card *card;
struct snd_gus_card *gus;
struct snd_cs4231 *cs4231;
unsigned short gus_status_reg;
unsigned short pcm_status_reg;
};
static snd_card_t *snd_gusmax_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
static struct snd_card *snd_gusmax_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
#define PFX "gusmax: "
static int __init snd_gusmax_detect(snd_gus_card_t * gus)
static int __init snd_gusmax_detect(struct snd_gus_card * gus)
{
unsigned char d;
......@@ -126,7 +126,7 @@ static irqreturn_t snd_gusmax_interrupt(int irq, void *dev_id, struct pt_regs *r
return IRQ_RETVAL(handled);
}
static void __init snd_gusmax_init(int dev, snd_card_t * card, snd_gus_card_t * gus)
static void __init snd_gusmax_init(int dev, struct snd_card *card, struct snd_gus_card * gus)
{
gus->equal_irq = 1;
gus->codec_flag = 1;
......@@ -144,10 +144,10 @@ static void __init snd_gusmax_init(int dev, snd_card_t * card, snd_gus_card_t *
#define CS4231_PRIVATE( left, right, shift, mute ) \
((left << 24)|(right << 16)|(shift<<8)|mute)
static int __init snd_gusmax_mixer(cs4231_t *chip)
static int __init snd_gusmax_mixer(struct snd_cs4231 *chip)
{
snd_card_t *card = chip->card;
snd_ctl_elem_id_t id1, id2;
struct snd_card *card = chip->card;
struct snd_ctl_elem_id id1, id2;
int err;
memset(&id1, 0, sizeof(id1));
......@@ -193,7 +193,7 @@ static int __init snd_gusmax_mixer(cs4231_t *chip)
return 0;
}
static void snd_gusmax_free(snd_card_t *card)
static void snd_gusmax_free(struct snd_card *card)
{
struct snd_gusmax *maxcard = (struct snd_gusmax *)card->private_data;
......@@ -208,9 +208,9 @@ static int __init snd_gusmax_probe(int dev)
static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
static int possible_dmas[] = {5, 6, 7, 1, 3, -1};
int xirq, xdma1, xdma2, err;
snd_card_t *card;
snd_gus_card_t *gus = NULL;
cs4231_t *cs4231;
struct snd_card *card;
struct snd_gus_card *gus = NULL;
struct snd_cs4231 *cs4231;
struct snd_gusmax *maxcard;
card = snd_card_new(index[dev], id[dev], THIS_MODULE,
......
......@@ -112,9 +112,9 @@ MODULE_PARM_DESC(effect, "Effects enable for InterWave driver.");
struct snd_interwave {
int irq;
snd_card_t *card;
snd_gus_card_t *gus;
cs4231_t *cs4231;
struct snd_card *card;
struct snd_gus_card *gus;
struct snd_cs4231 *cs4231;
#ifdef SNDRV_STB
struct resource *i2c_res;
#endif
......@@ -128,7 +128,7 @@ struct snd_interwave {
#endif
};
static snd_card_t *snd_interwave_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
static struct snd_card *snd_interwave_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
#ifdef CONFIG_PNP
......@@ -160,7 +160,7 @@ MODULE_DEVICE_TABLE(pnp_card, snd_interwave_pnpids);
#ifdef SNDRV_STB
static void snd_interwave_i2c_setlines(snd_i2c_bus_t *bus, int ctrl, int data)
static void snd_interwave_i2c_setlines(struct snd_i2c_bus *bus, int ctrl, int data)
{
unsigned long port = bus->private_value;
......@@ -171,7 +171,7 @@ static void snd_interwave_i2c_setlines(snd_i2c_bus_t *bus, int ctrl, int data)
udelay(10);
}
static int snd_interwave_i2c_getclockline(snd_i2c_bus_t *bus)
static int snd_interwave_i2c_getclockline(struct snd_i2c_bus *bus)
{
unsigned long port = bus->private_value;
unsigned char res;
......@@ -183,7 +183,7 @@ static int snd_interwave_i2c_getclockline(snd_i2c_bus_t *bus)
return res;
}
static int snd_interwave_i2c_getdataline(snd_i2c_bus_t *bus, int ack)
static int snd_interwave_i2c_getdataline(struct snd_i2c_bus *bus, int ack)
{
unsigned long port = bus->private_value;
unsigned char res;
......@@ -197,19 +197,19 @@ static int snd_interwave_i2c_getdataline(snd_i2c_bus_t *bus, int ack)
return res;
}
static snd_i2c_bit_ops_t snd_interwave_i2c_bit_ops = {
static struct snd_i2c_bit_ops snd_interwave_i2c_bit_ops = {
.setlines = snd_interwave_i2c_setlines,
.getclock = snd_interwave_i2c_getclockline,
.getdata = snd_interwave_i2c_getdataline,
};
static int __devinit snd_interwave_detect_stb(struct snd_interwave *iwcard,
snd_gus_card_t * gus, int dev,
snd_i2c_bus_t **rbus)
struct snd_gus_card * gus, int dev,
struct snd_i2c_bus **rbus)
{
unsigned long port;
snd_i2c_bus_t *bus;
snd_card_t *card = iwcard->card;
struct snd_i2c_bus *bus;
struct snd_card *card = iwcard->card;
char name[32];
int err;
......@@ -246,10 +246,10 @@ static int __devinit snd_interwave_detect_stb(struct snd_interwave *iwcard,
#endif
static int __devinit snd_interwave_detect(struct snd_interwave *iwcard,
snd_gus_card_t * gus,
struct snd_gus_card * gus,
int dev
#ifdef SNDRV_STB
, snd_i2c_bus_t **rbus
, struct snd_i2c_bus **rbus
#endif
)
{
......@@ -314,7 +314,7 @@ static irqreturn_t snd_interwave_interrupt(int irq, void *dev_id, struct pt_regs
return IRQ_RETVAL(handled);
}
static void __devinit snd_interwave_reset(snd_gus_card_t * gus)
static void __devinit snd_interwave_reset(struct snd_gus_card * gus)
{
snd_gf1_write8(gus, SNDRV_GF1_GB_RESET, 0x00);
udelay(160);
......@@ -322,7 +322,7 @@ static void __devinit snd_interwave_reset(snd_gus_card_t * gus)
udelay(160);
}
static void __devinit snd_interwave_bank_sizes(snd_gus_card_t * gus, int *sizes)
static void __devinit snd_interwave_bank_sizes(struct snd_gus_card * gus, int *sizes)
{
unsigned int idx;
unsigned int local;
......@@ -371,7 +371,7 @@ struct rom_hdr {
/* 511 */ unsigned char csum;
};
static void __devinit snd_interwave_detect_memory(snd_gus_card_t * gus)
static void __devinit snd_interwave_detect_memory(struct snd_gus_card * gus)
{
static unsigned int lmc[13] =
{
......@@ -470,7 +470,7 @@ static void __devinit snd_interwave_detect_memory(snd_gus_card_t * gus)
snd_interwave_reset(gus);
}
static void __devinit snd_interwave_init(int dev, snd_gus_card_t * gus)
static void __devinit snd_interwave_init(int dev, struct snd_gus_card * gus)
{
unsigned long flags;
......@@ -492,17 +492,17 @@ static void __devinit snd_interwave_init(int dev, snd_gus_card_t * gus)
}
static snd_kcontrol_new_t snd_interwave_controls[] = {
static struct snd_kcontrol_new snd_interwave_controls[] = {
CS4231_DOUBLE("Master Playback Switch", 0, CS4231_LINE_LEFT_OUTPUT, CS4231_LINE_RIGHT_OUTPUT, 7, 7, 1, 1),
CS4231_DOUBLE("Master Playback Volume", 0, CS4231_LINE_LEFT_OUTPUT, CS4231_LINE_RIGHT_OUTPUT, 0, 0, 31, 1),
CS4231_DOUBLE("Mic Playback Switch", 0, CS4231_LEFT_MIC_INPUT, CS4231_RIGHT_MIC_INPUT, 7, 7, 1, 1),
CS4231_DOUBLE("Mic Playback Volume", 0, CS4231_LEFT_MIC_INPUT, CS4231_RIGHT_MIC_INPUT, 0, 0, 31, 1)
};
static int __devinit snd_interwave_mixer(cs4231_t *chip)
static int __devinit snd_interwave_mixer(struct snd_cs4231 *chip)
{
snd_card_t *card = chip->card;
snd_ctl_elem_id_t id1, id2;
struct snd_card *card = chip->card;
struct snd_ctl_elem_id id1, id2;
unsigned int idx;
int err;
......@@ -631,7 +631,7 @@ static int __devinit snd_interwave_pnp(int dev, struct snd_interwave *iwcard,
}
#endif /* CONFIG_PNP */
static void snd_interwave_free(snd_card_t *card)
static void snd_interwave_free(struct snd_card *card)
{
struct snd_interwave *iwcard = (struct snd_interwave *)card->private_data;
......@@ -650,14 +650,14 @@ static int __devinit snd_interwave_probe(int dev, struct pnp_card_link *pcard,
static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
static int possible_dmas[] = {0, 1, 3, 5, 6, 7, -1};
int xirq, xdma1, xdma2;
snd_card_t *card;
struct snd_card *card;
struct snd_interwave *iwcard;
cs4231_t *cs4231;
snd_gus_card_t *gus;
struct snd_cs4231 *cs4231;
struct snd_gus_card *gus;
#ifdef SNDRV_STB
snd_i2c_bus_t *i2c_bus;
struct snd_i2c_bus *i2c_bus;
#endif
snd_pcm_t *pcm;
struct snd_pcm *pcm;
char *str;
int err;
......@@ -761,7 +761,7 @@ static int __devinit snd_interwave_probe(int dev, struct pnp_card_link *pcard,
#ifdef SNDRV_STB
{
snd_ctl_elem_id_t id1, id2;
struct snd_ctl_elem_id id1, id2;
memset(&id1, 0, sizeof(id1));
memset(&id2, 0, sizeof(id2));
id1.iface = id2.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
......@@ -863,7 +863,7 @@ static int __devinit snd_interwave_pnp_detect(struct pnp_card_link *card,
static void __devexit snd_interwave_pnp_remove(struct pnp_card_link * pcard)
{
snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard);
struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
snd_card_disconnect(card);
snd_card_free_in_thread(card);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment