aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/sscape.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:42:05 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:37 -0500
commitbe6245373f46eb21839ba1b54c83bc7cc8274208 (patch)
tree645b9067557c6cb2fe733d7d4aacdfa005b1220e /sound/isa/sscape.c
parentec6c5ae353fd9b1141da67094e125e75d031d740 (diff)
[ALSA] Remove xxx_t typedefs: ISA SoundScape
Modules: Sound Scape driver Remove xxx_t typedefs from the ISA SoundScape driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/sscape.c')
-rw-r--r--sound/isa/sscape.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index 11588067fa4f..d07963eddb3f 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -75,7 +75,7 @@ static struct pnp_card_device_id sscape_pnpids[] = {
75MODULE_DEVICE_TABLE(pnp_card, sscape_pnpids); 75MODULE_DEVICE_TABLE(pnp_card, sscape_pnpids);
76#endif 76#endif
77 77
78static snd_card_t *sscape_card[SNDRV_CARDS]; 78static struct snd_card *sscape_card[SNDRV_CARDS];
79 79
80 80
81#define MPU401_IO(i) ((i) + 0) 81#define MPU401_IO(i) ((i) + 0)
@@ -127,9 +127,9 @@ struct soundscape {
127 int codec_type; 127 int codec_type;
128 int ic_type; 128 int ic_type;
129 struct resource *io_res; 129 struct resource *io_res;
130 cs4231_t *chip; 130 struct snd_cs4231 *chip;
131 mpu401_t *mpu; 131 struct snd_mpu401 *mpu;
132 snd_hwdep_t *hw; 132 struct snd_hwdep *hw;
133 133
134 /* 134 /*
135 * The MIDI device won't work until we've loaded 135 * The MIDI device won't work until we've loaded
@@ -144,17 +144,17 @@ struct soundscape {
144#define INVALID_IRQ ((unsigned)-1) 144#define INVALID_IRQ ((unsigned)-1)
145 145
146 146
147static inline struct soundscape *get_card_soundscape(snd_card_t * c) 147static inline struct soundscape *get_card_soundscape(struct snd_card *c)
148{ 148{
149 return (struct soundscape *) (c->private_data); 149 return (struct soundscape *) (c->private_data);
150} 150}
151 151
152static inline struct soundscape *get_mpu401_soundscape(mpu401_t * mpu) 152static inline struct soundscape *get_mpu401_soundscape(struct snd_mpu401 * mpu)
153{ 153{
154 return (struct soundscape *) (mpu->private_data); 154 return (struct soundscape *) (mpu->private_data);
155} 155}
156 156
157static inline struct soundscape *get_hwdep_soundscape(snd_hwdep_t * hw) 157static inline struct soundscape *get_hwdep_soundscape(struct snd_hwdep * hw)
158{ 158{
159 return (struct soundscape *) (hw->private_data); 159 return (struct soundscape *) (hw->private_data);
160} 160}
@@ -308,7 +308,7 @@ static int host_write_ctrl_unsafe(unsigned io_base, unsigned char data,
308 * 308 *
309 * NOTE: This check is based upon observation, not documentation. 309 * NOTE: This check is based upon observation, not documentation.
310 */ 310 */
311static inline int verify_mpu401(const mpu401_t * mpu) 311static inline int verify_mpu401(const struct snd_mpu401 * mpu)
312{ 312{
313 return ((inb(MIDI_CTRL_IO(mpu->port)) & 0xc0) == 0x80); 313 return ((inb(MIDI_CTRL_IO(mpu->port)) & 0xc0) == 0x80);
314} 314}
@@ -316,7 +316,7 @@ static inline int verify_mpu401(const mpu401_t * mpu)
316/* 316/*
317 * This is apparently the standard way to initailise an MPU-401 317 * This is apparently the standard way to initailise an MPU-401
318 */ 318 */
319static inline void initialise_mpu401(const mpu401_t * mpu) 319static inline void initialise_mpu401(const struct snd_mpu401 * mpu)
320{ 320{
321 outb(0, MIDI_DATA_IO(mpu->port)); 321 outb(0, MIDI_DATA_IO(mpu->port));
322} 322}
@@ -335,7 +335,7 @@ static inline void activate_ad1845_unsafe(unsigned io_base)
335/* 335/*
336 * Do the necessary ALSA-level cleanup to deallocate our driver ... 336 * Do the necessary ALSA-level cleanup to deallocate our driver ...
337 */ 337 */
338static void soundscape_free(snd_card_t * c) 338static void soundscape_free(struct snd_card *c)
339{ 339{
340 register struct soundscape *sscape = get_card_soundscape(c); 340 register struct soundscape *sscape = get_card_soundscape(c);
341 release_and_free_resource(sscape->io_res); 341 release_and_free_resource(sscape->io_res);
@@ -613,7 +613,7 @@ static int sscape_upload_microcode(struct soundscape *sscape,
613 * simultaneously, and that we can't open it at all if 613 * simultaneously, and that we can't open it at all if
614 * someone is using the MIDI device. 614 * someone is using the MIDI device.
615 */ 615 */
616static int sscape_hw_open(snd_hwdep_t * hw, struct file *file) 616static int sscape_hw_open(struct snd_hwdep * hw, struct file *file)
617{ 617{
618 register struct soundscape *sscape = get_hwdep_soundscape(hw); 618 register struct soundscape *sscape = get_hwdep_soundscape(hw);
619 unsigned long flags; 619 unsigned long flags;
@@ -632,7 +632,7 @@ static int sscape_hw_open(snd_hwdep_t * hw, struct file *file)
632 return err; 632 return err;
633} 633}
634 634
635static int sscape_hw_release(snd_hwdep_t * hw, struct file *file) 635static int sscape_hw_release(struct snd_hwdep * hw, struct file *file)
636{ 636{
637 register struct soundscape *sscape = get_hwdep_soundscape(hw); 637 register struct soundscape *sscape = get_hwdep_soundscape(hw);
638 unsigned long flags; 638 unsigned long flags;
@@ -643,7 +643,7 @@ static int sscape_hw_release(snd_hwdep_t * hw, struct file *file)
643 return 0; 643 return 0;
644} 644}
645 645
646static int sscape_hw_ioctl(snd_hwdep_t * hw, struct file *file, 646static int sscape_hw_ioctl(struct snd_hwdep * hw, struct file *file,
647 unsigned int cmd, unsigned long arg) 647 unsigned int cmd, unsigned long arg)
648{ 648{
649 struct soundscape *sscape = get_hwdep_soundscape(hw); 649 struct soundscape *sscape = get_hwdep_soundscape(hw);
@@ -692,8 +692,8 @@ static int sscape_hw_ioctl(snd_hwdep_t * hw, struct file *file,
692/* 692/*
693 * Mixer control for the SoundScape's MIDI device. 693 * Mixer control for the SoundScape's MIDI device.
694 */ 694 */
695static int sscape_midi_info(snd_kcontrol_t * ctl, 695static int sscape_midi_info(struct snd_kcontrol *ctl,
696 snd_ctl_elem_info_t * uinfo) 696 struct snd_ctl_elem_info *uinfo)
697{ 697{
698 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 698 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
699 uinfo->count = 1; 699 uinfo->count = 1;
@@ -702,11 +702,11 @@ static int sscape_midi_info(snd_kcontrol_t * ctl,
702 return 0; 702 return 0;
703} 703}
704 704
705static int sscape_midi_get(snd_kcontrol_t * kctl, 705static int sscape_midi_get(struct snd_kcontrol *kctl,
706 snd_ctl_elem_value_t * uctl) 706 struct snd_ctl_elem_value *uctl)
707{ 707{
708 cs4231_t *chip = snd_kcontrol_chip(kctl); 708 struct snd_cs4231 *chip = snd_kcontrol_chip(kctl);
709 snd_card_t *card = chip->card; 709 struct snd_card *card = chip->card;
710 register struct soundscape *s = get_card_soundscape(card); 710 register struct soundscape *s = get_card_soundscape(card);
711 unsigned long flags; 711 unsigned long flags;
712 712
@@ -722,11 +722,11 @@ static int sscape_midi_get(snd_kcontrol_t * kctl,
722 return 0; 722 return 0;
723} 723}
724 724
725static int sscape_midi_put(snd_kcontrol_t * kctl, 725static int sscape_midi_put(struct snd_kcontrol *kctl,
726 snd_ctl_elem_value_t * uctl) 726 struct snd_ctl_elem_value *uctl)
727{ 727{
728 cs4231_t *chip = snd_kcontrol_chip(kctl); 728 struct snd_cs4231 *chip = snd_kcontrol_chip(kctl);
729 snd_card_t *card = chip->card; 729 struct snd_card *card = chip->card;
730 register struct soundscape *s = get_card_soundscape(card); 730 register struct soundscape *s = get_card_soundscape(card);
731 unsigned long flags; 731 unsigned long flags;
732 int change; 732 int change;
@@ -763,7 +763,7 @@ static int sscape_midi_put(snd_kcontrol_t * kctl,
763 return change; 763 return change;
764} 764}
765 765
766static snd_kcontrol_new_t midi_mixer_ctl = { 766static struct snd_kcontrol_new midi_mixer_ctl = {
767 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 767 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
768 .name = "MIDI", 768 .name = "MIDI",
769 .info = sscape_midi_info, 769 .info = sscape_midi_info,
@@ -849,7 +849,7 @@ static int __devinit detect_sscape(struct soundscape *s)
849 * to crash the machine. Also check that someone isn't using the hardware 849 * to crash the machine. Also check that someone isn't using the hardware
850 * IOCTL device. 850 * IOCTL device.
851 */ 851 */
852static int mpu401_open(mpu401_t * mpu) 852static int mpu401_open(struct snd_mpu401 * mpu)
853{ 853{
854 int err; 854 int err;
855 855
@@ -875,7 +875,7 @@ static int mpu401_open(mpu401_t * mpu)
875 return err; 875 return err;
876} 876}
877 877
878static void mpu401_close(mpu401_t * mpu) 878static void mpu401_close(struct snd_mpu401 * mpu)
879{ 879{
880 register struct soundscape *sscape = get_mpu401_soundscape(mpu); 880 register struct soundscape *sscape = get_mpu401_soundscape(mpu);
881 unsigned long flags; 881 unsigned long flags;
@@ -888,10 +888,10 @@ static void mpu401_close(mpu401_t * mpu)
888/* 888/*
889 * Initialse an MPU-401 subdevice for MIDI support on the SoundScape. 889 * Initialse an MPU-401 subdevice for MIDI support on the SoundScape.
890 */ 890 */
891static int __devinit create_mpu401(snd_card_t * card, int devnum, unsigned long port, int irq) 891static int __devinit create_mpu401(struct snd_card *card, int devnum, unsigned long port, int irq)
892{ 892{
893 struct soundscape *sscape = get_card_soundscape(card); 893 struct soundscape *sscape = get_card_soundscape(card);
894 snd_rawmidi_t *rawmidi; 894 struct snd_rawmidi *rawmidi;
895 int err; 895 int err;
896 896
897#define MPU401_SHARE_HARDWARE 1 897#define MPU401_SHARE_HARDWARE 1
@@ -900,7 +900,7 @@ static int __devinit create_mpu401(snd_card_t * card, int devnum, unsigned long
900 port, MPU401_SHARE_HARDWARE, 900 port, MPU401_SHARE_HARDWARE,
901 irq, SA_INTERRUPT, 901 irq, SA_INTERRUPT,
902 &rawmidi)) == 0) { 902 &rawmidi)) == 0) {
903 mpu401_t *mpu = (mpu401_t *) rawmidi->private_data; 903 struct snd_mpu401 *mpu = (struct snd_mpu401 *) rawmidi->private_data;
904 mpu->open_input = mpu401_open; 904 mpu->open_input = mpu401_open;
905 mpu->open_output = mpu401_open; 905 mpu->open_output = mpu401_open;
906 mpu->close_input = mpu401_close; 906 mpu->close_input = mpu401_close;
@@ -919,7 +919,7 @@ static int __devinit create_mpu401(snd_card_t * card, int devnum, unsigned long
919 * Override for the CS4231 playback format function. 919 * Override for the CS4231 playback format function.
920 * The AD1845 has much simpler format and rate selection. 920 * The AD1845 has much simpler format and rate selection.
921 */ 921 */
922static void ad1845_playback_format(cs4231_t * chip, snd_pcm_hw_params_t * params, unsigned char format) 922static void ad1845_playback_format(struct snd_cs4231 * chip, struct snd_pcm_hw_params *params, unsigned char format)
923{ 923{
924 unsigned long flags; 924 unsigned long flags;
925 unsigned rate = params_rate(params); 925 unsigned rate = params_rate(params);
@@ -955,7 +955,7 @@ static void ad1845_playback_format(cs4231_t * chip, snd_pcm_hw_params_t * params
955 * Override for the CS4231 capture format function. 955 * Override for the CS4231 capture format function.
956 * The AD1845 has much simpler format and rate selection. 956 * The AD1845 has much simpler format and rate selection.
957 */ 957 */
958static void ad1845_capture_format(cs4231_t * chip, snd_pcm_hw_params_t * params, unsigned char format) 958static void ad1845_capture_format(struct snd_cs4231 * chip, struct snd_pcm_hw_params *params, unsigned char format)
959{ 959{
960 unsigned long flags; 960 unsigned long flags;
961 unsigned rate = params_rate(params); 961 unsigned rate = params_rate(params);
@@ -993,10 +993,10 @@ static void ad1845_capture_format(cs4231_t * chip, snd_pcm_hw_params_t * params,
993 * try to support at least some of the extra bits by overriding 993 * try to support at least some of the extra bits by overriding
994 * some of the CS4231 callback. 994 * some of the CS4231 callback.
995 */ 995 */
996static int __devinit create_ad1845(snd_card_t * card, unsigned port, int irq, int dma1) 996static int __devinit create_ad1845(struct snd_card *card, unsigned port, int irq, int dma1)
997{ 997{
998 register struct soundscape *sscape = get_card_soundscape(card); 998 register struct soundscape *sscape = get_card_soundscape(card);
999 cs4231_t *chip; 999 struct snd_cs4231 *chip;
1000 int err; 1000 int err;
1001 1001
1002#define CS4231_SHARE_HARDWARE (CS4231_HWSHARE_DMA1 | CS4231_HWSHARE_DMA2) 1002#define CS4231_SHARE_HARDWARE (CS4231_HWSHARE_DMA1 | CS4231_HWSHARE_DMA2)
@@ -1009,7 +1009,7 @@ static int __devinit create_ad1845(snd_card_t * card, unsigned port, int irq, in
1009 CS4231_HW_DETECT, 1009 CS4231_HW_DETECT,
1010 CS4231_HWSHARE_DMA1, &chip)) == 0) { 1010 CS4231_HWSHARE_DMA1, &chip)) == 0) {
1011 unsigned long flags; 1011 unsigned long flags;
1012 snd_pcm_t *pcm; 1012 struct snd_pcm *pcm;
1013 1013
1014#define AD1845_FREQ_SEL_ENABLE 0x08 1014#define AD1845_FREQ_SEL_ENABLE 0x08
1015 1015
@@ -1115,9 +1115,9 @@ init_params(struct params *params,
1115 * Create an ALSA soundcard entry for the SoundScape, using 1115 * Create an ALSA soundcard entry for the SoundScape, using
1116 * the given list of port, IRQ and DMA resources. 1116 * the given list of port, IRQ and DMA resources.
1117 */ 1117 */
1118static int __devinit create_sscape(const struct params *params, snd_card_t **rcardp) 1118static int __devinit create_sscape(const struct params *params, struct snd_card **rcardp)
1119{ 1119{
1120 snd_card_t *card; 1120 struct snd_card *card;
1121 register struct soundscape *sscape; 1121 register struct soundscape *sscape;
1122 register unsigned dma_cfg; 1122 register unsigned dma_cfg;
1123 unsigned irq_cfg; 1123 unsigned irq_cfg;
@@ -1370,7 +1370,7 @@ static int __devinit sscape_pnp_detect(struct pnp_card_link *pcard,
1370 * Do we know about this sound card already? 1370 * Do we know about this sound card already?
1371 */ 1371 */
1372 if ( !is_port_known(this->port, sscape_params, sscape_cards) ) { 1372 if ( !is_port_known(this->port, sscape_params, sscape_cards) ) {
1373 snd_card_t *card; 1373 struct snd_card *card;
1374 1374
1375 ret = create_sscape(this, &card); 1375 ret = create_sscape(this, &card);
1376 if (ret < 0) 1376 if (ret < 0)
@@ -1394,7 +1394,7 @@ static int __devinit sscape_pnp_detect(struct pnp_card_link *pcard,
1394 1394
1395static void __devexit sscape_pnp_remove(struct pnp_card_link * pcard) 1395static void __devexit sscape_pnp_remove(struct pnp_card_link * pcard)
1396{ 1396{
1397 snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); 1397 struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
1398 1398
1399 pnp_set_card_drvdata(pcard, NULL); 1399 pnp_set_card_drvdata(pcard, NULL);
1400 snd_card_disconnect(card); 1400 snd_card_disconnect(card);
@@ -1415,7 +1415,7 @@ static int __init sscape_manual_probe(struct params *params)
1415{ 1415{
1416 int ret; 1416 int ret;
1417 unsigned i; 1417 unsigned i;
1418 snd_card_t *card; 1418 struct snd_card *card;
1419 1419
1420 for (i = 0; i < SNDRV_CARDS; ++i) { 1420 for (i = 0; i < SNDRV_CARDS; ++i) {
1421 /* 1421 /*