Skip to content

Commit 029d64b

Browse files
tiwaiJaroslav Kysela
authored andcommitted
[ALSA] Remove xxx_t typedefs: ISA SB8/SB16/SBAWE
Remove xxx_t typedefs from the ISA SB8/SB16/SBAWE drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent d3a7e47 commit 029d64b

18 files changed

Lines changed: 551 additions & 542 deletions

‎include/sound/emu8000.h‎

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ enum {
5656
* some of the channels may be used for other things so max_channels is
5757
* the number in use for wave voices.
5858
*/
59-
typedef struct snd_emu8000 {
59+
struct snd_emu8000 {
6060

61-
snd_emux_t *emu;
61+
struct snd_emux *emu;
6262

6363
int index; /* sequencer client index */
6464
int seq_ports; /* number of sequencer ports */
@@ -77,44 +77,45 @@ typedef struct snd_emu8000 {
7777

7878
int dram_checked;
7979

80-
snd_card_t *card; /* The card that this belongs to */
80+
struct snd_card *card; /* The card that this belongs to */
8181

8282
int chorus_mode;
8383
int reverb_mode;
8484
int bass_level;
8585
int treble_level;
8686

87-
snd_util_memhdr_t *memhdr;
87+
struct snd_util_memhdr *memhdr;
8888

8989
spinlock_t control_lock;
90-
snd_kcontrol_t *controls[EMU8000_NUM_CONTROLS];
90+
struct snd_kcontrol *controls[EMU8000_NUM_CONTROLS];
9191

92-
snd_pcm_t *pcm; /* pcm on emu8000 wavetable */
92+
struct snd_pcm *pcm; /* pcm on emu8000 wavetable */
9393

94-
} emu8000_t;
94+
};
9595

9696
/* sequencer device id */
9797
#define SNDRV_SEQ_DEV_ID_EMU8000 "emu8000-synth"
9898

9999

100100
/* exported functions */
101-
int snd_emu8000_new(snd_card_t *card, int device, long port, int seq_ports, snd_seq_device_t **ret);
102-
void snd_emu8000_poke(emu8000_t *emu, unsigned int port, unsigned int reg,
101+
int snd_emu8000_new(struct snd_card *card, int device, long port, int seq_ports,
102+
struct snd_seq_device **ret);
103+
void snd_emu8000_poke(struct snd_emu8000 *emu, unsigned int port, unsigned int reg,
103104
unsigned int val);
104-
unsigned short snd_emu8000_peek(emu8000_t *emu, unsigned int port,
105+
unsigned short snd_emu8000_peek(struct snd_emu8000 *emu, unsigned int port,
105106
unsigned int reg);
106-
void snd_emu8000_poke_dw(emu8000_t *emu, unsigned int port, unsigned int reg,
107+
void snd_emu8000_poke_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg,
107108
unsigned int val);
108-
unsigned int snd_emu8000_peek_dw(emu8000_t *emu, unsigned int port,
109+
unsigned int snd_emu8000_peek_dw(struct snd_emu8000 *emu, unsigned int port,
109110
unsigned int reg);
110-
void snd_emu8000_dma_chan(emu8000_t *emu, int ch, int mode);
111+
void snd_emu8000_dma_chan(struct snd_emu8000 *emu, int ch, int mode);
111112

112-
void snd_emu8000_init_fm(emu8000_t *emu);
113+
void snd_emu8000_init_fm(struct snd_emu8000 *emu);
113114

114-
void snd_emu8000_update_chorus_mode(emu8000_t *emu);
115-
void snd_emu8000_update_reverb_mode(emu8000_t *emu);
116-
void snd_emu8000_update_equalizer(emu8000_t *emu);
117-
int snd_emu8000_load_chorus_fx(emu8000_t *emu, int mode, const void __user *buf, long len);
118-
int snd_emu8000_load_reverb_fx(emu8000_t *emu, int mode, const void __user *buf, long len);
115+
void snd_emu8000_update_chorus_mode(struct snd_emu8000 *emu);
116+
void snd_emu8000_update_reverb_mode(struct snd_emu8000 *emu);
117+
void snd_emu8000_update_equalizer(struct snd_emu8000 *emu);
118+
int snd_emu8000_load_chorus_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len);
119+
int snd_emu8000_load_reverb_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len);
119120

120121
#endif /* __SOUND_EMU8000_H */

‎include/sound/sb.h‎

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ enum sb_hw_type {
6060

6161
#define SB_MPU_INPUT 1
6262

63-
struct _snd_sb {
63+
struct snd_sb {
6464
unsigned long port; /* base port of DSP chip */
6565
struct resource *res_port;
6666
unsigned long mpu_port; /* MPU port for SB DSP 4.0+ */
@@ -92,25 +92,23 @@ struct _snd_sb {
9292

9393
void *csp; /* used only when CONFIG_SND_SB16_CSP is set */
9494

95-
snd_card_t *card;
96-
snd_pcm_t *pcm;
97-
snd_pcm_substream_t *playback_substream;
98-
snd_pcm_substream_t *capture_substream;
95+
struct snd_card *card;
96+
struct snd_pcm *pcm;
97+
struct snd_pcm_substream *playback_substream;
98+
struct snd_pcm_substream *capture_substream;
9999

100-
snd_rawmidi_t *rmidi;
101-
snd_rawmidi_substream_t *midi_substream_input;
102-
snd_rawmidi_substream_t *midi_substream_output;
100+
struct snd_rawmidi *rmidi;
101+
struct snd_rawmidi_substream *midi_substream_input;
102+
struct snd_rawmidi_substream *midi_substream_output;
103103
irqreturn_t (*rmidi_callback)(int irq, void *dev_id, struct pt_regs *regs);
104104

105105
spinlock_t reg_lock;
106106
spinlock_t open_lock;
107107
spinlock_t midi_input_lock;
108108

109-
snd_info_entry_t *proc_entry;
109+
struct snd_info_entry *proc_entry;
110110
};
111111

112-
typedef struct _snd_sb sb_t;
113-
114112
/* I/O ports */
115113

116114
#define SBP(chip, x) ((chip)->port + s_b_SB_##x)
@@ -267,48 +265,48 @@ typedef struct _snd_sb sb_t;
267265
*
268266
*/
269267

270-
static inline void snd_sb_ack_8bit(sb_t *chip)
268+
static inline void snd_sb_ack_8bit(struct snd_sb *chip)
271269
{
272270
inb(SBP(chip, DATA_AVAIL));
273271
}
274272

275-
static inline void snd_sb_ack_16bit(sb_t *chip)
273+
static inline void snd_sb_ack_16bit(struct snd_sb *chip)
276274
{
277275
inb(SBP(chip, DATA_AVAIL_16));
278276
}
279277

280278
/* sb_common.c */
281-
int snd_sbdsp_command(sb_t *chip, unsigned char val);
282-
int snd_sbdsp_get_byte(sb_t *chip);
283-
int snd_sbdsp_reset(sb_t *chip);
284-
int snd_sbdsp_create(snd_card_t *card,
279+
int snd_sbdsp_command(struct snd_sb *chip, unsigned char val);
280+
int snd_sbdsp_get_byte(struct snd_sb *chip);
281+
int snd_sbdsp_reset(struct snd_sb *chip);
282+
int snd_sbdsp_create(struct snd_card *card,
285283
unsigned long port,
286284
int irq,
287285
irqreturn_t (*irq_handler)(int, void *, struct pt_regs *),
288286
int dma8, int dma16,
289287
unsigned short hardware,
290-
sb_t **r_chip);
288+
struct snd_sb **r_chip);
291289
/* sb_mixer.c */
292-
void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data);
293-
unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg);
294-
int snd_sbmixer_new(sb_t *chip);
290+
void snd_sbmixer_write(struct snd_sb *chip, unsigned char reg, unsigned char data);
291+
unsigned char snd_sbmixer_read(struct snd_sb *chip, unsigned char reg);
292+
int snd_sbmixer_new(struct snd_sb *chip);
295293

296294
/* sb8_init.c */
297-
int snd_sb8dsp_pcm(sb_t *chip, int device, snd_pcm_t ** rpcm);
295+
int snd_sb8dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm);
298296
/* sb8.c */
299-
irqreturn_t snd_sb8dsp_interrupt(sb_t *chip);
300-
int snd_sb8_playback_open(snd_pcm_substream_t *substream);
301-
int snd_sb8_capture_open(snd_pcm_substream_t *substream);
302-
int snd_sb8_playback_close(snd_pcm_substream_t *substream);
303-
int snd_sb8_capture_close(snd_pcm_substream_t *substream);
297+
irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip);
298+
int snd_sb8_playback_open(struct snd_pcm_substream *substream);
299+
int snd_sb8_capture_open(struct snd_pcm_substream *substream);
300+
int snd_sb8_playback_close(struct snd_pcm_substream *substream);
301+
int snd_sb8_capture_close(struct snd_pcm_substream *substream);
304302
/* midi8.c */
305-
irqreturn_t snd_sb8dsp_midi_interrupt(sb_t *chip);
306-
int snd_sb8dsp_midi(sb_t *chip, int device, snd_rawmidi_t ** rrawmidi);
303+
irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb *chip);
304+
int snd_sb8dsp_midi(struct snd_sb *chip, int device, struct snd_rawmidi ** rrawmidi);
307305

308306
/* sb16_init.c */
309-
int snd_sb16dsp_pcm(sb_t *chip, int device, snd_pcm_t ** rpcm);
310-
const snd_pcm_ops_t *snd_sb16dsp_get_pcm_ops(int direction);
311-
int snd_sb16dsp_configure(sb_t *chip);
307+
int snd_sb16dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm);
308+
const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction);
309+
int snd_sb16dsp_configure(struct snd_sb *chip);
312310
/* sb16.c */
313311
irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs);
314312

@@ -328,7 +326,7 @@ enum {
328326
#define SB_MIXVAL_INPUT_SW(reg1, reg2, left_shift, right_shift) \
329327
((reg1) | ((reg2) << 8) | ((left_shift) << 16) | ((right_shift) << 24))
330328

331-
int snd_sbmixer_add_ctl(sb_t *chip, const char *name, int index, int type, unsigned long value);
329+
int snd_sbmixer_add_ctl(struct snd_sb *chip, const char *name, int index, int type, unsigned long value);
332330

333331
/* for ease of use */
334332
struct sbmix_elem {
@@ -352,7 +350,7 @@ struct sbmix_elem {
352350
.type = SB_MIX_INPUT_SW, \
353351
.private_value = SB_MIXVAL_INPUT_SW(reg1, reg2, left_shift, right_shift) }
354352

355-
static inline int snd_sbmixer_add_ctl_elem(sb_t *chip, const struct sbmix_elem *c)
353+
static inline int snd_sbmixer_add_ctl_elem(struct snd_sb *chip, const struct sbmix_elem *c)
356354
{
357355
return snd_sbmixer_add_ctl(chip, c->name, 0, c->type, c->private_value);
358356
}

‎include/sound/sb16_csp.h‎

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,25 @@
6363
#define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000
6464

6565
/* microcode header */
66-
typedef struct snd_sb_csp_mc_header {
66+
struct snd_sb_csp_mc_header {
6767
char codec_name[16]; /* id name of codec */
6868
unsigned short func_req; /* requested function */
69-
} snd_sb_csp_mc_header_t;
69+
};
7070

7171
/* microcode to be loaded */
72-
typedef struct snd_sb_csp_microcode {
73-
snd_sb_csp_mc_header_t info;
72+
struct snd_sb_csp_microcode {
73+
struct snd_sb_csp_mc_header info;
7474
unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE];
75-
} snd_sb_csp_microcode_t;
75+
};
7676

7777
/* start CSP with sample_width in mono/stereo */
78-
typedef struct snd_sb_csp_start {
78+
struct snd_sb_csp_start {
7979
int sample_width; /* sample width, look above */
8080
int channels; /* channels, look above */
81-
} snd_sb_csp_start_t;
81+
};
8282

8383
/* CSP information */
84-
typedef struct snd_sb_csp_info {
84+
struct snd_sb_csp_info {
8585
char codec_name[16]; /* id name of codec */
8686
unsigned short func_nr; /* function number */
8787
unsigned int acc_format; /* accepted PCM formats */
@@ -93,17 +93,17 @@ typedef struct snd_sb_csp_info {
9393
unsigned short run_width; /* current sample width */
9494
unsigned short version; /* version id: 0x10 - 0x1f */
9595
unsigned short state; /* state bits */
96-
} snd_sb_csp_info_t;
96+
};
9797

9898
/* HWDEP controls */
9999
/* get CSP information */
100-
#define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, snd_sb_csp_info_t)
100+
#define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info)
101101
/* load microcode to CSP */
102-
#define SNDRV_SB_CSP_IOCTL_LOAD_CODE _IOW('H', 0x11, snd_sb_csp_microcode_t)
102+
#define SNDRV_SB_CSP_IOCTL_LOAD_CODE _IOW('H', 0x11, struct snd_sb_csp_microcode)
103103
/* unload microcode from CSP */
104104
#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12)
105105
/* start CSP */
106-
#define SNDRV_SB_CSP_IOCTL_START _IOW('H', 0x13, snd_sb_csp_start_t)
106+
#define SNDRV_SB_CSP_IOCTL_START _IOW('H', 0x13, struct snd_sb_csp_start)
107107
/* stop CSP */
108108
#define SNDRV_SB_CSP_IOCTL_STOP _IO('H', 0x14)
109109
/* pause CSP and DMA transfer */
@@ -115,25 +115,25 @@ typedef struct snd_sb_csp_info {
115115
#include "sb.h"
116116
#include "hwdep.h"
117117

118-
typedef struct snd_sb_csp snd_sb_csp_t;
118+
struct snd_sb_csp;
119119

120120
/*
121121
* CSP operators
122122
*/
123-
typedef struct {
124-
int (*csp_use) (snd_sb_csp_t * p);
125-
int (*csp_unuse) (snd_sb_csp_t * p);
126-
int (*csp_autoload) (snd_sb_csp_t * p, int pcm_sfmt, int play_rec_mode);
127-
int (*csp_start) (snd_sb_csp_t * p, int sample_width, int channels);
128-
int (*csp_stop) (snd_sb_csp_t * p);
129-
int (*csp_qsound_transfer) (snd_sb_csp_t * p);
130-
} snd_sb_csp_ops_t;
123+
struct snd_sb_csp_ops {
124+
int (*csp_use) (struct snd_sb_csp * p);
125+
int (*csp_unuse) (struct snd_sb_csp * p);
126+
int (*csp_autoload) (struct snd_sb_csp * p, int pcm_sfmt, int play_rec_mode);
127+
int (*csp_start) (struct snd_sb_csp * p, int sample_width, int channels);
128+
int (*csp_stop) (struct snd_sb_csp * p);
129+
int (*csp_qsound_transfer) (struct snd_sb_csp * p);
130+
};
131131

132132
/*
133133
* CSP private data
134134
*/
135135
struct snd_sb_csp {
136-
sb_t *chip; /* SB16 DSP */
136+
struct snd_sb *chip; /* SB16 DSP */
137137
int used; /* usage flag - exclusive */
138138
char codec_name[16]; /* name of codec */
139139
unsigned short func_nr; /* function number */
@@ -147,21 +147,21 @@ struct snd_sb_csp {
147147
int version; /* CSP version (0x10 - 0x1f) */
148148
int running; /* running state */
149149

150-
snd_sb_csp_ops_t ops; /* operators */
150+
struct snd_sb_csp_ops ops; /* operators */
151151

152152
spinlock_t q_lock; /* locking */
153153
int q_enabled; /* enabled flag */
154154
int qpos_left; /* left position */
155155
int qpos_right; /* right position */
156156
int qpos_changed; /* position changed flag */
157157

158-
snd_kcontrol_t *qsound_switch;
159-
snd_kcontrol_t *qsound_space;
158+
struct snd_kcontrol *qsound_switch;
159+
struct snd_kcontrol *qsound_space;
160160

161161
struct semaphore access_mutex; /* locking */
162162
};
163163

164-
int snd_sb_csp_new(sb_t *chip, int device, snd_hwdep_t ** rhwdep);
164+
int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep);
165165
#endif
166166

167167
#endif /* __SOUND_SB16_CSP */

0 commit comments

Comments
 (0)