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

[ALSA] Remove xxx_t typedefs: ISA CS423x

Modules: CS4231 driver,CS4236+ driver

Remove xxx_t typedefs from the ISA CS423x drivers.

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

authored by

Takashi Iwai and committed by
Jaroslav Kysela
ba2375a4 c8ff6647

+215 -217
+36 -38
include/sound/cs4231.h
··· 217 217 #define CS4231_HWSHARE_DMA1 (1<<1) 218 218 #define CS4231_HWSHARE_DMA2 (1<<2) 219 219 220 - typedef struct _snd_cs4231 cs4231_t; 221 - 222 - struct _snd_cs4231 { 220 + struct snd_cs4231 { 223 221 unsigned long port; /* base i/o port */ 224 222 struct resource *res_port; 225 223 unsigned long cport; /* control base i/o port (CS4236) */ ··· 232 234 unsigned short single_dma:1, /* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */ 233 235 ebus_flag:1; /* SPARC: EBUS present */ 234 236 235 - snd_card_t *card; 236 - snd_pcm_t *pcm; 237 - snd_pcm_substream_t *playback_substream; 238 - snd_pcm_substream_t *capture_substream; 239 - snd_timer_t *timer; 237 + struct snd_card *card; 238 + struct snd_pcm *pcm; 239 + struct snd_pcm_substream *playback_substream; 240 + struct snd_pcm_substream *capture_substream; 241 + struct snd_timer *timer; 240 242 241 243 unsigned char image[32]; /* registers image */ 242 244 unsigned char eimage[32]; /* extended registers image */ ··· 251 253 struct semaphore mce_mutex; 252 254 struct semaphore open_mutex; 253 255 254 - int (*rate_constraint) (snd_pcm_runtime_t *runtime); 255 - void (*set_playback_format) (cs4231_t *chip, snd_pcm_hw_params_t *hw_params, unsigned char pdfr); 256 - void (*set_capture_format) (cs4231_t *chip, snd_pcm_hw_params_t *hw_params, unsigned char cdfr); 257 - void (*trigger) (cs4231_t *chip, unsigned int what, int start); 256 + int (*rate_constraint) (struct snd_pcm_runtime *runtime); 257 + void (*set_playback_format) (struct snd_cs4231 *chip, struct snd_pcm_hw_params *hw_params, unsigned char pdfr); 258 + void (*set_capture_format) (struct snd_cs4231 *chip, struct snd_pcm_hw_params *hw_params, unsigned char cdfr); 259 + void (*trigger) (struct snd_cs4231 *chip, unsigned int what, int start); 258 260 #ifdef CONFIG_PM 259 - void (*suspend) (cs4231_t *chip); 260 - void (*resume) (cs4231_t *chip); 261 + void (*suspend) (struct snd_cs4231 *chip); 262 + void (*resume) (struct snd_cs4231 *chip); 261 263 #endif 262 264 void *dma_private_data; 263 - int (*claim_dma) (cs4231_t *chip, void *dma_private_data, int dma); 264 - int (*release_dma) (cs4231_t *chip, void *dma_private_data, int dma); 265 + int (*claim_dma) (struct snd_cs4231 *chip, void *dma_private_data, int dma); 266 + int (*release_dma) (struct snd_cs4231 *chip, void *dma_private_data, int dma); 265 267 }; 266 268 267 269 /* exported functions */ 268 270 269 - void snd_cs4231_out(cs4231_t *chip, unsigned char reg, unsigned char val); 270 - unsigned char snd_cs4231_in(cs4231_t *chip, unsigned char reg); 271 - void snd_cs4236_ext_out(cs4231_t *chip, unsigned char reg, unsigned char val); 272 - unsigned char snd_cs4236_ext_in(cs4231_t *chip, unsigned char reg); 273 - void snd_cs4231_mce_up(cs4231_t *chip); 274 - void snd_cs4231_mce_down(cs4231_t *chip); 271 + void snd_cs4231_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val); 272 + unsigned char snd_cs4231_in(struct snd_cs4231 *chip, unsigned char reg); 273 + void snd_cs4236_ext_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val); 274 + unsigned char snd_cs4236_ext_in(struct snd_cs4231 *chip, unsigned char reg); 275 + void snd_cs4231_mce_up(struct snd_cs4231 *chip); 276 + void snd_cs4231_mce_down(struct snd_cs4231 *chip); 275 277 276 278 irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs); 277 279 278 - const char *snd_cs4231_chip_id(cs4231_t *chip); 280 + const char *snd_cs4231_chip_id(struct snd_cs4231 *chip); 279 281 280 - int snd_cs4231_create(snd_card_t * card, 282 + int snd_cs4231_create(struct snd_card *card, 281 283 unsigned long port, 282 284 unsigned long cport, 283 285 int irq, int dma1, int dma2, 284 286 unsigned short hardware, 285 287 unsigned short hwshare, 286 - cs4231_t ** rchip); 287 - int snd_cs4231_pcm(cs4231_t * chip, int device, snd_pcm_t **rpcm); 288 - int snd_cs4231_timer(cs4231_t * chip, int device, snd_timer_t **rtimer); 289 - int snd_cs4231_mixer(cs4231_t * chip); 288 + struct snd_cs4231 ** rchip); 289 + int snd_cs4231_pcm(struct snd_cs4231 * chip, int device, struct snd_pcm **rpcm); 290 + int snd_cs4231_timer(struct snd_cs4231 * chip, int device, struct snd_timer **rtimer); 291 + int snd_cs4231_mixer(struct snd_cs4231 * chip); 290 292 291 - int snd_cs4236_create(snd_card_t * card, 293 + int snd_cs4236_create(struct snd_card *card, 292 294 unsigned long port, 293 295 unsigned long cport, 294 296 int irq, int dma1, int dma2, 295 297 unsigned short hardware, 296 298 unsigned short hwshare, 297 - cs4231_t ** rchip); 298 - int snd_cs4236_pcm(cs4231_t * chip, int device, snd_pcm_t **rpcm); 299 - int snd_cs4236_mixer(cs4231_t * chip); 299 + struct snd_cs4231 ** rchip); 300 + int snd_cs4236_pcm(struct snd_cs4231 * chip, int device, struct snd_pcm **rpcm); 301 + int snd_cs4236_mixer(struct snd_cs4231 * chip); 300 302 301 303 /* 302 304 * mixer library ··· 308 310 .get = snd_cs4231_get_single, .put = snd_cs4231_put_single, \ 309 311 .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) } 310 312 311 - int snd_cs4231_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo); 312 - int snd_cs4231_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); 313 - int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); 313 + int snd_cs4231_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo); 314 + int snd_cs4231_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); 315 + int snd_cs4231_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); 314 316 315 317 #define CS4231_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert) \ 316 318 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ ··· 318 320 .get = snd_cs4231_get_double, .put = snd_cs4231_put_double, \ 319 321 .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) } 320 322 321 - int snd_cs4231_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo); 322 - int snd_cs4231_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); 323 - int snd_cs4231_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); 323 + int snd_cs4231_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo); 324 + int snd_cs4231_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); 325 + int snd_cs4231_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); 324 326 325 327 #endif /* __SOUND_CS4231_H */
+4 -4
sound/isa/cs423x/cs4231.c
··· 64 64 module_param_array(dma2, int, NULL, 0444); 65 65 MODULE_PARM_DESC(dma2, "DMA2 # for CS4231 driver."); 66 66 67 - static snd_card_t *snd_cs4231_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 67 + static struct snd_card *snd_cs4231_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 68 68 69 69 70 70 static int __init snd_card_cs4231_probe(int dev) 71 71 { 72 - snd_card_t *card; 72 + struct snd_card *card; 73 73 struct snd_card_cs4231 *acard; 74 - snd_pcm_t *pcm = NULL; 75 - cs4231_t *chip; 74 + struct snd_pcm *pcm = NULL; 75 + struct snd_cs4231 *chip; 76 76 int err; 77 77 78 78 if (port[dev] == SNDRV_AUTO_PORT) {
+115 -115
sound/isa/cs423x/cs4231_lib.c
··· 73 73 27042, 32000, 33075, 37800, 44100, 48000 74 74 }; 75 75 76 - static snd_pcm_hw_constraint_list_t hw_constraints_rates = { 76 + static struct snd_pcm_hw_constraint_list hw_constraints_rates = { 77 77 .count = 14, 78 78 .list = rates, 79 79 .mask = 0, 80 80 }; 81 81 82 - static int snd_cs4231_xrate(snd_pcm_runtime_t *runtime) 82 + static int snd_cs4231_xrate(struct snd_pcm_runtime *runtime) 83 83 { 84 84 return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates); 85 85 } ··· 124 124 * Basic I/O functions 125 125 */ 126 126 127 - static inline void cs4231_outb(cs4231_t *chip, u8 offset, u8 val) 127 + static inline void cs4231_outb(struct snd_cs4231 *chip, u8 offset, u8 val) 128 128 { 129 129 outb(val, chip->port + offset); 130 130 } 131 131 132 - static inline u8 cs4231_inb(cs4231_t *chip, u8 offset) 132 + static inline u8 cs4231_inb(struct snd_cs4231 *chip, u8 offset) 133 133 { 134 134 return inb(chip->port + offset); 135 135 } 136 136 137 - static void snd_cs4231_outm(cs4231_t *chip, unsigned char reg, 137 + static void snd_cs4231_outm(struct snd_cs4231 *chip, unsigned char reg, 138 138 unsigned char mask, unsigned char value) 139 139 { 140 140 int timeout; ··· 161 161 } 162 162 } 163 163 164 - static void snd_cs4231_dout(cs4231_t *chip, unsigned char reg, unsigned char value) 164 + static void snd_cs4231_dout(struct snd_cs4231 *chip, unsigned char reg, unsigned char value) 165 165 { 166 166 int timeout; 167 167 ··· 174 174 mb(); 175 175 } 176 176 177 - void snd_cs4231_out(cs4231_t *chip, unsigned char reg, unsigned char value) 177 + void snd_cs4231_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char value) 178 178 { 179 179 int timeout; 180 180 ··· 195 195 #endif 196 196 } 197 197 198 - unsigned char snd_cs4231_in(cs4231_t *chip, unsigned char reg) 198 + unsigned char snd_cs4231_in(struct snd_cs4231 *chip, unsigned char reg) 199 199 { 200 200 int timeout; 201 201 ··· 212 212 return cs4231_inb(chip, CS4231P(REG)); 213 213 } 214 214 215 - void snd_cs4236_ext_out(cs4231_t *chip, unsigned char reg, unsigned char val) 215 + void snd_cs4236_ext_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val) 216 216 { 217 217 cs4231_outb(chip, CS4231P(REGSEL), chip->mce_bit | 0x17); 218 218 cs4231_outb(chip, CS4231P(REG), reg | (chip->image[CS4236_EXT_REG] & 0x01)); ··· 223 223 #endif 224 224 } 225 225 226 - unsigned char snd_cs4236_ext_in(cs4231_t *chip, unsigned char reg) 226 + unsigned char snd_cs4236_ext_in(struct snd_cs4231 *chip, unsigned char reg) 227 227 { 228 228 cs4231_outb(chip, CS4231P(REGSEL), chip->mce_bit | 0x17); 229 229 cs4231_outb(chip, CS4231P(REG), reg | (chip->image[CS4236_EXT_REG] & 0x01)); ··· 241 241 242 242 #if 0 243 243 244 - static void snd_cs4231_debug(cs4231_t *chip) 244 + static void snd_cs4231_debug(struct snd_cs4231 *chip) 245 245 { 246 246 printk("CS4231 REGS: INDEX = 0x%02x ", cs4231_inb(chip, CS4231P(REGSEL))); 247 247 printk(" STATUS = 0x%02x\n", cs4231_inb(chip, CS4231P(STATUS))); ··· 285 285 * CS4231 detection / MCE routines 286 286 */ 287 287 288 - static void snd_cs4231_busy_wait(cs4231_t *chip) 288 + static void snd_cs4231_busy_wait(struct snd_cs4231 *chip) 289 289 { 290 290 int timeout; 291 291 ··· 299 299 udelay(10); 300 300 } 301 301 302 - void snd_cs4231_mce_up(cs4231_t *chip) 302 + void snd_cs4231_mce_up(struct snd_cs4231 *chip) 303 303 { 304 304 unsigned long flags; 305 305 int timeout; ··· 320 320 spin_unlock_irqrestore(&chip->reg_lock, flags); 321 321 } 322 322 323 - void snd_cs4231_mce_down(cs4231_t *chip) 323 + void snd_cs4231_mce_down(struct snd_cs4231 *chip) 324 324 { 325 325 unsigned long flags; 326 326 int timeout; ··· 399 399 return size; 400 400 } 401 401 402 - static int snd_cs4231_trigger(snd_pcm_substream_t *substream, 402 + static int snd_cs4231_trigger(struct snd_pcm_substream *substream, 403 403 int cmd) 404 404 { 405 - cs4231_t *chip = snd_pcm_substream_chip(substream); 405 + struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); 406 406 int result = 0; 407 407 unsigned int what; 408 408 struct list_head *pos; 409 - snd_pcm_substream_t *s; 409 + struct snd_pcm_substream *s; 410 410 int do_start; 411 411 412 412 #if 0 ··· 468 468 return freq_bits[13]; 469 469 } 470 470 471 - static unsigned char snd_cs4231_get_format(cs4231_t *chip, 471 + static unsigned char snd_cs4231_get_format(struct snd_cs4231 *chip, 472 472 int format, 473 473 int channels) 474 474 { ··· 490 490 return rformat; 491 491 } 492 492 493 - static void snd_cs4231_calibrate_mute(cs4231_t *chip, int mute) 493 + static void snd_cs4231_calibrate_mute(struct snd_cs4231 *chip, int mute) 494 494 { 495 495 unsigned long flags; 496 496 ··· 524 524 spin_unlock_irqrestore(&chip->reg_lock, flags); 525 525 } 526 526 527 - static void snd_cs4231_playback_format(cs4231_t *chip, 528 - snd_pcm_hw_params_t *params, 527 + static void snd_cs4231_playback_format(struct snd_cs4231 *chip, 528 + struct snd_pcm_hw_params *params, 529 529 unsigned char pdfr) 530 530 { 531 531 unsigned long flags; ··· 563 563 up(&chip->mce_mutex); 564 564 } 565 565 566 - static void snd_cs4231_capture_format(cs4231_t *chip, 567 - snd_pcm_hw_params_t *params, 566 + static void snd_cs4231_capture_format(struct snd_cs4231 *chip, 567 + struct snd_pcm_hw_params *params, 568 568 unsigned char cdfr) 569 569 { 570 570 unsigned long flags; ··· 610 610 * Timer interface 611 611 */ 612 612 613 - static unsigned long snd_cs4231_timer_resolution(snd_timer_t * timer) 613 + static unsigned long snd_cs4231_timer_resolution(struct snd_timer * timer) 614 614 { 615 - cs4231_t *chip = snd_timer_chip(timer); 615 + struct snd_cs4231 *chip = snd_timer_chip(timer); 616 616 if (chip->hardware & CS4231_HW_CS4236B_MASK) 617 617 return 14467; 618 618 else 619 619 return chip->image[CS4231_PLAYBK_FORMAT] & 1 ? 9969 : 9920; 620 620 } 621 621 622 - static int snd_cs4231_timer_start(snd_timer_t * timer) 622 + static int snd_cs4231_timer_start(struct snd_timer * timer) 623 623 { 624 624 unsigned long flags; 625 625 unsigned int ticks; 626 - cs4231_t *chip = snd_timer_chip(timer); 626 + struct snd_cs4231 *chip = snd_timer_chip(timer); 627 627 spin_lock_irqsave(&chip->reg_lock, flags); 628 628 ticks = timer->sticks; 629 629 if ((chip->image[CS4231_ALT_FEATURE_1] & CS4231_TIMER_ENABLE) == 0 || ··· 637 637 return 0; 638 638 } 639 639 640 - static int snd_cs4231_timer_stop(snd_timer_t * timer) 640 + static int snd_cs4231_timer_stop(struct snd_timer * timer) 641 641 { 642 642 unsigned long flags; 643 - cs4231_t *chip = snd_timer_chip(timer); 643 + struct snd_cs4231 *chip = snd_timer_chip(timer); 644 644 spin_lock_irqsave(&chip->reg_lock, flags); 645 645 snd_cs4231_out(chip, CS4231_ALT_FEATURE_1, chip->image[CS4231_ALT_FEATURE_1] &= ~CS4231_TIMER_ENABLE); 646 646 spin_unlock_irqrestore(&chip->reg_lock, flags); 647 647 return 0; 648 648 } 649 649 650 - static void snd_cs4231_init(cs4231_t *chip) 650 + static void snd_cs4231_init(struct snd_cs4231 *chip) 651 651 { 652 652 unsigned long flags; 653 653 ··· 705 705 #endif 706 706 } 707 707 708 - static int snd_cs4231_open(cs4231_t *chip, unsigned int mode) 708 + static int snd_cs4231_open(struct snd_cs4231 *chip, unsigned int mode) 709 709 { 710 710 unsigned long flags; 711 711 ··· 741 741 return 0; 742 742 } 743 743 744 - static void snd_cs4231_close(cs4231_t *chip, unsigned int mode) 744 + static void snd_cs4231_close(struct snd_cs4231 *chip, unsigned int mode) 745 745 { 746 746 unsigned long flags; 747 747 ··· 792 792 * timer open/close 793 793 */ 794 794 795 - static int snd_cs4231_timer_open(snd_timer_t * timer) 795 + static int snd_cs4231_timer_open(struct snd_timer * timer) 796 796 { 797 - cs4231_t *chip = snd_timer_chip(timer); 797 + struct snd_cs4231 *chip = snd_timer_chip(timer); 798 798 snd_cs4231_open(chip, CS4231_MODE_TIMER); 799 799 return 0; 800 800 } 801 801 802 - static int snd_cs4231_timer_close(snd_timer_t * timer) 802 + static int snd_cs4231_timer_close(struct snd_timer * timer) 803 803 { 804 - cs4231_t *chip = snd_timer_chip(timer); 804 + struct snd_cs4231 *chip = snd_timer_chip(timer); 805 805 snd_cs4231_close(chip, CS4231_MODE_TIMER); 806 806 return 0; 807 807 } 808 808 809 - static struct _snd_timer_hardware snd_cs4231_timer_table = 809 + static struct snd_timer_hardware snd_cs4231_timer_table = 810 810 { 811 811 .flags = SNDRV_TIMER_HW_AUTO, 812 812 .resolution = 9945, ··· 822 822 * ok.. exported functions.. 823 823 */ 824 824 825 - static int snd_cs4231_playback_hw_params(snd_pcm_substream_t * substream, 826 - snd_pcm_hw_params_t * hw_params) 825 + static int snd_cs4231_playback_hw_params(struct snd_pcm_substream *substream, 826 + struct snd_pcm_hw_params *hw_params) 827 827 { 828 - cs4231_t *chip = snd_pcm_substream_chip(substream); 828 + struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); 829 829 unsigned char new_pdfr; 830 830 int err; 831 831 ··· 837 837 return 0; 838 838 } 839 839 840 - static int snd_cs4231_playback_hw_free(snd_pcm_substream_t * substream) 840 + static int snd_cs4231_playback_hw_free(struct snd_pcm_substream *substream) 841 841 { 842 842 return snd_pcm_lib_free_pages(substream); 843 843 } 844 844 845 - static int snd_cs4231_playback_prepare(snd_pcm_substream_t * substream) 845 + static int snd_cs4231_playback_prepare(struct snd_pcm_substream *substream) 846 846 { 847 - cs4231_t *chip = snd_pcm_substream_chip(substream); 848 - snd_pcm_runtime_t *runtime = substream->runtime; 847 + struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); 848 + struct snd_pcm_runtime *runtime = substream->runtime; 849 849 unsigned long flags; 850 850 unsigned int size = snd_pcm_lib_buffer_bytes(substream); 851 851 unsigned int count = snd_pcm_lib_period_bytes(substream); ··· 864 864 return 0; 865 865 } 866 866 867 - static int snd_cs4231_capture_hw_params(snd_pcm_substream_t * substream, 868 - snd_pcm_hw_params_t * hw_params) 867 + static int snd_cs4231_capture_hw_params(struct snd_pcm_substream *substream, 868 + struct snd_pcm_hw_params *hw_params) 869 869 { 870 - cs4231_t *chip = snd_pcm_substream_chip(substream); 870 + struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); 871 871 unsigned char new_cdfr; 872 872 int err; 873 873 ··· 879 879 return 0; 880 880 } 881 881 882 - static int snd_cs4231_capture_hw_free(snd_pcm_substream_t * substream) 882 + static int snd_cs4231_capture_hw_free(struct snd_pcm_substream *substream) 883 883 { 884 884 return snd_pcm_lib_free_pages(substream); 885 885 } 886 886 887 - static int snd_cs4231_capture_prepare(snd_pcm_substream_t * substream) 887 + static int snd_cs4231_capture_prepare(struct snd_pcm_substream *substream) 888 888 { 889 - cs4231_t *chip = snd_pcm_substream_chip(substream); 890 - snd_pcm_runtime_t *runtime = substream->runtime; 889 + struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); 890 + struct snd_pcm_runtime *runtime = substream->runtime; 891 891 unsigned long flags; 892 892 unsigned int size = snd_pcm_lib_buffer_bytes(substream); 893 893 unsigned int count = snd_pcm_lib_period_bytes(substream); ··· 908 908 return 0; 909 909 } 910 910 911 - static void snd_cs4231_overrange(cs4231_t *chip) 911 + static void snd_cs4231_overrange(struct snd_cs4231 *chip) 912 912 { 913 913 unsigned long flags; 914 914 unsigned char res; ··· 922 922 923 923 irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs) 924 924 { 925 - cs4231_t *chip = dev_id; 925 + struct snd_cs4231 *chip = dev_id; 926 926 unsigned char status; 927 927 928 928 status = snd_cs4231_in(chip, CS4231_IRQ_STATUS); ··· 962 962 return IRQ_HANDLED; 963 963 } 964 964 965 - static snd_pcm_uframes_t snd_cs4231_playback_pointer(snd_pcm_substream_t * substream) 965 + static snd_pcm_uframes_t snd_cs4231_playback_pointer(struct snd_pcm_substream *substream) 966 966 { 967 - cs4231_t *chip = snd_pcm_substream_chip(substream); 967 + struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); 968 968 size_t ptr; 969 969 970 970 if (!(chip->image[CS4231_IFACE_CTRL] & CS4231_PLAYBACK_ENABLE)) ··· 973 973 return bytes_to_frames(substream->runtime, ptr); 974 974 } 975 975 976 - static snd_pcm_uframes_t snd_cs4231_capture_pointer(snd_pcm_substream_t * substream) 976 + static snd_pcm_uframes_t snd_cs4231_capture_pointer(struct snd_pcm_substream *substream) 977 977 { 978 - cs4231_t *chip = snd_pcm_substream_chip(substream); 978 + struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); 979 979 size_t ptr; 980 980 981 981 if (!(chip->image[CS4231_IFACE_CTRL] & CS4231_RECORD_ENABLE)) ··· 988 988 989 989 */ 990 990 991 - static int snd_cs4231_probe(cs4231_t *chip) 991 + static int snd_cs4231_probe(struct snd_cs4231 *chip) 992 992 { 993 993 unsigned long flags; 994 994 int i, id, rev; ··· 1152 1152 1153 1153 */ 1154 1154 1155 - static snd_pcm_hardware_t snd_cs4231_playback = 1155 + static struct snd_pcm_hardware snd_cs4231_playback = 1156 1156 { 1157 1157 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1158 1158 SNDRV_PCM_INFO_MMAP_VALID | ··· 1173 1173 .fifo_size = 0, 1174 1174 }; 1175 1175 1176 - static snd_pcm_hardware_t snd_cs4231_capture = 1176 + static struct snd_pcm_hardware snd_cs4231_capture = 1177 1177 { 1178 1178 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1179 1179 SNDRV_PCM_INFO_MMAP_VALID | ··· 1198 1198 1199 1199 */ 1200 1200 1201 - static int snd_cs4231_playback_open(snd_pcm_substream_t * substream) 1201 + static int snd_cs4231_playback_open(struct snd_pcm_substream *substream) 1202 1202 { 1203 - cs4231_t *chip = snd_pcm_substream_chip(substream); 1204 - snd_pcm_runtime_t *runtime = substream->runtime; 1203 + struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); 1204 + struct snd_pcm_runtime *runtime = substream->runtime; 1205 1205 int err; 1206 1206 1207 1207 runtime->hw = snd_cs4231_playback; ··· 1235 1235 return 0; 1236 1236 } 1237 1237 1238 - static int snd_cs4231_capture_open(snd_pcm_substream_t * substream) 1238 + static int snd_cs4231_capture_open(struct snd_pcm_substream *substream) 1239 1239 { 1240 - cs4231_t *chip = snd_pcm_substream_chip(substream); 1241 - snd_pcm_runtime_t *runtime = substream->runtime; 1240 + struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); 1241 + struct snd_pcm_runtime *runtime = substream->runtime; 1242 1242 int err; 1243 1243 1244 1244 runtime->hw = snd_cs4231_capture; ··· 1268 1268 return 0; 1269 1269 } 1270 1270 1271 - static int snd_cs4231_playback_close(snd_pcm_substream_t * substream) 1271 + static int snd_cs4231_playback_close(struct snd_pcm_substream *substream) 1272 1272 { 1273 - cs4231_t *chip = snd_pcm_substream_chip(substream); 1273 + struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); 1274 1274 1275 1275 chip->playback_substream = NULL; 1276 1276 snd_cs4231_close(chip, CS4231_MODE_PLAY); 1277 1277 return 0; 1278 1278 } 1279 1279 1280 - static int snd_cs4231_capture_close(snd_pcm_substream_t * substream) 1280 + static int snd_cs4231_capture_close(struct snd_pcm_substream *substream) 1281 1281 { 1282 - cs4231_t *chip = snd_pcm_substream_chip(substream); 1282 + struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); 1283 1283 1284 1284 chip->capture_substream = NULL; 1285 1285 snd_cs4231_close(chip, CS4231_MODE_RECORD); ··· 1289 1289 #ifdef CONFIG_PM 1290 1290 1291 1291 /* lowlevel suspend callback for CS4231 */ 1292 - static void snd_cs4231_suspend(cs4231_t *chip) 1292 + static void snd_cs4231_suspend(struct snd_cs4231 *chip) 1293 1293 { 1294 1294 int reg; 1295 1295 unsigned long flags; ··· 1303 1303 } 1304 1304 1305 1305 /* lowlevel resume callback for CS4231 */ 1306 - static void snd_cs4231_resume(cs4231_t *chip) 1306 + static void snd_cs4231_resume(struct snd_cs4231 *chip) 1307 1307 { 1308 1308 int reg; 1309 1309 unsigned long flags; ··· 1344 1344 #endif 1345 1345 } 1346 1346 1347 - static int snd_cs4231_pm_suspend(snd_card_t *card, pm_message_t state) 1347 + static int snd_cs4231_pm_suspend(struct snd_card *card, pm_message_t state) 1348 1348 { 1349 - cs4231_t *chip = card->pm_private_data; 1349 + struct snd_cs4231 *chip = card->pm_private_data; 1350 1350 if (chip->suspend) 1351 1351 chip->suspend(chip); 1352 1352 return 0; 1353 1353 } 1354 1354 1355 - static int snd_cs4231_pm_resume(snd_card_t *card) 1355 + static int snd_cs4231_pm_resume(struct snd_card *card) 1356 1356 { 1357 - cs4231_t *chip = card->pm_private_data; 1357 + struct snd_cs4231 *chip = card->pm_private_data; 1358 1358 if (chip->resume) 1359 1359 chip->resume(chip); 1360 1360 return 0; 1361 1361 } 1362 1362 #endif /* CONFIG_PM */ 1363 1363 1364 - static int snd_cs4231_free(cs4231_t *chip) 1364 + static int snd_cs4231_free(struct snd_cs4231 *chip) 1365 1365 { 1366 1366 release_and_free_resource(chip->res_port); 1367 1367 release_and_free_resource(chip->res_cport); ··· 1384 1384 return 0; 1385 1385 } 1386 1386 1387 - static int snd_cs4231_dev_free(snd_device_t *device) 1387 + static int snd_cs4231_dev_free(struct snd_device *device) 1388 1388 { 1389 - cs4231_t *chip = device->device_data; 1389 + struct snd_cs4231 *chip = device->device_data; 1390 1390 return snd_cs4231_free(chip); 1391 1391 } 1392 1392 1393 - const char *snd_cs4231_chip_id(cs4231_t *chip) 1393 + const char *snd_cs4231_chip_id(struct snd_cs4231 *chip) 1394 1394 { 1395 1395 switch (chip->hardware) { 1396 1396 case CS4231_HW_CS4231: return "CS4231"; ··· 1410 1410 } 1411 1411 } 1412 1412 1413 - static int snd_cs4231_new(snd_card_t * card, 1413 + static int snd_cs4231_new(struct snd_card *card, 1414 1414 unsigned short hardware, 1415 1415 unsigned short hwshare, 1416 - cs4231_t ** rchip) 1416 + struct snd_cs4231 ** rchip) 1417 1417 { 1418 - cs4231_t *chip; 1418 + struct snd_cs4231 *chip; 1419 1419 1420 1420 *rchip = NULL; 1421 1421 chip = kzalloc(sizeof(*chip), GFP_KERNEL); ··· 1437 1437 return 0; 1438 1438 } 1439 1439 1440 - int snd_cs4231_create(snd_card_t * card, 1440 + int snd_cs4231_create(struct snd_card *card, 1441 1441 unsigned long port, 1442 1442 unsigned long cport, 1443 1443 int irq, int dma1, int dma2, 1444 1444 unsigned short hardware, 1445 1445 unsigned short hwshare, 1446 - cs4231_t ** rchip) 1446 + struct snd_cs4231 ** rchip) 1447 1447 { 1448 - static snd_device_ops_t ops = { 1448 + static struct snd_device_ops ops = { 1449 1449 .dev_free = snd_cs4231_dev_free, 1450 1450 }; 1451 - cs4231_t *chip; 1451 + struct snd_cs4231 *chip; 1452 1452 int err; 1453 1453 1454 1454 err = snd_cs4231_new(card, hardware, hwshare, &chip); ··· 1523 1523 return 0; 1524 1524 } 1525 1525 1526 - static snd_pcm_ops_t snd_cs4231_playback_ops = { 1526 + static struct snd_pcm_ops snd_cs4231_playback_ops = { 1527 1527 .open = snd_cs4231_playback_open, 1528 1528 .close = snd_cs4231_playback_close, 1529 1529 .ioctl = snd_pcm_lib_ioctl, ··· 1534 1534 .pointer = snd_cs4231_playback_pointer, 1535 1535 }; 1536 1536 1537 - static snd_pcm_ops_t snd_cs4231_capture_ops = { 1537 + static struct snd_pcm_ops snd_cs4231_capture_ops = { 1538 1538 .open = snd_cs4231_capture_open, 1539 1539 .close = snd_cs4231_capture_close, 1540 1540 .ioctl = snd_pcm_lib_ioctl, ··· 1545 1545 .pointer = snd_cs4231_capture_pointer, 1546 1546 }; 1547 1547 1548 - int snd_cs4231_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm) 1548 + int snd_cs4231_pcm(struct snd_cs4231 *chip, int device, struct snd_pcm **rpcm) 1549 1549 { 1550 - snd_pcm_t *pcm; 1550 + struct snd_pcm *pcm; 1551 1551 int err; 1552 1552 1553 1553 if ((err = snd_pcm_new(chip->card, "CS4231", device, 1, 1, &pcm)) < 0) ··· 1579 1579 return 0; 1580 1580 } 1581 1581 1582 - static void snd_cs4231_timer_free(snd_timer_t *timer) 1582 + static void snd_cs4231_timer_free(struct snd_timer *timer) 1583 1583 { 1584 - cs4231_t *chip = timer->private_data; 1584 + struct snd_cs4231 *chip = timer->private_data; 1585 1585 chip->timer = NULL; 1586 1586 } 1587 1587 1588 - int snd_cs4231_timer(cs4231_t *chip, int device, snd_timer_t **rtimer) 1588 + int snd_cs4231_timer(struct snd_cs4231 *chip, int device, struct snd_timer **rtimer) 1589 1589 { 1590 - snd_timer_t *timer; 1591 - snd_timer_id_t tid; 1590 + struct snd_timer *timer; 1591 + struct snd_timer_id tid; 1592 1592 int err; 1593 1593 1594 1594 /* Timer initialization */ ··· 1613 1613 * MIXER part 1614 1614 */ 1615 1615 1616 - static int snd_cs4231_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1616 + static int snd_cs4231_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1617 1617 { 1618 1618 static char *texts[4] = { 1619 1619 "Line", "Aux", "Mic", "Mix" ··· 1625 1625 "Line", "Synth", "Mic", "Mix" 1626 1626 }; 1627 1627 char **ptexts = texts; 1628 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 1628 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 1629 1629 1630 1630 snd_assert(chip->card != NULL, return -EINVAL); 1631 1631 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; ··· 1643 1643 return 0; 1644 1644 } 1645 1645 1646 - static int snd_cs4231_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1646 + static int snd_cs4231_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1647 1647 { 1648 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 1648 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 1649 1649 unsigned long flags; 1650 1650 1651 1651 spin_lock_irqsave(&chip->reg_lock, flags); ··· 1655 1655 return 0; 1656 1656 } 1657 1657 1658 - static int snd_cs4231_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1658 + static int snd_cs4231_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1659 1659 { 1660 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 1660 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 1661 1661 unsigned long flags; 1662 1662 unsigned short left, right; 1663 1663 int change; ··· 1678 1678 return change; 1679 1679 } 1680 1680 1681 - int snd_cs4231_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1681 + int snd_cs4231_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1682 1682 { 1683 1683 int mask = (kcontrol->private_value >> 16) & 0xff; 1684 1684 ··· 1689 1689 return 0; 1690 1690 } 1691 1691 1692 - int snd_cs4231_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1692 + int snd_cs4231_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1693 1693 { 1694 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 1694 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 1695 1695 unsigned long flags; 1696 1696 int reg = kcontrol->private_value & 0xff; 1697 1697 int shift = (kcontrol->private_value >> 8) & 0xff; ··· 1706 1706 return 0; 1707 1707 } 1708 1708 1709 - int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1709 + int snd_cs4231_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1710 1710 { 1711 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 1711 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 1712 1712 unsigned long flags; 1713 1713 int reg = kcontrol->private_value & 0xff; 1714 1714 int shift = (kcontrol->private_value >> 8) & 0xff; ··· 1729 1729 return change; 1730 1730 } 1731 1731 1732 - int snd_cs4231_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1732 + int snd_cs4231_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1733 1733 { 1734 1734 int mask = (kcontrol->private_value >> 24) & 0xff; 1735 1735 ··· 1740 1740 return 0; 1741 1741 } 1742 1742 1743 - int snd_cs4231_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1743 + int snd_cs4231_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1744 1744 { 1745 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 1745 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 1746 1746 unsigned long flags; 1747 1747 int left_reg = kcontrol->private_value & 0xff; 1748 1748 int right_reg = (kcontrol->private_value >> 8) & 0xff; ··· 1762 1762 return 0; 1763 1763 } 1764 1764 1765 - int snd_cs4231_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1765 + int snd_cs4231_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1766 1766 { 1767 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 1767 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 1768 1768 unsigned long flags; 1769 1769 int left_reg = kcontrol->private_value & 0xff; 1770 1770 int right_reg = (kcontrol->private_value >> 8) & 0xff; ··· 1793 1793 return change; 1794 1794 } 1795 1795 1796 - static snd_kcontrol_new_t snd_cs4231_controls[] = { 1796 + static struct snd_kcontrol_new snd_cs4231_controls[] = { 1797 1797 CS4231_DOUBLE("PCM Playback Switch", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 7, 7, 1, 1), 1798 1798 CS4231_DOUBLE("PCM Playback Volume", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 0, 0, 63, 1), 1799 1799 CS4231_DOUBLE("Line Playback Switch", 0, CS4231_LEFT_LINE_IN, CS4231_RIGHT_LINE_IN, 7, 7, 1, 1), ··· 1819 1819 CS4231_SINGLE("Loopback Capture Volume", 0, CS4231_LOOPBACK, 2, 63, 1) 1820 1820 }; 1821 1821 1822 - int snd_cs4231_mixer(cs4231_t *chip) 1822 + int snd_cs4231_mixer(struct snd_cs4231 *chip) 1823 1823 { 1824 - snd_card_t *card; 1824 + struct snd_card *card; 1825 1825 unsigned int idx; 1826 1826 int err; 1827 1827
+7 -7
sound/isa/cs423x/cs4236.c
··· 131 131 #endif 132 132 }; 133 133 134 - static snd_card_t *snd_cs4236_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 134 + static struct snd_card *snd_cs4236_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 135 135 136 136 #ifdef CONFIG_PNP 137 137 ··· 375 375 } 376 376 #endif /* CONFIG_PNP */ 377 377 378 - static void snd_card_cs4236_free(snd_card_t *card) 378 + static void snd_card_cs4236_free(struct snd_card *card) 379 379 { 380 380 struct snd_card_cs4236 *acard = (struct snd_card_cs4236 *)card->private_data; 381 381 ··· 392 392 static int __devinit snd_card_cs423x_probe(int dev, struct pnp_card_link *pcard, 393 393 const struct pnp_card_device_id *pid) 394 394 { 395 - snd_card_t *card; 395 + struct snd_card *card; 396 396 struct snd_card_cs4236 *acard; 397 - snd_pcm_t *pcm = NULL; 398 - cs4231_t *chip; 399 - opl3_t *opl3; 397 + struct snd_pcm *pcm = NULL; 398 + struct snd_cs4231 *chip; 399 + struct snd_opl3 *opl3; 400 400 int err; 401 401 402 402 if (! is_isapnp_selected(dev)) { ··· 538 538 539 539 static void __devexit snd_cs423x_pnp_remove(struct pnp_card_link * pcard) 540 540 { 541 - snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); 541 + struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard); 542 542 543 543 snd_card_disconnect(card); 544 544 snd_card_free_in_thread(card);
+53 -53
sound/isa/cs423x/cs4236_lib.c
··· 122 122 * 123 123 */ 124 124 125 - static void snd_cs4236_ctrl_out(cs4231_t *chip, unsigned char reg, unsigned char val) 125 + static void snd_cs4236_ctrl_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val) 126 126 { 127 127 outb(reg, chip->cport + 3); 128 128 outb(chip->cimage[reg] = val, chip->cport + 4); 129 129 } 130 130 131 - static unsigned char snd_cs4236_ctrl_in(cs4231_t *chip, unsigned char reg) 131 + static unsigned char snd_cs4236_ctrl_in(struct snd_cs4231 *chip, unsigned char reg) 132 132 { 133 133 outb(reg, chip->cport + 3); 134 134 return inb(chip->cport + 4); ··· 140 140 141 141 #define CLOCKS 8 142 142 143 - static ratnum_t clocks[CLOCKS] = { 143 + static struct snd_ratnum clocks[CLOCKS] = { 144 144 { .num = 16934400, .den_min = 353, .den_max = 353, .den_step = 1 }, 145 145 { .num = 16934400, .den_min = 529, .den_max = 529, .den_step = 1 }, 146 146 { .num = 16934400, .den_min = 617, .den_max = 617, .den_step = 1 }, ··· 151 151 { .num = 16934400/16, .den_min = 21, .den_max = 192, .den_step = 1 } 152 152 }; 153 153 154 - static snd_pcm_hw_constraint_ratnums_t hw_constraints_clocks = { 154 + static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = { 155 155 .nrats = CLOCKS, 156 156 .rats = clocks, 157 157 }; 158 158 159 - static int snd_cs4236_xrate(snd_pcm_runtime_t *runtime) 159 + static int snd_cs4236_xrate(struct snd_pcm_runtime *runtime) 160 160 { 161 161 return snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, 162 162 &hw_constraints_clocks); ··· 181 181 } 182 182 } 183 183 184 - static void snd_cs4236_playback_format(cs4231_t *chip, snd_pcm_hw_params_t *params, unsigned char pdfr) 184 + static void snd_cs4236_playback_format(struct snd_cs4231 *chip, struct snd_pcm_hw_params *params, unsigned char pdfr) 185 185 { 186 186 unsigned long flags; 187 187 unsigned char rate = divisor_to_rate_register(params->rate_den); ··· 195 195 spin_unlock_irqrestore(&chip->reg_lock, flags); 196 196 } 197 197 198 - static void snd_cs4236_capture_format(cs4231_t *chip, snd_pcm_hw_params_t *params, unsigned char cdfr) 198 + static void snd_cs4236_capture_format(struct snd_cs4231 *chip, struct snd_pcm_hw_params *params, unsigned char cdfr) 199 199 { 200 200 unsigned long flags; 201 201 unsigned char rate = divisor_to_rate_register(params->rate_den); ··· 211 211 212 212 #ifdef CONFIG_PM 213 213 214 - static void snd_cs4236_suspend(cs4231_t *chip) 214 + static void snd_cs4236_suspend(struct snd_cs4231 *chip) 215 215 { 216 216 int reg; 217 217 unsigned long flags; ··· 226 226 spin_unlock_irqrestore(&chip->reg_lock, flags); 227 227 } 228 228 229 - static void snd_cs4236_resume(cs4231_t *chip) 229 + static void snd_cs4236_resume(struct snd_cs4231 *chip) 230 230 { 231 231 int reg; 232 232 unsigned long flags; ··· 261 261 262 262 #endif /* CONFIG_PM */ 263 263 264 - int snd_cs4236_create(snd_card_t * card, 264 + int snd_cs4236_create(struct snd_card *card, 265 265 unsigned long port, 266 266 unsigned long cport, 267 267 int irq, int dma1, int dma2, 268 268 unsigned short hardware, 269 269 unsigned short hwshare, 270 - cs4231_t ** rchip) 270 + struct snd_cs4231 ** rchip) 271 271 { 272 - cs4231_t *chip; 272 + struct snd_cs4231 *chip; 273 273 unsigned char ver1, ver2; 274 274 unsigned int reg; 275 275 int err; ··· 352 352 return 0; 353 353 } 354 354 355 - int snd_cs4236_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm) 355 + int snd_cs4236_pcm(struct snd_cs4231 *chip, int device, struct snd_pcm **rpcm) 356 356 { 357 - snd_pcm_t *pcm; 357 + struct snd_pcm *pcm; 358 358 int err; 359 359 360 360 if ((err = snd_cs4231_pcm(chip, device, &pcm)) < 0) ··· 375 375 .get = snd_cs4236_get_single, .put = snd_cs4236_put_single, \ 376 376 .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) } 377 377 378 - static int snd_cs4236_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 378 + static int snd_cs4236_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 379 379 { 380 380 int mask = (kcontrol->private_value >> 16) & 0xff; 381 381 ··· 386 386 return 0; 387 387 } 388 388 389 - static int snd_cs4236_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 389 + static int snd_cs4236_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 390 390 { 391 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 391 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 392 392 unsigned long flags; 393 393 int reg = kcontrol->private_value & 0xff; 394 394 int shift = (kcontrol->private_value >> 8) & 0xff; ··· 403 403 return 0; 404 404 } 405 405 406 - static int snd_cs4236_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 406 + static int snd_cs4236_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 407 407 { 408 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 408 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 409 409 unsigned long flags; 410 410 int reg = kcontrol->private_value & 0xff; 411 411 int shift = (kcontrol->private_value >> 8) & 0xff; ··· 432 432 .get = snd_cs4236_get_singlec, .put = snd_cs4236_put_singlec, \ 433 433 .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) } 434 434 435 - static int snd_cs4236_get_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 435 + static int snd_cs4236_get_singlec(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 436 436 { 437 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 437 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 438 438 unsigned long flags; 439 439 int reg = kcontrol->private_value & 0xff; 440 440 int shift = (kcontrol->private_value >> 8) & 0xff; ··· 449 449 return 0; 450 450 } 451 451 452 - static int snd_cs4236_put_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 452 + static int snd_cs4236_put_singlec(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 453 453 { 454 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 454 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 455 455 unsigned long flags; 456 456 int reg = kcontrol->private_value & 0xff; 457 457 int shift = (kcontrol->private_value >> 8) & 0xff; ··· 478 478 .get = snd_cs4236_get_double, .put = snd_cs4236_put_double, \ 479 479 .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) } 480 480 481 - static int snd_cs4236_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 481 + static int snd_cs4236_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 482 482 { 483 483 int mask = (kcontrol->private_value >> 24) & 0xff; 484 484 ··· 489 489 return 0; 490 490 } 491 491 492 - static int snd_cs4236_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 492 + static int snd_cs4236_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 493 493 { 494 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 494 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 495 495 unsigned long flags; 496 496 int left_reg = kcontrol->private_value & 0xff; 497 497 int right_reg = (kcontrol->private_value >> 8) & 0xff; ··· 511 511 return 0; 512 512 } 513 513 514 - static int snd_cs4236_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 514 + static int snd_cs4236_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 515 515 { 516 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 516 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 517 517 unsigned long flags; 518 518 int left_reg = kcontrol->private_value & 0xff; 519 519 int right_reg = (kcontrol->private_value >> 8) & 0xff; ··· 554 554 .get = snd_cs4236_get_double1, .put = snd_cs4236_put_double1, \ 555 555 .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) } 556 556 557 - static int snd_cs4236_get_double1(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 557 + static int snd_cs4236_get_double1(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 558 558 { 559 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 559 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 560 560 unsigned long flags; 561 561 int left_reg = kcontrol->private_value & 0xff; 562 562 int right_reg = (kcontrol->private_value >> 8) & 0xff; ··· 576 576 return 0; 577 577 } 578 578 579 - static int snd_cs4236_put_double1(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 579 + static int snd_cs4236_put_double1(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 580 580 { 581 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 581 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 582 582 unsigned long flags; 583 583 int left_reg = kcontrol->private_value & 0xff; 584 584 int right_reg = (kcontrol->private_value >> 8) & 0xff; ··· 618 618 return (vol < 64) ? 63 - vol : 64 + (71 - vol); 619 619 } 620 620 621 - static int snd_cs4236_get_master_digital(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 621 + static int snd_cs4236_get_master_digital(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 622 622 { 623 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 623 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 624 624 unsigned long flags; 625 625 626 626 spin_lock_irqsave(&chip->reg_lock, flags); ··· 630 630 return 0; 631 631 } 632 632 633 - static int snd_cs4236_put_master_digital(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 633 + static int snd_cs4236_put_master_digital(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 634 634 { 635 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 635 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 636 636 unsigned long flags; 637 637 int change; 638 638 unsigned short val1, val2; ··· 677 677 return 1 << 5; 678 678 } 679 679 680 - static int snd_cs4235_get_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 680 + static int snd_cs4235_get_output_accu(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 681 681 { 682 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 682 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 683 683 unsigned long flags; 684 684 685 685 spin_lock_irqsave(&chip->reg_lock, flags); ··· 689 689 return 0; 690 690 } 691 691 692 - static int snd_cs4235_put_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 692 + static int snd_cs4235_put_output_accu(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 693 693 { 694 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 694 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 695 695 unsigned long flags; 696 696 int change; 697 697 unsigned short val1, val2; ··· 708 708 return change; 709 709 } 710 710 711 - static snd_kcontrol_new_t snd_cs4236_controls[] = { 711 + static struct snd_kcontrol_new snd_cs4236_controls[] = { 712 712 713 713 CS4236_DOUBLE("Master Digital Playback Switch", 0, CS4236_LEFT_MASTER, CS4236_RIGHT_MASTER, 7, 7, 1, 1), 714 714 CS4236_DOUBLE("Master Digital Capture Switch", 0, CS4236_DAC_MUTE, CS4236_DAC_MUTE, 7, 6, 1, 1), ··· 759 759 CS4236_DOUBLE1("Digital Loopback Playback Volume", 0, CS4231_LOOPBACK, CS4236_RIGHT_LOOPBACK, 2, 0, 63, 1) 760 760 }; 761 761 762 - static snd_kcontrol_new_t snd_cs4235_controls[] = { 762 + static struct snd_kcontrol_new snd_cs4235_controls[] = { 763 763 764 764 CS4231_DOUBLE("Master Switch", 0, CS4235_LEFT_MASTER, CS4235_RIGHT_MASTER, 7, 7, 1, 1), 765 765 CS4231_DOUBLE("Master Volume", 0, CS4235_LEFT_MASTER, CS4235_RIGHT_MASTER, 0, 0, 31, 1), ··· 812 812 .get = snd_cs4236_get_iec958_switch, .put = snd_cs4236_put_iec958_switch, \ 813 813 .private_value = 1 << 16 } 814 814 815 - static int snd_cs4236_get_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 815 + static int snd_cs4236_get_iec958_switch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 816 816 { 817 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 817 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 818 818 unsigned long flags; 819 819 820 820 spin_lock_irqsave(&chip->reg_lock, flags); ··· 832 832 return 0; 833 833 } 834 834 835 - static int snd_cs4236_put_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 835 + static int snd_cs4236_put_iec958_switch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 836 836 { 837 - cs4231_t *chip = snd_kcontrol_chip(kcontrol); 837 + struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); 838 838 unsigned long flags; 839 839 int change; 840 840 unsigned short enable, val; ··· 868 868 return change; 869 869 } 870 870 871 - static snd_kcontrol_new_t snd_cs4236_iec958_controls[] = { 871 + static struct snd_kcontrol_new snd_cs4236_iec958_controls[] = { 872 872 CS4236_IEC958_ENABLE("IEC958 Output Enable", 0), 873 873 CS4236_SINGLEC("IEC958 Output Validity", 0, 4, 4, 1, 0), 874 874 CS4236_SINGLEC("IEC958 Output User", 0, 4, 5, 1, 0), ··· 877 877 CS4236_SINGLEC("IEC958 Output Channel Status High", 0, 6, 0, 255, 0) 878 878 }; 879 879 880 - static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4235[] = { 880 + static struct snd_kcontrol_new snd_cs4236_3d_controls_cs4235[] = { 881 881 CS4236_SINGLEC("3D Control - Switch", 0, 3, 4, 1, 0), 882 882 CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1) 883 883 }; 884 884 885 - static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4237[] = { 885 + static struct snd_kcontrol_new snd_cs4236_3d_controls_cs4237[] = { 886 886 CS4236_SINGLEC("3D Control - Switch", 0, 3, 7, 1, 0), 887 887 CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1), 888 888 CS4236_SINGLEC("3D Control - Center", 0, 2, 0, 15, 1), ··· 890 890 CS4236_SINGLEC("3D Control - IEC958", 0, 3, 5, 1, 0) 891 891 }; 892 892 893 - static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4238[] = { 893 + static struct snd_kcontrol_new snd_cs4236_3d_controls_cs4238[] = { 894 894 CS4236_SINGLEC("3D Control - Switch", 0, 3, 4, 1, 0), 895 895 CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1), 896 896 CS4236_SINGLEC("3D Control - Volume", 0, 2, 0, 15, 1), 897 897 CS4236_SINGLEC("3D Control - IEC958", 0, 3, 5, 1, 0) 898 898 }; 899 899 900 - int snd_cs4236_mixer(cs4231_t *chip) 900 + int snd_cs4236_mixer(struct snd_cs4231 *chip) 901 901 { 902 - snd_card_t *card; 902 + struct snd_card *card; 903 903 unsigned int idx, count; 904 904 int err; 905 - snd_kcontrol_new_t *kcontrol; 905 + struct snd_kcontrol_new *kcontrol; 906 906 907 907 snd_assert(chip != NULL && chip->card != NULL, return -EINVAL); 908 908 card = chip->card;