Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Takashi Iwai and committed by
Jaroslav Kysela
029d64b0 d3a7e476

+545 -536
+20 -19
include/sound/emu8000.h
··· 56 56 * some of the channels may be used for other things so max_channels is 57 57 * the number in use for wave voices. 58 58 */ 59 - typedef struct snd_emu8000 { 59 + struct snd_emu8000 { 60 60 61 - snd_emux_t *emu; 61 + struct snd_emux *emu; 62 62 63 63 int index; /* sequencer client index */ 64 64 int seq_ports; /* number of sequencer ports */ ··· 77 77 78 78 int dram_checked; 79 79 80 - snd_card_t *card; /* The card that this belongs to */ 80 + struct snd_card *card; /* The card that this belongs to */ 81 81 82 82 int chorus_mode; 83 83 int reverb_mode; 84 84 int bass_level; 85 85 int treble_level; 86 86 87 - snd_util_memhdr_t *memhdr; 87 + struct snd_util_memhdr *memhdr; 88 88 89 89 spinlock_t control_lock; 90 - snd_kcontrol_t *controls[EMU8000_NUM_CONTROLS]; 90 + struct snd_kcontrol *controls[EMU8000_NUM_CONTROLS]; 91 91 92 - snd_pcm_t *pcm; /* pcm on emu8000 wavetable */ 92 + struct snd_pcm *pcm; /* pcm on emu8000 wavetable */ 93 93 94 - } emu8000_t; 94 + }; 95 95 96 96 /* sequencer device id */ 97 97 #define SNDRV_SEQ_DEV_ID_EMU8000 "emu8000-synth" 98 98 99 99 100 100 /* 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, 103 104 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, 105 106 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, 107 108 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, 109 110 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); 111 112 112 - void snd_emu8000_init_fm(emu8000_t *emu); 113 + void snd_emu8000_init_fm(struct snd_emu8000 *emu); 113 114 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); 119 120 120 121 #endif /* __SOUND_EMU8000_H */
+32 -34
include/sound/sb.h
··· 60 60 61 61 #define SB_MPU_INPUT 1 62 62 63 - struct _snd_sb { 63 + struct snd_sb { 64 64 unsigned long port; /* base port of DSP chip */ 65 65 struct resource *res_port; 66 66 unsigned long mpu_port; /* MPU port for SB DSP 4.0+ */ ··· 92 92 93 93 void *csp; /* used only when CONFIG_SND_SB16_CSP is set */ 94 94 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; 99 99 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; 103 103 irqreturn_t (*rmidi_callback)(int irq, void *dev_id, struct pt_regs *regs); 104 104 105 105 spinlock_t reg_lock; 106 106 spinlock_t open_lock; 107 107 spinlock_t midi_input_lock; 108 108 109 - snd_info_entry_t *proc_entry; 109 + struct snd_info_entry *proc_entry; 110 110 }; 111 - 112 - typedef struct _snd_sb sb_t; 113 111 114 112 /* I/O ports */ 115 113 ··· 265 267 * 266 268 */ 267 269 268 - static inline void snd_sb_ack_8bit(sb_t *chip) 270 + static inline void snd_sb_ack_8bit(struct snd_sb *chip) 269 271 { 270 272 inb(SBP(chip, DATA_AVAIL)); 271 273 } 272 274 273 - static inline void snd_sb_ack_16bit(sb_t *chip) 275 + static inline void snd_sb_ack_16bit(struct snd_sb *chip) 274 276 { 275 277 inb(SBP(chip, DATA_AVAIL_16)); 276 278 } 277 279 278 280 /* sb_common.c */ 279 - int snd_sbdsp_command(sb_t *chip, unsigned char val); 280 - int snd_sbdsp_get_byte(sb_t *chip); 281 - int snd_sbdsp_reset(sb_t *chip); 282 - int snd_sbdsp_create(snd_card_t *card, 281 + int snd_sbdsp_command(struct snd_sb *chip, unsigned char val); 282 + int snd_sbdsp_get_byte(struct snd_sb *chip); 283 + int snd_sbdsp_reset(struct snd_sb *chip); 284 + int snd_sbdsp_create(struct snd_card *card, 283 285 unsigned long port, 284 286 int irq, 285 287 irqreturn_t (*irq_handler)(int, void *, struct pt_regs *), 286 288 int dma8, int dma16, 287 289 unsigned short hardware, 288 - sb_t **r_chip); 290 + struct snd_sb **r_chip); 289 291 /* sb_mixer.c */ 290 - void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data); 291 - unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg); 292 - int snd_sbmixer_new(sb_t *chip); 292 + void snd_sbmixer_write(struct snd_sb *chip, unsigned char reg, unsigned char data); 293 + unsigned char snd_sbmixer_read(struct snd_sb *chip, unsigned char reg); 294 + int snd_sbmixer_new(struct snd_sb *chip); 293 295 294 296 /* sb8_init.c */ 295 - int snd_sb8dsp_pcm(sb_t *chip, int device, snd_pcm_t ** rpcm); 297 + int snd_sb8dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm); 296 298 /* sb8.c */ 297 - irqreturn_t snd_sb8dsp_interrupt(sb_t *chip); 298 - int snd_sb8_playback_open(snd_pcm_substream_t *substream); 299 - int snd_sb8_capture_open(snd_pcm_substream_t *substream); 300 - int snd_sb8_playback_close(snd_pcm_substream_t *substream); 301 - int snd_sb8_capture_close(snd_pcm_substream_t *substream); 299 + irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip); 300 + int snd_sb8_playback_open(struct snd_pcm_substream *substream); 301 + int snd_sb8_capture_open(struct snd_pcm_substream *substream); 302 + int snd_sb8_playback_close(struct snd_pcm_substream *substream); 303 + int snd_sb8_capture_close(struct snd_pcm_substream *substream); 302 304 /* midi8.c */ 303 - irqreturn_t snd_sb8dsp_midi_interrupt(sb_t *chip); 304 - int snd_sb8dsp_midi(sb_t *chip, int device, snd_rawmidi_t ** rrawmidi); 305 + irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb *chip); 306 + int snd_sb8dsp_midi(struct snd_sb *chip, int device, struct snd_rawmidi ** rrawmidi); 305 307 306 308 /* sb16_init.c */ 307 - int snd_sb16dsp_pcm(sb_t *chip, int device, snd_pcm_t ** rpcm); 308 - const snd_pcm_ops_t *snd_sb16dsp_get_pcm_ops(int direction); 309 - int snd_sb16dsp_configure(sb_t *chip); 309 + int snd_sb16dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm); 310 + const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction); 311 + int snd_sb16dsp_configure(struct snd_sb *chip); 310 312 /* sb16.c */ 311 313 irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs); 312 314 ··· 326 328 #define SB_MIXVAL_INPUT_SW(reg1, reg2, left_shift, right_shift) \ 327 329 ((reg1) | ((reg2) << 8) | ((left_shift) << 16) | ((right_shift) << 24)) 328 330 329 - int snd_sbmixer_add_ctl(sb_t *chip, const char *name, int index, int type, unsigned long value); 331 + int snd_sbmixer_add_ctl(struct snd_sb *chip, const char *name, int index, int type, unsigned long value); 330 332 331 333 /* for ease of use */ 332 334 struct sbmix_elem { ··· 350 352 .type = SB_MIX_INPUT_SW, \ 351 353 .private_value = SB_MIXVAL_INPUT_SW(reg1, reg2, left_shift, right_shift) } 352 354 353 - static inline int snd_sbmixer_add_ctl_elem(sb_t *chip, const struct sbmix_elem *c) 355 + static inline int snd_sbmixer_add_ctl_elem(struct snd_sb *chip, const struct sbmix_elem *c) 354 356 { 355 357 return snd_sbmixer_add_ctl(chip, c->name, 0, c->type, c->private_value); 356 358 }
+26 -26
include/sound/sb16_csp.h
··· 63 63 #define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000 64 64 65 65 /* microcode header */ 66 - typedef struct snd_sb_csp_mc_header { 66 + struct snd_sb_csp_mc_header { 67 67 char codec_name[16]; /* id name of codec */ 68 68 unsigned short func_req; /* requested function */ 69 - } snd_sb_csp_mc_header_t; 69 + }; 70 70 71 71 /* 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; 74 74 unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE]; 75 - } snd_sb_csp_microcode_t; 75 + }; 76 76 77 77 /* start CSP with sample_width in mono/stereo */ 78 - typedef struct snd_sb_csp_start { 78 + struct snd_sb_csp_start { 79 79 int sample_width; /* sample width, look above */ 80 80 int channels; /* channels, look above */ 81 - } snd_sb_csp_start_t; 81 + }; 82 82 83 83 /* CSP information */ 84 - typedef struct snd_sb_csp_info { 84 + struct snd_sb_csp_info { 85 85 char codec_name[16]; /* id name of codec */ 86 86 unsigned short func_nr; /* function number */ 87 87 unsigned int acc_format; /* accepted PCM formats */ ··· 93 93 unsigned short run_width; /* current sample width */ 94 94 unsigned short version; /* version id: 0x10 - 0x1f */ 95 95 unsigned short state; /* state bits */ 96 - } snd_sb_csp_info_t; 96 + }; 97 97 98 98 /* HWDEP controls */ 99 99 /* 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) 101 101 /* 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) 103 103 /* unload microcode from CSP */ 104 104 #define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12) 105 105 /* 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) 107 107 /* stop CSP */ 108 108 #define SNDRV_SB_CSP_IOCTL_STOP _IO('H', 0x14) 109 109 /* pause CSP and DMA transfer */ ··· 115 115 #include "sb.h" 116 116 #include "hwdep.h" 117 117 118 - typedef struct snd_sb_csp snd_sb_csp_t; 118 + struct snd_sb_csp; 119 119 120 120 /* 121 121 * CSP operators 122 122 */ 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 + }; 131 131 132 132 /* 133 133 * CSP private data 134 134 */ 135 135 struct snd_sb_csp { 136 - sb_t *chip; /* SB16 DSP */ 136 + struct snd_sb *chip; /* SB16 DSP */ 137 137 int used; /* usage flag - exclusive */ 138 138 char codec_name[16]; /* name of codec */ 139 139 unsigned short func_nr; /* function number */ ··· 147 147 int version; /* CSP version (0x10 - 0x1f) */ 148 148 int running; /* running state */ 149 149 150 - snd_sb_csp_ops_t ops; /* operators */ 150 + struct snd_sb_csp_ops ops; /* operators */ 151 151 152 152 spinlock_t q_lock; /* locking */ 153 153 int q_enabled; /* enabled flag */ ··· 155 155 int qpos_right; /* right position */ 156 156 int qpos_changed; /* position changed flag */ 157 157 158 - snd_kcontrol_t *qsound_switch; 159 - snd_kcontrol_t *qsound_space; 158 + struct snd_kcontrol *qsound_switch; 159 + struct snd_kcontrol *qsound_space; 160 160 161 161 struct semaphore access_mutex; /* locking */ 162 162 }; 163 163 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); 165 165 #endif 166 166 167 167 #endif /* __SOUND_SB16_CSP */
+61 -60
sound/isa/sb/emu8000.c
··· 45 45 * directly. The macros handle the port number and command word. 46 46 */ 47 47 /* Write a word */ 48 - void snd_emu8000_poke(emu8000_t *emu, unsigned int port, unsigned int reg, unsigned int val) 48 + void snd_emu8000_poke(struct snd_emu8000 *emu, unsigned int port, unsigned int reg, unsigned int val) 49 49 { 50 50 unsigned long flags; 51 51 spin_lock_irqsave(&emu->reg_lock, flags); ··· 58 58 } 59 59 60 60 /* Read a word */ 61 - unsigned short snd_emu8000_peek(emu8000_t *emu, unsigned int port, unsigned int reg) 61 + unsigned short snd_emu8000_peek(struct snd_emu8000 *emu, unsigned int port, unsigned int reg) 62 62 { 63 63 unsigned short res; 64 64 unsigned long flags; ··· 73 73 } 74 74 75 75 /* Write a double word */ 76 - void snd_emu8000_poke_dw(emu8000_t *emu, unsigned int port, unsigned int reg, unsigned int val) 76 + void snd_emu8000_poke_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg, unsigned int val) 77 77 { 78 78 unsigned long flags; 79 79 spin_lock_irqsave(&emu->reg_lock, flags); ··· 87 87 } 88 88 89 89 /* Read a double word */ 90 - unsigned int snd_emu8000_peek_dw(emu8000_t *emu, unsigned int port, unsigned int reg) 90 + unsigned int snd_emu8000_peek_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg) 91 91 { 92 92 unsigned short low; 93 93 unsigned int res; ··· 107 107 * Set up / close a channel to be used for DMA. 108 108 */ 109 109 /*exported*/ void 110 - snd_emu8000_dma_chan(emu8000_t *emu, int ch, int mode) 110 + snd_emu8000_dma_chan(struct snd_emu8000 *emu, int ch, int mode) 111 111 { 112 112 unsigned right_bit = (mode & EMU8000_RAM_RIGHT) ? 0x01000000 : 0; 113 113 mode &= EMU8000_RAM_MODE_MASK; ··· 132 132 /* 133 133 */ 134 134 static void __init 135 - snd_emu8000_read_wait(emu8000_t *emu) 135 + snd_emu8000_read_wait(struct snd_emu8000 *emu) 136 136 { 137 137 while ((EMU8000_SMALR_READ(emu) & 0x80000000) != 0) { 138 138 schedule_timeout_interruptible(1); ··· 144 144 /* 145 145 */ 146 146 static void __init 147 - snd_emu8000_write_wait(emu8000_t *emu) 147 + snd_emu8000_write_wait(struct snd_emu8000 *emu) 148 148 { 149 149 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) { 150 150 schedule_timeout_interruptible(1); ··· 157 157 * detect a card at the given port 158 158 */ 159 159 static int __init 160 - snd_emu8000_detect(emu8000_t *emu) 160 + snd_emu8000_detect(struct snd_emu8000 *emu) 161 161 { 162 162 /* Initialise */ 163 163 EMU8000_HWCF1_WRITE(emu, 0x0059); ··· 183 183 * intiailize audio channels 184 184 */ 185 185 static void __init 186 - init_audio(emu8000_t *emu) 186 + init_audio(struct snd_emu8000 *emu) 187 187 { 188 188 int ch; 189 189 ··· 224 224 * initialize DMA address 225 225 */ 226 226 static void __init 227 - init_dma(emu8000_t *emu) 227 + init_dma(struct snd_emu8000 *emu) 228 228 { 229 229 EMU8000_SMALR_WRITE(emu, 0); 230 230 EMU8000_SMARR_WRITE(emu, 0); ··· 328 328 * is meant to work 329 329 */ 330 330 static void __init 331 - send_array(emu8000_t *emu, unsigned short *data, int size) 331 + send_array(struct snd_emu8000 *emu, unsigned short *data, int size) 332 332 { 333 333 int i; 334 334 unsigned short *p; ··· 350 350 * initialisation sequence in the adip. 351 351 */ 352 352 static void __init 353 - init_arrays(emu8000_t *emu) 353 + init_arrays(struct snd_emu8000 *emu) 354 354 { 355 355 send_array(emu, init1, ARRAY_SIZE(init1)/4); 356 356 ··· 376 376 * reallocating between read and write. 377 377 */ 378 378 static void __init 379 - size_dram(emu8000_t *emu) 379 + size_dram(struct snd_emu8000 *emu) 380 380 { 381 381 int i, size; 382 382 ··· 455 455 * and therefore lose 2 voices. 456 456 */ 457 457 /*exported*/ void 458 - snd_emu8000_init_fm(emu8000_t *emu) 458 + snd_emu8000_init_fm(struct snd_emu8000 *emu) 459 459 { 460 460 unsigned long flags; 461 461 ··· 501 501 * The main initialization routine. 502 502 */ 503 503 static void __init 504 - snd_emu8000_init_hw(emu8000_t *emu) 504 + snd_emu8000_init_hw(struct snd_emu8000 *emu) 505 505 { 506 506 int i; 507 507 ··· 585 585 * set Emu8000 digital equalizer; from 0 to 11 [-12dB - 12dB] 586 586 */ 587 587 /*exported*/ void 588 - snd_emu8000_update_equalizer(emu8000_t *emu) 588 + snd_emu8000_update_equalizer(struct snd_emu8000 *emu) 589 589 { 590 590 unsigned short w; 591 591 int bass = emu->bass_level; ··· 628 628 /* user can define chorus modes up to 32 */ 629 629 #define SNDRV_EMU8000_CHORUS_NUMBERS 32 630 630 631 - typedef struct soundfont_chorus_fx_t { 631 + struct soundfont_chorus_fx { 632 632 unsigned short feedback; /* feedback level (0xE600-0xE6FF) */ 633 633 unsigned short delay_offset; /* delay (0-0x0DA3) [1/44100 sec] */ 634 634 unsigned short lfo_depth; /* LFO depth (0xBC00-0xBCFF) */ 635 635 unsigned int delay; /* right delay (0-0xFFFFFFFF) [1/256/44100 sec] */ 636 636 unsigned int lfo_freq; /* LFO freq LFO freq (0-0xFFFFFFFF) */ 637 - } soundfont_chorus_fx_t; 637 + }; 638 638 639 639 /* 5 parameters for each chorus mode; 3 x 16bit, 2 x 32bit */ 640 640 static char chorus_defined[SNDRV_EMU8000_CHORUS_NUMBERS]; 641 - static soundfont_chorus_fx_t chorus_parm[SNDRV_EMU8000_CHORUS_NUMBERS] = { 641 + static struct soundfont_chorus_fx chorus_parm[SNDRV_EMU8000_CHORUS_NUMBERS] = { 642 642 {0xE600, 0x03F6, 0xBC2C ,0x00000000, 0x0000006D}, /* chorus 1 */ 643 643 {0xE608, 0x031A, 0xBC6E, 0x00000000, 0x0000017C}, /* chorus 2 */ 644 644 {0xE610, 0x031A, 0xBC84, 0x00000000, 0x00000083}, /* chorus 3 */ ··· 650 650 }; 651 651 652 652 /*exported*/ int 653 - snd_emu8000_load_chorus_fx(emu8000_t *emu, int mode, const void __user *buf, long len) 653 + snd_emu8000_load_chorus_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len) 654 654 { 655 - soundfont_chorus_fx_t rec; 655 + struct soundfont_chorus_fx rec; 656 656 if (mode < SNDRV_EMU8000_CHORUS_PREDEFINED || mode >= SNDRV_EMU8000_CHORUS_NUMBERS) { 657 657 snd_printk(KERN_WARNING "invalid chorus mode %d for uploading\n", mode); 658 658 return -EINVAL; ··· 665 665 } 666 666 667 667 /*exported*/ void 668 - snd_emu8000_update_chorus_mode(emu8000_t *emu) 668 + snd_emu8000_update_chorus_mode(struct snd_emu8000 *emu) 669 669 { 670 670 int effect = emu->chorus_mode; 671 671 if (effect < 0 || effect >= SNDRV_EMU8000_CHORUS_NUMBERS || ··· 699 699 /* user can define reverb modes up to 32 */ 700 700 #define SNDRV_EMU8000_REVERB_NUMBERS 32 701 701 702 - typedef struct soundfont_reverb_fx_t { 702 + struct soundfont_reverb_fx { 703 703 unsigned short parms[28]; 704 - } soundfont_reverb_fx_t; 704 + }; 705 705 706 706 /* reverb mode settings; write the following 28 data of 16 bit length 707 707 * on the corresponding ports in the reverb_cmds array 708 708 */ 709 709 static char reverb_defined[SNDRV_EMU8000_CHORUS_NUMBERS]; 710 - static soundfont_reverb_fx_t reverb_parm[SNDRV_EMU8000_REVERB_NUMBERS] = { 710 + static struct soundfont_reverb_fx reverb_parm[SNDRV_EMU8000_REVERB_NUMBERS] = { 711 711 {{ /* room 1 */ 712 712 0xB488, 0xA450, 0x9550, 0x84B5, 0x383A, 0x3EB5, 0x72F4, 713 713 0x72A4, 0x7254, 0x7204, 0x7204, 0x7204, 0x4416, 0x4516, ··· 777 777 }; 778 778 779 779 /*exported*/ int 780 - snd_emu8000_load_reverb_fx(emu8000_t *emu, int mode, const void __user *buf, long len) 780 + snd_emu8000_load_reverb_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len) 781 781 { 782 - soundfont_reverb_fx_t rec; 782 + struct soundfont_reverb_fx rec; 783 783 784 784 if (mode < SNDRV_EMU8000_REVERB_PREDEFINED || mode >= SNDRV_EMU8000_REVERB_NUMBERS) { 785 785 snd_printk(KERN_WARNING "invalid reverb mode %d for uploading\n", mode); ··· 793 793 } 794 794 795 795 /*exported*/ void 796 - snd_emu8000_update_reverb_mode(emu8000_t *emu) 796 + snd_emu8000_update_reverb_mode(struct snd_emu8000 *emu) 797 797 { 798 798 int effect = emu->reverb_mode; 799 799 int i; ··· 819 819 /* 820 820 * bass/treble 821 821 */ 822 - static int mixer_bass_treble_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 822 + static int mixer_bass_treble_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 823 823 { 824 824 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 825 825 uinfo->count = 1; ··· 828 828 return 0; 829 829 } 830 830 831 - static int mixer_bass_treble_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 831 + static int mixer_bass_treble_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 832 832 { 833 - emu8000_t *emu = snd_kcontrol_chip(kcontrol); 833 + struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol); 834 834 835 835 ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->treble_level : emu->bass_level; 836 836 return 0; 837 837 } 838 838 839 - static int mixer_bass_treble_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 839 + static int mixer_bass_treble_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 840 840 { 841 - emu8000_t *emu = snd_kcontrol_chip(kcontrol); 841 + struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol); 842 842 unsigned long flags; 843 843 int change; 844 844 unsigned short val1; ··· 857 857 return change; 858 858 } 859 859 860 - static snd_kcontrol_new_t mixer_bass_control = 860 + static struct snd_kcontrol_new mixer_bass_control = 861 861 { 862 862 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 863 863 .name = "Synth Tone Control - Bass", ··· 867 867 .private_value = 0, 868 868 }; 869 869 870 - static snd_kcontrol_new_t mixer_treble_control = 870 + static struct snd_kcontrol_new mixer_treble_control = 871 871 { 872 872 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 873 873 .name = "Synth Tone Control - Treble", ··· 880 880 /* 881 881 * chorus/reverb mode 882 882 */ 883 - static int mixer_chorus_reverb_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 883 + static int mixer_chorus_reverb_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 884 884 { 885 885 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 886 886 uinfo->count = 1; ··· 889 889 return 0; 890 890 } 891 891 892 - static int mixer_chorus_reverb_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 892 + static int mixer_chorus_reverb_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 893 893 { 894 - emu8000_t *emu = snd_kcontrol_chip(kcontrol); 894 + struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol); 895 895 896 896 ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->chorus_mode : emu->reverb_mode; 897 897 return 0; 898 898 } 899 899 900 - static int mixer_chorus_reverb_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 900 + static int mixer_chorus_reverb_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 901 901 { 902 - emu8000_t *emu = snd_kcontrol_chip(kcontrol); 902 + struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol); 903 903 unsigned long flags; 904 904 int change; 905 905 unsigned short val1; ··· 924 924 return change; 925 925 } 926 926 927 - static snd_kcontrol_new_t mixer_chorus_mode_control = 927 + static struct snd_kcontrol_new mixer_chorus_mode_control = 928 928 { 929 929 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 930 930 .name = "Chorus Mode", ··· 934 934 .private_value = 1, 935 935 }; 936 936 937 - static snd_kcontrol_new_t mixer_reverb_mode_control = 937 + static struct snd_kcontrol_new mixer_reverb_mode_control = 938 938 { 939 939 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 940 940 .name = "Reverb Mode", ··· 947 947 /* 948 948 * FM OPL3 chorus/reverb depth 949 949 */ 950 - static int mixer_fm_depth_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 950 + static int mixer_fm_depth_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 951 951 { 952 952 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 953 953 uinfo->count = 1; ··· 956 956 return 0; 957 957 } 958 958 959 - static int mixer_fm_depth_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 959 + static int mixer_fm_depth_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 960 960 { 961 - emu8000_t *emu = snd_kcontrol_chip(kcontrol); 961 + struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol); 962 962 963 963 ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->fm_chorus_depth : emu->fm_reverb_depth; 964 964 return 0; 965 965 } 966 966 967 - static int mixer_fm_depth_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 967 + static int mixer_fm_depth_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 968 968 { 969 - emu8000_t *emu = snd_kcontrol_chip(kcontrol); 969 + struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol); 970 970 unsigned long flags; 971 971 int change; 972 972 unsigned short val1; ··· 986 986 return change; 987 987 } 988 988 989 - static snd_kcontrol_new_t mixer_fm_chorus_depth_control = 989 + static struct snd_kcontrol_new mixer_fm_chorus_depth_control = 990 990 { 991 991 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 992 992 .name = "FM Chorus Depth", ··· 996 996 .private_value = 1, 997 997 }; 998 998 999 - static snd_kcontrol_new_t mixer_fm_reverb_depth_control = 999 + static struct snd_kcontrol_new mixer_fm_reverb_depth_control = 1000 1000 { 1001 1001 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1002 1002 .name = "FM Reverb Depth", ··· 1007 1007 }; 1008 1008 1009 1009 1010 - static snd_kcontrol_new_t *mixer_defs[EMU8000_NUM_CONTROLS] = { 1010 + static struct snd_kcontrol_new *mixer_defs[EMU8000_NUM_CONTROLS] = { 1011 1011 &mixer_bass_control, 1012 1012 &mixer_treble_control, 1013 1013 &mixer_chorus_mode_control, ··· 1020 1020 * create and attach mixer elements for WaveTable treble/bass controls 1021 1021 */ 1022 1022 static int __init 1023 - snd_emu8000_create_mixer(snd_card_t *card, emu8000_t *emu) 1023 + snd_emu8000_create_mixer(struct snd_card *card, struct snd_emu8000 *emu) 1024 1024 { 1025 1025 int i, err = 0; 1026 1026 ··· 1049 1049 /* 1050 1050 * free resources 1051 1051 */ 1052 - static int snd_emu8000_free(emu8000_t *hw) 1052 + static int snd_emu8000_free(struct snd_emu8000 *hw) 1053 1053 { 1054 1054 release_and_free_resource(hw->res_port1); 1055 1055 release_and_free_resource(hw->res_port2); ··· 1060 1060 1061 1061 /* 1062 1062 */ 1063 - static int snd_emu8000_dev_free(snd_device_t *device) 1063 + static int snd_emu8000_dev_free(struct snd_device *device) 1064 1064 { 1065 - emu8000_t *hw = device->device_data; 1065 + struct snd_emu8000 *hw = device->device_data; 1066 1066 return snd_emu8000_free(hw); 1067 1067 } 1068 1068 ··· 1070 1070 * initialize and register emu8000 synth device. 1071 1071 */ 1072 1072 int __init 1073 - snd_emu8000_new(snd_card_t *card, int index, long port, int seq_ports, snd_seq_device_t **awe_ret) 1073 + snd_emu8000_new(struct snd_card *card, int index, long port, int seq_ports, 1074 + struct snd_seq_device **awe_ret) 1074 1075 { 1075 - snd_seq_device_t *awe; 1076 - emu8000_t *hw; 1076 + struct snd_seq_device *awe; 1077 + struct snd_emu8000 *hw; 1077 1078 int err; 1078 - static snd_device_ops_t ops = { 1079 + static struct snd_device_ops ops = { 1079 1080 .dev_free = snd_emu8000_dev_free, 1080 1081 }; 1081 1082 ··· 1128 1127 } 1129 1128 #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) 1130 1129 if (snd_seq_device_new(card, index, SNDRV_SEQ_DEV_ID_EMU8000, 1131 - sizeof(emu8000_t*), &awe) >= 0) { 1130 + sizeof(struct snd_emu8000*), &awe) >= 0) { 1132 1131 strcpy(awe->name, "EMU-8000"); 1133 - *(emu8000_t**)SNDRV_SEQ_DEVICE_ARGPTR(awe) = hw; 1132 + *(struct snd_emu8000 **)SNDRV_SEQ_DEVICE_ARGPTR(awe) = hw; 1134 1133 } 1135 1134 #else 1136 1135 awe = NULL;
+54 -51
sound/isa/sb/emu8000_callback.c
··· 25 25 /* 26 26 * prototypes 27 27 */ 28 - static snd_emux_voice_t *get_voice(snd_emux_t *emu, snd_emux_port_t *port); 29 - static int start_voice(snd_emux_voice_t *vp); 30 - static void trigger_voice(snd_emux_voice_t *vp); 31 - static void release_voice(snd_emux_voice_t *vp); 32 - static void update_voice(snd_emux_voice_t *vp, int update); 33 - static void reset_voice(snd_emux_t *emu, int ch); 34 - static void terminate_voice(snd_emux_voice_t *vp); 35 - static void sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset); 28 + static struct snd_emux_voice *get_voice(struct snd_emux *emu, 29 + struct snd_emux_port *port); 30 + static int start_voice(struct snd_emux_voice *vp); 31 + static void trigger_voice(struct snd_emux_voice *vp); 32 + static void release_voice(struct snd_emux_voice *vp); 33 + static void update_voice(struct snd_emux_voice *vp, int update); 34 + static void reset_voice(struct snd_emux *emu, int ch); 35 + static void terminate_voice(struct snd_emux_voice *vp); 36 + static void sysex(struct snd_emux *emu, char *buf, int len, int parsed, 37 + struct snd_midi_channel_set *chset); 36 38 #ifdef CONFIG_SND_SEQUENCER_OSS 37 - static int oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2); 39 + static int oss_ioctl(struct snd_emux *emu, int cmd, int p1, int p2); 38 40 #endif 39 - static int load_fx(snd_emux_t *emu, int type, int mode, const void __user *buf, long len); 41 + static int load_fx(struct snd_emux *emu, int type, int mode, 42 + const void __user *buf, long len); 40 43 41 - static void set_pitch(emu8000_t *hw, snd_emux_voice_t *vp); 42 - static void set_volume(emu8000_t *hw, snd_emux_voice_t *vp); 43 - static void set_pan(emu8000_t *hw, snd_emux_voice_t *vp); 44 - static void set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp); 45 - static void set_tremfreq(emu8000_t *hw, snd_emux_voice_t *vp); 46 - static void set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp); 47 - static void set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp); 48 - static void snd_emu8000_tweak_voice(emu8000_t *emu, int ch); 44 + static void set_pitch(struct snd_emu8000 *hw, struct snd_emux_voice *vp); 45 + static void set_volume(struct snd_emu8000 *hw, struct snd_emux_voice *vp); 46 + static void set_pan(struct snd_emu8000 *hw, struct snd_emux_voice *vp); 47 + static void set_fmmod(struct snd_emu8000 *hw, struct snd_emux_voice *vp); 48 + static void set_tremfreq(struct snd_emu8000 *hw, struct snd_emux_voice *vp); 49 + static void set_fm2frq2(struct snd_emu8000 *hw, struct snd_emux_voice *vp); 50 + static void set_filterQ(struct snd_emu8000 *hw, struct snd_emux_voice *vp); 51 + static void snd_emu8000_tweak_voice(struct snd_emu8000 *emu, int ch); 49 52 50 53 /* 51 54 * Ensure a value is between two points ··· 61 58 /* 62 59 * set up operators 63 60 */ 64 - static snd_emux_operators_t emu8000_ops = { 61 + static struct snd_emux_operators emu8000_ops = { 65 62 .owner = THIS_MODULE, 66 63 .get_voice = get_voice, 67 64 .prepare = start_voice, ··· 81 78 }; 82 79 83 80 void 84 - snd_emu8000_ops_setup(emu8000_t *hw) 81 + snd_emu8000_ops_setup(struct snd_emu8000 *hw) 85 82 { 86 83 hw->emu->ops = emu8000_ops; 87 84 } ··· 92 89 * Terminate a voice 93 90 */ 94 91 static void 95 - release_voice(snd_emux_voice_t *vp) 92 + release_voice(struct snd_emux_voice *vp) 96 93 { 97 94 int dcysusv; 98 - emu8000_t *hw; 95 + struct snd_emu8000 *hw; 99 96 100 97 hw = vp->hw; 101 98 dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease; ··· 108 105 /* 109 106 */ 110 107 static void 111 - terminate_voice(snd_emux_voice_t *vp) 108 + terminate_voice(struct snd_emux_voice *vp) 112 109 { 113 - emu8000_t *hw; 110 + struct snd_emu8000 *hw; 114 111 115 112 hw = vp->hw; 116 113 EMU8000_DCYSUSV_WRITE(hw, vp->ch, 0x807F); ··· 120 117 /* 121 118 */ 122 119 static void 123 - update_voice(snd_emux_voice_t *vp, int update) 120 + update_voice(struct snd_emux_voice *vp, int update) 124 121 { 125 - emu8000_t *hw; 122 + struct snd_emu8000 *hw; 126 123 127 124 hw = vp->hw; 128 125 if (update & SNDRV_EMUX_UPDATE_VOLUME) ··· 152 149 * The channel index (vp->ch) must be initialized in this routine. 153 150 * In Emu8k, it is identical with the array index. 154 151 */ 155 - static snd_emux_voice_t * 156 - get_voice(snd_emux_t *emu, snd_emux_port_t *port) 152 + static struct snd_emux_voice * 153 + get_voice(struct snd_emux *emu, struct snd_emux_port *port) 157 154 { 158 155 int i; 159 - snd_emux_voice_t *vp; 160 - emu8000_t *hw; 156 + struct snd_emux_voice *vp; 157 + struct snd_emu8000 *hw; 161 158 162 159 /* what we are looking for, in order of preference */ 163 160 enum { ··· 230 227 /* 231 228 */ 232 229 static int 233 - start_voice(snd_emux_voice_t *vp) 230 + start_voice(struct snd_emux_voice *vp) 234 231 { 235 232 unsigned int temp; 236 233 int ch; 237 234 int addr; 238 - snd_midi_channel_t *chan; 239 - emu8000_t *hw; 235 + struct snd_midi_channel *chan; 236 + struct snd_emu8000 *hw; 240 237 241 238 hw = vp->hw; 242 239 ch = vp->ch; ··· 310 307 * Start envelope 311 308 */ 312 309 static void 313 - trigger_voice(snd_emux_voice_t *vp) 310 + trigger_voice(struct snd_emux_voice *vp) 314 311 { 315 312 int ch = vp->ch; 316 313 unsigned int temp; 317 - emu8000_t *hw; 314 + struct snd_emu8000 *hw; 318 315 319 316 hw = vp->hw; 320 317 ··· 332 329 * reset voice parameters 333 330 */ 334 331 static void 335 - reset_voice(snd_emux_t *emu, int ch) 332 + reset_voice(struct snd_emux *emu, int ch) 336 333 { 337 - emu8000_t *hw; 334 + struct snd_emu8000 *hw; 338 335 339 336 hw = emu->hw; 340 337 EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F); ··· 345 342 * Set the pitch of a possibly playing note. 346 343 */ 347 344 static void 348 - set_pitch(emu8000_t *hw, snd_emux_voice_t *vp) 345 + set_pitch(struct snd_emu8000 *hw, struct snd_emux_voice *vp) 349 346 { 350 347 EMU8000_IP_WRITE(hw, vp->ch, vp->apitch); 351 348 } ··· 354 351 * Set the volume of a possibly already playing note 355 352 */ 356 353 static void 357 - set_volume(emu8000_t *hw, snd_emux_voice_t *vp) 354 + set_volume(struct snd_emu8000 *hw, struct snd_emux_voice *vp) 358 355 { 359 356 int ifatn; 360 357 ··· 368 365 * Set pan and loop start address. 369 366 */ 370 367 static void 371 - set_pan(emu8000_t *hw, snd_emux_voice_t *vp) 368 + set_pan(struct snd_emu8000 *hw, struct snd_emux_voice *vp) 372 369 { 373 370 unsigned int temp; 374 371 ··· 379 376 #define MOD_SENSE 18 380 377 381 378 static void 382 - set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp) 379 + set_fmmod(struct snd_emu8000 *hw, struct snd_emux_voice *vp) 383 380 { 384 381 unsigned short fmmod; 385 382 short pitch; ··· 397 394 398 395 /* set tremolo (lfo1) volume & frequency */ 399 396 static void 400 - set_tremfreq(emu8000_t *hw, snd_emux_voice_t *vp) 397 + set_tremfreq(struct snd_emu8000 *hw, struct snd_emux_voice *vp) 401 398 { 402 399 EMU8000_TREMFRQ_WRITE(hw, vp->ch, vp->reg.parm.tremfrq); 403 400 } 404 401 405 402 /* set lfo2 pitch & frequency */ 406 403 static void 407 - set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp) 404 + set_fm2frq2(struct snd_emu8000 *hw, struct snd_emux_voice *vp) 408 405 { 409 406 unsigned short fm2frq2; 410 407 short pitch; ··· 422 419 423 420 /* set filterQ */ 424 421 static void 425 - set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp) 422 + set_filterQ(struct snd_emu8000 *hw, struct snd_emux_voice *vp) 426 423 { 427 424 unsigned int addr; 428 425 addr = EMU8000_CCCA_READ(hw, vp->ch) & 0xffffff; ··· 434 431 * set the envelope & LFO parameters to the default values 435 432 */ 436 433 static void 437 - snd_emu8000_tweak_voice(emu8000_t *emu, int i) 434 + snd_emu8000_tweak_voice(struct snd_emu8000 *emu, int i) 438 435 { 439 436 /* set all mod/vol envelope shape to minimum */ 440 437 EMU8000_ENVVOL_WRITE(emu, i, 0x8000); ··· 456 453 * sysex callback 457 454 */ 458 455 static void 459 - sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset) 456 + sysex(struct snd_emux *emu, char *buf, int len, int parsed, struct snd_midi_channel_set *chset) 460 457 { 461 - emu8000_t *hw; 458 + struct snd_emu8000 *hw; 462 459 463 460 hw = emu->hw; 464 461 ··· 481 478 * OSS ioctl callback 482 479 */ 483 480 static int 484 - oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2) 481 + oss_ioctl(struct snd_emux *emu, int cmd, int p1, int p2) 485 482 { 486 - emu8000_t *hw; 483 + struct snd_emu8000 *hw; 487 484 488 485 hw = emu->hw; 489 486 ··· 526 523 */ 527 524 528 525 static int 529 - load_fx(snd_emux_t *emu, int type, int mode, const void __user *buf, long len) 526 + load_fx(struct snd_emux *emu, int type, int mode, const void __user *buf, long len) 530 527 { 531 - emu8000_t *hw; 528 + struct snd_emu8000 *hw; 532 529 hw = emu->hw; 533 530 534 531 /* skip header */
+8 -5
sound/isa/sb/emu8000_local.h
··· 30 30 #include <sound/emu8000_reg.h> 31 31 32 32 /* emu8000_patch.c */ 33 - int snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void __user *data, long count); 34 - int snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr); 35 - void snd_emu8000_sample_reset(snd_emux_t *rec); 33 + int snd_emu8000_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp, 34 + struct snd_util_memhdr *hdr, 35 + const void __user *data, long count); 36 + int snd_emu8000_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp, 37 + struct snd_util_memhdr *hdr); 38 + void snd_emu8000_sample_reset(struct snd_emux *rec); 36 39 37 40 /* emu8000_callback.c */ 38 - void snd_emu8000_ops_setup(emu8000_t *emu); 41 + void snd_emu8000_ops_setup(struct snd_emu8000 *emu); 39 42 40 43 /* emu8000_pcm.c */ 41 - int snd_emu8000_pcm_new(snd_card_t *card, emu8000_t *emu, int index); 44 + int snd_emu8000_pcm_new(struct snd_card *card, struct snd_emu8000 *emu, int index); 42 45 43 46 #endif /* __EMU8000_LOCAL_H */
+11 -9
sound/isa/sb/emu8000_patch.c
··· 32 32 * Open up channels. 33 33 */ 34 34 static int 35 - snd_emu8000_open_dma(emu8000_t *emu, int write) 35 + snd_emu8000_open_dma(struct snd_emu8000 *emu, int write) 36 36 { 37 37 int i; 38 38 ··· 59 59 * Close all dram channels. 60 60 */ 61 61 static void 62 - snd_emu8000_close_dma(emu8000_t *emu) 62 + snd_emu8000_close_dma(struct snd_emu8000 *emu) 63 63 { 64 64 int i; 65 65 ··· 106 106 /* 107 107 */ 108 108 static void 109 - snd_emu8000_write_wait(emu8000_t *emu) 109 + snd_emu8000_write_wait(struct snd_emu8000 *emu) 110 110 { 111 111 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) { 112 112 schedule_timeout_interruptible(1); ··· 128 128 * working. 129 129 */ 130 130 static inline void 131 - write_word(emu8000_t *emu, int *offset, unsigned short data) 131 + write_word(struct snd_emu8000 *emu, int *offset, unsigned short data) 132 132 { 133 133 if (emu8000_reset_addr) { 134 134 if (emu8000_reset_addr > 1) ··· 144 144 * the generic soundfont routines as a callback. 145 145 */ 146 146 int 147 - snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, 148 - snd_util_memhdr_t *hdr, const void __user *data, long count) 147 + snd_emu8000_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp, 148 + struct snd_util_memhdr *hdr, 149 + const void __user *data, long count) 149 150 { 150 151 int i; 151 152 int rc; 152 153 int offset; 153 154 int truesize; 154 155 int dram_offset, dram_start; 155 - emu8000_t *emu; 156 + struct snd_emu8000 *emu; 156 157 157 158 emu = rec->hw; 158 159 snd_assert(sp != NULL, return -EINVAL); ··· 283 282 * free a sample block 284 283 */ 285 284 int 286 - snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr) 285 + snd_emu8000_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp, 286 + struct snd_util_memhdr *hdr) 287 287 { 288 288 if (sp->block) { 289 289 snd_util_mem_free(hdr, sp->block); ··· 298 296 * sample_reset callback - terminate voices 299 297 */ 300 298 void 301 - snd_emu8000_sample_reset(snd_emux_t *rec) 299 + snd_emu8000_sample_reset(struct snd_emux *rec) 302 300 { 303 301 snd_emux_terminate_all(rec); 304 302 }
+51 -53
sound/isa/sb/emu8000_pcm.c
··· 46 46 */ 47 47 48 48 49 - typedef struct snd_emu8k_pcm emu8k_pcm_t; 50 - 51 49 struct snd_emu8k_pcm { 52 - emu8000_t *emu; 53 - snd_pcm_substream_t *substream; 50 + struct snd_emu8000 *emu; 51 + struct snd_pcm_substream *substream; 54 52 55 53 unsigned int allocated_bytes; 56 - snd_util_memblk_t *block; 54 + struct snd_util_memblk *block; 57 55 unsigned int offset; 58 56 unsigned int buf_size; 59 57 unsigned int period_size; ··· 75 77 * open up channels for the simultaneous data transfer and playback 76 78 */ 77 79 static int 78 - emu8k_open_dram_for_pcm(emu8000_t *emu, int channels) 80 + emu8k_open_dram_for_pcm(struct snd_emu8000 *emu, int channels) 79 81 { 80 82 int i; 81 83 ··· 111 113 /* 112 114 */ 113 115 static void 114 - snd_emu8000_write_wait(emu8000_t *emu, int can_schedule) 116 + snd_emu8000_write_wait(struct snd_emu8000 *emu, int can_schedule) 115 117 { 116 118 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) { 117 119 if (can_schedule) { ··· 126 128 * close all channels 127 129 */ 128 130 static void 129 - emu8k_close_dram(emu8000_t *emu) 131 + emu8k_close_dram(struct snd_emu8000 *emu) 130 132 { 131 133 int i; 132 134 ··· 154 156 /* 155 157 */ 156 158 157 - static snd_pcm_hardware_t emu8k_pcm_hw = { 159 + static struct snd_pcm_hardware emu8k_pcm_hw = { 158 160 #ifdef USE_NONINTERLEAVE 159 161 .info = SNDRV_PCM_INFO_NONINTERLEAVED, 160 162 #else ··· 178 180 /* 179 181 * get the current position at the given channel from CCCA register 180 182 */ 181 - static inline int emu8k_get_curpos(emu8k_pcm_t *rec, int ch) 183 + static inline int emu8k_get_curpos(struct snd_emu8k_pcm *rec, int ch) 182 184 { 183 185 int val = EMU8000_CCCA_READ(rec->emu, ch) & 0xfffffff; 184 186 val -= rec->loop_start[ch] - 1; ··· 192 194 */ 193 195 static void emu8k_pcm_timer_func(unsigned long data) 194 196 { 195 - emu8k_pcm_t *rec = (emu8k_pcm_t *)data; 197 + struct snd_emu8k_pcm *rec = (struct snd_emu8k_pcm *)data; 196 198 int ptr, delta; 197 199 198 200 spin_lock(&rec->timer_lock); ··· 224 226 * open pcm 225 227 * creating an instance here 226 228 */ 227 - static int emu8k_pcm_open(snd_pcm_substream_t *subs) 229 + static int emu8k_pcm_open(struct snd_pcm_substream *subs) 228 230 { 229 - emu8000_t *emu = snd_pcm_substream_chip(subs); 230 - emu8k_pcm_t *rec; 231 - snd_pcm_runtime_t *runtime = subs->runtime; 231 + struct snd_emu8000 *emu = snd_pcm_substream_chip(subs); 232 + struct snd_emu8k_pcm *rec; 233 + struct snd_pcm_runtime *runtime = subs->runtime; 232 234 233 235 rec = kzalloc(sizeof(*rec), GFP_KERNEL); 234 236 if (! rec) ··· 254 256 return 0; 255 257 } 256 258 257 - static int emu8k_pcm_close(snd_pcm_substream_t *subs) 259 + static int emu8k_pcm_close(struct snd_pcm_substream *subs) 258 260 { 259 - emu8k_pcm_t *rec = subs->runtime->private_data; 261 + struct snd_emu8k_pcm *rec = subs->runtime->private_data; 260 262 kfree(rec); 261 263 subs->runtime->private_data = NULL; 262 264 return 0; ··· 279 281 /* 280 282 * set up the voice 281 283 */ 282 - static void setup_voice(emu8k_pcm_t *rec, int ch) 284 + static void setup_voice(struct snd_emu8k_pcm *rec, int ch) 283 285 { 284 - emu8000_t *hw = rec->emu; 286 + struct snd_emu8000 *hw = rec->emu; 285 287 unsigned int temp; 286 288 287 289 /* channel to be silent and idle */ ··· 332 334 /* 333 335 * trigger the voice 334 336 */ 335 - static void start_voice(emu8k_pcm_t *rec, int ch) 337 + static void start_voice(struct snd_emu8k_pcm *rec, int ch) 336 338 { 337 339 unsigned long flags; 338 - emu8000_t *hw = rec->emu; 340 + struct snd_emu8000 *hw = rec->emu; 339 341 unsigned int temp, aux; 340 342 int pt = calc_pitch_target(rec->pitch); 341 343 ··· 368 370 /* 369 371 * stop the voice immediately 370 372 */ 371 - static void stop_voice(emu8k_pcm_t *rec, int ch) 373 + static void stop_voice(struct snd_emu8k_pcm *rec, int ch) 372 374 { 373 375 unsigned long flags; 374 - emu8000_t *hw = rec->emu; 376 + struct snd_emu8000 *hw = rec->emu; 375 377 376 378 EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F); 377 379 ··· 384 386 spin_unlock_irqrestore(&rec->timer_lock, flags); 385 387 } 386 388 387 - static int emu8k_pcm_trigger(snd_pcm_substream_t *subs, int cmd) 389 + static int emu8k_pcm_trigger(struct snd_pcm_substream *subs, int cmd) 388 390 { 389 - emu8k_pcm_t *rec = subs->runtime->private_data; 391 + struct snd_emu8k_pcm *rec = subs->runtime->private_data; 390 392 int ch; 391 393 392 394 switch (cmd) { ··· 426 428 427 429 #ifdef USE_NONINTERLEAVE 428 430 /* copy one channel block */ 429 - static int emu8k_transfer_block(emu8000_t *emu, int offset, unsigned short *buf, int count) 431 + static int emu8k_transfer_block(struct snd_emu8000 *emu, int offset, unsigned short *buf, int count) 430 432 { 431 433 EMU8000_SMALW_WRITE(emu, offset); 432 434 while (count > 0) { ··· 440 442 return 0; 441 443 } 442 444 443 - static int emu8k_pcm_copy(snd_pcm_substream_t *subs, 445 + static int emu8k_pcm_copy(struct snd_pcm_substream *subs, 444 446 int voice, 445 447 snd_pcm_uframes_t pos, 446 448 void *src, 447 449 snd_pcm_uframes_t count) 448 450 { 449 - emu8k_pcm_t *rec = subs->runtime->private_data; 450 - emu8000_t *emu = rec->emu; 451 + struct snd_emu8k_pcm *rec = subs->runtime->private_data; 452 + struct snd_emu8000 *emu = rec->emu; 451 453 452 454 snd_emu8000_write_wait(emu, 1); 453 455 if (voice == -1) { ··· 467 469 } 468 470 469 471 /* make a channel block silence */ 470 - static int emu8k_silence_block(emu8000_t *emu, int offset, int count) 472 + static int emu8k_silence_block(struct snd_emu8000 *emu, int offset, int count) 471 473 { 472 474 EMU8000_SMALW_WRITE(emu, offset); 473 475 while (count > 0) { ··· 478 480 return 0; 479 481 } 480 482 481 - static int emu8k_pcm_silence(snd_pcm_substream_t *subs, 483 + static int emu8k_pcm_silence(struct snd_pcm_substream *subs, 482 484 int voice, 483 485 snd_pcm_uframes_t pos, 484 486 snd_pcm_uframes_t count) 485 487 { 486 - emu8k_pcm_t *rec = subs->runtime->private_data; 487 - emu8000_t *emu = rec->emu; 488 + struct snd_emu8k_pcm *rec = subs->runtime->private_data; 489 + struct snd_emu8000 *emu = rec->emu; 488 490 489 491 snd_emu8000_write_wait(emu, 1); 490 492 if (voice == -1 && rec->voices == 1) ··· 506 508 * copy the interleaved data can be done easily by using 507 509 * DMA "left" and "right" channels on emu8k engine. 508 510 */ 509 - static int emu8k_pcm_copy(snd_pcm_substream_t *subs, 511 + static int emu8k_pcm_copy(struct snd_pcm_substream *subs, 510 512 int voice, 511 513 snd_pcm_uframes_t pos, 512 514 void __user *src, 513 515 snd_pcm_uframes_t count) 514 516 { 515 - emu8k_pcm_t *rec = subs->runtime->private_data; 516 - emu8000_t *emu = rec->emu; 517 + struct snd_emu8k_pcm *rec = subs->runtime->private_data; 518 + struct snd_emu8000 *emu = rec->emu; 517 519 unsigned short __user *buf = src; 518 520 519 521 snd_emu8000_write_wait(emu, 1); ··· 537 539 return 0; 538 540 } 539 541 540 - static int emu8k_pcm_silence(snd_pcm_substream_t *subs, 542 + static int emu8k_pcm_silence(struct snd_pcm_substream *subs, 541 543 int voice, 542 544 snd_pcm_uframes_t pos, 543 545 snd_pcm_uframes_t count) 544 546 { 545 - emu8k_pcm_t *rec = subs->runtime->private_data; 546 - emu8000_t *emu = rec->emu; 547 + struct snd_emu8k_pcm *rec = subs->runtime->private_data; 548 + struct snd_emu8000 *emu = rec->emu; 547 549 548 550 snd_emu8000_write_wait(emu, 1); 549 551 EMU8000_SMALW_WRITE(emu, rec->loop_start[0] + pos); ··· 565 567 /* 566 568 * allocate a memory block 567 569 */ 568 - static int emu8k_pcm_hw_params(snd_pcm_substream_t *subs, 569 - snd_pcm_hw_params_t *hw_params) 570 + static int emu8k_pcm_hw_params(struct snd_pcm_substream *subs, 571 + struct snd_pcm_hw_params *hw_params) 570 572 { 571 - emu8k_pcm_t *rec = subs->runtime->private_data; 573 + struct snd_emu8k_pcm *rec = subs->runtime->private_data; 572 574 573 575 if (rec->block) { 574 576 /* reallocation - release the old block */ ··· 590 592 /* 591 593 * free the memory block 592 594 */ 593 - static int emu8k_pcm_hw_free(snd_pcm_substream_t *subs) 595 + static int emu8k_pcm_hw_free(struct snd_pcm_substream *subs) 594 596 { 595 - emu8k_pcm_t *rec = subs->runtime->private_data; 597 + struct snd_emu8k_pcm *rec = subs->runtime->private_data; 596 598 597 599 if (rec->block) { 598 600 int ch; ··· 608 610 609 611 /* 610 612 */ 611 - static int emu8k_pcm_prepare(snd_pcm_substream_t *subs) 613 + static int emu8k_pcm_prepare(struct snd_pcm_substream *subs) 612 614 { 613 - emu8k_pcm_t *rec = subs->runtime->private_data; 615 + struct snd_emu8k_pcm *rec = subs->runtime->private_data; 614 616 615 617 rec->pitch = 0xe000 + calc_rate_offset(subs->runtime->rate); 616 618 rec->last_ptr = 0; ··· 654 656 return 0; 655 657 } 656 658 657 - static snd_pcm_uframes_t emu8k_pcm_pointer(snd_pcm_substream_t *subs) 659 + static snd_pcm_uframes_t emu8k_pcm_pointer(struct snd_pcm_substream *subs) 658 660 { 659 - emu8k_pcm_t *rec = subs->runtime->private_data; 661 + struct snd_emu8k_pcm *rec = subs->runtime->private_data; 660 662 if (rec->running) 661 663 return emu8k_get_curpos(rec, 0); 662 664 return 0; 663 665 } 664 666 665 667 666 - static snd_pcm_ops_t emu8k_pcm_ops = { 668 + static struct snd_pcm_ops emu8k_pcm_ops = { 667 669 .open = emu8k_pcm_open, 668 670 .close = emu8k_pcm_close, 669 671 .ioctl = snd_pcm_lib_ioctl, ··· 677 679 }; 678 680 679 681 680 - static void snd_emu8000_pcm_free(snd_pcm_t *pcm) 682 + static void snd_emu8000_pcm_free(struct snd_pcm *pcm) 681 683 { 682 - emu8000_t *emu = pcm->private_data; 684 + struct snd_emu8000 *emu = pcm->private_data; 683 685 emu->pcm = NULL; 684 686 } 685 687 686 - int snd_emu8000_pcm_new(snd_card_t *card, emu8000_t *emu, int index) 688 + int snd_emu8000_pcm_new(struct snd_card *card, struct snd_emu8000 *emu, int index) 687 689 { 688 - snd_pcm_t *pcm; 690 + struct snd_pcm *pcm; 689 691 int err; 690 692 691 693 if ((err = snd_pcm_new(card, "Emu8000 PCM", index, 1, 0, &pcm)) < 0)
+9 -8
sound/isa/sb/emu8000_synth.c
··· 33 33 /* 34 34 * create a new hardware dependent device for Emu8000 35 35 */ 36 - static int snd_emu8000_new_device(snd_seq_device_t *dev) 36 + static int snd_emu8000_new_device(struct snd_seq_device *dev) 37 37 { 38 - emu8000_t *hw; 39 - snd_emux_t *emu; 38 + struct snd_emu8000 *hw; 39 + struct snd_emux *emu; 40 40 41 - hw = *(emu8000_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev); 41 + hw = *(struct snd_emu8000**)SNDRV_SEQ_DEVICE_ARGPTR(dev); 42 42 if (hw == NULL) 43 43 return -EINVAL; 44 44 ··· 92 92 /* 93 93 * free all resources 94 94 */ 95 - static int snd_emu8000_delete_device(snd_seq_device_t *dev) 95 + static int snd_emu8000_delete_device(struct snd_seq_device *dev) 96 96 { 97 - emu8000_t *hw; 97 + struct snd_emu8000 *hw; 98 98 99 99 if (dev->driver_data == NULL) 100 100 return 0; /* no synth was allocated actually */ ··· 118 118 static int __init alsa_emu8000_init(void) 119 119 { 120 120 121 - static snd_seq_dev_ops_t ops = { 121 + static struct snd_seq_dev_ops ops = { 122 122 snd_emu8000_new_device, 123 123 snd_emu8000_delete_device, 124 124 }; 125 - return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU8000, &ops, sizeof(emu8000_t*)); 125 + return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU8000, &ops, 126 + sizeof(struct snd_emu8000*)); 126 127 } 127 128 128 129 static void __exit alsa_emu8000_exit(void)
+4 -4
sound/isa/sb/es968.c
··· 72 72 static irqreturn_t snd_card_es968_interrupt(int irq, void *dev_id, 73 73 struct pt_regs *regs) 74 74 { 75 - sb_t *chip = dev_id; 75 + struct snd_sb *chip = dev_id; 76 76 77 77 if (chip->open & SB_OPEN_PCM) { 78 78 return snd_sb8dsp_interrupt(chip); ··· 128 128 const struct pnp_card_device_id *pid) 129 129 { 130 130 int error; 131 - sb_t *chip; 132 - snd_card_t *card; 131 + struct snd_sb *chip; 132 + struct snd_card *card; 133 133 struct snd_card_es968 *acard; 134 134 135 135 if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE, ··· 200 200 201 201 static void __devexit snd_es968_pnp_remove(struct pnp_card_link * pcard) 202 202 { 203 - snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); 203 + struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard); 204 204 205 205 snd_card_disconnect(card); 206 206 snd_card_free_in_thread(card);
+8 -8
sound/isa/sb/sb16.c
··· 138 138 #endif 139 139 }; 140 140 141 - static snd_card_t *snd_sb16_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 141 + static struct snd_card *snd_sb16_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 142 142 143 143 #ifdef CONFIG_PNP 144 144 ··· 339 339 340 340 #endif /* CONFIG_PNP */ 341 341 342 - static void snd_sb16_free(snd_card_t *card) 342 + static void snd_sb16_free(struct snd_card *card) 343 343 { 344 344 struct snd_card_sb16 *acard = (struct snd_card_sb16 *)card->private_data; 345 345 ··· 362 362 static int possible_dmas8[] = {1, 3, 0, -1}; 363 363 static int possible_dmas16[] = {5, 6, 7, -1}; 364 364 int xirq, xdma8, xdma16; 365 - sb_t *chip; 366 - snd_card_t *card; 365 + struct snd_sb *chip; 366 + struct snd_card *card; 367 367 struct snd_card_sb16 *acard; 368 - opl3_t *opl3; 369 - snd_hwdep_t *synth = NULL; 368 + struct snd_opl3 *opl3; 369 + struct snd_hwdep *synth = NULL; 370 370 #ifdef CONFIG_SND_SB16_CSP 371 - snd_hwdep_t *xcsp = NULL; 371 + struct snd_hwdep *xcsp = NULL; 372 372 #endif 373 373 unsigned long flags; 374 374 int err; ··· 583 583 584 584 static void __devexit snd_sb16_pnp_remove(struct pnp_card_link * pcard) 585 585 { 586 - snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); 586 + struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard); 587 587 588 588 snd_card_disconnect(card); 589 589 snd_card_free_in_thread(card);
+83 -81
sound/isa/sb/sb16_csp.c
··· 72 72 /* 73 73 * prototypes 74 74 */ 75 - static void snd_sb_csp_free(snd_hwdep_t *hw); 76 - static int snd_sb_csp_open(snd_hwdep_t * hw, struct file *file); 77 - static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg); 78 - static int snd_sb_csp_release(snd_hwdep_t * hw, struct file *file); 75 + static void snd_sb_csp_free(struct snd_hwdep *hw); 76 + static int snd_sb_csp_open(struct snd_hwdep * hw, struct file *file); 77 + static int snd_sb_csp_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg); 78 + static int snd_sb_csp_release(struct snd_hwdep * hw, struct file *file); 79 79 80 - static int csp_detect(sb_t *chip, int *version); 81 - static int set_codec_parameter(sb_t *chip, unsigned char par, unsigned char val); 82 - static int set_register(sb_t *chip, unsigned char reg, unsigned char val); 83 - static int read_register(sb_t *chip, unsigned char reg); 84 - static int set_mode_register(sb_t *chip, unsigned char mode); 85 - static int get_version(sb_t *chip); 80 + static int csp_detect(struct snd_sb *chip, int *version); 81 + static int set_codec_parameter(struct snd_sb *chip, unsigned char par, unsigned char val); 82 + static int set_register(struct snd_sb *chip, unsigned char reg, unsigned char val); 83 + static int read_register(struct snd_sb *chip, unsigned char reg); 84 + static int set_mode_register(struct snd_sb *chip, unsigned char mode); 85 + static int get_version(struct snd_sb *chip); 86 86 87 - static int snd_sb_csp_riff_load(snd_sb_csp_t * p, snd_sb_csp_microcode_t __user * code); 88 - static int snd_sb_csp_unload(snd_sb_csp_t * p); 89 - static int snd_sb_csp_load_user(snd_sb_csp_t * p, const unsigned char __user *buf, int size, int load_flags); 90 - static int snd_sb_csp_autoload(snd_sb_csp_t * p, int pcm_sfmt, int play_rec_mode); 91 - static int snd_sb_csp_check_version(snd_sb_csp_t * p); 87 + static int snd_sb_csp_riff_load(struct snd_sb_csp * p, 88 + struct snd_sb_csp_microcode __user * code); 89 + static int snd_sb_csp_unload(struct snd_sb_csp * p); 90 + static int snd_sb_csp_load_user(struct snd_sb_csp * p, const unsigned char __user *buf, int size, int load_flags); 91 + static int snd_sb_csp_autoload(struct snd_sb_csp * p, int pcm_sfmt, int play_rec_mode); 92 + static int snd_sb_csp_check_version(struct snd_sb_csp * p); 92 93 93 - static int snd_sb_csp_use(snd_sb_csp_t * p); 94 - static int snd_sb_csp_unuse(snd_sb_csp_t * p); 95 - static int snd_sb_csp_start(snd_sb_csp_t * p, int sample_width, int channels); 96 - static int snd_sb_csp_stop(snd_sb_csp_t * p); 97 - static int snd_sb_csp_pause(snd_sb_csp_t * p); 98 - static int snd_sb_csp_restart(snd_sb_csp_t * p); 94 + static int snd_sb_csp_use(struct snd_sb_csp * p); 95 + static int snd_sb_csp_unuse(struct snd_sb_csp * p); 96 + static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channels); 97 + static int snd_sb_csp_stop(struct snd_sb_csp * p); 98 + static int snd_sb_csp_pause(struct snd_sb_csp * p); 99 + static int snd_sb_csp_restart(struct snd_sb_csp * p); 99 100 100 - static int snd_sb_qsound_build(snd_sb_csp_t * p); 101 - static void snd_sb_qsound_destroy(snd_sb_csp_t * p); 102 - static int snd_sb_csp_qsound_transfer(snd_sb_csp_t * p); 101 + static int snd_sb_qsound_build(struct snd_sb_csp * p); 102 + static void snd_sb_qsound_destroy(struct snd_sb_csp * p); 103 + static int snd_sb_csp_qsound_transfer(struct snd_sb_csp * p); 103 104 104 - static int init_proc_entry(snd_sb_csp_t * p, int device); 105 - static void info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer); 105 + static int init_proc_entry(struct snd_sb_csp * p, int device); 106 + static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer); 106 107 107 108 /* 108 109 * Detect CSP chip and create a new instance 109 110 */ 110 - int snd_sb_csp_new(sb_t *chip, int device, snd_hwdep_t ** rhwdep) 111 + int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep) 111 112 { 112 - snd_sb_csp_t *p; 113 + struct snd_sb_csp *p; 113 114 int version, err; 114 - snd_hwdep_t *hw; 115 + struct snd_hwdep *hw; 115 116 116 117 if (rhwdep) 117 118 *rhwdep = NULL; ··· 159 158 /* 160 159 * free_private for hwdep instance 161 160 */ 162 - static void snd_sb_csp_free(snd_hwdep_t *hwdep) 161 + static void snd_sb_csp_free(struct snd_hwdep *hwdep) 163 162 { 164 - snd_sb_csp_t *p = hwdep->private_data; 163 + struct snd_sb_csp *p = hwdep->private_data; 165 164 if (p) { 166 165 if (p->running & SNDRV_SB_CSP_ST_RUNNING) 167 166 snd_sb_csp_stop(p); ··· 174 173 /* 175 174 * open the device exclusively 176 175 */ 177 - static int snd_sb_csp_open(snd_hwdep_t * hw, struct file *file) 176 + static int snd_sb_csp_open(struct snd_hwdep * hw, struct file *file) 178 177 { 179 - snd_sb_csp_t *p = hw->private_data; 178 + struct snd_sb_csp *p = hw->private_data; 180 179 return (snd_sb_csp_use(p)); 181 180 } 182 181 183 182 /* 184 183 * ioctl for hwdep device: 185 184 */ 186 - static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg) 185 + static int snd_sb_csp_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg) 187 186 { 188 - snd_sb_csp_t *p = hw->private_data; 189 - snd_sb_csp_info_t info; 190 - snd_sb_csp_start_t start_info; 187 + struct snd_sb_csp *p = hw->private_data; 188 + struct snd_sb_csp_info info; 189 + struct snd_sb_csp_start start_info; 191 190 int err; 192 191 193 192 snd_assert(p != NULL, return -EINVAL); ··· 218 217 /* load CSP microcode */ 219 218 case SNDRV_SB_CSP_IOCTL_LOAD_CODE: 220 219 err = (p->running & SNDRV_SB_CSP_ST_RUNNING ? 221 - -EBUSY : snd_sb_csp_riff_load(p, (snd_sb_csp_microcode_t __user *) arg)); 220 + -EBUSY : snd_sb_csp_riff_load(p, (struct snd_sb_csp_microcode __user *) arg)); 222 221 break; 223 222 case SNDRV_SB_CSP_IOCTL_UNLOAD_CODE: 224 223 err = (p->running & SNDRV_SB_CSP_ST_RUNNING ? ··· 252 251 /* 253 252 * close the device 254 253 */ 255 - static int snd_sb_csp_release(snd_hwdep_t * hw, struct file *file) 254 + static int snd_sb_csp_release(struct snd_hwdep * hw, struct file *file) 256 255 { 257 - snd_sb_csp_t *p = hw->private_data; 256 + struct snd_sb_csp *p = hw->private_data; 258 257 return (snd_sb_csp_unuse(p)); 259 258 } 260 259 ··· 263 262 /* 264 263 * acquire device 265 264 */ 266 - static int snd_sb_csp_use(snd_sb_csp_t * p) 265 + static int snd_sb_csp_use(struct snd_sb_csp * p) 267 266 { 268 267 down(&p->access_mutex); 269 268 if (p->used) { ··· 280 279 /* 281 280 * release device 282 281 */ 283 - static int snd_sb_csp_unuse(snd_sb_csp_t * p) 282 + static int snd_sb_csp_unuse(struct snd_sb_csp * p) 284 283 { 285 284 down(&p->access_mutex); 286 285 p->used--; ··· 293 292 * load microcode via ioctl: 294 293 * code is user-space pointer 295 294 */ 296 - static int snd_sb_csp_riff_load(snd_sb_csp_t * p, snd_sb_csp_microcode_t __user * mcode) 295 + static int snd_sb_csp_riff_load(struct snd_sb_csp * p, 296 + struct snd_sb_csp_microcode __user * mcode) 297 297 { 298 - snd_sb_csp_mc_header_t info; 298 + struct snd_sb_csp_mc_header info; 299 299 300 300 unsigned char __user *data_ptr; 301 301 unsigned char __user *data_end; ··· 451 449 /* 452 450 * unload CSP microcode 453 451 */ 454 - static int snd_sb_csp_unload(snd_sb_csp_t * p) 452 + static int snd_sb_csp_unload(struct snd_sb_csp * p) 455 453 { 456 454 if (p->running & SNDRV_SB_CSP_ST_RUNNING) 457 455 return -EBUSY; ··· 474 472 /* 475 473 * send command sequence to DSP 476 474 */ 477 - static inline int command_seq(sb_t *chip, const unsigned char *seq, int size) 475 + static inline int command_seq(struct snd_sb *chip, const unsigned char *seq, int size) 478 476 { 479 477 int i; 480 478 for (i = 0; i < size; i++) { ··· 487 485 /* 488 486 * set CSP codec parameter 489 487 */ 490 - static int set_codec_parameter(sb_t *chip, unsigned char par, unsigned char val) 488 + static int set_codec_parameter(struct snd_sb *chip, unsigned char par, unsigned char val) 491 489 { 492 490 unsigned char dsp_cmd[3]; 493 491 ··· 504 502 /* 505 503 * set CSP register 506 504 */ 507 - static int set_register(sb_t *chip, unsigned char reg, unsigned char val) 505 + static int set_register(struct snd_sb *chip, unsigned char reg, unsigned char val) 508 506 { 509 507 unsigned char dsp_cmd[3]; 510 508 ··· 518 516 * read CSP register 519 517 * return < 0 -> error 520 518 */ 521 - static int read_register(sb_t *chip, unsigned char reg) 519 + static int read_register(struct snd_sb *chip, unsigned char reg) 522 520 { 523 521 unsigned char dsp_cmd[2]; 524 522 ··· 531 529 /* 532 530 * set CSP mode register 533 531 */ 534 - static int set_mode_register(sb_t *chip, unsigned char mode) 532 + static int set_mode_register(struct snd_sb *chip, unsigned char mode) 535 533 { 536 534 unsigned char dsp_cmd[2]; 537 535 ··· 544 542 * Detect CSP 545 543 * return 0 if CSP exists. 546 544 */ 547 - static int csp_detect(sb_t *chip, int *version) 545 + static int csp_detect(struct snd_sb *chip, int *version) 548 546 { 549 547 unsigned char csp_test1, csp_test2; 550 548 unsigned long flags; ··· 581 579 /* 582 580 * get CSP version number 583 581 */ 584 - static int get_version(sb_t *chip) 582 + static int get_version(struct snd_sb *chip) 585 583 { 586 584 unsigned char dsp_cmd[2]; 587 585 ··· 595 593 /* 596 594 * check if the CSP version is valid 597 595 */ 598 - static int snd_sb_csp_check_version(snd_sb_csp_t * p) 596 + static int snd_sb_csp_check_version(struct snd_sb_csp * p) 599 597 { 600 598 if (p->version < 0x10 || p->version > 0x1f) { 601 599 snd_printd("%s: Invalid CSP version: 0x%x\n", __FUNCTION__, p->version); ··· 607 605 /* 608 606 * download microcode to CSP (microcode should have one "main" block). 609 607 */ 610 - static int snd_sb_csp_load(snd_sb_csp_t * p, const unsigned char *buf, int size, int load_flags) 608 + static int snd_sb_csp_load(struct snd_sb_csp * p, const unsigned char *buf, int size, int load_flags) 611 609 { 612 610 int status, i; 613 611 int err; ··· 673 671 return result; 674 672 } 675 673 676 - static int snd_sb_csp_load_user(snd_sb_csp_t * p, const unsigned char __user *buf, int size, int load_flags) 674 + static int snd_sb_csp_load_user(struct snd_sb_csp * p, const unsigned char __user *buf, int size, int load_flags) 677 675 { 678 676 int err = -ENOMEM; 679 677 unsigned char *kbuf = kmalloc(size, GFP_KERNEL); ··· 693 691 * autoload hardware codec if necessary 694 692 * return 0 if CSP is loaded and ready to run (p->running != 0) 695 693 */ 696 - static int snd_sb_csp_autoload(snd_sb_csp_t * p, int pcm_sfmt, int play_rec_mode) 694 + static int snd_sb_csp_autoload(struct snd_sb_csp * p, int pcm_sfmt, int play_rec_mode) 697 695 { 698 696 unsigned long flags; 699 697 int err = 0; ··· 765 763 /* 766 764 * start CSP 767 765 */ 768 - static int snd_sb_csp_start(snd_sb_csp_t * p, int sample_width, int channels) 766 + static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channels) 769 767 { 770 768 unsigned char s_type; /* sample type */ 771 769 unsigned char mixL, mixR; ··· 844 842 /* 845 843 * stop CSP 846 844 */ 847 - static int snd_sb_csp_stop(snd_sb_csp_t * p) 845 + static int snd_sb_csp_stop(struct snd_sb_csp * p) 848 846 { 849 847 int result; 850 848 unsigned char mixL, mixR; ··· 885 883 /* 886 884 * pause CSP codec and hold DMA transfer 887 885 */ 888 - static int snd_sb_csp_pause(snd_sb_csp_t * p) 886 + static int snd_sb_csp_pause(struct snd_sb_csp * p) 889 887 { 890 888 int result; 891 889 unsigned long flags; ··· 905 903 /* 906 904 * restart CSP codec and resume DMA transfer 907 905 */ 908 - static int snd_sb_csp_restart(snd_sb_csp_t * p) 906 + static int snd_sb_csp_restart(struct snd_sb_csp * p) 909 907 { 910 908 int result; 911 909 unsigned long flags; ··· 928 926 * QSound mixer control for PCM 929 927 */ 930 928 931 - static int snd_sb_qsound_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 929 + static int snd_sb_qsound_switch_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 932 930 { 933 931 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 934 932 uinfo->count = 1; ··· 937 935 return 0; 938 936 } 939 937 940 - static int snd_sb_qsound_switch_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 938 + static int snd_sb_qsound_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 941 939 { 942 - snd_sb_csp_t *p = snd_kcontrol_chip(kcontrol); 940 + struct snd_sb_csp *p = snd_kcontrol_chip(kcontrol); 943 941 944 942 ucontrol->value.integer.value[0] = p->q_enabled ? 1 : 0; 945 943 return 0; 946 944 } 947 945 948 - static int snd_sb_qsound_switch_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 946 + static int snd_sb_qsound_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 949 947 { 950 - snd_sb_csp_t *p = snd_kcontrol_chip(kcontrol); 948 + struct snd_sb_csp *p = snd_kcontrol_chip(kcontrol); 951 949 unsigned long flags; 952 950 int change; 953 951 unsigned char nval; ··· 960 958 return change; 961 959 } 962 960 963 - static int snd_sb_qsound_space_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 961 + static int snd_sb_qsound_space_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 964 962 { 965 963 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 966 964 uinfo->count = 2; ··· 969 967 return 0; 970 968 } 971 969 972 - static int snd_sb_qsound_space_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 970 + static int snd_sb_qsound_space_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 973 971 { 974 - snd_sb_csp_t *p = snd_kcontrol_chip(kcontrol); 972 + struct snd_sb_csp *p = snd_kcontrol_chip(kcontrol); 975 973 unsigned long flags; 976 974 977 975 spin_lock_irqsave(&p->q_lock, flags); ··· 981 979 return 0; 982 980 } 983 981 984 - static int snd_sb_qsound_space_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 982 + static int snd_sb_qsound_space_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 985 983 { 986 - snd_sb_csp_t *p = snd_kcontrol_chip(kcontrol); 984 + struct snd_sb_csp *p = snd_kcontrol_chip(kcontrol); 987 985 unsigned long flags; 988 986 int change; 989 987 unsigned char nval1, nval2; ··· 1003 1001 return change; 1004 1002 } 1005 1003 1006 - static snd_kcontrol_new_t snd_sb_qsound_switch = { 1004 + static struct snd_kcontrol_new snd_sb_qsound_switch = { 1007 1005 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1008 1006 .name = "3D Control - Switch", 1009 1007 .info = snd_sb_qsound_switch_info, ··· 1011 1009 .put = snd_sb_qsound_switch_put 1012 1010 }; 1013 1011 1014 - static snd_kcontrol_new_t snd_sb_qsound_space = { 1012 + static struct snd_kcontrol_new snd_sb_qsound_space = { 1015 1013 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1016 1014 .name = "3D Control - Space", 1017 1015 .info = snd_sb_qsound_space_info, ··· 1019 1017 .put = snd_sb_qsound_space_put 1020 1018 }; 1021 1019 1022 - static int snd_sb_qsound_build(snd_sb_csp_t * p) 1020 + static int snd_sb_qsound_build(struct snd_sb_csp * p) 1023 1021 { 1024 - snd_card_t * card; 1022 + struct snd_card *card; 1025 1023 int err; 1026 1024 1027 1025 snd_assert(p != NULL, return -EINVAL); ··· 1044 1042 return err; 1045 1043 } 1046 1044 1047 - static void snd_sb_qsound_destroy(snd_sb_csp_t * p) 1045 + static void snd_sb_qsound_destroy(struct snd_sb_csp * p) 1048 1046 { 1049 - snd_card_t * card; 1047 + struct snd_card *card; 1050 1048 unsigned long flags; 1051 1049 1052 1050 snd_assert(p != NULL, return); ··· 1070 1068 * Transfer qsound parameters to CSP, 1071 1069 * function should be called from interrupt routine 1072 1070 */ 1073 - static int snd_sb_csp_qsound_transfer(snd_sb_csp_t * p) 1071 + static int snd_sb_csp_qsound_transfer(struct snd_sb_csp * p) 1074 1072 { 1075 1073 int err = -ENXIO; 1076 1074 ··· 1095 1093 /* 1096 1094 * proc interface 1097 1095 */ 1098 - static int init_proc_entry(snd_sb_csp_t * p, int device) 1096 + static int init_proc_entry(struct snd_sb_csp * p, int device) 1099 1097 { 1100 1098 char name[16]; 1101 - snd_info_entry_t *entry; 1099 + struct snd_info_entry *entry; 1102 1100 sprintf(name, "cspD%d", device); 1103 1101 if (! snd_card_proc_new(p->chip->card, name, &entry)) 1104 1102 snd_info_set_text_ops(entry, p, 1024, info_read); 1105 1103 return 0; 1106 1104 } 1107 1105 1108 - static void info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) 1106 + static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) 1109 1107 { 1110 - snd_sb_csp_t *p = entry->private_data; 1108 + struct snd_sb_csp *p = entry->private_data; 1111 1109 1112 1110 snd_iprintf(buffer, "Creative Signal Processor [v%d.%d]\n", (p->version >> 4), (p->version & 0x0f)); 1113 1111 snd_iprintf(buffer, "State: %cx%c%c%c\n", ((p->running & SNDRV_SB_CSP_ST_QSOUND) ? 'Q' : '-'),
+60 -60
sound/isa/sb/sb16_main.c
··· 50 50 MODULE_LICENSE("GPL"); 51 51 52 52 #ifdef CONFIG_SND_SB16_CSP 53 - static void snd_sb16_csp_playback_prepare(sb_t *chip, snd_pcm_runtime_t *runtime) 53 + static void snd_sb16_csp_playback_prepare(struct snd_sb *chip, struct snd_pcm_runtime *runtime) 54 54 { 55 55 if (chip->hardware == SB_HW_16CSP) { 56 - snd_sb_csp_t *csp = chip->csp; 56 + struct snd_sb_csp *csp = chip->csp; 57 57 58 58 if (csp->running & SNDRV_SB_CSP_ST_LOADED) { 59 59 /* manually loaded codec */ ··· 98 98 } 99 99 } 100 100 101 - static void snd_sb16_csp_capture_prepare(sb_t *chip, snd_pcm_runtime_t *runtime) 101 + static void snd_sb16_csp_capture_prepare(struct snd_sb *chip, struct snd_pcm_runtime *runtime) 102 102 { 103 103 if (chip->hardware == SB_HW_16CSP) { 104 - snd_sb_csp_t *csp = chip->csp; 104 + struct snd_sb_csp *csp = chip->csp; 105 105 106 106 if (csp->running & SNDRV_SB_CSP_ST_LOADED) { 107 107 /* manually loaded codec */ ··· 136 136 } 137 137 } 138 138 139 - static void snd_sb16_csp_update(sb_t *chip) 139 + static void snd_sb16_csp_update(struct snd_sb *chip) 140 140 { 141 141 if (chip->hardware == SB_HW_16CSP) { 142 - snd_sb_csp_t *csp = chip->csp; 142 + struct snd_sb_csp *csp = chip->csp; 143 143 144 144 if (csp->qpos_changed) { 145 145 spin_lock(&chip->reg_lock); ··· 149 149 } 150 150 } 151 151 152 - static void snd_sb16_csp_playback_open(sb_t *chip, snd_pcm_runtime_t *runtime) 152 + static void snd_sb16_csp_playback_open(struct snd_sb *chip, struct snd_pcm_runtime *runtime) 153 153 { 154 154 /* CSP decoders (QSound excluded) support only 16bit transfers */ 155 155 if (chip->hardware == SB_HW_16CSP) { 156 - snd_sb_csp_t *csp = chip->csp; 156 + struct snd_sb_csp *csp = chip->csp; 157 157 158 158 if (csp->running & SNDRV_SB_CSP_ST_LOADED) { 159 159 /* manually loaded codec */ ··· 168 168 } 169 169 } 170 170 171 - static void snd_sb16_csp_playback_close(sb_t *chip) 171 + static void snd_sb16_csp_playback_close(struct snd_sb *chip) 172 172 { 173 173 if ((chip->hardware == SB_HW_16CSP) && (chip->open == SNDRV_SB_CSP_MODE_DSP_WRITE)) { 174 - snd_sb_csp_t *csp = chip->csp; 174 + struct snd_sb_csp *csp = chip->csp; 175 175 176 176 if (csp->ops.csp_stop(csp) == 0) { 177 177 csp->ops.csp_unuse(csp); ··· 180 180 } 181 181 } 182 182 183 - static void snd_sb16_csp_capture_open(sb_t *chip, snd_pcm_runtime_t *runtime) 183 + static void snd_sb16_csp_capture_open(struct snd_sb *chip, struct snd_pcm_runtime *runtime) 184 184 { 185 185 /* CSP coders support only 16bit transfers */ 186 186 if (chip->hardware == SB_HW_16CSP) { 187 - snd_sb_csp_t *csp = chip->csp; 187 + struct snd_sb_csp *csp = chip->csp; 188 188 189 189 if (csp->running & SNDRV_SB_CSP_ST_LOADED) { 190 190 /* manually loaded codec */ ··· 199 199 } 200 200 } 201 201 202 - static void snd_sb16_csp_capture_close(sb_t *chip) 202 + static void snd_sb16_csp_capture_close(struct snd_sb *chip) 203 203 { 204 204 if ((chip->hardware == SB_HW_16CSP) && (chip->open == SNDRV_SB_CSP_MODE_DSP_READ)) { 205 - snd_sb_csp_t *csp = chip->csp; 205 + struct snd_sb_csp *csp = chip->csp; 206 206 207 207 if (csp->ops.csp_stop(csp) == 0) { 208 208 csp->ops.csp_unuse(csp); ··· 221 221 #endif 222 222 223 223 224 - static void snd_sb16_setup_rate(sb_t *chip, 224 + static void snd_sb16_setup_rate(struct snd_sb *chip, 225 225 unsigned short rate, 226 226 int channel) 227 227 { ··· 244 244 spin_unlock_irqrestore(&chip->reg_lock, flags); 245 245 } 246 246 247 - static int snd_sb16_hw_params(snd_pcm_substream_t * substream, 248 - snd_pcm_hw_params_t * hw_params) 247 + static int snd_sb16_hw_params(struct snd_pcm_substream *substream, 248 + struct snd_pcm_hw_params *hw_params) 249 249 { 250 250 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 251 251 } 252 252 253 - static int snd_sb16_hw_free(snd_pcm_substream_t * substream) 253 + static int snd_sb16_hw_free(struct snd_pcm_substream *substream) 254 254 { 255 255 snd_pcm_lib_free_pages(substream); 256 256 return 0; 257 257 } 258 258 259 - static int snd_sb16_playback_prepare(snd_pcm_substream_t * substream) 259 + static int snd_sb16_playback_prepare(struct snd_pcm_substream *substream) 260 260 { 261 261 unsigned long flags; 262 - sb_t *chip = snd_pcm_substream_chip(substream); 263 - snd_pcm_runtime_t *runtime = substream->runtime; 262 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 263 + struct snd_pcm_runtime *runtime = substream->runtime; 264 264 unsigned char format; 265 265 unsigned int size, count, dma; 266 266 ··· 298 298 return 0; 299 299 } 300 300 301 - static int snd_sb16_playback_trigger(snd_pcm_substream_t * substream, 301 + static int snd_sb16_playback_trigger(struct snd_pcm_substream *substream, 302 302 int cmd) 303 303 { 304 - sb_t *chip = snd_pcm_substream_chip(substream); 304 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 305 305 int result = 0; 306 306 307 307 spin_lock(&chip->reg_lock); ··· 324 324 return result; 325 325 } 326 326 327 - static int snd_sb16_capture_prepare(snd_pcm_substream_t * substream) 327 + static int snd_sb16_capture_prepare(struct snd_pcm_substream *substream) 328 328 { 329 329 unsigned long flags; 330 - sb_t *chip = snd_pcm_substream_chip(substream); 331 - snd_pcm_runtime_t *runtime = substream->runtime; 330 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 331 + struct snd_pcm_runtime *runtime = substream->runtime; 332 332 unsigned char format; 333 333 unsigned int size, count, dma; 334 334 ··· 365 365 return 0; 366 366 } 367 367 368 - static int snd_sb16_capture_trigger(snd_pcm_substream_t * substream, 368 + static int snd_sb16_capture_trigger(struct snd_pcm_substream *substream, 369 369 int cmd) 370 370 { 371 - sb_t *chip = snd_pcm_substream_chip(substream); 371 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 372 372 int result = 0; 373 373 374 374 spin_lock(&chip->reg_lock); ··· 393 393 394 394 irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs) 395 395 { 396 - sb_t *chip = dev_id; 396 + struct snd_sb *chip = dev_id; 397 397 unsigned char status; 398 398 int ok; 399 399 ··· 443 443 444 444 */ 445 445 446 - static snd_pcm_uframes_t snd_sb16_playback_pointer(snd_pcm_substream_t * substream) 446 + static snd_pcm_uframes_t snd_sb16_playback_pointer(struct snd_pcm_substream *substream) 447 447 { 448 - sb_t *chip = snd_pcm_substream_chip(substream); 448 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 449 449 unsigned int dma; 450 450 size_t ptr; 451 451 ··· 454 454 return bytes_to_frames(substream->runtime, ptr); 455 455 } 456 456 457 - static snd_pcm_uframes_t snd_sb16_capture_pointer(snd_pcm_substream_t * substream) 457 + static snd_pcm_uframes_t snd_sb16_capture_pointer(struct snd_pcm_substream *substream) 458 458 { 459 - sb_t *chip = snd_pcm_substream_chip(substream); 459 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 460 460 unsigned int dma; 461 461 size_t ptr; 462 462 ··· 469 469 470 470 */ 471 471 472 - static snd_pcm_hardware_t snd_sb16_playback = 472 + static struct snd_pcm_hardware snd_sb16_playback = 473 473 { 474 474 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 475 475 SNDRV_PCM_INFO_MMAP_VALID), ··· 487 487 .fifo_size = 0, 488 488 }; 489 489 490 - static snd_pcm_hardware_t snd_sb16_capture = 490 + static struct snd_pcm_hardware snd_sb16_capture = 491 491 { 492 492 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 493 493 SNDRV_PCM_INFO_MMAP_VALID), ··· 509 509 * open/close 510 510 */ 511 511 512 - static int snd_sb16_playback_open(snd_pcm_substream_t * substream) 512 + static int snd_sb16_playback_open(struct snd_pcm_substream *substream) 513 513 { 514 514 unsigned long flags; 515 - sb_t *chip = snd_pcm_substream_chip(substream); 516 - snd_pcm_runtime_t *runtime = substream->runtime; 515 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 516 + struct snd_pcm_runtime *runtime = substream->runtime; 517 517 518 518 spin_lock_irqsave(&chip->open_lock, flags); 519 519 if (chip->mode & SB_MODE_PLAYBACK) { ··· 566 566 return 0; 567 567 } 568 568 569 - static int snd_sb16_playback_close(snd_pcm_substream_t * substream) 569 + static int snd_sb16_playback_close(struct snd_pcm_substream *substream) 570 570 { 571 571 unsigned long flags; 572 - sb_t *chip = snd_pcm_substream_chip(substream); 572 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 573 573 574 574 snd_sb16_csp_playback_close(chip); 575 575 spin_lock_irqsave(&chip->open_lock, flags); ··· 579 579 return 0; 580 580 } 581 581 582 - static int snd_sb16_capture_open(snd_pcm_substream_t * substream) 582 + static int snd_sb16_capture_open(struct snd_pcm_substream *substream) 583 583 { 584 584 unsigned long flags; 585 - sb_t *chip = snd_pcm_substream_chip(substream); 586 - snd_pcm_runtime_t *runtime = substream->runtime; 585 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 586 + struct snd_pcm_runtime *runtime = substream->runtime; 587 587 588 588 spin_lock_irqsave(&chip->open_lock, flags); 589 589 if (chip->mode & SB_MODE_CAPTURE) { ··· 636 636 return 0; 637 637 } 638 638 639 - static int snd_sb16_capture_close(snd_pcm_substream_t * substream) 639 + static int snd_sb16_capture_close(struct snd_pcm_substream *substream) 640 640 { 641 641 unsigned long flags; 642 - sb_t *chip = snd_pcm_substream_chip(substream); 642 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 643 643 644 644 snd_sb16_csp_capture_close(chip); 645 645 spin_lock_irqsave(&chip->open_lock, flags); ··· 653 653 * DMA control interface 654 654 */ 655 655 656 - static int snd_sb16_set_dma_mode(sb_t *chip, int what) 656 + static int snd_sb16_set_dma_mode(struct snd_sb *chip, int what) 657 657 { 658 658 if (chip->dma8 < 0 || chip->dma16 < 0) { 659 659 snd_assert(what == 0, return -EINVAL); ··· 671 671 return 0; 672 672 } 673 673 674 - static int snd_sb16_get_dma_mode(sb_t *chip) 674 + static int snd_sb16_get_dma_mode(struct snd_sb *chip) 675 675 { 676 676 if (chip->dma8 < 0 || chip->dma16 < 0) 677 677 return 0; ··· 685 685 } 686 686 } 687 687 688 - static int snd_sb16_dma_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 688 + static int snd_sb16_dma_control_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 689 689 { 690 690 static char *texts[3] = { 691 691 "Auto", "Playback", "Capture" ··· 700 700 return 0; 701 701 } 702 702 703 - static int snd_sb16_dma_control_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 703 + static int snd_sb16_dma_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 704 704 { 705 - sb_t *chip = snd_kcontrol_chip(kcontrol); 705 + struct snd_sb *chip = snd_kcontrol_chip(kcontrol); 706 706 unsigned long flags; 707 707 708 708 spin_lock_irqsave(&chip->reg_lock, flags); ··· 711 711 return 0; 712 712 } 713 713 714 - static int snd_sb16_dma_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 714 + static int snd_sb16_dma_control_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 715 715 { 716 - sb_t *chip = snd_kcontrol_chip(kcontrol); 716 + struct snd_sb *chip = snd_kcontrol_chip(kcontrol); 717 717 unsigned long flags; 718 718 unsigned char nval, oval; 719 719 int change; ··· 728 728 return change; 729 729 } 730 730 731 - static snd_kcontrol_new_t snd_sb16_dma_control = { 731 + static struct snd_kcontrol_new snd_sb16_dma_control = { 732 732 .iface = SNDRV_CTL_ELEM_IFACE_CARD, 733 733 .name = "16-bit DMA Allocation", 734 734 .info = snd_sb16_dma_control_info, ··· 740 740 * Initialization part 741 741 */ 742 742 743 - int snd_sb16dsp_configure(sb_t * chip) 743 + int snd_sb16dsp_configure(struct snd_sb * chip) 744 744 { 745 745 unsigned long flags; 746 746 unsigned char irqreg = 0, dmareg = 0, mpureg; ··· 829 829 return 0; 830 830 } 831 831 832 - static snd_pcm_ops_t snd_sb16_playback_ops = { 832 + static struct snd_pcm_ops snd_sb16_playback_ops = { 833 833 .open = snd_sb16_playback_open, 834 834 .close = snd_sb16_playback_close, 835 835 .ioctl = snd_pcm_lib_ioctl, ··· 840 840 .pointer = snd_sb16_playback_pointer, 841 841 }; 842 842 843 - static snd_pcm_ops_t snd_sb16_capture_ops = { 843 + static struct snd_pcm_ops snd_sb16_capture_ops = { 844 844 .open = snd_sb16_capture_open, 845 845 .close = snd_sb16_capture_close, 846 846 .ioctl = snd_pcm_lib_ioctl, ··· 851 851 .pointer = snd_sb16_capture_pointer, 852 852 }; 853 853 854 - int snd_sb16dsp_pcm(sb_t * chip, int device, snd_pcm_t ** rpcm) 854 + int snd_sb16dsp_pcm(struct snd_sb * chip, int device, struct snd_pcm ** rpcm) 855 855 { 856 - snd_card_t *card = chip->card; 857 - snd_pcm_t *pcm; 856 + struct snd_card *card = chip->card; 857 + struct snd_pcm *pcm; 858 858 int err; 859 859 860 860 if (rpcm) ··· 882 882 return 0; 883 883 } 884 884 885 - const snd_pcm_ops_t *snd_sb16dsp_get_pcm_ops(int direction) 885 + const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction) 886 886 { 887 887 return direction == SNDRV_PCM_STREAM_PLAYBACK ? 888 888 &snd_sb16_playback_ops : &snd_sb16_capture_ops;
+6 -6
sound/isa/sb/sb8.c
··· 59 59 struct resource *fm_res; /* used to block FM i/o region for legacy cards */ 60 60 }; 61 61 62 - static snd_card_t *snd_sb8_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 62 + static struct snd_card *snd_sb8_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 63 63 64 64 static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id, struct pt_regs *regs) 65 65 { 66 - sb_t *chip = dev_id; 66 + struct snd_sb *chip = dev_id; 67 67 68 68 if (chip->open & SB_OPEN_PCM) { 69 69 return snd_sb8dsp_interrupt(chip); ··· 72 72 } 73 73 } 74 74 75 - static void snd_sb8_free(snd_card_t *card) 75 + static void snd_sb8_free(struct snd_card *card) 76 76 { 77 77 struct snd_sb8 *acard = (struct snd_sb8 *)card->private_data; 78 78 ··· 83 83 84 84 static int __init snd_sb8_probe(int dev) 85 85 { 86 - sb_t *chip; 87 - snd_card_t *card; 86 + struct snd_sb *chip; 87 + struct snd_card *card; 88 88 struct snd_sb8 *acard; 89 - opl3_t *opl3; 89 + struct snd_opl3 *opl3; 90 90 int err; 91 91 92 92 card = snd_card_new(index[dev], id[dev], THIS_MODULE,
+44 -44
sound/isa/sb/sb8_main.c
··· 46 46 #define SB8_DEN(v) ((SB8_CLOCK + (v) / 2) / (v)) 47 47 #define SB8_RATE(v) (SB8_CLOCK / SB8_DEN(v)) 48 48 49 - static ratnum_t clock = { 49 + static struct snd_ratnum clock = { 50 50 .num = SB8_CLOCK, 51 51 .den_min = 1, 52 52 .den_max = 256, 53 53 .den_step = 1, 54 54 }; 55 55 56 - static snd_pcm_hw_constraint_ratnums_t hw_constraints_clock = { 56 + static struct snd_pcm_hw_constraint_ratnums hw_constraints_clock = { 57 57 .nrats = 1, 58 58 .rats = &clock, 59 59 }; 60 60 61 - static ratnum_t stereo_clocks[] = { 61 + static struct snd_ratnum stereo_clocks[] = { 62 62 { 63 63 .num = SB8_CLOCK, 64 64 .den_min = SB8_DEN(22050), ··· 73 73 } 74 74 }; 75 75 76 - static int snd_sb8_hw_constraint_rate_channels(snd_pcm_hw_params_t *params, 77 - snd_pcm_hw_rule_t *rule) 76 + static int snd_sb8_hw_constraint_rate_channels(struct snd_pcm_hw_params *params, 77 + struct snd_pcm_hw_rule *rule) 78 78 { 79 - snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 79 + struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 80 80 if (c->min > 1) { 81 81 unsigned int num = 0, den = 0; 82 82 int err = snd_interval_ratnum(hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE), ··· 90 90 return 0; 91 91 } 92 92 93 - static int snd_sb8_hw_constraint_channels_rate(snd_pcm_hw_params_t *params, 94 - snd_pcm_hw_rule_t *rule) 93 + static int snd_sb8_hw_constraint_channels_rate(struct snd_pcm_hw_params *params, 94 + struct snd_pcm_hw_rule *rule) 95 95 { 96 - snd_interval_t *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 96 + struct snd_interval *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 97 97 if (r->min > SB8_RATE(22050) || r->max <= SB8_RATE(11025)) { 98 - snd_interval_t t = { .min = 1, .max = 1 }; 98 + struct snd_interval t = { .min = 1, .max = 1 }; 99 99 return snd_interval_refine(hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS), &t); 100 100 } 101 101 return 0; 102 102 } 103 103 104 - static int snd_sb8_playback_prepare(snd_pcm_substream_t * substream) 104 + static int snd_sb8_playback_prepare(struct snd_pcm_substream *substream) 105 105 { 106 106 unsigned long flags; 107 - sb_t *chip = snd_pcm_substream_chip(substream); 108 - snd_pcm_runtime_t *runtime = substream->runtime; 107 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 108 + struct snd_pcm_runtime *runtime = substream->runtime; 109 109 unsigned int mixreg, rate, size, count; 110 110 111 111 rate = runtime->rate; ··· 178 178 return 0; 179 179 } 180 180 181 - static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream, 181 + static int snd_sb8_playback_trigger(struct snd_pcm_substream *substream, 182 182 int cmd) 183 183 { 184 184 unsigned long flags; 185 - sb_t *chip = snd_pcm_substream_chip(substream); 185 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 186 186 unsigned int count; 187 187 188 188 spin_lock_irqsave(&chip->reg_lock, flags); ··· 197 197 break; 198 198 case SNDRV_PCM_TRIGGER_STOP: 199 199 if (chip->playback_format == SB_DSP_HI_OUTPUT_AUTO) { 200 - snd_pcm_runtime_t *runtime = substream->runtime; 200 + struct snd_pcm_runtime *runtime = substream->runtime; 201 201 snd_sbdsp_reset(chip); 202 202 if (runtime->channels > 1) { 203 203 spin_lock(&chip->mixer_lock); ··· 215 215 return 0; 216 216 } 217 217 218 - static int snd_sb8_hw_params(snd_pcm_substream_t * substream, 219 - snd_pcm_hw_params_t * hw_params) 218 + static int snd_sb8_hw_params(struct snd_pcm_substream *substream, 219 + struct snd_pcm_hw_params *hw_params) 220 220 { 221 221 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 222 222 } 223 223 224 - static int snd_sb8_hw_free(snd_pcm_substream_t * substream) 224 + static int snd_sb8_hw_free(struct snd_pcm_substream *substream) 225 225 { 226 226 snd_pcm_lib_free_pages(substream); 227 227 return 0; 228 228 } 229 229 230 - static int snd_sb8_capture_prepare(snd_pcm_substream_t * substream) 230 + static int snd_sb8_capture_prepare(struct snd_pcm_substream *substream) 231 231 { 232 232 unsigned long flags; 233 - sb_t *chip = snd_pcm_substream_chip(substream); 234 - snd_pcm_runtime_t *runtime = substream->runtime; 233 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 234 + struct snd_pcm_runtime *runtime = substream->runtime; 235 235 unsigned int mixreg, rate, size, count; 236 236 237 237 rate = runtime->rate; ··· 290 290 return 0; 291 291 } 292 292 293 - static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream, 293 + static int snd_sb8_capture_trigger(struct snd_pcm_substream *substream, 294 294 int cmd) 295 295 { 296 296 unsigned long flags; 297 - sb_t *chip = snd_pcm_substream_chip(substream); 297 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 298 298 unsigned int count; 299 299 300 300 spin_lock_irqsave(&chip->reg_lock, flags); ··· 309 309 break; 310 310 case SNDRV_PCM_TRIGGER_STOP: 311 311 if (chip->capture_format == SB_DSP_HI_INPUT_AUTO) { 312 - snd_pcm_runtime_t *runtime = substream->runtime; 312 + struct snd_pcm_runtime *runtime = substream->runtime; 313 313 snd_sbdsp_reset(chip); 314 314 if (runtime->channels > 1) { 315 315 /* restore input filter status */ ··· 329 329 return 0; 330 330 } 331 331 332 - irqreturn_t snd_sb8dsp_interrupt(sb_t *chip) 332 + irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip) 333 333 { 334 - snd_pcm_substream_t *substream; 335 - snd_pcm_runtime_t *runtime; 334 + struct snd_pcm_substream *substream; 335 + struct snd_pcm_runtime *runtime; 336 336 337 337 snd_sb_ack_8bit(chip); 338 338 switch (chip->mode) { ··· 354 354 return IRQ_HANDLED; 355 355 } 356 356 357 - static snd_pcm_uframes_t snd_sb8_playback_pointer(snd_pcm_substream_t * substream) 357 + static snd_pcm_uframes_t snd_sb8_playback_pointer(struct snd_pcm_substream *substream) 358 358 { 359 - sb_t *chip = snd_pcm_substream_chip(substream); 359 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 360 360 size_t ptr; 361 361 362 362 if (chip->mode != SB_MODE_PLAYBACK_8) ··· 365 365 return bytes_to_frames(substream->runtime, ptr); 366 366 } 367 367 368 - static snd_pcm_uframes_t snd_sb8_capture_pointer(snd_pcm_substream_t * substream) 368 + static snd_pcm_uframes_t snd_sb8_capture_pointer(struct snd_pcm_substream *substream) 369 369 { 370 - sb_t *chip = snd_pcm_substream_chip(substream); 370 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 371 371 size_t ptr; 372 372 373 373 if (chip->mode != SB_MODE_CAPTURE_8) ··· 380 380 381 381 */ 382 382 383 - static snd_pcm_hardware_t snd_sb8_playback = 383 + static struct snd_pcm_hardware snd_sb8_playback = 384 384 { 385 385 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 386 386 SNDRV_PCM_INFO_MMAP_VALID), ··· 399 399 .fifo_size = 0, 400 400 }; 401 401 402 - static snd_pcm_hardware_t snd_sb8_capture = 402 + static struct snd_pcm_hardware snd_sb8_capture = 403 403 { 404 404 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 405 405 SNDRV_PCM_INFO_MMAP_VALID), ··· 422 422 * 423 423 */ 424 424 425 - static int snd_sb8_open(snd_pcm_substream_t *substream) 425 + static int snd_sb8_open(struct snd_pcm_substream *substream) 426 426 { 427 - sb_t *chip = snd_pcm_substream_chip(substream); 428 - snd_pcm_runtime_t *runtime = substream->runtime; 427 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 428 + struct snd_pcm_runtime *runtime = substream->runtime; 429 429 unsigned long flags; 430 430 431 431 spin_lock_irqsave(&chip->open_lock, flags); ··· 468 468 return 0; 469 469 } 470 470 471 - static int snd_sb8_close(snd_pcm_substream_t *substream) 471 + static int snd_sb8_close(struct snd_pcm_substream *substream) 472 472 { 473 473 unsigned long flags; 474 - sb_t *chip = snd_pcm_substream_chip(substream); 474 + struct snd_sb *chip = snd_pcm_substream_chip(substream); 475 475 476 476 chip->playback_substream = NULL; 477 477 chip->capture_substream = NULL; ··· 485 485 * Initialization part 486 486 */ 487 487 488 - static snd_pcm_ops_t snd_sb8_playback_ops = { 488 + static struct snd_pcm_ops snd_sb8_playback_ops = { 489 489 .open = snd_sb8_open, 490 490 .close = snd_sb8_close, 491 491 .ioctl = snd_pcm_lib_ioctl, ··· 496 496 .pointer = snd_sb8_playback_pointer, 497 497 }; 498 498 499 - static snd_pcm_ops_t snd_sb8_capture_ops = { 499 + static struct snd_pcm_ops snd_sb8_capture_ops = { 500 500 .open = snd_sb8_open, 501 501 .close = snd_sb8_close, 502 502 .ioctl = snd_pcm_lib_ioctl, ··· 507 507 .pointer = snd_sb8_capture_pointer, 508 508 }; 509 509 510 - int snd_sb8dsp_pcm(sb_t *chip, int device, snd_pcm_t ** rpcm) 510 + int snd_sb8dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm) 511 511 { 512 - snd_card_t *card = chip->card; 513 - snd_pcm_t *pcm; 512 + struct snd_card *card = chip->card; 513 + struct snd_pcm *pcm; 514 514 int err; 515 515 516 516 if (rpcm)
+22 -22
sound/isa/sb/sb8_midi.c
··· 36 36 37 37 */ 38 38 39 - irqreturn_t snd_sb8dsp_midi_interrupt(sb_t * chip) 39 + irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb * chip) 40 40 { 41 - snd_rawmidi_t *rmidi; 41 + struct snd_rawmidi *rmidi; 42 42 int max = 64; 43 43 char byte; 44 44 ··· 63 63 64 64 */ 65 65 66 - static int snd_sb8dsp_midi_input_open(snd_rawmidi_substream_t * substream) 66 + static int snd_sb8dsp_midi_input_open(struct snd_rawmidi_substream *substream) 67 67 { 68 68 unsigned long flags; 69 - sb_t *chip; 69 + struct snd_sb *chip; 70 70 unsigned int valid_open_flags; 71 71 72 72 chip = substream->rmidi->private_data; ··· 90 90 return 0; 91 91 } 92 92 93 - static int snd_sb8dsp_midi_output_open(snd_rawmidi_substream_t * substream) 93 + static int snd_sb8dsp_midi_output_open(struct snd_rawmidi_substream *substream) 94 94 { 95 95 unsigned long flags; 96 - sb_t *chip; 96 + struct snd_sb *chip; 97 97 unsigned int valid_open_flags; 98 98 99 99 chip = substream->rmidi->private_data; ··· 117 117 return 0; 118 118 } 119 119 120 - static int snd_sb8dsp_midi_input_close(snd_rawmidi_substream_t * substream) 120 + static int snd_sb8dsp_midi_input_close(struct snd_rawmidi_substream *substream) 121 121 { 122 122 unsigned long flags; 123 - sb_t *chip; 123 + struct snd_sb *chip; 124 124 125 125 chip = substream->rmidi->private_data; 126 126 spin_lock_irqsave(&chip->open_lock, flags); ··· 135 135 return 0; 136 136 } 137 137 138 - static int snd_sb8dsp_midi_output_close(snd_rawmidi_substream_t * substream) 138 + static int snd_sb8dsp_midi_output_close(struct snd_rawmidi_substream *substream) 139 139 { 140 140 unsigned long flags; 141 - sb_t *chip; 141 + struct snd_sb *chip; 142 142 143 143 chip = substream->rmidi->private_data; 144 144 spin_lock_irqsave(&chip->open_lock, flags); ··· 153 153 return 0; 154 154 } 155 155 156 - static void snd_sb8dsp_midi_input_trigger(snd_rawmidi_substream_t * substream, int up) 156 + static void snd_sb8dsp_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) 157 157 { 158 158 unsigned long flags; 159 - sb_t *chip; 159 + struct snd_sb *chip; 160 160 161 161 chip = substream->rmidi->private_data; 162 162 spin_lock_irqsave(&chip->open_lock, flags); ··· 176 176 spin_unlock_irqrestore(&chip->open_lock, flags); 177 177 } 178 178 179 - static void snd_sb8dsp_midi_output_write(snd_rawmidi_substream_t * substream) 179 + static void snd_sb8dsp_midi_output_write(struct snd_rawmidi_substream *substream) 180 180 { 181 181 unsigned long flags; 182 - sb_t *chip; 182 + struct snd_sb *chip; 183 183 char byte; 184 184 int max = 32; 185 185 ··· 214 214 215 215 static void snd_sb8dsp_midi_output_timer(unsigned long data) 216 216 { 217 - snd_rawmidi_substream_t * substream = (snd_rawmidi_substream_t *) data; 218 - sb_t * chip = substream->rmidi->private_data; 217 + struct snd_rawmidi_substream *substream = (struct snd_rawmidi_substream *) data; 218 + struct snd_sb * chip = substream->rmidi->private_data; 219 219 unsigned long flags; 220 220 221 221 spin_lock_irqsave(&chip->open_lock, flags); ··· 225 225 snd_sb8dsp_midi_output_write(substream); 226 226 } 227 227 228 - static void snd_sb8dsp_midi_output_trigger(snd_rawmidi_substream_t * substream, int up) 228 + static void snd_sb8dsp_midi_output_trigger(struct snd_rawmidi_substream *substream, int up) 229 229 { 230 230 unsigned long flags; 231 - sb_t *chip; 231 + struct snd_sb *chip; 232 232 233 233 chip = substream->rmidi->private_data; 234 234 spin_lock_irqsave(&chip->open_lock, flags); ··· 256 256 257 257 */ 258 258 259 - static snd_rawmidi_ops_t snd_sb8dsp_midi_output = 259 + static struct snd_rawmidi_ops snd_sb8dsp_midi_output = 260 260 { 261 261 .open = snd_sb8dsp_midi_output_open, 262 262 .close = snd_sb8dsp_midi_output_close, 263 263 .trigger = snd_sb8dsp_midi_output_trigger, 264 264 }; 265 265 266 - static snd_rawmidi_ops_t snd_sb8dsp_midi_input = 266 + static struct snd_rawmidi_ops snd_sb8dsp_midi_input = 267 267 { 268 268 .open = snd_sb8dsp_midi_input_open, 269 269 .close = snd_sb8dsp_midi_input_close, 270 270 .trigger = snd_sb8dsp_midi_input_trigger, 271 271 }; 272 272 273 - int snd_sb8dsp_midi(sb_t *chip, int device, snd_rawmidi_t ** rrawmidi) 273 + int snd_sb8dsp_midi(struct snd_sb *chip, int device, struct snd_rawmidi ** rrawmidi) 274 274 { 275 - snd_rawmidi_t *rmidi; 275 + struct snd_rawmidi *rmidi; 276 276 int err; 277 277 278 278 if (rrawmidi)
+12 -12
sound/isa/sb/sb_common.c
··· 41 41 42 42 #undef IO_DEBUG 43 43 44 - int snd_sbdsp_command(sb_t *chip, unsigned char val) 44 + int snd_sbdsp_command(struct snd_sb *chip, unsigned char val) 45 45 { 46 46 int i; 47 47 #ifdef IO_DEBUG ··· 56 56 return 0; 57 57 } 58 58 59 - int snd_sbdsp_get_byte(sb_t *chip) 59 + int snd_sbdsp_get_byte(struct snd_sb *chip) 60 60 { 61 61 int val; 62 62 int i; ··· 73 73 return -ENODEV; 74 74 } 75 75 76 - int snd_sbdsp_reset(sb_t *chip) 76 + int snd_sbdsp_reset(struct snd_sb *chip) 77 77 { 78 78 int i; 79 79 ··· 92 92 return -ENODEV; 93 93 } 94 94 95 - static int snd_sbdsp_version(sb_t * chip) 95 + static int snd_sbdsp_version(struct snd_sb * chip) 96 96 { 97 97 unsigned int result = -ENODEV; 98 98 ··· 102 102 return result; 103 103 } 104 104 105 - static int snd_sbdsp_probe(sb_t * chip) 105 + static int snd_sbdsp_probe(struct snd_sb * chip) 106 106 { 107 107 int version; 108 108 int major, minor; ··· 176 176 return 0; 177 177 } 178 178 179 - static int snd_sbdsp_free(sb_t *chip) 179 + static int snd_sbdsp_free(struct snd_sb *chip) 180 180 { 181 181 if (chip->res_port) 182 182 release_and_free_resource(chip->res_port); ··· 196 196 return 0; 197 197 } 198 198 199 - static int snd_sbdsp_dev_free(snd_device_t *device) 199 + static int snd_sbdsp_dev_free(struct snd_device *device) 200 200 { 201 - sb_t *chip = device->device_data; 201 + struct snd_sb *chip = device->device_data; 202 202 return snd_sbdsp_free(chip); 203 203 } 204 204 205 - int snd_sbdsp_create(snd_card_t *card, 205 + int snd_sbdsp_create(struct snd_card *card, 206 206 unsigned long port, 207 207 int irq, 208 208 irqreturn_t (*irq_handler)(int, void *, struct pt_regs *), 209 209 int dma8, 210 210 int dma16, 211 211 unsigned short hardware, 212 - sb_t **r_chip) 212 + struct snd_sb **r_chip) 213 213 { 214 - sb_t *chip; 214 + struct snd_sb *chip; 215 215 int err; 216 - static snd_device_ops_t ops = { 216 + static struct snd_device_ops ops = { 217 217 .dev_free = snd_sbdsp_dev_free, 218 218 }; 219 219
+34 -34
sound/isa/sb/sb_mixer.c
··· 29 29 30 30 #undef IO_DEBUG 31 31 32 - void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data) 32 + void snd_sbmixer_write(struct snd_sb *chip, unsigned char reg, unsigned char data) 33 33 { 34 34 outb(reg, SBP(chip, MIXER_ADDR)); 35 35 udelay(10); ··· 40 40 #endif 41 41 } 42 42 43 - unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg) 43 + unsigned char snd_sbmixer_read(struct snd_sb *chip, unsigned char reg) 44 44 { 45 45 unsigned char result; 46 46 ··· 58 58 * Single channel mixer element 59 59 */ 60 60 61 - static int snd_sbmixer_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 61 + static int snd_sbmixer_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 62 62 { 63 63 int mask = (kcontrol->private_value >> 24) & 0xff; 64 64 ··· 69 69 return 0; 70 70 } 71 71 72 - static int snd_sbmixer_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 72 + static int snd_sbmixer_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 73 73 { 74 - sb_t *sb = snd_kcontrol_chip(kcontrol); 74 + struct snd_sb *sb = snd_kcontrol_chip(kcontrol); 75 75 unsigned long flags; 76 76 int reg = kcontrol->private_value & 0xff; 77 77 int shift = (kcontrol->private_value >> 16) & 0xff; ··· 85 85 return 0; 86 86 } 87 87 88 - static int snd_sbmixer_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 88 + static int snd_sbmixer_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 89 89 { 90 - sb_t *sb = snd_kcontrol_chip(kcontrol); 90 + struct snd_sb *sb = snd_kcontrol_chip(kcontrol); 91 91 unsigned long flags; 92 92 int reg = kcontrol->private_value & 0xff; 93 93 int shift = (kcontrol->private_value >> 16) & 0x07; ··· 110 110 * Double channel mixer element 111 111 */ 112 112 113 - static int snd_sbmixer_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 113 + static int snd_sbmixer_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 114 114 { 115 115 int mask = (kcontrol->private_value >> 24) & 0xff; 116 116 ··· 121 121 return 0; 122 122 } 123 123 124 - static int snd_sbmixer_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 124 + static int snd_sbmixer_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 125 125 { 126 - sb_t *sb = snd_kcontrol_chip(kcontrol); 126 + struct snd_sb *sb = snd_kcontrol_chip(kcontrol); 127 127 unsigned long flags; 128 128 int left_reg = kcontrol->private_value & 0xff; 129 129 int right_reg = (kcontrol->private_value >> 8) & 0xff; ··· 141 141 return 0; 142 142 } 143 143 144 - static int snd_sbmixer_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 144 + static int snd_sbmixer_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 145 145 { 146 - sb_t *sb = snd_kcontrol_chip(kcontrol); 146 + struct snd_sb *sb = snd_kcontrol_chip(kcontrol); 147 147 unsigned long flags; 148 148 int left_reg = kcontrol->private_value & 0xff; 149 149 int right_reg = (kcontrol->private_value >> 8) & 0xff; ··· 181 181 * DT-019x / ALS-007 capture/input switch 182 182 */ 183 183 184 - static int snd_dt019x_input_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 184 + static int snd_dt019x_input_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 185 185 { 186 186 static char *texts[5] = { 187 187 "CD", "Mic", "Line", "Synth", "Master" ··· 196 196 return 0; 197 197 } 198 198 199 - static int snd_dt019x_input_sw_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 199 + static int snd_dt019x_input_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 200 200 { 201 - sb_t *sb = snd_kcontrol_chip(kcontrol); 201 + struct snd_sb *sb = snd_kcontrol_chip(kcontrol); 202 202 unsigned long flags; 203 203 unsigned char oval; 204 204 ··· 232 232 return 0; 233 233 } 234 234 235 - static int snd_dt019x_input_sw_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 235 + static int snd_dt019x_input_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 236 236 { 237 - sb_t *sb = snd_kcontrol_chip(kcontrol); 237 + struct snd_sb *sb = snd_kcontrol_chip(kcontrol); 238 238 unsigned long flags; 239 239 int change; 240 240 unsigned char nval, oval; ··· 273 273 * SBPRO input multiplexer 274 274 */ 275 275 276 - static int snd_sb8mixer_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 276 + static int snd_sb8mixer_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 277 277 { 278 278 static char *texts[3] = { 279 279 "Mic", "CD", "Line" ··· 289 289 } 290 290 291 291 292 - static int snd_sb8mixer_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 292 + static int snd_sb8mixer_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 293 293 { 294 - sb_t *sb = snd_kcontrol_chip(kcontrol); 294 + struct snd_sb *sb = snd_kcontrol_chip(kcontrol); 295 295 unsigned long flags; 296 296 unsigned char oval; 297 297 ··· 312 312 return 0; 313 313 } 314 314 315 - static int snd_sb8mixer_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 315 + static int snd_sb8mixer_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 316 316 { 317 - sb_t *sb = snd_kcontrol_chip(kcontrol); 317 + struct snd_sb *sb = snd_kcontrol_chip(kcontrol); 318 318 unsigned long flags; 319 319 int change; 320 320 unsigned char nval, oval; ··· 346 346 * SB16 input switch 347 347 */ 348 348 349 - static int snd_sb16mixer_info_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) 349 + static int snd_sb16mixer_info_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 350 350 { 351 351 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 352 352 uinfo->count = 4; ··· 355 355 return 0; 356 356 } 357 357 358 - static int snd_sb16mixer_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 358 + static int snd_sb16mixer_get_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 359 359 { 360 - sb_t *sb = snd_kcontrol_chip(kcontrol); 360 + struct snd_sb *sb = snd_kcontrol_chip(kcontrol); 361 361 unsigned long flags; 362 362 int reg1 = kcontrol->private_value & 0xff; 363 363 int reg2 = (kcontrol->private_value >> 8) & 0xff; ··· 376 376 return 0; 377 377 } 378 378 379 - static int snd_sb16mixer_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 379 + static int snd_sb16mixer_put_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 380 380 { 381 - sb_t *sb = snd_kcontrol_chip(kcontrol); 381 + struct snd_sb *sb = snd_kcontrol_chip(kcontrol); 382 382 unsigned long flags; 383 383 int reg1 = kcontrol->private_value & 0xff; 384 384 int reg2 = (kcontrol->private_value >> 8) & 0xff; ··· 410 410 */ 411 411 /* 412 412 */ 413 - int snd_sbmixer_add_ctl(sb_t *chip, const char *name, int index, int type, unsigned long value) 413 + int snd_sbmixer_add_ctl(struct snd_sb *chip, const char *name, int index, int type, unsigned long value) 414 414 { 415 - static snd_kcontrol_new_t newctls[] = { 415 + static struct snd_kcontrol_new newctls[] = { 416 416 [SB_MIX_SINGLE] = { 417 417 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 418 418 .info = snd_sbmixer_info_single, ··· 444 444 .put = snd_dt019x_input_sw_put, 445 445 }, 446 446 }; 447 - snd_kcontrol_t *ctl; 447 + struct snd_kcontrol *ctl; 448 448 int err; 449 449 450 450 ctl = snd_ctl_new1(&newctls[type], chip); ··· 758 758 759 759 /* 760 760 */ 761 - static int snd_sbmixer_init(sb_t *chip, 761 + static int snd_sbmixer_init(struct snd_sb *chip, 762 762 struct sbmix_elem **controls, 763 763 int controls_count, 764 764 unsigned char map[][2], ··· 766 766 char *name) 767 767 { 768 768 unsigned long flags; 769 - snd_card_t *card = chip->card; 769 + struct snd_card *card = chip->card; 770 770 int idx, err; 771 771 772 772 /* mixer reset */ ··· 790 790 return 0; 791 791 } 792 792 793 - int snd_sbmixer_new(sb_t *chip) 793 + int snd_sbmixer_new(struct snd_sb *chip) 794 794 { 795 - snd_card_t * card; 795 + struct snd_card *card; 796 796 int err; 797 797 798 798 snd_assert(chip != NULL && chip->card != NULL, return -EINVAL);