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

[ALSA] Remove xxx_t typedefs: VXdriver

Remove xxx_t typedefs from the VXdriver codes
(vx_core support, vx222 and vxpocket).

Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Takashi Iwai and committed by
Jaroslav Kysela
af26367f 9f38945f

+410 -389
+61 -62
include/sound/vx_core.h
··· 36 36 struct firmware; 37 37 struct device; 38 38 39 - typedef struct snd_vx_core vx_core_t; 40 - typedef struct vx_pipe vx_pipe_t; 41 - 42 39 #define VX_DRIVER_VERSION 0x010000 /* 1.0.0 */ 43 40 44 41 /* ··· 73 76 int channels; 74 77 unsigned int differed_type; 75 78 pcx_time_t pcx_time; 76 - snd_pcm_substream_t *substream; 79 + struct snd_pcm_substream *substream; 77 80 78 81 int hbuf_size; /* H-buffer size in bytes */ 79 82 int buffer_bytes; /* the ALSA pcm buffer size in bytes */ ··· 85 88 u64 cur_count; /* current sample position (for playback) */ 86 89 87 90 unsigned int references; /* an output pipe may be used for monitoring and/or playback */ 88 - vx_pipe_t *monitoring_pipe; /* pointer to the monitoring pipe (capture pipe only)*/ 91 + struct vx_pipe *monitoring_pipe; /* pointer to the monitoring pipe (capture pipe only)*/ 89 92 90 93 struct tasklet_struct start_tq; 91 94 }; 92 95 96 + struct vx_core; 97 + 93 98 struct snd_vx_ops { 94 99 /* low-level i/o */ 95 - unsigned char (*in8)(vx_core_t *chip, int reg); 96 - unsigned int (*in32)(vx_core_t *chip, int reg); 97 - void (*out8)(vx_core_t *chip, int reg, unsigned char val); 98 - void (*out32)(vx_core_t *chip, int reg, unsigned int val); 100 + unsigned char (*in8)(struct vx_core *chip, int reg); 101 + unsigned int (*in32)(struct vx_core *chip, int reg); 102 + void (*out8)(struct vx_core *chip, int reg, unsigned char val); 103 + void (*out32)(struct vx_core *chip, int reg, unsigned int val); 99 104 /* irq */ 100 - int (*test_and_ack)(vx_core_t *chip); 101 - void (*validate_irq)(vx_core_t *chip, int enable); 105 + int (*test_and_ack)(struct vx_core *chip); 106 + void (*validate_irq)(struct vx_core *chip, int enable); 102 107 /* codec */ 103 - void (*write_codec)(vx_core_t *chip, int codec, unsigned int data); 104 - void (*akm_write)(vx_core_t *chip, int reg, unsigned int data); 105 - void (*reset_codec)(vx_core_t *chip); 106 - void (*change_audio_source)(vx_core_t *chip, int src); 107 - void (*set_clock_source)(vx_core_t *chp, int src); 108 + void (*write_codec)(struct vx_core *chip, int codec, unsigned int data); 109 + void (*akm_write)(struct vx_core *chip, int reg, unsigned int data); 110 + void (*reset_codec)(struct vx_core *chip); 111 + void (*change_audio_source)(struct vx_core *chip, int src); 112 + void (*set_clock_source)(struct vx_core *chp, int src); 108 113 /* chip init */ 109 - int (*load_dsp)(vx_core_t *chip, int idx, const struct firmware *fw); 110 - void (*reset_dsp)(vx_core_t *chip); 111 - void (*reset_board)(vx_core_t *chip, int cold_reset); 112 - int (*add_controls)(vx_core_t *chip); 114 + int (*load_dsp)(struct vx_core *chip, int idx, const struct firmware *fw); 115 + void (*reset_dsp)(struct vx_core *chip); 116 + void (*reset_board)(struct vx_core *chip, int cold_reset); 117 + int (*add_controls)(struct vx_core *chip); 113 118 /* pcm */ 114 - void (*dma_write)(vx_core_t *chip, snd_pcm_runtime_t *runtime, 115 - vx_pipe_t *pipe, int count); 116 - void (*dma_read)(vx_core_t *chip, snd_pcm_runtime_t *runtime, 117 - vx_pipe_t *pipe, int count); 119 + void (*dma_write)(struct vx_core *chip, struct snd_pcm_runtime *runtime, 120 + struct vx_pipe *pipe, int count); 121 + void (*dma_read)(struct vx_core *chip, struct snd_pcm_runtime *runtime, 122 + struct vx_pipe *pipe, int count); 118 123 }; 119 124 120 125 struct snd_vx_hardware { ··· 157 158 /* min/max values for analog output for old codecs */ 158 159 #define VX_ANALOG_OUT_LEVEL_MAX 0xe3 159 160 160 - struct snd_vx_core { 161 + struct vx_core { 161 162 /* ALSA stuff */ 162 - snd_card_t *card; 163 - snd_pcm_t *pcm[VX_MAX_CODECS]; 163 + struct snd_card *card; 164 + struct snd_pcm *pcm[VX_MAX_CODECS]; 164 165 int type; /* VX_TYPE_XXX */ 165 166 166 167 int irq; ··· 178 179 unsigned int pcm_running; 179 180 180 181 struct device *dev; 181 - snd_hwdep_t *hwdep; 182 + struct snd_hwdep *hwdep; 182 183 183 184 struct vx_rmh irq_rmh; /* RMH used in interrupts */ 184 185 ··· 215 216 /* 216 217 * constructor 217 218 */ 218 - vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw, 219 - struct snd_vx_ops *ops, int extra_size); 220 - int snd_vx_setup_firmware(vx_core_t *chip); 221 - int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *dsp); 222 - int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *dsp); 223 - int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp); 219 + struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw, 220 + struct snd_vx_ops *ops, int extra_size); 221 + int snd_vx_setup_firmware(struct vx_core *chip); 222 + int snd_vx_load_boot_image(struct vx_core *chip, const struct firmware *dsp); 223 + int snd_vx_dsp_boot(struct vx_core *chip, const struct firmware *dsp); 224 + int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp); 224 225 225 - void snd_vx_free_firmware(vx_core_t *chip); 226 + void snd_vx_free_firmware(struct vx_core *chip); 226 227 227 228 /* 228 229 * interrupt handler; exported for pcmcia ··· 232 233 /* 233 234 * lowlevel functions 234 235 */ 235 - static inline int vx_test_and_ack(vx_core_t *chip) 236 + static inline int vx_test_and_ack(struct vx_core *chip) 236 237 { 237 238 snd_assert(chip->ops->test_and_ack, return -ENXIO); 238 239 return chip->ops->test_and_ack(chip); 239 240 } 240 241 241 - static inline void vx_validate_irq(vx_core_t *chip, int enable) 242 + static inline void vx_validate_irq(struct vx_core *chip, int enable) 242 243 { 243 244 snd_assert(chip->ops->validate_irq, return); 244 245 chip->ops->validate_irq(chip, enable); 245 246 } 246 247 247 - static inline unsigned char snd_vx_inb(vx_core_t *chip, int reg) 248 + static inline unsigned char snd_vx_inb(struct vx_core *chip, int reg) 248 249 { 249 250 snd_assert(chip->ops->in8, return 0); 250 251 return chip->ops->in8(chip, reg); 251 252 } 252 253 253 - static inline unsigned int snd_vx_inl(vx_core_t *chip, int reg) 254 + static inline unsigned int snd_vx_inl(struct vx_core *chip, int reg) 254 255 { 255 256 snd_assert(chip->ops->in32, return 0); 256 257 return chip->ops->in32(chip, reg); 257 258 } 258 259 259 - static inline void snd_vx_outb(vx_core_t *chip, int reg, unsigned char val) 260 + static inline void snd_vx_outb(struct vx_core *chip, int reg, unsigned char val) 260 261 { 261 262 snd_assert(chip->ops->out8, return); 262 263 chip->ops->out8(chip, reg, val); 263 264 } 264 265 265 - static inline void snd_vx_outl(vx_core_t *chip, int reg, unsigned int val) 266 + static inline void snd_vx_outl(struct vx_core *chip, int reg, unsigned int val) 266 267 { 267 268 snd_assert(chip->ops->out32, return); 268 269 chip->ops->out32(chip, reg, val); ··· 273 274 #define vx_inl(chip,reg) snd_vx_inl(chip, VX_##reg) 274 275 #define vx_outl(chip,reg,val) snd_vx_outl(chip, VX_##reg,val) 275 276 276 - static inline void vx_reset_dsp(vx_core_t *chip) 277 + static inline void vx_reset_dsp(struct vx_core *chip) 277 278 { 278 279 snd_assert(chip->ops->reset_dsp, return); 279 280 chip->ops->reset_dsp(chip); 280 281 } 281 282 282 - int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh); 283 - int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh); 284 - int vx_send_rih(vx_core_t *chip, int cmd); 285 - int vx_send_rih_nolock(vx_core_t *chip, int cmd); 283 + int vx_send_msg(struct vx_core *chip, struct vx_rmh *rmh); 284 + int vx_send_msg_nolock(struct vx_core *chip, struct vx_rmh *rmh); 285 + int vx_send_rih(struct vx_core *chip, int cmd); 286 + int vx_send_rih_nolock(struct vx_core *chip, int cmd); 286 287 287 - void vx_reset_codec(vx_core_t *chip, int cold_reset); 288 + void vx_reset_codec(struct vx_core *chip, int cold_reset); 288 289 289 290 /* 290 291 * check the bit on the specified register 291 292 * returns zero if a bit matches, or a negative error code. 292 293 * exported for vxpocket driver 293 294 */ 294 - int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time); 295 + int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time); 295 296 #define vx_check_isr(chip,mask,bit,time) snd_vx_check_reg_bit(chip, VX_ISR, mask, bit, time) 296 297 #define vx_wait_isr_bit(chip,bit) vx_check_isr(chip, bit, bit, 200) 297 298 #define vx_wait_for_rx_full(chip) vx_wait_isr_bit(chip, ISR_RX_FULL) ··· 300 301 /* 301 302 * pseudo-DMA transfer 302 303 */ 303 - static inline void vx_pseudo_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime, 304 - vx_pipe_t *pipe, int count) 304 + static inline void vx_pseudo_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime, 305 + struct vx_pipe *pipe, int count) 305 306 { 306 307 snd_assert(chip->ops->dma_write, return); 307 308 chip->ops->dma_write(chip, runtime, pipe, count); 308 309 } 309 310 310 - static inline void vx_pseudo_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime, 311 - vx_pipe_t *pipe, int count) 311 + static inline void vx_pseudo_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime, 312 + struct vx_pipe *pipe, int count) 312 313 { 313 314 snd_assert(chip->ops->dma_read, return); 314 315 chip->ops->dma_read(chip, runtime, pipe, count); ··· 326 327 /* 327 328 * pcm stuff 328 329 */ 329 - int snd_vx_pcm_new(vx_core_t *chip); 330 - void vx_pcm_update_intr(vx_core_t *chip, unsigned int events); 330 + int snd_vx_pcm_new(struct vx_core *chip); 331 + void vx_pcm_update_intr(struct vx_core *chip, unsigned int events); 331 332 332 333 /* 333 334 * mixer stuff 334 335 */ 335 - int snd_vx_mixer_new(vx_core_t *chip); 336 - void vx_toggle_dac_mute(vx_core_t *chip, int mute); 337 - int vx_sync_audio_source(vx_core_t *chip); 338 - int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active); 336 + int snd_vx_mixer_new(struct vx_core *chip); 337 + void vx_toggle_dac_mute(struct vx_core *chip, int mute); 338 + int vx_sync_audio_source(struct vx_core *chip); 339 + int vx_set_monitor_level(struct vx_core *chip, int audio, int level, int active); 339 340 340 341 /* 341 342 * IEC958 & clock stuff 342 343 */ 343 - void vx_set_iec958_status(vx_core_t *chip, unsigned int bits); 344 - int vx_set_clock(vx_core_t *chip, unsigned int freq); 345 - void vx_set_internal_clock(vx_core_t *chip, unsigned int freq); 346 - int vx_change_frequency(vx_core_t *chip); 344 + void vx_set_iec958_status(struct vx_core *chip, unsigned int bits); 345 + int vx_set_clock(struct vx_core *chip, unsigned int freq); 346 + void vx_set_internal_clock(struct vx_core *chip, unsigned int freq); 347 + int vx_change_frequency(struct vx_core *chip); 347 348 348 349 349 350 /*
+29 -29
sound/drivers/vx/vx_core.c
··· 49 49 * 50 50 * returns zero if a bit matches, or a negative error code. 51 51 */ 52 - int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time) 52 + int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time) 53 53 { 54 54 unsigned long end_time = jiffies + (time * HZ + 999) / 1000; 55 55 #ifdef CONFIG_SND_DEBUG ··· 78 78 * returns 0 if successful, or a negative error code. 79 79 * 80 80 */ 81 - static int vx_send_irq_dsp(vx_core_t *chip, int num) 81 + static int vx_send_irq_dsp(struct vx_core *chip, int num) 82 82 { 83 83 int nirq; 84 84 ··· 99 99 * 100 100 * returns 0 if successful, or a negative error code. 101 101 */ 102 - static int vx_reset_chk(vx_core_t *chip) 102 + static int vx_reset_chk(struct vx_core *chip) 103 103 { 104 104 /* Reset irq CHK */ 105 105 if (vx_send_irq_dsp(chip, IRQ_RESET_CHK) < 0) ··· 118 118 * the error code can be VX-specific, retrieved via vx_get_error(). 119 119 * NB: call with spinlock held! 120 120 */ 121 - static int vx_transfer_end(vx_core_t *chip, int cmd) 121 + static int vx_transfer_end(struct vx_core *chip, int cmd) 122 122 { 123 123 int err; 124 124 ··· 156 156 * the error code can be VX-specific, retrieved via vx_get_error(). 157 157 * NB: call with spinlock held! 158 158 */ 159 - static int vx_read_status(vx_core_t *chip, struct vx_rmh *rmh) 159 + static int vx_read_status(struct vx_core *chip, struct vx_rmh *rmh) 160 160 { 161 161 int i, err, val, size; 162 162 ··· 236 236 * 237 237 * this function doesn't call spinlock at all. 238 238 */ 239 - int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh) 239 + int vx_send_msg_nolock(struct vx_core *chip, struct vx_rmh *rmh) 240 240 { 241 241 int i, err; 242 242 ··· 341 341 * returns 0 if successful, or a negative error code. 342 342 * see vx_send_msg_nolock(). 343 343 */ 344 - int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh) 344 + int vx_send_msg(struct vx_core *chip, struct vx_rmh *rmh) 345 345 { 346 346 unsigned long flags; 347 347 int err; ··· 364 364 * 365 365 * unlike RMH, no command is sent to DSP. 366 366 */ 367 - int vx_send_rih_nolock(vx_core_t *chip, int cmd) 367 + int vx_send_rih_nolock(struct vx_core *chip, int cmd) 368 368 { 369 369 int err; 370 370 ··· 401 401 * 402 402 * see vx_send_rih_nolock(). 403 403 */ 404 - int vx_send_rih(vx_core_t *chip, int cmd) 404 + int vx_send_rih(struct vx_core *chip, int cmd) 405 405 { 406 406 unsigned long flags; 407 407 int err; ··· 418 418 * snd_vx_boot_xilinx - boot up the xilinx interface 419 419 * @boot: the boot record to load 420 420 */ 421 - int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *boot) 421 + int snd_vx_load_boot_image(struct vx_core *chip, const struct firmware *boot) 422 422 { 423 423 unsigned int i; 424 424 int no_fillup = vx_has_new_dsp(chip); ··· 470 470 * 471 471 * called from irq handler only 472 472 */ 473 - static int vx_test_irq_src(vx_core_t *chip, unsigned int *ret) 473 + static int vx_test_irq_src(struct vx_core *chip, unsigned int *ret) 474 474 { 475 475 int err; 476 476 ··· 491 491 */ 492 492 static void vx_interrupt(unsigned long private_data) 493 493 { 494 - vx_core_t *chip = (vx_core_t *) private_data; 494 + struct vx_core *chip = (struct vx_core *) private_data; 495 495 unsigned int events; 496 496 497 497 if (chip->chip_status & VX_STAT_IS_STALE) ··· 535 535 */ 536 536 irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs) 537 537 { 538 - vx_core_t *chip = dev; 538 + struct vx_core *chip = dev; 539 539 540 540 if (! (chip->chip_status & VX_STAT_CHIP_INIT) || 541 541 (chip->chip_status & VX_STAT_IS_STALE)) ··· 548 548 549 549 /* 550 550 */ 551 - static void vx_reset_board(vx_core_t *chip, int cold_reset) 551 + static void vx_reset_board(struct vx_core *chip, int cold_reset) 552 552 { 553 553 snd_assert(chip->ops->reset_board, return); 554 554 ··· 587 587 * proc interface 588 588 */ 589 589 590 - static void vx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) 590 + static void vx_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) 591 591 { 592 - vx_core_t *chip = entry->private_data; 592 + struct vx_core *chip = entry->private_data; 593 593 static char *audio_src_vxp[] = { "Line", "Mic", "Digital" }; 594 594 static char *audio_src_vx2[] = { "Analog", "Analog", "Digital" }; 595 595 static char *clock_mode[] = { "Auto", "Internal", "External" }; ··· 630 630 chip->ibl.granularity); 631 631 } 632 632 633 - static void vx_proc_init(vx_core_t *chip) 633 + static void vx_proc_init(struct vx_core *chip) 634 634 { 635 - snd_info_entry_t *entry; 635 + struct snd_info_entry *entry; 636 636 637 637 if (! snd_card_proc_new(chip->card, "vx-status", &entry)) 638 638 snd_info_set_text_ops(entry, chip, 1024, vx_proc_read); ··· 642 642 /** 643 643 * snd_vx_dsp_boot - load the DSP boot 644 644 */ 645 - int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *boot) 645 + int snd_vx_dsp_boot(struct vx_core *chip, const struct firmware *boot) 646 646 { 647 647 int err; 648 648 int cold_reset = !(chip->chip_status & VX_STAT_DEVICE_INIT); ··· 660 660 /** 661 661 * snd_vx_dsp_load - load the DSP image 662 662 */ 663 - int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp) 663 + int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp) 664 664 { 665 665 unsigned int i; 666 666 int err; ··· 709 709 /* 710 710 * suspend 711 711 */ 712 - static int snd_vx_suspend(snd_card_t *card, pm_message_t state) 712 + static int snd_vx_suspend(struct snd_card *card, pm_message_t state) 713 713 { 714 - vx_core_t *chip = card->pm_private_data; 714 + struct vx_core *chip = card->pm_private_data; 715 715 unsigned int i; 716 716 717 717 snd_assert(chip, return -EINVAL); ··· 726 726 /* 727 727 * resume 728 728 */ 729 - static int snd_vx_resume(snd_card_t *card) 729 + static int snd_vx_resume(struct snd_card *card) 730 730 { 731 - vx_core_t *chip = card->pm_private_data; 731 + struct vx_core *chip = card->pm_private_data; 732 732 int i, err; 733 733 734 734 snd_assert(chip, return -EINVAL); ··· 754 754 #endif 755 755 756 756 /** 757 - * snd_vx_create - constructor for vx_core_t 757 + * snd_vx_create - constructor for struct vx_core 758 758 * @hw: hardware specific record 759 759 * 760 760 * this function allocates the instance and prepare for the hardware ··· 762 762 * 763 763 * return the instance pointer if successful, NULL in error. 764 764 */ 765 - vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw, 766 - struct snd_vx_ops *ops, 767 - int extra_size) 765 + struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw, 766 + struct snd_vx_ops *ops, 767 + int extra_size) 768 768 { 769 - vx_core_t *chip; 769 + struct vx_core *chip; 770 770 771 771 snd_assert(card && hw && ops, return NULL); 772 772
+13 -11
sound/drivers/vx/vx_hwdep.c
··· 30 30 31 31 #ifdef SND_VX_FW_LOADER 32 32 33 - int snd_vx_setup_firmware(vx_core_t *chip) 33 + int snd_vx_setup_firmware(struct vx_core *chip) 34 34 { 35 35 static char *fw_files[VX_TYPE_NUMS][4] = { 36 36 [VX_TYPE_BOARD] = { ··· 95 95 } 96 96 97 97 /* exported */ 98 - void snd_vx_free_firmware(vx_core_t *chip) 98 + void snd_vx_free_firmware(struct vx_core *chip) 99 99 { 100 100 #ifdef CONFIG_PM 101 101 int i; ··· 106 106 107 107 #else /* old style firmware loading */ 108 108 109 - static int vx_hwdep_open(snd_hwdep_t *hw, struct file *file) 109 + static int vx_hwdep_open(struct snd_hwdep *hw, struct file *file) 110 110 { 111 111 return 0; 112 112 } 113 113 114 - static int vx_hwdep_release(snd_hwdep_t *hw, struct file *file) 114 + static int vx_hwdep_release(struct snd_hwdep *hw, struct file *file) 115 115 { 116 116 return 0; 117 117 } 118 118 119 - static int vx_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info) 119 + static int vx_hwdep_dsp_status(struct snd_hwdep *hw, 120 + struct snd_hwdep_dsp_status *info) 120 121 { 121 122 static char *type_ids[VX_TYPE_NUMS] = { 122 123 [VX_TYPE_BOARD] = "vxboard", ··· 126 125 [VX_TYPE_VXPOCKET] = "vxpocket", 127 126 [VX_TYPE_VXP440] = "vxp440", 128 127 }; 129 - vx_core_t *vx = hw->private_data; 128 + struct vx_core *vx = hw->private_data; 130 129 131 130 snd_assert(type_ids[vx->type], return -EINVAL); 132 131 strcpy(info->id, type_ids[vx->type]); ··· 148 147 } 149 148 } 150 149 151 - static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp) 150 + static int vx_hwdep_dsp_load(struct snd_hwdep *hw, 151 + struct snd_hwdep_dsp_image *dsp) 152 152 { 153 - vx_core_t *vx = hw->private_data; 153 + struct vx_core *vx = hw->private_data; 154 154 int index, err; 155 155 struct firmware *fw; 156 156 ··· 218 216 219 217 220 218 /* exported */ 221 - int snd_vx_setup_firmware(vx_core_t *chip) 219 + int snd_vx_setup_firmware(struct vx_core *chip) 222 220 { 223 221 int err; 224 - snd_hwdep_t *hw; 222 + struct snd_hwdep *hw; 225 223 226 224 if ((err = snd_hwdep_new(chip->card, SND_VX_HWDEP_ID, 0, &hw)) < 0) 227 225 return err; ··· 240 238 } 241 239 242 240 /* exported */ 243 - void snd_vx_free_firmware(vx_core_t *chip) 241 + void snd_vx_free_firmware(struct vx_core *chip) 244 242 { 245 243 #ifdef CONFIG_PM 246 244 int i;
+81 -81
sound/drivers/vx/vx_mixer.c
··· 30 30 /* 31 31 * write a codec data (24bit) 32 32 */ 33 - static void vx_write_codec_reg(vx_core_t *chip, int codec, unsigned int data) 33 + static void vx_write_codec_reg(struct vx_core *chip, int codec, unsigned int data) 34 34 { 35 35 unsigned long flags; 36 36 ··· 47 47 /* 48 48 * Data type used to access the Codec 49 49 */ 50 - typedef union { 50 + union vx_codec_data { 51 51 u32 l; 52 52 #ifdef SNDRV_BIG_ENDIAN 53 53 struct w { ··· 72 72 u8 hh; 73 73 } b; 74 74 #endif 75 - } vx_codec_data_t; 75 + }; 76 76 77 77 #define SET_CDC_DATA_SEL(di,s) ((di).b.mh = (u8) (s)) 78 78 #define SET_CDC_DATA_REG(di,r) ((di).b.ml = (u8) (r)) ··· 85 85 * @reg: register index 86 86 * @val: data value 87 87 */ 88 - static void vx_set_codec_reg(vx_core_t *chip, int codec, int reg, int val) 88 + static void vx_set_codec_reg(struct vx_core *chip, int codec, int reg, int val) 89 89 { 90 - vx_codec_data_t data; 90 + union vx_codec_data data; 91 91 /* DAC control register */ 92 92 SET_CDC_DATA_INIT(data); 93 93 SET_CDC_DATA_REG(data, reg); ··· 102 102 * @left: left output level, 0 = mute 103 103 * @right: right output level 104 104 */ 105 - static void vx_set_analog_output_level(vx_core_t *chip, int codec, int left, int right) 105 + static void vx_set_analog_output_level(struct vx_core *chip, int codec, int left, int right) 106 106 { 107 107 left = chip->hw->output_level_max - left; 108 108 right = chip->hw->output_level_max - right; ··· 126 126 #define DAC_ATTEN_MIN 0x08 127 127 #define DAC_ATTEN_MAX 0x38 128 128 129 - void vx_toggle_dac_mute(vx_core_t *chip, int mute) 129 + void vx_toggle_dac_mute(struct vx_core *chip, int mute) 130 130 { 131 131 unsigned int i; 132 132 for (i = 0; i < chip->hw->num_codecs; i++) { ··· 141 141 /* 142 142 * vx_reset_codec - reset and initialize the codecs 143 143 */ 144 - void vx_reset_codec(vx_core_t *chip, int cold_reset) 144 + void vx_reset_codec(struct vx_core *chip, int cold_reset) 145 145 { 146 146 unsigned int i; 147 147 int port = chip->type >= VX_TYPE_VXPOCKET ? 0x75 : 0x65; ··· 175 175 * change the audio input source 176 176 * @src: the target source (VX_AUDIO_SRC_XXX) 177 177 */ 178 - static void vx_change_audio_source(vx_core_t *chip, int src) 178 + static void vx_change_audio_source(struct vx_core *chip, int src) 179 179 { 180 180 unsigned long flags; 181 181 ··· 192 192 * change the audio source if necessary and possible 193 193 * returns 1 if the source is actually changed. 194 194 */ 195 - int vx_sync_audio_source(vx_core_t *chip) 195 + int vx_sync_audio_source(struct vx_core *chip) 196 196 { 197 197 if (chip->audio_source_target == chip->audio_source || 198 198 chip->pcm_running) ··· 217 217 short monitor_level; 218 218 }; 219 219 220 - static int vx_adjust_audio_level(vx_core_t *chip, int audio, int capture, 220 + static int vx_adjust_audio_level(struct vx_core *chip, int audio, int capture, 221 221 struct vx_audio_level *info) 222 222 { 223 223 struct vx_rmh rmh; ··· 256 256 257 257 258 258 #if 0 // not used 259 - static int vx_read_audio_level(vx_core_t *chip, int audio, int capture, 259 + static int vx_read_audio_level(struct vx_core *chip, int audio, int capture, 260 260 struct vx_audio_level *info) 261 261 { 262 262 int err; ··· 283 283 * set the monitoring level and mute state of the given audio 284 284 * no more static, because must be called from vx_pcm to demute monitoring 285 285 */ 286 - int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active) 286 + int vx_set_monitor_level(struct vx_core *chip, int audio, int level, int active) 287 287 { 288 288 struct vx_audio_level info; 289 289 ··· 301 301 /* 302 302 * set the mute status of the given audio 303 303 */ 304 - static int vx_set_audio_switch(vx_core_t *chip, int audio, int active) 304 + static int vx_set_audio_switch(struct vx_core *chip, int audio, int active) 305 305 { 306 306 struct vx_audio_level info; 307 307 ··· 315 315 /* 316 316 * set the mute status of the given audio 317 317 */ 318 - static int vx_set_audio_gain(vx_core_t *chip, int audio, int capture, int level) 318 + static int vx_set_audio_gain(struct vx_core *chip, int audio, int capture, int level) 319 319 { 320 320 struct vx_audio_level info; 321 321 ··· 329 329 /* 330 330 * reset all audio levels 331 331 */ 332 - static void vx_reset_audio_levels(vx_core_t *chip) 332 + static void vx_reset_audio_levels(struct vx_core *chip) 333 333 { 334 334 unsigned int i, c; 335 335 struct vx_audio_level info; ··· 375 375 * @capture: 0 = playback, 1 = capture operation 376 376 * @info: the array of vx_vu_meter records (size = 2). 377 377 */ 378 - static int vx_get_audio_vu_meter(vx_core_t *chip, int audio, int capture, struct vx_vu_meter *info) 378 + static int vx_get_audio_vu_meter(struct vx_core *chip, int audio, int capture, struct vx_vu_meter *info) 379 379 { 380 380 struct vx_rmh rmh; 381 381 int i, err; ··· 413 413 /* 414 414 * output level control 415 415 */ 416 - static int vx_output_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 416 + static int vx_output_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 417 417 { 418 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 418 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 419 419 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 420 420 uinfo->count = 2; 421 421 uinfo->value.integer.min = 0; ··· 423 423 return 0; 424 424 } 425 425 426 - static int vx_output_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 426 + static int vx_output_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 427 427 { 428 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 428 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 429 429 int codec = kcontrol->id.index; 430 430 down(&chip->mixer_mutex); 431 431 ucontrol->value.integer.value[0] = chip->output_level[codec][0]; ··· 434 434 return 0; 435 435 } 436 436 437 - static int vx_output_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 437 + static int vx_output_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 438 438 { 439 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 439 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 440 440 int codec = kcontrol->id.index; 441 441 down(&chip->mixer_mutex); 442 442 if (ucontrol->value.integer.value[0] != chip->output_level[codec][0] || ··· 453 453 return 0; 454 454 } 455 455 456 - static snd_kcontrol_new_t vx_control_output_level = { 456 + static struct snd_kcontrol_new vx_control_output_level = { 457 457 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 458 458 .name = "Master Playback Volume", 459 459 .info = vx_output_level_info, ··· 464 464 /* 465 465 * audio source select 466 466 */ 467 - static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 467 + static int vx_audio_src_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 468 468 { 469 469 static char *texts_mic[3] = { 470 470 "Digital", "Line", "Mic" ··· 472 472 static char *texts_vx2[2] = { 473 473 "Digital", "Analog" 474 474 }; 475 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 475 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 476 476 477 477 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 478 478 uinfo->count = 1; ··· 492 492 return 0; 493 493 } 494 494 495 - static int vx_audio_src_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 495 + static int vx_audio_src_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 496 496 { 497 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 497 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 498 498 ucontrol->value.enumerated.item[0] = chip->audio_source_target; 499 499 return 0; 500 500 } 501 501 502 - static int vx_audio_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 502 + static int vx_audio_src_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 503 503 { 504 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 504 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 505 505 down(&chip->mixer_mutex); 506 506 if (chip->audio_source_target != ucontrol->value.enumerated.item[0]) { 507 507 chip->audio_source_target = ucontrol->value.enumerated.item[0]; ··· 513 513 return 0; 514 514 } 515 515 516 - static snd_kcontrol_new_t vx_control_audio_src = { 516 + static struct snd_kcontrol_new vx_control_audio_src = { 517 517 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 518 518 .name = "Capture Source", 519 519 .info = vx_audio_src_info, ··· 524 524 /* 525 525 * clock mode selection 526 526 */ 527 - static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 527 + static int vx_clock_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 528 528 { 529 529 static char *texts[3] = { 530 530 "Auto", "Internal", "External" ··· 540 540 return 0; 541 541 } 542 542 543 - static int vx_clock_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 543 + static int vx_clock_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 544 544 { 545 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 545 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 546 546 ucontrol->value.enumerated.item[0] = chip->clock_mode; 547 547 return 0; 548 548 } 549 549 550 - static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 550 + static int vx_clock_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 551 551 { 552 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 552 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 553 553 down(&chip->mixer_mutex); 554 554 if (chip->clock_mode != ucontrol->value.enumerated.item[0]) { 555 555 chip->clock_mode = ucontrol->value.enumerated.item[0]; ··· 561 561 return 0; 562 562 } 563 563 564 - static snd_kcontrol_new_t vx_control_clock_mode = { 564 + static struct snd_kcontrol_new vx_control_clock_mode = { 565 565 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 566 566 .name = "Clock Mode", 567 567 .info = vx_clock_mode_info, ··· 572 572 /* 573 573 * Audio Gain 574 574 */ 575 - static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 575 + static int vx_audio_gain_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 576 576 { 577 577 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 578 578 uinfo->count = 2; ··· 581 581 return 0; 582 582 } 583 583 584 - static int vx_audio_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 584 + static int vx_audio_gain_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 585 585 { 586 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 586 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 587 587 int audio = kcontrol->private_value & 0xff; 588 588 int capture = (kcontrol->private_value >> 8) & 1; 589 589 ··· 594 594 return 0; 595 595 } 596 596 597 - static int vx_audio_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 597 + static int vx_audio_gain_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 598 598 { 599 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 599 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 600 600 int audio = kcontrol->private_value & 0xff; 601 601 int capture = (kcontrol->private_value >> 8) & 1; 602 602 ··· 612 612 return 0; 613 613 } 614 614 615 - static int vx_audio_monitor_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 615 + static int vx_audio_monitor_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 616 616 { 617 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 617 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 618 618 int audio = kcontrol->private_value & 0xff; 619 619 620 620 down(&chip->mixer_mutex); ··· 624 624 return 0; 625 625 } 626 626 627 - static int vx_audio_monitor_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 627 + static int vx_audio_monitor_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 628 628 { 629 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 629 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 630 630 int audio = kcontrol->private_value & 0xff; 631 631 632 632 down(&chip->mixer_mutex); ··· 643 643 return 0; 644 644 } 645 645 646 - static int vx_audio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 646 + static int vx_audio_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 647 647 { 648 648 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 649 649 uinfo->count = 2; ··· 652 652 return 0; 653 653 } 654 654 655 - static int vx_audio_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 655 + static int vx_audio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 656 656 { 657 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 657 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 658 658 int audio = kcontrol->private_value & 0xff; 659 659 660 660 down(&chip->mixer_mutex); ··· 664 664 return 0; 665 665 } 666 666 667 - static int vx_audio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 667 + static int vx_audio_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 668 668 { 669 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 669 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 670 670 int audio = kcontrol->private_value & 0xff; 671 671 672 672 down(&chip->mixer_mutex); ··· 681 681 return 0; 682 682 } 683 683 684 - static int vx_monitor_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 684 + static int vx_monitor_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 685 685 { 686 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 686 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 687 687 int audio = kcontrol->private_value & 0xff; 688 688 689 689 down(&chip->mixer_mutex); ··· 693 693 return 0; 694 694 } 695 695 696 - static int vx_monitor_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 696 + static int vx_monitor_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 697 697 { 698 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 698 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 699 699 int audio = kcontrol->private_value & 0xff; 700 700 701 701 down(&chip->mixer_mutex); ··· 712 712 return 0; 713 713 } 714 714 715 - static snd_kcontrol_new_t vx_control_audio_gain = { 715 + static struct snd_kcontrol_new vx_control_audio_gain = { 716 716 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 717 717 /* name will be filled later */ 718 718 .info = vx_audio_gain_info, 719 719 .get = vx_audio_gain_get, 720 720 .put = vx_audio_gain_put 721 721 }; 722 - static snd_kcontrol_new_t vx_control_output_switch = { 722 + static struct snd_kcontrol_new vx_control_output_switch = { 723 723 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 724 724 .name = "PCM Playback Switch", 725 725 .info = vx_audio_sw_info, 726 726 .get = vx_audio_sw_get, 727 727 .put = vx_audio_sw_put 728 728 }; 729 - static snd_kcontrol_new_t vx_control_monitor_gain = { 729 + static struct snd_kcontrol_new vx_control_monitor_gain = { 730 730 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 731 731 .name = "Monitoring Volume", 732 732 .info = vx_audio_gain_info, /* shared */ 733 733 .get = vx_audio_monitor_get, 734 734 .put = vx_audio_monitor_put 735 735 }; 736 - static snd_kcontrol_new_t vx_control_monitor_switch = { 736 + static struct snd_kcontrol_new vx_control_monitor_switch = { 737 737 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 738 738 .name = "Monitoring Switch", 739 739 .info = vx_audio_sw_info, /* shared */ ··· 745 745 /* 746 746 * IEC958 status bits 747 747 */ 748 - static int vx_iec958_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 748 + static int vx_iec958_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 749 749 { 750 750 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 751 751 uinfo->count = 1; 752 752 return 0; 753 753 } 754 754 755 - static int vx_iec958_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 755 + static int vx_iec958_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 756 756 { 757 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 757 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 758 758 759 759 down(&chip->mixer_mutex); 760 760 ucontrol->value.iec958.status[0] = (chip->uer_bits >> 0) & 0xff; ··· 765 765 return 0; 766 766 } 767 767 768 - static int vx_iec958_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 768 + static int vx_iec958_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 769 769 { 770 770 ucontrol->value.iec958.status[0] = 0xff; 771 771 ucontrol->value.iec958.status[1] = 0xff; ··· 774 774 return 0; 775 775 } 776 776 777 - static int vx_iec958_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 777 + static int vx_iec958_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 778 778 { 779 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 779 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 780 780 unsigned int val; 781 781 782 782 val = (ucontrol->value.iec958.status[0] << 0) | ··· 794 794 return 0; 795 795 } 796 796 797 - static snd_kcontrol_new_t vx_control_iec958_mask = { 797 + static struct snd_kcontrol_new vx_control_iec958_mask = { 798 798 .access = SNDRV_CTL_ELEM_ACCESS_READ, 799 799 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 800 800 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK), ··· 802 802 .get = vx_iec958_mask_get, 803 803 }; 804 804 805 - static snd_kcontrol_new_t vx_control_iec958 = { 805 + static struct snd_kcontrol_new vx_control_iec958 = { 806 806 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 807 807 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 808 808 .info = vx_iec958_info, ··· 818 818 #define METER_MAX 0xff 819 819 #define METER_SHIFT 16 820 820 821 - static int vx_vu_meter_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 821 + static int vx_vu_meter_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 822 822 { 823 823 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 824 824 uinfo->count = 2; ··· 827 827 return 0; 828 828 } 829 829 830 - static int vx_vu_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 830 + static int vx_vu_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 831 831 { 832 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 832 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 833 833 struct vx_vu_meter meter[2]; 834 834 int audio = kcontrol->private_value & 0xff; 835 835 int capture = (kcontrol->private_value >> 8) & 1; ··· 840 840 return 0; 841 841 } 842 842 843 - static int vx_peak_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 843 + static int vx_peak_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 844 844 { 845 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 845 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 846 846 struct vx_vu_meter meter[2]; 847 847 int audio = kcontrol->private_value & 0xff; 848 848 int capture = (kcontrol->private_value >> 8) & 1; ··· 853 853 return 0; 854 854 } 855 855 856 - static int vx_saturation_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 856 + static int vx_saturation_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 857 857 { 858 858 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 859 859 uinfo->count = 2; ··· 862 862 return 0; 863 863 } 864 864 865 - static int vx_saturation_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 865 + static int vx_saturation_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 866 866 { 867 - vx_core_t *chip = snd_kcontrol_chip(kcontrol); 867 + struct vx_core *chip = snd_kcontrol_chip(kcontrol); 868 868 struct vx_vu_meter meter[2]; 869 869 int audio = kcontrol->private_value & 0xff; 870 870 ··· 874 874 return 0; 875 875 } 876 876 877 - static snd_kcontrol_new_t vx_control_vu_meter = { 877 + static struct snd_kcontrol_new vx_control_vu_meter = { 878 878 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 879 879 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 880 880 /* name will be filled later */ ··· 882 882 .get = vx_vu_meter_get, 883 883 }; 884 884 885 - static snd_kcontrol_new_t vx_control_peak_meter = { 885 + static struct snd_kcontrol_new vx_control_peak_meter = { 886 886 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 887 887 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 888 888 /* name will be filled later */ ··· 890 890 .get = vx_peak_meter_get, 891 891 }; 892 892 893 - static snd_kcontrol_new_t vx_control_saturation = { 893 + static struct snd_kcontrol_new vx_control_saturation = { 894 894 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 895 895 .name = "Input Saturation", 896 896 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, ··· 904 904 * 905 905 */ 906 906 907 - int snd_vx_mixer_new(vx_core_t *chip) 907 + int snd_vx_mixer_new(struct vx_core *chip) 908 908 { 909 909 unsigned int i, c; 910 910 int err; 911 - snd_kcontrol_new_t temp; 912 - snd_card_t *card = chip->card; 911 + struct snd_kcontrol_new temp; 912 + struct snd_card *card = chip->card; 913 913 char name[32]; 914 914 915 915 strcpy(card->mixername, card->driver);
+110 -90
sound/drivers/vx/vx_pcm.c
··· 61 61 */ 62 62 63 63 /* get the physical page pointer on the given offset */ 64 - static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs, unsigned long offset) 64 + static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs, 65 + unsigned long offset) 65 66 { 66 67 void *pageptr = subs->runtime->dma_area + offset; 67 68 return vmalloc_to_page(pageptr); ··· 73 72 * called from hw_params 74 73 * NOTE: this may be called not only once per pcm open! 75 74 */ 76 - static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size) 75 + static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t size) 77 76 { 78 - snd_pcm_runtime_t *runtime = subs->runtime; 77 + struct snd_pcm_runtime *runtime = subs->runtime; 79 78 if (runtime->dma_area) { 80 79 /* already allocated */ 81 80 if (runtime->dma_bytes >= size) ··· 95 94 * called from hw_free callback 96 95 * NOTE: this may be called not only once per pcm open! 97 96 */ 98 - static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs) 97 + static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs) 99 98 { 100 - snd_pcm_runtime_t *runtime = subs->runtime; 99 + struct snd_pcm_runtime *runtime = subs->runtime; 101 100 if (runtime->dma_area) { 102 101 vfree(runtime->dma_area); 103 102 runtime->dma_area = NULL; ··· 109 108 /* 110 109 * read three pending pcm bytes via inb() 111 110 */ 112 - static void vx_pcm_read_per_bytes(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe) 111 + static void vx_pcm_read_per_bytes(struct vx_core *chip, struct snd_pcm_runtime *runtime, 112 + struct vx_pipe *pipe) 113 113 { 114 114 int offset = pipe->hw_ptr; 115 115 unsigned char *buf = (unsigned char *)(runtime->dma_area + offset); ··· 137 135 * @pc_time: the pointer for the PC-time to set 138 136 * @dsp_time: the pointer for RMH status time array 139 137 */ 140 - static void vx_set_pcx_time(vx_core_t *chip, pcx_time_t *pc_time, unsigned int *dsp_time) 138 + static void vx_set_pcx_time(struct vx_core *chip, pcx_time_t *pc_time, 139 + unsigned int *dsp_time) 141 140 { 142 141 dsp_time[0] = (unsigned int)((*pc_time) >> 24) & PCX_TIME_HI_MASK; 143 142 dsp_time[1] = (unsigned int)(*pc_time) & MASK_DSP_WORD; ··· 154 151 * 155 152 * returns the increase of the command length. 156 153 */ 157 - static int vx_set_differed_time(vx_core_t *chip, struct vx_rmh *rmh, vx_pipe_t *pipe) 154 + static int vx_set_differed_time(struct vx_core *chip, struct vx_rmh *rmh, 155 + struct vx_pipe *pipe) 158 156 { 159 157 /* Update The length added to the RMH command by the timestamp */ 160 158 if (! (pipe->differed_type & DC_DIFFERED_DELAY)) ··· 188 184 * @pipe: the affected pipe 189 185 * @data: format bitmask 190 186 */ 191 - static int vx_set_stream_format(vx_core_t *chip, vx_pipe_t *pipe, unsigned int data) 187 + static int vx_set_stream_format(struct vx_core *chip, struct vx_pipe *pipe, 188 + unsigned int data) 192 189 { 193 190 struct vx_rmh rmh; 194 191 ··· 215 210 * 216 211 * returns 0 if successful, or a negative error code. 217 212 */ 218 - static int vx_set_format(vx_core_t *chip, vx_pipe_t *pipe, 219 - snd_pcm_runtime_t *runtime) 213 + static int vx_set_format(struct vx_core *chip, struct vx_pipe *pipe, 214 + struct snd_pcm_runtime *runtime) 220 215 { 221 216 unsigned int header = HEADER_FMT_BASE; 222 217 ··· 244 239 /* 245 240 * set / query the IBL size 246 241 */ 247 - static int vx_set_ibl(vx_core_t *chip, struct vx_ibl_info *info) 242 + static int vx_set_ibl(struct vx_core *chip, struct vx_ibl_info *info) 248 243 { 249 244 int err; 250 245 struct vx_rmh rmh; ··· 274 269 * 275 270 * called from trigger callback only 276 271 */ 277 - static int vx_get_pipe_state(vx_core_t *chip, vx_pipe_t *pipe, int *state) 272 + static int vx_get_pipe_state(struct vx_core *chip, struct vx_pipe *pipe, int *state) 278 273 { 279 274 int err; 280 275 struct vx_rmh rmh; ··· 299 294 * you'll need to disconnect the host to get back to the 300 295 * normal mode. 301 296 */ 302 - static int vx_query_hbuffer_size(vx_core_t *chip, vx_pipe_t *pipe) 297 + static int vx_query_hbuffer_size(struct vx_core *chip, struct vx_pipe *pipe) 303 298 { 304 299 int result; 305 300 struct vx_rmh rmh; ··· 323 318 * 324 319 * called from trigger callback only 325 320 */ 326 - static int vx_pipe_can_start(vx_core_t *chip, vx_pipe_t *pipe) 321 + static int vx_pipe_can_start(struct vx_core *chip, struct vx_pipe *pipe) 327 322 { 328 323 int err; 329 324 struct vx_rmh rmh; ··· 344 339 * vx_conf_pipe - tell the pipe to stand by and wait for IRQA. 345 340 * @pipe: the pipe to be configured 346 341 */ 347 - static int vx_conf_pipe(vx_core_t *chip, vx_pipe_t *pipe) 342 + static int vx_conf_pipe(struct vx_core *chip, struct vx_pipe *pipe) 348 343 { 349 344 struct vx_rmh rmh; 350 345 ··· 358 353 /* 359 354 * vx_send_irqa - trigger IRQA 360 355 */ 361 - static int vx_send_irqa(vx_core_t *chip) 356 + static int vx_send_irqa(struct vx_core *chip) 362 357 { 363 358 struct vx_rmh rmh; 364 359 ··· 383 378 * called from trigger callback only 384 379 * 385 380 */ 386 - static int vx_toggle_pipe(vx_core_t *chip, vx_pipe_t *pipe, int state) 381 + static int vx_toggle_pipe(struct vx_core *chip, struct vx_pipe *pipe, int state) 387 382 { 388 383 int err, i, cur_state; 389 384 ··· 436 431 * 437 432 * called from trigger callback only 438 433 */ 439 - static int vx_stop_pipe(vx_core_t *chip, vx_pipe_t *pipe) 434 + static int vx_stop_pipe(struct vx_core *chip, struct vx_pipe *pipe) 440 435 { 441 436 struct vx_rmh rmh; 442 437 vx_init_rmh(&rmh, CMD_STOP_PIPE); ··· 454 449 * 455 450 * return 0 on success, or a negative error code. 456 451 */ 457 - static int vx_alloc_pipe(vx_core_t *chip, int capture, 452 + static int vx_alloc_pipe(struct vx_core *chip, int capture, 458 453 int audioid, int num_audio, 459 - vx_pipe_t **pipep) 454 + struct vx_pipe **pipep) 460 455 { 461 456 int err; 462 - vx_pipe_t *pipe; 457 + struct vx_pipe *pipe; 463 458 struct vx_rmh rmh; 464 459 int data_mode; 465 460 ··· 504 499 * vx_free_pipe - release a pipe 505 500 * @pipe: pipe to be released 506 501 */ 507 - static int vx_free_pipe(vx_core_t *chip, vx_pipe_t *pipe) 502 + static int vx_free_pipe(struct vx_core *chip, struct vx_pipe *pipe) 508 503 { 509 504 struct vx_rmh rmh; 510 505 ··· 522 517 * 523 518 * called from trigger callback only 524 519 */ 525 - static int vx_start_stream(vx_core_t *chip, vx_pipe_t *pipe) 520 + static int vx_start_stream(struct vx_core *chip, struct vx_pipe *pipe) 526 521 { 527 522 struct vx_rmh rmh; 528 523 ··· 538 533 * 539 534 * called from trigger callback only 540 535 */ 541 - static int vx_stop_stream(vx_core_t *chip, vx_pipe_t *pipe) 536 + static int vx_stop_stream(struct vx_core *chip, struct vx_pipe *pipe) 542 537 { 543 538 struct vx_rmh rmh; 544 539 ··· 552 547 * playback hw information 553 548 */ 554 549 555 - static snd_pcm_hardware_t vx_pcm_playback_hw = { 550 + static struct snd_pcm_hardware vx_pcm_playback_hw = { 556 551 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 557 552 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/ 558 553 /*SNDRV_PCM_INFO_RESUME*/), 559 - .formats = /*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE, 554 + .formats = (/*SNDRV_PCM_FMTBIT_U8 |*/ 555 + SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE), 560 556 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 561 557 .rate_min = 5000, 562 558 .rate_max = 48000, ··· 577 571 /* 578 572 * vx_pcm_playback_open - open callback for playback 579 573 */ 580 - static int vx_pcm_playback_open(snd_pcm_substream_t *subs) 574 + static int vx_pcm_playback_open(struct snd_pcm_substream *subs) 581 575 { 582 - snd_pcm_runtime_t *runtime = subs->runtime; 583 - vx_core_t *chip = snd_pcm_substream_chip(subs); 584 - vx_pipe_t *pipe = NULL; 576 + struct snd_pcm_runtime *runtime = subs->runtime; 577 + struct vx_core *chip = snd_pcm_substream_chip(subs); 578 + struct vx_pipe *pipe = NULL; 585 579 unsigned int audio; 586 580 int err; 587 581 ··· 621 615 /* 622 616 * vx_pcm_playback_close - close callback for playback 623 617 */ 624 - static int vx_pcm_playback_close(snd_pcm_substream_t *subs) 618 + static int vx_pcm_playback_close(struct snd_pcm_substream *subs) 625 619 { 626 - vx_core_t *chip = snd_pcm_substream_chip(subs); 627 - vx_pipe_t *pipe; 620 + struct vx_core *chip = snd_pcm_substream_chip(subs); 621 + struct vx_pipe *pipe; 628 622 629 623 if (! subs->runtime->private_data) 630 624 return -EINVAL; ··· 647 641 * 648 642 * NB: call with a certain lock. 649 643 */ 650 - static int vx_notify_end_of_buffer(vx_core_t *chip, vx_pipe_t *pipe) 644 + static int vx_notify_end_of_buffer(struct vx_core *chip, struct vx_pipe *pipe) 651 645 { 652 646 int err; 653 647 struct vx_rmh rmh; /* use a temporary rmh here */ ··· 675 669 * 676 670 * return 0 if ok. 677 671 */ 678 - static int vx_pcm_playback_transfer_chunk(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe, int size) 672 + static int vx_pcm_playback_transfer_chunk(struct vx_core *chip, 673 + struct snd_pcm_runtime *runtime, 674 + struct vx_pipe *pipe, int size) 679 675 { 680 676 int space, err = 0; 681 677 ··· 713 705 * so that the caller can check the total transferred size later 714 706 * (to call snd_pcm_period_elapsed). 715 707 */ 716 - static int vx_update_pipe_position(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe) 708 + static int vx_update_pipe_position(struct vx_core *chip, 709 + struct snd_pcm_runtime *runtime, 710 + struct vx_pipe *pipe) 717 711 { 718 712 struct vx_rmh rmh; 719 713 int err, update; ··· 741 731 * transfer the pending playback buffer data to DSP 742 732 * called from interrupt handler 743 733 */ 744 - static void vx_pcm_playback_transfer(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe, int nchunks) 734 + static void vx_pcm_playback_transfer(struct vx_core *chip, 735 + struct snd_pcm_substream *subs, 736 + struct vx_pipe *pipe, int nchunks) 745 737 { 746 738 int i, err; 747 - snd_pcm_runtime_t *runtime = subs->runtime; 739 + struct snd_pcm_runtime *runtime = subs->runtime; 748 740 749 741 if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE)) 750 742 return; ··· 761 749 * update the playback position and call snd_pcm_period_elapsed() if necessary 762 750 * called from interrupt handler 763 751 */ 764 - static void vx_pcm_playback_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe) 752 + static void vx_pcm_playback_update(struct vx_core *chip, 753 + struct snd_pcm_substream *subs, 754 + struct vx_pipe *pipe) 765 755 { 766 756 int err; 767 - snd_pcm_runtime_t *runtime = subs->runtime; 757 + struct snd_pcm_runtime *runtime = subs->runtime; 768 758 769 759 if (pipe->running && ! (chip->chip_status & VX_STAT_IS_STALE)) { 770 760 if ((err = vx_update_pipe_position(chip, runtime, pipe)) < 0) ··· 785 771 */ 786 772 static void vx_pcm_delayed_start(unsigned long arg) 787 773 { 788 - snd_pcm_substream_t *subs = (snd_pcm_substream_t *)arg; 789 - vx_core_t *chip = subs->pcm->private_data; 790 - vx_pipe_t *pipe = subs->runtime->private_data; 774 + struct snd_pcm_substream *subs = (struct snd_pcm_substream *)arg; 775 + struct vx_core *chip = subs->pcm->private_data; 776 + struct vx_pipe *pipe = subs->runtime->private_data; 791 777 int err; 792 778 793 779 /* printk( KERN_DEBUG "DDDD tasklet delayed start jiffies = %ld\n", jiffies);*/ ··· 806 792 /* 807 793 * vx_pcm_playback_trigger - trigger callback for playback 808 794 */ 809 - static int vx_pcm_trigger(snd_pcm_substream_t *subs, int cmd) 795 + static int vx_pcm_trigger(struct snd_pcm_substream *subs, int cmd) 810 796 { 811 - vx_core_t *chip = snd_pcm_substream_chip(subs); 812 - vx_pipe_t *pipe = subs->runtime->private_data; 797 + struct vx_core *chip = snd_pcm_substream_chip(subs); 798 + struct vx_pipe *pipe = subs->runtime->private_data; 813 799 int err; 814 800 815 801 if (chip->chip_status & VX_STAT_IS_STALE) ··· 853 839 /* 854 840 * vx_pcm_playback_pointer - pointer callback for playback 855 841 */ 856 - static snd_pcm_uframes_t vx_pcm_playback_pointer(snd_pcm_substream_t *subs) 842 + static snd_pcm_uframes_t vx_pcm_playback_pointer(struct snd_pcm_substream *subs) 857 843 { 858 - snd_pcm_runtime_t *runtime = subs->runtime; 859 - vx_pipe_t *pipe = runtime->private_data; 844 + struct snd_pcm_runtime *runtime = subs->runtime; 845 + struct vx_pipe *pipe = runtime->private_data; 860 846 return pipe->position; 861 847 } 862 848 863 849 /* 864 850 * vx_pcm_hw_params - hw_params callback for playback and capture 865 851 */ 866 - static int vx_pcm_hw_params(snd_pcm_substream_t *subs, 867 - snd_pcm_hw_params_t *hw_params) 852 + static int vx_pcm_hw_params(struct snd_pcm_substream *subs, 853 + struct snd_pcm_hw_params *hw_params) 868 854 { 869 855 return snd_pcm_alloc_vmalloc_buffer(subs, params_buffer_bytes(hw_params)); 870 856 } ··· 872 858 /* 873 859 * vx_pcm_hw_free - hw_free callback for playback and capture 874 860 */ 875 - static int vx_pcm_hw_free(snd_pcm_substream_t *subs) 861 + static int vx_pcm_hw_free(struct snd_pcm_substream *subs) 876 862 { 877 863 return snd_pcm_free_vmalloc_buffer(subs); 878 864 } ··· 880 866 /* 881 867 * vx_pcm_prepare - prepare callback for playback and capture 882 868 */ 883 - static int vx_pcm_prepare(snd_pcm_substream_t *subs) 869 + static int vx_pcm_prepare(struct snd_pcm_substream *subs) 884 870 { 885 - vx_core_t *chip = snd_pcm_substream_chip(subs); 886 - snd_pcm_runtime_t *runtime = subs->runtime; 887 - vx_pipe_t *pipe = runtime->private_data; 871 + struct vx_core *chip = snd_pcm_substream_chip(subs); 872 + struct snd_pcm_runtime *runtime = subs->runtime; 873 + struct vx_pipe *pipe = runtime->private_data; 888 874 int err, data_mode; 889 875 // int max_size, nchunks; 890 876 ··· 911 897 } 912 898 913 899 if (chip->pcm_running && chip->freq != runtime->rate) { 914 - snd_printk(KERN_ERR "vx: cannot set different clock %d from the current %d\n", runtime->rate, chip->freq); 900 + snd_printk(KERN_ERR "vx: cannot set different clock %d " 901 + "from the current %d\n", runtime->rate, chip->freq); 915 902 return -EINVAL; 916 903 } 917 904 vx_set_clock(chip, runtime->rate); ··· 945 930 /* 946 931 * operators for PCM playback 947 932 */ 948 - static snd_pcm_ops_t vx_pcm_playback_ops = { 933 + static struct snd_pcm_ops vx_pcm_playback_ops = { 949 934 .open = vx_pcm_playback_open, 950 935 .close = vx_pcm_playback_close, 951 936 .ioctl = snd_pcm_lib_ioctl, ··· 962 947 * playback hw information 963 948 */ 964 949 965 - static snd_pcm_hardware_t vx_pcm_capture_hw = { 950 + static struct snd_pcm_hardware vx_pcm_capture_hw = { 966 951 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 967 952 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/ 968 953 /*SNDRV_PCM_INFO_RESUME*/), 969 - .formats = /*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE, 954 + .formats = (/*SNDRV_PCM_FMTBIT_U8 |*/ 955 + SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE), 970 956 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, 971 957 .rate_min = 5000, 972 958 .rate_max = 48000, ··· 985 969 /* 986 970 * vx_pcm_capture_open - open callback for capture 987 971 */ 988 - static int vx_pcm_capture_open(snd_pcm_substream_t *subs) 972 + static int vx_pcm_capture_open(struct snd_pcm_substream *subs) 989 973 { 990 - snd_pcm_runtime_t *runtime = subs->runtime; 991 - vx_core_t *chip = snd_pcm_substream_chip(subs); 992 - vx_pipe_t *pipe; 993 - vx_pipe_t *pipe_out_monitoring = NULL; 974 + struct snd_pcm_runtime *runtime = subs->runtime; 975 + struct vx_core *chip = snd_pcm_substream_chip(subs); 976 + struct vx_pipe *pipe; 977 + struct vx_pipe *pipe_out_monitoring = NULL; 994 978 unsigned int audio; 995 979 int err; 996 980 ··· 1021 1005 if an output pipe is available, it's audios still may need to be 1022 1006 unmuted. hence we'll have to call a mixer entry point. 1023 1007 */ 1024 - vx_set_monitor_level(chip, audio, chip->audio_monitor[audio], chip->audio_monitor_active[audio]); 1008 + vx_set_monitor_level(chip, audio, chip->audio_monitor[audio], 1009 + chip->audio_monitor_active[audio]); 1025 1010 /* assuming stereo */ 1026 - vx_set_monitor_level(chip, audio+1, chip->audio_monitor[audio+1], chip->audio_monitor_active[audio+1]); 1011 + vx_set_monitor_level(chip, audio+1, chip->audio_monitor[audio+1], 1012 + chip->audio_monitor_active[audio+1]); 1027 1013 } 1028 1014 1029 1015 pipe->monitoring_pipe = pipe_out_monitoring; /* default value NULL */ ··· 1044 1026 /* 1045 1027 * vx_pcm_capture_close - close callback for capture 1046 1028 */ 1047 - static int vx_pcm_capture_close(snd_pcm_substream_t *subs) 1029 + static int vx_pcm_capture_close(struct snd_pcm_substream *subs) 1048 1030 { 1049 - vx_core_t *chip = snd_pcm_substream_chip(subs); 1050 - vx_pipe_t *pipe; 1051 - vx_pipe_t *pipe_out_monitoring; 1031 + struct vx_core *chip = snd_pcm_substream_chip(subs); 1032 + struct vx_pipe *pipe; 1033 + struct vx_pipe *pipe_out_monitoring; 1052 1034 1053 1035 if (! subs->runtime->private_data) 1054 1036 return -EINVAL; ··· 1080 1062 /* 1081 1063 * vx_pcm_capture_update - update the capture buffer 1082 1064 */ 1083 - static void vx_pcm_capture_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe) 1065 + static void vx_pcm_capture_update(struct vx_core *chip, struct snd_pcm_substream *subs, 1066 + struct vx_pipe *pipe) 1084 1067 { 1085 1068 int size, space, count; 1086 - snd_pcm_runtime_t *runtime = subs->runtime; 1069 + struct snd_pcm_runtime *runtime = subs->runtime; 1087 1070 1088 1071 if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE)) 1089 1072 return; ··· 1154 1135 /* 1155 1136 * vx_pcm_capture_pointer - pointer callback for capture 1156 1137 */ 1157 - static snd_pcm_uframes_t vx_pcm_capture_pointer(snd_pcm_substream_t *subs) 1138 + static snd_pcm_uframes_t vx_pcm_capture_pointer(struct snd_pcm_substream *subs) 1158 1139 { 1159 - snd_pcm_runtime_t *runtime = subs->runtime; 1160 - vx_pipe_t *pipe = runtime->private_data; 1140 + struct snd_pcm_runtime *runtime = subs->runtime; 1141 + struct vx_pipe *pipe = runtime->private_data; 1161 1142 return bytes_to_frames(runtime, pipe->hw_ptr); 1162 1143 } 1163 1144 1164 1145 /* 1165 1146 * operators for PCM capture 1166 1147 */ 1167 - static snd_pcm_ops_t vx_pcm_capture_ops = { 1148 + static struct snd_pcm_ops vx_pcm_capture_ops = { 1168 1149 .open = vx_pcm_capture_open, 1169 1150 .close = vx_pcm_capture_close, 1170 1151 .ioctl = snd_pcm_lib_ioctl, ··· 1180 1161 /* 1181 1162 * interrupt handler for pcm streams 1182 1163 */ 1183 - void vx_pcm_update_intr(vx_core_t *chip, unsigned int events) 1164 + void vx_pcm_update_intr(struct vx_core *chip, unsigned int events) 1184 1165 { 1185 1166 unsigned int i; 1186 - vx_pipe_t *pipe; 1167 + struct vx_pipe *pipe; 1187 1168 1188 1169 #define EVENT_MASK (END_OF_BUFFER_EVENTS_PENDING|ASYNC_EVENTS_PENDING) 1189 1170 ··· 1237 1218 /* 1238 1219 * vx_init_audio_io - check the availabe audio i/o and allocate pipe arrays 1239 1220 */ 1240 - static int vx_init_audio_io(vx_core_t *chip) 1221 + static int vx_init_audio_io(struct vx_core *chip) 1241 1222 { 1242 1223 struct vx_rmh rmh; 1243 1224 int preferred; ··· 1253 1234 chip->audio_info = rmh.Stat[1]; 1254 1235 1255 1236 /* allocate pipes */ 1256 - chip->playback_pipes = kmalloc(sizeof(vx_pipe_t *) * chip->audio_outs, GFP_KERNEL); 1257 - chip->capture_pipes = kmalloc(sizeof(vx_pipe_t *) * chip->audio_ins, GFP_KERNEL); 1237 + chip->playback_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_outs, GFP_KERNEL); 1238 + chip->capture_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_ins, GFP_KERNEL); 1258 1239 if (! chip->playback_pipes || ! chip->capture_pipes) 1259 1240 return -ENOMEM; 1260 1241 1261 - memset(chip->playback_pipes, 0, sizeof(vx_pipe_t *) * chip->audio_outs); 1262 - memset(chip->capture_pipes, 0, sizeof(vx_pipe_t *) * chip->audio_ins); 1242 + memset(chip->playback_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_outs); 1243 + memset(chip->capture_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_ins); 1263 1244 1264 1245 preferred = chip->ibl.size; 1265 1246 chip->ibl.size = 0; 1266 1247 vx_set_ibl(chip, &chip->ibl); /* query the info */ 1267 1248 if (preferred > 0) { 1268 - chip->ibl.size = ((preferred + chip->ibl.granularity - 1) / chip->ibl.granularity) * chip->ibl.granularity; 1249 + chip->ibl.size = ((preferred + chip->ibl.granularity - 1) / 1250 + chip->ibl.granularity) * chip->ibl.granularity; 1269 1251 if (chip->ibl.size > chip->ibl.max_size) 1270 1252 chip->ibl.size = chip->ibl.max_size; 1271 1253 } else ··· 1280 1260 /* 1281 1261 * free callback for pcm 1282 1262 */ 1283 - static void snd_vx_pcm_free(snd_pcm_t *pcm) 1263 + static void snd_vx_pcm_free(struct snd_pcm *pcm) 1284 1264 { 1285 - vx_core_t *chip = pcm->private_data; 1265 + struct vx_core *chip = pcm->private_data; 1286 1266 chip->pcm[pcm->device] = NULL; 1287 1267 kfree(chip->playback_pipes); 1288 1268 chip->playback_pipes = NULL; ··· 1293 1273 /* 1294 1274 * snd_vx_pcm_new - create and initialize a pcm 1295 1275 */ 1296 - int snd_vx_pcm_new(vx_core_t *chip) 1276 + int snd_vx_pcm_new(struct vx_core *chip) 1297 1277 { 1298 - snd_pcm_t *pcm; 1278 + struct snd_pcm *pcm; 1299 1279 unsigned int i; 1300 1280 int err; 1301 1281
+11 -11
sound/drivers/vx/vx_uer.c
··· 31 31 * vx_modify_board_clock - tell the board that its clock has been modified 32 32 * @sync: DSP needs to resynchronize its FIFO 33 33 */ 34 - static int vx_modify_board_clock(vx_core_t *chip, int sync) 34 + static int vx_modify_board_clock(struct vx_core *chip, int sync) 35 35 { 36 36 struct vx_rmh rmh; 37 37 ··· 45 45 /* 46 46 * vx_modify_board_inputs - resync audio inputs 47 47 */ 48 - static int vx_modify_board_inputs(vx_core_t *chip) 48 + static int vx_modify_board_inputs(struct vx_core *chip) 49 49 { 50 50 struct vx_rmh rmh; 51 51 ··· 59 59 * @index: the bit index 60 60 * returns 0 or 1. 61 61 */ 62 - static int vx_read_one_cbit(vx_core_t *chip, int index) 62 + static int vx_read_one_cbit(struct vx_core *chip, int index) 63 63 { 64 64 unsigned long flags; 65 65 int val; ··· 82 82 * @index: the bit index 83 83 * @val: bit value, 0 or 1 84 84 */ 85 - static void vx_write_one_cbit(vx_core_t *chip, int index, int val) 85 + static void vx_write_one_cbit(struct vx_core *chip, int index, int val) 86 86 { 87 87 unsigned long flags; 88 88 val = !!val; /* 0 or 1 */ ··· 104 104 * returns the frequency of UER, or 0 if not sync, 105 105 * or a negative error code. 106 106 */ 107 - static int vx_read_uer_status(vx_core_t *chip, int *mode) 107 + static int vx_read_uer_status(struct vx_core *chip, int *mode) 108 108 { 109 109 int val, freq; 110 110 ··· 160 160 * default : HexFreq = (dword) ((double) 28224000 / (double) (Frequency*4)) - 0x000001FF 161 161 */ 162 162 163 - static int vx_calc_clock_from_freq(vx_core_t *chip, int freq) 163 + static int vx_calc_clock_from_freq(struct vx_core *chip, int freq) 164 164 { 165 165 int hexfreq; 166 166 ··· 187 187 * vx_change_clock_source - change the clock source 188 188 * @source: the new source 189 189 */ 190 - static void vx_change_clock_source(vx_core_t *chip, int source) 190 + static void vx_change_clock_source(struct vx_core *chip, int source) 191 191 { 192 192 unsigned long flags; 193 193 ··· 205 205 /* 206 206 * set the internal clock 207 207 */ 208 - void vx_set_internal_clock(vx_core_t *chip, unsigned int freq) 208 + void vx_set_internal_clock(struct vx_core *chip, unsigned int freq) 209 209 { 210 210 int clock; 211 211 unsigned long flags; ··· 228 228 * set the iec958 status bits 229 229 * @bits: 32-bit status bits 230 230 */ 231 - void vx_set_iec958_status(vx_core_t *chip, unsigned int bits) 231 + void vx_set_iec958_status(struct vx_core *chip, unsigned int bits) 232 232 { 233 233 int i; 234 234 ··· 243 243 /* 244 244 * vx_set_clock - change the clock and audio source if necessary 245 245 */ 246 - int vx_set_clock(vx_core_t *chip, unsigned int freq) 246 + int vx_set_clock(struct vx_core *chip, unsigned int freq) 247 247 { 248 248 int src_changed = 0; 249 249 ··· 285 285 /* 286 286 * vx_change_frequency - called from interrupt handler 287 287 */ 288 - int vx_change_frequency(vx_core_t *chip) 288 + int vx_change_frequency(struct vx_core *chip) 289 289 { 290 290 int freq; 291 291
+8 -8
sound/pci/vx222/vx222.c
··· 108 108 109 109 /* 110 110 */ 111 - static int snd_vx222_free(vx_core_t *chip) 111 + static int snd_vx222_free(struct vx_core *chip) 112 112 { 113 113 struct snd_vx222 *vx = (struct snd_vx222 *)chip; 114 114 ··· 121 121 return 0; 122 122 } 123 123 124 - static int snd_vx222_dev_free(snd_device_t *device) 124 + static int snd_vx222_dev_free(struct snd_device *device) 125 125 { 126 - vx_core_t *chip = device->device_data; 126 + struct vx_core *chip = device->device_data; 127 127 return snd_vx222_free(chip); 128 128 } 129 129 130 130 131 - static int __devinit snd_vx222_create(snd_card_t *card, struct pci_dev *pci, 131 + static int __devinit snd_vx222_create(struct snd_card *card, struct pci_dev *pci, 132 132 struct snd_vx_hardware *hw, 133 133 struct snd_vx222 **rchip) 134 134 { 135 - vx_core_t *chip; 135 + struct vx_core *chip; 136 136 struct snd_vx222 *vx; 137 137 int i, err; 138 - static snd_device_ops_t ops = { 138 + static struct snd_device_ops ops = { 139 139 .dev_free = snd_vx222_dev_free, 140 140 }; 141 141 struct snd_vx_ops *vx_ops; ··· 147 147 148 148 vx_ops = hw->type == VX_TYPE_BOARD ? &vx222_old_ops : &vx222_ops; 149 149 chip = snd_vx_create(card, hw, vx_ops, 150 - sizeof(struct snd_vx222) - sizeof(vx_core_t)); 150 + sizeof(struct snd_vx222) - sizeof(struct vx_core)); 151 151 if (! chip) { 152 152 pci_disable_device(pci); 153 153 return -ENOMEM; ··· 186 186 const struct pci_device_id *pci_id) 187 187 { 188 188 static int dev; 189 - snd_card_t *card; 189 + struct snd_card *card; 190 190 struct snd_vx_hardware *hw; 191 191 struct snd_vx222 *vx; 192 192 int err;
+1 -1
sound/pci/vx222/vx222.h
··· 25 25 26 26 struct snd_vx222 { 27 27 28 - vx_core_t core; 28 + struct vx_core core; 29 29 30 30 /* h/w config; for PLX and for DSP */ 31 31 struct pci_dev *pci;
+42 -42
sound/pci/vx222/vx222_ops.c
··· 82 82 [VX_GPIOC] = 0, /* on the PLX */ 83 83 }; 84 84 85 - static inline unsigned long vx2_reg_addr(vx_core_t *_chip, int reg) 85 + static inline unsigned long vx2_reg_addr(struct vx_core *_chip, int reg) 86 86 { 87 87 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 88 88 return chip->port[vx2_reg_index[reg]] + vx2_reg_offset[reg]; ··· 92 92 * snd_vx_inb - read a byte from the register 93 93 * @offset: register enum 94 94 */ 95 - static unsigned char vx2_inb(vx_core_t *chip, int offset) 95 + static unsigned char vx2_inb(struct vx_core *chip, int offset) 96 96 { 97 97 return inb(vx2_reg_addr(chip, offset)); 98 98 } ··· 102 102 * @offset: the register offset 103 103 * @val: the value to write 104 104 */ 105 - static void vx2_outb(vx_core_t *chip, int offset, unsigned char val) 105 + static void vx2_outb(struct vx_core *chip, int offset, unsigned char val) 106 106 { 107 107 outb(val, vx2_reg_addr(chip, offset)); 108 108 //printk("outb: %x -> %x\n", val, vx2_reg_addr(chip, offset)); ··· 112 112 * snd_vx_inl - read a 32bit word from the register 113 113 * @offset: register enum 114 114 */ 115 - static unsigned int vx2_inl(vx_core_t *chip, int offset) 115 + static unsigned int vx2_inl(struct vx_core *chip, int offset) 116 116 { 117 117 return inl(vx2_reg_addr(chip, offset)); 118 118 } ··· 122 122 * @offset: the register enum 123 123 * @val: the value to write 124 124 */ 125 - static void vx2_outl(vx_core_t *chip, int offset, unsigned int val) 125 + static void vx2_outl(struct vx_core *chip, int offset, unsigned int val) 126 126 { 127 127 // printk("outl: %x -> %x\n", val, vx2_reg_addr(chip, offset)); 128 128 outl(val, vx2_reg_addr(chip, offset)); ··· 132 132 * redefine macros to call directly 133 133 */ 134 134 #undef vx_inb 135 - #define vx_inb(chip,reg) vx2_inb((vx_core_t*)(chip), VX_##reg) 135 + #define vx_inb(chip,reg) vx2_inb((struct vx_core*)(chip), VX_##reg) 136 136 #undef vx_outb 137 - #define vx_outb(chip,reg,val) vx2_outb((vx_core_t*)(chip), VX_##reg, val) 137 + #define vx_outb(chip,reg,val) vx2_outb((struct vx_core*)(chip), VX_##reg, val) 138 138 #undef vx_inl 139 - #define vx_inl(chip,reg) vx2_inl((vx_core_t*)(chip), VX_##reg) 139 + #define vx_inl(chip,reg) vx2_inl((struct vx_core*)(chip), VX_##reg) 140 140 #undef vx_outl 141 - #define vx_outl(chip,reg,val) vx2_outl((vx_core_t*)(chip), VX_##reg, val) 141 + #define vx_outl(chip,reg,val) vx2_outl((struct vx_core*)(chip), VX_##reg, val) 142 142 143 143 144 144 /* ··· 147 147 148 148 #define XX_DSP_RESET_WAIT_TIME 2 /* ms */ 149 149 150 - static void vx2_reset_dsp(vx_core_t *_chip) 150 + static void vx2_reset_dsp(struct vx_core *_chip) 151 151 { 152 152 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 153 153 ··· 162 162 } 163 163 164 164 165 - static int vx2_test_xilinx(vx_core_t *_chip) 165 + static int vx2_test_xilinx(struct vx_core *_chip) 166 166 { 167 167 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 168 168 unsigned int data; ··· 219 219 * vx_setup_pseudo_dma - set up the pseudo dma read/write mode. 220 220 * @do_write: 0 = read, 1 = set up for DMA write 221 221 */ 222 - static void vx2_setup_pseudo_dma(vx_core_t *chip, int do_write) 222 + static void vx2_setup_pseudo_dma(struct vx_core *chip, int do_write) 223 223 { 224 224 /* Interrupt mode and HREQ pin enabled for host transmit data transfers 225 225 * (in case of the use of the pseudo-dma facility). ··· 235 235 /* 236 236 * vx_release_pseudo_dma - disable the pseudo-DMA mode 237 237 */ 238 - static inline void vx2_release_pseudo_dma(vx_core_t *chip) 238 + static inline void vx2_release_pseudo_dma(struct vx_core *chip) 239 239 { 240 240 /* HREQ pin disabled. */ 241 241 vx_outl(chip, ICR, 0); ··· 244 244 245 245 246 246 /* pseudo-dma write */ 247 - static void vx2_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime, 248 - vx_pipe_t *pipe, int count) 247 + static void vx2_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime, 248 + struct vx_pipe *pipe, int count) 249 249 { 250 250 unsigned long port = vx2_reg_addr(chip, VX_DMA); 251 251 int offset = pipe->hw_ptr; ··· 282 282 283 283 284 284 /* pseudo dma read */ 285 - static void vx2_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime, 286 - vx_pipe_t *pipe, int count) 285 + static void vx2_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime, 286 + struct vx_pipe *pipe, int count) 287 287 { 288 288 int offset = pipe->hw_ptr; 289 289 u32 *addr = (u32 *)(runtime->dma_area + offset); ··· 321 321 /* 322 322 * transfer counts bits to PLX 323 323 */ 324 - static int put_xilinx_data(vx_core_t *chip, unsigned int port, unsigned int counts, unsigned char data) 324 + static int put_xilinx_data(struct vx_core *chip, unsigned int port, unsigned int counts, unsigned char data) 325 325 { 326 326 unsigned int i; 327 327 ··· 353 353 /* 354 354 * load the xilinx image 355 355 */ 356 - static int vx2_load_xilinx_binary(vx_core_t *chip, const struct firmware *xilinx) 356 + static int vx2_load_xilinx_binary(struct vx_core *chip, const struct firmware *xilinx) 357 357 { 358 358 unsigned int i; 359 359 unsigned int port; ··· 400 400 /* 401 401 * load the boot/dsp images 402 402 */ 403 - static int vx2_load_dsp(vx_core_t *vx, int index, const struct firmware *dsp) 403 + static int vx2_load_dsp(struct vx_core *vx, int index, const struct firmware *dsp) 404 404 { 405 405 int err; 406 406 ··· 432 432 * 433 433 * spinlock held! 434 434 */ 435 - static int vx2_test_and_ack(vx_core_t *chip) 435 + static int vx2_test_and_ack(struct vx_core *chip) 436 436 { 437 437 /* not booted yet? */ 438 438 if (! (chip->chip_status & VX_STAT_XILINX_LOADED)) ··· 463 463 /* 464 464 * vx_validate_irq - enable/disable IRQ 465 465 */ 466 - static void vx2_validate_irq(vx_core_t *_chip, int enable) 466 + static void vx2_validate_irq(struct vx_core *_chip, int enable) 467 467 { 468 468 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 469 469 ··· 484 484 /* 485 485 * write an AKM codec data (24bit) 486 486 */ 487 - static void vx2_write_codec_reg(vx_core_t *chip, unsigned int data) 487 + static void vx2_write_codec_reg(struct vx_core *chip, unsigned int data) 488 488 { 489 489 unsigned int i; 490 490 ··· 660 660 /* 661 661 * pseudo-codec write entry 662 662 */ 663 - static void vx2_write_akm(vx_core_t *chip, int reg, unsigned int data) 663 + static void vx2_write_akm(struct vx_core *chip, int reg, unsigned int data) 664 664 { 665 665 unsigned int val; 666 666 ··· 695 695 /* 696 696 * write codec bit for old VX222 board 697 697 */ 698 - static void vx2_old_write_codec_bit(vx_core_t *chip, int codec, unsigned int data) 698 + static void vx2_old_write_codec_bit(struct vx_core *chip, int codec, unsigned int data) 699 699 { 700 700 int i; 701 701 ··· 713 713 /* 714 714 * reset codec bit 715 715 */ 716 - static void vx2_reset_codec(vx_core_t *_chip) 716 + static void vx2_reset_codec(struct vx_core *_chip) 717 717 { 718 718 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 719 719 ··· 755 755 /* 756 756 * change the audio source 757 757 */ 758 - static void vx2_change_audio_source(vx_core_t *_chip, int src) 758 + static void vx2_change_audio_source(struct vx_core *_chip, int src) 759 759 { 760 760 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 761 761 ··· 774 774 /* 775 775 * set the clock source 776 776 */ 777 - static void vx2_set_clock_source(vx_core_t *_chip, int source) 777 + static void vx2_set_clock_source(struct vx_core *_chip, int source) 778 778 { 779 779 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 780 780 ··· 788 788 /* 789 789 * reset the board 790 790 */ 791 - static void vx2_reset_board(vx_core_t *_chip, int cold_reset) 791 + static void vx2_reset_board(struct vx_core *_chip, int cold_reset) 792 792 { 793 793 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 794 794 ··· 848 848 */ 849 849 850 850 /* input levels */ 851 - static int vx_input_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 851 + static int vx_input_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 852 852 { 853 853 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 854 854 uinfo->count = 2; ··· 857 857 return 0; 858 858 } 859 859 860 - static int vx_input_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 860 + static int vx_input_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 861 861 { 862 - vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 862 + struct vx_core *_chip = snd_kcontrol_chip(kcontrol); 863 863 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 864 864 down(&_chip->mixer_mutex); 865 865 ucontrol->value.integer.value[0] = chip->input_level[0]; ··· 868 868 return 0; 869 869 } 870 870 871 - static int vx_input_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 871 + static int vx_input_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 872 872 { 873 - vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 873 + struct vx_core *_chip = snd_kcontrol_chip(kcontrol); 874 874 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 875 875 down(&_chip->mixer_mutex); 876 876 if (chip->input_level[0] != ucontrol->value.integer.value[0] || ··· 886 886 } 887 887 888 888 /* mic level */ 889 - static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 889 + static int vx_mic_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 890 890 { 891 891 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 892 892 uinfo->count = 1; ··· 895 895 return 0; 896 896 } 897 897 898 - static int vx_mic_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 898 + static int vx_mic_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 899 899 { 900 - vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 900 + struct vx_core *_chip = snd_kcontrol_chip(kcontrol); 901 901 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 902 902 ucontrol->value.integer.value[0] = chip->mic_level; 903 903 return 0; 904 904 } 905 905 906 - static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 906 + static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 907 907 { 908 - vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 908 + struct vx_core *_chip = snd_kcontrol_chip(kcontrol); 909 909 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 910 910 down(&_chip->mixer_mutex); 911 911 if (chip->mic_level != ucontrol->value.integer.value[0]) { ··· 918 918 return 0; 919 919 } 920 920 921 - static snd_kcontrol_new_t vx_control_input_level = { 921 + static struct snd_kcontrol_new vx_control_input_level = { 922 922 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 923 923 .name = "Capture Volume", 924 924 .info = vx_input_level_info, ··· 926 926 .put = vx_input_level_put, 927 927 }; 928 928 929 - static snd_kcontrol_new_t vx_control_mic_level = { 929 + static struct snd_kcontrol_new vx_control_mic_level = { 930 930 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 931 931 .name = "Mic Capture Volume", 932 932 .info = vx_mic_level_info, ··· 938 938 * FIXME: compressor/limiter implementation is missing yet... 939 939 */ 940 940 941 - static int vx2_add_mic_controls(vx_core_t *_chip) 941 + static int vx2_add_mic_controls(struct vx_core *_chip) 942 942 { 943 943 struct snd_vx222 *chip = (struct snd_vx222 *)_chip; 944 944 int err;
+13 -13
sound/pcmcia/vx/vxp_mixer.c
··· 31 31 /* 32 32 * mic level control (for VXPocket) 33 33 */ 34 - static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 34 + static int vx_mic_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 35 35 { 36 36 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 37 37 uinfo->count = 1; ··· 40 40 return 0; 41 41 } 42 42 43 - static int vx_mic_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 43 + static int vx_mic_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 44 44 { 45 - vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 45 + struct vx_core *_chip = snd_kcontrol_chip(kcontrol); 46 46 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 47 47 ucontrol->value.integer.value[0] = chip->mic_level; 48 48 return 0; 49 49 } 50 50 51 - static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 51 + static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 52 52 { 53 - vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 53 + struct vx_core *_chip = snd_kcontrol_chip(kcontrol); 54 54 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 55 55 down(&_chip->mixer_mutex); 56 56 if (chip->mic_level != ucontrol->value.integer.value[0]) { ··· 63 63 return 0; 64 64 } 65 65 66 - static snd_kcontrol_new_t vx_control_mic_level = { 66 + static struct snd_kcontrol_new vx_control_mic_level = { 67 67 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 68 68 .name = "Mic Capture Volume", 69 69 .info = vx_mic_level_info, ··· 74 74 /* 75 75 * mic boost level control (for VXP440) 76 76 */ 77 - static int vx_mic_boost_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 77 + static int vx_mic_boost_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 78 78 { 79 79 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 80 80 uinfo->count = 1; ··· 83 83 return 0; 84 84 } 85 85 86 - static int vx_mic_boost_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 86 + static int vx_mic_boost_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 87 87 { 88 - vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 88 + struct vx_core *_chip = snd_kcontrol_chip(kcontrol); 89 89 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 90 90 ucontrol->value.integer.value[0] = chip->mic_level; 91 91 return 0; 92 92 } 93 93 94 - static int vx_mic_boost_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 94 + static int vx_mic_boost_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 95 95 { 96 - vx_core_t *_chip = snd_kcontrol_chip(kcontrol); 96 + struct vx_core *_chip = snd_kcontrol_chip(kcontrol); 97 97 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 98 98 down(&_chip->mixer_mutex); 99 99 if (chip->mic_level != ucontrol->value.integer.value[0]) { ··· 106 106 return 0; 107 107 } 108 108 109 - static snd_kcontrol_new_t vx_control_mic_boost = { 109 + static struct snd_kcontrol_new vx_control_mic_boost = { 110 110 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 111 111 .name = "Mic Boost", 112 112 .info = vx_mic_boost_info, ··· 115 115 }; 116 116 117 117 118 - int vxp_add_mic_controls(vx_core_t *_chip) 118 + int vxp_add_mic_controls(struct vx_core *_chip) 119 119 { 120 120 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 121 121 int err;
+24 -24
sound/pcmcia/vx/vxp_ops.c
··· 49 49 }; 50 50 51 51 52 - static inline unsigned long vxp_reg_addr(vx_core_t *_chip, int reg) 52 + static inline unsigned long vxp_reg_addr(struct vx_core *_chip, int reg) 53 53 { 54 54 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 55 55 return chip->port + vxp_reg_offset[reg]; ··· 59 59 * snd_vx_inb - read a byte from the register 60 60 * @offset: register offset 61 61 */ 62 - static unsigned char vxp_inb(vx_core_t *chip, int offset) 62 + static unsigned char vxp_inb(struct vx_core *chip, int offset) 63 63 { 64 64 return inb(vxp_reg_addr(chip, offset)); 65 65 } ··· 69 69 * @offset: the register offset 70 70 * @val: the value to write 71 71 */ 72 - static void vxp_outb(vx_core_t *chip, int offset, unsigned char val) 72 + static void vxp_outb(struct vx_core *chip, int offset, unsigned char val) 73 73 { 74 74 outb(val, vxp_reg_addr(chip, offset)); 75 75 } ··· 78 78 * redefine macros to call directly 79 79 */ 80 80 #undef vx_inb 81 - #define vx_inb(chip,reg) vxp_inb((vx_core_t*)(chip), VX_##reg) 81 + #define vx_inb(chip,reg) vxp_inb((struct vx_core *)(chip), VX_##reg) 82 82 #undef vx_outb 83 - #define vx_outb(chip,reg,val) vxp_outb((vx_core_t*)(chip), VX_##reg,val) 83 + #define vx_outb(chip,reg,val) vxp_outb((struct vx_core *)(chip), VX_##reg,val) 84 84 85 85 86 86 /* ··· 88 88 * 89 89 * returns zero if a magic word is detected, or a negative error code. 90 90 */ 91 - static int vx_check_magic(vx_core_t *chip) 91 + static int vx_check_magic(struct vx_core *chip) 92 92 { 93 93 unsigned long end_time = jiffies + HZ / 5; 94 94 int c; ··· 109 109 110 110 #define XX_DSP_RESET_WAIT_TIME 2 /* ms */ 111 111 112 - static void vxp_reset_dsp(vx_core_t *_chip) 112 + static void vxp_reset_dsp(struct vx_core *_chip) 113 113 { 114 114 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 115 115 ··· 127 127 /* 128 128 * reset codec bit 129 129 */ 130 - static void vxp_reset_codec(vx_core_t *_chip) 130 + static void vxp_reset_codec(struct vx_core *_chip) 131 131 { 132 132 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 133 133 ··· 146 146 * vx_load_xilinx_binary - load the xilinx binary image 147 147 * the binary image is the binary array converted from the bitstream file. 148 148 */ 149 - static int vxp_load_xilinx_binary(vx_core_t *_chip, const struct firmware *fw) 149 + static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware *fw) 150 150 { 151 151 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 152 152 unsigned int i; ··· 244 244 /* 245 245 * vxp_load_dsp - load_dsp callback 246 246 */ 247 - static int vxp_load_dsp(vx_core_t *vx, int index, const struct firmware *fw) 247 + static int vxp_load_dsp(struct vx_core *vx, int index, const struct firmware *fw) 248 248 { 249 249 int err; 250 250 ··· 279 279 * 280 280 * spinlock held! 281 281 */ 282 - static int vxp_test_and_ack(vx_core_t *_chip) 282 + static int vxp_test_and_ack(struct vx_core *_chip) 283 283 { 284 284 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 285 285 ··· 306 306 /* 307 307 * vx_validate_irq - enable/disable IRQ 308 308 */ 309 - static void vxp_validate_irq(vx_core_t *_chip, int enable) 309 + static void vxp_validate_irq(struct vx_core *_chip, int enable) 310 310 { 311 311 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 312 312 ··· 322 322 * vx_setup_pseudo_dma - set up the pseudo dma read/write mode. 323 323 * @do_write: 0 = read, 1 = set up for DMA write 324 324 */ 325 - static void vx_setup_pseudo_dma(vx_core_t *_chip, int do_write) 325 + static void vx_setup_pseudo_dma(struct vx_core *_chip, int do_write) 326 326 { 327 327 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 328 328 ··· 342 342 /* 343 343 * vx_release_pseudo_dma - disable the pseudo-DMA mode 344 344 */ 345 - static void vx_release_pseudo_dma(vx_core_t *_chip) 345 + static void vx_release_pseudo_dma(struct vx_core *_chip) 346 346 { 347 347 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 348 348 ··· 362 362 * data size must be aligned to 6 bytes to ensure the 24bit alignment on DSP. 363 363 * NB: call with a certain lock! 364 364 */ 365 - static void vxp_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime, 366 - vx_pipe_t *pipe, int count) 365 + static void vxp_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime, 366 + struct vx_pipe *pipe, int count) 367 367 { 368 368 long port = vxp_reg_addr(chip, VX_DMA); 369 369 int offset = pipe->hw_ptr; ··· 401 401 * the read length must be aligned to 6 bytes, as well as write. 402 402 * NB: call with a certain lock! 403 403 */ 404 - static void vxp_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime, 405 - vx_pipe_t *pipe, int count) 404 + static void vxp_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime, 405 + struct vx_pipe *pipe, int count) 406 406 { 407 407 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; 408 408 long port = vxp_reg_addr(chip, VX_DMA); ··· 442 442 /* 443 443 * write a codec data (24bit) 444 444 */ 445 - static void vxp_write_codec_reg(vx_core_t *chip, int codec, unsigned int data) 445 + static void vxp_write_codec_reg(struct vx_core *chip, int codec, unsigned int data) 446 446 { 447 447 int i; 448 448 ··· 465 465 * vx_set_mic_boost - set mic boost level (on vxp440 only) 466 466 * @boost: 0 = 20dB, 1 = +38dB 467 467 */ 468 - void vx_set_mic_boost(vx_core_t *chip, int boost) 468 + void vx_set_mic_boost(struct vx_core *chip, int boost) 469 469 { 470 470 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; 471 471 unsigned long flags; ··· 508 508 * vx_set_mic_level - set mic level (on vxpocket only) 509 509 * @level: the mic level = 0 - 8 (max) 510 510 */ 511 - void vx_set_mic_level(vx_core_t *chip, int level) 511 + void vx_set_mic_level(struct vx_core *chip, int level) 512 512 { 513 513 struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; 514 514 unsigned long flags; ··· 528 528 /* 529 529 * change the input audio source 530 530 */ 531 - static void vxp_change_audio_source(vx_core_t *_chip, int src) 531 + static void vxp_change_audio_source(struct vx_core *_chip, int src) 532 532 { 533 533 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 534 534 ··· 568 568 * change the clock source 569 569 * source = INTERNAL_QUARTZ or UER_SYNC 570 570 */ 571 - static void vxp_set_clock_source(vx_core_t *_chip, int source) 571 + static void vxp_set_clock_source(struct vx_core *_chip, int source) 572 572 { 573 573 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 574 574 ··· 583 583 /* 584 584 * reset the board 585 585 */ 586 - static void vxp_reset_board(vx_core_t *_chip, int cold_reset) 586 + static void vxp_reset_board(struct vx_core *_chip, int cold_reset) 587 587 { 588 588 struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; 589 589
+13 -13
sound/pcmcia/vx/vxpocket.c
··· 83 83 /* 84 84 * destructor, called from snd_card_free_in_thread() 85 85 */ 86 - static int snd_vxpocket_dev_free(snd_device_t *device) 86 + static int snd_vxpocket_dev_free(struct snd_device *device) 87 87 { 88 - vx_core_t *chip = device->device_data; 88 + struct vx_core *chip = device->device_data; 89 89 90 90 snd_vx_free_firmware(chip); 91 91 kfree(chip); ··· 142 142 /* 143 143 * create vxpocket instance 144 144 */ 145 - static struct snd_vxpocket *snd_vxpocket_new(snd_card_t *card, int ibl) 145 + static struct snd_vxpocket *snd_vxpocket_new(struct snd_card *card, int ibl) 146 146 { 147 147 client_reg_t client_reg; /* Register with cardmgr */ 148 148 dev_link_t *link; /* Info for cardmgr */ 149 - vx_core_t *chip; 149 + struct vx_core *chip; 150 150 struct snd_vxpocket *vxp; 151 151 int ret; 152 - static snd_device_ops_t ops = { 152 + static struct snd_device_ops ops = { 153 153 .dev_free = snd_vxpocket_dev_free, 154 154 }; 155 155 156 156 chip = snd_vx_create(card, &vxpocket_hw, &snd_vxpocket_ops, 157 - sizeof(struct snd_vxpocket) - sizeof(vx_core_t)); 157 + sizeof(struct snd_vxpocket) - sizeof(struct vx_core)); 158 158 if (! chip) 159 159 return NULL; 160 160 ··· 218 218 * 219 219 * returns 0 if successful, or a negative error code. 220 220 */ 221 - static int snd_vxpocket_assign_resources(vx_core_t *chip, int port, int irq) 221 + static int snd_vxpocket_assign_resources(struct vx_core *chip, int port, int irq) 222 222 { 223 223 int err; 224 - snd_card_t *card = chip->card; 224 + struct snd_card *card = chip->card; 225 225 struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip; 226 226 227 227 snd_printdd(KERN_DEBUG "vxpocket assign resources: port = 0x%x, irq = %d\n", port, irq); ··· 250 250 static void vxpocket_config(dev_link_t *link) 251 251 { 252 252 client_handle_t handle = link->handle; 253 - vx_core_t *chip = link->priv; 253 + struct vx_core *chip = link->priv; 254 254 struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip; 255 255 tuple_t tuple; 256 256 cisparse_t *parse; ··· 324 324 static int vxpocket_event(event_t event, int priority, event_callback_args_t *args) 325 325 { 326 326 dev_link_t *link = args->client_data; 327 - vx_core_t *chip = link->priv; 327 + struct vx_core *chip = link->priv; 328 328 329 329 switch (event) { 330 330 case CS_EVENT_CARD_REMOVAL: ··· 379 379 */ 380 380 static dev_link_t *vxpocket_attach(void) 381 381 { 382 - snd_card_t *card; 382 + struct snd_card *card; 383 383 struct snd_vxpocket *vxp; 384 384 int i; 385 385 ··· 421 421 static void vxpocket_detach(dev_link_t *link) 422 422 { 423 423 struct snd_vxpocket *vxp; 424 - vx_core_t *chip; 424 + struct vx_core *chip; 425 425 dev_link_t **linkp; 426 426 427 427 if (! link) 428 428 return; 429 429 430 430 vxp = link->priv; 431 - chip = (vx_core_t *)vxp; 431 + chip = (struct vx_core *)vxp; 432 432 card_alloc &= ~(1 << vxp->index); 433 433 434 434 /* Remove the interface data from the linked list */
+4 -4
sound/pcmcia/vx/vxpocket.h
··· 30 30 31 31 struct snd_vxpocket { 32 32 33 - vx_core_t core; 33 + struct vx_core core; 34 34 35 35 unsigned long port; 36 36 ··· 48 48 49 49 extern struct snd_vx_ops snd_vxpocket_ops; 50 50 51 - void vx_set_mic_boost(vx_core_t *chip, int boost); 52 - void vx_set_mic_level(vx_core_t *chip, int level); 51 + void vx_set_mic_boost(struct vx_core *chip, int boost); 52 + void vx_set_mic_level(struct vx_core *chip, int level); 53 53 54 - int vxp_add_mic_controls(vx_core_t *chip); 54 + int vxp_add_mic_controls(struct vx_core *chip); 55 55 56 56 /* Constants used to access the CDSP register (0x08). */ 57 57 #define CDSP_MAGIC 0xA7 /* magic value (for read) */