diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 09:02:42 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:19:24 -0500 |
commit | 95de77660bb54e603d32f2ce342ae16e6de1b2d4 (patch) | |
tree | 7e13ede45010d0778dfce2747464a0baf02f5d6d /sound/pci | |
parent | 74ee4ff1e62d9798361763f152c6f07d491be819 (diff) |
[ALSA] Remove xxx_t typedefs: PCI AZT3328
Modules: AZT3328 driver
Remove xxx_t typedefs from the PCI AZT3328 driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/azt3328.c | 216 |
1 files changed, 111 insertions, 105 deletions
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 96d1ba0174f8..e077eb3fbe2f 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c | |||
@@ -186,7 +186,7 @@ static int seqtimer_scaling = 128; | |||
186 | module_param(seqtimer_scaling, int, 0444); | 186 | module_param(seqtimer_scaling, int, 0444); |
187 | MODULE_PARM_DESC(seqtimer_scaling, "Set 1024000Hz sequencer timer scale factor (lockup danger!). Default 128."); | 187 | MODULE_PARM_DESC(seqtimer_scaling, "Set 1024000Hz sequencer timer scale factor (lockup danger!). Default 128."); |
188 | 188 | ||
189 | typedef struct _snd_azf3328 { | 189 | struct snd_azf3328 { |
190 | /* often-used fields towards beginning, then grouped */ | 190 | /* often-used fields towards beginning, then grouped */ |
191 | unsigned long codec_port; | 191 | unsigned long codec_port; |
192 | unsigned long io2_port; | 192 | unsigned long io2_port; |
@@ -196,16 +196,16 @@ typedef struct _snd_azf3328 { | |||
196 | 196 | ||
197 | spinlock_t reg_lock; | 197 | spinlock_t reg_lock; |
198 | 198 | ||
199 | snd_timer_t *timer; | 199 | struct snd_timer *timer; |
200 | 200 | ||
201 | snd_pcm_t *pcm; | 201 | struct snd_pcm *pcm; |
202 | snd_pcm_substream_t *playback_substream; | 202 | struct snd_pcm_substream *playback_substream; |
203 | snd_pcm_substream_t *capture_substream; | 203 | struct snd_pcm_substream *capture_substream; |
204 | unsigned int is_playing; | 204 | unsigned int is_playing; |
205 | unsigned int is_recording; | 205 | unsigned int is_recording; |
206 | 206 | ||
207 | snd_card_t *card; | 207 | struct snd_card *card; |
208 | snd_rawmidi_t *rmidi; | 208 | struct snd_rawmidi *rmidi; |
209 | 209 | ||
210 | #ifdef SUPPORT_JOYSTICK | 210 | #ifdef SUPPORT_JOYSTICK |
211 | struct gameport *gameport; | 211 | struct gameport *gameport; |
@@ -213,7 +213,7 @@ typedef struct _snd_azf3328 { | |||
213 | 213 | ||
214 | struct pci_dev *pci; | 214 | struct pci_dev *pci; |
215 | int irq; | 215 | int irq; |
216 | } azf3328_t; | 216 | }; |
217 | 217 | ||
218 | static const struct pci_device_id snd_azf3328_ids[] = { | 218 | static const struct pci_device_id snd_azf3328_ids[] = { |
219 | { 0x122D, 0x50DC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* PCI168/3328 */ | 219 | { 0x122D, 0x50DC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* PCI168/3328 */ |
@@ -224,61 +224,61 @@ static const struct pci_device_id snd_azf3328_ids[] = { | |||
224 | MODULE_DEVICE_TABLE(pci, snd_azf3328_ids); | 224 | MODULE_DEVICE_TABLE(pci, snd_azf3328_ids); |
225 | 225 | ||
226 | static inline void | 226 | static inline void |
227 | snd_azf3328_codec_outb(const azf3328_t *chip, int reg, u8 value) | 227 | snd_azf3328_codec_outb(const struct snd_azf3328 *chip, int reg, u8 value) |
228 | { | 228 | { |
229 | outb(value, chip->codec_port + reg); | 229 | outb(value, chip->codec_port + reg); |
230 | } | 230 | } |
231 | 231 | ||
232 | static inline u8 | 232 | static inline u8 |
233 | snd_azf3328_codec_inb(const azf3328_t *chip, int reg) | 233 | snd_azf3328_codec_inb(const struct snd_azf3328 *chip, int reg) |
234 | { | 234 | { |
235 | return inb(chip->codec_port + reg); | 235 | return inb(chip->codec_port + reg); |
236 | } | 236 | } |
237 | 237 | ||
238 | static inline void | 238 | static inline void |
239 | snd_azf3328_codec_outw(const azf3328_t *chip, int reg, u16 value) | 239 | snd_azf3328_codec_outw(const struct snd_azf3328 *chip, int reg, u16 value) |
240 | { | 240 | { |
241 | outw(value, chip->codec_port + reg); | 241 | outw(value, chip->codec_port + reg); |
242 | } | 242 | } |
243 | 243 | ||
244 | static inline u16 | 244 | static inline u16 |
245 | snd_azf3328_codec_inw(const azf3328_t *chip, int reg) | 245 | snd_azf3328_codec_inw(const struct snd_azf3328 *chip, int reg) |
246 | { | 246 | { |
247 | return inw(chip->codec_port + reg); | 247 | return inw(chip->codec_port + reg); |
248 | } | 248 | } |
249 | 249 | ||
250 | static inline void | 250 | static inline void |
251 | snd_azf3328_codec_outl(const azf3328_t *chip, int reg, u32 value) | 251 | snd_azf3328_codec_outl(const struct snd_azf3328 *chip, int reg, u32 value) |
252 | { | 252 | { |
253 | outl(value, chip->codec_port + reg); | 253 | outl(value, chip->codec_port + reg); |
254 | } | 254 | } |
255 | 255 | ||
256 | static inline void | 256 | static inline void |
257 | snd_azf3328_io2_outb(const azf3328_t *chip, int reg, u8 value) | 257 | snd_azf3328_io2_outb(const struct snd_azf3328 *chip, int reg, u8 value) |
258 | { | 258 | { |
259 | outb(value, chip->io2_port + reg); | 259 | outb(value, chip->io2_port + reg); |
260 | } | 260 | } |
261 | 261 | ||
262 | static inline u8 | 262 | static inline u8 |
263 | snd_azf3328_io2_inb(const azf3328_t *chip, int reg) | 263 | snd_azf3328_io2_inb(const struct snd_azf3328 *chip, int reg) |
264 | { | 264 | { |
265 | return inb(chip->io2_port + reg); | 265 | return inb(chip->io2_port + reg); |
266 | } | 266 | } |
267 | 267 | ||
268 | static inline void | 268 | static inline void |
269 | snd_azf3328_mixer_outw(const azf3328_t *chip, int reg, u16 value) | 269 | snd_azf3328_mixer_outw(const struct snd_azf3328 *chip, int reg, u16 value) |
270 | { | 270 | { |
271 | outw(value, chip->mixer_port + reg); | 271 | outw(value, chip->mixer_port + reg); |
272 | } | 272 | } |
273 | 273 | ||
274 | static inline u16 | 274 | static inline u16 |
275 | snd_azf3328_mixer_inw(const azf3328_t *chip, int reg) | 275 | snd_azf3328_mixer_inw(const struct snd_azf3328 *chip, int reg) |
276 | { | 276 | { |
277 | return inw(chip->mixer_port + reg); | 277 | return inw(chip->mixer_port + reg); |
278 | } | 278 | } |
279 | 279 | ||
280 | static void | 280 | static void |
281 | snd_azf3328_mixer_set_mute(const azf3328_t *chip, int reg, int do_mute) | 281 | snd_azf3328_mixer_set_mute(const struct snd_azf3328 *chip, int reg, int do_mute) |
282 | { | 282 | { |
283 | unsigned long portbase = chip->mixer_port + reg + 1; | 283 | unsigned long portbase = chip->mixer_port + reg + 1; |
284 | unsigned char oldval; | 284 | unsigned char oldval; |
@@ -294,7 +294,7 @@ snd_azf3328_mixer_set_mute(const azf3328_t *chip, int reg, int do_mute) | |||
294 | } | 294 | } |
295 | 295 | ||
296 | static void | 296 | static void |
297 | snd_azf3328_mixer_write_volume_gradually(const azf3328_t *chip, int reg, unsigned char dst_vol_left, unsigned char dst_vol_right, int chan_sel, int delay) | 297 | snd_azf3328_mixer_write_volume_gradually(const struct snd_azf3328 *chip, int reg, unsigned char dst_vol_left, unsigned char dst_vol_right, int chan_sel, int delay) |
298 | { | 298 | { |
299 | unsigned long portbase = chip->mixer_port + reg; | 299 | unsigned long portbase = chip->mixer_port + reg; |
300 | unsigned char curr_vol_left = 0, curr_vol_right = 0; | 300 | unsigned char curr_vol_left = 0, curr_vol_right = 0; |
@@ -353,14 +353,14 @@ snd_azf3328_mixer_write_volume_gradually(const azf3328_t *chip, int reg, unsigne | |||
353 | /* | 353 | /* |
354 | * general mixer element | 354 | * general mixer element |
355 | */ | 355 | */ |
356 | typedef struct azf3328_mixer_reg { | 356 | struct azf3328_mixer_reg { |
357 | unsigned int reg; | 357 | unsigned int reg; |
358 | unsigned int lchan_shift, rchan_shift; | 358 | unsigned int lchan_shift, rchan_shift; |
359 | unsigned int mask; | 359 | unsigned int mask; |
360 | unsigned int invert: 1; | 360 | unsigned int invert: 1; |
361 | unsigned int stereo: 1; | 361 | unsigned int stereo: 1; |
362 | unsigned int enum_c: 4; | 362 | unsigned int enum_c: 4; |
363 | } azf3328_mixer_reg_t; | 363 | }; |
364 | 364 | ||
365 | #define COMPOSE_MIXER_REG(reg,lchan_shift,rchan_shift,mask,invert,stereo,enum_c) \ | 365 | #define COMPOSE_MIXER_REG(reg,lchan_shift,rchan_shift,mask,invert,stereo,enum_c) \ |
366 | ((reg) | (lchan_shift << 8) | (rchan_shift << 12) | \ | 366 | ((reg) | (lchan_shift << 8) | (rchan_shift << 12) | \ |
@@ -369,7 +369,7 @@ typedef struct azf3328_mixer_reg { | |||
369 | (stereo << 25) | \ | 369 | (stereo << 25) | \ |
370 | (enum_c << 26)) | 370 | (enum_c << 26)) |
371 | 371 | ||
372 | static void snd_azf3328_mixer_reg_decode(azf3328_mixer_reg_t *r, unsigned long val) | 372 | static void snd_azf3328_mixer_reg_decode(struct azf3328_mixer_reg *r, unsigned long val) |
373 | { | 373 | { |
374 | r->reg = val & 0xff; | 374 | r->reg = val & 0xff; |
375 | r->lchan_shift = (val >> 8) & 0x0f; | 375 | r->lchan_shift = (val >> 8) & 0x0f; |
@@ -420,9 +420,10 @@ static void snd_azf3328_mixer_reg_decode(azf3328_mixer_reg_t *r, unsigned long v | |||
420 | } | 420 | } |
421 | 421 | ||
422 | static int | 422 | static int |
423 | snd_azf3328_info_mixer(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 423 | snd_azf3328_info_mixer(struct snd_kcontrol *kcontrol, |
424 | struct snd_ctl_elem_info *uinfo) | ||
424 | { | 425 | { |
425 | azf3328_mixer_reg_t reg; | 426 | struct azf3328_mixer_reg reg; |
426 | 427 | ||
427 | snd_azf3328_dbgcallenter(); | 428 | snd_azf3328_dbgcallenter(); |
428 | snd_azf3328_mixer_reg_decode(®, kcontrol->private_value); | 429 | snd_azf3328_mixer_reg_decode(®, kcontrol->private_value); |
@@ -436,10 +437,11 @@ snd_azf3328_info_mixer(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | |||
436 | } | 437 | } |
437 | 438 | ||
438 | static int | 439 | static int |
439 | snd_azf3328_get_mixer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 440 | snd_azf3328_get_mixer(struct snd_kcontrol *kcontrol, |
441 | struct snd_ctl_elem_value *ucontrol) | ||
440 | { | 442 | { |
441 | azf3328_t *chip = snd_kcontrol_chip(kcontrol); | 443 | struct snd_azf3328 *chip = snd_kcontrol_chip(kcontrol); |
442 | azf3328_mixer_reg_t reg; | 444 | struct azf3328_mixer_reg reg; |
443 | unsigned int oreg, val; | 445 | unsigned int oreg, val; |
444 | 446 | ||
445 | snd_azf3328_dbgcallenter(); | 447 | snd_azf3328_dbgcallenter(); |
@@ -466,10 +468,11 @@ snd_azf3328_get_mixer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol | |||
466 | } | 468 | } |
467 | 469 | ||
468 | static int | 470 | static int |
469 | snd_azf3328_put_mixer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 471 | snd_azf3328_put_mixer(struct snd_kcontrol *kcontrol, |
472 | struct snd_ctl_elem_value *ucontrol) | ||
470 | { | 473 | { |
471 | azf3328_t *chip = snd_kcontrol_chip(kcontrol); | 474 | struct snd_azf3328 *chip = snd_kcontrol_chip(kcontrol); |
472 | azf3328_mixer_reg_t reg; | 475 | struct azf3328_mixer_reg reg; |
473 | unsigned int oreg, nreg, val; | 476 | unsigned int oreg, nreg, val; |
474 | 477 | ||
475 | snd_azf3328_dbgcallenter(); | 478 | snd_azf3328_dbgcallenter(); |
@@ -506,7 +509,8 @@ snd_azf3328_put_mixer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol | |||
506 | } | 509 | } |
507 | 510 | ||
508 | static int | 511 | static int |
509 | snd_azf3328_info_mixer_enum(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 512 | snd_azf3328_info_mixer_enum(struct snd_kcontrol *kcontrol, |
513 | struct snd_ctl_elem_info *uinfo) | ||
510 | { | 514 | { |
511 | static const char * const texts1[] = { | 515 | static const char * const texts1[] = { |
512 | "ModemOut1", "ModemOut2" | 516 | "ModemOut1", "ModemOut2" |
@@ -518,7 +522,7 @@ snd_azf3328_info_mixer_enum(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinf | |||
518 | "Mic", "CD", "Video", "Aux", | 522 | "Mic", "CD", "Video", "Aux", |
519 | "Line", "Mix", "Mix Mono", "Phone" | 523 | "Line", "Mix", "Mix Mono", "Phone" |
520 | }; | 524 | }; |
521 | azf3328_mixer_reg_t reg; | 525 | struct azf3328_mixer_reg reg; |
522 | 526 | ||
523 | snd_azf3328_mixer_reg_decode(®, kcontrol->private_value); | 527 | snd_azf3328_mixer_reg_decode(®, kcontrol->private_value); |
524 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 528 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; |
@@ -540,10 +544,11 @@ snd_azf3328_info_mixer_enum(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinf | |||
540 | } | 544 | } |
541 | 545 | ||
542 | static int | 546 | static int |
543 | snd_azf3328_get_mixer_enum(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 547 | snd_azf3328_get_mixer_enum(struct snd_kcontrol *kcontrol, |
548 | struct snd_ctl_elem_value *ucontrol) | ||
544 | { | 549 | { |
545 | azf3328_t *chip = snd_kcontrol_chip(kcontrol); | 550 | struct snd_azf3328 *chip = snd_kcontrol_chip(kcontrol); |
546 | azf3328_mixer_reg_t reg; | 551 | struct azf3328_mixer_reg reg; |
547 | unsigned short val; | 552 | unsigned short val; |
548 | 553 | ||
549 | snd_azf3328_mixer_reg_decode(®, kcontrol->private_value); | 554 | snd_azf3328_mixer_reg_decode(®, kcontrol->private_value); |
@@ -563,10 +568,11 @@ snd_azf3328_get_mixer_enum(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * uco | |||
563 | } | 568 | } |
564 | 569 | ||
565 | static int | 570 | static int |
566 | snd_azf3328_put_mixer_enum(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 571 | snd_azf3328_put_mixer_enum(struct snd_kcontrol *kcontrol, |
572 | struct snd_ctl_elem_value *ucontrol) | ||
567 | { | 573 | { |
568 | azf3328_t *chip = snd_kcontrol_chip(kcontrol); | 574 | struct snd_azf3328 *chip = snd_kcontrol_chip(kcontrol); |
569 | azf3328_mixer_reg_t reg; | 575 | struct azf3328_mixer_reg reg; |
570 | unsigned int oreg, nreg, val; | 576 | unsigned int oreg, nreg, val; |
571 | 577 | ||
572 | snd_azf3328_mixer_reg_decode(®, kcontrol->private_value); | 578 | snd_azf3328_mixer_reg_decode(®, kcontrol->private_value); |
@@ -594,7 +600,7 @@ snd_azf3328_put_mixer_enum(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * uco | |||
594 | return (nreg != oreg); | 600 | return (nreg != oreg); |
595 | } | 601 | } |
596 | 602 | ||
597 | static const snd_kcontrol_new_t snd_azf3328_mixer_controls[] __devinitdata = { | 603 | static const struct snd_kcontrol_new snd_azf3328_mixer_controls[] __devinitdata = { |
598 | AZF3328_MIXER_SWITCH("Master Playback Switch", IDX_MIXER_PLAY_MASTER, 15, 1), | 604 | AZF3328_MIXER_SWITCH("Master Playback Switch", IDX_MIXER_PLAY_MASTER, 15, 1), |
599 | AZF3328_MIXER_VOL_STEREO("Master Playback Volume", IDX_MIXER_PLAY_MASTER, 0x1f, 1), | 605 | AZF3328_MIXER_VOL_STEREO("Master Playback Volume", IDX_MIXER_PLAY_MASTER, 0x1f, 1), |
600 | AZF3328_MIXER_SWITCH("Wave Playback Switch", IDX_MIXER_WAVEOUT, 15, 1), | 606 | AZF3328_MIXER_SWITCH("Wave Playback Switch", IDX_MIXER_WAVEOUT, 15, 1), |
@@ -666,10 +672,10 @@ static const u16 __devinitdata snd_azf3328_init_values[][2] = { | |||
666 | }; | 672 | }; |
667 | 673 | ||
668 | static int __devinit | 674 | static int __devinit |
669 | snd_azf3328_mixer_new(azf3328_t *chip) | 675 | snd_azf3328_mixer_new(struct snd_azf3328 *chip) |
670 | { | 676 | { |
671 | snd_card_t *card; | 677 | struct snd_card *card; |
672 | const snd_kcontrol_new_t *sw; | 678 | const struct snd_kcontrol_new *sw; |
673 | unsigned int idx; | 679 | unsigned int idx; |
674 | int err; | 680 | int err; |
675 | 681 | ||
@@ -702,8 +708,8 @@ snd_azf3328_mixer_new(azf3328_t *chip) | |||
702 | } | 708 | } |
703 | 709 | ||
704 | static int | 710 | static int |
705 | snd_azf3328_hw_params(snd_pcm_substream_t * substream, | 711 | snd_azf3328_hw_params(struct snd_pcm_substream *substream, |
706 | snd_pcm_hw_params_t * hw_params) | 712 | struct snd_pcm_hw_params *hw_params) |
707 | { | 713 | { |
708 | int res; | 714 | int res; |
709 | snd_azf3328_dbgcallenter(); | 715 | snd_azf3328_dbgcallenter(); |
@@ -713,7 +719,7 @@ snd_azf3328_hw_params(snd_pcm_substream_t * substream, | |||
713 | } | 719 | } |
714 | 720 | ||
715 | static int | 721 | static int |
716 | snd_azf3328_hw_free(snd_pcm_substream_t * substream) | 722 | snd_azf3328_hw_free(struct snd_pcm_substream *substream) |
717 | { | 723 | { |
718 | snd_azf3328_dbgcallenter(); | 724 | snd_azf3328_dbgcallenter(); |
719 | snd_pcm_lib_free_pages(substream); | 725 | snd_pcm_lib_free_pages(substream); |
@@ -722,7 +728,7 @@ snd_azf3328_hw_free(snd_pcm_substream_t * substream) | |||
722 | } | 728 | } |
723 | 729 | ||
724 | static void | 730 | static void |
725 | snd_azf3328_setfmt(azf3328_t *chip, | 731 | snd_azf3328_setfmt(struct snd_azf3328 *chip, |
726 | unsigned int reg, | 732 | unsigned int reg, |
727 | unsigned int bitrate, | 733 | unsigned int bitrate, |
728 | unsigned int format_width, | 734 | unsigned int format_width, |
@@ -796,7 +802,7 @@ snd_azf3328_setfmt(azf3328_t *chip, | |||
796 | } | 802 | } |
797 | 803 | ||
798 | static void | 804 | static void |
799 | snd_azf3328_setdmaa(azf3328_t *chip, | 805 | snd_azf3328_setdmaa(struct snd_azf3328 *chip, |
800 | long unsigned int addr, | 806 | long unsigned int addr, |
801 | unsigned int count, | 807 | unsigned int count, |
802 | unsigned int size, | 808 | unsigned int size, |
@@ -842,11 +848,11 @@ snd_azf3328_setdmaa(azf3328_t *chip, | |||
842 | } | 848 | } |
843 | 849 | ||
844 | static int | 850 | static int |
845 | snd_azf3328_playback_prepare(snd_pcm_substream_t *substream) | 851 | snd_azf3328_playback_prepare(struct snd_pcm_substream *substream) |
846 | { | 852 | { |
847 | #if 0 | 853 | #if 0 |
848 | azf3328_t *chip = snd_pcm_substream_chip(substream); | 854 | struct snd_azf3328 *chip = snd_pcm_substream_chip(substream); |
849 | snd_pcm_runtime_t *runtime = substream->runtime; | 855 | struct snd_pcm_runtime *runtime = substream->runtime; |
850 | unsigned int size = snd_pcm_lib_buffer_bytes(substream); | 856 | unsigned int size = snd_pcm_lib_buffer_bytes(substream); |
851 | unsigned int count = snd_pcm_lib_period_bytes(substream); | 857 | unsigned int count = snd_pcm_lib_period_bytes(substream); |
852 | #endif | 858 | #endif |
@@ -864,11 +870,11 @@ snd_azf3328_playback_prepare(snd_pcm_substream_t *substream) | |||
864 | } | 870 | } |
865 | 871 | ||
866 | static int | 872 | static int |
867 | snd_azf3328_capture_prepare(snd_pcm_substream_t * substream) | 873 | snd_azf3328_capture_prepare(struct snd_pcm_substream *substream) |
868 | { | 874 | { |
869 | #if 0 | 875 | #if 0 |
870 | azf3328_t *chip = snd_pcm_substream_chip(substream); | 876 | struct snd_azf3328 *chip = snd_pcm_substream_chip(substream); |
871 | snd_pcm_runtime_t *runtime = substream->runtime; | 877 | struct snd_pcm_runtime *runtime = substream->runtime; |
872 | unsigned int size = snd_pcm_lib_buffer_bytes(substream); | 878 | unsigned int size = snd_pcm_lib_buffer_bytes(substream); |
873 | unsigned int count = snd_pcm_lib_period_bytes(substream); | 879 | unsigned int count = snd_pcm_lib_period_bytes(substream); |
874 | #endif | 880 | #endif |
@@ -886,10 +892,10 @@ snd_azf3328_capture_prepare(snd_pcm_substream_t * substream) | |||
886 | } | 892 | } |
887 | 893 | ||
888 | static int | 894 | static int |
889 | snd_azf3328_playback_trigger(snd_pcm_substream_t * substream, int cmd) | 895 | snd_azf3328_playback_trigger(struct snd_pcm_substream *substream, int cmd) |
890 | { | 896 | { |
891 | azf3328_t *chip = snd_pcm_substream_chip(substream); | 897 | struct snd_azf3328 *chip = snd_pcm_substream_chip(substream); |
892 | snd_pcm_runtime_t *runtime = substream->runtime; | 898 | struct snd_pcm_runtime *runtime = substream->runtime; |
893 | int result = 0; | 899 | int result = 0; |
894 | unsigned int status1; | 900 | unsigned int status1; |
895 | 901 | ||
@@ -998,10 +1004,10 @@ snd_azf3328_playback_trigger(snd_pcm_substream_t * substream, int cmd) | |||
998 | /* this is just analogous to playback; I'm not quite sure whether recording | 1004 | /* this is just analogous to playback; I'm not quite sure whether recording |
999 | * should actually be triggered like that */ | 1005 | * should actually be triggered like that */ |
1000 | static int | 1006 | static int |
1001 | snd_azf3328_capture_trigger(snd_pcm_substream_t * substream, int cmd) | 1007 | snd_azf3328_capture_trigger(struct snd_pcm_substream *substream, int cmd) |
1002 | { | 1008 | { |
1003 | azf3328_t *chip = snd_pcm_substream_chip(substream); | 1009 | struct snd_azf3328 *chip = snd_pcm_substream_chip(substream); |
1004 | snd_pcm_runtime_t *runtime = substream->runtime; | 1010 | struct snd_pcm_runtime *runtime = substream->runtime; |
1005 | int result = 0; | 1011 | int result = 0; |
1006 | unsigned int status1; | 1012 | unsigned int status1; |
1007 | 1013 | ||
@@ -1096,9 +1102,9 @@ snd_azf3328_capture_trigger(snd_pcm_substream_t * substream, int cmd) | |||
1096 | } | 1102 | } |
1097 | 1103 | ||
1098 | static snd_pcm_uframes_t | 1104 | static snd_pcm_uframes_t |
1099 | snd_azf3328_playback_pointer(snd_pcm_substream_t * substream) | 1105 | snd_azf3328_playback_pointer(struct snd_pcm_substream *substream) |
1100 | { | 1106 | { |
1101 | azf3328_t *chip = snd_pcm_substream_chip(substream); | 1107 | struct snd_azf3328 *chip = snd_pcm_substream_chip(substream); |
1102 | unsigned long bufptr, result; | 1108 | unsigned long bufptr, result; |
1103 | snd_pcm_uframes_t frmres; | 1109 | snd_pcm_uframes_t frmres; |
1104 | 1110 | ||
@@ -1117,9 +1123,9 @@ snd_azf3328_playback_pointer(snd_pcm_substream_t * substream) | |||
1117 | } | 1123 | } |
1118 | 1124 | ||
1119 | static snd_pcm_uframes_t | 1125 | static snd_pcm_uframes_t |
1120 | snd_azf3328_capture_pointer(snd_pcm_substream_t * substream) | 1126 | snd_azf3328_capture_pointer(struct snd_pcm_substream *substream) |
1121 | { | 1127 | { |
1122 | azf3328_t *chip = snd_pcm_substream_chip(substream); | 1128 | struct snd_azf3328 *chip = snd_pcm_substream_chip(substream); |
1123 | unsigned long bufptr, result; | 1129 | unsigned long bufptr, result; |
1124 | snd_pcm_uframes_t frmres; | 1130 | snd_pcm_uframes_t frmres; |
1125 | 1131 | ||
@@ -1140,7 +1146,7 @@ snd_azf3328_capture_pointer(snd_pcm_substream_t * substream) | |||
1140 | static irqreturn_t | 1146 | static irqreturn_t |
1141 | snd_azf3328_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 1147 | snd_azf3328_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
1142 | { | 1148 | { |
1143 | azf3328_t *chip = dev_id; | 1149 | struct snd_azf3328 *chip = dev_id; |
1144 | u8 status, which; | 1150 | u8 status, which; |
1145 | static unsigned long irq_count; | 1151 | static unsigned long irq_count; |
1146 | 1152 | ||
@@ -1223,7 +1229,7 @@ snd_azf3328_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
1223 | 1229 | ||
1224 | /*****************************************************************/ | 1230 | /*****************************************************************/ |
1225 | 1231 | ||
1226 | static const snd_pcm_hardware_t snd_azf3328_playback = | 1232 | static const struct snd_pcm_hardware snd_azf3328_playback = |
1227 | { | 1233 | { |
1228 | /* FIXME!! Correct? */ | 1234 | /* FIXME!! Correct? */ |
1229 | .info = SNDRV_PCM_INFO_MMAP | | 1235 | .info = SNDRV_PCM_INFO_MMAP | |
@@ -1251,7 +1257,7 @@ static const snd_pcm_hardware_t snd_azf3328_playback = | |||
1251 | .fifo_size = 0, | 1257 | .fifo_size = 0, |
1252 | }; | 1258 | }; |
1253 | 1259 | ||
1254 | static const snd_pcm_hardware_t snd_azf3328_capture = | 1260 | static const struct snd_pcm_hardware snd_azf3328_capture = |
1255 | { | 1261 | { |
1256 | /* FIXME */ | 1262 | /* FIXME */ |
1257 | .info = SNDRV_PCM_INFO_MMAP | | 1263 | .info = SNDRV_PCM_INFO_MMAP | |
@@ -1280,7 +1286,7 @@ static const snd_pcm_hardware_t snd_azf3328_capture = | |||
1280 | static unsigned int snd_azf3328_fixed_rates[] = { | 1286 | static unsigned int snd_azf3328_fixed_rates[] = { |
1281 | 4000, 4800, 5512, 6620, 8000, 9600, 11025, 13240, 16000, 22050, 32000, | 1287 | 4000, 4800, 5512, 6620, 8000, 9600, 11025, 13240, 16000, 22050, 32000, |
1282 | 44100, 48000, 66200 }; | 1288 | 44100, 48000, 66200 }; |
1283 | static snd_pcm_hw_constraint_list_t snd_azf3328_hw_constraints_rates = { | 1289 | static struct snd_pcm_hw_constraint_list snd_azf3328_hw_constraints_rates = { |
1284 | .count = ARRAY_SIZE(snd_azf3328_fixed_rates), | 1290 | .count = ARRAY_SIZE(snd_azf3328_fixed_rates), |
1285 | .list = snd_azf3328_fixed_rates, | 1291 | .list = snd_azf3328_fixed_rates, |
1286 | .mask = 0, | 1292 | .mask = 0, |
@@ -1289,10 +1295,10 @@ static snd_pcm_hw_constraint_list_t snd_azf3328_hw_constraints_rates = { | |||
1289 | /*****************************************************************/ | 1295 | /*****************************************************************/ |
1290 | 1296 | ||
1291 | static int | 1297 | static int |
1292 | snd_azf3328_playback_open(snd_pcm_substream_t * substream) | 1298 | snd_azf3328_playback_open(struct snd_pcm_substream *substream) |
1293 | { | 1299 | { |
1294 | azf3328_t *chip = snd_pcm_substream_chip(substream); | 1300 | struct snd_azf3328 *chip = snd_pcm_substream_chip(substream); |
1295 | snd_pcm_runtime_t *runtime = substream->runtime; | 1301 | struct snd_pcm_runtime *runtime = substream->runtime; |
1296 | 1302 | ||
1297 | snd_azf3328_dbgcallenter(); | 1303 | snd_azf3328_dbgcallenter(); |
1298 | chip->playback_substream = substream; | 1304 | chip->playback_substream = substream; |
@@ -1304,10 +1310,10 @@ snd_azf3328_playback_open(snd_pcm_substream_t * substream) | |||
1304 | } | 1310 | } |
1305 | 1311 | ||
1306 | static int | 1312 | static int |
1307 | snd_azf3328_capture_open(snd_pcm_substream_t * substream) | 1313 | snd_azf3328_capture_open(struct snd_pcm_substream *substream) |
1308 | { | 1314 | { |
1309 | azf3328_t *chip = snd_pcm_substream_chip(substream); | 1315 | struct snd_azf3328 *chip = snd_pcm_substream_chip(substream); |
1310 | snd_pcm_runtime_t *runtime = substream->runtime; | 1316 | struct snd_pcm_runtime *runtime = substream->runtime; |
1311 | 1317 | ||
1312 | snd_azf3328_dbgcallenter(); | 1318 | snd_azf3328_dbgcallenter(); |
1313 | chip->capture_substream = substream; | 1319 | chip->capture_substream = substream; |
@@ -1319,9 +1325,9 @@ snd_azf3328_capture_open(snd_pcm_substream_t * substream) | |||
1319 | } | 1325 | } |
1320 | 1326 | ||
1321 | static int | 1327 | static int |
1322 | snd_azf3328_playback_close(snd_pcm_substream_t * substream) | 1328 | snd_azf3328_playback_close(struct snd_pcm_substream *substream) |
1323 | { | 1329 | { |
1324 | azf3328_t *chip = snd_pcm_substream_chip(substream); | 1330 | struct snd_azf3328 *chip = snd_pcm_substream_chip(substream); |
1325 | 1331 | ||
1326 | snd_azf3328_dbgcallenter(); | 1332 | snd_azf3328_dbgcallenter(); |
1327 | 1333 | ||
@@ -1331,9 +1337,9 @@ snd_azf3328_playback_close(snd_pcm_substream_t * substream) | |||
1331 | } | 1337 | } |
1332 | 1338 | ||
1333 | static int | 1339 | static int |
1334 | snd_azf3328_capture_close(snd_pcm_substream_t * substream) | 1340 | snd_azf3328_capture_close(struct snd_pcm_substream *substream) |
1335 | { | 1341 | { |
1336 | azf3328_t *chip = snd_pcm_substream_chip(substream); | 1342 | struct snd_azf3328 *chip = snd_pcm_substream_chip(substream); |
1337 | 1343 | ||
1338 | snd_azf3328_dbgcallenter(); | 1344 | snd_azf3328_dbgcallenter(); |
1339 | chip->capture_substream = NULL; | 1345 | chip->capture_substream = NULL; |
@@ -1343,7 +1349,7 @@ snd_azf3328_capture_close(snd_pcm_substream_t * substream) | |||
1343 | 1349 | ||
1344 | /******************************************************************/ | 1350 | /******************************************************************/ |
1345 | 1351 | ||
1346 | static snd_pcm_ops_t snd_azf3328_playback_ops = { | 1352 | static struct snd_pcm_ops snd_azf3328_playback_ops = { |
1347 | .open = snd_azf3328_playback_open, | 1353 | .open = snd_azf3328_playback_open, |
1348 | .close = snd_azf3328_playback_close, | 1354 | .close = snd_azf3328_playback_close, |
1349 | .ioctl = snd_pcm_lib_ioctl, | 1355 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1354,7 +1360,7 @@ static snd_pcm_ops_t snd_azf3328_playback_ops = { | |||
1354 | .pointer = snd_azf3328_playback_pointer | 1360 | .pointer = snd_azf3328_playback_pointer |
1355 | }; | 1361 | }; |
1356 | 1362 | ||
1357 | static snd_pcm_ops_t snd_azf3328_capture_ops = { | 1363 | static struct snd_pcm_ops snd_azf3328_capture_ops = { |
1358 | .open = snd_azf3328_capture_open, | 1364 | .open = snd_azf3328_capture_open, |
1359 | .close = snd_azf3328_capture_close, | 1365 | .close = snd_azf3328_capture_close, |
1360 | .ioctl = snd_pcm_lib_ioctl, | 1366 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1366,9 +1372,9 @@ static snd_pcm_ops_t snd_azf3328_capture_ops = { | |||
1366 | }; | 1372 | }; |
1367 | 1373 | ||
1368 | static int __devinit | 1374 | static int __devinit |
1369 | snd_azf3328_pcm(azf3328_t *chip, int device) | 1375 | snd_azf3328_pcm(struct snd_azf3328 *chip, int device) |
1370 | { | 1376 | { |
1371 | snd_pcm_t *pcm; | 1377 | struct snd_pcm *pcm; |
1372 | int err; | 1378 | int err; |
1373 | 1379 | ||
1374 | snd_azf3328_dbgcallenter(); | 1380 | snd_azf3328_dbgcallenter(); |
@@ -1393,7 +1399,7 @@ snd_azf3328_pcm(azf3328_t *chip, int device) | |||
1393 | 1399 | ||
1394 | #ifdef SUPPORT_JOYSTICK | 1400 | #ifdef SUPPORT_JOYSTICK |
1395 | static int __devinit | 1401 | static int __devinit |
1396 | snd_azf3328_config_joystick(azf3328_t *chip, int dev) | 1402 | snd_azf3328_config_joystick(struct snd_azf3328 *chip, int dev) |
1397 | { | 1403 | { |
1398 | struct gameport *gp; | 1404 | struct gameport *gp; |
1399 | struct resource *r; | 1405 | struct resource *r; |
@@ -1428,7 +1434,7 @@ snd_azf3328_config_joystick(azf3328_t *chip, int dev) | |||
1428 | } | 1434 | } |
1429 | 1435 | ||
1430 | static void | 1436 | static void |
1431 | snd_azf3328_free_joystick(azf3328_t *chip) | 1437 | snd_azf3328_free_joystick(struct snd_azf3328 *chip) |
1432 | { | 1438 | { |
1433 | if (chip->gameport) { | 1439 | if (chip->gameport) { |
1434 | struct resource *r = gameport_get_port_data(chip->gameport); | 1440 | struct resource *r = gameport_get_port_data(chip->gameport); |
@@ -1443,15 +1449,15 @@ snd_azf3328_free_joystick(azf3328_t *chip) | |||
1443 | } | 1449 | } |
1444 | #else | 1450 | #else |
1445 | static inline int | 1451 | static inline int |
1446 | snd_azf3328_config_joystick(azf3328_t *chip, int dev) { return -ENOSYS; } | 1452 | snd_azf3328_config_joystick(struct snd_azf3328 *chip, int dev) { return -ENOSYS; } |
1447 | static inline void | 1453 | static inline void |
1448 | snd_azf3328_free_joystick(azf3328_t *chip) { } | 1454 | snd_azf3328_free_joystick(struct snd_azf3328 *chip) { } |
1449 | #endif | 1455 | #endif |
1450 | 1456 | ||
1451 | /******************************************************************/ | 1457 | /******************************************************************/ |
1452 | 1458 | ||
1453 | static int | 1459 | static int |
1454 | snd_azf3328_free(azf3328_t *chip) | 1460 | snd_azf3328_free(struct snd_azf3328 *chip) |
1455 | { | 1461 | { |
1456 | if (chip->irq < 0) | 1462 | if (chip->irq < 0) |
1457 | goto __end_hw; | 1463 | goto __end_hw; |
@@ -1477,9 +1483,9 @@ __end_hw: | |||
1477 | } | 1483 | } |
1478 | 1484 | ||
1479 | static int | 1485 | static int |
1480 | snd_azf3328_dev_free(snd_device_t *device) | 1486 | snd_azf3328_dev_free(struct snd_device *device) |
1481 | { | 1487 | { |
1482 | azf3328_t *chip = device->device_data; | 1488 | struct snd_azf3328 *chip = device->device_data; |
1483 | return snd_azf3328_free(chip); | 1489 | return snd_azf3328_free(chip); |
1484 | } | 1490 | } |
1485 | 1491 | ||
@@ -1495,9 +1501,9 @@ snd_azf3328_dev_free(snd_device_t *device) | |||
1495 | ***/ | 1501 | ***/ |
1496 | 1502 | ||
1497 | static int | 1503 | static int |
1498 | snd_azf3328_timer_start(snd_timer_t *timer) | 1504 | snd_azf3328_timer_start(struct snd_timer *timer) |
1499 | { | 1505 | { |
1500 | azf3328_t *chip; | 1506 | struct snd_azf3328 *chip; |
1501 | unsigned long flags; | 1507 | unsigned long flags; |
1502 | unsigned int delay; | 1508 | unsigned int delay; |
1503 | 1509 | ||
@@ -1523,9 +1529,9 @@ snd_azf3328_timer_start(snd_timer_t *timer) | |||
1523 | } | 1529 | } |
1524 | 1530 | ||
1525 | static int | 1531 | static int |
1526 | snd_azf3328_timer_stop(snd_timer_t *timer) | 1532 | snd_azf3328_timer_stop(struct snd_timer *timer) |
1527 | { | 1533 | { |
1528 | azf3328_t *chip; | 1534 | struct snd_azf3328 *chip; |
1529 | unsigned long flags; | 1535 | unsigned long flags; |
1530 | 1536 | ||
1531 | snd_azf3328_dbgcallenter(); | 1537 | snd_azf3328_dbgcallenter(); |
@@ -1541,7 +1547,7 @@ snd_azf3328_timer_stop(snd_timer_t *timer) | |||
1541 | 1547 | ||
1542 | 1548 | ||
1543 | static int | 1549 | static int |
1544 | snd_azf3328_timer_precise_resolution(snd_timer_t *timer, | 1550 | snd_azf3328_timer_precise_resolution(struct snd_timer *timer, |
1545 | unsigned long *num, unsigned long *den) | 1551 | unsigned long *num, unsigned long *den) |
1546 | { | 1552 | { |
1547 | snd_azf3328_dbgcallenter(); | 1553 | snd_azf3328_dbgcallenter(); |
@@ -1551,7 +1557,7 @@ snd_azf3328_timer_precise_resolution(snd_timer_t *timer, | |||
1551 | return 0; | 1557 | return 0; |
1552 | } | 1558 | } |
1553 | 1559 | ||
1554 | static struct _snd_timer_hardware snd_azf3328_timer_hw = { | 1560 | static struct snd_timer_hardware snd_azf3328_timer_hw = { |
1555 | .flags = SNDRV_TIMER_HW_AUTO, | 1561 | .flags = SNDRV_TIMER_HW_AUTO, |
1556 | .resolution = 977, /* 1000000/1024000 = 0.9765625us */ | 1562 | .resolution = 977, /* 1000000/1024000 = 0.9765625us */ |
1557 | .ticks = 1024000, /* max tick count, defined by the value register; actually it's not 1024000, but 1048576, but we don't care */ | 1563 | .ticks = 1024000, /* max tick count, defined by the value register; actually it's not 1024000, but 1048576, but we don't care */ |
@@ -1561,10 +1567,10 @@ static struct _snd_timer_hardware snd_azf3328_timer_hw = { | |||
1561 | }; | 1567 | }; |
1562 | 1568 | ||
1563 | static int __devinit | 1569 | static int __devinit |
1564 | snd_azf3328_timer(azf3328_t *chip, int device) | 1570 | snd_azf3328_timer(struct snd_azf3328 *chip, int device) |
1565 | { | 1571 | { |
1566 | snd_timer_t *timer = NULL; | 1572 | struct snd_timer *timer = NULL; |
1567 | snd_timer_id_t tid; | 1573 | struct snd_timer_id tid; |
1568 | int err; | 1574 | int err; |
1569 | 1575 | ||
1570 | snd_azf3328_dbgcallenter(); | 1576 | snd_azf3328_dbgcallenter(); |
@@ -1617,7 +1623,7 @@ snd_azf3328_test_bit(unsigned int reg, int bit) | |||
1617 | #endif | 1623 | #endif |
1618 | 1624 | ||
1619 | static void | 1625 | static void |
1620 | snd_azf3328_debug_show_ports(const azf3328_t *chip) | 1626 | snd_azf3328_debug_show_ports(const struct snd_azf3328 *chip) |
1621 | { | 1627 | { |
1622 | #if DEBUG_MISC | 1628 | #if DEBUG_MISC |
1623 | u16 tmp; | 1629 | u16 tmp; |
@@ -1635,14 +1641,14 @@ snd_azf3328_debug_show_ports(const azf3328_t *chip) | |||
1635 | } | 1641 | } |
1636 | 1642 | ||
1637 | static int __devinit | 1643 | static int __devinit |
1638 | snd_azf3328_create(snd_card_t * card, | 1644 | snd_azf3328_create(struct snd_card *card, |
1639 | struct pci_dev *pci, | 1645 | struct pci_dev *pci, |
1640 | unsigned long device_type, | 1646 | unsigned long device_type, |
1641 | azf3328_t ** rchip) | 1647 | struct snd_azf3328 ** rchip) |
1642 | { | 1648 | { |
1643 | azf3328_t *chip; | 1649 | struct snd_azf3328 *chip; |
1644 | int err; | 1650 | int err; |
1645 | static snd_device_ops_t ops = { | 1651 | static struct snd_device_ops ops = { |
1646 | .dev_free = snd_azf3328_dev_free, | 1652 | .dev_free = snd_azf3328_dev_free, |
1647 | }; | 1653 | }; |
1648 | u16 tmp; | 1654 | u16 tmp; |
@@ -1735,9 +1741,9 @@ static int __devinit | |||
1735 | snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | 1741 | snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) |
1736 | { | 1742 | { |
1737 | static int dev; | 1743 | static int dev; |
1738 | snd_card_t *card; | 1744 | struct snd_card *card; |
1739 | azf3328_t *chip; | 1745 | struct snd_azf3328 *chip; |
1740 | opl3_t *opl3; | 1746 | struct snd_opl3 *opl3; |
1741 | int err; | 1747 | int err; |
1742 | 1748 | ||
1743 | snd_azf3328_dbgcallenter(); | 1749 | snd_azf3328_dbgcallenter(); |