aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/azt3328.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 09:02:42 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:19:24 -0500
commit95de77660bb54e603d32f2ce342ae16e6de1b2d4 (patch)
tree7e13ede45010d0778dfce2747464a0baf02f5d6d /sound/pci/azt3328.c
parent74ee4ff1e62d9798361763f152c6f07d491be819 (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/azt3328.c')
-rw-r--r--sound/pci/azt3328.c216
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;
186module_param(seqtimer_scaling, int, 0444); 186module_param(seqtimer_scaling, int, 0444);
187MODULE_PARM_DESC(seqtimer_scaling, "Set 1024000Hz sequencer timer scale factor (lockup danger!). Default 128."); 187MODULE_PARM_DESC(seqtimer_scaling, "Set 1024000Hz sequencer timer scale factor (lockup danger!). Default 128.");
188 188
189typedef struct _snd_azf3328 { 189struct 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
218static const struct pci_device_id snd_azf3328_ids[] = { 218static 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[] = {
224MODULE_DEVICE_TABLE(pci, snd_azf3328_ids); 224MODULE_DEVICE_TABLE(pci, snd_azf3328_ids);
225 225
226static inline void 226static inline void
227snd_azf3328_codec_outb(const azf3328_t *chip, int reg, u8 value) 227snd_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
232static inline u8 232static inline u8
233snd_azf3328_codec_inb(const azf3328_t *chip, int reg) 233snd_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
238static inline void 238static inline void
239snd_azf3328_codec_outw(const azf3328_t *chip, int reg, u16 value) 239snd_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
244static inline u16 244static inline u16
245snd_azf3328_codec_inw(const azf3328_t *chip, int reg) 245snd_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
250static inline void 250static inline void
251snd_azf3328_codec_outl(const azf3328_t *chip, int reg, u32 value) 251snd_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
256static inline void 256static inline void
257snd_azf3328_io2_outb(const azf3328_t *chip, int reg, u8 value) 257snd_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
262static inline u8 262static inline u8
263snd_azf3328_io2_inb(const azf3328_t *chip, int reg) 263snd_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
268static inline void 268static inline void
269snd_azf3328_mixer_outw(const azf3328_t *chip, int reg, u16 value) 269snd_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
274static inline u16 274static inline u16
275snd_azf3328_mixer_inw(const azf3328_t *chip, int reg) 275snd_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
280static void 280static void
281snd_azf3328_mixer_set_mute(const azf3328_t *chip, int reg, int do_mute) 281snd_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
296static void 296static void
297snd_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) 297snd_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 */
356typedef struct azf3328_mixer_reg { 356struct 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
372static void snd_azf3328_mixer_reg_decode(azf3328_mixer_reg_t *r, unsigned long val) 372static 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
422static int 422static int
423snd_azf3328_info_mixer(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 423snd_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(&reg, kcontrol->private_value); 429 snd_azf3328_mixer_reg_decode(&reg, 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
438static int 439static int
439snd_azf3328_get_mixer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 440snd_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
468static int 470static int
469snd_azf3328_put_mixer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 471snd_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
508static int 511static int
509snd_azf3328_info_mixer_enum(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 512snd_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(&reg, kcontrol->private_value); 527 snd_azf3328_mixer_reg_decode(&reg, 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
542static int 546static int
543snd_azf3328_get_mixer_enum(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 547snd_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(&reg, kcontrol->private_value); 554 snd_azf3328_mixer_reg_decode(&reg, 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
565static int 570static int
566snd_azf3328_put_mixer_enum(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 571snd_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(&reg, kcontrol->private_value); 578 snd_azf3328_mixer_reg_decode(&reg, 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
597static const snd_kcontrol_new_t snd_azf3328_mixer_controls[] __devinitdata = { 603static 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
668static int __devinit 674static int __devinit
669snd_azf3328_mixer_new(azf3328_t *chip) 675snd_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
704static int 710static int
705snd_azf3328_hw_params(snd_pcm_substream_t * substream, 711snd_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
715static int 721static int
716snd_azf3328_hw_free(snd_pcm_substream_t * substream) 722snd_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
724static void 730static void
725snd_azf3328_setfmt(azf3328_t *chip, 731snd_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
798static void 804static void
799snd_azf3328_setdmaa(azf3328_t *chip, 805snd_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
844static int 850static int
845snd_azf3328_playback_prepare(snd_pcm_substream_t *substream) 851snd_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
866static int 872static int
867snd_azf3328_capture_prepare(snd_pcm_substream_t * substream) 873snd_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
888static int 894static int
889snd_azf3328_playback_trigger(snd_pcm_substream_t * substream, int cmd) 895snd_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 */
1000static int 1006static int
1001snd_azf3328_capture_trigger(snd_pcm_substream_t * substream, int cmd) 1007snd_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
1098static snd_pcm_uframes_t 1104static snd_pcm_uframes_t
1099snd_azf3328_playback_pointer(snd_pcm_substream_t * substream) 1105snd_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
1119static snd_pcm_uframes_t 1125static snd_pcm_uframes_t
1120snd_azf3328_capture_pointer(snd_pcm_substream_t * substream) 1126snd_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)
1140static irqreturn_t 1146static irqreturn_t
1141snd_azf3328_interrupt(int irq, void *dev_id, struct pt_regs *regs) 1147snd_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
1226static const snd_pcm_hardware_t snd_azf3328_playback = 1232static 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
1254static const snd_pcm_hardware_t snd_azf3328_capture = 1260static 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 =
1280static unsigned int snd_azf3328_fixed_rates[] = { 1286static 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 };
1283static snd_pcm_hw_constraint_list_t snd_azf3328_hw_constraints_rates = { 1289static 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
1291static int 1297static int
1292snd_azf3328_playback_open(snd_pcm_substream_t * substream) 1298snd_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
1306static int 1312static int
1307snd_azf3328_capture_open(snd_pcm_substream_t * substream) 1313snd_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
1321static int 1327static int
1322snd_azf3328_playback_close(snd_pcm_substream_t * substream) 1328snd_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
1333static int 1339static int
1334snd_azf3328_capture_close(snd_pcm_substream_t * substream) 1340snd_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
1346static snd_pcm_ops_t snd_azf3328_playback_ops = { 1352static 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
1357static snd_pcm_ops_t snd_azf3328_capture_ops = { 1363static 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
1368static int __devinit 1374static int __devinit
1369snd_azf3328_pcm(azf3328_t *chip, int device) 1375snd_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
1395static int __devinit 1401static int __devinit
1396snd_azf3328_config_joystick(azf3328_t *chip, int dev) 1402snd_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
1430static void 1436static void
1431snd_azf3328_free_joystick(azf3328_t *chip) 1437snd_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
1445static inline int 1451static inline int
1446snd_azf3328_config_joystick(azf3328_t *chip, int dev) { return -ENOSYS; } 1452snd_azf3328_config_joystick(struct snd_azf3328 *chip, int dev) { return -ENOSYS; }
1447static inline void 1453static inline void
1448snd_azf3328_free_joystick(azf3328_t *chip) { } 1454snd_azf3328_free_joystick(struct snd_azf3328 *chip) { }
1449#endif 1455#endif
1450 1456
1451/******************************************************************/ 1457/******************************************************************/
1452 1458
1453static int 1459static int
1454snd_azf3328_free(azf3328_t *chip) 1460snd_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
1479static int 1485static int
1480snd_azf3328_dev_free(snd_device_t *device) 1486snd_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
1497static int 1503static int
1498snd_azf3328_timer_start(snd_timer_t *timer) 1504snd_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
1525static int 1531static int
1526snd_azf3328_timer_stop(snd_timer_t *timer) 1532snd_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
1543static int 1549static int
1544snd_azf3328_timer_precise_resolution(snd_timer_t *timer, 1550snd_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
1554static struct _snd_timer_hardware snd_azf3328_timer_hw = { 1560static 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
1563static int __devinit 1569static int __devinit
1564snd_azf3328_timer(azf3328_t *chip, int device) 1570snd_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
1619static void 1625static void
1620snd_azf3328_debug_show_ports(const azf3328_t *chip) 1626snd_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
1637static int __devinit 1643static int __devinit
1638snd_azf3328_create(snd_card_t * card, 1644snd_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
1735snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) 1741snd_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();