diff options
Diffstat (limited to 'sound/pci/cs46xx/cs46xx_lib.c')
-rw-r--r-- | sound/pci/cs46xx/cs46xx_lib.c | 584 |
1 files changed, 294 insertions, 290 deletions
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index 9a86148d7188..11d91d08a14c 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c | |||
@@ -66,23 +66,23 @@ | |||
66 | #include "cs46xx_lib.h" | 66 | #include "cs46xx_lib.h" |
67 | #include "dsp_spos.h" | 67 | #include "dsp_spos.h" |
68 | 68 | ||
69 | static void amp_voyetra(cs46xx_t *chip, int change); | 69 | static void amp_voyetra(struct snd_cs46xx *chip, int change); |
70 | 70 | ||
71 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 71 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
72 | static snd_pcm_ops_t snd_cs46xx_playback_rear_ops; | 72 | static struct snd_pcm_ops snd_cs46xx_playback_rear_ops; |
73 | static snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops; | 73 | static struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops; |
74 | static snd_pcm_ops_t snd_cs46xx_playback_clfe_ops; | 74 | static struct snd_pcm_ops snd_cs46xx_playback_clfe_ops; |
75 | static snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops; | 75 | static struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops; |
76 | static snd_pcm_ops_t snd_cs46xx_playback_iec958_ops; | 76 | static struct snd_pcm_ops snd_cs46xx_playback_iec958_ops; |
77 | static snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops; | 77 | static struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops; |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | static snd_pcm_ops_t snd_cs46xx_playback_ops; | 80 | static struct snd_pcm_ops snd_cs46xx_playback_ops; |
81 | static snd_pcm_ops_t snd_cs46xx_playback_indirect_ops; | 81 | static struct snd_pcm_ops snd_cs46xx_playback_indirect_ops; |
82 | static snd_pcm_ops_t snd_cs46xx_capture_ops; | 82 | static struct snd_pcm_ops snd_cs46xx_capture_ops; |
83 | static snd_pcm_ops_t snd_cs46xx_capture_indirect_ops; | 83 | static struct snd_pcm_ops snd_cs46xx_capture_indirect_ops; |
84 | 84 | ||
85 | static unsigned short snd_cs46xx_codec_read(cs46xx_t *chip, | 85 | static unsigned short snd_cs46xx_codec_read(struct snd_cs46xx *chip, |
86 | unsigned short reg, | 86 | unsigned short reg, |
87 | int codec_index) | 87 | int codec_index) |
88 | { | 88 | { |
@@ -204,10 +204,10 @@ static unsigned short snd_cs46xx_codec_read(cs46xx_t *chip, | |||
204 | return result; | 204 | return result; |
205 | } | 205 | } |
206 | 206 | ||
207 | static unsigned short snd_cs46xx_ac97_read(ac97_t * ac97, | 207 | static unsigned short snd_cs46xx_ac97_read(struct snd_ac97 * ac97, |
208 | unsigned short reg) | 208 | unsigned short reg) |
209 | { | 209 | { |
210 | cs46xx_t *chip = ac97->private_data; | 210 | struct snd_cs46xx *chip = ac97->private_data; |
211 | unsigned short val; | 211 | unsigned short val; |
212 | int codec_index = ac97->num; | 212 | int codec_index = ac97->num; |
213 | 213 | ||
@@ -221,7 +221,7 @@ static unsigned short snd_cs46xx_ac97_read(ac97_t * ac97, | |||
221 | } | 221 | } |
222 | 222 | ||
223 | 223 | ||
224 | static void snd_cs46xx_codec_write(cs46xx_t *chip, | 224 | static void snd_cs46xx_codec_write(struct snd_cs46xx *chip, |
225 | unsigned short reg, | 225 | unsigned short reg, |
226 | unsigned short val, | 226 | unsigned short val, |
227 | int codec_index) | 227 | int codec_index) |
@@ -286,11 +286,11 @@ static void snd_cs46xx_codec_write(cs46xx_t *chip, | |||
286 | chip->active_ctrl(chip, -1); | 286 | chip->active_ctrl(chip, -1); |
287 | } | 287 | } |
288 | 288 | ||
289 | static void snd_cs46xx_ac97_write(ac97_t *ac97, | 289 | static void snd_cs46xx_ac97_write(struct snd_ac97 *ac97, |
290 | unsigned short reg, | 290 | unsigned short reg, |
291 | unsigned short val) | 291 | unsigned short val) |
292 | { | 292 | { |
293 | cs46xx_t *chip = ac97->private_data; | 293 | struct snd_cs46xx *chip = ac97->private_data; |
294 | int codec_index = ac97->num; | 294 | int codec_index = ac97->num; |
295 | 295 | ||
296 | snd_assert(codec_index == CS46XX_PRIMARY_CODEC_INDEX || | 296 | snd_assert(codec_index == CS46XX_PRIMARY_CODEC_INDEX || |
@@ -305,7 +305,7 @@ static void snd_cs46xx_ac97_write(ac97_t *ac97, | |||
305 | * Chip initialization | 305 | * Chip initialization |
306 | */ | 306 | */ |
307 | 307 | ||
308 | int snd_cs46xx_download(cs46xx_t *chip, | 308 | int snd_cs46xx_download(struct snd_cs46xx *chip, |
309 | u32 *src, | 309 | u32 *src, |
310 | unsigned long offset, | 310 | unsigned long offset, |
311 | unsigned long len) | 311 | unsigned long len) |
@@ -334,7 +334,7 @@ int snd_cs46xx_download(cs46xx_t *chip, | |||
334 | #include "imgs/cwcbinhack.h" | 334 | #include "imgs/cwcbinhack.h" |
335 | #include "imgs/cwcdma.h" | 335 | #include "imgs/cwcdma.h" |
336 | 336 | ||
337 | int snd_cs46xx_clear_BA1(cs46xx_t *chip, | 337 | int snd_cs46xx_clear_BA1(struct snd_cs46xx *chip, |
338 | unsigned long offset, | 338 | unsigned long offset, |
339 | unsigned long len) | 339 | unsigned long len) |
340 | { | 340 | { |
@@ -358,7 +358,7 @@ int snd_cs46xx_clear_BA1(cs46xx_t *chip, | |||
358 | 358 | ||
359 | #include "cs46xx_image.h" | 359 | #include "cs46xx_image.h" |
360 | 360 | ||
361 | int snd_cs46xx_download_image(cs46xx_t *chip) | 361 | int snd_cs46xx_download_image(struct snd_cs46xx *chip) |
362 | { | 362 | { |
363 | int idx, err; | 363 | int idx, err; |
364 | unsigned long offset = 0; | 364 | unsigned long offset = 0; |
@@ -379,7 +379,7 @@ int snd_cs46xx_download_image(cs46xx_t *chip) | |||
379 | * Chip reset | 379 | * Chip reset |
380 | */ | 380 | */ |
381 | 381 | ||
382 | static void snd_cs46xx_reset(cs46xx_t *chip) | 382 | static void snd_cs46xx_reset(struct snd_cs46xx *chip) |
383 | { | 383 | { |
384 | int idx; | 384 | int idx; |
385 | 385 | ||
@@ -408,7 +408,7 @@ static void snd_cs46xx_reset(cs46xx_t *chip) | |||
408 | snd_cs46xx_poke(chip, BA1_FRMT, 0xadf); | 408 | snd_cs46xx_poke(chip, BA1_FRMT, 0xadf); |
409 | } | 409 | } |
410 | 410 | ||
411 | static int cs46xx_wait_for_fifo(cs46xx_t * chip,int retry_timeout) | 411 | static int cs46xx_wait_for_fifo(struct snd_cs46xx * chip,int retry_timeout) |
412 | { | 412 | { |
413 | u32 i, status = 0; | 413 | u32 i, status = 0; |
414 | /* | 414 | /* |
@@ -432,7 +432,7 @@ static int cs46xx_wait_for_fifo(cs46xx_t * chip,int retry_timeout) | |||
432 | return 0; | 432 | return 0; |
433 | } | 433 | } |
434 | 434 | ||
435 | static void snd_cs46xx_clear_serial_FIFOs(cs46xx_t *chip) | 435 | static void snd_cs46xx_clear_serial_FIFOs(struct snd_cs46xx *chip) |
436 | { | 436 | { |
437 | int idx, powerdown = 0; | 437 | int idx, powerdown = 0; |
438 | unsigned int tmp; | 438 | unsigned int tmp; |
@@ -486,7 +486,7 @@ static void snd_cs46xx_clear_serial_FIFOs(cs46xx_t *chip) | |||
486 | snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, tmp); | 486 | snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, tmp); |
487 | } | 487 | } |
488 | 488 | ||
489 | static void snd_cs46xx_proc_start(cs46xx_t *chip) | 489 | static void snd_cs46xx_proc_start(struct snd_cs46xx *chip) |
490 | { | 490 | { |
491 | int cnt; | 491 | int cnt; |
492 | 492 | ||
@@ -513,7 +513,7 @@ static void snd_cs46xx_proc_start(cs46xx_t *chip) | |||
513 | snd_printk(KERN_ERR "SPCR_RUNFR never reset\n"); | 513 | snd_printk(KERN_ERR "SPCR_RUNFR never reset\n"); |
514 | } | 514 | } |
515 | 515 | ||
516 | static void snd_cs46xx_proc_stop(cs46xx_t *chip) | 516 | static void snd_cs46xx_proc_stop(struct snd_cs46xx *chip) |
517 | { | 517 | { |
518 | /* | 518 | /* |
519 | * Turn off the run, run at frame, and DMA enable bits in the local copy of | 519 | * Turn off the run, run at frame, and DMA enable bits in the local copy of |
@@ -528,7 +528,7 @@ static void snd_cs46xx_proc_stop(cs46xx_t *chip) | |||
528 | 528 | ||
529 | #define GOF_PER_SEC 200 | 529 | #define GOF_PER_SEC 200 |
530 | 530 | ||
531 | static void snd_cs46xx_set_play_sample_rate(cs46xx_t *chip, unsigned int rate) | 531 | static void snd_cs46xx_set_play_sample_rate(struct snd_cs46xx *chip, unsigned int rate) |
532 | { | 532 | { |
533 | unsigned long flags; | 533 | unsigned long flags; |
534 | unsigned int tmp1, tmp2; | 534 | unsigned int tmp1, tmp2; |
@@ -574,7 +574,7 @@ static void snd_cs46xx_set_play_sample_rate(cs46xx_t *chip, unsigned int rate) | |||
574 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 574 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
575 | } | 575 | } |
576 | 576 | ||
577 | static void snd_cs46xx_set_capture_sample_rate(cs46xx_t *chip, unsigned int rate) | 577 | static void snd_cs46xx_set_capture_sample_rate(struct snd_cs46xx *chip, unsigned int rate) |
578 | { | 578 | { |
579 | unsigned long flags; | 579 | unsigned long flags; |
580 | unsigned int phiIncr, coeffIncr, tmp1, tmp2; | 580 | unsigned int phiIncr, coeffIncr, tmp1, tmp2; |
@@ -684,43 +684,43 @@ static void snd_cs46xx_set_capture_sample_rate(cs46xx_t *chip, unsigned int rate | |||
684 | * PCM part | 684 | * PCM part |
685 | */ | 685 | */ |
686 | 686 | ||
687 | static void snd_cs46xx_pb_trans_copy(snd_pcm_substream_t *substream, | 687 | static void snd_cs46xx_pb_trans_copy(struct snd_pcm_substream *substream, |
688 | snd_pcm_indirect_t *rec, size_t bytes) | 688 | struct snd_pcm_indirect *rec, size_t bytes) |
689 | { | 689 | { |
690 | snd_pcm_runtime_t *runtime = substream->runtime; | 690 | struct snd_pcm_runtime *runtime = substream->runtime; |
691 | cs46xx_pcm_t * cpcm = runtime->private_data; | 691 | struct snd_cs46xx_pcm * cpcm = runtime->private_data; |
692 | memcpy(cpcm->hw_buf.area + rec->hw_data, runtime->dma_area + rec->sw_data, bytes); | 692 | memcpy(cpcm->hw_buf.area + rec->hw_data, runtime->dma_area + rec->sw_data, bytes); |
693 | } | 693 | } |
694 | 694 | ||
695 | static int snd_cs46xx_playback_transfer(snd_pcm_substream_t *substream) | 695 | static int snd_cs46xx_playback_transfer(struct snd_pcm_substream *substream) |
696 | { | 696 | { |
697 | snd_pcm_runtime_t *runtime = substream->runtime; | 697 | struct snd_pcm_runtime *runtime = substream->runtime; |
698 | cs46xx_pcm_t * cpcm = runtime->private_data; | 698 | struct snd_cs46xx_pcm * cpcm = runtime->private_data; |
699 | snd_pcm_indirect_playback_transfer(substream, &cpcm->pcm_rec, snd_cs46xx_pb_trans_copy); | 699 | snd_pcm_indirect_playback_transfer(substream, &cpcm->pcm_rec, snd_cs46xx_pb_trans_copy); |
700 | return 0; | 700 | return 0; |
701 | } | 701 | } |
702 | 702 | ||
703 | static void snd_cs46xx_cp_trans_copy(snd_pcm_substream_t *substream, | 703 | static void snd_cs46xx_cp_trans_copy(struct snd_pcm_substream *substream, |
704 | snd_pcm_indirect_t *rec, size_t bytes) | 704 | struct snd_pcm_indirect *rec, size_t bytes) |
705 | { | 705 | { |
706 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 706 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
707 | snd_pcm_runtime_t *runtime = substream->runtime; | 707 | struct snd_pcm_runtime *runtime = substream->runtime; |
708 | memcpy(runtime->dma_area + rec->sw_data, | 708 | memcpy(runtime->dma_area + rec->sw_data, |
709 | chip->capt.hw_buf.area + rec->hw_data, bytes); | 709 | chip->capt.hw_buf.area + rec->hw_data, bytes); |
710 | } | 710 | } |
711 | 711 | ||
712 | static int snd_cs46xx_capture_transfer(snd_pcm_substream_t *substream) | 712 | static int snd_cs46xx_capture_transfer(struct snd_pcm_substream *substream) |
713 | { | 713 | { |
714 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 714 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
715 | snd_pcm_indirect_capture_transfer(substream, &chip->capt.pcm_rec, snd_cs46xx_cp_trans_copy); | 715 | snd_pcm_indirect_capture_transfer(substream, &chip->capt.pcm_rec, snd_cs46xx_cp_trans_copy); |
716 | return 0; | 716 | return 0; |
717 | } | 717 | } |
718 | 718 | ||
719 | static snd_pcm_uframes_t snd_cs46xx_playback_direct_pointer(snd_pcm_substream_t * substream) | 719 | static snd_pcm_uframes_t snd_cs46xx_playback_direct_pointer(struct snd_pcm_substream *substream) |
720 | { | 720 | { |
721 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 721 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
722 | size_t ptr; | 722 | size_t ptr; |
723 | cs46xx_pcm_t *cpcm = substream->runtime->private_data; | 723 | struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data; |
724 | snd_assert (cpcm->pcm_channel,return -ENXIO); | 724 | snd_assert (cpcm->pcm_channel,return -ENXIO); |
725 | 725 | ||
726 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 726 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
@@ -732,11 +732,11 @@ static snd_pcm_uframes_t snd_cs46xx_playback_direct_pointer(snd_pcm_substream_t | |||
732 | return ptr >> cpcm->shift; | 732 | return ptr >> cpcm->shift; |
733 | } | 733 | } |
734 | 734 | ||
735 | static snd_pcm_uframes_t snd_cs46xx_playback_indirect_pointer(snd_pcm_substream_t * substream) | 735 | static snd_pcm_uframes_t snd_cs46xx_playback_indirect_pointer(struct snd_pcm_substream *substream) |
736 | { | 736 | { |
737 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 737 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
738 | size_t ptr; | 738 | size_t ptr; |
739 | cs46xx_pcm_t *cpcm = substream->runtime->private_data; | 739 | struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data; |
740 | 740 | ||
741 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 741 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
742 | snd_assert (cpcm->pcm_channel,return -ENXIO); | 742 | snd_assert (cpcm->pcm_channel,return -ENXIO); |
@@ -748,29 +748,29 @@ static snd_pcm_uframes_t snd_cs46xx_playback_indirect_pointer(snd_pcm_substream_ | |||
748 | return snd_pcm_indirect_playback_pointer(substream, &cpcm->pcm_rec, ptr); | 748 | return snd_pcm_indirect_playback_pointer(substream, &cpcm->pcm_rec, ptr); |
749 | } | 749 | } |
750 | 750 | ||
751 | static snd_pcm_uframes_t snd_cs46xx_capture_direct_pointer(snd_pcm_substream_t * substream) | 751 | static snd_pcm_uframes_t snd_cs46xx_capture_direct_pointer(struct snd_pcm_substream *substream) |
752 | { | 752 | { |
753 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 753 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
754 | size_t ptr = snd_cs46xx_peek(chip, BA1_CBA) - chip->capt.hw_buf.addr; | 754 | size_t ptr = snd_cs46xx_peek(chip, BA1_CBA) - chip->capt.hw_buf.addr; |
755 | return ptr >> chip->capt.shift; | 755 | return ptr >> chip->capt.shift; |
756 | } | 756 | } |
757 | 757 | ||
758 | static snd_pcm_uframes_t snd_cs46xx_capture_indirect_pointer(snd_pcm_substream_t * substream) | 758 | static snd_pcm_uframes_t snd_cs46xx_capture_indirect_pointer(struct snd_pcm_substream *substream) |
759 | { | 759 | { |
760 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 760 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
761 | size_t ptr = snd_cs46xx_peek(chip, BA1_CBA) - chip->capt.hw_buf.addr; | 761 | size_t ptr = snd_cs46xx_peek(chip, BA1_CBA) - chip->capt.hw_buf.addr; |
762 | return snd_pcm_indirect_capture_pointer(substream, &chip->capt.pcm_rec, ptr); | 762 | return snd_pcm_indirect_capture_pointer(substream, &chip->capt.pcm_rec, ptr); |
763 | } | 763 | } |
764 | 764 | ||
765 | static int snd_cs46xx_playback_trigger(snd_pcm_substream_t * substream, | 765 | static int snd_cs46xx_playback_trigger(struct snd_pcm_substream *substream, |
766 | int cmd) | 766 | int cmd) |
767 | { | 767 | { |
768 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 768 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
769 | /*snd_pcm_runtime_t *runtime = substream->runtime;*/ | 769 | /*struct snd_pcm_runtime *runtime = substream->runtime;*/ |
770 | int result = 0; | 770 | int result = 0; |
771 | 771 | ||
772 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 772 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
773 | cs46xx_pcm_t *cpcm = substream->runtime->private_data; | 773 | struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data; |
774 | if (! cpcm->pcm_channel) { | 774 | if (! cpcm->pcm_channel) { |
775 | return -ENXIO; | 775 | return -ENXIO; |
776 | } | 776 | } |
@@ -827,10 +827,10 @@ static int snd_cs46xx_playback_trigger(snd_pcm_substream_t * substream, | |||
827 | return result; | 827 | return result; |
828 | } | 828 | } |
829 | 829 | ||
830 | static int snd_cs46xx_capture_trigger(snd_pcm_substream_t * substream, | 830 | static int snd_cs46xx_capture_trigger(struct snd_pcm_substream *substream, |
831 | int cmd) | 831 | int cmd) |
832 | { | 832 | { |
833 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 833 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
834 | unsigned int tmp; | 834 | unsigned int tmp; |
835 | int result = 0; | 835 | int result = 0; |
836 | 836 | ||
@@ -858,7 +858,7 @@ static int snd_cs46xx_capture_trigger(snd_pcm_substream_t * substream, | |||
858 | } | 858 | } |
859 | 859 | ||
860 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 860 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
861 | static int _cs46xx_adjust_sample_rate (cs46xx_t *chip, cs46xx_pcm_t *cpcm, | 861 | static int _cs46xx_adjust_sample_rate (struct snd_cs46xx *chip, struct snd_cs46xx_pcm *cpcm, |
862 | int sample_rate) | 862 | int sample_rate) |
863 | { | 863 | { |
864 | 864 | ||
@@ -893,14 +893,14 @@ static int _cs46xx_adjust_sample_rate (cs46xx_t *chip, cs46xx_pcm_t *cpcm, | |||
893 | #endif | 893 | #endif |
894 | 894 | ||
895 | 895 | ||
896 | static int snd_cs46xx_playback_hw_params(snd_pcm_substream_t * substream, | 896 | static int snd_cs46xx_playback_hw_params(struct snd_pcm_substream *substream, |
897 | snd_pcm_hw_params_t * hw_params) | 897 | struct snd_pcm_hw_params *hw_params) |
898 | { | 898 | { |
899 | snd_pcm_runtime_t *runtime = substream->runtime; | 899 | struct snd_pcm_runtime *runtime = substream->runtime; |
900 | cs46xx_pcm_t *cpcm; | 900 | struct snd_cs46xx_pcm *cpcm; |
901 | int err; | 901 | int err; |
902 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 902 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
903 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 903 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
904 | int sample_rate = params_rate(hw_params); | 904 | int sample_rate = params_rate(hw_params); |
905 | int period_size = params_period_bytes(hw_params); | 905 | int period_size = params_period_bytes(hw_params); |
906 | #endif | 906 | #endif |
@@ -995,11 +995,11 @@ static int snd_cs46xx_playback_hw_params(snd_pcm_substream_t * substream, | |||
995 | return 0; | 995 | return 0; |
996 | } | 996 | } |
997 | 997 | ||
998 | static int snd_cs46xx_playback_hw_free(snd_pcm_substream_t * substream) | 998 | static int snd_cs46xx_playback_hw_free(struct snd_pcm_substream *substream) |
999 | { | 999 | { |
1000 | /*cs46xx_t *chip = snd_pcm_substream_chip(substream);*/ | 1000 | /*struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);*/ |
1001 | snd_pcm_runtime_t *runtime = substream->runtime; | 1001 | struct snd_pcm_runtime *runtime = substream->runtime; |
1002 | cs46xx_pcm_t *cpcm; | 1002 | struct snd_cs46xx_pcm *cpcm; |
1003 | 1003 | ||
1004 | cpcm = runtime->private_data; | 1004 | cpcm = runtime->private_data; |
1005 | 1005 | ||
@@ -1017,13 +1017,13 @@ static int snd_cs46xx_playback_hw_free(snd_pcm_substream_t * substream) | |||
1017 | return 0; | 1017 | return 0; |
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | static int snd_cs46xx_playback_prepare(snd_pcm_substream_t * substream) | 1020 | static int snd_cs46xx_playback_prepare(struct snd_pcm_substream *substream) |
1021 | { | 1021 | { |
1022 | unsigned int tmp; | 1022 | unsigned int tmp; |
1023 | unsigned int pfie; | 1023 | unsigned int pfie; |
1024 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 1024 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
1025 | snd_pcm_runtime_t *runtime = substream->runtime; | 1025 | struct snd_pcm_runtime *runtime = substream->runtime; |
1026 | cs46xx_pcm_t *cpcm; | 1026 | struct snd_cs46xx_pcm *cpcm; |
1027 | 1027 | ||
1028 | cpcm = runtime->private_data; | 1028 | cpcm = runtime->private_data; |
1029 | 1029 | ||
@@ -1087,11 +1087,11 @@ static int snd_cs46xx_playback_prepare(snd_pcm_substream_t * substream) | |||
1087 | return 0; | 1087 | return 0; |
1088 | } | 1088 | } |
1089 | 1089 | ||
1090 | static int snd_cs46xx_capture_hw_params(snd_pcm_substream_t * substream, | 1090 | static int snd_cs46xx_capture_hw_params(struct snd_pcm_substream *substream, |
1091 | snd_pcm_hw_params_t * hw_params) | 1091 | struct snd_pcm_hw_params *hw_params) |
1092 | { | 1092 | { |
1093 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 1093 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
1094 | snd_pcm_runtime_t *runtime = substream->runtime; | 1094 | struct snd_pcm_runtime *runtime = substream->runtime; |
1095 | int err; | 1095 | int err; |
1096 | 1096 | ||
1097 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 1097 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
@@ -1118,10 +1118,10 @@ static int snd_cs46xx_capture_hw_params(snd_pcm_substream_t * substream, | |||
1118 | return 0; | 1118 | return 0; |
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | static int snd_cs46xx_capture_hw_free(snd_pcm_substream_t * substream) | 1121 | static int snd_cs46xx_capture_hw_free(struct snd_pcm_substream *substream) |
1122 | { | 1122 | { |
1123 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 1123 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
1124 | snd_pcm_runtime_t *runtime = substream->runtime; | 1124 | struct snd_pcm_runtime *runtime = substream->runtime; |
1125 | 1125 | ||
1126 | if (runtime->dma_area != chip->capt.hw_buf.area) | 1126 | if (runtime->dma_area != chip->capt.hw_buf.area) |
1127 | snd_pcm_lib_free_pages(substream); | 1127 | snd_pcm_lib_free_pages(substream); |
@@ -1132,10 +1132,10 @@ static int snd_cs46xx_capture_hw_free(snd_pcm_substream_t * substream) | |||
1132 | return 0; | 1132 | return 0; |
1133 | } | 1133 | } |
1134 | 1134 | ||
1135 | static int snd_cs46xx_capture_prepare(snd_pcm_substream_t * substream) | 1135 | static int snd_cs46xx_capture_prepare(struct snd_pcm_substream *substream) |
1136 | { | 1136 | { |
1137 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 1137 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
1138 | snd_pcm_runtime_t *runtime = substream->runtime; | 1138 | struct snd_pcm_runtime *runtime = substream->runtime; |
1139 | 1139 | ||
1140 | snd_cs46xx_poke(chip, BA1_CBA, chip->capt.hw_buf.addr); | 1140 | snd_cs46xx_poke(chip, BA1_CBA, chip->capt.hw_buf.addr); |
1141 | chip->capt.shift = 2; | 1141 | chip->capt.shift = 2; |
@@ -1149,13 +1149,13 @@ static int snd_cs46xx_capture_prepare(snd_pcm_substream_t * substream) | |||
1149 | 1149 | ||
1150 | static irqreturn_t snd_cs46xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 1150 | static irqreturn_t snd_cs46xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
1151 | { | 1151 | { |
1152 | cs46xx_t *chip = dev_id; | 1152 | struct snd_cs46xx *chip = dev_id; |
1153 | u32 status1; | 1153 | u32 status1; |
1154 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 1154 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
1155 | dsp_spos_instance_t * ins = chip->dsp_spos_instance; | 1155 | struct dsp_spos_instance * ins = chip->dsp_spos_instance; |
1156 | u32 status2; | 1156 | u32 status2; |
1157 | int i; | 1157 | int i; |
1158 | cs46xx_pcm_t *cpcm = NULL; | 1158 | struct snd_cs46xx_pcm *cpcm = NULL; |
1159 | #endif | 1159 | #endif |
1160 | 1160 | ||
1161 | /* | 1161 | /* |
@@ -1239,7 +1239,7 @@ static irqreturn_t snd_cs46xx_interrupt(int irq, void *dev_id, struct pt_regs *r | |||
1239 | return IRQ_HANDLED; | 1239 | return IRQ_HANDLED; |
1240 | } | 1240 | } |
1241 | 1241 | ||
1242 | static snd_pcm_hardware_t snd_cs46xx_playback = | 1242 | static struct snd_pcm_hardware snd_cs46xx_playback = |
1243 | { | 1243 | { |
1244 | .info = (SNDRV_PCM_INFO_MMAP | | 1244 | .info = (SNDRV_PCM_INFO_MMAP | |
1245 | SNDRV_PCM_INFO_INTERLEAVED | | 1245 | SNDRV_PCM_INFO_INTERLEAVED | |
@@ -1261,7 +1261,7 @@ static snd_pcm_hardware_t snd_cs46xx_playback = | |||
1261 | .fifo_size = 0, | 1261 | .fifo_size = 0, |
1262 | }; | 1262 | }; |
1263 | 1263 | ||
1264 | static snd_pcm_hardware_t snd_cs46xx_capture = | 1264 | static struct snd_pcm_hardware snd_cs46xx_capture = |
1265 | { | 1265 | { |
1266 | .info = (SNDRV_PCM_INFO_MMAP | | 1266 | .info = (SNDRV_PCM_INFO_MMAP | |
1267 | SNDRV_PCM_INFO_INTERLEAVED | | 1267 | SNDRV_PCM_INFO_INTERLEAVED | |
@@ -1285,7 +1285,7 @@ static snd_pcm_hardware_t snd_cs46xx_capture = | |||
1285 | 1285 | ||
1286 | static unsigned int period_sizes[] = { 32, 64, 128, 256, 512, 1024, 2048 }; | 1286 | static unsigned int period_sizes[] = { 32, 64, 128, 256, 512, 1024, 2048 }; |
1287 | 1287 | ||
1288 | static snd_pcm_hw_constraint_list_t hw_constraints_period_sizes = { | 1288 | static struct snd_pcm_hw_constraint_list hw_constraints_period_sizes = { |
1289 | .count = ARRAY_SIZE(period_sizes), | 1289 | .count = ARRAY_SIZE(period_sizes), |
1290 | .list = period_sizes, | 1290 | .list = period_sizes, |
1291 | .mask = 0 | 1291 | .mask = 0 |
@@ -1293,16 +1293,16 @@ static snd_pcm_hw_constraint_list_t hw_constraints_period_sizes = { | |||
1293 | 1293 | ||
1294 | #endif | 1294 | #endif |
1295 | 1295 | ||
1296 | static void snd_cs46xx_pcm_free_substream(snd_pcm_runtime_t *runtime) | 1296 | static void snd_cs46xx_pcm_free_substream(struct snd_pcm_runtime *runtime) |
1297 | { | 1297 | { |
1298 | kfree(runtime->private_data); | 1298 | kfree(runtime->private_data); |
1299 | } | 1299 | } |
1300 | 1300 | ||
1301 | static int _cs46xx_playback_open_channel (snd_pcm_substream_t * substream,int pcm_channel_id) | 1301 | static int _cs46xx_playback_open_channel (struct snd_pcm_substream *substream,int pcm_channel_id) |
1302 | { | 1302 | { |
1303 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 1303 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
1304 | cs46xx_pcm_t * cpcm; | 1304 | struct snd_cs46xx_pcm * cpcm; |
1305 | snd_pcm_runtime_t *runtime = substream->runtime; | 1305 | struct snd_pcm_runtime *runtime = substream->runtime; |
1306 | 1306 | ||
1307 | cpcm = kzalloc(sizeof(*cpcm), GFP_KERNEL); | 1307 | cpcm = kzalloc(sizeof(*cpcm), GFP_KERNEL); |
1308 | if (cpcm == NULL) | 1308 | if (cpcm == NULL) |
@@ -1340,30 +1340,30 @@ static int _cs46xx_playback_open_channel (snd_pcm_substream_t * substream,int pc | |||
1340 | return 0; | 1340 | return 0; |
1341 | } | 1341 | } |
1342 | 1342 | ||
1343 | static int snd_cs46xx_playback_open(snd_pcm_substream_t * substream) | 1343 | static int snd_cs46xx_playback_open(struct snd_pcm_substream *substream) |
1344 | { | 1344 | { |
1345 | snd_printdd("open front channel\n"); | 1345 | snd_printdd("open front channel\n"); |
1346 | return _cs46xx_playback_open_channel(substream,DSP_PCM_MAIN_CHANNEL); | 1346 | return _cs46xx_playback_open_channel(substream,DSP_PCM_MAIN_CHANNEL); |
1347 | } | 1347 | } |
1348 | 1348 | ||
1349 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 1349 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
1350 | static int snd_cs46xx_playback_open_rear(snd_pcm_substream_t * substream) | 1350 | static int snd_cs46xx_playback_open_rear(struct snd_pcm_substream *substream) |
1351 | { | 1351 | { |
1352 | snd_printdd("open rear channel\n"); | 1352 | snd_printdd("open rear channel\n"); |
1353 | 1353 | ||
1354 | return _cs46xx_playback_open_channel(substream,DSP_PCM_REAR_CHANNEL); | 1354 | return _cs46xx_playback_open_channel(substream,DSP_PCM_REAR_CHANNEL); |
1355 | } | 1355 | } |
1356 | 1356 | ||
1357 | static int snd_cs46xx_playback_open_clfe(snd_pcm_substream_t * substream) | 1357 | static int snd_cs46xx_playback_open_clfe(struct snd_pcm_substream *substream) |
1358 | { | 1358 | { |
1359 | snd_printdd("open center - LFE channel\n"); | 1359 | snd_printdd("open center - LFE channel\n"); |
1360 | 1360 | ||
1361 | return _cs46xx_playback_open_channel(substream,DSP_PCM_CENTER_LFE_CHANNEL); | 1361 | return _cs46xx_playback_open_channel(substream,DSP_PCM_CENTER_LFE_CHANNEL); |
1362 | } | 1362 | } |
1363 | 1363 | ||
1364 | static int snd_cs46xx_playback_open_iec958(snd_pcm_substream_t * substream) | 1364 | static int snd_cs46xx_playback_open_iec958(struct snd_pcm_substream *substream) |
1365 | { | 1365 | { |
1366 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 1366 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
1367 | 1367 | ||
1368 | snd_printdd("open raw iec958 channel\n"); | 1368 | snd_printdd("open raw iec958 channel\n"); |
1369 | 1369 | ||
@@ -1374,12 +1374,12 @@ static int snd_cs46xx_playback_open_iec958(snd_pcm_substream_t * substream) | |||
1374 | return _cs46xx_playback_open_channel(substream,DSP_IEC958_CHANNEL); | 1374 | return _cs46xx_playback_open_channel(substream,DSP_IEC958_CHANNEL); |
1375 | } | 1375 | } |
1376 | 1376 | ||
1377 | static int snd_cs46xx_playback_close(snd_pcm_substream_t * substream); | 1377 | static int snd_cs46xx_playback_close(struct snd_pcm_substream *substream); |
1378 | 1378 | ||
1379 | static int snd_cs46xx_playback_close_iec958(snd_pcm_substream_t * substream) | 1379 | static int snd_cs46xx_playback_close_iec958(struct snd_pcm_substream *substream) |
1380 | { | 1380 | { |
1381 | int err; | 1381 | int err; |
1382 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 1382 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
1383 | 1383 | ||
1384 | snd_printdd("close raw iec958 channel\n"); | 1384 | snd_printdd("close raw iec958 channel\n"); |
1385 | 1385 | ||
@@ -1393,9 +1393,9 @@ static int snd_cs46xx_playback_close_iec958(snd_pcm_substream_t * substream) | |||
1393 | } | 1393 | } |
1394 | #endif | 1394 | #endif |
1395 | 1395 | ||
1396 | static int snd_cs46xx_capture_open(snd_pcm_substream_t * substream) | 1396 | static int snd_cs46xx_capture_open(struct snd_pcm_substream *substream) |
1397 | { | 1397 | { |
1398 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 1398 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
1399 | 1399 | ||
1400 | if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), | 1400 | if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), |
1401 | PAGE_SIZE, &chip->capt.hw_buf) < 0) | 1401 | PAGE_SIZE, &chip->capt.hw_buf) < 0) |
@@ -1416,11 +1416,11 @@ static int snd_cs46xx_capture_open(snd_pcm_substream_t * substream) | |||
1416 | return 0; | 1416 | return 0; |
1417 | } | 1417 | } |
1418 | 1418 | ||
1419 | static int snd_cs46xx_playback_close(snd_pcm_substream_t * substream) | 1419 | static int snd_cs46xx_playback_close(struct snd_pcm_substream *substream) |
1420 | { | 1420 | { |
1421 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 1421 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
1422 | snd_pcm_runtime_t *runtime = substream->runtime; | 1422 | struct snd_pcm_runtime *runtime = substream->runtime; |
1423 | cs46xx_pcm_t * cpcm; | 1423 | struct snd_cs46xx_pcm * cpcm; |
1424 | 1424 | ||
1425 | cpcm = runtime->private_data; | 1425 | cpcm = runtime->private_data; |
1426 | 1426 | ||
@@ -1445,9 +1445,9 @@ static int snd_cs46xx_playback_close(snd_pcm_substream_t * substream) | |||
1445 | return 0; | 1445 | return 0; |
1446 | } | 1446 | } |
1447 | 1447 | ||
1448 | static int snd_cs46xx_capture_close(snd_pcm_substream_t * substream) | 1448 | static int snd_cs46xx_capture_close(struct snd_pcm_substream *substream) |
1449 | { | 1449 | { |
1450 | cs46xx_t *chip = snd_pcm_substream_chip(substream); | 1450 | struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); |
1451 | 1451 | ||
1452 | chip->capt.substream = NULL; | 1452 | chip->capt.substream = NULL; |
1453 | snd_dma_free_pages(&chip->capt.hw_buf); | 1453 | snd_dma_free_pages(&chip->capt.hw_buf); |
@@ -1457,7 +1457,7 @@ static int snd_cs46xx_capture_close(snd_pcm_substream_t * substream) | |||
1457 | } | 1457 | } |
1458 | 1458 | ||
1459 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 1459 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
1460 | static snd_pcm_ops_t snd_cs46xx_playback_rear_ops = { | 1460 | static struct snd_pcm_ops snd_cs46xx_playback_rear_ops = { |
1461 | .open = snd_cs46xx_playback_open_rear, | 1461 | .open = snd_cs46xx_playback_open_rear, |
1462 | .close = snd_cs46xx_playback_close, | 1462 | .close = snd_cs46xx_playback_close, |
1463 | .ioctl = snd_pcm_lib_ioctl, | 1463 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1468,7 +1468,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_rear_ops = { | |||
1468 | .pointer = snd_cs46xx_playback_direct_pointer, | 1468 | .pointer = snd_cs46xx_playback_direct_pointer, |
1469 | }; | 1469 | }; |
1470 | 1470 | ||
1471 | static snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops = { | 1471 | static struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops = { |
1472 | .open = snd_cs46xx_playback_open_rear, | 1472 | .open = snd_cs46xx_playback_open_rear, |
1473 | .close = snd_cs46xx_playback_close, | 1473 | .close = snd_cs46xx_playback_close, |
1474 | .ioctl = snd_pcm_lib_ioctl, | 1474 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1480,7 +1480,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops = { | |||
1480 | .ack = snd_cs46xx_playback_transfer, | 1480 | .ack = snd_cs46xx_playback_transfer, |
1481 | }; | 1481 | }; |
1482 | 1482 | ||
1483 | static snd_pcm_ops_t snd_cs46xx_playback_clfe_ops = { | 1483 | static struct snd_pcm_ops snd_cs46xx_playback_clfe_ops = { |
1484 | .open = snd_cs46xx_playback_open_clfe, | 1484 | .open = snd_cs46xx_playback_open_clfe, |
1485 | .close = snd_cs46xx_playback_close, | 1485 | .close = snd_cs46xx_playback_close, |
1486 | .ioctl = snd_pcm_lib_ioctl, | 1486 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1491,7 +1491,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_clfe_ops = { | |||
1491 | .pointer = snd_cs46xx_playback_direct_pointer, | 1491 | .pointer = snd_cs46xx_playback_direct_pointer, |
1492 | }; | 1492 | }; |
1493 | 1493 | ||
1494 | static snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops = { | 1494 | static struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops = { |
1495 | .open = snd_cs46xx_playback_open_clfe, | 1495 | .open = snd_cs46xx_playback_open_clfe, |
1496 | .close = snd_cs46xx_playback_close, | 1496 | .close = snd_cs46xx_playback_close, |
1497 | .ioctl = snd_pcm_lib_ioctl, | 1497 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1503,7 +1503,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops = { | |||
1503 | .ack = snd_cs46xx_playback_transfer, | 1503 | .ack = snd_cs46xx_playback_transfer, |
1504 | }; | 1504 | }; |
1505 | 1505 | ||
1506 | static snd_pcm_ops_t snd_cs46xx_playback_iec958_ops = { | 1506 | static struct snd_pcm_ops snd_cs46xx_playback_iec958_ops = { |
1507 | .open = snd_cs46xx_playback_open_iec958, | 1507 | .open = snd_cs46xx_playback_open_iec958, |
1508 | .close = snd_cs46xx_playback_close_iec958, | 1508 | .close = snd_cs46xx_playback_close_iec958, |
1509 | .ioctl = snd_pcm_lib_ioctl, | 1509 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1514,7 +1514,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_iec958_ops = { | |||
1514 | .pointer = snd_cs46xx_playback_direct_pointer, | 1514 | .pointer = snd_cs46xx_playback_direct_pointer, |
1515 | }; | 1515 | }; |
1516 | 1516 | ||
1517 | static snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops = { | 1517 | static struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops = { |
1518 | .open = snd_cs46xx_playback_open_iec958, | 1518 | .open = snd_cs46xx_playback_open_iec958, |
1519 | .close = snd_cs46xx_playback_close_iec958, | 1519 | .close = snd_cs46xx_playback_close_iec958, |
1520 | .ioctl = snd_pcm_lib_ioctl, | 1520 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1528,7 +1528,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops = { | |||
1528 | 1528 | ||
1529 | #endif | 1529 | #endif |
1530 | 1530 | ||
1531 | static snd_pcm_ops_t snd_cs46xx_playback_ops = { | 1531 | static struct snd_pcm_ops snd_cs46xx_playback_ops = { |
1532 | .open = snd_cs46xx_playback_open, | 1532 | .open = snd_cs46xx_playback_open, |
1533 | .close = snd_cs46xx_playback_close, | 1533 | .close = snd_cs46xx_playback_close, |
1534 | .ioctl = snd_pcm_lib_ioctl, | 1534 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1539,7 +1539,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_ops = { | |||
1539 | .pointer = snd_cs46xx_playback_direct_pointer, | 1539 | .pointer = snd_cs46xx_playback_direct_pointer, |
1540 | }; | 1540 | }; |
1541 | 1541 | ||
1542 | static snd_pcm_ops_t snd_cs46xx_playback_indirect_ops = { | 1542 | static struct snd_pcm_ops snd_cs46xx_playback_indirect_ops = { |
1543 | .open = snd_cs46xx_playback_open, | 1543 | .open = snd_cs46xx_playback_open, |
1544 | .close = snd_cs46xx_playback_close, | 1544 | .close = snd_cs46xx_playback_close, |
1545 | .ioctl = snd_pcm_lib_ioctl, | 1545 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1551,7 +1551,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_indirect_ops = { | |||
1551 | .ack = snd_cs46xx_playback_transfer, | 1551 | .ack = snd_cs46xx_playback_transfer, |
1552 | }; | 1552 | }; |
1553 | 1553 | ||
1554 | static snd_pcm_ops_t snd_cs46xx_capture_ops = { | 1554 | static struct snd_pcm_ops snd_cs46xx_capture_ops = { |
1555 | .open = snd_cs46xx_capture_open, | 1555 | .open = snd_cs46xx_capture_open, |
1556 | .close = snd_cs46xx_capture_close, | 1556 | .close = snd_cs46xx_capture_close, |
1557 | .ioctl = snd_pcm_lib_ioctl, | 1557 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1562,7 +1562,7 @@ static snd_pcm_ops_t snd_cs46xx_capture_ops = { | |||
1562 | .pointer = snd_cs46xx_capture_direct_pointer, | 1562 | .pointer = snd_cs46xx_capture_direct_pointer, |
1563 | }; | 1563 | }; |
1564 | 1564 | ||
1565 | static snd_pcm_ops_t snd_cs46xx_capture_indirect_ops = { | 1565 | static struct snd_pcm_ops snd_cs46xx_capture_indirect_ops = { |
1566 | .open = snd_cs46xx_capture_open, | 1566 | .open = snd_cs46xx_capture_open, |
1567 | .close = snd_cs46xx_capture_close, | 1567 | .close = snd_cs46xx_capture_close, |
1568 | .ioctl = snd_pcm_lib_ioctl, | 1568 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1580,9 +1580,9 @@ static snd_pcm_ops_t snd_cs46xx_capture_indirect_ops = { | |||
1580 | #define MAX_PLAYBACK_CHANNELS 1 | 1580 | #define MAX_PLAYBACK_CHANNELS 1 |
1581 | #endif | 1581 | #endif |
1582 | 1582 | ||
1583 | int __devinit snd_cs46xx_pcm(cs46xx_t *chip, int device, snd_pcm_t ** rpcm) | 1583 | int __devinit snd_cs46xx_pcm(struct snd_cs46xx *chip, int device, struct snd_pcm ** rpcm) |
1584 | { | 1584 | { |
1585 | snd_pcm_t *pcm; | 1585 | struct snd_pcm *pcm; |
1586 | int err; | 1586 | int err; |
1587 | 1587 | ||
1588 | if (rpcm) | 1588 | if (rpcm) |
@@ -1611,9 +1611,9 @@ int __devinit snd_cs46xx_pcm(cs46xx_t *chip, int device, snd_pcm_t ** rpcm) | |||
1611 | 1611 | ||
1612 | 1612 | ||
1613 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 1613 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
1614 | int __devinit snd_cs46xx_pcm_rear(cs46xx_t *chip, int device, snd_pcm_t ** rpcm) | 1614 | int __devinit snd_cs46xx_pcm_rear(struct snd_cs46xx *chip, int device, struct snd_pcm ** rpcm) |
1615 | { | 1615 | { |
1616 | snd_pcm_t *pcm; | 1616 | struct snd_pcm *pcm; |
1617 | int err; | 1617 | int err; |
1618 | 1618 | ||
1619 | if (rpcm) | 1619 | if (rpcm) |
@@ -1640,9 +1640,9 @@ int __devinit snd_cs46xx_pcm_rear(cs46xx_t *chip, int device, snd_pcm_t ** rpcm) | |||
1640 | return 0; | 1640 | return 0; |
1641 | } | 1641 | } |
1642 | 1642 | ||
1643 | int __devinit snd_cs46xx_pcm_center_lfe(cs46xx_t *chip, int device, snd_pcm_t ** rpcm) | 1643 | int __devinit snd_cs46xx_pcm_center_lfe(struct snd_cs46xx *chip, int device, struct snd_pcm ** rpcm) |
1644 | { | 1644 | { |
1645 | snd_pcm_t *pcm; | 1645 | struct snd_pcm *pcm; |
1646 | int err; | 1646 | int err; |
1647 | 1647 | ||
1648 | if (rpcm) | 1648 | if (rpcm) |
@@ -1669,9 +1669,9 @@ int __devinit snd_cs46xx_pcm_center_lfe(cs46xx_t *chip, int device, snd_pcm_t ** | |||
1669 | return 0; | 1669 | return 0; |
1670 | } | 1670 | } |
1671 | 1671 | ||
1672 | int __devinit snd_cs46xx_pcm_iec958(cs46xx_t *chip, int device, snd_pcm_t ** rpcm) | 1672 | int __devinit snd_cs46xx_pcm_iec958(struct snd_cs46xx *chip, int device, struct snd_pcm ** rpcm) |
1673 | { | 1673 | { |
1674 | snd_pcm_t *pcm; | 1674 | struct snd_pcm *pcm; |
1675 | int err; | 1675 | int err; |
1676 | 1676 | ||
1677 | if (rpcm) | 1677 | if (rpcm) |
@@ -1702,16 +1702,16 @@ int __devinit snd_cs46xx_pcm_iec958(cs46xx_t *chip, int device, snd_pcm_t ** rpc | |||
1702 | /* | 1702 | /* |
1703 | * Mixer routines | 1703 | * Mixer routines |
1704 | */ | 1704 | */ |
1705 | static void snd_cs46xx_mixer_free_ac97_bus(ac97_bus_t *bus) | 1705 | static void snd_cs46xx_mixer_free_ac97_bus(struct snd_ac97_bus *bus) |
1706 | { | 1706 | { |
1707 | cs46xx_t *chip = bus->private_data; | 1707 | struct snd_cs46xx *chip = bus->private_data; |
1708 | 1708 | ||
1709 | chip->ac97_bus = NULL; | 1709 | chip->ac97_bus = NULL; |
1710 | } | 1710 | } |
1711 | 1711 | ||
1712 | static void snd_cs46xx_mixer_free_ac97(ac97_t *ac97) | 1712 | static void snd_cs46xx_mixer_free_ac97(struct snd_ac97 *ac97) |
1713 | { | 1713 | { |
1714 | cs46xx_t *chip = ac97->private_data; | 1714 | struct snd_cs46xx *chip = ac97->private_data; |
1715 | 1715 | ||
1716 | snd_assert ((ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]) || | 1716 | snd_assert ((ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]) || |
1717 | (ac97 == chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]), | 1717 | (ac97 == chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]), |
@@ -1725,8 +1725,8 @@ static void snd_cs46xx_mixer_free_ac97(ac97_t *ac97) | |||
1725 | chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] = NULL; | 1725 | chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] = NULL; |
1726 | } | 1726 | } |
1727 | 1727 | ||
1728 | static int snd_cs46xx_vol_info(snd_kcontrol_t *kcontrol, | 1728 | static int snd_cs46xx_vol_info(struct snd_kcontrol *kcontrol, |
1729 | snd_ctl_elem_info_t *uinfo) | 1729 | struct snd_ctl_elem_info *uinfo) |
1730 | { | 1730 | { |
1731 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 1731 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
1732 | uinfo->count = 2; | 1732 | uinfo->count = 2; |
@@ -1735,9 +1735,9 @@ static int snd_cs46xx_vol_info(snd_kcontrol_t *kcontrol, | |||
1735 | return 0; | 1735 | return 0; |
1736 | } | 1736 | } |
1737 | 1737 | ||
1738 | static int snd_cs46xx_vol_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1738 | static int snd_cs46xx_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1739 | { | 1739 | { |
1740 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1740 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1741 | int reg = kcontrol->private_value; | 1741 | int reg = kcontrol->private_value; |
1742 | unsigned int val = snd_cs46xx_peek(chip, reg); | 1742 | unsigned int val = snd_cs46xx_peek(chip, reg); |
1743 | ucontrol->value.integer.value[0] = 0xffff - (val >> 16); | 1743 | ucontrol->value.integer.value[0] = 0xffff - (val >> 16); |
@@ -1745,9 +1745,9 @@ static int snd_cs46xx_vol_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * | |||
1745 | return 0; | 1745 | return 0; |
1746 | } | 1746 | } |
1747 | 1747 | ||
1748 | static int snd_cs46xx_vol_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1748 | static int snd_cs46xx_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1749 | { | 1749 | { |
1750 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1750 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1751 | int reg = kcontrol->private_value; | 1751 | int reg = kcontrol->private_value; |
1752 | unsigned int val = ((0xffff - ucontrol->value.integer.value[0]) << 16 | | 1752 | unsigned int val = ((0xffff - ucontrol->value.integer.value[0]) << 16 | |
1753 | (0xffff - ucontrol->value.integer.value[1])); | 1753 | (0xffff - ucontrol->value.integer.value[1])); |
@@ -1763,9 +1763,9 @@ static int snd_cs46xx_vol_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * | |||
1763 | 1763 | ||
1764 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 1764 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
1765 | 1765 | ||
1766 | static int snd_cs46xx_vol_dac_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1766 | static int snd_cs46xx_vol_dac_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1767 | { | 1767 | { |
1768 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1768 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1769 | 1769 | ||
1770 | ucontrol->value.integer.value[0] = chip->dsp_spos_instance->dac_volume_left; | 1770 | ucontrol->value.integer.value[0] = chip->dsp_spos_instance->dac_volume_left; |
1771 | ucontrol->value.integer.value[1] = chip->dsp_spos_instance->dac_volume_right; | 1771 | ucontrol->value.integer.value[1] = chip->dsp_spos_instance->dac_volume_right; |
@@ -1773,9 +1773,9 @@ static int snd_cs46xx_vol_dac_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ | |||
1773 | return 0; | 1773 | return 0; |
1774 | } | 1774 | } |
1775 | 1775 | ||
1776 | static int snd_cs46xx_vol_dac_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1776 | static int snd_cs46xx_vol_dac_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1777 | { | 1777 | { |
1778 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1778 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1779 | int change = 0; | 1779 | int change = 0; |
1780 | 1780 | ||
1781 | if (chip->dsp_spos_instance->dac_volume_right != ucontrol->value.integer.value[0] || | 1781 | if (chip->dsp_spos_instance->dac_volume_right != ucontrol->value.integer.value[0] || |
@@ -1790,18 +1790,18 @@ static int snd_cs46xx_vol_dac_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ | |||
1790 | } | 1790 | } |
1791 | 1791 | ||
1792 | #if 0 | 1792 | #if 0 |
1793 | static int snd_cs46xx_vol_iec958_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1793 | static int snd_cs46xx_vol_iec958_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1794 | { | 1794 | { |
1795 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1795 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1796 | 1796 | ||
1797 | ucontrol->value.integer.value[0] = chip->dsp_spos_instance->spdif_input_volume_left; | 1797 | ucontrol->value.integer.value[0] = chip->dsp_spos_instance->spdif_input_volume_left; |
1798 | ucontrol->value.integer.value[1] = chip->dsp_spos_instance->spdif_input_volume_right; | 1798 | ucontrol->value.integer.value[1] = chip->dsp_spos_instance->spdif_input_volume_right; |
1799 | return 0; | 1799 | return 0; |
1800 | } | 1800 | } |
1801 | 1801 | ||
1802 | static int snd_cs46xx_vol_iec958_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1802 | static int snd_cs46xx_vol_iec958_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1803 | { | 1803 | { |
1804 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1804 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1805 | int change = 0; | 1805 | int change = 0; |
1806 | 1806 | ||
1807 | if (chip->dsp_spos_instance->spdif_input_volume_left != ucontrol->value.integer.value[0] || | 1807 | if (chip->dsp_spos_instance->spdif_input_volume_left != ucontrol->value.integer.value[0] || |
@@ -1816,8 +1816,8 @@ static int snd_cs46xx_vol_iec958_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_val | |||
1816 | } | 1816 | } |
1817 | #endif | 1817 | #endif |
1818 | 1818 | ||
1819 | static int snd_mixer_boolean_info(snd_kcontrol_t *kcontrol, | 1819 | static int snd_mixer_boolean_info(struct snd_kcontrol *kcontrol, |
1820 | snd_ctl_elem_info_t *uinfo) | 1820 | struct snd_ctl_elem_info *uinfo) |
1821 | { | 1821 | { |
1822 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 1822 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
1823 | uinfo->count = 1; | 1823 | uinfo->count = 1; |
@@ -1826,10 +1826,10 @@ static int snd_mixer_boolean_info(snd_kcontrol_t *kcontrol, | |||
1826 | return 0; | 1826 | return 0; |
1827 | } | 1827 | } |
1828 | 1828 | ||
1829 | static int snd_cs46xx_iec958_get(snd_kcontrol_t *kcontrol, | 1829 | static int snd_cs46xx_iec958_get(struct snd_kcontrol *kcontrol, |
1830 | snd_ctl_elem_value_t *ucontrol) | 1830 | struct snd_ctl_elem_value *ucontrol) |
1831 | { | 1831 | { |
1832 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1832 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1833 | int reg = kcontrol->private_value; | 1833 | int reg = kcontrol->private_value; |
1834 | 1834 | ||
1835 | if (reg == CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT) | 1835 | if (reg == CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT) |
@@ -1840,10 +1840,10 @@ static int snd_cs46xx_iec958_get(snd_kcontrol_t *kcontrol, | |||
1840 | return 0; | 1840 | return 0; |
1841 | } | 1841 | } |
1842 | 1842 | ||
1843 | static int snd_cs46xx_iec958_put(snd_kcontrol_t *kcontrol, | 1843 | static int snd_cs46xx_iec958_put(struct snd_kcontrol *kcontrol, |
1844 | snd_ctl_elem_value_t *ucontrol) | 1844 | struct snd_ctl_elem_value *ucontrol) |
1845 | { | 1845 | { |
1846 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1846 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1847 | int change, res; | 1847 | int change, res; |
1848 | 1848 | ||
1849 | switch (kcontrol->private_value) { | 1849 | switch (kcontrol->private_value) { |
@@ -1877,11 +1877,11 @@ static int snd_cs46xx_iec958_put(snd_kcontrol_t *kcontrol, | |||
1877 | return res; | 1877 | return res; |
1878 | } | 1878 | } |
1879 | 1879 | ||
1880 | static int snd_cs46xx_adc_capture_get(snd_kcontrol_t *kcontrol, | 1880 | static int snd_cs46xx_adc_capture_get(struct snd_kcontrol *kcontrol, |
1881 | snd_ctl_elem_value_t *ucontrol) | 1881 | struct snd_ctl_elem_value *ucontrol) |
1882 | { | 1882 | { |
1883 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1883 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1884 | dsp_spos_instance_t * ins = chip->dsp_spos_instance; | 1884 | struct dsp_spos_instance * ins = chip->dsp_spos_instance; |
1885 | 1885 | ||
1886 | if (ins->adc_input != NULL) | 1886 | if (ins->adc_input != NULL) |
1887 | ucontrol->value.integer.value[0] = 1; | 1887 | ucontrol->value.integer.value[0] = 1; |
@@ -1891,11 +1891,11 @@ static int snd_cs46xx_adc_capture_get(snd_kcontrol_t *kcontrol, | |||
1891 | return 0; | 1891 | return 0; |
1892 | } | 1892 | } |
1893 | 1893 | ||
1894 | static int snd_cs46xx_adc_capture_put(snd_kcontrol_t *kcontrol, | 1894 | static int snd_cs46xx_adc_capture_put(struct snd_kcontrol *kcontrol, |
1895 | snd_ctl_elem_value_t *ucontrol) | 1895 | struct snd_ctl_elem_value *ucontrol) |
1896 | { | 1896 | { |
1897 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1897 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1898 | dsp_spos_instance_t * ins = chip->dsp_spos_instance; | 1898 | struct dsp_spos_instance * ins = chip->dsp_spos_instance; |
1899 | int change = 0; | 1899 | int change = 0; |
1900 | 1900 | ||
1901 | if (ucontrol->value.integer.value[0] && !ins->adc_input) { | 1901 | if (ucontrol->value.integer.value[0] && !ins->adc_input) { |
@@ -1908,11 +1908,11 @@ static int snd_cs46xx_adc_capture_put(snd_kcontrol_t *kcontrol, | |||
1908 | return change; | 1908 | return change; |
1909 | } | 1909 | } |
1910 | 1910 | ||
1911 | static int snd_cs46xx_pcm_capture_get(snd_kcontrol_t *kcontrol, | 1911 | static int snd_cs46xx_pcm_capture_get(struct snd_kcontrol *kcontrol, |
1912 | snd_ctl_elem_value_t *ucontrol) | 1912 | struct snd_ctl_elem_value *ucontrol) |
1913 | { | 1913 | { |
1914 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1914 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1915 | dsp_spos_instance_t * ins = chip->dsp_spos_instance; | 1915 | struct dsp_spos_instance * ins = chip->dsp_spos_instance; |
1916 | 1916 | ||
1917 | if (ins->pcm_input != NULL) | 1917 | if (ins->pcm_input != NULL) |
1918 | ucontrol->value.integer.value[0] = 1; | 1918 | ucontrol->value.integer.value[0] = 1; |
@@ -1923,11 +1923,11 @@ static int snd_cs46xx_pcm_capture_get(snd_kcontrol_t *kcontrol, | |||
1923 | } | 1923 | } |
1924 | 1924 | ||
1925 | 1925 | ||
1926 | static int snd_cs46xx_pcm_capture_put(snd_kcontrol_t *kcontrol, | 1926 | static int snd_cs46xx_pcm_capture_put(struct snd_kcontrol *kcontrol, |
1927 | snd_ctl_elem_value_t *ucontrol) | 1927 | struct snd_ctl_elem_value *ucontrol) |
1928 | { | 1928 | { |
1929 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1929 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1930 | dsp_spos_instance_t * ins = chip->dsp_spos_instance; | 1930 | struct dsp_spos_instance * ins = chip->dsp_spos_instance; |
1931 | int change = 0; | 1931 | int change = 0; |
1932 | 1932 | ||
1933 | if (ucontrol->value.integer.value[0] && !ins->pcm_input) { | 1933 | if (ucontrol->value.integer.value[0] && !ins->pcm_input) { |
@@ -1941,10 +1941,10 @@ static int snd_cs46xx_pcm_capture_put(snd_kcontrol_t *kcontrol, | |||
1941 | return change; | 1941 | return change; |
1942 | } | 1942 | } |
1943 | 1943 | ||
1944 | static int snd_herc_spdif_select_get(snd_kcontrol_t *kcontrol, | 1944 | static int snd_herc_spdif_select_get(struct snd_kcontrol *kcontrol, |
1945 | snd_ctl_elem_value_t *ucontrol) | 1945 | struct snd_ctl_elem_value *ucontrol) |
1946 | { | 1946 | { |
1947 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1947 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1948 | 1948 | ||
1949 | int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR); | 1949 | int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR); |
1950 | 1950 | ||
@@ -1959,10 +1959,10 @@ static int snd_herc_spdif_select_get(snd_kcontrol_t *kcontrol, | |||
1959 | /* | 1959 | /* |
1960 | * Game Theatre XP card - EGPIO[0] is used to select SPDIF input optical or coaxial. | 1960 | * Game Theatre XP card - EGPIO[0] is used to select SPDIF input optical or coaxial. |
1961 | */ | 1961 | */ |
1962 | static int snd_herc_spdif_select_put(snd_kcontrol_t *kcontrol, | 1962 | static int snd_herc_spdif_select_put(struct snd_kcontrol *kcontrol, |
1963 | snd_ctl_elem_value_t *ucontrol) | 1963 | struct snd_ctl_elem_value *ucontrol) |
1964 | { | 1964 | { |
1965 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1965 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1966 | int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR); | 1966 | int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR); |
1967 | int val2 = snd_cs46xx_peekBA0(chip, BA0_EGPIOPTR); | 1967 | int val2 = snd_cs46xx_peekBA0(chip, BA0_EGPIOPTR); |
1968 | 1968 | ||
@@ -1984,18 +1984,18 @@ static int snd_herc_spdif_select_put(snd_kcontrol_t *kcontrol, | |||
1984 | } | 1984 | } |
1985 | 1985 | ||
1986 | 1986 | ||
1987 | static int snd_cs46xx_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 1987 | static int snd_cs46xx_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
1988 | { | 1988 | { |
1989 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; | 1989 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; |
1990 | uinfo->count = 1; | 1990 | uinfo->count = 1; |
1991 | return 0; | 1991 | return 0; |
1992 | } | 1992 | } |
1993 | 1993 | ||
1994 | static int snd_cs46xx_spdif_default_get(snd_kcontrol_t * kcontrol, | 1994 | static int snd_cs46xx_spdif_default_get(struct snd_kcontrol *kcontrol, |
1995 | snd_ctl_elem_value_t * ucontrol) | 1995 | struct snd_ctl_elem_value *ucontrol) |
1996 | { | 1996 | { |
1997 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 1997 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
1998 | dsp_spos_instance_t * ins = chip->dsp_spos_instance; | 1998 | struct dsp_spos_instance * ins = chip->dsp_spos_instance; |
1999 | 1999 | ||
2000 | down (&chip->spos_mutex); | 2000 | down (&chip->spos_mutex); |
2001 | ucontrol->value.iec958.status[0] = _wrap_all_bits((ins->spdif_csuv_default >> 24) & 0xff); | 2001 | ucontrol->value.iec958.status[0] = _wrap_all_bits((ins->spdif_csuv_default >> 24) & 0xff); |
@@ -2007,11 +2007,11 @@ static int snd_cs46xx_spdif_default_get(snd_kcontrol_t * kcontrol, | |||
2007 | return 0; | 2007 | return 0; |
2008 | } | 2008 | } |
2009 | 2009 | ||
2010 | static int snd_cs46xx_spdif_default_put(snd_kcontrol_t * kcontrol, | 2010 | static int snd_cs46xx_spdif_default_put(struct snd_kcontrol *kcontrol, |
2011 | snd_ctl_elem_value_t * ucontrol) | 2011 | struct snd_ctl_elem_value *ucontrol) |
2012 | { | 2012 | { |
2013 | cs46xx_t * chip = snd_kcontrol_chip(kcontrol); | 2013 | struct snd_cs46xx * chip = snd_kcontrol_chip(kcontrol); |
2014 | dsp_spos_instance_t * ins = chip->dsp_spos_instance; | 2014 | struct dsp_spos_instance * ins = chip->dsp_spos_instance; |
2015 | unsigned int val; | 2015 | unsigned int val; |
2016 | int change; | 2016 | int change; |
2017 | 2017 | ||
@@ -2034,8 +2034,8 @@ static int snd_cs46xx_spdif_default_put(snd_kcontrol_t * kcontrol, | |||
2034 | return change; | 2034 | return change; |
2035 | } | 2035 | } |
2036 | 2036 | ||
2037 | static int snd_cs46xx_spdif_mask_get(snd_kcontrol_t * kcontrol, | 2037 | static int snd_cs46xx_spdif_mask_get(struct snd_kcontrol *kcontrol, |
2038 | snd_ctl_elem_value_t * ucontrol) | 2038 | struct snd_ctl_elem_value *ucontrol) |
2039 | { | 2039 | { |
2040 | ucontrol->value.iec958.status[0] = 0xff; | 2040 | ucontrol->value.iec958.status[0] = 0xff; |
2041 | ucontrol->value.iec958.status[1] = 0xff; | 2041 | ucontrol->value.iec958.status[1] = 0xff; |
@@ -2044,11 +2044,11 @@ static int snd_cs46xx_spdif_mask_get(snd_kcontrol_t * kcontrol, | |||
2044 | return 0; | 2044 | return 0; |
2045 | } | 2045 | } |
2046 | 2046 | ||
2047 | static int snd_cs46xx_spdif_stream_get(snd_kcontrol_t * kcontrol, | 2047 | static int snd_cs46xx_spdif_stream_get(struct snd_kcontrol *kcontrol, |
2048 | snd_ctl_elem_value_t * ucontrol) | 2048 | struct snd_ctl_elem_value *ucontrol) |
2049 | { | 2049 | { |
2050 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 2050 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
2051 | dsp_spos_instance_t * ins = chip->dsp_spos_instance; | 2051 | struct dsp_spos_instance * ins = chip->dsp_spos_instance; |
2052 | 2052 | ||
2053 | down (&chip->spos_mutex); | 2053 | down (&chip->spos_mutex); |
2054 | ucontrol->value.iec958.status[0] = _wrap_all_bits((ins->spdif_csuv_stream >> 24) & 0xff); | 2054 | ucontrol->value.iec958.status[0] = _wrap_all_bits((ins->spdif_csuv_stream >> 24) & 0xff); |
@@ -2060,11 +2060,11 @@ static int snd_cs46xx_spdif_stream_get(snd_kcontrol_t * kcontrol, | |||
2060 | return 0; | 2060 | return 0; |
2061 | } | 2061 | } |
2062 | 2062 | ||
2063 | static int snd_cs46xx_spdif_stream_put(snd_kcontrol_t * kcontrol, | 2063 | static int snd_cs46xx_spdif_stream_put(struct snd_kcontrol *kcontrol, |
2064 | snd_ctl_elem_value_t * ucontrol) | 2064 | struct snd_ctl_elem_value *ucontrol) |
2065 | { | 2065 | { |
2066 | cs46xx_t * chip = snd_kcontrol_chip(kcontrol); | 2066 | struct snd_cs46xx * chip = snd_kcontrol_chip(kcontrol); |
2067 | dsp_spos_instance_t * ins = chip->dsp_spos_instance; | 2067 | struct dsp_spos_instance * ins = chip->dsp_spos_instance; |
2068 | unsigned int val; | 2068 | unsigned int val; |
2069 | int change; | 2069 | int change; |
2070 | 2070 | ||
@@ -2091,8 +2091,8 @@ static int snd_cs46xx_spdif_stream_put(snd_kcontrol_t * kcontrol, | |||
2091 | 2091 | ||
2092 | 2092 | ||
2093 | #ifdef CONFIG_SND_CS46XX_DEBUG_GPIO | 2093 | #ifdef CONFIG_SND_CS46XX_DEBUG_GPIO |
2094 | static int snd_cs46xx_egpio_select_info(snd_kcontrol_t *kcontrol, | 2094 | static int snd_cs46xx_egpio_select_info(struct snd_kcontrol *kcontrol, |
2095 | snd_ctl_elem_info_t *uinfo) | 2095 | struct snd_ctl_elem_info *uinfo) |
2096 | { | 2096 | { |
2097 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 2097 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
2098 | uinfo->count = 1; | 2098 | uinfo->count = 1; |
@@ -2101,19 +2101,19 @@ static int snd_cs46xx_egpio_select_info(snd_kcontrol_t *kcontrol, | |||
2101 | return 0; | 2101 | return 0; |
2102 | } | 2102 | } |
2103 | 2103 | ||
2104 | static int snd_cs46xx_egpio_select_get(snd_kcontrol_t *kcontrol, | 2104 | static int snd_cs46xx_egpio_select_get(struct snd_kcontrol *kcontrol, |
2105 | snd_ctl_elem_value_t *ucontrol) | 2105 | struct snd_ctl_elem_value *ucontrol) |
2106 | { | 2106 | { |
2107 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 2107 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
2108 | ucontrol->value.integer.value[0] = chip->current_gpio; | 2108 | ucontrol->value.integer.value[0] = chip->current_gpio; |
2109 | 2109 | ||
2110 | return 0; | 2110 | return 0; |
2111 | } | 2111 | } |
2112 | 2112 | ||
2113 | static int snd_cs46xx_egpio_select_put(snd_kcontrol_t *kcontrol, | 2113 | static int snd_cs46xx_egpio_select_put(struct snd_kcontrol *kcontrol, |
2114 | snd_ctl_elem_value_t *ucontrol) | 2114 | struct snd_ctl_elem_value *ucontrol) |
2115 | { | 2115 | { |
2116 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 2116 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
2117 | int change = (chip->current_gpio != ucontrol->value.integer.value[0]); | 2117 | int change = (chip->current_gpio != ucontrol->value.integer.value[0]); |
2118 | chip->current_gpio = ucontrol->value.integer.value[0]; | 2118 | chip->current_gpio = ucontrol->value.integer.value[0]; |
2119 | 2119 | ||
@@ -2121,10 +2121,10 @@ static int snd_cs46xx_egpio_select_put(snd_kcontrol_t *kcontrol, | |||
2121 | } | 2121 | } |
2122 | 2122 | ||
2123 | 2123 | ||
2124 | static int snd_cs46xx_egpio_get(snd_kcontrol_t *kcontrol, | 2124 | static int snd_cs46xx_egpio_get(struct snd_kcontrol *kcontrol, |
2125 | snd_ctl_elem_value_t *ucontrol) | 2125 | struct snd_ctl_elem_value *ucontrol) |
2126 | { | 2126 | { |
2127 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 2127 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
2128 | int reg = kcontrol->private_value; | 2128 | int reg = kcontrol->private_value; |
2129 | 2129 | ||
2130 | snd_printdd ("put: reg = %04x, gpio %02x\n",reg,chip->current_gpio); | 2130 | snd_printdd ("put: reg = %04x, gpio %02x\n",reg,chip->current_gpio); |
@@ -2134,10 +2134,10 @@ static int snd_cs46xx_egpio_get(snd_kcontrol_t *kcontrol, | |||
2134 | return 0; | 2134 | return 0; |
2135 | } | 2135 | } |
2136 | 2136 | ||
2137 | static int snd_cs46xx_egpio_put(snd_kcontrol_t *kcontrol, | 2137 | static int snd_cs46xx_egpio_put(struct snd_kcontrol *kcontrol, |
2138 | snd_ctl_elem_value_t *ucontrol) | 2138 | struct snd_ctl_elem_value *ucontrol) |
2139 | { | 2139 | { |
2140 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 2140 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
2141 | int reg = kcontrol->private_value; | 2141 | int reg = kcontrol->private_value; |
2142 | int val = snd_cs46xx_peekBA0(chip, reg); | 2142 | int val = snd_cs46xx_peekBA0(chip, reg); |
2143 | int oldval = val; | 2143 | int oldval = val; |
@@ -2155,7 +2155,7 @@ static int snd_cs46xx_egpio_put(snd_kcontrol_t *kcontrol, | |||
2155 | } | 2155 | } |
2156 | #endif /* CONFIG_SND_CS46XX_DEBUG_GPIO */ | 2156 | #endif /* CONFIG_SND_CS46XX_DEBUG_GPIO */ |
2157 | 2157 | ||
2158 | static snd_kcontrol_new_t snd_cs46xx_controls[] __devinitdata = { | 2158 | static struct snd_kcontrol_new snd_cs46xx_controls[] __devinitdata = { |
2159 | { | 2159 | { |
2160 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 2160 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
2161 | .name = "DAC Volume", | 2161 | .name = "DAC Volume", |
@@ -2285,26 +2285,26 @@ static snd_kcontrol_new_t snd_cs46xx_controls[] __devinitdata = { | |||
2285 | 2285 | ||
2286 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 2286 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
2287 | /* set primary cs4294 codec into Extended Audio Mode */ | 2287 | /* set primary cs4294 codec into Extended Audio Mode */ |
2288 | static int snd_cs46xx_front_dup_get(snd_kcontrol_t *kcontrol, | 2288 | static int snd_cs46xx_front_dup_get(struct snd_kcontrol *kcontrol, |
2289 | snd_ctl_elem_value_t *ucontrol) | 2289 | struct snd_ctl_elem_value *ucontrol) |
2290 | { | 2290 | { |
2291 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 2291 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
2292 | unsigned short val; | 2292 | unsigned short val; |
2293 | val = snd_ac97_read(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], AC97_CSR_ACMODE); | 2293 | val = snd_ac97_read(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], AC97_CSR_ACMODE); |
2294 | ucontrol->value.integer.value[0] = (val & 0x200) ? 0 : 1; | 2294 | ucontrol->value.integer.value[0] = (val & 0x200) ? 0 : 1; |
2295 | return 0; | 2295 | return 0; |
2296 | } | 2296 | } |
2297 | 2297 | ||
2298 | static int snd_cs46xx_front_dup_put(snd_kcontrol_t *kcontrol, | 2298 | static int snd_cs46xx_front_dup_put(struct snd_kcontrol *kcontrol, |
2299 | snd_ctl_elem_value_t *ucontrol) | 2299 | struct snd_ctl_elem_value *ucontrol) |
2300 | { | 2300 | { |
2301 | cs46xx_t *chip = snd_kcontrol_chip(kcontrol); | 2301 | struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); |
2302 | return snd_ac97_update_bits(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], | 2302 | return snd_ac97_update_bits(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], |
2303 | AC97_CSR_ACMODE, 0x200, | 2303 | AC97_CSR_ACMODE, 0x200, |
2304 | ucontrol->value.integer.value[0] ? 0 : 0x200); | 2304 | ucontrol->value.integer.value[0] ? 0 : 0x200); |
2305 | } | 2305 | } |
2306 | 2306 | ||
2307 | static snd_kcontrol_new_t snd_cs46xx_front_dup_ctl = { | 2307 | static struct snd_kcontrol_new snd_cs46xx_front_dup_ctl = { |
2308 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 2308 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
2309 | .name = "Duplicate Front", | 2309 | .name = "Duplicate Front", |
2310 | .info = snd_mixer_boolean_info, | 2310 | .info = snd_mixer_boolean_info, |
@@ -2315,7 +2315,7 @@ static snd_kcontrol_new_t snd_cs46xx_front_dup_ctl = { | |||
2315 | 2315 | ||
2316 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 2316 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
2317 | /* Only available on the Hercules Game Theater XP soundcard */ | 2317 | /* Only available on the Hercules Game Theater XP soundcard */ |
2318 | static snd_kcontrol_new_t snd_hercules_controls[] __devinitdata = { | 2318 | static struct snd_kcontrol_new snd_hercules_controls[] __devinitdata = { |
2319 | { | 2319 | { |
2320 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 2320 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
2321 | .name = "Optical/Coaxial SPDIF Input Switch", | 2321 | .name = "Optical/Coaxial SPDIF Input Switch", |
@@ -2326,7 +2326,7 @@ static snd_kcontrol_new_t snd_hercules_controls[] __devinitdata = { | |||
2326 | }; | 2326 | }; |
2327 | 2327 | ||
2328 | 2328 | ||
2329 | static void snd_cs46xx_codec_reset (ac97_t * ac97) | 2329 | static void snd_cs46xx_codec_reset (struct snd_ac97 * ac97) |
2330 | { | 2330 | { |
2331 | unsigned long end_time; | 2331 | unsigned long end_time; |
2332 | int err; | 2332 | int err; |
@@ -2375,10 +2375,10 @@ static void snd_cs46xx_codec_reset (ac97_t * ac97) | |||
2375 | } | 2375 | } |
2376 | #endif | 2376 | #endif |
2377 | 2377 | ||
2378 | static int __devinit cs46xx_detect_codec(cs46xx_t *chip, int codec) | 2378 | static int __devinit cs46xx_detect_codec(struct snd_cs46xx *chip, int codec) |
2379 | { | 2379 | { |
2380 | int idx, err; | 2380 | int idx, err; |
2381 | ac97_template_t ac97; | 2381 | struct snd_ac97_template ac97; |
2382 | 2382 | ||
2383 | memset(&ac97, 0, sizeof(ac97)); | 2383 | memset(&ac97, 0, sizeof(ac97)); |
2384 | ac97.private_data = chip; | 2384 | ac97.private_data = chip; |
@@ -2408,13 +2408,13 @@ static int __devinit cs46xx_detect_codec(cs46xx_t *chip, int codec) | |||
2408 | return -ENXIO; | 2408 | return -ENXIO; |
2409 | } | 2409 | } |
2410 | 2410 | ||
2411 | int __devinit snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device) | 2411 | int __devinit snd_cs46xx_mixer(struct snd_cs46xx *chip, int spdif_device) |
2412 | { | 2412 | { |
2413 | snd_card_t *card = chip->card; | 2413 | struct snd_card *card = chip->card; |
2414 | snd_ctl_elem_id_t id; | 2414 | struct snd_ctl_elem_id id; |
2415 | int err; | 2415 | int err; |
2416 | unsigned int idx; | 2416 | unsigned int idx; |
2417 | static ac97_bus_ops_t ops = { | 2417 | static struct snd_ac97_bus_ops ops = { |
2418 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 2418 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
2419 | .reset = snd_cs46xx_codec_reset, | 2419 | .reset = snd_cs46xx_codec_reset, |
2420 | #endif | 2420 | #endif |
@@ -2442,7 +2442,7 @@ int __devinit snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device) | |||
2442 | 2442 | ||
2443 | /* add cs4630 mixer controls */ | 2443 | /* add cs4630 mixer controls */ |
2444 | for (idx = 0; idx < ARRAY_SIZE(snd_cs46xx_controls); idx++) { | 2444 | for (idx = 0; idx < ARRAY_SIZE(snd_cs46xx_controls); idx++) { |
2445 | snd_kcontrol_t *kctl; | 2445 | struct snd_kcontrol *kctl; |
2446 | kctl = snd_ctl_new1(&snd_cs46xx_controls[idx], chip); | 2446 | kctl = snd_ctl_new1(&snd_cs46xx_controls[idx], chip); |
2447 | if (kctl && kctl->id.iface == SNDRV_CTL_ELEM_IFACE_PCM) | 2447 | if (kctl && kctl->id.iface == SNDRV_CTL_ELEM_IFACE_PCM) |
2448 | kctl->id.device = spdif_device; | 2448 | kctl->id.device = spdif_device; |
@@ -2484,16 +2484,16 @@ int __devinit snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device) | |||
2484 | * RawMIDI interface | 2484 | * RawMIDI interface |
2485 | */ | 2485 | */ |
2486 | 2486 | ||
2487 | static void snd_cs46xx_midi_reset(cs46xx_t *chip) | 2487 | static void snd_cs46xx_midi_reset(struct snd_cs46xx *chip) |
2488 | { | 2488 | { |
2489 | snd_cs46xx_pokeBA0(chip, BA0_MIDCR, MIDCR_MRST); | 2489 | snd_cs46xx_pokeBA0(chip, BA0_MIDCR, MIDCR_MRST); |
2490 | udelay(100); | 2490 | udelay(100); |
2491 | snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); | 2491 | snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); |
2492 | } | 2492 | } |
2493 | 2493 | ||
2494 | static int snd_cs46xx_midi_input_open(snd_rawmidi_substream_t * substream) | 2494 | static int snd_cs46xx_midi_input_open(struct snd_rawmidi_substream *substream) |
2495 | { | 2495 | { |
2496 | cs46xx_t *chip = substream->rmidi->private_data; | 2496 | struct snd_cs46xx *chip = substream->rmidi->private_data; |
2497 | 2497 | ||
2498 | chip->active_ctrl(chip, 1); | 2498 | chip->active_ctrl(chip, 1); |
2499 | spin_lock_irq(&chip->reg_lock); | 2499 | spin_lock_irq(&chip->reg_lock); |
@@ -2509,9 +2509,9 @@ static int snd_cs46xx_midi_input_open(snd_rawmidi_substream_t * substream) | |||
2509 | return 0; | 2509 | return 0; |
2510 | } | 2510 | } |
2511 | 2511 | ||
2512 | static int snd_cs46xx_midi_input_close(snd_rawmidi_substream_t * substream) | 2512 | static int snd_cs46xx_midi_input_close(struct snd_rawmidi_substream *substream) |
2513 | { | 2513 | { |
2514 | cs46xx_t *chip = substream->rmidi->private_data; | 2514 | struct snd_cs46xx *chip = substream->rmidi->private_data; |
2515 | 2515 | ||
2516 | spin_lock_irq(&chip->reg_lock); | 2516 | spin_lock_irq(&chip->reg_lock); |
2517 | chip->midcr &= ~(MIDCR_RXE | MIDCR_RIE); | 2517 | chip->midcr &= ~(MIDCR_RXE | MIDCR_RIE); |
@@ -2527,9 +2527,9 @@ static int snd_cs46xx_midi_input_close(snd_rawmidi_substream_t * substream) | |||
2527 | return 0; | 2527 | return 0; |
2528 | } | 2528 | } |
2529 | 2529 | ||
2530 | static int snd_cs46xx_midi_output_open(snd_rawmidi_substream_t * substream) | 2530 | static int snd_cs46xx_midi_output_open(struct snd_rawmidi_substream *substream) |
2531 | { | 2531 | { |
2532 | cs46xx_t *chip = substream->rmidi->private_data; | 2532 | struct snd_cs46xx *chip = substream->rmidi->private_data; |
2533 | 2533 | ||
2534 | chip->active_ctrl(chip, 1); | 2534 | chip->active_ctrl(chip, 1); |
2535 | 2535 | ||
@@ -2546,9 +2546,9 @@ static int snd_cs46xx_midi_output_open(snd_rawmidi_substream_t * substream) | |||
2546 | return 0; | 2546 | return 0; |
2547 | } | 2547 | } |
2548 | 2548 | ||
2549 | static int snd_cs46xx_midi_output_close(snd_rawmidi_substream_t * substream) | 2549 | static int snd_cs46xx_midi_output_close(struct snd_rawmidi_substream *substream) |
2550 | { | 2550 | { |
2551 | cs46xx_t *chip = substream->rmidi->private_data; | 2551 | struct snd_cs46xx *chip = substream->rmidi->private_data; |
2552 | 2552 | ||
2553 | spin_lock_irq(&chip->reg_lock); | 2553 | spin_lock_irq(&chip->reg_lock); |
2554 | chip->midcr &= ~(MIDCR_TXE | MIDCR_TIE); | 2554 | chip->midcr &= ~(MIDCR_TXE | MIDCR_TIE); |
@@ -2564,10 +2564,10 @@ static int snd_cs46xx_midi_output_close(snd_rawmidi_substream_t * substream) | |||
2564 | return 0; | 2564 | return 0; |
2565 | } | 2565 | } |
2566 | 2566 | ||
2567 | static void snd_cs46xx_midi_input_trigger(snd_rawmidi_substream_t * substream, int up) | 2567 | static void snd_cs46xx_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) |
2568 | { | 2568 | { |
2569 | unsigned long flags; | 2569 | unsigned long flags; |
2570 | cs46xx_t *chip = substream->rmidi->private_data; | 2570 | struct snd_cs46xx *chip = substream->rmidi->private_data; |
2571 | 2571 | ||
2572 | spin_lock_irqsave(&chip->reg_lock, flags); | 2572 | spin_lock_irqsave(&chip->reg_lock, flags); |
2573 | if (up) { | 2573 | if (up) { |
@@ -2584,10 +2584,10 @@ static void snd_cs46xx_midi_input_trigger(snd_rawmidi_substream_t * substream, i | |||
2584 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 2584 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
2585 | } | 2585 | } |
2586 | 2586 | ||
2587 | static void snd_cs46xx_midi_output_trigger(snd_rawmidi_substream_t * substream, int up) | 2587 | static void snd_cs46xx_midi_output_trigger(struct snd_rawmidi_substream *substream, int up) |
2588 | { | 2588 | { |
2589 | unsigned long flags; | 2589 | unsigned long flags; |
2590 | cs46xx_t *chip = substream->rmidi->private_data; | 2590 | struct snd_cs46xx *chip = substream->rmidi->private_data; |
2591 | unsigned char byte; | 2591 | unsigned char byte; |
2592 | 2592 | ||
2593 | spin_lock_irqsave(&chip->reg_lock, flags); | 2593 | spin_lock_irqsave(&chip->reg_lock, flags); |
@@ -2614,23 +2614,23 @@ static void snd_cs46xx_midi_output_trigger(snd_rawmidi_substream_t * substream, | |||
2614 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 2614 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
2615 | } | 2615 | } |
2616 | 2616 | ||
2617 | static snd_rawmidi_ops_t snd_cs46xx_midi_output = | 2617 | static struct snd_rawmidi_ops snd_cs46xx_midi_output = |
2618 | { | 2618 | { |
2619 | .open = snd_cs46xx_midi_output_open, | 2619 | .open = snd_cs46xx_midi_output_open, |
2620 | .close = snd_cs46xx_midi_output_close, | 2620 | .close = snd_cs46xx_midi_output_close, |
2621 | .trigger = snd_cs46xx_midi_output_trigger, | 2621 | .trigger = snd_cs46xx_midi_output_trigger, |
2622 | }; | 2622 | }; |
2623 | 2623 | ||
2624 | static snd_rawmidi_ops_t snd_cs46xx_midi_input = | 2624 | static struct snd_rawmidi_ops snd_cs46xx_midi_input = |
2625 | { | 2625 | { |
2626 | .open = snd_cs46xx_midi_input_open, | 2626 | .open = snd_cs46xx_midi_input_open, |
2627 | .close = snd_cs46xx_midi_input_close, | 2627 | .close = snd_cs46xx_midi_input_close, |
2628 | .trigger = snd_cs46xx_midi_input_trigger, | 2628 | .trigger = snd_cs46xx_midi_input_trigger, |
2629 | }; | 2629 | }; |
2630 | 2630 | ||
2631 | int __devinit snd_cs46xx_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rrawmidi) | 2631 | int __devinit snd_cs46xx_midi(struct snd_cs46xx *chip, int device, struct snd_rawmidi **rrawmidi) |
2632 | { | 2632 | { |
2633 | snd_rawmidi_t *rmidi; | 2633 | struct snd_rawmidi *rmidi; |
2634 | int err; | 2634 | int err; |
2635 | 2635 | ||
2636 | if (rrawmidi) | 2636 | if (rrawmidi) |
@@ -2657,7 +2657,7 @@ int __devinit snd_cs46xx_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rrawmi | |||
2657 | 2657 | ||
2658 | static void snd_cs46xx_gameport_trigger(struct gameport *gameport) | 2658 | static void snd_cs46xx_gameport_trigger(struct gameport *gameport) |
2659 | { | 2659 | { |
2660 | cs46xx_t *chip = gameport_get_port_data(gameport); | 2660 | struct snd_cs46xx *chip = gameport_get_port_data(gameport); |
2661 | 2661 | ||
2662 | snd_assert(chip, return); | 2662 | snd_assert(chip, return); |
2663 | snd_cs46xx_pokeBA0(chip, BA0_JSPT, 0xFF); //outb(gameport->io, 0xFF); | 2663 | snd_cs46xx_pokeBA0(chip, BA0_JSPT, 0xFF); //outb(gameport->io, 0xFF); |
@@ -2665,7 +2665,7 @@ static void snd_cs46xx_gameport_trigger(struct gameport *gameport) | |||
2665 | 2665 | ||
2666 | static unsigned char snd_cs46xx_gameport_read(struct gameport *gameport) | 2666 | static unsigned char snd_cs46xx_gameport_read(struct gameport *gameport) |
2667 | { | 2667 | { |
2668 | cs46xx_t *chip = gameport_get_port_data(gameport); | 2668 | struct snd_cs46xx *chip = gameport_get_port_data(gameport); |
2669 | 2669 | ||
2670 | snd_assert(chip, return 0); | 2670 | snd_assert(chip, return 0); |
2671 | return snd_cs46xx_peekBA0(chip, BA0_JSPT); //inb(gameport->io); | 2671 | return snd_cs46xx_peekBA0(chip, BA0_JSPT); //inb(gameport->io); |
@@ -2673,7 +2673,7 @@ static unsigned char snd_cs46xx_gameport_read(struct gameport *gameport) | |||
2673 | 2673 | ||
2674 | static int snd_cs46xx_gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons) | 2674 | static int snd_cs46xx_gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons) |
2675 | { | 2675 | { |
2676 | cs46xx_t *chip = gameport_get_port_data(gameport); | 2676 | struct snd_cs46xx *chip = gameport_get_port_data(gameport); |
2677 | unsigned js1, js2, jst; | 2677 | unsigned js1, js2, jst; |
2678 | 2678 | ||
2679 | snd_assert(chip, return 0); | 2679 | snd_assert(chip, return 0); |
@@ -2707,7 +2707,7 @@ static int snd_cs46xx_gameport_open(struct gameport *gameport, int mode) | |||
2707 | return 0; | 2707 | return 0; |
2708 | } | 2708 | } |
2709 | 2709 | ||
2710 | int __devinit snd_cs46xx_gameport(cs46xx_t *chip) | 2710 | int __devinit snd_cs46xx_gameport(struct snd_cs46xx *chip) |
2711 | { | 2711 | { |
2712 | struct gameport *gp; | 2712 | struct gameport *gp; |
2713 | 2713 | ||
@@ -2735,7 +2735,7 @@ int __devinit snd_cs46xx_gameport(cs46xx_t *chip) | |||
2735 | return 0; | 2735 | return 0; |
2736 | } | 2736 | } |
2737 | 2737 | ||
2738 | static inline void snd_cs46xx_remove_gameport(cs46xx_t *chip) | 2738 | static inline void snd_cs46xx_remove_gameport(struct snd_cs46xx *chip) |
2739 | { | 2739 | { |
2740 | if (chip->gameport) { | 2740 | if (chip->gameport) { |
2741 | gameport_unregister_port(chip->gameport); | 2741 | gameport_unregister_port(chip->gameport); |
@@ -2743,20 +2743,20 @@ static inline void snd_cs46xx_remove_gameport(cs46xx_t *chip) | |||
2743 | } | 2743 | } |
2744 | } | 2744 | } |
2745 | #else | 2745 | #else |
2746 | int __devinit snd_cs46xx_gameport(cs46xx_t *chip) { return -ENOSYS; } | 2746 | int __devinit snd_cs46xx_gameport(struct snd_cs46xx *chip) { return -ENOSYS; } |
2747 | static inline void snd_cs46xx_remove_gameport(cs46xx_t *chip) { } | 2747 | static inline void snd_cs46xx_remove_gameport(struct snd_cs46xx *chip) { } |
2748 | #endif /* CONFIG_GAMEPORT */ | 2748 | #endif /* CONFIG_GAMEPORT */ |
2749 | 2749 | ||
2750 | /* | 2750 | /* |
2751 | * proc interface | 2751 | * proc interface |
2752 | */ | 2752 | */ |
2753 | 2753 | ||
2754 | static long snd_cs46xx_io_read(snd_info_entry_t *entry, void *file_private_data, | 2754 | static long snd_cs46xx_io_read(struct snd_info_entry *entry, void *file_private_data, |
2755 | struct file *file, char __user *buf, | 2755 | struct file *file, char __user *buf, |
2756 | unsigned long count, unsigned long pos) | 2756 | unsigned long count, unsigned long pos) |
2757 | { | 2757 | { |
2758 | long size; | 2758 | long size; |
2759 | snd_cs46xx_region_t *region = (snd_cs46xx_region_t *)entry->private_data; | 2759 | struct snd_cs46xx_region *region = entry->private_data; |
2760 | 2760 | ||
2761 | size = count; | 2761 | size = count; |
2762 | if (pos + (size_t)size > region->size) | 2762 | if (pos + (size_t)size > region->size) |
@@ -2772,13 +2772,13 @@ static struct snd_info_entry_ops snd_cs46xx_proc_io_ops = { | |||
2772 | .read = snd_cs46xx_io_read, | 2772 | .read = snd_cs46xx_io_read, |
2773 | }; | 2773 | }; |
2774 | 2774 | ||
2775 | static int __devinit snd_cs46xx_proc_init(snd_card_t * card, cs46xx_t *chip) | 2775 | static int __devinit snd_cs46xx_proc_init(struct snd_card *card, struct snd_cs46xx *chip) |
2776 | { | 2776 | { |
2777 | snd_info_entry_t *entry; | 2777 | struct snd_info_entry *entry; |
2778 | int idx; | 2778 | int idx; |
2779 | 2779 | ||
2780 | for (idx = 0; idx < 5; idx++) { | 2780 | for (idx = 0; idx < 5; idx++) { |
2781 | snd_cs46xx_region_t *region = &chip->region.idx[idx]; | 2781 | struct snd_cs46xx_region *region = &chip->region.idx[idx]; |
2782 | if (! snd_card_proc_new(card, region->name, &entry)) { | 2782 | if (! snd_card_proc_new(card, region->name, &entry)) { |
2783 | entry->content = SNDRV_INFO_CONTENT_DATA; | 2783 | entry->content = SNDRV_INFO_CONTENT_DATA; |
2784 | entry->private_data = chip; | 2784 | entry->private_data = chip; |
@@ -2793,7 +2793,7 @@ static int __devinit snd_cs46xx_proc_init(snd_card_t * card, cs46xx_t *chip) | |||
2793 | return 0; | 2793 | return 0; |
2794 | } | 2794 | } |
2795 | 2795 | ||
2796 | static int snd_cs46xx_proc_done(cs46xx_t *chip) | 2796 | static int snd_cs46xx_proc_done(struct snd_cs46xx *chip) |
2797 | { | 2797 | { |
2798 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 2798 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
2799 | cs46xx_dsp_proc_done(chip); | 2799 | cs46xx_dsp_proc_done(chip); |
@@ -2804,7 +2804,7 @@ static int snd_cs46xx_proc_done(cs46xx_t *chip) | |||
2804 | /* | 2804 | /* |
2805 | * stop the h/w | 2805 | * stop the h/w |
2806 | */ | 2806 | */ |
2807 | static void snd_cs46xx_hw_stop(cs46xx_t *chip) | 2807 | static void snd_cs46xx_hw_stop(struct snd_cs46xx *chip) |
2808 | { | 2808 | { |
2809 | unsigned int tmp; | 2809 | unsigned int tmp; |
2810 | 2810 | ||
@@ -2851,7 +2851,7 @@ static void snd_cs46xx_hw_stop(cs46xx_t *chip) | |||
2851 | } | 2851 | } |
2852 | 2852 | ||
2853 | 2853 | ||
2854 | static int snd_cs46xx_free(cs46xx_t *chip) | 2854 | static int snd_cs46xx_free(struct snd_cs46xx *chip) |
2855 | { | 2855 | { |
2856 | int idx; | 2856 | int idx; |
2857 | 2857 | ||
@@ -2871,13 +2871,13 @@ static int snd_cs46xx_free(cs46xx_t *chip) | |||
2871 | snd_cs46xx_hw_stop(chip); | 2871 | snd_cs46xx_hw_stop(chip); |
2872 | 2872 | ||
2873 | for (idx = 0; idx < 5; idx++) { | 2873 | for (idx = 0; idx < 5; idx++) { |
2874 | snd_cs46xx_region_t *region = &chip->region.idx[idx]; | 2874 | struct snd_cs46xx_region *region = &chip->region.idx[idx]; |
2875 | if (region->remap_addr) | 2875 | if (region->remap_addr) |
2876 | iounmap(region->remap_addr); | 2876 | iounmap(region->remap_addr); |
2877 | release_and_free_resource(region->resource); | 2877 | release_and_free_resource(region->resource); |
2878 | } | 2878 | } |
2879 | if (chip->irq >= 0) | 2879 | if (chip->irq >= 0) |
2880 | free_irq(chip->irq, (void *)chip); | 2880 | free_irq(chip->irq, chip); |
2881 | 2881 | ||
2882 | if (chip->active_ctrl) | 2882 | if (chip->active_ctrl) |
2883 | chip->active_ctrl(chip, -chip->amplifier); | 2883 | chip->active_ctrl(chip, -chip->amplifier); |
@@ -2894,16 +2894,16 @@ static int snd_cs46xx_free(cs46xx_t *chip) | |||
2894 | return 0; | 2894 | return 0; |
2895 | } | 2895 | } |
2896 | 2896 | ||
2897 | static int snd_cs46xx_dev_free(snd_device_t *device) | 2897 | static int snd_cs46xx_dev_free(struct snd_device *device) |
2898 | { | 2898 | { |
2899 | cs46xx_t *chip = device->device_data; | 2899 | struct snd_cs46xx *chip = device->device_data; |
2900 | return snd_cs46xx_free(chip); | 2900 | return snd_cs46xx_free(chip); |
2901 | } | 2901 | } |
2902 | 2902 | ||
2903 | /* | 2903 | /* |
2904 | * initialize chip | 2904 | * initialize chip |
2905 | */ | 2905 | */ |
2906 | static int snd_cs46xx_chip_init(cs46xx_t *chip) | 2906 | static int snd_cs46xx_chip_init(struct snd_cs46xx *chip) |
2907 | { | 2907 | { |
2908 | int timeout; | 2908 | int timeout; |
2909 | 2909 | ||
@@ -3132,7 +3132,7 @@ static int snd_cs46xx_chip_init(cs46xx_t *chip) | |||
3132 | /* | 3132 | /* |
3133 | * start and load DSP | 3133 | * start and load DSP |
3134 | */ | 3134 | */ |
3135 | int __devinit snd_cs46xx_start_dsp(cs46xx_t *chip) | 3135 | int __devinit snd_cs46xx_start_dsp(struct snd_cs46xx *chip) |
3136 | { | 3136 | { |
3137 | unsigned int tmp; | 3137 | unsigned int tmp; |
3138 | /* | 3138 | /* |
@@ -3234,12 +3234,12 @@ int __devinit snd_cs46xx_start_dsp(cs46xx_t *chip) | |||
3234 | * AMP control - null AMP | 3234 | * AMP control - null AMP |
3235 | */ | 3235 | */ |
3236 | 3236 | ||
3237 | static void amp_none(cs46xx_t *chip, int change) | 3237 | static void amp_none(struct snd_cs46xx *chip, int change) |
3238 | { | 3238 | { |
3239 | } | 3239 | } |
3240 | 3240 | ||
3241 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 3241 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
3242 | static int voyetra_setup_eapd_slot(cs46xx_t *chip) | 3242 | static int voyetra_setup_eapd_slot(struct snd_cs46xx *chip) |
3243 | { | 3243 | { |
3244 | 3244 | ||
3245 | u32 idx, valid_slots,tmp,powerdown = 0; | 3245 | u32 idx, valid_slots,tmp,powerdown = 0; |
@@ -3359,7 +3359,7 @@ static int voyetra_setup_eapd_slot(cs46xx_t *chip) | |||
3359 | * Crystal EAPD mode | 3359 | * Crystal EAPD mode |
3360 | */ | 3360 | */ |
3361 | 3361 | ||
3362 | static void amp_voyetra(cs46xx_t *chip, int change) | 3362 | static void amp_voyetra(struct snd_cs46xx *chip, int change) |
3363 | { | 3363 | { |
3364 | /* Manage the EAPD bit on the Crystal 4297 | 3364 | /* Manage the EAPD bit on the Crystal 4297 |
3365 | and the Analog AD1885 */ | 3365 | and the Analog AD1885 */ |
@@ -3395,7 +3395,7 @@ static void amp_voyetra(cs46xx_t *chip, int change) | |||
3395 | #endif | 3395 | #endif |
3396 | } | 3396 | } |
3397 | 3397 | ||
3398 | static void hercules_init(cs46xx_t *chip) | 3398 | static void hercules_init(struct snd_cs46xx *chip) |
3399 | { | 3399 | { |
3400 | /* default: AMP off, and SPDIF input optical */ | 3400 | /* default: AMP off, and SPDIF input optical */ |
3401 | snd_cs46xx_pokeBA0(chip, BA0_EGPIODR, EGPIODR_GPOE0); | 3401 | snd_cs46xx_pokeBA0(chip, BA0_EGPIODR, EGPIODR_GPOE0); |
@@ -3406,7 +3406,7 @@ static void hercules_init(cs46xx_t *chip) | |||
3406 | /* | 3406 | /* |
3407 | * Game Theatre XP card - EGPIO[2] is used to enable the external amp. | 3407 | * Game Theatre XP card - EGPIO[2] is used to enable the external amp. |
3408 | */ | 3408 | */ |
3409 | static void amp_hercules(cs46xx_t *chip, int change) | 3409 | static void amp_hercules(struct snd_cs46xx *chip, int change) |
3410 | { | 3410 | { |
3411 | int old = chip->amplifier; | 3411 | int old = chip->amplifier; |
3412 | int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR); | 3412 | int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR); |
@@ -3427,7 +3427,7 @@ static void amp_hercules(cs46xx_t *chip, int change) | |||
3427 | } | 3427 | } |
3428 | } | 3428 | } |
3429 | 3429 | ||
3430 | static void voyetra_mixer_init (cs46xx_t *chip) | 3430 | static void voyetra_mixer_init (struct snd_cs46xx *chip) |
3431 | { | 3431 | { |
3432 | snd_printdd ("initializing Voyetra mixer\n"); | 3432 | snd_printdd ("initializing Voyetra mixer\n"); |
3433 | 3433 | ||
@@ -3436,12 +3436,12 @@ static void voyetra_mixer_init (cs46xx_t *chip) | |||
3436 | snd_cs46xx_pokeBA0(chip, BA0_EGPIOPTR, EGPIODR_GPOE0); | 3436 | snd_cs46xx_pokeBA0(chip, BA0_EGPIOPTR, EGPIODR_GPOE0); |
3437 | } | 3437 | } |
3438 | 3438 | ||
3439 | static void hercules_mixer_init (cs46xx_t *chip) | 3439 | static void hercules_mixer_init (struct snd_cs46xx *chip) |
3440 | { | 3440 | { |
3441 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 3441 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
3442 | unsigned int idx; | 3442 | unsigned int idx; |
3443 | int err; | 3443 | int err; |
3444 | snd_card_t *card = chip->card; | 3444 | struct snd_card *card = chip->card; |
3445 | #endif | 3445 | #endif |
3446 | 3446 | ||
3447 | /* set EGPIO to default */ | 3447 | /* set EGPIO to default */ |
@@ -3451,7 +3451,7 @@ static void hercules_mixer_init (cs46xx_t *chip) | |||
3451 | 3451 | ||
3452 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 3452 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
3453 | for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) { | 3453 | for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) { |
3454 | snd_kcontrol_t *kctl; | 3454 | struct snd_kcontrol *kctl; |
3455 | 3455 | ||
3456 | kctl = snd_ctl_new1(&snd_hercules_controls[idx], chip); | 3456 | kctl = snd_ctl_new1(&snd_hercules_controls[idx], chip); |
3457 | if ((err = snd_ctl_add(card, kctl)) < 0) { | 3457 | if ((err = snd_ctl_add(card, kctl)) < 0) { |
@@ -3468,7 +3468,7 @@ static void hercules_mixer_init (cs46xx_t *chip) | |||
3468 | * Untested | 3468 | * Untested |
3469 | */ | 3469 | */ |
3470 | 3470 | ||
3471 | static void amp_voyetra_4294(cs46xx_t *chip, int change) | 3471 | static void amp_voyetra_4294(struct snd_cs46xx *chip, int change) |
3472 | { | 3472 | { |
3473 | chip->amplifier += change; | 3473 | chip->amplifier += change; |
3474 | 3474 | ||
@@ -3498,7 +3498,7 @@ static void amp_voyetra_4294(cs46xx_t *chip, int change) | |||
3498 | * enough to make them useful. | 3498 | * enough to make them useful. |
3499 | */ | 3499 | */ |
3500 | 3500 | ||
3501 | static void clkrun_hack(cs46xx_t *chip, int change) | 3501 | static void clkrun_hack(struct snd_cs46xx *chip, int change) |
3502 | { | 3502 | { |
3503 | u16 control, nval; | 3503 | u16 control, nval; |
3504 | 3504 | ||
@@ -3523,7 +3523,7 @@ static void clkrun_hack(cs46xx_t *chip, int change) | |||
3523 | /* | 3523 | /* |
3524 | * detect intel piix4 | 3524 | * detect intel piix4 |
3525 | */ | 3525 | */ |
3526 | static void clkrun_init(cs46xx_t *chip) | 3526 | static void clkrun_init(struct snd_cs46xx *chip) |
3527 | { | 3527 | { |
3528 | struct pci_dev *pdev; | 3528 | struct pci_dev *pdev; |
3529 | u8 pp; | 3529 | u8 pp; |
@@ -3551,10 +3551,10 @@ struct cs_card_type | |||
3551 | u16 vendor; | 3551 | u16 vendor; |
3552 | u16 id; | 3552 | u16 id; |
3553 | char *name; | 3553 | char *name; |
3554 | void (*init)(cs46xx_t *); | 3554 | void (*init)(struct snd_cs46xx *); |
3555 | void (*amp)(cs46xx_t *, int); | 3555 | void (*amp)(struct snd_cs46xx *, int); |
3556 | void (*active)(cs46xx_t *, int); | 3556 | void (*active)(struct snd_cs46xx *, int); |
3557 | void (*mixer_init)(cs46xx_t *); | 3557 | void (*mixer_init)(struct snd_cs46xx *); |
3558 | }; | 3558 | }; |
3559 | 3559 | ||
3560 | static struct cs_card_type __devinitdata cards[] = { | 3560 | static struct cs_card_type __devinitdata cards[] = { |
@@ -3654,9 +3654,9 @@ static struct cs_card_type __devinitdata cards[] = { | |||
3654 | * APM support | 3654 | * APM support |
3655 | */ | 3655 | */ |
3656 | #ifdef CONFIG_PM | 3656 | #ifdef CONFIG_PM |
3657 | static int snd_cs46xx_suspend(snd_card_t *card, pm_message_t state) | 3657 | static int snd_cs46xx_suspend(struct snd_card *card, pm_message_t state) |
3658 | { | 3658 | { |
3659 | cs46xx_t *chip = card->pm_private_data; | 3659 | struct snd_cs46xx *chip = card->pm_private_data; |
3660 | int amp_saved; | 3660 | int amp_saved; |
3661 | 3661 | ||
3662 | snd_pcm_suspend_all(chip->pcm); | 3662 | snd_pcm_suspend_all(chip->pcm); |
@@ -3678,9 +3678,9 @@ static int snd_cs46xx_suspend(snd_card_t *card, pm_message_t state) | |||
3678 | return 0; | 3678 | return 0; |
3679 | } | 3679 | } |
3680 | 3680 | ||
3681 | static int snd_cs46xx_resume(snd_card_t *card) | 3681 | static int snd_cs46xx_resume(struct snd_card *card) |
3682 | { | 3682 | { |
3683 | cs46xx_t *chip = card->pm_private_data; | 3683 | struct snd_cs46xx *chip = card->pm_private_data; |
3684 | int amp_saved; | 3684 | int amp_saved; |
3685 | 3685 | ||
3686 | pci_enable_device(chip->pci); | 3686 | pci_enable_device(chip->pci); |
@@ -3719,17 +3719,17 @@ static int snd_cs46xx_resume(snd_card_t *card) | |||
3719 | /* | 3719 | /* |
3720 | */ | 3720 | */ |
3721 | 3721 | ||
3722 | int __devinit snd_cs46xx_create(snd_card_t * card, | 3722 | int __devinit snd_cs46xx_create(struct snd_card *card, |
3723 | struct pci_dev * pci, | 3723 | struct pci_dev * pci, |
3724 | int external_amp, int thinkpad, | 3724 | int external_amp, int thinkpad, |
3725 | cs46xx_t ** rchip) | 3725 | struct snd_cs46xx ** rchip) |
3726 | { | 3726 | { |
3727 | cs46xx_t *chip; | 3727 | struct snd_cs46xx *chip; |
3728 | int err, idx; | 3728 | int err, idx; |
3729 | snd_cs46xx_region_t *region; | 3729 | struct snd_cs46xx_region *region; |
3730 | struct cs_card_type *cp; | 3730 | struct cs_card_type *cp; |
3731 | u16 ss_card, ss_vendor; | 3731 | u16 ss_card, ss_vendor; |
3732 | static snd_device_ops_t ops = { | 3732 | static struct snd_device_ops ops = { |
3733 | .dev_free = snd_cs46xx_dev_free, | 3733 | .dev_free = snd_cs46xx_dev_free, |
3734 | }; | 3734 | }; |
3735 | 3735 | ||
@@ -3755,7 +3755,8 @@ int __devinit snd_cs46xx_create(snd_card_t * card, | |||
3755 | chip->ba1_addr = pci_resource_start(pci, 1); | 3755 | chip->ba1_addr = pci_resource_start(pci, 1); |
3756 | if (chip->ba0_addr == 0 || chip->ba0_addr == (unsigned long)~0 || | 3756 | if (chip->ba0_addr == 0 || chip->ba0_addr == (unsigned long)~0 || |
3757 | chip->ba1_addr == 0 || chip->ba1_addr == (unsigned long)~0) { | 3757 | chip->ba1_addr == 0 || chip->ba1_addr == (unsigned long)~0) { |
3758 | snd_printk(KERN_ERR "wrong address(es) - ba0 = 0x%lx, ba1 = 0x%lx\n", chip->ba0_addr, chip->ba1_addr); | 3758 | snd_printk(KERN_ERR "wrong address(es) - ba0 = 0x%lx, ba1 = 0x%lx\n", |
3759 | chip->ba0_addr, chip->ba1_addr); | ||
3759 | snd_cs46xx_free(chip); | 3760 | snd_cs46xx_free(chip); |
3760 | return -ENOMEM; | 3761 | return -ENOMEM; |
3761 | } | 3762 | } |
@@ -3825,8 +3826,10 @@ int __devinit snd_cs46xx_create(snd_card_t * card, | |||
3825 | 3826 | ||
3826 | for (idx = 0; idx < 5; idx++) { | 3827 | for (idx = 0; idx < 5; idx++) { |
3827 | region = &chip->region.idx[idx]; | 3828 | region = &chip->region.idx[idx]; |
3828 | if ((region->resource = request_mem_region(region->base, region->size, region->name)) == NULL) { | 3829 | if ((region->resource = request_mem_region(region->base, region->size, |
3829 | snd_printk(KERN_ERR "unable to request memory region 0x%lx-0x%lx\n", region->base, region->base + region->size - 1); | 3830 | region->name)) == NULL) { |
3831 | snd_printk(KERN_ERR "unable to request memory region 0x%lx-0x%lx\n", | ||
3832 | region->base, region->base + region->size - 1); | ||
3830 | snd_cs46xx_free(chip); | 3833 | snd_cs46xx_free(chip); |
3831 | return -EBUSY; | 3834 | return -EBUSY; |
3832 | } | 3835 | } |
@@ -3838,7 +3841,8 @@ int __devinit snd_cs46xx_create(snd_card_t * card, | |||
3838 | } | 3841 | } |
3839 | } | 3842 | } |
3840 | 3843 | ||
3841 | if (request_irq(pci->irq, snd_cs46xx_interrupt, SA_INTERRUPT|SA_SHIRQ, "CS46XX", (void *) chip)) { | 3844 | if (request_irq(pci->irq, snd_cs46xx_interrupt, SA_INTERRUPT|SA_SHIRQ, |
3845 | "CS46XX", chip)) { | ||
3842 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 3846 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
3843 | snd_cs46xx_free(chip); | 3847 | snd_cs46xx_free(chip); |
3844 | return -EBUSY; | 3848 | return -EBUSY; |