diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 08:55:40 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:19:01 -0500 |
commit | e4a3d145455159955d6ac1df976b2ed2a135b858 (patch) | |
tree | 71a0a4f0a71d07d153d32d88430f21ac4efcdde7 /sound/pci/ca0106/ca0106_main.c | |
parent | 2fd16874aa6322e8b61879a78f3b485999506833 (diff) |
[ALSA] Remove xxx_t typedefs: PCI CA0106
Modules: CA0106 driver
Remove xxx_t typedefs from the PCI CA0106 driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ca0106/ca0106_main.c')
-rw-r--r-- | sound/pci/ca0106/ca0106_main.c | 234 |
1 files changed, 118 insertions, 116 deletions
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 0120c4683c79..744f97183723 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -164,7 +164,7 @@ MODULE_PARM_DESC(enable, "Enable the CA0106 soundcard."); | |||
164 | 164 | ||
165 | #include "ca0106.h" | 165 | #include "ca0106.h" |
166 | 166 | ||
167 | static ca0106_details_t ca0106_chip_details[] = { | 167 | static struct snd_ca0106_details ca0106_chip_details[] = { |
168 | /* AudigyLS[SB0310] */ | 168 | /* AudigyLS[SB0310] */ |
169 | { .serial = 0x10021102, | 169 | { .serial = 0x10021102, |
170 | .name = "AudigyLS [SB0310]", | 170 | .name = "AudigyLS [SB0310]", |
@@ -201,7 +201,7 @@ static ca0106_details_t ca0106_chip_details[] = { | |||
201 | }; | 201 | }; |
202 | 202 | ||
203 | /* hardware definition */ | 203 | /* hardware definition */ |
204 | static snd_pcm_hardware_t snd_ca0106_playback_hw = { | 204 | static struct snd_pcm_hardware snd_ca0106_playback_hw = { |
205 | .info = (SNDRV_PCM_INFO_MMAP | | 205 | .info = (SNDRV_PCM_INFO_MMAP | |
206 | SNDRV_PCM_INFO_INTERLEAVED | | 206 | SNDRV_PCM_INFO_INTERLEAVED | |
207 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 207 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
@@ -221,7 +221,7 @@ static snd_pcm_hardware_t snd_ca0106_playback_hw = { | |||
221 | .fifo_size = 0, | 221 | .fifo_size = 0, |
222 | }; | 222 | }; |
223 | 223 | ||
224 | static snd_pcm_hardware_t snd_ca0106_capture_hw = { | 224 | static struct snd_pcm_hardware snd_ca0106_capture_hw = { |
225 | .info = (SNDRV_PCM_INFO_MMAP | | 225 | .info = (SNDRV_PCM_INFO_MMAP | |
226 | SNDRV_PCM_INFO_INTERLEAVED | | 226 | SNDRV_PCM_INFO_INTERLEAVED | |
227 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 227 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
@@ -241,7 +241,7 @@ static snd_pcm_hardware_t snd_ca0106_capture_hw = { | |||
241 | .fifo_size = 0, | 241 | .fifo_size = 0, |
242 | }; | 242 | }; |
243 | 243 | ||
244 | unsigned int snd_ca0106_ptr_read(ca0106_t * emu, | 244 | unsigned int snd_ca0106_ptr_read(struct snd_ca0106 * emu, |
245 | unsigned int reg, | 245 | unsigned int reg, |
246 | unsigned int chn) | 246 | unsigned int chn) |
247 | { | 247 | { |
@@ -257,7 +257,7 @@ unsigned int snd_ca0106_ptr_read(ca0106_t * emu, | |||
257 | return val; | 257 | return val; |
258 | } | 258 | } |
259 | 259 | ||
260 | void snd_ca0106_ptr_write(ca0106_t *emu, | 260 | void snd_ca0106_ptr_write(struct snd_ca0106 *emu, |
261 | unsigned int reg, | 261 | unsigned int reg, |
262 | unsigned int chn, | 262 | unsigned int chn, |
263 | unsigned int data) | 263 | unsigned int data) |
@@ -273,7 +273,7 @@ void snd_ca0106_ptr_write(ca0106_t *emu, | |||
273 | spin_unlock_irqrestore(&emu->emu_lock, flags); | 273 | spin_unlock_irqrestore(&emu->emu_lock, flags); |
274 | } | 274 | } |
275 | 275 | ||
276 | int snd_ca0106_i2c_write(ca0106_t *emu, | 276 | int snd_ca0106_i2c_write(struct snd_ca0106 *emu, |
277 | u32 reg, | 277 | u32 reg, |
278 | u32 value) | 278 | u32 value) |
279 | { | 279 | { |
@@ -325,7 +325,7 @@ int snd_ca0106_i2c_write(ca0106_t *emu, | |||
325 | } | 325 | } |
326 | 326 | ||
327 | 327 | ||
328 | static void snd_ca0106_intr_enable(ca0106_t *emu, unsigned int intrenb) | 328 | static void snd_ca0106_intr_enable(struct snd_ca0106 *emu, unsigned int intrenb) |
329 | { | 329 | { |
330 | unsigned long flags; | 330 | unsigned long flags; |
331 | unsigned int enable; | 331 | unsigned int enable; |
@@ -336,7 +336,7 @@ static void snd_ca0106_intr_enable(ca0106_t *emu, unsigned int intrenb) | |||
336 | spin_unlock_irqrestore(&emu->emu_lock, flags); | 336 | spin_unlock_irqrestore(&emu->emu_lock, flags); |
337 | } | 337 | } |
338 | 338 | ||
339 | static void snd_ca0106_intr_disable(ca0106_t *emu, unsigned int intrenb) | 339 | static void snd_ca0106_intr_disable(struct snd_ca0106 *emu, unsigned int intrenb) |
340 | { | 340 | { |
341 | unsigned long flags; | 341 | unsigned long flags; |
342 | unsigned int enable; | 342 | unsigned int enable; |
@@ -348,18 +348,19 @@ static void snd_ca0106_intr_disable(ca0106_t *emu, unsigned int intrenb) | |||
348 | } | 348 | } |
349 | 349 | ||
350 | 350 | ||
351 | static void snd_ca0106_pcm_free_substream(snd_pcm_runtime_t *runtime) | 351 | static void snd_ca0106_pcm_free_substream(struct snd_pcm_runtime *runtime) |
352 | { | 352 | { |
353 | kfree(runtime->private_data); | 353 | kfree(runtime->private_data); |
354 | } | 354 | } |
355 | 355 | ||
356 | /* open_playback callback */ | 356 | /* open_playback callback */ |
357 | static int snd_ca0106_pcm_open_playback_channel(snd_pcm_substream_t *substream, int channel_id) | 357 | static int snd_ca0106_pcm_open_playback_channel(struct snd_pcm_substream *substream, |
358 | int channel_id) | ||
358 | { | 359 | { |
359 | ca0106_t *chip = snd_pcm_substream_chip(substream); | 360 | struct snd_ca0106 *chip = snd_pcm_substream_chip(substream); |
360 | ca0106_channel_t *channel = &(chip->playback_channels[channel_id]); | 361 | struct snd_ca0106_channel *channel = &(chip->playback_channels[channel_id]); |
361 | ca0106_pcm_t *epcm; | 362 | struct snd_ca0106_pcm *epcm; |
362 | snd_pcm_runtime_t *runtime = substream->runtime; | 363 | struct snd_pcm_runtime *runtime = substream->runtime; |
363 | int err; | 364 | int err; |
364 | 365 | ||
365 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); | 366 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); |
@@ -390,43 +391,44 @@ static int snd_ca0106_pcm_open_playback_channel(snd_pcm_substream_t *substream, | |||
390 | } | 391 | } |
391 | 392 | ||
392 | /* close callback */ | 393 | /* close callback */ |
393 | static int snd_ca0106_pcm_close_playback(snd_pcm_substream_t *substream) | 394 | static int snd_ca0106_pcm_close_playback(struct snd_pcm_substream *substream) |
394 | { | 395 | { |
395 | ca0106_t *chip = snd_pcm_substream_chip(substream); | 396 | struct snd_ca0106 *chip = snd_pcm_substream_chip(substream); |
396 | snd_pcm_runtime_t *runtime = substream->runtime; | 397 | struct snd_pcm_runtime *runtime = substream->runtime; |
397 | ca0106_pcm_t *epcm = runtime->private_data; | 398 | struct snd_ca0106_pcm *epcm = runtime->private_data; |
398 | chip->playback_channels[epcm->channel_id].use=0; | 399 | chip->playback_channels[epcm->channel_id].use = 0; |
399 | /* FIXME: maybe zero others */ | 400 | /* FIXME: maybe zero others */ |
400 | return 0; | 401 | return 0; |
401 | } | 402 | } |
402 | 403 | ||
403 | static int snd_ca0106_pcm_open_playback_front(snd_pcm_substream_t *substream) | 404 | static int snd_ca0106_pcm_open_playback_front(struct snd_pcm_substream *substream) |
404 | { | 405 | { |
405 | return snd_ca0106_pcm_open_playback_channel(substream, PCM_FRONT_CHANNEL); | 406 | return snd_ca0106_pcm_open_playback_channel(substream, PCM_FRONT_CHANNEL); |
406 | } | 407 | } |
407 | 408 | ||
408 | static int snd_ca0106_pcm_open_playback_center_lfe(snd_pcm_substream_t *substream) | 409 | static int snd_ca0106_pcm_open_playback_center_lfe(struct snd_pcm_substream *substream) |
409 | { | 410 | { |
410 | return snd_ca0106_pcm_open_playback_channel(substream, PCM_CENTER_LFE_CHANNEL); | 411 | return snd_ca0106_pcm_open_playback_channel(substream, PCM_CENTER_LFE_CHANNEL); |
411 | } | 412 | } |
412 | 413 | ||
413 | static int snd_ca0106_pcm_open_playback_unknown(snd_pcm_substream_t *substream) | 414 | static int snd_ca0106_pcm_open_playback_unknown(struct snd_pcm_substream *substream) |
414 | { | 415 | { |
415 | return snd_ca0106_pcm_open_playback_channel(substream, PCM_UNKNOWN_CHANNEL); | 416 | return snd_ca0106_pcm_open_playback_channel(substream, PCM_UNKNOWN_CHANNEL); |
416 | } | 417 | } |
417 | 418 | ||
418 | static int snd_ca0106_pcm_open_playback_rear(snd_pcm_substream_t *substream) | 419 | static int snd_ca0106_pcm_open_playback_rear(struct snd_pcm_substream *substream) |
419 | { | 420 | { |
420 | return snd_ca0106_pcm_open_playback_channel(substream, PCM_REAR_CHANNEL); | 421 | return snd_ca0106_pcm_open_playback_channel(substream, PCM_REAR_CHANNEL); |
421 | } | 422 | } |
422 | 423 | ||
423 | /* open_capture callback */ | 424 | /* open_capture callback */ |
424 | static int snd_ca0106_pcm_open_capture_channel(snd_pcm_substream_t *substream, int channel_id) | 425 | static int snd_ca0106_pcm_open_capture_channel(struct snd_pcm_substream *substream, |
426 | int channel_id) | ||
425 | { | 427 | { |
426 | ca0106_t *chip = snd_pcm_substream_chip(substream); | 428 | struct snd_ca0106 *chip = snd_pcm_substream_chip(substream); |
427 | ca0106_channel_t *channel = &(chip->capture_channels[channel_id]); | 429 | struct snd_ca0106_channel *channel = &(chip->capture_channels[channel_id]); |
428 | ca0106_pcm_t *epcm; | 430 | struct snd_ca0106_pcm *epcm; |
429 | snd_pcm_runtime_t *runtime = substream->runtime; | 431 | struct snd_pcm_runtime *runtime = substream->runtime; |
430 | int err; | 432 | int err; |
431 | 433 | ||
432 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); | 434 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); |
@@ -449,7 +451,7 @@ static int snd_ca0106_pcm_open_capture_channel(snd_pcm_substream_t *substream, i | |||
449 | channel->use = 1; | 451 | channel->use = 1; |
450 | //printk("open:channel_id=%d, chip=%p, channel=%p\n",channel_id, chip, channel); | 452 | //printk("open:channel_id=%d, chip=%p, channel=%p\n",channel_id, chip, channel); |
451 | //channel->interrupt = snd_ca0106_pcm_channel_interrupt; | 453 | //channel->interrupt = snd_ca0106_pcm_channel_interrupt; |
452 | channel->epcm = epcm; | 454 | channel->epcm = epcm; |
453 | if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) | 455 | if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) |
454 | return err; | 456 | return err; |
455 | //snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_capture_period_sizes); | 457 | //snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_capture_period_sizes); |
@@ -459,70 +461,70 @@ static int snd_ca0106_pcm_open_capture_channel(snd_pcm_substream_t *substream, i | |||
459 | } | 461 | } |
460 | 462 | ||
461 | /* close callback */ | 463 | /* close callback */ |
462 | static int snd_ca0106_pcm_close_capture(snd_pcm_substream_t *substream) | 464 | static int snd_ca0106_pcm_close_capture(struct snd_pcm_substream *substream) |
463 | { | 465 | { |
464 | ca0106_t *chip = snd_pcm_substream_chip(substream); | 466 | struct snd_ca0106 *chip = snd_pcm_substream_chip(substream); |
465 | snd_pcm_runtime_t *runtime = substream->runtime; | 467 | struct snd_pcm_runtime *runtime = substream->runtime; |
466 | ca0106_pcm_t *epcm = runtime->private_data; | 468 | struct snd_ca0106_pcm *epcm = runtime->private_data; |
467 | chip->capture_channels[epcm->channel_id].use=0; | 469 | chip->capture_channels[epcm->channel_id].use = 0; |
468 | /* FIXME: maybe zero others */ | 470 | /* FIXME: maybe zero others */ |
469 | return 0; | 471 | return 0; |
470 | } | 472 | } |
471 | 473 | ||
472 | static int snd_ca0106_pcm_open_0_capture(snd_pcm_substream_t *substream) | 474 | static int snd_ca0106_pcm_open_0_capture(struct snd_pcm_substream *substream) |
473 | { | 475 | { |
474 | return snd_ca0106_pcm_open_capture_channel(substream, 0); | 476 | return snd_ca0106_pcm_open_capture_channel(substream, 0); |
475 | } | 477 | } |
476 | 478 | ||
477 | static int snd_ca0106_pcm_open_1_capture(snd_pcm_substream_t *substream) | 479 | static int snd_ca0106_pcm_open_1_capture(struct snd_pcm_substream *substream) |
478 | { | 480 | { |
479 | return snd_ca0106_pcm_open_capture_channel(substream, 1); | 481 | return snd_ca0106_pcm_open_capture_channel(substream, 1); |
480 | } | 482 | } |
481 | 483 | ||
482 | static int snd_ca0106_pcm_open_2_capture(snd_pcm_substream_t *substream) | 484 | static int snd_ca0106_pcm_open_2_capture(struct snd_pcm_substream *substream) |
483 | { | 485 | { |
484 | return snd_ca0106_pcm_open_capture_channel(substream, 2); | 486 | return snd_ca0106_pcm_open_capture_channel(substream, 2); |
485 | } | 487 | } |
486 | 488 | ||
487 | static int snd_ca0106_pcm_open_3_capture(snd_pcm_substream_t *substream) | 489 | static int snd_ca0106_pcm_open_3_capture(struct snd_pcm_substream *substream) |
488 | { | 490 | { |
489 | return snd_ca0106_pcm_open_capture_channel(substream, 3); | 491 | return snd_ca0106_pcm_open_capture_channel(substream, 3); |
490 | } | 492 | } |
491 | 493 | ||
492 | /* hw_params callback */ | 494 | /* hw_params callback */ |
493 | static int snd_ca0106_pcm_hw_params_playback(snd_pcm_substream_t *substream, | 495 | static int snd_ca0106_pcm_hw_params_playback(struct snd_pcm_substream *substream, |
494 | snd_pcm_hw_params_t * hw_params) | 496 | struct snd_pcm_hw_params *hw_params) |
495 | { | 497 | { |
496 | return snd_pcm_lib_malloc_pages(substream, | 498 | return snd_pcm_lib_malloc_pages(substream, |
497 | params_buffer_bytes(hw_params)); | 499 | params_buffer_bytes(hw_params)); |
498 | } | 500 | } |
499 | 501 | ||
500 | /* hw_free callback */ | 502 | /* hw_free callback */ |
501 | static int snd_ca0106_pcm_hw_free_playback(snd_pcm_substream_t *substream) | 503 | static int snd_ca0106_pcm_hw_free_playback(struct snd_pcm_substream *substream) |
502 | { | 504 | { |
503 | return snd_pcm_lib_free_pages(substream); | 505 | return snd_pcm_lib_free_pages(substream); |
504 | } | 506 | } |
505 | 507 | ||
506 | /* hw_params callback */ | 508 | /* hw_params callback */ |
507 | static int snd_ca0106_pcm_hw_params_capture(snd_pcm_substream_t *substream, | 509 | static int snd_ca0106_pcm_hw_params_capture(struct snd_pcm_substream *substream, |
508 | snd_pcm_hw_params_t * hw_params) | 510 | struct snd_pcm_hw_params *hw_params) |
509 | { | 511 | { |
510 | return snd_pcm_lib_malloc_pages(substream, | 512 | return snd_pcm_lib_malloc_pages(substream, |
511 | params_buffer_bytes(hw_params)); | 513 | params_buffer_bytes(hw_params)); |
512 | } | 514 | } |
513 | 515 | ||
514 | /* hw_free callback */ | 516 | /* hw_free callback */ |
515 | static int snd_ca0106_pcm_hw_free_capture(snd_pcm_substream_t *substream) | 517 | static int snd_ca0106_pcm_hw_free_capture(struct snd_pcm_substream *substream) |
516 | { | 518 | { |
517 | return snd_pcm_lib_free_pages(substream); | 519 | return snd_pcm_lib_free_pages(substream); |
518 | } | 520 | } |
519 | 521 | ||
520 | /* prepare playback callback */ | 522 | /* prepare playback callback */ |
521 | static int snd_ca0106_pcm_prepare_playback(snd_pcm_substream_t *substream) | 523 | static int snd_ca0106_pcm_prepare_playback(struct snd_pcm_substream *substream) |
522 | { | 524 | { |
523 | ca0106_t *emu = snd_pcm_substream_chip(substream); | 525 | struct snd_ca0106 *emu = snd_pcm_substream_chip(substream); |
524 | snd_pcm_runtime_t *runtime = substream->runtime; | 526 | struct snd_pcm_runtime *runtime = substream->runtime; |
525 | ca0106_pcm_t *epcm = runtime->private_data; | 527 | struct snd_ca0106_pcm *epcm = runtime->private_data; |
526 | int channel = epcm->channel_id; | 528 | int channel = epcm->channel_id; |
527 | u32 *table_base = (u32 *)(emu->buffer.area+(8*16*channel)); | 529 | u32 *table_base = (u32 *)(emu->buffer.area+(8*16*channel)); |
528 | u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size); | 530 | u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size); |
@@ -619,11 +621,11 @@ static int snd_ca0106_pcm_prepare_playback(snd_pcm_substream_t *substream) | |||
619 | } | 621 | } |
620 | 622 | ||
621 | /* prepare capture callback */ | 623 | /* prepare capture callback */ |
622 | static int snd_ca0106_pcm_prepare_capture(snd_pcm_substream_t *substream) | 624 | static int snd_ca0106_pcm_prepare_capture(struct snd_pcm_substream *substream) |
623 | { | 625 | { |
624 | ca0106_t *emu = snd_pcm_substream_chip(substream); | 626 | struct snd_ca0106 *emu = snd_pcm_substream_chip(substream); |
625 | snd_pcm_runtime_t *runtime = substream->runtime; | 627 | struct snd_pcm_runtime *runtime = substream->runtime; |
626 | ca0106_pcm_t *epcm = runtime->private_data; | 628 | struct snd_ca0106_pcm *epcm = runtime->private_data; |
627 | int channel = epcm->channel_id; | 629 | int channel = epcm->channel_id; |
628 | u32 hcfg_mask = HCFG_CAPTURE_S32_LE; | 630 | u32 hcfg_mask = HCFG_CAPTURE_S32_LE; |
629 | u32 hcfg_set = 0x00000000; | 631 | u32 hcfg_set = 0x00000000; |
@@ -690,16 +692,16 @@ static int snd_ca0106_pcm_prepare_capture(snd_pcm_substream_t *substream) | |||
690 | } | 692 | } |
691 | 693 | ||
692 | /* trigger_playback callback */ | 694 | /* trigger_playback callback */ |
693 | static int snd_ca0106_pcm_trigger_playback(snd_pcm_substream_t *substream, | 695 | static int snd_ca0106_pcm_trigger_playback(struct snd_pcm_substream *substream, |
694 | int cmd) | 696 | int cmd) |
695 | { | 697 | { |
696 | ca0106_t *emu = snd_pcm_substream_chip(substream); | 698 | struct snd_ca0106 *emu = snd_pcm_substream_chip(substream); |
697 | snd_pcm_runtime_t *runtime; | 699 | struct snd_pcm_runtime *runtime; |
698 | ca0106_pcm_t *epcm; | 700 | struct snd_ca0106_pcm *epcm; |
699 | int channel; | 701 | int channel; |
700 | int result = 0; | 702 | int result = 0; |
701 | struct list_head *pos; | 703 | struct list_head *pos; |
702 | snd_pcm_substream_t *s; | 704 | struct snd_pcm_substream *s; |
703 | u32 basic = 0; | 705 | u32 basic = 0; |
704 | u32 extended = 0; | 706 | u32 extended = 0; |
705 | int running=0; | 707 | int running=0; |
@@ -743,12 +745,12 @@ static int snd_ca0106_pcm_trigger_playback(snd_pcm_substream_t *substream, | |||
743 | } | 745 | } |
744 | 746 | ||
745 | /* trigger_capture callback */ | 747 | /* trigger_capture callback */ |
746 | static int snd_ca0106_pcm_trigger_capture(snd_pcm_substream_t *substream, | 748 | static int snd_ca0106_pcm_trigger_capture(struct snd_pcm_substream *substream, |
747 | int cmd) | 749 | int cmd) |
748 | { | 750 | { |
749 | ca0106_t *emu = snd_pcm_substream_chip(substream); | 751 | struct snd_ca0106 *emu = snd_pcm_substream_chip(substream); |
750 | snd_pcm_runtime_t *runtime = substream->runtime; | 752 | struct snd_pcm_runtime *runtime = substream->runtime; |
751 | ca0106_pcm_t *epcm = runtime->private_data; | 753 | struct snd_ca0106_pcm *epcm = runtime->private_data; |
752 | int channel = epcm->channel_id; | 754 | int channel = epcm->channel_id; |
753 | int result = 0; | 755 | int result = 0; |
754 | 756 | ||
@@ -772,11 +774,11 @@ static int snd_ca0106_pcm_trigger_capture(snd_pcm_substream_t *substream, | |||
772 | 774 | ||
773 | /* pointer_playback callback */ | 775 | /* pointer_playback callback */ |
774 | static snd_pcm_uframes_t | 776 | static snd_pcm_uframes_t |
775 | snd_ca0106_pcm_pointer_playback(snd_pcm_substream_t *substream) | 777 | snd_ca0106_pcm_pointer_playback(struct snd_pcm_substream *substream) |
776 | { | 778 | { |
777 | ca0106_t *emu = snd_pcm_substream_chip(substream); | 779 | struct snd_ca0106 *emu = snd_pcm_substream_chip(substream); |
778 | snd_pcm_runtime_t *runtime = substream->runtime; | 780 | struct snd_pcm_runtime *runtime = substream->runtime; |
779 | ca0106_pcm_t *epcm = runtime->private_data; | 781 | struct snd_ca0106_pcm *epcm = runtime->private_data; |
780 | snd_pcm_uframes_t ptr, ptr1, ptr2,ptr3,ptr4 = 0; | 782 | snd_pcm_uframes_t ptr, ptr1, ptr2,ptr3,ptr4 = 0; |
781 | int channel = epcm->channel_id; | 783 | int channel = epcm->channel_id; |
782 | 784 | ||
@@ -799,11 +801,11 @@ snd_ca0106_pcm_pointer_playback(snd_pcm_substream_t *substream) | |||
799 | 801 | ||
800 | /* pointer_capture callback */ | 802 | /* pointer_capture callback */ |
801 | static snd_pcm_uframes_t | 803 | static snd_pcm_uframes_t |
802 | snd_ca0106_pcm_pointer_capture(snd_pcm_substream_t *substream) | 804 | snd_ca0106_pcm_pointer_capture(struct snd_pcm_substream *substream) |
803 | { | 805 | { |
804 | ca0106_t *emu = snd_pcm_substream_chip(substream); | 806 | struct snd_ca0106 *emu = snd_pcm_substream_chip(substream); |
805 | snd_pcm_runtime_t *runtime = substream->runtime; | 807 | struct snd_pcm_runtime *runtime = substream->runtime; |
806 | ca0106_pcm_t *epcm = runtime->private_data; | 808 | struct snd_ca0106_pcm *epcm = runtime->private_data; |
807 | snd_pcm_uframes_t ptr, ptr1, ptr2 = 0; | 809 | snd_pcm_uframes_t ptr, ptr1, ptr2 = 0; |
808 | int channel = channel=epcm->channel_id; | 810 | int channel = channel=epcm->channel_id; |
809 | 811 | ||
@@ -821,7 +823,7 @@ snd_ca0106_pcm_pointer_capture(snd_pcm_substream_t *substream) | |||
821 | } | 823 | } |
822 | 824 | ||
823 | /* operators */ | 825 | /* operators */ |
824 | static snd_pcm_ops_t snd_ca0106_playback_front_ops = { | 826 | static struct snd_pcm_ops snd_ca0106_playback_front_ops = { |
825 | .open = snd_ca0106_pcm_open_playback_front, | 827 | .open = snd_ca0106_pcm_open_playback_front, |
826 | .close = snd_ca0106_pcm_close_playback, | 828 | .close = snd_ca0106_pcm_close_playback, |
827 | .ioctl = snd_pcm_lib_ioctl, | 829 | .ioctl = snd_pcm_lib_ioctl, |
@@ -832,7 +834,7 @@ static snd_pcm_ops_t snd_ca0106_playback_front_ops = { | |||
832 | .pointer = snd_ca0106_pcm_pointer_playback, | 834 | .pointer = snd_ca0106_pcm_pointer_playback, |
833 | }; | 835 | }; |
834 | 836 | ||
835 | static snd_pcm_ops_t snd_ca0106_capture_0_ops = { | 837 | static struct snd_pcm_ops snd_ca0106_capture_0_ops = { |
836 | .open = snd_ca0106_pcm_open_0_capture, | 838 | .open = snd_ca0106_pcm_open_0_capture, |
837 | .close = snd_ca0106_pcm_close_capture, | 839 | .close = snd_ca0106_pcm_close_capture, |
838 | .ioctl = snd_pcm_lib_ioctl, | 840 | .ioctl = snd_pcm_lib_ioctl, |
@@ -843,7 +845,7 @@ static snd_pcm_ops_t snd_ca0106_capture_0_ops = { | |||
843 | .pointer = snd_ca0106_pcm_pointer_capture, | 845 | .pointer = snd_ca0106_pcm_pointer_capture, |
844 | }; | 846 | }; |
845 | 847 | ||
846 | static snd_pcm_ops_t snd_ca0106_capture_1_ops = { | 848 | static struct snd_pcm_ops snd_ca0106_capture_1_ops = { |
847 | .open = snd_ca0106_pcm_open_1_capture, | 849 | .open = snd_ca0106_pcm_open_1_capture, |
848 | .close = snd_ca0106_pcm_close_capture, | 850 | .close = snd_ca0106_pcm_close_capture, |
849 | .ioctl = snd_pcm_lib_ioctl, | 851 | .ioctl = snd_pcm_lib_ioctl, |
@@ -854,7 +856,7 @@ static snd_pcm_ops_t snd_ca0106_capture_1_ops = { | |||
854 | .pointer = snd_ca0106_pcm_pointer_capture, | 856 | .pointer = snd_ca0106_pcm_pointer_capture, |
855 | }; | 857 | }; |
856 | 858 | ||
857 | static snd_pcm_ops_t snd_ca0106_capture_2_ops = { | 859 | static struct snd_pcm_ops snd_ca0106_capture_2_ops = { |
858 | .open = snd_ca0106_pcm_open_2_capture, | 860 | .open = snd_ca0106_pcm_open_2_capture, |
859 | .close = snd_ca0106_pcm_close_capture, | 861 | .close = snd_ca0106_pcm_close_capture, |
860 | .ioctl = snd_pcm_lib_ioctl, | 862 | .ioctl = snd_pcm_lib_ioctl, |
@@ -865,7 +867,7 @@ static snd_pcm_ops_t snd_ca0106_capture_2_ops = { | |||
865 | .pointer = snd_ca0106_pcm_pointer_capture, | 867 | .pointer = snd_ca0106_pcm_pointer_capture, |
866 | }; | 868 | }; |
867 | 869 | ||
868 | static snd_pcm_ops_t snd_ca0106_capture_3_ops = { | 870 | static struct snd_pcm_ops snd_ca0106_capture_3_ops = { |
869 | .open = snd_ca0106_pcm_open_3_capture, | 871 | .open = snd_ca0106_pcm_open_3_capture, |
870 | .close = snd_ca0106_pcm_close_capture, | 872 | .close = snd_ca0106_pcm_close_capture, |
871 | .ioctl = snd_pcm_lib_ioctl, | 873 | .ioctl = snd_pcm_lib_ioctl, |
@@ -876,7 +878,7 @@ static snd_pcm_ops_t snd_ca0106_capture_3_ops = { | |||
876 | .pointer = snd_ca0106_pcm_pointer_capture, | 878 | .pointer = snd_ca0106_pcm_pointer_capture, |
877 | }; | 879 | }; |
878 | 880 | ||
879 | static snd_pcm_ops_t snd_ca0106_playback_center_lfe_ops = { | 881 | static struct snd_pcm_ops snd_ca0106_playback_center_lfe_ops = { |
880 | .open = snd_ca0106_pcm_open_playback_center_lfe, | 882 | .open = snd_ca0106_pcm_open_playback_center_lfe, |
881 | .close = snd_ca0106_pcm_close_playback, | 883 | .close = snd_ca0106_pcm_close_playback, |
882 | .ioctl = snd_pcm_lib_ioctl, | 884 | .ioctl = snd_pcm_lib_ioctl, |
@@ -887,7 +889,7 @@ static snd_pcm_ops_t snd_ca0106_playback_center_lfe_ops = { | |||
887 | .pointer = snd_ca0106_pcm_pointer_playback, | 889 | .pointer = snd_ca0106_pcm_pointer_playback, |
888 | }; | 890 | }; |
889 | 891 | ||
890 | static snd_pcm_ops_t snd_ca0106_playback_unknown_ops = { | 892 | static struct snd_pcm_ops snd_ca0106_playback_unknown_ops = { |
891 | .open = snd_ca0106_pcm_open_playback_unknown, | 893 | .open = snd_ca0106_pcm_open_playback_unknown, |
892 | .close = snd_ca0106_pcm_close_playback, | 894 | .close = snd_ca0106_pcm_close_playback, |
893 | .ioctl = snd_pcm_lib_ioctl, | 895 | .ioctl = snd_pcm_lib_ioctl, |
@@ -898,7 +900,7 @@ static snd_pcm_ops_t snd_ca0106_playback_unknown_ops = { | |||
898 | .pointer = snd_ca0106_pcm_pointer_playback, | 900 | .pointer = snd_ca0106_pcm_pointer_playback, |
899 | }; | 901 | }; |
900 | 902 | ||
901 | static snd_pcm_ops_t snd_ca0106_playback_rear_ops = { | 903 | static struct snd_pcm_ops snd_ca0106_playback_rear_ops = { |
902 | .open = snd_ca0106_pcm_open_playback_rear, | 904 | .open = snd_ca0106_pcm_open_playback_rear, |
903 | .close = snd_ca0106_pcm_close_playback, | 905 | .close = snd_ca0106_pcm_close_playback, |
904 | .ioctl = snd_pcm_lib_ioctl, | 906 | .ioctl = snd_pcm_lib_ioctl, |
@@ -910,10 +912,10 @@ static snd_pcm_ops_t snd_ca0106_playback_rear_ops = { | |||
910 | }; | 912 | }; |
911 | 913 | ||
912 | 914 | ||
913 | static unsigned short snd_ca0106_ac97_read(ac97_t *ac97, | 915 | static unsigned short snd_ca0106_ac97_read(struct snd_ac97 *ac97, |
914 | unsigned short reg) | 916 | unsigned short reg) |
915 | { | 917 | { |
916 | ca0106_t *emu = ac97->private_data; | 918 | struct snd_ca0106 *emu = ac97->private_data; |
917 | unsigned long flags; | 919 | unsigned long flags; |
918 | unsigned short val; | 920 | unsigned short val; |
919 | 921 | ||
@@ -924,10 +926,10 @@ static unsigned short snd_ca0106_ac97_read(ac97_t *ac97, | |||
924 | return val; | 926 | return val; |
925 | } | 927 | } |
926 | 928 | ||
927 | static void snd_ca0106_ac97_write(ac97_t *ac97, | 929 | static void snd_ca0106_ac97_write(struct snd_ac97 *ac97, |
928 | unsigned short reg, unsigned short val) | 930 | unsigned short reg, unsigned short val) |
929 | { | 931 | { |
930 | ca0106_t *emu = ac97->private_data; | 932 | struct snd_ca0106 *emu = ac97->private_data; |
931 | unsigned long flags; | 933 | unsigned long flags; |
932 | 934 | ||
933 | spin_lock_irqsave(&emu->emu_lock, flags); | 935 | spin_lock_irqsave(&emu->emu_lock, flags); |
@@ -936,12 +938,12 @@ static void snd_ca0106_ac97_write(ac97_t *ac97, | |||
936 | spin_unlock_irqrestore(&emu->emu_lock, flags); | 938 | spin_unlock_irqrestore(&emu->emu_lock, flags); |
937 | } | 939 | } |
938 | 940 | ||
939 | static int snd_ca0106_ac97(ca0106_t *chip) | 941 | static int snd_ca0106_ac97(struct snd_ca0106 *chip) |
940 | { | 942 | { |
941 | ac97_bus_t *pbus; | 943 | struct snd_ac97_bus *pbus; |
942 | ac97_template_t ac97; | 944 | struct snd_ac97_template ac97; |
943 | int err; | 945 | int err; |
944 | static ac97_bus_ops_t ops = { | 946 | static struct snd_ac97_bus_ops ops = { |
945 | .write = snd_ca0106_ac97_write, | 947 | .write = snd_ca0106_ac97_write, |
946 | .read = snd_ca0106_ac97_read, | 948 | .read = snd_ca0106_ac97_read, |
947 | }; | 949 | }; |
@@ -956,7 +958,7 @@ static int snd_ca0106_ac97(ca0106_t *chip) | |||
956 | return snd_ac97_mixer(pbus, &ac97, &chip->ac97); | 958 | return snd_ac97_mixer(pbus, &ac97, &chip->ac97); |
957 | } | 959 | } |
958 | 960 | ||
959 | static int snd_ca0106_free(ca0106_t *chip) | 961 | static int snd_ca0106_free(struct snd_ca0106 *chip) |
960 | { | 962 | { |
961 | if (chip->res_port != NULL) { /* avoid access to already used hardware */ | 963 | if (chip->res_port != NULL) { /* avoid access to already used hardware */ |
962 | // disable interrupts | 964 | // disable interrupts |
@@ -989,9 +991,9 @@ static int snd_ca0106_free(ca0106_t *chip) | |||
989 | return 0; | 991 | return 0; |
990 | } | 992 | } |
991 | 993 | ||
992 | static int snd_ca0106_dev_free(snd_device_t *device) | 994 | static int snd_ca0106_dev_free(struct snd_device *device) |
993 | { | 995 | { |
994 | ca0106_t *chip = device->device_data; | 996 | struct snd_ca0106 *chip = device->device_data; |
995 | return snd_ca0106_free(chip); | 997 | return snd_ca0106_free(chip); |
996 | } | 998 | } |
997 | 999 | ||
@@ -1000,14 +1002,13 @@ static irqreturn_t snd_ca0106_interrupt(int irq, void *dev_id, | |||
1000 | { | 1002 | { |
1001 | unsigned int status; | 1003 | unsigned int status; |
1002 | 1004 | ||
1003 | ca0106_t *chip = dev_id; | 1005 | struct snd_ca0106 *chip = dev_id; |
1004 | int i; | 1006 | int i; |
1005 | int mask; | 1007 | int mask; |
1006 | unsigned int stat76; | 1008 | unsigned int stat76; |
1007 | ca0106_channel_t *pchannel; | 1009 | struct snd_ca0106_channel *pchannel; |
1008 | 1010 | ||
1009 | status = inl(chip->port + IPR); | 1011 | status = inl(chip->port + IPR); |
1010 | |||
1011 | if (! status) | 1012 | if (! status) |
1012 | return IRQ_NONE; | 1013 | return IRQ_NONE; |
1013 | 1014 | ||
@@ -1059,10 +1060,10 @@ static irqreturn_t snd_ca0106_interrupt(int irq, void *dev_id, | |||
1059 | return IRQ_HANDLED; | 1060 | return IRQ_HANDLED; |
1060 | } | 1061 | } |
1061 | 1062 | ||
1062 | static int __devinit snd_ca0106_pcm(ca0106_t *emu, int device, snd_pcm_t **rpcm) | 1063 | static int __devinit snd_ca0106_pcm(struct snd_ca0106 *emu, int device, struct snd_pcm **rpcm) |
1063 | { | 1064 | { |
1064 | snd_pcm_t *pcm; | 1065 | struct snd_pcm *pcm; |
1065 | snd_pcm_substream_t *substream; | 1066 | struct snd_pcm_substream *substream; |
1066 | int err; | 1067 | int err; |
1067 | 1068 | ||
1068 | if (rpcm) | 1069 | if (rpcm) |
@@ -1122,15 +1123,15 @@ static int __devinit snd_ca0106_pcm(ca0106_t *emu, int device, snd_pcm_t **rpcm) | |||
1122 | return 0; | 1123 | return 0; |
1123 | } | 1124 | } |
1124 | 1125 | ||
1125 | static int __devinit snd_ca0106_create(snd_card_t *card, | 1126 | static int __devinit snd_ca0106_create(struct snd_card *card, |
1126 | struct pci_dev *pci, | 1127 | struct pci_dev *pci, |
1127 | ca0106_t **rchip) | 1128 | struct snd_ca0106 **rchip) |
1128 | { | 1129 | { |
1129 | ca0106_t *chip; | 1130 | struct snd_ca0106 *chip; |
1130 | ca0106_details_t *c; | 1131 | struct snd_ca0106_details *c; |
1131 | int err; | 1132 | int err; |
1132 | int ch; | 1133 | int ch; |
1133 | static snd_device_ops_t ops = { | 1134 | static struct snd_device_ops ops = { |
1134 | .dev_free = snd_ca0106_dev_free, | 1135 | .dev_free = snd_ca0106_dev_free, |
1135 | }; | 1136 | }; |
1136 | 1137 | ||
@@ -1314,39 +1315,40 @@ static int __devinit snd_ca0106_create(snd_card_t *card, | |||
1314 | } | 1315 | } |
1315 | 1316 | ||
1316 | 1317 | ||
1317 | static void ca0106_midi_interrupt_enable(ca_midi_t *midi, int intr) | 1318 | static void ca0106_midi_interrupt_enable(struct snd_ca_midi *midi, int intr) |
1318 | { | 1319 | { |
1319 | snd_ca0106_intr_enable((ca0106_t *)(midi->dev_id), intr); | 1320 | snd_ca0106_intr_enable((struct snd_ca0106 *)(midi->dev_id), intr); |
1320 | } | 1321 | } |
1321 | 1322 | ||
1322 | static void ca0106_midi_interrupt_disable(ca_midi_t *midi, int intr) | 1323 | static void ca0106_midi_interrupt_disable(struct snd_ca_midi *midi, int intr) |
1323 | { | 1324 | { |
1324 | snd_ca0106_intr_disable((ca0106_t *)(midi->dev_id), intr); | 1325 | snd_ca0106_intr_disable((struct snd_ca0106 *)(midi->dev_id), intr); |
1325 | } | 1326 | } |
1326 | 1327 | ||
1327 | static unsigned char ca0106_midi_read(ca_midi_t *midi, int idx) | 1328 | static unsigned char ca0106_midi_read(struct snd_ca_midi *midi, int idx) |
1328 | { | 1329 | { |
1329 | return (unsigned char)snd_ca0106_ptr_read((ca0106_t *)(midi->dev_id), midi->port + idx, 0); | 1330 | return (unsigned char)snd_ca0106_ptr_read((struct snd_ca0106 *)(midi->dev_id), |
1331 | midi->port + idx, 0); | ||
1330 | } | 1332 | } |
1331 | 1333 | ||
1332 | static void ca0106_midi_write(ca_midi_t *midi, int data, int idx) | 1334 | static void ca0106_midi_write(struct snd_ca_midi *midi, int data, int idx) |
1333 | { | 1335 | { |
1334 | snd_ca0106_ptr_write((ca0106_t *)(midi->dev_id), midi->port + idx, 0, data); | 1336 | snd_ca0106_ptr_write((struct snd_ca0106 *)(midi->dev_id), midi->port + idx, 0, data); |
1335 | } | 1337 | } |
1336 | 1338 | ||
1337 | static snd_card_t *ca0106_dev_id_card(void *dev_id) | 1339 | static struct snd_card *ca0106_dev_id_card(void *dev_id) |
1338 | { | 1340 | { |
1339 | return ((ca0106_t *)dev_id)->card; | 1341 | return ((struct snd_ca0106 *)dev_id)->card; |
1340 | } | 1342 | } |
1341 | 1343 | ||
1342 | static int ca0106_dev_id_port(void *dev_id) | 1344 | static int ca0106_dev_id_port(void *dev_id) |
1343 | { | 1345 | { |
1344 | return ((ca0106_t *)dev_id)->port; | 1346 | return ((struct snd_ca0106 *)dev_id)->port; |
1345 | } | 1347 | } |
1346 | 1348 | ||
1347 | static int __devinit snd_ca0106_midi(ca0106_t *chip, unsigned int channel) | 1349 | static int __devinit snd_ca0106_midi(struct snd_ca0106 *chip, unsigned int channel) |
1348 | { | 1350 | { |
1349 | ca_midi_t *midi; | 1351 | struct snd_ca_midi *midi; |
1350 | char *name; | 1352 | char *name; |
1351 | int err; | 1353 | int err; |
1352 | 1354 | ||
@@ -1399,8 +1401,8 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci, | |||
1399 | const struct pci_device_id *pci_id) | 1401 | const struct pci_device_id *pci_id) |
1400 | { | 1402 | { |
1401 | static int dev; | 1403 | static int dev; |
1402 | snd_card_t *card; | 1404 | struct snd_card *card; |
1403 | ca0106_t *chip; | 1405 | struct snd_ca0106 *chip; |
1404 | int err; | 1406 | int err; |
1405 | 1407 | ||
1406 | if (dev >= SNDRV_CARDS) | 1408 | if (dev >= SNDRV_CARDS) |