aboutsummaryrefslogtreecommitdiffstats
path: root/sound/sparc
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 09:11:19 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:20:06 -0500
commitdcc94db78362759931ff538f1579d4a1cec8bd64 (patch)
tree2755792c2fe694b9ade90a32f91e495bced46c60 /sound/sparc
parentaf0fbfb58dbb2081ae91789892933321ee95d71f (diff)
[ALSA] Remove xxx_t typedefs: SPARC AMD7930
Modules: SPARC AMD7930 driver Remove xxx_t typedefs from the SPARC AMD7930 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/sparc')
-rw-r--r--sound/sparc/amd7930.c130
1 files changed, 65 insertions, 65 deletions
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index 7d4b6855bac0..c2710499b83a 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -311,7 +311,7 @@ struct amd7930_map {
311#define AMR_PP_PPCR2 0xC8 311#define AMR_PP_PPCR2 0xC8
312#define AMR_PP_PPCR3 0xC9 312#define AMR_PP_PPCR3 0xC9
313 313
314typedef struct snd_amd7930 { 314struct snd_amd7930 {
315 spinlock_t lock; 315 spinlock_t lock;
316 void __iomem *regs; 316 void __iomem *regs;
317 u32 flags; 317 u32 flags;
@@ -320,10 +320,10 @@ typedef struct snd_amd7930 {
320 320
321 struct amd7930_map map; 321 struct amd7930_map map;
322 322
323 snd_card_t *card; 323 struct snd_card *card;
324 snd_pcm_t *pcm; 324 struct snd_pcm *pcm;
325 snd_pcm_substream_t *playback_substream; 325 struct snd_pcm_substream *playback_substream;
326 snd_pcm_substream_t *capture_substream; 326 struct snd_pcm_substream *capture_substream;
327 327
328 /* Playback/Capture buffer state. */ 328 /* Playback/Capture buffer state. */
329 unsigned char *p_orig, *p_cur; 329 unsigned char *p_orig, *p_cur;
@@ -339,12 +339,12 @@ typedef struct snd_amd7930 {
339 unsigned int irq; 339 unsigned int irq;
340 unsigned int regs_size; 340 unsigned int regs_size;
341 struct snd_amd7930 *next; 341 struct snd_amd7930 *next;
342} amd7930_t; 342};
343 343
344static amd7930_t *amd7930_list; 344static struct snd_amd7930 *amd7930_list;
345 345
346/* Idle the AMD7930 chip. The amd->lock is not held. */ 346/* Idle the AMD7930 chip. The amd->lock is not held. */
347static __inline__ void amd7930_idle(amd7930_t *amd) 347static __inline__ void amd7930_idle(struct snd_amd7930 *amd)
348{ 348{
349 unsigned long flags; 349 unsigned long flags;
350 350
@@ -355,7 +355,7 @@ static __inline__ void amd7930_idle(amd7930_t *amd)
355} 355}
356 356
357/* Enable chip interrupts. The amd->lock is not held. */ 357/* Enable chip interrupts. The amd->lock is not held. */
358static __inline__ void amd7930_enable_ints(amd7930_t *amd) 358static __inline__ void amd7930_enable_ints(struct snd_amd7930 *amd)
359{ 359{
360 unsigned long flags; 360 unsigned long flags;
361 361
@@ -366,7 +366,7 @@ static __inline__ void amd7930_enable_ints(amd7930_t *amd)
366} 366}
367 367
368/* Disable chip interrupts. The amd->lock is not held. */ 368/* Disable chip interrupts. The amd->lock is not held. */
369static __inline__ void amd7930_disable_ints(amd7930_t *amd) 369static __inline__ void amd7930_disable_ints(struct snd_amd7930 *amd)
370{ 370{
371 unsigned long flags; 371 unsigned long flags;
372 372
@@ -379,7 +379,7 @@ static __inline__ void amd7930_disable_ints(amd7930_t *amd)
379/* Commit amd7930_map settings to the hardware. 379/* Commit amd7930_map settings to the hardware.
380 * The amd->lock is held and local interrupts are disabled. 380 * The amd->lock is held and local interrupts are disabled.
381 */ 381 */
382static void __amd7930_write_map(amd7930_t *amd) 382static void __amd7930_write_map(struct snd_amd7930 *amd)
383{ 383{
384 struct amd7930_map *map = &amd->map; 384 struct amd7930_map *map = &amd->map;
385 385
@@ -473,7 +473,7 @@ static __const__ __u16 ger_coeff[] = {
473/* Update amd7930_map settings and program them into the hardware. 473/* Update amd7930_map settings and program them into the hardware.
474 * The amd->lock is held and local interrupts are disabled. 474 * The amd->lock is held and local interrupts are disabled.
475 */ 475 */
476static void __amd7930_update_map(amd7930_t *amd) 476static void __amd7930_update_map(struct snd_amd7930 *amd)
477{ 477{
478 struct amd7930_map *map = &amd->map; 478 struct amd7930_map *map = &amd->map;
479 int level; 479 int level;
@@ -493,7 +493,7 @@ static void __amd7930_update_map(amd7930_t *amd)
493 493
494static irqreturn_t snd_amd7930_interrupt(int irq, void *dev_id, struct pt_regs *regs) 494static irqreturn_t snd_amd7930_interrupt(int irq, void *dev_id, struct pt_regs *regs)
495{ 495{
496 amd7930_t *amd = dev_id; 496 struct snd_amd7930 *amd = dev_id;
497 unsigned int elapsed; 497 unsigned int elapsed;
498 u8 ir; 498 u8 ir;
499 499
@@ -534,7 +534,7 @@ static irqreturn_t snd_amd7930_interrupt(int irq, void *dev_id, struct pt_regs *
534 return IRQ_HANDLED; 534 return IRQ_HANDLED;
535} 535}
536 536
537static int snd_amd7930_trigger(amd7930_t *amd, unsigned int flag, int cmd) 537static int snd_amd7930_trigger(struct snd_amd7930 *amd, unsigned int flag, int cmd)
538{ 538{
539 unsigned long flags; 539 unsigned long flags;
540 int result = 0; 540 int result = 0;
@@ -564,24 +564,24 @@ static int snd_amd7930_trigger(amd7930_t *amd, unsigned int flag, int cmd)
564 return result; 564 return result;
565} 565}
566 566
567static int snd_amd7930_playback_trigger(snd_pcm_substream_t * substream, 567static int snd_amd7930_playback_trigger(struct snd_pcm_substream *substream,
568 int cmd) 568 int cmd)
569{ 569{
570 amd7930_t *amd = snd_pcm_substream_chip(substream); 570 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
571 return snd_amd7930_trigger(amd, AMD7930_FLAG_PLAYBACK, cmd); 571 return snd_amd7930_trigger(amd, AMD7930_FLAG_PLAYBACK, cmd);
572} 572}
573 573
574static int snd_amd7930_capture_trigger(snd_pcm_substream_t * substream, 574static int snd_amd7930_capture_trigger(struct snd_pcm_substream *substream,
575 int cmd) 575 int cmd)
576{ 576{
577 amd7930_t *amd = snd_pcm_substream_chip(substream); 577 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
578 return snd_amd7930_trigger(amd, AMD7930_FLAG_CAPTURE, cmd); 578 return snd_amd7930_trigger(amd, AMD7930_FLAG_CAPTURE, cmd);
579} 579}
580 580
581static int snd_amd7930_playback_prepare(snd_pcm_substream_t * substream) 581static int snd_amd7930_playback_prepare(struct snd_pcm_substream *substream)
582{ 582{
583 amd7930_t *amd = snd_pcm_substream_chip(substream); 583 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
584 snd_pcm_runtime_t *runtime = substream->runtime; 584 struct snd_pcm_runtime *runtime = substream->runtime;
585 unsigned int size = snd_pcm_lib_buffer_bytes(substream); 585 unsigned int size = snd_pcm_lib_buffer_bytes(substream);
586 unsigned long flags; 586 unsigned long flags;
587 u8 new_mmr1; 587 u8 new_mmr1;
@@ -610,10 +610,10 @@ static int snd_amd7930_playback_prepare(snd_pcm_substream_t * substream)
610 return 0; 610 return 0;
611} 611}
612 612
613static int snd_amd7930_capture_prepare(snd_pcm_substream_t * substream) 613static int snd_amd7930_capture_prepare(struct snd_pcm_substream *substream)
614{ 614{
615 amd7930_t *amd = snd_pcm_substream_chip(substream); 615 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
616 snd_pcm_runtime_t *runtime = substream->runtime; 616 struct snd_pcm_runtime *runtime = substream->runtime;
617 unsigned int size = snd_pcm_lib_buffer_bytes(substream); 617 unsigned int size = snd_pcm_lib_buffer_bytes(substream);
618 unsigned long flags; 618 unsigned long flags;
619 u8 new_mmr1; 619 u8 new_mmr1;
@@ -642,9 +642,9 @@ static int snd_amd7930_capture_prepare(snd_pcm_substream_t * substream)
642 return 0; 642 return 0;
643} 643}
644 644
645static snd_pcm_uframes_t snd_amd7930_playback_pointer(snd_pcm_substream_t * substream) 645static snd_pcm_uframes_t snd_amd7930_playback_pointer(struct snd_pcm_substream *substream)
646{ 646{
647 amd7930_t *amd = snd_pcm_substream_chip(substream); 647 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
648 size_t ptr; 648 size_t ptr;
649 649
650 if (!(amd->flags & AMD7930_FLAG_PLAYBACK)) 650 if (!(amd->flags & AMD7930_FLAG_PLAYBACK))
@@ -653,9 +653,9 @@ static snd_pcm_uframes_t snd_amd7930_playback_pointer(snd_pcm_substream_t * subs
653 return bytes_to_frames(substream->runtime, ptr); 653 return bytes_to_frames(substream->runtime, ptr);
654} 654}
655 655
656static snd_pcm_uframes_t snd_amd7930_capture_pointer(snd_pcm_substream_t * substream) 656static snd_pcm_uframes_t snd_amd7930_capture_pointer(struct snd_pcm_substream *substream)
657{ 657{
658 amd7930_t *amd = snd_pcm_substream_chip(substream); 658 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
659 size_t ptr; 659 size_t ptr;
660 660
661 if (!(amd->flags & AMD7930_FLAG_CAPTURE)) 661 if (!(amd->flags & AMD7930_FLAG_CAPTURE))
@@ -666,7 +666,7 @@ static snd_pcm_uframes_t snd_amd7930_capture_pointer(snd_pcm_substream_t * subst
666} 666}
667 667
668/* Playback and capture have identical properties. */ 668/* Playback and capture have identical properties. */
669static snd_pcm_hardware_t snd_amd7930_pcm_hw = 669static struct snd_pcm_hardware snd_amd7930_pcm_hw =
670{ 670{
671 .info = (SNDRV_PCM_INFO_MMAP | 671 .info = (SNDRV_PCM_INFO_MMAP |
672 SNDRV_PCM_INFO_MMAP_VALID | 672 SNDRV_PCM_INFO_MMAP_VALID |
@@ -686,54 +686,54 @@ static snd_pcm_hardware_t snd_amd7930_pcm_hw =
686 .periods_max = 1024, 686 .periods_max = 1024,
687}; 687};
688 688
689static int snd_amd7930_playback_open(snd_pcm_substream_t * substream) 689static int snd_amd7930_playback_open(struct snd_pcm_substream *substream)
690{ 690{
691 amd7930_t *amd = snd_pcm_substream_chip(substream); 691 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
692 snd_pcm_runtime_t *runtime = substream->runtime; 692 struct snd_pcm_runtime *runtime = substream->runtime;
693 693
694 amd->playback_substream = substream; 694 amd->playback_substream = substream;
695 runtime->hw = snd_amd7930_pcm_hw; 695 runtime->hw = snd_amd7930_pcm_hw;
696 return 0; 696 return 0;
697} 697}
698 698
699static int snd_amd7930_capture_open(snd_pcm_substream_t * substream) 699static int snd_amd7930_capture_open(struct snd_pcm_substream *substream)
700{ 700{
701 amd7930_t *amd = snd_pcm_substream_chip(substream); 701 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
702 snd_pcm_runtime_t *runtime = substream->runtime; 702 struct snd_pcm_runtime *runtime = substream->runtime;
703 703
704 amd->capture_substream = substream; 704 amd->capture_substream = substream;
705 runtime->hw = snd_amd7930_pcm_hw; 705 runtime->hw = snd_amd7930_pcm_hw;
706 return 0; 706 return 0;
707} 707}
708 708
709static int snd_amd7930_playback_close(snd_pcm_substream_t * substream) 709static int snd_amd7930_playback_close(struct snd_pcm_substream *substream)
710{ 710{
711 amd7930_t *amd = snd_pcm_substream_chip(substream); 711 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
712 712
713 amd->playback_substream = NULL; 713 amd->playback_substream = NULL;
714 return 0; 714 return 0;
715} 715}
716 716
717static int snd_amd7930_capture_close(snd_pcm_substream_t * substream) 717static int snd_amd7930_capture_close(struct snd_pcm_substream *substream)
718{ 718{
719 amd7930_t *amd = snd_pcm_substream_chip(substream); 719 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream);
720 720
721 amd->capture_substream = NULL; 721 amd->capture_substream = NULL;
722 return 0; 722 return 0;
723} 723}
724 724
725static int snd_amd7930_hw_params(snd_pcm_substream_t * substream, 725static int snd_amd7930_hw_params(struct snd_pcm_substream *substream,
726 snd_pcm_hw_params_t * hw_params) 726 struct snd_pcm_hw_params *hw_params)
727{ 727{
728 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 728 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
729} 729}
730 730
731static int snd_amd7930_hw_free(snd_pcm_substream_t * substream) 731static int snd_amd7930_hw_free(struct snd_pcm_substream *substream)
732{ 732{
733 return snd_pcm_lib_free_pages(substream); 733 return snd_pcm_lib_free_pages(substream);
734} 734}
735 735
736static snd_pcm_ops_t snd_amd7930_playback_ops = { 736static struct snd_pcm_ops snd_amd7930_playback_ops = {
737 .open = snd_amd7930_playback_open, 737 .open = snd_amd7930_playback_open,
738 .close = snd_amd7930_playback_close, 738 .close = snd_amd7930_playback_close,
739 .ioctl = snd_pcm_lib_ioctl, 739 .ioctl = snd_pcm_lib_ioctl,
@@ -744,7 +744,7 @@ static snd_pcm_ops_t snd_amd7930_playback_ops = {
744 .pointer = snd_amd7930_playback_pointer, 744 .pointer = snd_amd7930_playback_pointer,
745}; 745};
746 746
747static snd_pcm_ops_t snd_amd7930_capture_ops = { 747static struct snd_pcm_ops snd_amd7930_capture_ops = {
748 .open = snd_amd7930_capture_open, 748 .open = snd_amd7930_capture_open,
749 .close = snd_amd7930_capture_close, 749 .close = snd_amd7930_capture_close,
750 .ioctl = snd_pcm_lib_ioctl, 750 .ioctl = snd_pcm_lib_ioctl,
@@ -755,9 +755,9 @@ static snd_pcm_ops_t snd_amd7930_capture_ops = {
755 .pointer = snd_amd7930_capture_pointer, 755 .pointer = snd_amd7930_capture_pointer,
756}; 756};
757 757
758static int __init snd_amd7930_pcm(amd7930_t *amd) 758static int __init snd_amd7930_pcm(struct snd_amd7930 *amd)
759{ 759{
760 snd_pcm_t *pcm; 760 struct snd_pcm *pcm;
761 int err; 761 int err;
762 762
763 if ((err = snd_pcm_new(amd->card, 763 if ((err = snd_pcm_new(amd->card,
@@ -787,7 +787,7 @@ static int __init snd_amd7930_pcm(amd7930_t *amd)
787#define VOLUME_CAPTURE 1 787#define VOLUME_CAPTURE 1
788#define VOLUME_PLAYBACK 2 788#define VOLUME_PLAYBACK 2
789 789
790static int snd_amd7930_info_volume(snd_kcontrol_t *kctl, snd_ctl_elem_info_t *uinfo) 790static int snd_amd7930_info_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem_info *uinfo)
791{ 791{
792 int type = kctl->private_value; 792 int type = kctl->private_value;
793 793
@@ -804,9 +804,9 @@ static int snd_amd7930_info_volume(snd_kcontrol_t *kctl, snd_ctl_elem_info_t *ui
804 return 0; 804 return 0;
805} 805}
806 806
807static int snd_amd7930_get_volume(snd_kcontrol_t *kctl, snd_ctl_elem_value_t *ucontrol) 807static int snd_amd7930_get_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *ucontrol)
808{ 808{
809 amd7930_t *amd = snd_kcontrol_chip(kctl); 809 struct snd_amd7930 *amd = snd_kcontrol_chip(kctl);
810 int type = kctl->private_value; 810 int type = kctl->private_value;
811 int *swval; 811 int *swval;
812 812
@@ -832,9 +832,9 @@ static int snd_amd7930_get_volume(snd_kcontrol_t *kctl, snd_ctl_elem_value_t *uc
832 return 0; 832 return 0;
833} 833}
834 834
835static int snd_amd7930_put_volume(snd_kcontrol_t *kctl, snd_ctl_elem_value_t *ucontrol) 835static int snd_amd7930_put_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *ucontrol)
836{ 836{
837 amd7930_t *amd = snd_kcontrol_chip(kctl); 837 struct snd_amd7930 *amd = snd_kcontrol_chip(kctl);
838 unsigned long flags; 838 unsigned long flags;
839 int type = kctl->private_value; 839 int type = kctl->private_value;
840 int *swval, change; 840 int *swval, change;
@@ -870,7 +870,7 @@ static int snd_amd7930_put_volume(snd_kcontrol_t *kctl, snd_ctl_elem_value_t *uc
870 return change; 870 return change;
871} 871}
872 872
873static snd_kcontrol_new_t amd7930_controls[] __initdata = { 873static struct snd_kcontrol_new amd7930_controls[] __initdata = {
874 { 874 {
875 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 875 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
876 .name = "Monitor Volume", 876 .name = "Monitor Volume",
@@ -900,9 +900,9 @@ static snd_kcontrol_new_t amd7930_controls[] __initdata = {
900 }, 900 },
901}; 901};
902 902
903static int __init snd_amd7930_mixer(amd7930_t *amd) 903static int __init snd_amd7930_mixer(struct snd_amd7930 *amd)
904{ 904{
905 snd_card_t *card; 905 struct snd_card *card;
906 int idx, err; 906 int idx, err;
907 907
908 snd_assert(amd != NULL && amd->card != NULL, return -EINVAL); 908 snd_assert(amd != NULL && amd->card != NULL, return -EINVAL);
@@ -919,7 +919,7 @@ static int __init snd_amd7930_mixer(amd7930_t *amd)
919 return 0; 919 return 0;
920} 920}
921 921
922static int snd_amd7930_free(amd7930_t *amd) 922static int snd_amd7930_free(struct snd_amd7930 *amd)
923{ 923{
924 amd7930_idle(amd); 924 amd7930_idle(amd);
925 925
@@ -934,27 +934,27 @@ static int snd_amd7930_free(amd7930_t *amd)
934 return 0; 934 return 0;
935} 935}
936 936
937static int snd_amd7930_dev_free(snd_device_t *device) 937static int snd_amd7930_dev_free(struct snd_device *device)
938{ 938{
939 amd7930_t *amd = device->device_data; 939 struct snd_amd7930 *amd = device->device_data;
940 940
941 return snd_amd7930_free(amd); 941 return snd_amd7930_free(amd);
942} 942}
943 943
944static snd_device_ops_t snd_amd7930_dev_ops = { 944static struct snd_device_ops snd_amd7930_dev_ops = {
945 .dev_free = snd_amd7930_dev_free, 945 .dev_free = snd_amd7930_dev_free,
946}; 946};
947 947
948static int __init snd_amd7930_create(snd_card_t *card, 948static int __init snd_amd7930_create(struct snd_card *card,
949 struct sbus_dev *sdev, 949 struct sbus_dev *sdev,
950 struct resource *rp, 950 struct resource *rp,
951 unsigned int reg_size, 951 unsigned int reg_size,
952 struct linux_prom_irqs *irq_prop, 952 struct linux_prom_irqs *irq_prop,
953 int dev, 953 int dev,
954 amd7930_t **ramd) 954 struct snd_amd7930 **ramd)
955{ 955{
956 unsigned long flags; 956 unsigned long flags;
957 amd7930_t *amd; 957 struct snd_amd7930 *amd;
958 int err; 958 int err;
959 959
960 *ramd = NULL; 960 *ramd = NULL;
@@ -1023,8 +1023,8 @@ static int __init amd7930_attach(int prom_node, struct sbus_dev *sdev)
1023 struct linux_prom_registers reg_prop; 1023 struct linux_prom_registers reg_prop;
1024 struct linux_prom_irqs irq_prop; 1024 struct linux_prom_irqs irq_prop;
1025 struct resource res, *rp; 1025 struct resource res, *rp;
1026 snd_card_t *card; 1026 struct snd_card *card;
1027 amd7930_t *amd; 1027 struct snd_amd7930 *amd;
1028 int err; 1028 int err;
1029 1029
1030 if (dev >= SNDRV_CARDS) 1030 if (dev >= SNDRV_CARDS)
@@ -1123,10 +1123,10 @@ static int __init amd7930_init(void)
1123 1123
1124static void __exit amd7930_exit(void) 1124static void __exit amd7930_exit(void)
1125{ 1125{
1126 amd7930_t *p = amd7930_list; 1126 struct snd_amd7930 *p = amd7930_list;
1127 1127
1128 while (p != NULL) { 1128 while (p != NULL) {
1129 amd7930_t *next = p->next; 1129 struct snd_amd7930 *next = p->next;
1130 1130
1131 snd_card_free(p->card); 1131 snd_card_free(p->card);
1132 1132