diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 08:50:13 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:18:47 -0500 |
commit | eb4698f347ec908c365504c4edddadd1acd406ea (patch) | |
tree | 4962019c8bf4a52e35ab55137e17aa150edf9661 /sound/pci/emu10k1/emupcm.c | |
parent | 3d19f804ef5f1d15fe001fc8d1ed58fac9d591fb (diff) |
[ALSA] Remove xxx_t typedefs: PCI emu10k1
Modules: EMU10K1/EMU10K2 driver
Remove xxx_t typedefs from the PCI emu10k1 driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1/emupcm.c')
-rw-r--r-- | sound/pci/emu10k1/emupcm.c | 354 |
1 files changed, 179 insertions, 175 deletions
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c index 166f7c4d28c9..8e6caf581c0c 100644 --- a/sound/pci/emu10k1/emupcm.c +++ b/sound/pci/emu10k1/emupcm.c | |||
@@ -35,9 +35,10 @@ | |||
35 | #include <sound/core.h> | 35 | #include <sound/core.h> |
36 | #include <sound/emu10k1.h> | 36 | #include <sound/emu10k1.h> |
37 | 37 | ||
38 | static void snd_emu10k1_pcm_interrupt(emu10k1_t *emu, emu10k1_voice_t *voice) | 38 | static void snd_emu10k1_pcm_interrupt(struct snd_emu10k1 *emu, |
39 | struct snd_emu10k1_voice *voice) | ||
39 | { | 40 | { |
40 | emu10k1_pcm_t *epcm; | 41 | struct snd_emu10k1_pcm *epcm; |
41 | 42 | ||
42 | if ((epcm = voice->epcm) == NULL) | 43 | if ((epcm = voice->epcm) == NULL) |
43 | return; | 44 | return; |
@@ -52,7 +53,8 @@ static void snd_emu10k1_pcm_interrupt(emu10k1_t *emu, emu10k1_voice_t *voice) | |||
52 | snd_pcm_period_elapsed(epcm->substream); | 53 | snd_pcm_period_elapsed(epcm->substream); |
53 | } | 54 | } |
54 | 55 | ||
55 | static void snd_emu10k1_pcm_ac97adc_interrupt(emu10k1_t *emu, unsigned int status) | 56 | static void snd_emu10k1_pcm_ac97adc_interrupt(struct snd_emu10k1 *emu, |
57 | unsigned int status) | ||
56 | { | 58 | { |
57 | #if 0 | 59 | #if 0 |
58 | if (status & IPR_ADCBUFHALFFULL) { | 60 | if (status & IPR_ADCBUFHALFFULL) { |
@@ -63,7 +65,8 @@ static void snd_emu10k1_pcm_ac97adc_interrupt(emu10k1_t *emu, unsigned int statu | |||
63 | snd_pcm_period_elapsed(emu->pcm_capture_substream); | 65 | snd_pcm_period_elapsed(emu->pcm_capture_substream); |
64 | } | 66 | } |
65 | 67 | ||
66 | static void snd_emu10k1_pcm_ac97mic_interrupt(emu10k1_t *emu, unsigned int status) | 68 | static void snd_emu10k1_pcm_ac97mic_interrupt(struct snd_emu10k1 *emu, |
69 | unsigned int status) | ||
67 | { | 70 | { |
68 | #if 0 | 71 | #if 0 |
69 | if (status & IPR_MICBUFHALFFULL) { | 72 | if (status & IPR_MICBUFHALFFULL) { |
@@ -74,7 +77,8 @@ static void snd_emu10k1_pcm_ac97mic_interrupt(emu10k1_t *emu, unsigned int statu | |||
74 | snd_pcm_period_elapsed(emu->pcm_capture_mic_substream); | 77 | snd_pcm_period_elapsed(emu->pcm_capture_mic_substream); |
75 | } | 78 | } |
76 | 79 | ||
77 | static void snd_emu10k1_pcm_efx_interrupt(emu10k1_t *emu, unsigned int status) | 80 | static void snd_emu10k1_pcm_efx_interrupt(struct snd_emu10k1 *emu, |
81 | unsigned int status) | ||
78 | { | 82 | { |
79 | #if 0 | 83 | #if 0 |
80 | if (status & IPR_EFXBUFHALFFULL) { | 84 | if (status & IPR_EFXBUFHALFFULL) { |
@@ -85,11 +89,11 @@ static void snd_emu10k1_pcm_efx_interrupt(emu10k1_t *emu, unsigned int status) | |||
85 | snd_pcm_period_elapsed(emu->pcm_capture_efx_substream); | 89 | snd_pcm_period_elapsed(emu->pcm_capture_efx_substream); |
86 | } | 90 | } |
87 | 91 | ||
88 | static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(snd_pcm_substream_t * substream) | 92 | static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(struct snd_pcm_substream *substream) |
89 | { | 93 | { |
90 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 94 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
91 | snd_pcm_runtime_t *runtime = substream->runtime; | 95 | struct snd_pcm_runtime *runtime = substream->runtime; |
92 | emu10k1_pcm_t *epcm = runtime->private_data; | 96 | struct snd_emu10k1_pcm *epcm = runtime->private_data; |
93 | unsigned int ptr; | 97 | unsigned int ptr; |
94 | 98 | ||
95 | if (!epcm->running) | 99 | if (!epcm->running) |
@@ -102,7 +106,7 @@ static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(snd_pcm_substream_t * | |||
102 | return ptr; | 106 | return ptr; |
103 | } | 107 | } |
104 | 108 | ||
105 | static int snd_emu10k1_pcm_channel_alloc(emu10k1_pcm_t * epcm, int voices) | 109 | static int snd_emu10k1_pcm_channel_alloc(struct snd_emu10k1_pcm * epcm, int voices) |
106 | { | 110 | { |
107 | int err, i; | 111 | int err, i; |
108 | 112 | ||
@@ -167,7 +171,7 @@ static unsigned int capture_period_sizes[31] = { | |||
167 | 384*128,448*128,512*128 | 171 | 384*128,448*128,512*128 |
168 | }; | 172 | }; |
169 | 173 | ||
170 | static snd_pcm_hw_constraint_list_t hw_constraints_capture_period_sizes = { | 174 | static struct snd_pcm_hw_constraint_list hw_constraints_capture_period_sizes = { |
171 | .count = 31, | 175 | .count = 31, |
172 | .list = capture_period_sizes, | 176 | .list = capture_period_sizes, |
173 | .mask = 0 | 177 | .mask = 0 |
@@ -177,7 +181,7 @@ static unsigned int capture_rates[8] = { | |||
177 | 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000 | 181 | 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000 |
178 | }; | 182 | }; |
179 | 183 | ||
180 | static snd_pcm_hw_constraint_list_t hw_constraints_capture_rates = { | 184 | static struct snd_pcm_hw_constraint_list hw_constraints_capture_rates = { |
181 | .count = 8, | 185 | .count = 8, |
182 | .list = capture_rates, | 186 | .list = capture_rates, |
183 | .mask = 0 | 187 | .mask = 0 |
@@ -271,15 +275,15 @@ static inline int emu10k1_ccis(int stereo, int w_16) | |||
271 | } | 275 | } |
272 | } | 276 | } |
273 | 277 | ||
274 | static void snd_emu10k1_pcm_init_voice(emu10k1_t *emu, | 278 | static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu, |
275 | int master, int extra, | 279 | int master, int extra, |
276 | emu10k1_voice_t *evoice, | 280 | struct snd_emu10k1_voice *evoice, |
277 | unsigned int start_addr, | 281 | unsigned int start_addr, |
278 | unsigned int end_addr, | 282 | unsigned int end_addr, |
279 | emu10k1_pcm_mixer_t *mix) | 283 | struct snd_emu10k1_pcm_mixer *mix) |
280 | { | 284 | { |
281 | snd_pcm_substream_t *substream = evoice->epcm->substream; | 285 | struct snd_pcm_substream *substream = evoice->epcm->substream; |
282 | snd_pcm_runtime_t *runtime = substream->runtime; | 286 | struct snd_pcm_runtime *runtime = substream->runtime; |
283 | unsigned int silent_page, tmp; | 287 | unsigned int silent_page, tmp; |
284 | int voice, stereo, w_16; | 288 | int voice, stereo, w_16; |
285 | unsigned char attn, send_amount[8]; | 289 | unsigned char attn, send_amount[8]; |
@@ -392,12 +396,12 @@ static void snd_emu10k1_pcm_init_voice(emu10k1_t *emu, | |||
392 | spin_unlock_irqrestore(&emu->reg_lock, flags); | 396 | spin_unlock_irqrestore(&emu->reg_lock, flags); |
393 | } | 397 | } |
394 | 398 | ||
395 | static int snd_emu10k1_playback_hw_params(snd_pcm_substream_t * substream, | 399 | static int snd_emu10k1_playback_hw_params(struct snd_pcm_substream *substream, |
396 | snd_pcm_hw_params_t * hw_params) | 400 | struct snd_pcm_hw_params *hw_params) |
397 | { | 401 | { |
398 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 402 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
399 | snd_pcm_runtime_t *runtime = substream->runtime; | 403 | struct snd_pcm_runtime *runtime = substream->runtime; |
400 | emu10k1_pcm_t *epcm = runtime->private_data; | 404 | struct snd_emu10k1_pcm *epcm = runtime->private_data; |
401 | int err; | 405 | int err; |
402 | 406 | ||
403 | if ((err = snd_emu10k1_pcm_channel_alloc(epcm, params_channels(hw_params))) < 0) | 407 | if ((err = snd_emu10k1_pcm_channel_alloc(epcm, params_channels(hw_params))) < 0) |
@@ -412,7 +416,7 @@ static int snd_emu10k1_playback_hw_params(snd_pcm_substream_t * substream, | |||
412 | epcm->start_addr = 0; | 416 | epcm->start_addr = 0; |
413 | if (! epcm->memblk) | 417 | if (! epcm->memblk) |
414 | return -ENOMEM; | 418 | return -ENOMEM; |
415 | mapped = ((emu10k1_memblk_t *)epcm->memblk)->mapped_page; | 419 | mapped = ((struct snd_emu10k1_memblk *)epcm->memblk)->mapped_page; |
416 | if (mapped < 0) | 420 | if (mapped < 0) |
417 | return -ENOMEM; | 421 | return -ENOMEM; |
418 | epcm->start_addr = mapped << PAGE_SHIFT; | 422 | epcm->start_addr = mapped << PAGE_SHIFT; |
@@ -420,11 +424,11 @@ static int snd_emu10k1_playback_hw_params(snd_pcm_substream_t * substream, | |||
420 | return 0; | 424 | return 0; |
421 | } | 425 | } |
422 | 426 | ||
423 | static int snd_emu10k1_playback_hw_free(snd_pcm_substream_t * substream) | 427 | static int snd_emu10k1_playback_hw_free(struct snd_pcm_substream *substream) |
424 | { | 428 | { |
425 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 429 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
426 | snd_pcm_runtime_t *runtime = substream->runtime; | 430 | struct snd_pcm_runtime *runtime = substream->runtime; |
427 | emu10k1_pcm_t *epcm; | 431 | struct snd_emu10k1_pcm *epcm; |
428 | 432 | ||
429 | if (runtime->private_data == NULL) | 433 | if (runtime->private_data == NULL) |
430 | return 0; | 434 | return 0; |
@@ -450,11 +454,11 @@ static int snd_emu10k1_playback_hw_free(snd_pcm_substream_t * substream) | |||
450 | return 0; | 454 | return 0; |
451 | } | 455 | } |
452 | 456 | ||
453 | static int snd_emu10k1_efx_playback_hw_free(snd_pcm_substream_t * substream) | 457 | static int snd_emu10k1_efx_playback_hw_free(struct snd_pcm_substream *substream) |
454 | { | 458 | { |
455 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 459 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
456 | snd_pcm_runtime_t *runtime = substream->runtime; | 460 | struct snd_pcm_runtime *runtime = substream->runtime; |
457 | emu10k1_pcm_t *epcm; | 461 | struct snd_emu10k1_pcm *epcm; |
458 | int i; | 462 | int i; |
459 | 463 | ||
460 | if (runtime->private_data == NULL) | 464 | if (runtime->private_data == NULL) |
@@ -479,11 +483,11 @@ static int snd_emu10k1_efx_playback_hw_free(snd_pcm_substream_t * substream) | |||
479 | return 0; | 483 | return 0; |
480 | } | 484 | } |
481 | 485 | ||
482 | static int snd_emu10k1_playback_prepare(snd_pcm_substream_t * substream) | 486 | static int snd_emu10k1_playback_prepare(struct snd_pcm_substream *substream) |
483 | { | 487 | { |
484 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 488 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
485 | snd_pcm_runtime_t *runtime = substream->runtime; | 489 | struct snd_pcm_runtime *runtime = substream->runtime; |
486 | emu10k1_pcm_t *epcm = runtime->private_data; | 490 | struct snd_emu10k1_pcm *epcm = runtime->private_data; |
487 | unsigned int start_addr, end_addr; | 491 | unsigned int start_addr, end_addr; |
488 | 492 | ||
489 | start_addr = epcm->start_addr; | 493 | start_addr = epcm->start_addr; |
@@ -507,11 +511,11 @@ static int snd_emu10k1_playback_prepare(snd_pcm_substream_t * substream) | |||
507 | return 0; | 511 | return 0; |
508 | } | 512 | } |
509 | 513 | ||
510 | static int snd_emu10k1_efx_playback_prepare(snd_pcm_substream_t * substream) | 514 | static int snd_emu10k1_efx_playback_prepare(struct snd_pcm_substream *substream) |
511 | { | 515 | { |
512 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 516 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
513 | snd_pcm_runtime_t *runtime = substream->runtime; | 517 | struct snd_pcm_runtime *runtime = substream->runtime; |
514 | emu10k1_pcm_t *epcm = runtime->private_data; | 518 | struct snd_emu10k1_pcm *epcm = runtime->private_data; |
515 | unsigned int start_addr, end_addr; | 519 | unsigned int start_addr, end_addr; |
516 | unsigned int channel_size; | 520 | unsigned int channel_size; |
517 | int i; | 521 | int i; |
@@ -543,7 +547,7 @@ static int snd_emu10k1_efx_playback_prepare(snd_pcm_substream_t * substream) | |||
543 | return 0; | 547 | return 0; |
544 | } | 548 | } |
545 | 549 | ||
546 | static snd_pcm_hardware_t snd_emu10k1_efx_playback = | 550 | static struct snd_pcm_hardware snd_emu10k1_efx_playback = |
547 | { | 551 | { |
548 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_NONINTERLEAVED | | 552 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_NONINTERLEAVED | |
549 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 553 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
@@ -562,22 +566,22 @@ static snd_pcm_hardware_t snd_emu10k1_efx_playback = | |||
562 | .fifo_size = 0, | 566 | .fifo_size = 0, |
563 | }; | 567 | }; |
564 | 568 | ||
565 | static int snd_emu10k1_capture_hw_params(snd_pcm_substream_t * substream, | 569 | static int snd_emu10k1_capture_hw_params(struct snd_pcm_substream *substream, |
566 | snd_pcm_hw_params_t * hw_params) | 570 | struct snd_pcm_hw_params *hw_params) |
567 | { | 571 | { |
568 | return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); | 572 | return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); |
569 | } | 573 | } |
570 | 574 | ||
571 | static int snd_emu10k1_capture_hw_free(snd_pcm_substream_t * substream) | 575 | static int snd_emu10k1_capture_hw_free(struct snd_pcm_substream *substream) |
572 | { | 576 | { |
573 | return snd_pcm_lib_free_pages(substream); | 577 | return snd_pcm_lib_free_pages(substream); |
574 | } | 578 | } |
575 | 579 | ||
576 | static int snd_emu10k1_capture_prepare(snd_pcm_substream_t * substream) | 580 | static int snd_emu10k1_capture_prepare(struct snd_pcm_substream *substream) |
577 | { | 581 | { |
578 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 582 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
579 | snd_pcm_runtime_t *runtime = substream->runtime; | 583 | struct snd_pcm_runtime *runtime = substream->runtime; |
580 | emu10k1_pcm_t *epcm = runtime->private_data; | 584 | struct snd_emu10k1_pcm *epcm = runtime->private_data; |
581 | int idx; | 585 | int idx; |
582 | 586 | ||
583 | /* zeroing the buffer size will stop capture */ | 587 | /* zeroing the buffer size will stop capture */ |
@@ -620,9 +624,9 @@ static int snd_emu10k1_capture_prepare(snd_pcm_substream_t * substream) | |||
620 | return 0; | 624 | return 0; |
621 | } | 625 | } |
622 | 626 | ||
623 | static void snd_emu10k1_playback_invalidate_cache(emu10k1_t *emu, int extra, emu10k1_voice_t *evoice) | 627 | static void snd_emu10k1_playback_invalidate_cache(struct snd_emu10k1 *emu, int extra, struct snd_emu10k1_voice *evoice) |
624 | { | 628 | { |
625 | snd_pcm_runtime_t *runtime; | 629 | struct snd_pcm_runtime *runtime; |
626 | unsigned int voice, stereo, i, ccis, cra = 64, cs, sample; | 630 | unsigned int voice, stereo, i, ccis, cra = 64, cs, sample; |
627 | 631 | ||
628 | if (evoice == NULL) | 632 | if (evoice == NULL) |
@@ -655,12 +659,12 @@ static void snd_emu10k1_playback_invalidate_cache(emu10k1_t *emu, int extra, emu | |||
655 | } | 659 | } |
656 | } | 660 | } |
657 | 661 | ||
658 | static void snd_emu10k1_playback_prepare_voice(emu10k1_t *emu, emu10k1_voice_t *evoice, | 662 | static void snd_emu10k1_playback_prepare_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice, |
659 | int master, int extra, | 663 | int master, int extra, |
660 | emu10k1_pcm_mixer_t *mix) | 664 | struct snd_emu10k1_pcm_mixer *mix) |
661 | { | 665 | { |
662 | snd_pcm_substream_t *substream; | 666 | struct snd_pcm_substream *substream; |
663 | snd_pcm_runtime_t *runtime; | 667 | struct snd_pcm_runtime *runtime; |
664 | unsigned int attn, vattn; | 668 | unsigned int attn, vattn; |
665 | unsigned int voice, tmp; | 669 | unsigned int voice, tmp; |
666 | 670 | ||
@@ -680,10 +684,10 @@ static void snd_emu10k1_playback_prepare_voice(emu10k1_t *emu, emu10k1_voice_t * | |||
680 | snd_emu10k1_voice_clear_loop_stop(emu, voice); | 684 | snd_emu10k1_voice_clear_loop_stop(emu, voice); |
681 | } | 685 | } |
682 | 686 | ||
683 | static void snd_emu10k1_playback_trigger_voice(emu10k1_t *emu, emu10k1_voice_t *evoice, int master, int extra) | 687 | static void snd_emu10k1_playback_trigger_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice, int master, int extra) |
684 | { | 688 | { |
685 | snd_pcm_substream_t *substream; | 689 | struct snd_pcm_substream *substream; |
686 | snd_pcm_runtime_t *runtime; | 690 | struct snd_pcm_runtime *runtime; |
687 | unsigned int voice, pitch, pitch_target; | 691 | unsigned int voice, pitch, pitch_target; |
688 | 692 | ||
689 | if (evoice == NULL) /* skip second voice for mono */ | 693 | if (evoice == NULL) /* skip second voice for mono */ |
@@ -702,7 +706,7 @@ static void snd_emu10k1_playback_trigger_voice(emu10k1_t *emu, emu10k1_voice_t * | |||
702 | snd_emu10k1_voice_intr_enable(emu, voice); | 706 | snd_emu10k1_voice_intr_enable(emu, voice); |
703 | } | 707 | } |
704 | 708 | ||
705 | static void snd_emu10k1_playback_stop_voice(emu10k1_t *emu, emu10k1_voice_t *evoice) | 709 | static void snd_emu10k1_playback_stop_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice) |
706 | { | 710 | { |
707 | unsigned int voice; | 711 | unsigned int voice; |
708 | 712 | ||
@@ -718,13 +722,13 @@ static void snd_emu10k1_playback_stop_voice(emu10k1_t *emu, emu10k1_voice_t *evo | |||
718 | snd_emu10k1_ptr_write(emu, IP, voice, 0); | 722 | snd_emu10k1_ptr_write(emu, IP, voice, 0); |
719 | } | 723 | } |
720 | 724 | ||
721 | static int snd_emu10k1_playback_trigger(snd_pcm_substream_t * substream, | 725 | static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream, |
722 | int cmd) | 726 | int cmd) |
723 | { | 727 | { |
724 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 728 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
725 | snd_pcm_runtime_t *runtime = substream->runtime; | 729 | struct snd_pcm_runtime *runtime = substream->runtime; |
726 | emu10k1_pcm_t *epcm = runtime->private_data; | 730 | struct snd_emu10k1_pcm *epcm = runtime->private_data; |
727 | emu10k1_pcm_mixer_t *mix; | 731 | struct snd_emu10k1_pcm_mixer *mix; |
728 | int result = 0; | 732 | int result = 0; |
729 | 733 | ||
730 | // printk("trigger - emu10k1 = 0x%x, cmd = %i, pointer = %i\n", (int)emu, cmd, substream->ops->pointer(substream)); | 734 | // printk("trigger - emu10k1 = 0x%x, cmd = %i, pointer = %i\n", (int)emu, cmd, substream->ops->pointer(substream)); |
@@ -759,12 +763,12 @@ static int snd_emu10k1_playback_trigger(snd_pcm_substream_t * substream, | |||
759 | return result; | 763 | return result; |
760 | } | 764 | } |
761 | 765 | ||
762 | static int snd_emu10k1_capture_trigger(snd_pcm_substream_t * substream, | 766 | static int snd_emu10k1_capture_trigger(struct snd_pcm_substream *substream, |
763 | int cmd) | 767 | int cmd) |
764 | { | 768 | { |
765 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 769 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
766 | snd_pcm_runtime_t *runtime = substream->runtime; | 770 | struct snd_pcm_runtime *runtime = substream->runtime; |
767 | emu10k1_pcm_t *epcm = runtime->private_data; | 771 | struct snd_emu10k1_pcm *epcm = runtime->private_data; |
768 | int result = 0; | 772 | int result = 0; |
769 | 773 | ||
770 | spin_lock(&emu->reg_lock); | 774 | spin_lock(&emu->reg_lock); |
@@ -819,11 +823,11 @@ static int snd_emu10k1_capture_trigger(snd_pcm_substream_t * substream, | |||
819 | return result; | 823 | return result; |
820 | } | 824 | } |
821 | 825 | ||
822 | static snd_pcm_uframes_t snd_emu10k1_playback_pointer(snd_pcm_substream_t * substream) | 826 | static snd_pcm_uframes_t snd_emu10k1_playback_pointer(struct snd_pcm_substream *substream) |
823 | { | 827 | { |
824 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 828 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
825 | snd_pcm_runtime_t *runtime = substream->runtime; | 829 | struct snd_pcm_runtime *runtime = substream->runtime; |
826 | emu10k1_pcm_t *epcm = runtime->private_data; | 830 | struct snd_emu10k1_pcm *epcm = runtime->private_data; |
827 | unsigned int ptr; | 831 | unsigned int ptr; |
828 | 832 | ||
829 | if (!epcm->running) | 833 | if (!epcm->running) |
@@ -847,12 +851,12 @@ static snd_pcm_uframes_t snd_emu10k1_playback_pointer(snd_pcm_substream_t * subs | |||
847 | } | 851 | } |
848 | 852 | ||
849 | 853 | ||
850 | static int snd_emu10k1_efx_playback_trigger(snd_pcm_substream_t * substream, | 854 | static int snd_emu10k1_efx_playback_trigger(struct snd_pcm_substream *substream, |
851 | int cmd) | 855 | int cmd) |
852 | { | 856 | { |
853 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 857 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
854 | snd_pcm_runtime_t *runtime = substream->runtime; | 858 | struct snd_pcm_runtime *runtime = substream->runtime; |
855 | emu10k1_pcm_t *epcm = runtime->private_data; | 859 | struct snd_emu10k1_pcm *epcm = runtime->private_data; |
856 | int i; | 860 | int i; |
857 | int result = 0; | 861 | int result = 0; |
858 | 862 | ||
@@ -896,11 +900,11 @@ static int snd_emu10k1_efx_playback_trigger(snd_pcm_substream_t * substream, | |||
896 | } | 900 | } |
897 | 901 | ||
898 | 902 | ||
899 | static snd_pcm_uframes_t snd_emu10k1_capture_pointer(snd_pcm_substream_t * substream) | 903 | static snd_pcm_uframes_t snd_emu10k1_capture_pointer(struct snd_pcm_substream *substream) |
900 | { | 904 | { |
901 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 905 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
902 | snd_pcm_runtime_t *runtime = substream->runtime; | 906 | struct snd_pcm_runtime *runtime = substream->runtime; |
903 | emu10k1_pcm_t *epcm = runtime->private_data; | 907 | struct snd_emu10k1_pcm *epcm = runtime->private_data; |
904 | unsigned int ptr; | 908 | unsigned int ptr; |
905 | 909 | ||
906 | if (!epcm->running) | 910 | if (!epcm->running) |
@@ -917,7 +921,7 @@ static snd_pcm_uframes_t snd_emu10k1_capture_pointer(snd_pcm_substream_t * subst | |||
917 | * Playback support device description | 921 | * Playback support device description |
918 | */ | 922 | */ |
919 | 923 | ||
920 | static snd_pcm_hardware_t snd_emu10k1_playback = | 924 | static struct snd_pcm_hardware snd_emu10k1_playback = |
921 | { | 925 | { |
922 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 926 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
923 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 927 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
@@ -940,7 +944,7 @@ static snd_pcm_hardware_t snd_emu10k1_playback = | |||
940 | * Capture support device description | 944 | * Capture support device description |
941 | */ | 945 | */ |
942 | 946 | ||
943 | static snd_pcm_hardware_t snd_emu10k1_capture = | 947 | static struct snd_pcm_hardware snd_emu10k1_capture = |
944 | { | 948 | { |
945 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 949 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
946 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 950 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
@@ -963,9 +967,9 @@ static snd_pcm_hardware_t snd_emu10k1_capture = | |||
963 | * | 967 | * |
964 | */ | 968 | */ |
965 | 969 | ||
966 | static void snd_emu10k1_pcm_mixer_notify1(emu10k1_t *emu, snd_kcontrol_t *kctl, int idx, int activate) | 970 | static void snd_emu10k1_pcm_mixer_notify1(struct snd_emu10k1 *emu, struct snd_kcontrol *kctl, int idx, int activate) |
967 | { | 971 | { |
968 | snd_ctl_elem_id_t id; | 972 | struct snd_ctl_elem_id id; |
969 | 973 | ||
970 | if (! kctl) | 974 | if (! kctl) |
971 | return; | 975 | return; |
@@ -978,29 +982,29 @@ static void snd_emu10k1_pcm_mixer_notify1(emu10k1_t *emu, snd_kcontrol_t *kctl, | |||
978 | snd_ctl_build_ioff(&id, kctl, idx)); | 982 | snd_ctl_build_ioff(&id, kctl, idx)); |
979 | } | 983 | } |
980 | 984 | ||
981 | static void snd_emu10k1_pcm_mixer_notify(emu10k1_t *emu, int idx, int activate) | 985 | static void snd_emu10k1_pcm_mixer_notify(struct snd_emu10k1 *emu, int idx, int activate) |
982 | { | 986 | { |
983 | snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_routing, idx, activate); | 987 | snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_routing, idx, activate); |
984 | snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_volume, idx, activate); | 988 | snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_volume, idx, activate); |
985 | snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_attn, idx, activate); | 989 | snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_attn, idx, activate); |
986 | } | 990 | } |
987 | 991 | ||
988 | static void snd_emu10k1_pcm_efx_mixer_notify(emu10k1_t *emu, int idx, int activate) | 992 | static void snd_emu10k1_pcm_efx_mixer_notify(struct snd_emu10k1 *emu, int idx, int activate) |
989 | { | 993 | { |
990 | snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_routing, idx, activate); | 994 | snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_routing, idx, activate); |
991 | snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_volume, idx, activate); | 995 | snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_volume, idx, activate); |
992 | snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_attn, idx, activate); | 996 | snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_attn, idx, activate); |
993 | } | 997 | } |
994 | 998 | ||
995 | static void snd_emu10k1_pcm_free_substream(snd_pcm_runtime_t *runtime) | 999 | static void snd_emu10k1_pcm_free_substream(struct snd_pcm_runtime *runtime) |
996 | { | 1000 | { |
997 | kfree(runtime->private_data); | 1001 | kfree(runtime->private_data); |
998 | } | 1002 | } |
999 | 1003 | ||
1000 | static int snd_emu10k1_efx_playback_close(snd_pcm_substream_t * substream) | 1004 | static int snd_emu10k1_efx_playback_close(struct snd_pcm_substream *substream) |
1001 | { | 1005 | { |
1002 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1006 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1003 | emu10k1_pcm_mixer_t *mix; | 1007 | struct snd_emu10k1_pcm_mixer *mix; |
1004 | int i; | 1008 | int i; |
1005 | 1009 | ||
1006 | for (i=0; i < NUM_EFX_PLAYBACK; i++) { | 1010 | for (i=0; i < NUM_EFX_PLAYBACK; i++) { |
@@ -1011,12 +1015,12 @@ static int snd_emu10k1_efx_playback_close(snd_pcm_substream_t * substream) | |||
1011 | return 0; | 1015 | return 0; |
1012 | } | 1016 | } |
1013 | 1017 | ||
1014 | static int snd_emu10k1_efx_playback_open(snd_pcm_substream_t * substream) | 1018 | static int snd_emu10k1_efx_playback_open(struct snd_pcm_substream *substream) |
1015 | { | 1019 | { |
1016 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1020 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1017 | emu10k1_pcm_t *epcm; | 1021 | struct snd_emu10k1_pcm *epcm; |
1018 | emu10k1_pcm_mixer_t *mix; | 1022 | struct snd_emu10k1_pcm_mixer *mix; |
1019 | snd_pcm_runtime_t *runtime = substream->runtime; | 1023 | struct snd_pcm_runtime *runtime = substream->runtime; |
1020 | int i; | 1024 | int i; |
1021 | 1025 | ||
1022 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); | 1026 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); |
@@ -1044,12 +1048,12 @@ static int snd_emu10k1_efx_playback_open(snd_pcm_substream_t * substream) | |||
1044 | return 0; | 1048 | return 0; |
1045 | } | 1049 | } |
1046 | 1050 | ||
1047 | static int snd_emu10k1_playback_open(snd_pcm_substream_t * substream) | 1051 | static int snd_emu10k1_playback_open(struct snd_pcm_substream *substream) |
1048 | { | 1052 | { |
1049 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1053 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1050 | emu10k1_pcm_t *epcm; | 1054 | struct snd_emu10k1_pcm *epcm; |
1051 | emu10k1_pcm_mixer_t *mix; | 1055 | struct snd_emu10k1_pcm_mixer *mix; |
1052 | snd_pcm_runtime_t *runtime = substream->runtime; | 1056 | struct snd_pcm_runtime *runtime = substream->runtime; |
1053 | int i, err; | 1057 | int i, err; |
1054 | 1058 | ||
1055 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); | 1059 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); |
@@ -1081,21 +1085,21 @@ static int snd_emu10k1_playback_open(snd_pcm_substream_t * substream) | |||
1081 | return 0; | 1085 | return 0; |
1082 | } | 1086 | } |
1083 | 1087 | ||
1084 | static int snd_emu10k1_playback_close(snd_pcm_substream_t * substream) | 1088 | static int snd_emu10k1_playback_close(struct snd_pcm_substream *substream) |
1085 | { | 1089 | { |
1086 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1090 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1087 | emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[substream->number]; | 1091 | struct snd_emu10k1_pcm_mixer *mix = &emu->pcm_mixer[substream->number]; |
1088 | 1092 | ||
1089 | mix->epcm = NULL; | 1093 | mix->epcm = NULL; |
1090 | snd_emu10k1_pcm_mixer_notify(emu, substream->number, 0); | 1094 | snd_emu10k1_pcm_mixer_notify(emu, substream->number, 0); |
1091 | return 0; | 1095 | return 0; |
1092 | } | 1096 | } |
1093 | 1097 | ||
1094 | static int snd_emu10k1_capture_open(snd_pcm_substream_t * substream) | 1098 | static int snd_emu10k1_capture_open(struct snd_pcm_substream *substream) |
1095 | { | 1099 | { |
1096 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1100 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1097 | snd_pcm_runtime_t *runtime = substream->runtime; | 1101 | struct snd_pcm_runtime *runtime = substream->runtime; |
1098 | emu10k1_pcm_t *epcm; | 1102 | struct snd_emu10k1_pcm *epcm; |
1099 | 1103 | ||
1100 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); | 1104 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); |
1101 | if (epcm == NULL) | 1105 | if (epcm == NULL) |
@@ -1118,20 +1122,20 @@ static int snd_emu10k1_capture_open(snd_pcm_substream_t * substream) | |||
1118 | return 0; | 1122 | return 0; |
1119 | } | 1123 | } |
1120 | 1124 | ||
1121 | static int snd_emu10k1_capture_close(snd_pcm_substream_t * substream) | 1125 | static int snd_emu10k1_capture_close(struct snd_pcm_substream *substream) |
1122 | { | 1126 | { |
1123 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1127 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1124 | 1128 | ||
1125 | emu->capture_interrupt = NULL; | 1129 | emu->capture_interrupt = NULL; |
1126 | emu->pcm_capture_substream = NULL; | 1130 | emu->pcm_capture_substream = NULL; |
1127 | return 0; | 1131 | return 0; |
1128 | } | 1132 | } |
1129 | 1133 | ||
1130 | static int snd_emu10k1_capture_mic_open(snd_pcm_substream_t * substream) | 1134 | static int snd_emu10k1_capture_mic_open(struct snd_pcm_substream *substream) |
1131 | { | 1135 | { |
1132 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1136 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1133 | emu10k1_pcm_t *epcm; | 1137 | struct snd_emu10k1_pcm *epcm; |
1134 | snd_pcm_runtime_t *runtime = substream->runtime; | 1138 | struct snd_pcm_runtime *runtime = substream->runtime; |
1135 | 1139 | ||
1136 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); | 1140 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); |
1137 | if (epcm == NULL) | 1141 | if (epcm == NULL) |
@@ -1156,20 +1160,20 @@ static int snd_emu10k1_capture_mic_open(snd_pcm_substream_t * substream) | |||
1156 | return 0; | 1160 | return 0; |
1157 | } | 1161 | } |
1158 | 1162 | ||
1159 | static int snd_emu10k1_capture_mic_close(snd_pcm_substream_t * substream) | 1163 | static int snd_emu10k1_capture_mic_close(struct snd_pcm_substream *substream) |
1160 | { | 1164 | { |
1161 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1165 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1162 | 1166 | ||
1163 | emu->capture_interrupt = NULL; | 1167 | emu->capture_interrupt = NULL; |
1164 | emu->pcm_capture_mic_substream = NULL; | 1168 | emu->pcm_capture_mic_substream = NULL; |
1165 | return 0; | 1169 | return 0; |
1166 | } | 1170 | } |
1167 | 1171 | ||
1168 | static int snd_emu10k1_capture_efx_open(snd_pcm_substream_t * substream) | 1172 | static int snd_emu10k1_capture_efx_open(struct snd_pcm_substream *substream) |
1169 | { | 1173 | { |
1170 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1174 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1171 | emu10k1_pcm_t *epcm; | 1175 | struct snd_emu10k1_pcm *epcm; |
1172 | snd_pcm_runtime_t *runtime = substream->runtime; | 1176 | struct snd_pcm_runtime *runtime = substream->runtime; |
1173 | int nefx = emu->audigy ? 64 : 32; | 1177 | int nefx = emu->audigy ? 64 : 32; |
1174 | int idx; | 1178 | int idx; |
1175 | 1179 | ||
@@ -1206,16 +1210,16 @@ static int snd_emu10k1_capture_efx_open(snd_pcm_substream_t * substream) | |||
1206 | return 0; | 1210 | return 0; |
1207 | } | 1211 | } |
1208 | 1212 | ||
1209 | static int snd_emu10k1_capture_efx_close(snd_pcm_substream_t * substream) | 1213 | static int snd_emu10k1_capture_efx_close(struct snd_pcm_substream *substream) |
1210 | { | 1214 | { |
1211 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1215 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1212 | 1216 | ||
1213 | emu->capture_interrupt = NULL; | 1217 | emu->capture_interrupt = NULL; |
1214 | emu->pcm_capture_efx_substream = NULL; | 1218 | emu->pcm_capture_efx_substream = NULL; |
1215 | return 0; | 1219 | return 0; |
1216 | } | 1220 | } |
1217 | 1221 | ||
1218 | static snd_pcm_ops_t snd_emu10k1_playback_ops = { | 1222 | static struct snd_pcm_ops snd_emu10k1_playback_ops = { |
1219 | .open = snd_emu10k1_playback_open, | 1223 | .open = snd_emu10k1_playback_open, |
1220 | .close = snd_emu10k1_playback_close, | 1224 | .close = snd_emu10k1_playback_close, |
1221 | .ioctl = snd_pcm_lib_ioctl, | 1225 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1227,7 +1231,7 @@ static snd_pcm_ops_t snd_emu10k1_playback_ops = { | |||
1227 | .page = snd_pcm_sgbuf_ops_page, | 1231 | .page = snd_pcm_sgbuf_ops_page, |
1228 | }; | 1232 | }; |
1229 | 1233 | ||
1230 | static snd_pcm_ops_t snd_emu10k1_capture_ops = { | 1234 | static struct snd_pcm_ops snd_emu10k1_capture_ops = { |
1231 | .open = snd_emu10k1_capture_open, | 1235 | .open = snd_emu10k1_capture_open, |
1232 | .close = snd_emu10k1_capture_close, | 1236 | .close = snd_emu10k1_capture_close, |
1233 | .ioctl = snd_pcm_lib_ioctl, | 1237 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1239,7 +1243,7 @@ static snd_pcm_ops_t snd_emu10k1_capture_ops = { | |||
1239 | }; | 1243 | }; |
1240 | 1244 | ||
1241 | /* EFX playback */ | 1245 | /* EFX playback */ |
1242 | static snd_pcm_ops_t snd_emu10k1_efx_playback_ops = { | 1246 | static struct snd_pcm_ops snd_emu10k1_efx_playback_ops = { |
1243 | .open = snd_emu10k1_efx_playback_open, | 1247 | .open = snd_emu10k1_efx_playback_open, |
1244 | .close = snd_emu10k1_efx_playback_close, | 1248 | .close = snd_emu10k1_efx_playback_close, |
1245 | .ioctl = snd_pcm_lib_ioctl, | 1249 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1251,10 +1255,10 @@ static snd_pcm_ops_t snd_emu10k1_efx_playback_ops = { | |||
1251 | .page = snd_pcm_sgbuf_ops_page, | 1255 | .page = snd_pcm_sgbuf_ops_page, |
1252 | }; | 1256 | }; |
1253 | 1257 | ||
1254 | int __devinit snd_emu10k1_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm) | 1258 | int __devinit snd_emu10k1_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm) |
1255 | { | 1259 | { |
1256 | snd_pcm_t *pcm; | 1260 | struct snd_pcm *pcm; |
1257 | snd_pcm_substream_t *substream; | 1261 | struct snd_pcm_substream *substream; |
1258 | int err; | 1262 | int err; |
1259 | 1263 | ||
1260 | if (rpcm) | 1264 | if (rpcm) |
@@ -1286,10 +1290,10 @@ int __devinit snd_emu10k1_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm) | |||
1286 | return 0; | 1290 | return 0; |
1287 | } | 1291 | } |
1288 | 1292 | ||
1289 | int __devinit snd_emu10k1_pcm_multi(emu10k1_t * emu, int device, snd_pcm_t ** rpcm) | 1293 | int __devinit snd_emu10k1_pcm_multi(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm) |
1290 | { | 1294 | { |
1291 | snd_pcm_t *pcm; | 1295 | struct snd_pcm *pcm; |
1292 | snd_pcm_substream_t *substream; | 1296 | struct snd_pcm_substream *substream; |
1293 | int err; | 1297 | int err; |
1294 | 1298 | ||
1295 | if (rpcm) | 1299 | if (rpcm) |
@@ -1318,7 +1322,7 @@ int __devinit snd_emu10k1_pcm_multi(emu10k1_t * emu, int device, snd_pcm_t ** rp | |||
1318 | } | 1322 | } |
1319 | 1323 | ||
1320 | 1324 | ||
1321 | static snd_pcm_ops_t snd_emu10k1_capture_mic_ops = { | 1325 | static struct snd_pcm_ops snd_emu10k1_capture_mic_ops = { |
1322 | .open = snd_emu10k1_capture_mic_open, | 1326 | .open = snd_emu10k1_capture_mic_open, |
1323 | .close = snd_emu10k1_capture_mic_close, | 1327 | .close = snd_emu10k1_capture_mic_close, |
1324 | .ioctl = snd_pcm_lib_ioctl, | 1328 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1329,9 +1333,9 @@ static snd_pcm_ops_t snd_emu10k1_capture_mic_ops = { | |||
1329 | .pointer = snd_emu10k1_capture_pointer, | 1333 | .pointer = snd_emu10k1_capture_pointer, |
1330 | }; | 1334 | }; |
1331 | 1335 | ||
1332 | int __devinit snd_emu10k1_pcm_mic(emu10k1_t * emu, int device, snd_pcm_t ** rpcm) | 1336 | int __devinit snd_emu10k1_pcm_mic(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm) |
1333 | { | 1337 | { |
1334 | snd_pcm_t *pcm; | 1338 | struct snd_pcm *pcm; |
1335 | int err; | 1339 | int err; |
1336 | 1340 | ||
1337 | if (rpcm) | 1341 | if (rpcm) |
@@ -1355,9 +1359,9 @@ int __devinit snd_emu10k1_pcm_mic(emu10k1_t * emu, int device, snd_pcm_t ** rpcm | |||
1355 | return 0; | 1359 | return 0; |
1356 | } | 1360 | } |
1357 | 1361 | ||
1358 | static int snd_emu10k1_pcm_efx_voices_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 1362 | static int snd_emu10k1_pcm_efx_voices_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
1359 | { | 1363 | { |
1360 | emu10k1_t *emu = snd_kcontrol_chip(kcontrol); | 1364 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
1361 | int nefx = emu->audigy ? 64 : 32; | 1365 | int nefx = emu->audigy ? 64 : 32; |
1362 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 1366 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
1363 | uinfo->count = nefx; | 1367 | uinfo->count = nefx; |
@@ -1366,9 +1370,9 @@ static int snd_emu10k1_pcm_efx_voices_mask_info(snd_kcontrol_t *kcontrol, snd_ct | |||
1366 | return 0; | 1370 | return 0; |
1367 | } | 1371 | } |
1368 | 1372 | ||
1369 | static int snd_emu10k1_pcm_efx_voices_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1373 | static int snd_emu10k1_pcm_efx_voices_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1370 | { | 1374 | { |
1371 | emu10k1_t *emu = snd_kcontrol_chip(kcontrol); | 1375 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
1372 | int nefx = emu->audigy ? 64 : 32; | 1376 | int nefx = emu->audigy ? 64 : 32; |
1373 | int idx; | 1377 | int idx; |
1374 | 1378 | ||
@@ -1379,9 +1383,9 @@ static int snd_emu10k1_pcm_efx_voices_mask_get(snd_kcontrol_t * kcontrol, snd_ct | |||
1379 | return 0; | 1383 | return 0; |
1380 | } | 1384 | } |
1381 | 1385 | ||
1382 | static int snd_emu10k1_pcm_efx_voices_mask_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1386 | static int snd_emu10k1_pcm_efx_voices_mask_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1383 | { | 1387 | { |
1384 | emu10k1_t *emu = snd_kcontrol_chip(kcontrol); | 1388 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
1385 | unsigned int nval[2], bits; | 1389 | unsigned int nval[2], bits; |
1386 | int nefx = emu->audigy ? 64 : 32; | 1390 | int nefx = emu->audigy ? 64 : 32; |
1387 | int nefxb = emu->audigy ? 7 : 6; | 1391 | int nefxb = emu->audigy ? 7 : 6; |
@@ -1410,7 +1414,7 @@ static int snd_emu10k1_pcm_efx_voices_mask_put(snd_kcontrol_t * kcontrol, snd_ct | |||
1410 | return change; | 1414 | return change; |
1411 | } | 1415 | } |
1412 | 1416 | ||
1413 | static snd_kcontrol_new_t snd_emu10k1_pcm_efx_voices_mask = { | 1417 | static struct snd_kcontrol_new snd_emu10k1_pcm_efx_voices_mask = { |
1414 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 1418 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
1415 | .name = "Captured FX8010 Outputs", | 1419 | .name = "Captured FX8010 Outputs", |
1416 | .info = snd_emu10k1_pcm_efx_voices_mask_info, | 1420 | .info = snd_emu10k1_pcm_efx_voices_mask_info, |
@@ -1418,7 +1422,7 @@ static snd_kcontrol_new_t snd_emu10k1_pcm_efx_voices_mask = { | |||
1418 | .put = snd_emu10k1_pcm_efx_voices_mask_put | 1422 | .put = snd_emu10k1_pcm_efx_voices_mask_put |
1419 | }; | 1423 | }; |
1420 | 1424 | ||
1421 | static snd_pcm_ops_t snd_emu10k1_capture_efx_ops = { | 1425 | static struct snd_pcm_ops snd_emu10k1_capture_efx_ops = { |
1422 | .open = snd_emu10k1_capture_efx_open, | 1426 | .open = snd_emu10k1_capture_efx_open, |
1423 | .close = snd_emu10k1_capture_efx_close, | 1427 | .close = snd_emu10k1_capture_efx_close, |
1424 | .ioctl = snd_pcm_lib_ioctl, | 1428 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1435,9 +1439,9 @@ static snd_pcm_ops_t snd_emu10k1_capture_efx_ops = { | |||
1435 | #define INITIAL_TRAM_SHIFT 14 | 1439 | #define INITIAL_TRAM_SHIFT 14 |
1436 | #define INITIAL_TRAM_POS(size) ((((size) / 2) - INITIAL_TRAM_SHIFT) - 1) | 1440 | #define INITIAL_TRAM_POS(size) ((((size) / 2) - INITIAL_TRAM_SHIFT) - 1) |
1437 | 1441 | ||
1438 | static void snd_emu10k1_fx8010_playback_irq(emu10k1_t *emu, void *private_data) | 1442 | static void snd_emu10k1_fx8010_playback_irq(struct snd_emu10k1 *emu, void *private_data) |
1439 | { | 1443 | { |
1440 | snd_pcm_substream_t *substream = private_data; | 1444 | struct snd_pcm_substream *substream = private_data; |
1441 | snd_pcm_period_elapsed(substream); | 1445 | snd_pcm_period_elapsed(substream); |
1442 | } | 1446 | } |
1443 | 1447 | ||
@@ -1461,11 +1465,11 @@ static void snd_emu10k1_fx8010_playback_tram_poke1(unsigned short *dst_left, | |||
1461 | } | 1465 | } |
1462 | } | 1466 | } |
1463 | 1467 | ||
1464 | static void fx8010_pb_trans_copy(snd_pcm_substream_t *substream, | 1468 | static void fx8010_pb_trans_copy(struct snd_pcm_substream *substream, |
1465 | snd_pcm_indirect_t *rec, size_t bytes) | 1469 | struct snd_pcm_indirect *rec, size_t bytes) |
1466 | { | 1470 | { |
1467 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1471 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1468 | snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; | 1472 | struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; |
1469 | unsigned int tram_size = pcm->buffer_size; | 1473 | unsigned int tram_size = pcm->buffer_size; |
1470 | unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data); | 1474 | unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data); |
1471 | unsigned int frames = bytes >> 2, count; | 1475 | unsigned int frames = bytes >> 2, count; |
@@ -1490,25 +1494,25 @@ static void fx8010_pb_trans_copy(snd_pcm_substream_t *substream, | |||
1490 | pcm->tram_shift = tram_shift; | 1494 | pcm->tram_shift = tram_shift; |
1491 | } | 1495 | } |
1492 | 1496 | ||
1493 | static int snd_emu10k1_fx8010_playback_transfer(snd_pcm_substream_t *substream) | 1497 | static int snd_emu10k1_fx8010_playback_transfer(struct snd_pcm_substream *substream) |
1494 | { | 1498 | { |
1495 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1499 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1496 | snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; | 1500 | struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; |
1497 | 1501 | ||
1498 | snd_pcm_indirect_playback_transfer(substream, &pcm->pcm_rec, fx8010_pb_trans_copy); | 1502 | snd_pcm_indirect_playback_transfer(substream, &pcm->pcm_rec, fx8010_pb_trans_copy); |
1499 | return 0; | 1503 | return 0; |
1500 | } | 1504 | } |
1501 | 1505 | ||
1502 | static int snd_emu10k1_fx8010_playback_hw_params(snd_pcm_substream_t * substream, | 1506 | static int snd_emu10k1_fx8010_playback_hw_params(struct snd_pcm_substream *substream, |
1503 | snd_pcm_hw_params_t * hw_params) | 1507 | struct snd_pcm_hw_params *hw_params) |
1504 | { | 1508 | { |
1505 | return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); | 1509 | return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); |
1506 | } | 1510 | } |
1507 | 1511 | ||
1508 | static int snd_emu10k1_fx8010_playback_hw_free(snd_pcm_substream_t * substream) | 1512 | static int snd_emu10k1_fx8010_playback_hw_free(struct snd_pcm_substream *substream) |
1509 | { | 1513 | { |
1510 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1514 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1511 | snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; | 1515 | struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; |
1512 | unsigned int i; | 1516 | unsigned int i; |
1513 | 1517 | ||
1514 | for (i = 0; i < pcm->channels; i++) | 1518 | for (i = 0; i < pcm->channels; i++) |
@@ -1517,11 +1521,11 @@ static int snd_emu10k1_fx8010_playback_hw_free(snd_pcm_substream_t * substream) | |||
1517 | return 0; | 1521 | return 0; |
1518 | } | 1522 | } |
1519 | 1523 | ||
1520 | static int snd_emu10k1_fx8010_playback_prepare(snd_pcm_substream_t * substream) | 1524 | static int snd_emu10k1_fx8010_playback_prepare(struct snd_pcm_substream *substream) |
1521 | { | 1525 | { |
1522 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1526 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1523 | snd_pcm_runtime_t *runtime = substream->runtime; | 1527 | struct snd_pcm_runtime *runtime = substream->runtime; |
1524 | snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; | 1528 | struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; |
1525 | unsigned int i; | 1529 | unsigned int i; |
1526 | 1530 | ||
1527 | // printk("prepare: etram_pages = 0x%p, dma_area = 0x%x, buffer_size = 0x%x (0x%x)\n", emu->fx8010.etram_pages, runtime->dma_area, runtime->buffer_size, runtime->buffer_size << 2); | 1531 | // printk("prepare: etram_pages = 0x%p, dma_area = 0x%x, buffer_size = 0x%x (0x%x)\n", emu->fx8010.etram_pages, runtime->dma_area, runtime->buffer_size, runtime->buffer_size << 2); |
@@ -1541,10 +1545,10 @@ static int snd_emu10k1_fx8010_playback_prepare(snd_pcm_substream_t * substream) | |||
1541 | return 0; | 1545 | return 0; |
1542 | } | 1546 | } |
1543 | 1547 | ||
1544 | static int snd_emu10k1_fx8010_playback_trigger(snd_pcm_substream_t * substream, int cmd) | 1548 | static int snd_emu10k1_fx8010_playback_trigger(struct snd_pcm_substream *substream, int cmd) |
1545 | { | 1549 | { |
1546 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1550 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1547 | snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; | 1551 | struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; |
1548 | int result = 0; | 1552 | int result = 0; |
1549 | 1553 | ||
1550 | spin_lock(&emu->reg_lock); | 1554 | spin_lock(&emu->reg_lock); |
@@ -1586,10 +1590,10 @@ static int snd_emu10k1_fx8010_playback_trigger(snd_pcm_substream_t * substream, | |||
1586 | return result; | 1590 | return result; |
1587 | } | 1591 | } |
1588 | 1592 | ||
1589 | static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(snd_pcm_substream_t * substream) | 1593 | static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(struct snd_pcm_substream *substream) |
1590 | { | 1594 | { |
1591 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1595 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1592 | snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; | 1596 | struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; |
1593 | size_t ptr; /* byte pointer */ | 1597 | size_t ptr; /* byte pointer */ |
1594 | 1598 | ||
1595 | if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0)) | 1599 | if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0)) |
@@ -1598,7 +1602,7 @@ static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(snd_pcm_substream_t | |||
1598 | return snd_pcm_indirect_playback_pointer(substream, &pcm->pcm_rec, ptr); | 1602 | return snd_pcm_indirect_playback_pointer(substream, &pcm->pcm_rec, ptr); |
1599 | } | 1603 | } |
1600 | 1604 | ||
1601 | static snd_pcm_hardware_t snd_emu10k1_fx8010_playback = | 1605 | static struct snd_pcm_hardware snd_emu10k1_fx8010_playback = |
1602 | { | 1606 | { |
1603 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 1607 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
1604 | /* SNDRV_PCM_INFO_MMAP_VALID | */ SNDRV_PCM_INFO_PAUSE), | 1608 | /* SNDRV_PCM_INFO_MMAP_VALID | */ SNDRV_PCM_INFO_PAUSE), |
@@ -1616,11 +1620,11 @@ static snd_pcm_hardware_t snd_emu10k1_fx8010_playback = | |||
1616 | .fifo_size = 0, | 1620 | .fifo_size = 0, |
1617 | }; | 1621 | }; |
1618 | 1622 | ||
1619 | static int snd_emu10k1_fx8010_playback_open(snd_pcm_substream_t * substream) | 1623 | static int snd_emu10k1_fx8010_playback_open(struct snd_pcm_substream *substream) |
1620 | { | 1624 | { |
1621 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1625 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1622 | snd_pcm_runtime_t *runtime = substream->runtime; | 1626 | struct snd_pcm_runtime *runtime = substream->runtime; |
1623 | snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; | 1627 | struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; |
1624 | 1628 | ||
1625 | runtime->hw = snd_emu10k1_fx8010_playback; | 1629 | runtime->hw = snd_emu10k1_fx8010_playback; |
1626 | runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels; | 1630 | runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels; |
@@ -1635,10 +1639,10 @@ static int snd_emu10k1_fx8010_playback_open(snd_pcm_substream_t * substream) | |||
1635 | return 0; | 1639 | return 0; |
1636 | } | 1640 | } |
1637 | 1641 | ||
1638 | static int snd_emu10k1_fx8010_playback_close(snd_pcm_substream_t * substream) | 1642 | static int snd_emu10k1_fx8010_playback_close(struct snd_pcm_substream *substream) |
1639 | { | 1643 | { |
1640 | emu10k1_t *emu = snd_pcm_substream_chip(substream); | 1644 | struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); |
1641 | snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; | 1645 | struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; |
1642 | 1646 | ||
1643 | spin_lock_irq(&emu->reg_lock); | 1647 | spin_lock_irq(&emu->reg_lock); |
1644 | pcm->opened = 0; | 1648 | pcm->opened = 0; |
@@ -1646,7 +1650,7 @@ static int snd_emu10k1_fx8010_playback_close(snd_pcm_substream_t * substream) | |||
1646 | return 0; | 1650 | return 0; |
1647 | } | 1651 | } |
1648 | 1652 | ||
1649 | static snd_pcm_ops_t snd_emu10k1_fx8010_playback_ops = { | 1653 | static struct snd_pcm_ops snd_emu10k1_fx8010_playback_ops = { |
1650 | .open = snd_emu10k1_fx8010_playback_open, | 1654 | .open = snd_emu10k1_fx8010_playback_open, |
1651 | .close = snd_emu10k1_fx8010_playback_close, | 1655 | .close = snd_emu10k1_fx8010_playback_close, |
1652 | .ioctl = snd_pcm_lib_ioctl, | 1656 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1658,10 +1662,10 @@ static snd_pcm_ops_t snd_emu10k1_fx8010_playback_ops = { | |||
1658 | .ack = snd_emu10k1_fx8010_playback_transfer, | 1662 | .ack = snd_emu10k1_fx8010_playback_transfer, |
1659 | }; | 1663 | }; |
1660 | 1664 | ||
1661 | int __devinit snd_emu10k1_pcm_efx(emu10k1_t * emu, int device, snd_pcm_t ** rpcm) | 1665 | int __devinit snd_emu10k1_pcm_efx(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm) |
1662 | { | 1666 | { |
1663 | snd_pcm_t *pcm; | 1667 | struct snd_pcm *pcm; |
1664 | snd_kcontrol_t *kctl; | 1668 | struct snd_kcontrol *kctl; |
1665 | int err; | 1669 | int err; |
1666 | 1670 | ||
1667 | if (rpcm) | 1671 | if (rpcm) |