summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sound/gus.h317
-rw-r--r--sound/isa/gus/gus_dma.c24
-rw-r--r--sound/isa/gus/gus_dram.c8
-rw-r--r--sound/isa/gus/gus_instr.c42
-rw-r--r--sound/isa/gus/gus_io.c72
-rw-r--r--sound/isa/gus/gus_irq.c16
-rw-r--r--sound/isa/gus/gus_main.c54
-rw-r--r--sound/isa/gus/gus_mem.c64
-rw-r--r--sound/isa/gus/gus_mem_proc.c26
-rw-r--r--sound/isa/gus/gus_mixer.c28
-rw-r--r--sound/isa/gus/gus_pcm.c194
-rw-r--r--sound/isa/gus/gus_reset.c54
-rw-r--r--sound/isa/gus/gus_sample.c42
-rw-r--r--sound/isa/gus/gus_simple.c86
-rw-r--r--sound/isa/gus/gus_synth.c70
-rw-r--r--sound/isa/gus/gus_timer.c44
-rw-r--r--sound/isa/gus/gus_uart.c38
-rw-r--r--sound/isa/gus/gus_volume.c4
-rw-r--r--sound/isa/gus/gusclassic.c10
-rw-r--r--sound/isa/gus/gusextreme.c26
-rw-r--r--sound/isa/gus/gusmax.c26
-rw-r--r--sound/isa/gus/interwave.c60
22 files changed, 658 insertions, 647 deletions
diff --git a/include/sound/gus.h b/include/sound/gus.h
index bb12e9fab8a7..63da50fae773 100644
--- a/include/sound/gus.h
+++ b/include/sound/gus.h
@@ -183,17 +183,16 @@
/* --- */
-struct _snd_gus_card;
-typedef struct _snd_gus_card snd_gus_card_t;
+struct snd_gus_card;
/* GF1 specific structure */
-typedef struct _snd_gf1_bank_info {
+struct snd_gf1_bank_info {
unsigned int address;
unsigned int size;
-} snd_gf1_bank_info_t;
+};
-typedef struct _snd_gf1_mem_block {
+struct snd_gf1_mem_block {
unsigned short flags; /* flags - SNDRV_GF1_MEM_BLOCK_XXXX */
unsigned short owner; /* owner - SNDRV_GF1_MEM_OWNER_XXXX */
unsigned int share; /* share count */
@@ -201,68 +200,68 @@ typedef struct _snd_gf1_mem_block {
unsigned int ptr;
unsigned int size;
char *name;
- struct _snd_gf1_mem_block *next;
- struct _snd_gf1_mem_block *prev;
-} snd_gf1_mem_block_t;
-
-typedef struct _snd_gf1_mem {
- snd_gf1_bank_info_t banks_8[4];
- snd_gf1_bank_info_t banks_16[4];
- snd_gf1_mem_block_t *first;
- snd_gf1_mem_block_t *last;
+ struct snd_gf1_mem_block *next;
+ struct snd_gf1_mem_block *prev;
+};
+
+struct snd_gf1_mem {
+ struct snd_gf1_bank_info banks_8[4];
+ struct snd_gf1_bank_info banks_16[4];
+ struct snd_gf1_mem_block *first;
+ struct snd_gf1_mem_block *last;
struct semaphore memory_mutex;
-} snd_gf1_mem_t;
+};
-typedef struct snd_gf1_dma_block {
+struct snd_gf1_dma_block {
void *buffer; /* buffer in computer's RAM */
unsigned long buf_addr; /* buffer address */
unsigned int addr; /* address in onboard memory */
unsigned int count; /* count in bytes */
unsigned int cmd; /* DMA command (format) */
- void (*ack)(snd_gus_card_t * gus, void *private_data);
+ void (*ack)(struct snd_gus_card * gus, void *private_data);
void *private_data;
struct snd_gf1_dma_block *next;
-} snd_gf1_dma_block_t;
+};
-typedef struct {
- snd_midi_channel_set_t * chset;
- snd_gus_card_t * gus;
+struct snd_gus_port {
+ struct snd_midi_channel_set * chset;
+ struct snd_gus_card * gus;
int mode; /* operation mode */
int client; /* sequencer client number */
int port; /* sequencer port number */
unsigned int midi_has_voices: 1;
-} snd_gus_port_t;
+};
-typedef struct _snd_gus_voice snd_gus_voice_t;
+struct snd_gus_voice;
-typedef struct {
- void (*sample_start)(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_position_t position);
- void (*sample_stop)(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_stop_mode_t mode);
- void (*sample_freq)(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_frequency_t freq);
- void (*sample_volume)(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_ev_volume_t *volume);
- void (*sample_loop)(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_ev_loop_t *loop);
- void (*sample_pos)(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_position_t position);
- void (*sample_private1)(snd_gus_card_t *card, snd_gus_voice_t *voice, unsigned char *data);
-} snd_gus_sample_ops_t;
+struct snd_gus_sample_ops {
+ void (*sample_start)(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_position_t position);
+ void (*sample_stop)(struct snd_gus_card *gus, struct snd_gus_voice *voice, int mode);
+ void (*sample_freq)(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_frequency_t freq);
+ void (*sample_volume)(struct snd_gus_card *gus, struct snd_gus_voice *voice, struct snd_seq_ev_volume *volume);
+ void (*sample_loop)(struct snd_gus_card *card, struct snd_gus_voice *voice, struct snd_seq_ev_loop *loop);
+ void (*sample_pos)(struct snd_gus_card *card, struct snd_gus_voice *voice, snd_seq_position_t position);
+ void (*sample_private1)(struct snd_gus_card *card, struct snd_gus_voice *voice, unsigned char *data);
+};
-#define SNDRV_GF1_VOICE_TYPE_PCM 0
+#define SNDRV_GF1_VOICE_TYPE_PCM 0
#define SNDRV_GF1_VOICE_TYPE_SYNTH 1
-#define SNDRV_GF1_VOICE_TYPE_MIDI 2
+#define SNDRV_GF1_VOICE_TYPE_MIDI 2
#define SNDRV_GF1_VFLG_RUNNING (1<<0)
#define SNDRV_GF1_VFLG_EFFECT_TIMER1 (1<<1)
#define SNDRV_GF1_VFLG_PAN (1<<2)
-typedef enum {
+enum snd_gus_volume_state {
VENV_BEFORE,
VENV_ATTACK,
VENV_SUSTAIN,
VENV_RELEASE,
VENV_DONE,
VENV_VOLUME
-} snd_gus_volume_state_t;
+};
-struct _snd_gus_voice {
+struct snd_gus_voice {
int number;
unsigned int use: 1,
pcm: 1,
@@ -278,18 +277,18 @@ struct _snd_gus_voice {
unsigned int interrupt_stat_wave;
unsigned int interrupt_stat_volume;
#endif
- void (*handler_wave) (snd_gus_card_t * gus, snd_gus_voice_t * voice);
- void (*handler_volume) (snd_gus_card_t * gus, snd_gus_voice_t * voice);
- void (*handler_effect) (snd_gus_card_t * gus, snd_gus_voice_t * voice);
- void (*volume_change) (snd_gus_card_t * gus);
+ void (*handler_wave) (struct snd_gus_card * gus, struct snd_gus_voice * voice);
+ void (*handler_volume) (struct snd_gus_card * gus, struct snd_gus_voice * voice);
+ void (*handler_effect) (struct snd_gus_card * gus, struct snd_gus_voice * voice);
+ void (*volume_change) (struct snd_gus_card * gus);
- snd_gus_sample_ops_t *sample_ops;
+ struct snd_gus_sample_ops *sample_ops;
- snd_seq_instr_t instr;
+ struct snd_seq_instr instr;
/* running status / registers */
- snd_seq_ev_volume_t sample_volume;
+ struct snd_seq_ev_volume sample_volume;
unsigned short fc_register;
unsigned short fc_lfo;
@@ -300,8 +299,8 @@ struct _snd_gus_voice {
unsigned char effect_accumulator;
unsigned char volume_control;
unsigned char venv_value_next;
- snd_gus_volume_state_t venv_state;
- snd_gus_volume_state_t venv_state_prev;
+ enum snd_gus_volume_state venv_state;
+ enum snd_gus_volume_state venv_state_prev;
unsigned short vlo;
unsigned short vro;
unsigned short gf1_effect_volume;
@@ -309,10 +308,10 @@ struct _snd_gus_voice {
/* --- */
void *private_data;
- void (*private_free)(snd_gus_voice_t *voice);
+ void (*private_free)(struct snd_gus_voice *voice);
};
-struct _snd_gf1 {
+struct snd_gf1 {
unsigned int enh_mode:1, /* enhanced mode (GFA1) */
hw_lfo:1, /* use hardware LFO */
@@ -330,7 +329,7 @@ struct _snd_gf1 {
unsigned int rom_present; /* bitmask */
unsigned int rom_banks; /* GUS's ROM banks */
- snd_gf1_mem_t mem_alloc;
+ struct snd_gf1_mem mem_alloc;
/* registers */
unsigned short reg_page;
@@ -347,7 +346,7 @@ struct _snd_gf1 {
unsigned char active_voices; /* active voices */
unsigned char active_voice; /* selected voice (GF1PAGE register) */
- snd_gus_voice_t voices[32]; /* GF1 voices */
+ struct snd_gus_voice voices[32]; /* GF1 voices */
unsigned int default_voice_address;
@@ -362,12 +361,12 @@ struct _snd_gf1 {
/* interrupt handlers */
- void (*interrupt_handler_midi_out) (snd_gus_card_t * gus);
- void (*interrupt_handler_midi_in) (snd_gus_card_t * gus);
- void (*interrupt_handler_timer1) (snd_gus_card_t * gus);
- void (*interrupt_handler_timer2) (snd_gus_card_t * gus);
- void (*interrupt_handler_dma_write) (snd_gus_card_t * gus);
- void (*interrupt_handler_dma_read) (snd_gus_card_t * gus);
+ void (*interrupt_handler_midi_out) (struct snd_gus_card * gus);
+ void (*interrupt_handler_midi_in) (struct snd_gus_card * gus);
+ void (*interrupt_handler_timer1) (struct snd_gus_card * gus);
+ void (*interrupt_handler_timer2) (struct snd_gus_card * gus);
+ void (*interrupt_handler_dma_write) (struct snd_gus_card * gus);
+ void (*interrupt_handler_dma_read) (struct snd_gus_card * gus);
#ifdef CONFIG_SND_DEBUG
unsigned int interrupt_stat_midi_out;
@@ -382,17 +381,17 @@ struct _snd_gf1 {
/* synthesizer */
int seq_client;
- snd_gus_port_t seq_ports[4];
- snd_seq_kinstr_list_t *ilist;
- snd_iwffff_ops_t iwffff_ops;
- snd_gf1_ops_t gf1_ops;
- snd_simple_ops_t simple_ops;
+ struct snd_gus_port seq_ports[4];
+ struct snd_seq_kinstr_list *ilist;
+ struct snd_iwffff_ops iwffff_ops;
+ struct snd_gf1_ops gf1_ops;
+ struct snd_simple_ops simple_ops;
/* timer */
unsigned short timer_enabled;
- snd_timer_t *timer1;
- snd_timer_t *timer2;
+ struct snd_timer *timer1;
+ struct snd_timer *timer2;
/* midi */
@@ -404,11 +403,11 @@ struct _snd_gf1 {
unsigned int dma_flags;
unsigned int dma_shared;
- snd_gf1_dma_block_t *dma_data_pcm;
- snd_gf1_dma_block_t *dma_data_pcm_last;
- snd_gf1_dma_block_t *dma_data_synth;
- snd_gf1_dma_block_t *dma_data_synth_last;
- void (*dma_ack)(snd_gus_card_t * gus, void *private_data);
+ struct snd_gf1_dma_block *dma_data_pcm;
+ struct snd_gf1_dma_block *dma_data_pcm_last;
+ struct snd_gf1_dma_block *dma_data_synth;
+ struct snd_gf1_dma_block *dma_data_synth_last;
+ void (*dma_ack)(struct snd_gus_card * gus, void *private_data);
void *dma_private_data;
/* pcm */
@@ -425,8 +424,8 @@ struct _snd_gf1 {
/* main structure for GUS card */
-struct _snd_gus_card {
- snd_card_t *card;
+struct snd_gus_card {
+ struct snd_card *card;
unsigned int
initialized: 1, /* resources were initialized */
@@ -448,18 +447,18 @@ struct _snd_gus_card {
unsigned short joystick_dac; /* joystick DAC level */
int timer_dev; /* timer device */
- struct _snd_gf1 gf1; /* gf1 specific variables */
- snd_pcm_t *pcm;
- snd_pcm_substream_t *pcm_cap_substream;
+ struct snd_gf1 gf1; /* gf1 specific variables */
+ struct snd_pcm *pcm;
+ struct snd_pcm_substream *pcm_cap_substream;
unsigned int c_dma_size;
unsigned int c_period_size;
unsigned int c_pos;
- snd_rawmidi_t *midi_uart;
- snd_rawmidi_substream_t *midi_substream_output;
- snd_rawmidi_substream_t *midi_substream_input;
+ struct snd_rawmidi *midi_uart;
+ struct snd_rawmidi_substream *midi_substream_output;
+ struct snd_rawmidi_substream *midi_substream_input;
- snd_seq_device_t *seq_dev;
+ struct snd_seq_device *seq_dev;
spinlock_t reg_lock;
spinlock_t voice_alloc;
@@ -474,7 +473,7 @@ struct _snd_gus_card {
/* I/O functions for GF1/InterWave chip - gus_io.c */
-static inline void snd_gf1_select_voice(snd_gus_card_t * gus, int voice)
+static inline void snd_gf1_select_voice(struct snd_gus_card * gus, int voice)
{
unsigned long flags;
@@ -486,63 +485,63 @@ static inline void snd_gf1_select_voice(snd_gus_card_t * gus, int voice)
spin_unlock_irqrestore(&gus->active_voice_lock, flags);
}
-static inline void snd_gf1_uart_cmd(snd_gus_card_t * gus, unsigned char b)
+static inline void snd_gf1_uart_cmd(struct snd_gus_card * gus, unsigned char b)
{
outb(gus->gf1.uart_cmd = b, GUSP(gus, MIDICTRL));
}
-static inline unsigned char snd_gf1_uart_stat(snd_gus_card_t * gus)
+static inline unsigned char snd_gf1_uart_stat(struct snd_gus_card * gus)
{
return inb(GUSP(gus, MIDISTAT));
}
-static inline void snd_gf1_uart_put(snd_gus_card_t * gus, unsigned char b)
+static inline void snd_gf1_uart_put(struct snd_gus_card * gus, unsigned char b)
{
outb(b, GUSP(gus, MIDIDATA));
}
-static inline unsigned char snd_gf1_uart_get(snd_gus_card_t * gus)
+static inline unsigned char snd_gf1_uart_get(struct snd_gus_card * gus)
{
return inb(GUSP(gus, MIDIDATA));
}
-extern void snd_gf1_delay(snd_gus_card_t * gus);
+extern void snd_gf1_delay(struct snd_gus_card * gus);
-extern void snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg);
+extern void snd_gf1_ctrl_stop(struct snd_gus_card * gus, unsigned char reg);
-extern void snd_gf1_write8(snd_gus_card_t * gus, unsigned char reg, unsigned char data);
-extern unsigned char snd_gf1_look8(snd_gus_card_t * gus, unsigned char reg);
-static inline unsigned char snd_gf1_read8(snd_gus_card_t * gus, unsigned char reg)
+extern void snd_gf1_write8(struct snd_gus_card * gus, unsigned char reg, unsigned char data);
+extern unsigned char snd_gf1_look8(struct snd_gus_card * gus, unsigned char reg);
+static inline unsigned char snd_gf1_read8(struct snd_gus_card * gus, unsigned char reg)
{
return snd_gf1_look8(gus, reg | 0x80);
}
-extern void snd_gf1_write16(snd_gus_card_t * gus, unsigned char reg, unsigned int data);
-extern unsigned short snd_gf1_look16(snd_gus_card_t * gus, unsigned char reg);
-static inline unsigned short snd_gf1_read16(snd_gus_card_t * gus, unsigned char reg)
+extern void snd_gf1_write16(struct snd_gus_card * gus, unsigned char reg, unsigned int data);
+extern unsigned short snd_gf1_look16(struct snd_gus_card * gus, unsigned char reg);
+static inline unsigned short snd_gf1_read16(struct snd_gus_card * gus, unsigned char reg)
{
return snd_gf1_look16(gus, reg | 0x80);
}
-extern void snd_gf1_adlib_write(snd_gus_card_t * gus, unsigned char reg, unsigned char data);
-extern void snd_gf1_dram_addr(snd_gus_card_t * gus, unsigned int addr);
-extern void snd_gf1_poke(snd_gus_card_t * gus, unsigned int addr, unsigned char data);
-extern unsigned char snd_gf1_peek(snd_gus_card_t * gus, unsigned int addr);
-extern void snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg, unsigned int addr, short w_16bit);
-extern unsigned int snd_gf1_read_addr(snd_gus_card_t * gus, unsigned char reg, short w_16bit);
-extern void snd_gf1_i_ctrl_stop(snd_gus_card_t * gus, unsigned char reg);
-extern void snd_gf1_i_write8(snd_gus_card_t * gus, unsigned char reg, unsigned char data);
-extern unsigned char snd_gf1_i_look8(snd_gus_card_t * gus, unsigned char reg);
-extern void snd_gf1_i_write16(snd_gus_card_t * gus, unsigned char reg, unsigned int data);
-static inline unsigned char snd_gf1_i_read8(snd_gus_card_t * gus, unsigned char reg)
+extern void snd_gf1_adlib_write(struct snd_gus_card * gus, unsigned char reg, unsigned char data);
+extern void snd_gf1_dram_addr(struct snd_gus_card * gus, unsigned int addr);
+extern void snd_gf1_poke(struct snd_gus_card * gus, unsigned int addr, unsigned char data);
+extern unsigned char snd_gf1_peek(struct snd_gus_card * gus, unsigned int addr);
+extern void snd_gf1_write_addr(struct snd_gus_card * gus, unsigned char reg, unsigned int addr, short w_16bit);
+extern unsigned int snd_gf1_read_addr(struct snd_gus_card * gus, unsigned char reg, short w_16bit);
+extern void snd_gf1_i_ctrl_stop(struct snd_gus_card * gus, unsigned char reg);
+extern void snd_gf1_i_write8(struct snd_gus_card * gus, unsigned char reg, unsigned char data);
+extern unsigned char snd_gf1_i_look8(struct snd_gus_card * gus, unsigned char reg);
+extern void snd_gf1_i_write16(struct snd_gus_card * gus, unsigned char reg, unsigned int data);
+static inline unsigned char snd_gf1_i_read8(struct snd_gus_card * gus, unsigned char reg)
{
return snd_gf1_i_look8(gus, reg | 0x80);
}
-extern unsigned short snd_gf1_i_look16(snd_gus_card_t * gus, unsigned char reg);
-static inline unsigned short snd_gf1_i_read16(snd_gus_card_t * gus, unsigned char reg)
+extern unsigned short snd_gf1_i_look16(struct snd_gus_card * gus, unsigned char reg);
+static inline unsigned short snd_gf1_i_read16(struct snd_gus_card * gus, unsigned char reg)
{
return snd_gf1_i_look16(gus, reg | 0x80);
}
-extern void snd_gf1_select_active_voices(snd_gus_card_t * gus);
+extern void snd_gf1_select_active_voices(struct snd_gus_card * gus);
/* gus_lfo.c */
@@ -555,98 +554,98 @@ struct _SND_IW_LFO_PROGRAM {
};
#if 0
-extern irqreturn_t snd_gf1_lfo_effect_interrupt(snd_gus_card_t * gus, snd_gf1_voice_t * voice);
+extern irqreturn_t snd_gf1_lfo_effect_interrupt(struct snd_gus_card * gus, snd_gf1_voice_t * voice);
#endif
-extern void snd_gf1_lfo_init(snd_gus_card_t * gus);
-extern void snd_gf1_lfo_done(snd_gus_card_t * gus);
-extern void snd_gf1_lfo_program(snd_gus_card_t * gus, int voice, int lfo_type, struct _SND_IW_LFO_PROGRAM *program);
-extern void snd_gf1_lfo_enable(snd_gus_card_t * gus, int voice, int lfo_type);
-extern void snd_gf1_lfo_disable(snd_gus_card_t * gus, int voice, int lfo_type);
-extern void snd_gf1_lfo_change_freq(snd_gus_card_t * gus, int voice, int lfo_type, int freq);
-extern void snd_gf1_lfo_change_depth(snd_gus_card_t * gus, int voice, int lfo_type, int depth);
-extern void snd_gf1_lfo_setup(snd_gus_card_t * gus, int voice, int lfo_type, int freq, int current_depth, int depth, int sweep, int shape);
-extern void snd_gf1_lfo_shutdown(snd_gus_card_t * gus, int voice, int lfo_type);
+extern void snd_gf1_lfo_init(struct snd_gus_card * gus);
+extern void snd_gf1_lfo_done(struct snd_gus_card * gus);
+extern void snd_gf1_lfo_program(struct snd_gus_card * gus, int voice, int lfo_type, struct _SND_IW_LFO_PROGRAM *program);
+extern void snd_gf1_lfo_enable(struct snd_gus_card * gus, int voice, int lfo_type);
+extern void snd_gf1_lfo_disable(struct snd_gus_card * gus, int voice, int lfo_type);
+extern void snd_gf1_lfo_change_freq(struct snd_gus_card * gus, int voice, int lfo_type, int freq);
+extern void snd_gf1_lfo_change_depth(struct snd_gus_card * gus, int voice, int lfo_type, int depth);
+extern void snd_gf1_lfo_setup(struct snd_gus_card * gus, int voice, int lfo_type, int freq, int current_depth, int depth, int sweep, int shape);
+extern void snd_gf1_lfo_shutdown(struct snd_gus_card * gus, int voice, int lfo_type);
#if 0
-extern void snd_gf1_lfo_command(snd_gus_card_t * gus, int voice, unsigned char *command);
+extern void snd_gf1_lfo_command(struct snd_gus_card * gus, int voice, unsigned char *command);
#endif
/* gus_mem.c */
-void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup);
-int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block);
-snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner,
+void snd_gf1_mem_lock(struct snd_gf1_mem * alloc, int xup);
+int snd_gf1_mem_xfree(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * block);
+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);
-int snd_gf1_mem_free(snd_gf1_mem_t * alloc, unsigned int address);
-int snd_gf1_mem_free_owner(snd_gf1_mem_t * alloc, int owner);
-int snd_gf1_mem_init(snd_gus_card_t * gus);
-int snd_gf1_mem_done(snd_gus_card_t * gus);
+int snd_gf1_mem_free(struct snd_gf1_mem * alloc, unsigned int address);
+int snd_gf1_mem_free_owner(struct snd_gf1_mem * alloc, int owner);
+int snd_gf1_mem_init(struct snd_gus_card * gus);
+int snd_gf1_mem_done(struct snd_gus_card * gus);
/* gus_mem_proc.c */
-int snd_gf1_mem_proc_init(snd_gus_card_t * gus);
+int snd_gf1_mem_proc_init(struct snd_gus_card * gus);
/* gus_dma.c */
-int snd_gf1_dma_init(snd_gus_card_t * gus);
-int snd_gf1_dma_done(snd_gus_card_t * gus);
-int snd_gf1_dma_transfer_block(snd_gus_card_t * gus,
- snd_gf1_dma_block_t * block,
+int snd_gf1_dma_init(struct snd_gus_card * gus);
+int snd_gf1_dma_done(struct snd_gus_card * gus);
+int snd_gf1_dma_transfer_block(struct snd_gus_card * gus,
+ struct snd_gf1_dma_block * block,
int atomic,
int synth);
/* gus_volume.c */
unsigned short snd_gf1_lvol_to_gvol_raw(unsigned int vol);
-unsigned short snd_gf1_translate_freq(snd_gus_card_t * gus, unsigned int freq2);
+unsigned short snd_gf1_translate_freq(struct snd_gus_card * gus, unsigned int freq2);
/* gus_reset.c */
-void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what);
-void snd_gf1_smart_stop_voice(snd_gus_card_t * gus, unsigned short voice);
-void snd_gf1_stop_voice(snd_gus_card_t * gus, unsigned short voice);
-void snd_gf1_stop_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned short v_max);
-snd_gus_voice_t *snd_gf1_alloc_voice(snd_gus_card_t * gus, int type, int client, int port);
-void snd_gf1_free_voice(snd_gus_card_t * gus, snd_gus_voice_t *voice);
-int snd_gf1_start(snd_gus_card_t * gus);
-int snd_gf1_stop(snd_gus_card_t * gus);
+void snd_gf1_set_default_handlers(struct snd_gus_card * gus, unsigned int what);
+void snd_gf1_smart_stop_voice(struct snd_gus_card * gus, unsigned short voice);
+void snd_gf1_stop_voice(struct snd_gus_card * gus, unsigned short voice);
+void snd_gf1_stop_voices(struct snd_gus_card * gus, unsigned short v_min, unsigned short v_max);
+struct snd_gus_voice *snd_gf1_alloc_voice(struct snd_gus_card * gus, int type, int client, int port);
+void snd_gf1_free_voice(struct snd_gus_card * gus, struct snd_gus_voice *voice);
+int snd_gf1_start(struct snd_gus_card * gus);
+int snd_gf1_stop(struct snd_gus_card * gus);
/* gus_mixer.c */
-int snd_gf1_new_mixer(snd_gus_card_t * gus);
+int snd_gf1_new_mixer(struct snd_gus_card * gus);
/* gus_pcm.c */
-int snd_gf1_pcm_new(snd_gus_card_t * gus, int pcm_dev, int control_index, snd_pcm_t ** rpcm);
+int snd_gf1_pcm_new(struct snd_gus_card * gus, int pcm_dev, int control_index, struct snd_pcm ** rpcm);
#ifdef CONFIG_SND_DEBUG
-extern void snd_gf1_print_voice_registers(snd_gus_card_t * gus);
+extern void snd_gf1_print_voice_registers(struct snd_gus_card * gus);
#endif
/* gus.c */
-int snd_gus_use_inc(snd_gus_card_t * gus);
-void snd_gus_use_dec(snd_gus_card_t * gus);
-int snd_gus_create(snd_card_t * card,
+int snd_gus_use_inc(struct snd_gus_card * gus);
+void snd_gus_use_dec(struct snd_gus_card * gus);
+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);
-int snd_gus_initialize(snd_gus_card_t * gus);
+ struct snd_gus_card ** rgus);
+int snd_gus_initialize(struct snd_gus_card * gus);
/* gus_irq.c */
irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs);
#ifdef CONFIG_SND_DEBUG
-void snd_gus_irq_profile_init(snd_gus_card_t *gus);
+void snd_gus_irq_profile_init(struct snd_gus_card *gus);
#endif
/* gus_uart.c */
-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);
#if 0
extern void snd_engine_instrument_register(unsigned short mode,
@@ -657,37 +656,37 @@ extern int snd_engine_instrument_register_ask(unsigned short mode);
#endif
/* gus_dram.c */
-int snd_gus_dram_write(snd_gus_card_t *gus, char __user *ptr,
+int snd_gus_dram_write(struct snd_gus_card *gus, char __user *ptr,
unsigned int addr, unsigned int size);
-int snd_gus_dram_read(snd_gus_card_t *gus, char __user *ptr,
+int snd_gus_dram_read(struct snd_gus_card *gus, char __user *ptr,
unsigned int addr, unsigned int size, int rom);
#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
/* gus_sample.c */
-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);
/* gus_simple.c */
-void snd_gf1_simple_init(snd_gus_voice_t *voice);
+void snd_gf1_simple_init(struct snd_gus_voice *voice);
/* gus_instr.c */
-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);
-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);
-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);
-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);
-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);
-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);
-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);
-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);
-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);
#endif /* CONFIG_SND_SEQUENCER */
diff --git a/sound/isa/gus/gus_dma.c b/sound/isa/gus/gus_dma.c
index ef1b2e9832e4..930f4bc56f34 100644
--- a/sound/isa/gus/gus_dma.c
+++ b/sound/isa/gus/gus_dma.c
@@ -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) {
diff --git a/sound/isa/gus/gus_dram.c b/sound/isa/gus/gus_dram.c
index 22120b868b5c..f22fe7967fcc 100644
--- a/sound/isa/gus/gus_dram.c
+++ b/sound/isa/gus/gus_dram.c
@@ -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)
{
diff --git a/sound/isa/gus/gus_instr.c b/sound/isa/gus/gus_instr.c
index 591a9a17feb5..d0c38e1856ef 100644
--- a/sound/isa/gus/gus_instr.c
+++ b/sound/isa/gus/gus_instr.c
@@ -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);
}
diff --git a/sound/isa/gus/gus_io.c b/sound/isa/gus/gus_io.c
index 8d5752b23787..9b1fe292de4d 100644
--- a/sound/isa/gus/gus_io.c
+++ b/sound/isa/gus/gus_io.c
@@ -25,7 +25,7 @@
#include <sound/core.h>
#include <sound/gus.h>
-void snd_gf1_delay(snd_gus_card_t * gus)
+void snd_gf1_delay(struct snd_gus_card * gus)
{
int i;
@@ -44,7 +44,7 @@ void snd_gf1_delay(snd_gus_card_t * gus)
* big UltraClick (tm) elimination...
*/
-static inline void __snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg)
+static inline void __snd_gf1_ctrl_stop(struct snd_gus_card * gus, unsigned char reg)
{
unsigned char value;
@@ -58,7 +58,7 @@ static inline void __snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg)
mb();
}
-static inline void __snd_gf1_write8(snd_gus_card_t * gus,
+static inline void __snd_gf1_write8(struct snd_gus_card * gus,
unsigned char reg,
unsigned char data)
{
@@ -68,7 +68,7 @@ static inline void __snd_gf1_write8(snd_gus_card_t * gus,
mb();
}
-static inline unsigned char __snd_gf1_look8(snd_gus_card_t * gus,
+static inline unsigned char __snd_gf1_look8(struct snd_gus_card * gus,
unsigned char reg)
{
outb(reg, gus->gf1.reg_regsel);
@@ -76,7 +76,7 @@ static inline unsigned char __snd_gf1_look8(snd_gus_card_t * gus,
return inb(gus->gf1.reg_data8);
}
-static inline void __snd_gf1_write16(snd_gus_card_t * gus,
+static inline void __snd_gf1_write16(struct snd_gus_card * gus,
unsigned char reg, unsigned int data)
{
outb(reg, gus->gf1.reg_regsel);
@@ -85,7 +85,7 @@ static inline void __snd_gf1_write16(snd_gus_card_t * gus,
mb();
}
-static inline unsigned short __snd_gf1_look16(snd_gus_card_t * gus,
+static inline unsigned short __snd_gf1_look16(struct snd_gus_card * gus,
unsigned char reg)
{
outb(reg, gus->gf1.reg_regsel);
@@ -93,7 +93,7 @@ static inline unsigned short __snd_gf1_look16(snd_gus_card_t * gus,
return inw(gus->gf1.reg_data16);
}
-static inline void __snd_gf1_adlib_write(snd_gus_card_t * gus,
+static inline void __snd_gf1_adlib_write(struct snd_gus_card * gus,
unsigned char reg, unsigned char data)
{
outb(reg, gus->gf1.reg_timerctrl);
@@ -104,7 +104,7 @@ static inline void __snd_gf1_adlib_write(snd_gus_card_t * gus,
inb(gus->gf1.reg_timerctrl);
}
-static inline void __snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg,
+static inline void __snd_gf1_write_addr(struct snd_gus_card * gus, unsigned char reg,
unsigned int addr, int w_16bit)
{
if (gus->gf1.enh_mode) {
@@ -117,7 +117,7 @@ static inline void __snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg,
__snd_gf1_write16(gus, reg + 1, (unsigned short) (addr << 5));
}
-static inline unsigned int __snd_gf1_read_addr(snd_gus_card_t * gus,
+static inline unsigned int __snd_gf1_read_addr(struct snd_gus_card * gus,
unsigned char reg, short w_16bit)
{
unsigned int res;
@@ -138,49 +138,49 @@ static inline unsigned int __snd_gf1_read_addr(snd_gus_card_t * gus,
* =======================================================================
*/
-void snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg)
+void snd_gf1_ctrl_stop(struct snd_gus_card * gus, unsigned char reg)
{
__snd_gf1_ctrl_stop(gus, reg);
}
-void snd_gf1_write8(snd_gus_card_t * gus,
+void snd_gf1_write8(struct snd_gus_card * gus,
unsigned char reg,
unsigned char data)
{
__snd_gf1_write8(gus, reg, data);
}
-unsigned char snd_gf1_look8(snd_gus_card_t * gus, unsigned char reg)
+unsigned char snd_gf1_look8(struct snd_gus_card * gus, unsigned char reg)
{
return __snd_gf1_look8(gus, reg);
}
-void snd_gf1_write16(snd_gus_card_t * gus,
+void snd_gf1_write16(struct snd_gus_card * gus,
unsigned char reg,
unsigned int data)
{
__snd_gf1_write16(gus, reg, data);
}
-unsigned short snd_gf1_look16(snd_gus_card_t * gus, unsigned char reg)
+unsigned short snd_gf1_look16(struct snd_gus_card * gus, unsigned char reg)
{
return __snd_gf1_look16(gus, reg);
}
-void snd_gf1_adlib_write(snd_gus_card_t * gus,
+void snd_gf1_adlib_write(struct snd_gus_card * gus,
unsigned char reg,
unsigned char data)
{
__snd_gf1_adlib_write(gus, reg, data);
}
-void snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg,
+void snd_gf1_write_addr(struct snd_gus_card * gus, unsigned char reg,
unsigned int addr, short w_16bit)
{
__snd_gf1_write_addr(gus, reg, addr, w_16bit);
}
-unsigned int snd_gf1_read_addr(snd_gus_card_t * gus,
+unsigned int snd_gf1_read_addr(struct snd_gus_card * gus,
unsigned char reg,
short w_16bit)
{
@@ -191,7 +191,7 @@ unsigned int snd_gf1_read_addr(snd_gus_card_t * gus,
*/
-void snd_gf1_i_ctrl_stop(snd_gus_card_t * gus, unsigned char reg)
+void snd_gf1_i_ctrl_stop(struct snd_gus_card * gus, unsigned char reg)
{
unsigned long flags;
@@ -200,7 +200,7 @@ void snd_gf1_i_ctrl_stop(snd_gus_card_t * gus, unsigned char reg)
spin_unlock_irqrestore(&gus->reg_lock, flags);
}
-void snd_gf1_i_write8(snd_gus_card_t * gus,
+void snd_gf1_i_write8(struct snd_gus_card * gus,
unsigned char reg,
unsigned char data)
{
@@ -211,7 +211,7 @@ void snd_gf1_i_write8(snd_gus_card_t * gus,
spin_unlock_irqrestore(&gus->reg_lock, flags);
}
-unsigned char snd_gf1_i_look8(snd_gus_card_t * gus, unsigned char reg)
+unsigned char snd_gf1_i_look8(struct snd_gus_card * gus, unsigned char reg)
{
unsigned long flags;
unsigned char res;
@@ -222,7 +222,7 @@ unsigned char snd_gf1_i_look8(snd_gus_card_t * gus, unsigned char reg)
return res;
}
-void snd_gf1_i_write16(snd_gus_card_t * gus,
+void snd_gf1_i_write16(struct snd_gus_card * gus,
unsigned char reg,
unsigned int data)
{
@@ -233,7 +233,7 @@ void snd_gf1_i_write16(snd_gus_card_t * gus,
spin_unlock_irqrestore(&gus->reg_lock, flags);
}
-unsigned short snd_gf1_i_look16(snd_gus_card_t * gus, unsigned char reg)
+unsigned short snd_gf1_i_look16(struct snd_gus_card * gus, unsigned char reg)
{
unsigned long flags;
unsigned short res;
@@ -246,7 +246,7 @@ unsigned short snd_gf1_i_look16(snd_gus_card_t * gus, unsigned char reg)
#if 0
-void snd_gf1_i_adlib_write(snd_gus_card_t * gus,
+void snd_gf1_i_adlib_write(struct snd_gus_card * gus,
unsigned char reg,
unsigned char data)
{
@@ -257,7 +257,7 @@ void snd_gf1_i_adlib_write(snd_gus_card_t * gus,
spin_unlock_irqrestore(&gus->reg_lock, flags);
}
-void snd_gf1_i_write_addr(snd_gus_card_t * gus, unsigned char reg,
+void snd_gf1_i_write_addr(struct snd_gus_card * gus, unsigned char reg,
unsigned int addr, short w_16bit)
{
unsigned long flags;
@@ -270,7 +270,7 @@ void snd_gf1_i_write_addr(snd_gus_card_t * gus, unsigned char reg,
#endif /* 0 */
#ifdef CONFIG_SND_DEBUG
-static unsigned int snd_gf1_i_read_addr(snd_gus_card_t * gus,
+static unsigned int snd_gf1_i_read_addr(struct snd_gus_card * gus,
unsigned char reg, short w_16bit)
{
unsigned int res;
@@ -287,7 +287,7 @@ static unsigned int snd_gf1_i_read_addr(snd_gus_card_t * gus,
*/
-void snd_gf1_dram_addr(snd_gus_card_t * gus, unsigned int addr)
+void snd_gf1_dram_addr(struct snd_gus_card * gus, unsigned int addr)
{
outb(0x43, gus->gf1.reg_regsel);
mb();
@@ -299,7 +299,7 @@ void snd_gf1_dram_addr(snd_gus_card_t * gus, unsigned int addr)
mb();
}
-void snd_gf1_poke(snd_gus_card_t * gus, unsigned int addr, unsigned char data)
+void snd_gf1_poke(struct snd_gus_card * gus, unsigned int addr, unsigned char data)
{
unsigned long flags;
@@ -316,7 +316,7 @@ void snd_gf1_poke(snd_gus_card_t * gus, unsigned int addr, unsigned char data)
spin_unlock_irqrestore(&gus->reg_lock, flags);
}
-unsigned char snd_gf1_peek(snd_gus_card_t * gus, unsigned int addr)
+unsigned char snd_gf1_peek(struct snd_gus_card * gus, unsigned int addr)
{
unsigned long flags;
unsigned char res;
@@ -337,7 +337,7 @@ unsigned char snd_gf1_peek(snd_gus_card_t * gus, unsigned int addr)
#if 0
-void snd_gf1_pokew(snd_gus_card_t * gus, unsigned int addr, unsigned short data)
+void snd_gf1_pokew(struct snd_gus_card * gus, unsigned int addr, unsigned short data)
{
unsigned long flags;
@@ -360,7 +360,7 @@ void snd_gf1_pokew(snd_gus_card_t * gus, unsigned int addr, unsigned short data)
spin_unlock_irqrestore(&gus->reg_lock, flags);
}
-unsigned short snd_gf1_peekw(snd_gus_card_t * gus, unsigned int addr)
+unsigned short snd_gf1_peekw(struct snd_gus_card * gus, unsigned int addr)
{
unsigned long flags;
unsigned short res;
@@ -385,7 +385,7 @@ unsigned short snd_gf1_peekw(snd_gus_card_t * gus, unsigned int addr)
return res;
}
-void snd_gf1_dram_setmem(snd_gus_card_t * gus, unsigned int addr,
+void snd_gf1_dram_setmem(struct snd_gus_card * gus, unsigned int addr,
unsigned short value, unsigned int count)
{
unsigned long port;
@@ -415,7 +415,7 @@ void snd_gf1_dram_setmem(snd_gus_card_t * gus, unsigned int addr,
#endif /* 0 */
-void snd_gf1_select_active_voices(snd_gus_card_t * gus)
+void snd_gf1_select_active_voices(struct snd_gus_card * gus)
{
unsigned short voices;
@@ -443,7 +443,7 @@ void snd_gf1_select_active_voices(snd_gus_card_t * gus)
#ifdef CONFIG_SND_DEBUG
-void snd_gf1_print_voice_registers(snd_gus_card_t * gus)
+void snd_gf1_print_voice_registers(struct snd_gus_card * gus)
{
unsigned char mode;
int voice, ctrl;
@@ -477,7 +477,7 @@ void snd_gf1_print_voice_registers(snd_gus_card_t * gus)
#if 0
-void snd_gf1_print_global_registers(snd_gus_card_t * gus)
+void snd_gf1_print_global_registers(struct snd_gus_card * gus)
{
unsigned char global_mode = 0x00;
@@ -504,7 +504,7 @@ void snd_gf1_print_global_registers(snd_gus_card_t * gus)
}
}
-void snd_gf1_print_setup_registers(snd_gus_card_t * gus)
+void snd_gf1_print_setup_registers(struct snd_gus_card * gus)
{
printk(KERN_INFO " -S- mix control = 0x%x\n", inb(GUSP(gus, MIXCNTRLREG)));
printk(KERN_INFO " -S- IRQ status = 0x%x\n", inb(GUSP(gus, IRQSTAT)));
@@ -523,7 +523,7 @@ void snd_gf1_print_setup_registers(snd_gus_card_t * gus)
}
}
-void snd_gf1_peek_print_block(snd_gus_card_t * gus, unsigned int addr, int count, int w_16bit)
+void snd_gf1_peek_print_block(struct snd_gus_card * gus, unsigned int addr, int count, int w_16bit)
{
if (!w_16bit) {
while (count-- > 0)
diff --git a/sound/isa/gus/gus_irq.c b/sound/isa/gus/gus_irq.c
index 1e2a15eb8106..c19ba2910b72 100644
--- a/sound/isa/gus/gus_irq.c
+++ b/sound/isa/gus/gus_irq.c
@@ -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 @@ __again:
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 @@ __again:
}
#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);
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>");
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;
}
diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c
index 2e23f2a8c627..e8bdb860a19f 100644
--- a/sound/isa/gus/gus_mem.c
+++ b/sound/isa/gus/gus_mem.c
@@ -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;
diff --git a/sound/isa/gus/gus_mem_proc.c b/sound/isa/gus/gus_mem_proc.c
index 7f96ac237f3c..4080255007d5 100644
--- a/sound/isa/gus/gus_mem_proc.c
+++ b/sound/isa/gus/gus_mem_proc.c
@@ -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) {
diff --git a/sound/isa/gus/gus_mixer.c b/sound/isa/gus/gus_mixer.c
index a051094d510e..acc25a297200 100644
--- a/sound/isa/gus/gus_mixer.c
+++ b/sound/isa/gus/gus_mixer.c
@@ -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;
diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c
index bae0fee705ee..d0829393ec8a 100644
--- a/sound/isa/gus/gus_pcm.c
+++ b/sound/isa/gus/gus_pcm.c
@@ -42,12 +42,12 @@
#define SNDRV_GF1_PCM_PFLG_ACTIVE (1<<0)
#define SNDRV_GF1_PCM_PFLG_NEUTRAL (2<<0)
-typedef struct {
- snd_gus_card_t * gus;
- snd_pcm_substream_t * substream;
+struct gus_pcm_private {
+ struct snd_gus_card * gus;
+ struct snd_pcm_substream *substream;
spinlock_t lock;
unsigned int voices;
- snd_gus_voice_t *pvoices[2];
+ struct snd_gus_voice *pvoices[2];
unsigned int memory;
unsigned short flags;
unsigned char voice_ctrl, ramp_ctrl;
@@ -58,13 +58,13 @@ typedef struct {
wait_queue_head_t sleep;
atomic_t dma_count;
int final_volume;
-} gus_pcm_private_t;
+};
static int snd_gf1_pcm_use_dma = 1;
-static void snd_gf1_pcm_block_change_ack(snd_gus_card_t * gus, void *private_data)
+static void snd_gf1_pcm_block_change_ack(struct snd_gus_card * gus, void *private_data)
{
- gus_pcm_private_t *pcmp = private_data;
+ struct gus_pcm_private *pcmp = private_data;
if (pcmp) {
atomic_dec(&pcmp->dma_count);
@@ -72,14 +72,14 @@ static void snd_gf1_pcm_block_change_ack(snd_gus_card_t * gus, void *private_dat
}
}
-static int snd_gf1_pcm_block_change(snd_pcm_substream_t * substream,
+static int snd_gf1_pcm_block_change(struct snd_pcm_substream *substream,
unsigned int offset,
unsigned int addr,
unsigned int count)
{
- snd_gf1_dma_block_t block;
- snd_pcm_runtime_t *runtime = substream->runtime;
- gus_pcm_private_t *pcmp = runtime->private_data;
+ struct snd_gf1_dma_block block;
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct gus_pcm_private *pcmp = runtime->private_data;
count += offset & 31;
offset &= ~31;
@@ -101,11 +101,11 @@ static int snd_gf1_pcm_block_change(snd_pcm_substream_t * substream,
return 0;
}
-static void snd_gf1_pcm_trigger_up(snd_pcm_substream_t * substream)
+static void snd_gf1_pcm_trigger_up(struct snd_pcm_substream *substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
- gus_pcm_private_t *pcmp = runtime->private_data;
- snd_gus_card_t * gus = pcmp->gus;
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct gus_pcm_private *pcmp = runtime->private_data;
+ struct snd_gus_card * gus = pcmp->gus;
unsigned long flags;
unsigned char voice_ctrl, ramp_ctrl;
unsigned short rate;
@@ -179,10 +179,11 @@ static void snd_gf1_pcm_trigger_up(snd_pcm_substream_t * substream)
spin_unlock_irqrestore(&gus->reg_lock, flags);
}
-static void snd_gf1_pcm_interrupt_wave(snd_gus_card_t * gus, snd_gus_voice_t *pvoice)
+static void snd_gf1_pcm_interrupt_wave(struct snd_gus_card * gus,
+ struct snd_gus_voice *pvoice)
{
- gus_pcm_private_t * pcmp;
- snd_pcm_runtime_t * runtime;
+ struct gus_pcm_private * pcmp;
+ struct snd_pcm_runtime *runtime;
unsigned char voice_ctrl, ramp_ctrl;
unsigned int idx;
unsigned int end, step;
@@ -261,11 +262,12 @@ static void snd_gf1_pcm_interrupt_wave(snd_gus_card_t * gus, snd_gus_voice_t *pv
#endif
}
-static void snd_gf1_pcm_interrupt_volume(snd_gus_card_t * gus, snd_gus_voice_t * pvoice)
+static void snd_gf1_pcm_interrupt_volume(struct snd_gus_card * gus,
+ struct snd_gus_voice * pvoice)
{
unsigned short vol;
int cvoice;
- gus_pcm_private_t *pcmp = pvoice->private_data;
+ struct gus_pcm_private *pcmp = pvoice->private_data;
/* stop ramp, but leave rollover bit untouched */
spin_lock(&gus->reg_lock);
@@ -289,11 +291,11 @@ static void snd_gf1_pcm_interrupt_volume(snd_gus_card_t * gus, snd_gus_voice_t *
spin_unlock(&gus->reg_lock);
}
-static void snd_gf1_pcm_volume_change(snd_gus_card_t * gus)
+static void snd_gf1_pcm_volume_change(struct snd_gus_card * gus)
{
}
-static int snd_gf1_pcm_poke_block(snd_gus_card_t *gus, unsigned char *buf,
+static int snd_gf1_pcm_poke_block(struct snd_gus_card *gus, unsigned char *buf,
unsigned int pos, unsigned int count,
int w16, int invert)
{
@@ -341,14 +343,14 @@ static int snd_gf1_pcm_poke_block(snd_gus_card_t *gus, unsigned char *buf,
return 0;
}
-static int snd_gf1_pcm_playback_copy(snd_pcm_substream_t *substream,
+static int snd_gf1_pcm_playback_copy(struct snd_pcm_substream *substream,
int voice,
snd_pcm_uframes_t pos,
void __user *src,
snd_pcm_uframes_t count)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
- gus_pcm_private_t *pcmp = runtime->private_data;
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct gus_pcm_private *pcmp = runtime->private_data;
unsigned int bpos, len;
bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2));
@@ -360,7 +362,7 @@ static int snd_gf1_pcm_playback_copy(snd_pcm_substream_t *substream,
if (snd_gf1_pcm_use_dma && len > 32) {
return snd_gf1_pcm_block_change(substream, bpos, pcmp->memory + bpos, len);
} else {
- snd_gus_card_t *gus = pcmp->gus;
+ struct snd_gus_card *gus = pcmp->gus;
int err, w16, invert;
w16 = (snd_pcm_format_width(runtime->format) == 16);
@@ -371,13 +373,13 @@ static int snd_gf1_pcm_playback_copy(snd_pcm_substream_t *substream,
return 0;
}
-static int snd_gf1_pcm_playback_silence(snd_pcm_substream_t *substream,
+static int snd_gf1_pcm_playback_silence(struct snd_pcm_substream *substream,
int voice,
snd_pcm_uframes_t pos,
snd_pcm_uframes_t count)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
- gus_pcm_private_t *pcmp = runtime->private_data;
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct gus_pcm_private *pcmp = runtime->private_data;
unsigned int bpos, len;
bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2));
@@ -388,7 +390,7 @@ static int snd_gf1_pcm_playback_silence(snd_pcm_substream_t *substream,
if (snd_gf1_pcm_use_dma && len > 32) {
return snd_gf1_pcm_block_change(substream, bpos, pcmp->memory + bpos, len);
} else {
- snd_gus_card_t *gus = pcmp->gus;
+ struct snd_gus_card *gus = pcmp->gus;
int err, w16, invert;
w16 = (snd_pcm_format_width(runtime->format) == 16);
@@ -399,18 +401,18 @@ static int snd_gf1_pcm_playback_silence(snd_pcm_substream_t *substream,
return 0;
}
-static int snd_gf1_pcm_playback_hw_params(snd_pcm_substream_t * substream,
- snd_pcm_hw_params_t * hw_params)
+static int snd_gf1_pcm_playback_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *hw_params)
{
- snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- gus_pcm_private_t *pcmp = runtime->private_data;
+ struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct gus_pcm_private *pcmp = runtime->private_data;
int err;
if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0)
return err;
if (err > 0) { /* change */
- snd_gf1_mem_block_t *block;
+ struct snd_gf1_mem_block *block;
if (pcmp->memory > 0) {
snd_gf1_mem_free(&gus->gf1.mem_alloc, pcmp->memory);
pcmp->memory = 0;
@@ -448,10 +450,10 @@ static int snd_gf1_pcm_playback_hw_params(snd_pcm_substream_t * substream,
return 0;
}
-static int snd_gf1_pcm_playback_hw_free(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_playback_hw_free(struct snd_pcm_substream *substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
- gus_pcm_private_t *pcmp = runtime->private_data;
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct gus_pcm_private *pcmp = runtime->private_data;
snd_pcm_lib_free_pages(substream);
if (pcmp->pvoices[0]) {
@@ -469,10 +471,10 @@ static int snd_gf1_pcm_playback_hw_free(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_gf1_pcm_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_playback_prepare(struct snd_pcm_substream *substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
- gus_pcm_private_t *pcmp = runtime->private_data;
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct gus_pcm_private *pcmp = runtime->private_data;
pcmp->bpos = 0;
pcmp->dma_size = snd_pcm_lib_buffer_bytes(substream);
@@ -481,12 +483,12 @@ static int snd_gf1_pcm_playback_prepare(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_gf1_pcm_playback_trigger(snd_pcm_substream_t * substream,
+static int snd_gf1_pcm_playback_trigger(struct snd_pcm_substream *substream,
int cmd)
{
- snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- gus_pcm_private_t *pcmp = runtime->private_data;
+ struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct gus_pcm_private *pcmp = runtime->private_data;
int voice;
if (cmd == SNDRV_PCM_TRIGGER_START) {
@@ -507,11 +509,11 @@ static int snd_gf1_pcm_playback_trigger(snd_pcm_substream_t * substream,
return 0;
}
-static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(struct snd_pcm_substream *substream)
{
- snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- gus_pcm_private_t *pcmp = runtime->private_data;
+ struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct gus_pcm_private *pcmp = runtime->private_data;
unsigned int pos;
unsigned char voice_ctrl;
@@ -529,22 +531,22 @@ static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(snd_pcm_substream_t * subs
return pos;
}
-static ratnum_t clock = {
+static struct snd_ratnum clock = {
.num = 9878400/16,
.den_min = 2,
.den_max = 257,
.den_step = 1,
};
-static snd_pcm_hw_constraint_ratnums_t hw_constraints_clocks = {
+static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = {
.nrats = 1,
.rats = &clock,
};
-static int snd_gf1_pcm_capture_hw_params(snd_pcm_substream_t * substream,
- snd_pcm_hw_params_t * hw_params)
+static int snd_gf1_pcm_capture_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *hw_params)
{
- snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
+ struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
gus->c_dma_size = params_buffer_bytes(hw_params);
gus->c_period_size = params_period_bytes(hw_params);
@@ -559,15 +561,15 @@ static int snd_gf1_pcm_capture_hw_params(snd_pcm_substream_t * substream,
return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
}
-static int snd_gf1_pcm_capture_hw_free(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_capture_hw_free(struct snd_pcm_substream *substream)
{
return snd_pcm_lib_free_pages(substream);
}
-static int snd_gf1_pcm_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_capture_prepare(struct snd_pcm_substream *substream)
{
- snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_gf1_i_write8(gus, SNDRV_GF1_GB_RECORD_RATE, runtime->rate_den - 2);
snd_gf1_i_write8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL, 0); /* disable sampling */
@@ -576,10 +578,10 @@ static int snd_gf1_pcm_capture_prepare(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_gf1_pcm_capture_trigger(snd_pcm_substream_t * substream,
+static int snd_gf1_pcm_capture_trigger(struct snd_pcm_substream *substream,
int cmd)
{
- snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
+ struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
int val;
if (cmd == SNDRV_PCM_TRIGGER_START) {
@@ -597,15 +599,15 @@ static int snd_gf1_pcm_capture_trigger(snd_pcm_substream_t * substream,
return 0;
}
-static snd_pcm_uframes_t snd_gf1_pcm_capture_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_gf1_pcm_capture_pointer(struct snd_pcm_substream *substream)
{
- snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
+ struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
int pos = snd_dma_pointer(gus->gf1.dma2, gus->c_period_size);
pos = bytes_to_frames(substream->runtime, (gus->c_pos + pos) % gus->c_dma_size);
return pos;
}
-static void snd_gf1_pcm_interrupt_dma_read(snd_gus_card_t * gus)
+static void snd_gf1_pcm_interrupt_dma_read(struct snd_gus_card * gus)
{
snd_gf1_i_write8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL, 0); /* disable sampling */
snd_gf1_i_look8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL); /* Sampling Control Register */
@@ -617,7 +619,7 @@ static void snd_gf1_pcm_interrupt_dma_read(snd_gus_card_t * gus)
}
}
-static snd_pcm_hardware_t snd_gf1_pcm_playback =
+static struct snd_pcm_hardware snd_gf1_pcm_playback =
{
.info = SNDRV_PCM_INFO_NONINTERLEAVED,
.formats = (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 |
@@ -635,7 +637,7 @@ static snd_pcm_hardware_t snd_gf1_pcm_playback =
.fifo_size = 0,
};
-static snd_pcm_hardware_t snd_gf1_pcm_capture =
+static struct snd_pcm_hardware snd_gf1_pcm_capture =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
@@ -653,16 +655,16 @@ static snd_pcm_hardware_t snd_gf1_pcm_capture =
.fifo_size = 0,
};
-static void snd_gf1_pcm_playback_free(snd_pcm_runtime_t *runtime)
+static void snd_gf1_pcm_playback_free(struct snd_pcm_runtime *runtime)
{
kfree(runtime->private_data);
}
-static int snd_gf1_pcm_playback_open(snd_pcm_substream_t *substream)
+static int snd_gf1_pcm_playback_open(struct snd_pcm_substream *substream)
{
- gus_pcm_private_t *pcmp;
- snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct gus_pcm_private *pcmp;
+ struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
int err;
pcmp = kzalloc(sizeof(*pcmp), GFP_KERNEL);
@@ -690,11 +692,11 @@ static int snd_gf1_pcm_playback_open(snd_pcm_substream_t *substream)
return 0;
}
-static int snd_gf1_pcm_playback_close(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_playback_close(struct snd_pcm_substream *substream)
{
- snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
- snd_pcm_runtime_t *runtime = substream->runtime;
- gus_pcm_private_t *pcmp = runtime->private_data;
+ struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct gus_pcm_private *pcmp = runtime->private_data;
if (!wait_event_timeout(pcmp->sleep, (atomic_read(&pcmp->dma_count) <= 0), 2*HZ))
snd_printk(KERN_ERR "gf1 pcm - serious DMA problem\n");
@@ -703,10 +705,10 @@ static int snd_gf1_pcm_playback_close(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_gf1_pcm_capture_open(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_capture_open(struct snd_pcm_substream *substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
- snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
gus->gf1.interrupt_handler_dma_read = snd_gf1_pcm_interrupt_dma_read;
gus->pcm_cap_substream = substream;
@@ -718,16 +720,16 @@ static int snd_gf1_pcm_capture_open(snd_pcm_substream_t * substream)
return 0;
}
-static int snd_gf1_pcm_capture_close(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_capture_close(struct snd_pcm_substream *substream)
{
- snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
+ struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
gus->pcm_cap_substream = NULL;
snd_gf1_set_default_handlers(gus, SNDRV_GF1_HANDLER_DMA_READ);
return 0;
}
-static int snd_gf1_pcm_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_gf1_pcm_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2;
@@ -736,9 +738,9 @@ static int snd_gf1_pcm_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
return 0;
}
-static int snd_gf1_pcm_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_gf1_pcm_volume_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);
unsigned long flags;
spin_lock_irqsave(&gus->pcm_volume_level_lock, flags);
@@ -748,15 +750,15 @@ static int snd_gf1_pcm_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
return 0;
}
-static int snd_gf1_pcm_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_gf1_pcm_volume_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 int idx;
unsigned short val1, val2, vol;
- gus_pcm_private_t *pcmp;
- snd_gus_voice_t *pvoice;
+ struct gus_pcm_private *pcmp;
+ struct snd_gus_voice *pvoice;
val1 = ucontrol->value.integer.value[0] & 127;
val2 = ucontrol->value.integer.value[1] & 127;
@@ -790,7 +792,7 @@ static int snd_gf1_pcm_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
return change;
}
-static snd_kcontrol_new_t snd_gf1_pcm_volume_control =
+static struct snd_kcontrol_new snd_gf1_pcm_volume_control =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "PCM Playback Volume",
@@ -799,7 +801,7 @@ static snd_kcontrol_new_t snd_gf1_pcm_volume_control =
.put = snd_gf1_pcm_volume_put
};
-static snd_kcontrol_new_t snd_gf1_pcm_volume_control1 =
+static struct snd_kcontrol_new snd_gf1_pcm_volume_control1 =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "GPCM Playback Volume",
@@ -808,7 +810,7 @@ static snd_kcontrol_new_t snd_gf1_pcm_volume_control1 =
.put = snd_gf1_pcm_volume_put
};
-static snd_pcm_ops_t snd_gf1_pcm_playback_ops = {
+static struct snd_pcm_ops snd_gf1_pcm_playback_ops = {
.open = snd_gf1_pcm_playback_open,
.close = snd_gf1_pcm_playback_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -821,7 +823,7 @@ static snd_pcm_ops_t snd_gf1_pcm_playback_ops = {
.silence = snd_gf1_pcm_playback_silence,
};
-static snd_pcm_ops_t snd_gf1_pcm_capture_ops = {
+static struct snd_pcm_ops snd_gf1_pcm_capture_ops = {
.open = snd_gf1_pcm_capture_open,
.close = snd_gf1_pcm_capture_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -832,12 +834,12 @@ static snd_pcm_ops_t snd_gf1_pcm_capture_ops = {
.pointer = snd_gf1_pcm_capture_pointer,
};
-int snd_gf1_pcm_new(snd_gus_card_t * gus, int pcm_dev, int control_index, snd_pcm_t ** rpcm)
+int snd_gf1_pcm_new(struct snd_gus_card * gus, int pcm_dev, int control_index, struct snd_pcm ** rpcm)
{
- snd_card_t *card;
- snd_kcontrol_t *kctl;
- snd_pcm_t *pcm;
- snd_pcm_substream_t *substream;
+ struct snd_card *card;
+ struct snd_kcontrol *kctl;
+ struct snd_pcm *pcm;
+ struct snd_pcm_substream *substream;
int capture, err;
if (rpcm)
diff --git a/sound/isa/gus/gus_reset.c b/sound/isa/gus/gus_reset.c
index 90710969ef7f..b263655c4116 100644
--- a/sound/isa/gus/gus_reset.c
+++ b/sound/isa/gus/gus_reset.c
@@ -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 */
diff --git a/sound/isa/gus/gus_sample.c b/sound/isa/gus/gus_sample.c
index 4290e03acd51..9e0c55ab25b2 100644
--- a/sound/isa/gus/gus_sample.c
+++ b/sound/isa/gus/gus_sample.c
@@ -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;
diff --git a/sound/isa/gus/gus_simple.c b/sound/isa/gus/gus_simple.c
index dfed85b58b3a..dcad6ed0198c 100644
--- a/sound/isa/gus/gus_simple.c
+++ b/sound/isa/gus/gus_simple.c
@@ -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;
diff --git a/sound/isa/gus/gus_synth.c b/sound/isa/gus/gus_synth.c
index f51c386ee192..9c7d6986f62f 100644
--- a/sound/isa/gus/gus_synth.c
+++ b/sound/isa/gus/gus_synth.c
@@ -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)
diff --git a/sound/isa/gus/gus_timer.c b/sound/isa/gus/gus_timer.c
index 9876603ff6c1..a43b662f17c7 100644
--- a/sound/isa/gus/gus_timer.c
+++ b/sound/isa/gus/gus_timer.c
@@ -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) {
diff --git a/sound/isa/gus/gus_uart.c b/sound/isa/gus/gus_uart.c
index fbc95e99105c..654290a8b21c 100644
--- a/sound/isa/gus/gus_uart.c
+++ b/sound/isa/gus/gus_uart.c
@@ -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)
diff --git a/sound/isa/gus/gus_volume.c b/sound/isa/gus/gus_volume.c
index b3382fec5298..dbbc0a6d7659 100644
--- a/sound/isa/gus/gus_volume.c
+++ b/sound/isa/gus/gus_volume.c
@@ -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)
diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c
index 39cef38835ca..6db484f71367 100644
--- a/sound/isa/gus/gusclassic.c
+++ b/sound/isa/gus/gusclassic.c
@@ -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);
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c
index d2e7cb1df537..9be59d501333 100644
--- a/sound/isa/gus/gusextreme.c
+++ b/sound/isa/gus/gusextreme.c
@@ -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++) {
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
index 0bb44b519340..63311cdb4a1a 100644
--- a/sound/isa/gus/gusmax.c
+++ b/sound/isa/gus/gusmax.c
@@ -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,
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
index f703a9f4257c..f2e9c5073548 100644
--- a/sound/isa/gus/interwave.c
+++ b/sound/isa/gus/interwave.c
@@ -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);