From bdbae7e62837c22c5399df0789a24e9d8a1d675f Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 10:21:19 +0100
Subject: [ALSA] Remove snd_vx_delay() function

Replace snd_vx_delay() with appropriate delay/sleep functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/vx_core.h | 2 --
 1 file changed, 2 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/vx_core.h b/include/sound/vx_core.h
index 7a60a388866..43c901bf7c1 100644
--- a/include/sound/vx_core.h
+++ b/include/sound/vx_core.h
@@ -274,8 +274,6 @@ static inline void snd_vx_outl(vx_core_t *chip, int reg, unsigned int val)
 #define vx_inl(chip,reg)	snd_vx_inl(chip, VX_##reg)
 #define vx_outl(chip,reg,val)	snd_vx_outl(chip, VX_##reg,val)
 
-void snd_vx_delay(vx_core_t *chip, int msec);
-
 static inline void vx_reset_dsp(vx_core_t *chip)
 {
 	snd_assert(chip->ops->reset_dsp, return);
-- 
cgit v1.2.3-70-g09d2


From c8714ba160a498e249dbd32c637b85a1efa1013b Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 10:22:32 +0100
Subject: [ALSA] Remove tea6330t struct definition from public header

Modules: I2C tea6330t

Remove tea6330t struct definition from public header.
It's anyway unaccessible from outside.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/tea6330t.h | 16 ++--------------
 sound/i2c/tea6330t.c     | 12 ++++++++++++
 2 files changed, 14 insertions(+), 14 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/tea6330t.h b/include/sound/tea6330t.h
index 3896c0a5090..1b265bf24ee 100644
--- a/include/sound/tea6330t.h
+++ b/include/sound/tea6330t.h
@@ -22,21 +22,9 @@
  *
  */
 
-#include "control.h"
 #include "i2c.h"		/* generic i2c support */
 
-typedef struct {
-	snd_i2c_device_t *device;
-	snd_i2c_bus_t *bus;
-	int equalizer;
-	int fader;
-	unsigned char regs[8];
-	unsigned char mleft, mright;
-	unsigned char bass, treble;
-	unsigned char max_bass, max_treble;
-} tea6330t_t;
-
-extern int snd_tea6330t_detect(snd_i2c_bus_t *bus, int equalizer);
-extern int snd_tea6330t_update_mixer(snd_card_t * card, snd_i2c_bus_t * bus, int equalizer, int fader);
+int snd_tea6330t_detect(snd_i2c_bus_t *bus, int equalizer);
+int snd_tea6330t_update_mixer(snd_card_t * card, snd_i2c_bus_t * bus, int equalizer, int fader);
 
 #endif /* __SOUND_TEA6330T_H */
diff --git a/sound/i2c/tea6330t.c b/sound/i2c/tea6330t.c
index 4fdd1fb57df..7bd4948c2a3 100644
--- a/sound/i2c/tea6330t.c
+++ b/sound/i2c/tea6330t.c
@@ -24,6 +24,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <sound/core.h>
+#include <sound/control.h>
 #include <sound/tea6330t.h>
 
 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
@@ -43,6 +44,17 @@ MODULE_LICENSE("GPL");
 #define   TEA6330T_GMU			0x80	/* mute control, general mute */
 #define   TEA6330T_EQN			0x40	/* equalizer switchover (0=equalizer-on) */
 
+typedef struct {
+	snd_i2c_device_t *device;
+	snd_i2c_bus_t *bus;
+	int equalizer;
+	int fader;
+	unsigned char regs[8];
+	unsigned char mleft, mright;
+	unsigned char bass, treble;
+	unsigned char max_bass, max_treble;
+} tea6330t_t;
+
 int snd_tea6330t_detect(snd_i2c_bus_t *bus, int equalizer)
 {
 	int res;
-- 
cgit v1.2.3-70-g09d2


From 0948e3c8bb187b3dea38be1e1ffd1797866014f1 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 10:25:22 +0100
Subject: [ALSA] Clean up sa11xx-uda1341 driver

Modules: SA11xx UDA1341 driver,L3 drivers,UDA1341

Clean up sa11xx-uda1341 driver:

- Fix buggy destructor
- Remove the global variable
- Move array definitions from uda1341.h
- Make functions in uda1341.c static

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/uda1341.h    | 107 +---------------------------
 sound/arm/sa11xx-uda1341.c |  38 +++++-----
 sound/i2c/l3/uda1341.c     | 170 +++++++++++++++++++++++++++++++++++----------
 3 files changed, 154 insertions(+), 161 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/uda1341.h b/include/sound/uda1341.h
index 61ff65a628b..54a048ac6e4 100644
--- a/include/sound/uda1341.h
+++ b/include/sound/uda1341.h
@@ -15,7 +15,7 @@
  *                           features support
  */
 
-/* $Id: uda1341.h,v 1.6 2004/05/03 17:36:50 tiwai Exp $ */
+/* $Id: uda1341.h,v 1.7 2005/11/17 10:25:22 tiwai Exp $ */
 
 #define UDA1341_ALSA_NAME "snd-uda1341"
 
@@ -37,11 +37,6 @@ enum uda1341_onoff {
 	ON,
 };
 
-const char *onoff_names[] = {
-	"Off",
-	"On",
-};
-
 enum uda1341_format {
 	I2S=0,
 	LSB16,
@@ -53,17 +48,6 @@ enum uda1341_format {
 	LSB20MSB,        
 };
 
-const char *format_names[] = {
-	"I2S-bus",
-	"LSB 16bits",
-	"LSB 18bits",
-	"LSB 20bits",
-	"MSB",
-	"in LSB 16bits/out MSB",
-	"in LSB 18bits/out MSB",
-	"in LSB 20bits/out MSB",        
-};
-
 enum uda1341_fs {
 	F512=0,
 	F384,
@@ -71,23 +55,11 @@ enum uda1341_fs {
 	Funused,
 };
 
-const char *fs_names[] = {
-	"512*fs",
-	"384*fs",
-	"256*fs",
-	"Unused - bad value!",
-};
-
 enum uda1341_peak {
 	BEFORE=0,
 	AFTER,
 };
 
-const char *peak_names[] = {
-	"before",
-	"after",
-};
-
 enum uda1341_filter {
 	FLAT=0,
 	MIN,
@@ -95,24 +67,6 @@ enum uda1341_filter {
 	MAX,
 };
 
-const char *filter_names[] = {
-	"flat",
-	"min",
-	"min",
-	"max",
-};
-
-const char*bass_values[][16] = {
-	{"0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB",
-	 "0 dB", "0 dB", "0 dB", "0 dB", "undefined", }, //flat
-	{"0 dB", "2 dB", "4 dB", "6 dB", "8 dB", "10 dB", "12 dB", "14 dB", "16 dB", "18 dB", "18 dB",
-	 "18 dB", "18 dB", "18 dB", "18 dB", "undefined",}, // min
-	{"0 dB", "2 dB", "4 dB", "6 dB", "8 dB", "10 dB", "12 dB", "14 dB", "16 dB", "18 dB", "18 dB",
-	 "18 dB", "18 dB", "18 dB", "18 dB", "undefined",}, // min
-	{"0 dB", "2 dB", "4 dB", "6 dB", "8 dB", "10 dB", "12 dB", "14 dB", "16 dB", "18 dB", "20 dB",
-	 "22 dB", "24 dB", "24 dB", "24 dB", "undefined",}, // max
-};
-
 enum uda1341_mixer {
 	DOUBLE,
 	LINE,
@@ -120,13 +74,6 @@ enum uda1341_mixer {
 	MIXER,
 };
 
-const char *mixer_names[] = {
-	"double differential",
-	"input channel 1 (line in)",
-	"input channel 2 (microphone)",
-	"digital mixer",
-};
-
 enum uda1341_deemp {
 	NONE,
 	D32,
@@ -134,58 +81,6 @@ enum uda1341_deemp {
 	D48,
 };
 
-const char *deemp_names[] = {
-	"none",
-	"32 kHz",
-	"44.1 kHz",
-	"48 kHz",        
-};
-
-const char *mic_sens_value[] = {
-	"-3 dB", "0 dB", "3 dB", "9 dB", "15 dB", "21 dB", "27 dB", "not used",
-};
-
-const unsigned short AGC_atime[] = {
-	11, 16, 11, 16, 21, 11, 16, 21,
-};
-
-const unsigned short AGC_dtime[] = {
-	100, 100, 200, 200, 200, 400, 400, 400,
-};
-
-const char *AGC_level[] = {
-	"-9.0", "-11.5", "-15.0", "-17.5",
-};
-
-const char *ig_small_value[] = {
-	"-3.0", "-2.5", "-2.0", "-1.5", "-1.0", "-0.5",
-};
-
-/*
- * this was computed as peak_value[i] = pow((63-i)*1.42,1.013)
- *
- * UDA1341 datasheet on page 21: Peak value (dB) = (Peak level - 63.5)*5*log2
- * There is an table with these values [level]=value: [3]=-90.31, [7]=-84.29
- * [61]=-2.78, [62] = -1.48, [63] = 0.0
- * I tried to compute it, but using but even using logarithm with base either 10 or 2
- * i was'n able to get values in the table from the formula. So I constructed another
- * formula (see above) to interpolate the values as good as possible. If there is some
- * mistake, please contact me on tomas.kasparek@seznam.cz. Thanks.
- * UDA1341TS datasheet is available at:
- *   http://www-us9.semiconductors.com/acrobat/datasheets/UDA1341TS_3.pdf 
- */
-const char *peak_value[] = {
-	"-INF dB", "N.A.", "N.A", "90.31 dB", "N.A.", "N.A.", "N.A.", "-84.29 dB",
-	"-82.65 dB", "-81.13 dB", "-79.61 dB", "-78.09 dB", "-76.57 dB", "-75.05 dB", "-73.53 dB",
-	"-72.01 dB", "-70.49 dB", "-68.97 dB", "-67.45 dB", "-65.93 dB", "-64.41 dB", "-62.90 dB",
-	"-61.38 dB", "-59.86 dB", "-58.35 dB", "-56.83 dB", "-55.32 dB", "-53.80 dB", "-52.29 dB",
-	"-50.78 dB", "-49.26 dB", "-47.75 dB", "-46.24 dB", "-44.73 dB", "-43.22 dB", "-41.71 dB",
-	"-40.20 dB", "-38.69 dB", "-37.19 dB", "-35.68 dB", "-34.17 dB", "-32.67 dB", "-31.17 dB",
-	"-29.66 dB", "-28.16 dB", "-26.66 dB", "-25.16 dB", "-23.66 dB", "-22.16 dB", "-20.67 dB",
-	"-19.17 dB", "-17.68 dB", "-16.19 dB", "-14.70 dB", "-13.21 dB", "-11.72 dB", "-10.24 dB",
-	"-8.76 dB", "-7.28 dB", "-5.81 dB", "-4.34 dB", "-2.88 dB", "-1.43 dB", "0.00 dB",
-};
-
 enum uda1341_config {
 	CMD_READ_REG = 0,
 	CMD_RESET,
diff --git a/sound/arm/sa11xx-uda1341.c b/sound/arm/sa11xx-uda1341.c
index 6ee912259cc..97dffcc3f75 100644
--- a/sound/arm/sa11xx-uda1341.c
+++ b/sound/arm/sa11xx-uda1341.c
@@ -21,7 +21,7 @@
  *                              merged HAL layer (patches from Brian)
  */
 
-/* $Id: sa11xx-uda1341.c,v 1.23 2005/09/09 13:22:34 tiwai Exp $ */
+/* $Id: sa11xx-uda1341.c,v 1.24 2005/11/17 10:25:22 tiwai Exp $ */
 
 /***************************************************************************************************
 *
@@ -141,8 +141,6 @@ typedef struct snd_card_sa11xx_uda1341 {
 	audio_stream_t s[2];	/* playback & capture */
 } sa11xx_uda1341_t;
 
-static struct snd_card_sa11xx_uda1341 *sa11xx_uda1341 = NULL;
-
 static unsigned int rates[] = {
 	8000,  10666, 10985, 14647,
 	16000, 21970, 22050, 24000,
@@ -411,8 +409,8 @@ static int audio_dma_request(audio_stream_t *s, void (*callback)(void *))
 
 static void audio_dma_free(audio_stream_t *s)
 {
-	sa1100_free_dma((s)->dma_regs);
-	(s)->dma_regs = 0;
+	sa1100_free_dma(s->dma_regs);
+	s->dma_regs = 0;
 }
 
 #endif
@@ -835,8 +833,8 @@ static int __init snd_card_sa11xx_uda1341_pcm(sa11xx_uda1341_t *sa11xx_uda1341,
 	 * isa works but I'm not sure why (or if) it's the right choice
 	 * this may be too large, trying it for now
 	 */
-	snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_ISA, 
-					      snd_pcm_dma_flags(0),
+	snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 
+					      snd_dma_isa_data(),
 					      64*1024, 64*1024);
 
 	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_card_sa11xx_uda1341_playback_ops);
@@ -900,15 +898,15 @@ void snd_sa11xx_uda1341_free(snd_card_t *card)
 
 	audio_dma_free(&chip->s[SNDRV_PCM_STREAM_PLAYBACK]);
 	audio_dma_free(&chip->s[SNDRV_PCM_STREAM_CAPTURE]);
-	sa11xx_uda1341 = NULL;
-	card->private_data = NULL;
-	kfree(chip);
 }
 
+static snd_card_t *sa11xx_uda1341_card;
+
 static int __init sa11xx_uda1341_init(void)
 {
 	int err;
 	snd_card_t *card;
+	sa11xx_uda1341_t *chip;
 
 	if (!machine_is_h3xxx())
 		return -ENODEV;
@@ -921,26 +919,25 @@ static int __init sa11xx_uda1341_init(void)
 	sa11xx_uda1341 = kzalloc(sizeof(*sa11xx_uda1341), GFP_KERNEL);
 	if (sa11xx_uda1341 == NULL)
 		return -ENOMEM;	
+	card->private_free = snd_sa11xx_uda1341_free;
+	chip = card->private_data;
 	spin_lock_init(&chip->s[0].dma_lock);
 	spin_lock_init(&chip->s[1].dma_lock);
          
-	card->private_data = (void *)sa11xx_uda1341;
-	card->private_free = snd_sa11xx_uda1341_free;
-
-	sa11xx_uda1341->card = card;
-	sa11xx_uda1341->samplerate = AUDIO_RATE_DEFAULT;
+	chip->card = card;
+	chip->samplerate = AUDIO_RATE_DEFAULT;
 
 	// mixer
-	if ((err = snd_chip_uda1341_mixer_new(sa11xx_uda1341->card, &sa11xx_uda1341->uda1341)))
+	if ((err = snd_chip_uda1341_mixer_new(chip->card, &sa11xx_uda1341->uda1341)))
 		goto nodev;
 
 	// PCM
-	if ((err = snd_card_sa11xx_uda1341_pcm(sa11xx_uda1341, 0)) < 0)
+	if ((err = snd_card_sa11xx_uda1341_pcm(chip, 0)) < 0)
 		goto nodev;
         
 	snd_card_set_generic_pm_callback(card,
-				     snd_sa11xx_uda1341_suspend, snd_sa11_uda1341_resume,
-				     sa11xx_uda1341);
+					 snd_sa11xx_uda1341_suspend, snd_sa11_uda1341_resume,
+					 chip);
 
 	strcpy(card->driver, "UDA1341");
 	strcpy(card->shortname, "H3600 UDA1341TS");
@@ -951,6 +948,7 @@ static int __init sa11xx_uda1341_init(void)
 
 	if ((err = snd_card_register(card)) == 0) {
 		printk( KERN_INFO "iPAQ audio support initialized\n" );
+		sa11xx_uda1341_card = card;
 		return 0;
 	}
         
@@ -961,7 +959,7 @@ static int __init sa11xx_uda1341_init(void)
 
 static void __exit sa11xx_uda1341_exit(void)
 {
-	snd_card_free(sa11xx_uda1341->card);
+	snd_card_free(sa11xx_uda1341_card);
 }
 
 module_init(sa11xx_uda1341_init);
diff --git a/sound/i2c/l3/uda1341.c b/sound/i2c/l3/uda1341.c
index 103a7dcd0dd..bc7eb23e615 100644
--- a/sound/i2c/l3/uda1341.c
+++ b/sound/i2c/l3/uda1341.c
@@ -17,7 +17,7 @@
  * 2002-05-12   Tomas Kasparek  another code cleanup
  */
 
-/* $Id: uda1341.c,v 1.16 2005/09/09 13:22:34 tiwai Exp $ */
+/* $Id: uda1341.c,v 1.17 2005/11/17 10:25:22 tiwai Exp $ */
 
 #include <sound/driver.h>
 #include <linux/module.h>
@@ -56,6 +56,33 @@
 
 /* }}} */
 
+
+static const char *peak_names[] = {
+	"before",
+	"after",
+};
+
+static const char *filter_names[] = {
+	"flat",
+	"min",
+	"min",
+	"max",
+};
+
+static const char *mixer_names[] = {
+	"double differential",
+	"input channel 1 (line in)",
+	"input channel 2 (microphone)",
+	"digital mixer",
+};
+
+static const char *deemp_names[] = {
+	"none",
+	"32 kHz",
+	"44.1 kHz",
+	"48 kHz",        
+};
+
 enum uda1341_regs_names {
 	stat0,
 	stat1,
@@ -73,7 +100,7 @@ enum uda1341_regs_names {
 	uda1341_reg_last,
 };
 
-const char *uda1341_reg_names[] = {
+static const char *uda1341_reg_names[] = {
 	"stat 0 ",
 	"stat 1 ",
 	"data 00",
@@ -89,7 +116,7 @@ const char *uda1341_reg_names[] = {
 	"ext 6",
 };
 
-const int uda1341_enum_items[] = {
+static const int uda1341_enum_items[] = {
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	2, //peak - before/after
 	4, //deemp - none/32/44.1/48
@@ -100,7 +127,7 @@ const int uda1341_enum_items[] = {
 	0, 0, 0, 0, 0,
 };
 
-const char ** uda1341_enum_names[] = {
+static const char ** uda1341_enum_names[] = {
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 	peak_names, //peak - before/after
 	deemp_names, //deemp - none/32/44.1/48
@@ -129,11 +156,9 @@ struct uda1341 {
 #endif
 };
 
-//hack for ALSA magic casting
-typedef struct l3_client l3_client_t;
-
 /* transfer 8bit integer into string with binary representation */
-void int2str_bin8(uint8_t val, char *buf){
+static void int2str_bin8(uint8_t val, char *buf)
+{
 	const int size = sizeof(val) * 8;
 	int i;
 
@@ -146,7 +171,7 @@ void int2str_bin8(uint8_t val, char *buf){
 
 /* {{{ HW manipulation routines */
 
-int snd_uda1341_codec_write(struct l3_client *clnt, unsigned short reg, unsigned short val)
+static int snd_uda1341_codec_write(struct l3_client *clnt, unsigned short reg, unsigned short val)
 {
 	struct uda1341 *uda = clnt->driver_data;
 	unsigned char buf[2] = { 0xc0, 0xe0 }; // for EXT addressing
@@ -171,7 +196,7 @@ int snd_uda1341_codec_write(struct l3_client *clnt, unsigned short reg, unsigned
 	return err;
 }
 
-int snd_uda1341_codec_read(struct l3_client *clnt, unsigned short reg)
+static int snd_uda1341_codec_read(struct l3_client *clnt, unsigned short reg)
 {
 	unsigned char val;
 	int err;
@@ -188,8 +213,9 @@ static inline int snd_uda1341_valid_reg(struct l3_client *clnt, unsigned short r
 	return reg < uda1341_reg_last;
 }
 
-int snd_uda1341_update_bits(struct l3_client *clnt, unsigned short reg, unsigned short mask,
-                            unsigned short shift, unsigned short value, int flush)
+static int snd_uda1341_update_bits(struct l3_client *clnt, unsigned short reg,
+				   unsigned short mask, unsigned short shift,
+				   unsigned short value, int flush)
 {
 	int change;
 	unsigned short old, new;
@@ -214,8 +240,8 @@ int snd_uda1341_update_bits(struct l3_client *clnt, unsigned short reg, unsigned
 	return change;
 }
 
-int snd_uda1341_cfg_write(struct l3_client *clnt, unsigned short what,
-                          unsigned short value, int flush)
+static int snd_uda1341_cfg_write(struct l3_client *clnt, unsigned short what,
+				 unsigned short value, int flush)
 {
 	struct uda1341 *uda = clnt->driver_data;
 	int ret = 0;
@@ -327,6 +353,81 @@ int snd_uda1341_cfg_write(struct l3_client *clnt, unsigned short what,
 /* }}} */
 
 /* {{{ Proc interface */
+#ifdef CONFIG_PROC_FS
+
+static const char *format_names[] = {
+	"I2S-bus",
+	"LSB 16bits",
+	"LSB 18bits",
+	"LSB 20bits",
+	"MSB",
+	"in LSB 16bits/out MSB",
+	"in LSB 18bits/out MSB",
+	"in LSB 20bits/out MSB",        
+};
+
+static const char *fs_names[] = {
+	"512*fs",
+	"384*fs",
+	"256*fs",
+	"Unused - bad value!",
+};
+
+static const char* bass_values[][16] = {
+	{"0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB",
+	 "0 dB", "0 dB", "0 dB", "0 dB", "undefined", }, //flat
+	{"0 dB", "2 dB", "4 dB", "6 dB", "8 dB", "10 dB", "12 dB", "14 dB", "16 dB", "18 dB", "18 dB",
+	 "18 dB", "18 dB", "18 dB", "18 dB", "undefined",}, // min
+	{"0 dB", "2 dB", "4 dB", "6 dB", "8 dB", "10 dB", "12 dB", "14 dB", "16 dB", "18 dB", "18 dB",
+	 "18 dB", "18 dB", "18 dB", "18 dB", "undefined",}, // min
+	{"0 dB", "2 dB", "4 dB", "6 dB", "8 dB", "10 dB", "12 dB", "14 dB", "16 dB", "18 dB", "20 dB",
+	 "22 dB", "24 dB", "24 dB", "24 dB", "undefined",}, // max
+};
+
+static const char *mic_sens_value[] = {
+	"-3 dB", "0 dB", "3 dB", "9 dB", "15 dB", "21 dB", "27 dB", "not used",
+};
+
+static const unsigned short AGC_atime[] = {
+	11, 16, 11, 16, 21, 11, 16, 21,
+};
+
+static const unsigned short AGC_dtime[] = {
+	100, 100, 200, 200, 200, 400, 400, 400,
+};
+
+static const char *AGC_level[] = {
+	"-9.0", "-11.5", "-15.0", "-17.5",
+};
+
+static const char *ig_small_value[] = {
+	"-3.0", "-2.5", "-2.0", "-1.5", "-1.0", "-0.5",
+};
+
+/*
+ * this was computed as peak_value[i] = pow((63-i)*1.42,1.013)
+ *
+ * UDA1341 datasheet on page 21: Peak value (dB) = (Peak level - 63.5)*5*log2
+ * There is an table with these values [level]=value: [3]=-90.31, [7]=-84.29
+ * [61]=-2.78, [62] = -1.48, [63] = 0.0
+ * I tried to compute it, but using but even using logarithm with base either 10 or 2
+ * i was'n able to get values in the table from the formula. So I constructed another
+ * formula (see above) to interpolate the values as good as possible. If there is some
+ * mistake, please contact me on tomas.kasparek@seznam.cz. Thanks.
+ * UDA1341TS datasheet is available at:
+ *   http://www-us9.semiconductors.com/acrobat/datasheets/UDA1341TS_3.pdf 
+ */
+static const char *peak_value[] = {
+	"-INF dB", "N.A.", "N.A", "90.31 dB", "N.A.", "N.A.", "N.A.", "-84.29 dB",
+	"-82.65 dB", "-81.13 dB", "-79.61 dB", "-78.09 dB", "-76.57 dB", "-75.05 dB", "-73.53 dB",
+	"-72.01 dB", "-70.49 dB", "-68.97 dB", "-67.45 dB", "-65.93 dB", "-64.41 dB", "-62.90 dB",
+	"-61.38 dB", "-59.86 dB", "-58.35 dB", "-56.83 dB", "-55.32 dB", "-53.80 dB", "-52.29 dB",
+	"-50.78 dB", "-49.26 dB", "-47.75 dB", "-46.24 dB", "-44.73 dB", "-43.22 dB", "-41.71 dB",
+	"-40.20 dB", "-38.69 dB", "-37.19 dB", "-35.68 dB", "-34.17 dB", "-32.67 dB", "-31.17 dB",
+	"-29.66 dB", "-28.16 dB", "-26.66 dB", "-25.16 dB", "-23.66 dB", "-22.16 dB", "-20.67 dB",
+	"-19.17 dB", "-17.68 dB", "-16.19 dB", "-14.70 dB", "-13.21 dB", "-11.72 dB", "-10.24 dB",
+	"-8.76 dB", "-7.28 dB", "-5.81 dB", "-4.34 dB", "-2.88 dB", "-1.43 dB", "0.00 dB",
+};
 
 static void snd_uda1341_proc_read(snd_info_entry_t *entry, 
 				  snd_info_buffer_t * buffer)
@@ -401,7 +502,6 @@ static void snd_uda1341_proc_regs_read(snd_info_entry_t *entry,
 	int reg;
 	char buf[12];
 
-	spin_lock(&uda->reg_lock);
 	for (reg = 0; reg < uda1341_reg_last; reg ++) {
 		if (reg == empty)
 			continue;
@@ -411,9 +511,8 @@ static void snd_uda1341_proc_regs_read(snd_info_entry_t *entry,
 
 	int2str_bin8(snd_uda1341_codec_read(clnt, UDA1341_DATA1), buf);
 	snd_iprintf(buffer, "DATA1 = %s\n", buf);
-	
-	spin_unlock(&uda->reg_lock);       
 }
+#endif /* CONFIG_PROC_FS */
 
 static void __devinit snd_uda1341_proc_init(snd_card_t *card, struct l3_client *clnt)
 {
@@ -647,10 +746,10 @@ static snd_kcontrol_new_t snd_uda1341_controls[] = {
 	UDA1341_2REGS("Gain Input Amplifier Gain (channel 2)", CMD_IG, ext4, ext5, 0, 0, 3, 31, 0),
 };
 
-static void uda1341_free(struct l3_client *uda1341)
+static void uda1341_free(struct l3_client *clnt)
 {
-	l3_detach_client(uda1341); // calls kfree for driver_data (uda1341_t)
-	kfree(uda1341);
+	l3_detach_client(clnt); // calls kfree for driver_data (uda1341_t)
+	kfree(clnt);
 }
 
 static int uda1341_dev_free(snd_device_t *device)
@@ -660,41 +759,42 @@ static int uda1341_dev_free(snd_device_t *device)
 	return 0;
 }
 
-int __init snd_chip_uda1341_mixer_new(snd_card_t *card, struct l3_client **clnt)
+int __init snd_chip_uda1341_mixer_new(snd_card_t *card, struct l3_client **clntp)
 {
 	static snd_device_ops_t ops = {
 		.dev_free =     uda1341_dev_free,
 	};
-	struct l3_client *uda1341;
+	struct l3_client *clnt;
 	int idx, err;
 
 	snd_assert(card != NULL, return -EINVAL);
 
-	uda1341 = kzalloc(sizeof(*uda1341), GFP_KERNEL);
-	if (uda1341 == NULL)
+	clnt = kzalloc(sizeof(*clnt), GFP_KERNEL);
+	if (clnt == NULL)
 		return -ENOMEM;
          
-	if ((err = l3_attach_client(uda1341, "l3-bit-sa1100-gpio", "snd-uda1341"))) {
-		kfree(uda1341);
-		return err;
-	}
-
-	if ((err = snd_device_new(card, SNDRV_DEV_CODEC, uda1341, &ops)) < 0) {
-		l3_detach_client(uda1341);
-		kfree(uda1341);
+	if ((err = l3_attach_client(clnt, "l3-bit-sa1100-gpio", UDA1341_ALSA_NAME))) {
+		kfree(clnt);
 		return err;
 	}
 
 	for (idx = 0; idx < ARRAY_SIZE(snd_uda1341_controls); idx++) {
-		if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_uda1341_controls[idx], uda1341))) < 0)
+		if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_uda1341_controls[idx], clnt))) < 0) {
+			uda1341_free(clnt);
 			return err;
+		}
+	}
+
+	if ((err = snd_device_new(card, SNDRV_DEV_CODEC, clnt, &ops)) < 0) {
+		uda1341_free(clnt);
+		return err;
 	}
 
-	*clnt = uda1341;
+	*clntp = clnt;
 	strcpy(card->mixername, "UDA1341TS Mixer");
 	((uda1341_t *)uda1341->driver_data)->card = card;
         
-	snd_uda1341_proc_init(card, uda1341);
+	snd_uda1341_proc_init(card, clnt);
         
 	return 0;
 }
-- 
cgit v1.2.3-70-g09d2


From f739aeccedc7681a249bdae435e9af3e5476ad1d Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 10:27:08 +0100
Subject: [ALSA] Clean up ISA cs4231 code

Modules: CS4231 driver

Clean up ISA cs4231 code, removing experimental EBUS/SBUS merge,
to improve readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/cs4231.h        | 39 --------------------
 sound/isa/cs423x/cs4231_lib.c | 82 ++-----------------------------------------
 2 files changed, 2 insertions(+), 119 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/cs4231.h b/include/sound/cs4231.h
index d7f90823778..d956de947e7 100644
--- a/include/sound/cs4231.h
+++ b/include/sound/cs4231.h
@@ -26,21 +26,6 @@
 #include "pcm.h"
 #include "timer.h"
 
-#ifdef CONFIG_SBUS
-#define SBUS_SUPPORT
-#include <asm/sbus.h>
-#endif
-
-#if defined(CONFIG_PCI) && defined(CONFIG_SPARC64)
-#define EBUS_SUPPORT
-#include <linux/pci.h>
-#include <asm/ebus.h>
-#endif
-
-#if !defined(SBUS_SUPPORT) && !defined(EBUS_SUPPORT)
-#define LEGACY_SUPPORT
-#endif
-
 /* IO ports */
 
 #define CS4231P(x)		(c_d_c_CS4231##x)
@@ -236,14 +221,12 @@ typedef struct _snd_cs4231 cs4231_t;
 
 struct _snd_cs4231 {
 	unsigned long port;		/* base i/o port */
-#ifdef LEGACY_SUPPORT
 	struct resource *res_port;
 	unsigned long cport;		/* control base i/o port (CS4236) */
 	struct resource *res_cport;
 	int irq;			/* IRQ line */
 	int dma1;			/* playback DMA */
 	int dma2;			/* record DMA */
-#endif
 	unsigned short version;		/* version of CODEC chip */
 	unsigned short mode;		/* see to CS4231_MODE_XXXX */
 	unsigned short hardware;	/* see to CS4231_HW_XXXX */
@@ -251,24 +234,6 @@ struct _snd_cs4231 {
 	unsigned short single_dma:1,	/* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */
 		       ebus_flag:1;	/* SPARC: EBUS present */
 
-#ifdef EBUS_SUPPORT
-	struct ebus_dma_info eb2c;
-        struct ebus_dma_info eb2p;
-#endif
-
-#if defined(SBUS_SUPPORT) || defined(EBUS_SUPPORT)
-	union {
-#ifdef SBUS_SUPPORT
-		struct sbus_dev         *sdev;
-#endif
-#ifdef EBUS_SUPPORT
-		struct pci_dev          *pdev;
-#endif
-	} dev_u;
-	unsigned int p_periods_sent;
-	unsigned int c_periods_sent;
-#endif
-
 	snd_card_t *card;
 	snd_pcm_t *pcm;
 	snd_pcm_substream_t *playback_substream;
@@ -281,10 +246,8 @@ struct _snd_cs4231 {
 	int mce_bit;
 	int calibrate_mute;
 	int sw_3d_bit;
-#ifdef LEGACY_SUPPORT
 	unsigned int p_dma_size;
 	unsigned int c_dma_size;
-#endif
 
 	spinlock_t reg_lock;
 	struct semaphore mce_mutex;
@@ -299,10 +262,8 @@ struct _snd_cs4231 {
 	void (*resume) (cs4231_t *chip);
 #endif
 	void *dma_private_data;
-#ifdef LEGACY_SUPPORT
 	int (*claim_dma) (cs4231_t *chip, void *dma_private_data, int dma);
 	int (*release_dma) (cs4231_t *chip, void *dma_private_data, int dma);
-#endif
 };
 
 /* exported functions */
diff --git a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c
index 4c9fb168636..94e07a7c8b3 100644
--- a/sound/isa/cs423x/cs4231_lib.c
+++ b/sound/isa/cs423x/cs4231_lib.c
@@ -124,46 +124,14 @@ static unsigned char snd_cs4231_original_image[32] =
  *  Basic I/O functions
  */
 
-#if !defined(EBUS_SUPPORT) && !defined(SBUS_SUPPORT)
-#define __CS4231_INLINE__ inline
-#else
-#define __CS4231_INLINE__ /* nothing */
-#endif
-
-static __CS4231_INLINE__ void cs4231_outb(cs4231_t *chip, u8 offset, u8 val)
+static inline void cs4231_outb(cs4231_t *chip, u8 offset, u8 val)
 {
-#ifdef EBUS_SUPPORT
-	if (chip->ebus->flag) {
-		writeb(val, chip->port + (offset << 2));
-	} else {
-#endif
-#ifdef SBUS_SUPPORT
-		sbus_writeb(val, chip->port + (offset << 2));
-#endif
-#ifdef EBUS_SUPPORT
-	}
-#endif
-#ifdef LEGACY_SUPPORT
 	outb(val, chip->port + offset);
-#endif
 }
 
-static __CS4231_INLINE__ u8 cs4231_inb(cs4231_t *chip, u8 offset)
+static inline u8 cs4231_inb(cs4231_t *chip, u8 offset)
 {
-#ifdef EBUS_SUPPORT
-	if (chip->ebus_flag) {
-		return readb(chip->port + (offset << 2));
-	} else {
-#endif
-#ifdef SBUS_SUPPORT
-		return sbus_readb(chip->port + (offset << 2));
-#endif
-#ifdef EBUS_SUPPORT
-	}
-#endif
-#ifdef LEGACY_SUPPORT
 	return inb(chip->port + offset);
-#endif
 }
 
 static void snd_cs4231_outm(cs4231_t *chip, unsigned char reg,
@@ -874,7 +842,6 @@ static int snd_cs4231_playback_hw_free(snd_pcm_substream_t * substream)
 	return snd_pcm_lib_free_pages(substream);
 }
 
-#ifdef LEGACY_SUPPORT
 static int snd_cs4231_playback_prepare(snd_pcm_substream_t * substream)
 {
 	cs4231_t *chip = snd_pcm_substream_chip(substream);
@@ -896,7 +863,6 @@ static int snd_cs4231_playback_prepare(snd_pcm_substream_t * substream)
 #endif
 	return 0;
 }
-#endif /* LEGACY_SUPPORT */
 
 static int snd_cs4231_capture_hw_params(snd_pcm_substream_t * substream,
 					snd_pcm_hw_params_t * hw_params)
@@ -918,7 +884,6 @@ static int snd_cs4231_capture_hw_free(snd_pcm_substream_t * substream)
 	return snd_pcm_lib_free_pages(substream);
 }
 
-#ifdef LEGACY_SUPPORT
 static int snd_cs4231_capture_prepare(snd_pcm_substream_t * substream)
 {
 	cs4231_t *chip = snd_pcm_substream_chip(substream);
@@ -942,7 +907,6 @@ static int snd_cs4231_capture_prepare(snd_pcm_substream_t * substream)
 	spin_unlock_irqrestore(&chip->reg_lock, flags);
 	return 0;
 }
-#endif
 
 static void snd_cs4231_overrange(cs4231_t *chip)
 {
@@ -998,7 +962,6 @@ irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 	return IRQ_HANDLED;
 }
 
-#ifdef LEGACY_SUPPORT
 static snd_pcm_uframes_t snd_cs4231_playback_pointer(snd_pcm_substream_t * substream)
 {
 	cs4231_t *chip = snd_pcm_substream_chip(substream);
@@ -1020,7 +983,6 @@ static snd_pcm_uframes_t snd_cs4231_capture_pointer(snd_pcm_substream_t * substr
 	ptr = snd_dma_pointer(chip->dma2, chip->c_dma_size);
 	return bytes_to_frames(substream->runtime, ptr);
 }
-#endif /* LEGACY_SUPPORT */
 
 /*
 
@@ -1253,7 +1215,6 @@ static int snd_cs4231_playback_open(snd_pcm_substream_t * substream)
 	    chip->hardware == CS4231_HW_CS4239)
 		runtime->hw.formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE;
 
-#ifdef LEGACY_SUPPORT
 	snd_pcm_limit_isa_dma_size(chip->dma1, &runtime->hw.buffer_bytes_max);
 	snd_pcm_limit_isa_dma_size(chip->dma1, &runtime->hw.period_bytes_max);
 
@@ -1261,20 +1222,14 @@ static int snd_cs4231_playback_open(snd_pcm_substream_t * substream)
 		if ((err = chip->claim_dma(chip, chip->dma_private_data, chip->dma1)) < 0)
 			return err;
 	}
-#endif
 
 	if ((err = snd_cs4231_open(chip, CS4231_MODE_PLAY)) < 0) {
-#ifdef LEGACY_SUPPORT
 		if (chip->release_dma)
 			chip->release_dma(chip, chip->dma_private_data, chip->dma1);
-#endif
 		snd_free_pages(runtime->dma_area, runtime->dma_bytes);
 		return err;
 	}
 	chip->playback_substream = substream;
-#if defined(SBUS_SUPPORT) || defined(EBUS_SUPPORT)
-	chip->p_periods_sent = 0;
-#endif
 	snd_pcm_set_sync(substream);
 	chip->rate_constraint(runtime);
 	return 0;
@@ -1293,7 +1248,6 @@ static int snd_cs4231_capture_open(snd_pcm_substream_t * substream)
 	    chip->hardware == CS4231_HW_CS4239)
 		runtime->hw.formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE;
 
-#ifdef LEGACY_SUPPORT
 	snd_pcm_limit_isa_dma_size(chip->dma2, &runtime->hw.buffer_bytes_max);
 	snd_pcm_limit_isa_dma_size(chip->dma2, &runtime->hw.period_bytes_max);
 
@@ -1301,20 +1255,14 @@ static int snd_cs4231_capture_open(snd_pcm_substream_t * substream)
 		if ((err = chip->claim_dma(chip, chip->dma_private_data, chip->dma2)) < 0)
 			return err;
 	}
-#endif
 
 	if ((err = snd_cs4231_open(chip, CS4231_MODE_RECORD)) < 0) {
-#ifdef LEGACY_SUPPORT
 		if (chip->release_dma)
 			chip->release_dma(chip, chip->dma_private_data, chip->dma2);
-#endif
 		snd_free_pages(runtime->dma_area, runtime->dma_bytes);
 		return err;
 	}
 	chip->capture_substream = substream;
-#if defined(SBUS_SUPPORT) || defined(EBUS_SUPPORT)
-	chip->c_periods_sent = 0;
-#endif
 	snd_pcm_set_sync(substream);
 	chip->rate_constraint(runtime);
 	return 0;
@@ -1413,8 +1361,6 @@ static int snd_cs4231_pm_resume(snd_card_t *card)
 }
 #endif /* CONFIG_PM */
 
-#ifdef LEGACY_SUPPORT
-
 static int snd_cs4231_free(cs4231_t *chip)
 {
 	release_and_free_resource(chip->res_port);
@@ -1444,8 +1390,6 @@ static int snd_cs4231_dev_free(snd_device_t *device)
 	return snd_cs4231_free(chip);	
 }
 
-#endif /* LEGACY_SUPPORT */
-
 const char *snd_cs4231_chip_id(cs4231_t *chip)
 {
 	switch (chip->hardware) {
@@ -1493,8 +1437,6 @@ static int snd_cs4231_new(snd_card_t * card,
         return 0;
 }
 
-#ifdef LEGACY_SUPPORT
-
 int snd_cs4231_create(snd_card_t * card,
 	              unsigned long port,
 	              unsigned long cport,
@@ -1581,8 +1523,6 @@ int snd_cs4231_create(snd_card_t * card,
 	return 0;
 }
 
-#endif /* LEGACY_SUPPORT */
-
 static snd_pcm_ops_t snd_cs4231_playback_ops = {
 	.open =		snd_cs4231_playback_open,
 	.close =	snd_cs4231_playback_close,
@@ -1629,27 +1569,9 @@ int snd_cs4231_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm)
 		pcm->info_flags |= SNDRV_PCM_INFO_JOINT_DUPLEX;
 	strcpy(pcm->name, snd_cs4231_chip_id(chip));
 
-#ifdef LEGACY_SUPPORT
 	snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
 					      snd_dma_isa_data(),
 					      64*1024, chip->dma1 > 3 || chip->dma2 > 3 ? 128*1024 : 64*1024);
-#else
-#  ifdef EBUS_SUPPORT
-        if (chip->ebus_flag) {
-                snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                				      chip->dev_u.pdev,
-						      64*1024, 128*1024);
-        } else {
-#  endif
-#  ifdef SBUS_SUPPORT
-                snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_SBUS,
-                				      chip->dev_u.sdev,
-						      64*1024, 128*1024);
-#  endif
-#  ifdef EBUS_SUPPORT
-        }
-#  endif
-#endif
 
 	chip->pcm = pcm;
 	if (rpcm)
-- 
cgit v1.2.3-70-g09d2


From bc1ff7fc0ae6ec2d7f2202d9126901aeb3f596cd Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 10:28:15 +0100
Subject: [ALSA] [Trivial] Fix spaces in gus.h

Modules: GUS Library

Fix spaces in gus.h.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/gus.h | 62 ++++++++++++++++++++++++++---------------------------
 1 file changed, 31 insertions(+), 31 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/gus.h b/include/sound/gus.h
index 7000d9d9199..bb12e9fab8a 100644
--- a/include/sound/gus.h
+++ b/include/sound/gus.h
@@ -49,32 +49,32 @@
 #define SNDRV_g_u_s_IRQSTAT		(0x226-0x220)
 #define SNDRV_g_u_s_TIMERCNTRL		(0x228-0x220)
 #define SNDRV_g_u_s_TIMERDATA		(0x229-0x220)
-#define SNDRV_g_u_s_DRAM			(0x327-0x220)
+#define SNDRV_g_u_s_DRAM		(0x327-0x220)
 #define SNDRV_g_u_s_MIXCNTRLREG		(0x220-0x220)
 #define SNDRV_g_u_s_IRQDMACNTRLREG	(0x22b-0x220)
 #define SNDRV_g_u_s_REGCNTRLS		(0x22f-0x220)
-#define SNDRV_g_u_s_BOARDVERSION		(0x726-0x220)
-#define SNDRV_g_u_s_MIXCNTRLPORT		(0x726-0x220)
-#define SNDRV_g_u_s_IVER			(0x325-0x220)
+#define SNDRV_g_u_s_BOARDVERSION	(0x726-0x220)
+#define SNDRV_g_u_s_MIXCNTRLPORT	(0x726-0x220)
+#define SNDRV_g_u_s_IVER		(0x325-0x220)
 #define SNDRV_g_u_s_MIXDATAPORT		(0x326-0x220)
-#define SNDRV_g_u_s_MAXCNTRLPORT		(0x326-0x220)
+#define SNDRV_g_u_s_MAXCNTRLPORT	(0x326-0x220)
 
 /* GF1 registers */
 
 /* global registers */
 #define SNDRV_GF1_GB_ACTIVE_VOICES		0x0e
 #define SNDRV_GF1_GB_VOICES_IRQ			0x0f
-#define SNDRV_GF1_GB_GLOBAL_MODE			0x19
+#define SNDRV_GF1_GB_GLOBAL_MODE		0x19
 #define SNDRV_GF1_GW_LFO_BASE			0x1a
 #define SNDRV_GF1_GB_VOICES_IRQ_READ		0x1f
 #define SNDRV_GF1_GB_DRAM_DMA_CONTROL		0x41
-#define SNDRV_GF1_GW_DRAM_DMA_LOW			0x42
-#define SNDRV_GF1_GW_DRAM_IO_LOW			0x43
-#define SNDRV_GF1_GB_DRAM_IO_HIGH			0x44
+#define SNDRV_GF1_GW_DRAM_DMA_LOW		0x42
+#define SNDRV_GF1_GW_DRAM_IO_LOW		0x43
+#define SNDRV_GF1_GB_DRAM_IO_HIGH		0x44
 #define SNDRV_GF1_GB_SOUND_BLASTER_CONTROL	0x45
 #define SNDRV_GF1_GB_ADLIB_TIMER_1		0x46
 #define SNDRV_GF1_GB_ADLIB_TIMER_2		0x47
-#define SNDRV_GF1_GB_RECORD_RATE			0x48
+#define SNDRV_GF1_GB_RECORD_RATE		0x48
 #define SNDRV_GF1_GB_REC_DMA_CONTROL		0x49
 #define SNDRV_GF1_GB_JOYSTICK_DAC_LEVEL		0x4b
 #define SNDRV_GF1_GB_RESET			0x4c
@@ -83,7 +83,7 @@
 #define SNDRV_GF1_GW_MEMORY_CONFIG		0x52
 #define SNDRV_GF1_GB_MEMORY_CONTROL		0x53
 #define SNDRV_GF1_GW_FIFO_RECORD_BASE_ADDR	0x54
-#define SNDRV_GF1_GW_FIFO_PLAY_BASE_ADDR		0x55
+#define SNDRV_GF1_GW_FIFO_PLAY_BASE_ADDR	0x55
 #define SNDRV_GF1_GW_FIFO_SIZE			0x56
 #define SNDRV_GF1_GW_INTERLEAVE			0x57
 #define SNDRV_GF1_GB_COMPATIBILITY		0x59
@@ -100,39 +100,39 @@
 #define SNDRV_GF1_VA_START			SNDRV_GF1_VW_START_HIGH
 #define SNDRV_GF1_VW_END_HIGH			0x04
 #define SNDRV_GF1_VW_END_LOW			0x05
-#define SNDRV_GF1_VA_END				SNDRV_GF1_VW_END_HIGH
-#define SNDRV_GF1_VB_VOLUME_RATE			0x06
-#define SNDRV_GF1_VB_VOLUME_START			0x07
+#define SNDRV_GF1_VA_END			SNDRV_GF1_VW_END_HIGH
+#define SNDRV_GF1_VB_VOLUME_RATE		0x06
+#define SNDRV_GF1_VB_VOLUME_START		0x07
 #define SNDRV_GF1_VB_VOLUME_END			0x08
 #define SNDRV_GF1_VW_VOLUME			0x09
-#define SNDRV_GF1_VW_CURRENT_HIGH			0x0a
-#define SNDRV_GF1_VW_CURRENT_LOW			0x0b
+#define SNDRV_GF1_VW_CURRENT_HIGH		0x0a
+#define SNDRV_GF1_VW_CURRENT_LOW		0x0b
 #define SNDRV_GF1_VA_CURRENT			SNDRV_GF1_VW_CURRENT_HIGH
-#define SNDRV_GF1_VB_PAN				0x0c
-#define SNDRV_GF1_VW_OFFSET_RIGHT			0x0c
+#define SNDRV_GF1_VB_PAN			0x0c
+#define SNDRV_GF1_VW_OFFSET_RIGHT		0x0c
 #define SNDRV_GF1_VB_VOLUME_CONTROL		0x0d
 #define SNDRV_GF1_VB_UPPER_ADDRESS		0x10
-#define SNDRV_GF1_VW_EFFECT_HIGH			0x11
+#define SNDRV_GF1_VW_EFFECT_HIGH		0x11
 #define SNDRV_GF1_VW_EFFECT_LOW			0x12
 #define SNDRV_GF1_VA_EFFECT			SNDRV_GF1_VW_EFFECT_HIGH
-#define SNDRV_GF1_VW_OFFSET_LEFT			0x13
-#define SNDRV_GF1_VB_ACCUMULATOR			0x14
-#define SNDRV_GF1_VB_MODE				0x15
+#define SNDRV_GF1_VW_OFFSET_LEFT		0x13
+#define SNDRV_GF1_VB_ACCUMULATOR		0x14
+#define SNDRV_GF1_VB_MODE			0x15
 #define SNDRV_GF1_VW_EFFECT_VOLUME		0x16
 #define SNDRV_GF1_VB_FREQUENCY_LFO		0x17
 #define SNDRV_GF1_VB_VOLUME_LFO			0x18
 #define SNDRV_GF1_VW_OFFSET_RIGHT_FINAL		0x1b
 #define SNDRV_GF1_VW_OFFSET_LEFT_FINAL		0x1c
-#define SNDRV_GF1_VW_EFFECT_VOLUME_FINAL		0x1d
+#define SNDRV_GF1_VW_EFFECT_VOLUME_FINAL	0x1d
 
 /* ICS registers */
 
 #define SNDRV_ICS_MIC_DEV		0
-#define SNDRV_ICS_LINE_DEV	1
+#define SNDRV_ICS_LINE_DEV		1
 #define SNDRV_ICS_CD_DEV		2
 #define SNDRV_ICS_GF1_DEV		3
-#define SNDRV_ICS_NONE_DEV	4
-#define SNDRV_ICS_MASTER_DEV	5
+#define SNDRV_ICS_NONE_DEV		4
+#define SNDRV_ICS_MASTER_DEV		5
 
 /* LFO */
 
@@ -143,7 +143,7 @@
 
 #define SNDRV_GF1_DMA_UNSIGNED	0x80
 #define SNDRV_GF1_DMA_16BIT	0x40
-#define SNDRV_GF1_DMA_IRQ		0x20
+#define SNDRV_GF1_DMA_IRQ	0x20
 #define SNDRV_GF1_DMA_WIDTH16	0x04
 #define SNDRV_GF1_DMA_READ	0x02	/* read from GUS's DRAM */
 #define SNDRV_GF1_DMA_ENABLE	0x01
@@ -159,7 +159,7 @@
 
 /* defines for memory manager */
 
-#define SNDRV_GF1_MEM_BLOCK_16BIT		0x0001
+#define SNDRV_GF1_MEM_BLOCK_16BIT	0x0001
 
 #define SNDRV_GF1_MEM_OWNER_DRIVER	0x0001
 #define SNDRV_GF1_MEM_OWNER_WAVE_SIMPLE	0x0002
@@ -169,9 +169,9 @@
 /* constants for interrupt handlers */
 
 #define SNDRV_GF1_HANDLER_MIDI_OUT	0x00010000
-#define SNDRV_GF1_HANDLER_MIDI_IN		0x00020000
-#define SNDRV_GF1_HANDLER_TIMER1		0x00040000
-#define SNDRV_GF1_HANDLER_TIMER2		0x00080000
+#define SNDRV_GF1_HANDLER_MIDI_IN	0x00020000
+#define SNDRV_GF1_HANDLER_TIMER1	0x00040000
+#define SNDRV_GF1_HANDLER_TIMER2	0x00080000
 #define SNDRV_GF1_HANDLER_VOICE		0x00100000
 #define SNDRV_GF1_HANDLER_DMA_WRITE	0x00200000
 #define SNDRV_GF1_HANDLER_DMA_READ	0x00400000
-- 
cgit v1.2.3-70-g09d2


From 6560c349c501388a1f3030d02fb49e7067e6597e Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 10:29:33 +0100
Subject: [ALSA] Clean up includes in asound.h & asequencer.h

Modules: ALSA sequencer,ALSA Core

Clean up includes in asound.h and asequencer.h.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/asequencer.h |  5 ++---
 include/sound/asound.h     | 26 ++------------------------
 2 files changed, 4 insertions(+), 27 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/asequencer.h b/include/sound/asequencer.h
index 728efd50426..562637b4884 100644
--- a/include/sound/asequencer.h
+++ b/include/sound/asequencer.h
@@ -22,11 +22,10 @@
 #ifndef __SOUND_ASEQUENCER_H
 #define __SOUND_ASEQUENCER_H
 
-#ifndef __KERNEL__
+#ifdef __KERNEL__
 #include <linux/ioctl.h>
-#endif
-
 #include <sound/asound.h>
+#endif
 
 /** version of the sequencer */
 #define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION (1, 0, 1)
diff --git a/include/sound/asound.h b/include/sound/asound.h
index 8e552d627fa..1389704d8d6 100644
--- a/include/sound/asound.h
+++ b/include/sound/asound.h
@@ -23,12 +23,8 @@
 #ifndef __SOUND_ASOUND_H
 #define __SOUND_ASOUND_H
 
-#if defined(LINUX) || defined(__LINUX__) || defined(__linux__)
-
-#include <linux/ioctl.h>
-
 #ifdef __KERNEL__
-
+#include <linux/ioctl.h>
 #include <linux/types.h>
 #include <linux/time.h>
 #include <asm/byteorder.h>
@@ -43,25 +39,7 @@
 #endif
 #endif
 
-#else /* !__KERNEL__ */
-
-#include <endian.h>
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define SNDRV_LITTLE_ENDIAN
-#elif __BYTE_ORDER == __BIG_ENDIAN
-#define SNDRV_BIG_ENDIAN
-#else
-#error "Unsupported endian..."
-#endif
-
-#endif /* __KERNEL **/
-
-#endif /* LINUX */
-
-#ifndef __KERNEL__
-#include <sys/time.h>
-#include <sys/types.h>
-#endif
+#endif /* __KERNEL__ **/
 
 /*
  *  protocol version
-- 
cgit v1.2.3-70-g09d2


From b9b4bdd9f1c98388f13591608d574650a9873717 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 10:42:40 +0100
Subject: [ALSA] ac97 - Remove ac9_enum definition from public header

Modules: AC97 Codec

Remove the definition of ac97_enum struct from the public ac97_codec.h.
It's used only in the module.

The location of struct ac97_pcm is moved closer to its accessor
to improve readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/ac97_codec.h  | 65 +++++++++++++++++++++------------------------
 sound/pci/ac97/ac97_local.h |  9 +++++++
 2 files changed, 39 insertions(+), 35 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index 7f0ca79d6c9..6f1e6ba2a19 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -396,33 +396,6 @@ typedef struct _snd_ac97_bus_ops ac97_bus_ops_t;
 typedef struct _snd_ac97_template ac97_template_t;
 typedef struct _snd_ac97 ac97_t;
 
-enum ac97_pcm_cfg {
-	AC97_PCM_CFG_FRONT = 2,
-	AC97_PCM_CFG_REAR = 10,		/* alias surround */
-	AC97_PCM_CFG_LFE = 11,		/* center + lfe */
-	AC97_PCM_CFG_40 = 4,		/* front + rear */
-	AC97_PCM_CFG_51 = 6,		/* front + rear + center/lfe */
-	AC97_PCM_CFG_SPDIF = 20
-};
-
-/* PCM allocation */
-struct ac97_pcm {
-	ac97_bus_t *bus;
-	unsigned int stream: 1,	   	   /* stream type: 1 = capture */
-		     exclusive: 1,	   /* exclusive mode, don't override with other pcms */
-		     copy_flag: 1,	   /* lowlevel driver must fill all entries */
-		     spdif: 1;		   /* spdif pcm */
-	unsigned short aslots;		   /* active slots */
-	unsigned int rates;		   /* available rates */
-	struct {
-		unsigned short slots;	   /* driver input: requested AC97 slot numbers */
-		unsigned short rslots[4];  /* allocated slots per codecs */
-		unsigned char rate_table[4];
-		ac97_t *codec[4];	   /* allocated codecs */
-	} r[2];				   /* 0 = standard rates, 1 = double rates */
-	unsigned long private_value;	   /* used by the hardware driver */
-};
-
 struct snd_ac97_build_ops {
 	int (*build_3d) (ac97_t *ac97);
 	int (*build_specific) (ac97_t *ac97);
@@ -581,6 +554,36 @@ struct ac97_quirk {
 int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk, const char *override);
 int snd_ac97_set_rate(ac97_t *ac97, int reg, unsigned int rate);
 
+/*
+ * PCM allocation
+ */
+
+enum ac97_pcm_cfg {
+	AC97_PCM_CFG_FRONT = 2,
+	AC97_PCM_CFG_REAR = 10,		/* alias surround */
+	AC97_PCM_CFG_LFE = 11,		/* center + lfe */
+	AC97_PCM_CFG_40 = 4,		/* front + rear */
+	AC97_PCM_CFG_51 = 6,		/* front + rear + center/lfe */
+	AC97_PCM_CFG_SPDIF = 20
+};
+
+struct ac97_pcm {
+	ac97_bus_t *bus;
+	unsigned int stream: 1,	   	   /* stream type: 1 = capture */
+		     exclusive: 1,	   /* exclusive mode, don't override with other pcms */
+		     copy_flag: 1,	   /* lowlevel driver must fill all entries */
+		     spdif: 1;		   /* spdif pcm */
+	unsigned short aslots;		   /* active slots */
+	unsigned int rates;		   /* available rates */
+	struct {
+		unsigned short slots;	   /* driver input: requested AC97 slot numbers */
+		unsigned short rslots[4];  /* allocated slots per codecs */
+		unsigned char rate_table[4];
+		ac97_t *codec[4];	   /* allocated codecs */
+	} r[2];				   /* 0 = standard rates, 1 = double rates */
+	unsigned long private_value;	   /* used by the hardware driver */
+};
+
 int snd_ac97_pcm_assign(ac97_bus_t *ac97,
 			unsigned short pcms_count,
 			const struct ac97_pcm *pcms);
@@ -589,14 +592,6 @@ int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate,
 int snd_ac97_pcm_close(struct ac97_pcm *pcm);
 int snd_ac97_pcm_double_rate_rules(snd_pcm_runtime_t *runtime);
 
-struct ac97_enum {
-	unsigned char reg;
-	unsigned char shift_l;
-	unsigned char shift_r;
-	unsigned short mask;
-	const char **texts;
-};
-
 /* ad hoc AC97 device driver access */
 extern struct bus_type ac97_bus_type;
 
diff --git a/sound/pci/ac97/ac97_local.h b/sound/pci/ac97/ac97_local.h
index 536a4d4793a..5ff3ef2cae3 100644
--- a/sound/pci/ac97/ac97_local.h
+++ b/sound/pci/ac97/ac97_local.h
@@ -36,6 +36,15 @@
 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), .info = snd_ac97_info_volsw, \
   .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \
   .private_value = (reg) | ((shift_left) << 8) | ((shift_right) << 12) | ((mask) << 16) | ((invert) << 24) }
+
+struct ac97_enum {
+	unsigned char reg;
+	unsigned char shift_l;
+	unsigned char shift_r;
+	unsigned short mask;
+	const char **texts;
+};
+
 #define AC97_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \
 { .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \
   .mask = xmask, .texts = xtexts }
-- 
cgit v1.2.3-70-g09d2


From 512bbd6a85230f16389f0dd51925472e72fc8a91 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 13:51:18 +0100
Subject: [ALSA] Remove xxx_t typedefs: Core component

Modules: ALSA Core

Remove xxx_t typedefs from the core component.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/asound.h | 540 ++++++++++++++++++++++++-------------------------
 include/sound/core.h   | 199 ++++++++----------
 sound/core/device.c    |  42 ++--
 sound/core/init.c      |  86 ++++----
 sound/core/sound.c     |  32 +--
 5 files changed, 432 insertions(+), 467 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/asound.h b/include/sound/asound.h
index 1389704d8d6..9cc021c7ee1 100644
--- a/include/sound/asound.h
+++ b/include/sound/asound.h
@@ -60,7 +60,7 @@
  *                                                                          *
  ****************************************************************************/
 
-struct sndrv_aes_iec958 {
+struct snd_aes_iec958 {
 	unsigned char status[24];	/* AES/IEC958 channel status bits */
 	unsigned char subcode[147];	/* AES/IEC958 subcode bits */
 	unsigned char pad;		/* nothing */
@@ -75,7 +75,7 @@ struct sndrv_aes_iec958 {
 
 #define SNDRV_HWDEP_VERSION		SNDRV_PROTOCOL_VERSION(1, 0, 1)
 
-enum sndrv_hwdep_iface {
+enum {
 	SNDRV_HWDEP_IFACE_OPL2 = 0,
 	SNDRV_HWDEP_IFACE_OPL3,
 	SNDRV_HWDEP_IFACE_OPL4,
@@ -97,17 +97,17 @@ enum sndrv_hwdep_iface {
 	SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_SB_RC
 };
 
-struct sndrv_hwdep_info {
+struct snd_hwdep_info {
 	unsigned int device;		/* WR: device number */
 	int card;			/* R: card number */
 	unsigned char id[64];		/* ID (user selectable) */
 	unsigned char name[80];		/* hwdep name */
-	enum sndrv_hwdep_iface iface;	/* hwdep interface */
+	int iface;			/* hwdep interface */
 	unsigned char reserved[64];	/* reserved for future */
 };
 
 /* generic DSP loader */
-struct sndrv_hwdep_dsp_status {
+struct snd_hwdep_dsp_status {
 	unsigned int version;		/* R: driver-specific version */
 	unsigned char id[32];		/* R: driver-specific ID string */
 	unsigned int num_dsps;		/* R: number of DSP images to transfer */
@@ -116,7 +116,7 @@ struct sndrv_hwdep_dsp_status {
 	unsigned char reserved[16];	/* reserved for future use */
 };
 
-struct sndrv_hwdep_dsp_image {
+struct snd_hwdep_dsp_image {
 	unsigned int index;		/* W: DSP index */
 	unsigned char name[64];		/* W: ID (e.g. file name) */
 	unsigned char __user *image;	/* W: binary image */
@@ -126,9 +126,9 @@ struct sndrv_hwdep_dsp_image {
 
 enum {
 	SNDRV_HWDEP_IOCTL_PVERSION = _IOR ('H', 0x00, int),
-	SNDRV_HWDEP_IOCTL_INFO = _IOR ('H', 0x01, struct sndrv_hwdep_info),
-	SNDRV_HWDEP_IOCTL_DSP_STATUS = _IOR('H', 0x02, struct sndrv_hwdep_dsp_status),
-	SNDRV_HWDEP_IOCTL_DSP_LOAD   = _IOW('H', 0x03, struct sndrv_hwdep_dsp_image)
+	SNDRV_HWDEP_IOCTL_INFO = _IOR ('H', 0x01, struct snd_hwdep_info),
+	SNDRV_HWDEP_IOCTL_DSP_STATUS = _IOR('H', 0x02, struct snd_hwdep_dsp_status),
+	SNDRV_HWDEP_IOCTL_DSP_LOAD   = _IOW('H', 0x03, struct snd_hwdep_dsp_image)
 };
 
 /*****************************************************************************
@@ -139,10 +139,10 @@ enum {
 
 #define SNDRV_PCM_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 7)
 
-typedef unsigned long sndrv_pcm_uframes_t;
-typedef long sndrv_pcm_sframes_t;
+typedef unsigned long snd_pcm_uframes_t;
+typedef signed long snd_pcm_sframes_t;
 
-enum sndrv_pcm_class {
+enum {
 	SNDRV_PCM_CLASS_GENERIC = 0,	/* standard mono or stereo device */
 	SNDRV_PCM_CLASS_MULTI,		/* multichannel device */
 	SNDRV_PCM_CLASS_MODEM,		/* software modem class */
@@ -151,97 +151,94 @@ enum sndrv_pcm_class {
 	SNDRV_PCM_CLASS_LAST = SNDRV_PCM_CLASS_DIGITIZER,
 };
 
-enum sndrv_pcm_subclass {
+enum {
 	SNDRV_PCM_SUBCLASS_GENERIC_MIX = 0, /* mono or stereo subdevices are mixed together */
 	SNDRV_PCM_SUBCLASS_MULTI_MIX,	/* multichannel subdevices are mixed together */
 	/* Don't forget to change the following: */
 	SNDRV_PCM_SUBCLASS_LAST = SNDRV_PCM_SUBCLASS_MULTI_MIX,
 };
 
-enum sndrv_pcm_stream {
+enum {
 	SNDRV_PCM_STREAM_PLAYBACK = 0,
 	SNDRV_PCM_STREAM_CAPTURE,
 	SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE,
 };
 
-enum sndrv_pcm_access {
-	SNDRV_PCM_ACCESS_MMAP_INTERLEAVED = 0,	/* interleaved mmap */
-	SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED, 	/* noninterleaved mmap */
-	SNDRV_PCM_ACCESS_MMAP_COMPLEX,		/* complex mmap */
-	SNDRV_PCM_ACCESS_RW_INTERLEAVED,	/* readi/writei */
-	SNDRV_PCM_ACCESS_RW_NONINTERLEAVED,	/* readn/writen */
-	SNDRV_PCM_ACCESS_LAST = SNDRV_PCM_ACCESS_RW_NONINTERLEAVED,
-};
-
-enum sndrv_pcm_format {
-	SNDRV_PCM_FORMAT_S8 = 0,
-	SNDRV_PCM_FORMAT_U8,
-	SNDRV_PCM_FORMAT_S16_LE,
-	SNDRV_PCM_FORMAT_S16_BE,
-	SNDRV_PCM_FORMAT_U16_LE,
-	SNDRV_PCM_FORMAT_U16_BE,
-	SNDRV_PCM_FORMAT_S24_LE,	/* low three bytes */
-	SNDRV_PCM_FORMAT_S24_BE,	/* low three bytes */
-	SNDRV_PCM_FORMAT_U24_LE,	/* low three bytes */
-	SNDRV_PCM_FORMAT_U24_BE,	/* low three bytes */
-	SNDRV_PCM_FORMAT_S32_LE,
-	SNDRV_PCM_FORMAT_S32_BE,
-	SNDRV_PCM_FORMAT_U32_LE,
-	SNDRV_PCM_FORMAT_U32_BE,
-	SNDRV_PCM_FORMAT_FLOAT_LE,	/* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */
-	SNDRV_PCM_FORMAT_FLOAT_BE,	/* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */
-	SNDRV_PCM_FORMAT_FLOAT64_LE,	/* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */
-	SNDRV_PCM_FORMAT_FLOAT64_BE,	/* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */
-	SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE,	/* IEC-958 subframe, Little Endian */
-	SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE,	/* IEC-958 subframe, Big Endian */
-	SNDRV_PCM_FORMAT_MU_LAW,
-	SNDRV_PCM_FORMAT_A_LAW,
-	SNDRV_PCM_FORMAT_IMA_ADPCM,
-	SNDRV_PCM_FORMAT_MPEG,
-	SNDRV_PCM_FORMAT_GSM,
-	SNDRV_PCM_FORMAT_SPECIAL = 31,
-	SNDRV_PCM_FORMAT_S24_3LE = 32,	/* in three bytes */
-	SNDRV_PCM_FORMAT_S24_3BE,	/* in three bytes */
-	SNDRV_PCM_FORMAT_U24_3LE,	/* in three bytes */
-	SNDRV_PCM_FORMAT_U24_3BE,	/* in three bytes */
-	SNDRV_PCM_FORMAT_S20_3LE,	/* in three bytes */
-	SNDRV_PCM_FORMAT_S20_3BE,	/* in three bytes */
-	SNDRV_PCM_FORMAT_U20_3LE,	/* in three bytes */
-	SNDRV_PCM_FORMAT_U20_3BE,	/* in three bytes */
-	SNDRV_PCM_FORMAT_S18_3LE,	/* in three bytes */
-	SNDRV_PCM_FORMAT_S18_3BE,	/* in three bytes */
-	SNDRV_PCM_FORMAT_U18_3LE,	/* in three bytes */
-	SNDRV_PCM_FORMAT_U18_3BE,	/* in three bytes */
-	SNDRV_PCM_FORMAT_LAST = SNDRV_PCM_FORMAT_U18_3BE,
+typedef int __bitwise snd_pcm_access_t;
+#define	SNDRV_PCM_ACCESS_MMAP_INTERLEAVED	((__force snd_pcm_access_t) 0) /* interleaved mmap */
+#define	SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED	((__force snd_pcm_access_t) 1) /* noninterleaved mmap */
+#define	SNDRV_PCM_ACCESS_MMAP_COMPLEX		((__force snd_pcm_access_t) 2) /* complex mmap */
+#define	SNDRV_PCM_ACCESS_RW_INTERLEAVED		((__force snd_pcm_access_t) 3) /* readi/writei */
+#define	SNDRV_PCM_ACCESS_RW_NONINTERLEAVED	((__force snd_pcm_access_t) 4) /* readn/writen */
+#define	SNDRV_PCM_ACCESS_LAST		SNDRV_PCM_ACCESS_RW_NONINTERLEAVED
+
+typedef int __bitwise snd_pcm_format_t;
+#define	SNDRV_PCM_FORMAT_S8	((__force snd_pcm_format_t) 0)
+#define	SNDRV_PCM_FORMAT_U8	((__force snd_pcm_format_t) 1)
+#define	SNDRV_PCM_FORMAT_S16_LE	((__force snd_pcm_format_t) 2)
+#define	SNDRV_PCM_FORMAT_S16_BE	((__force snd_pcm_format_t) 3)
+#define	SNDRV_PCM_FORMAT_U16_LE	((__force snd_pcm_format_t) 4)
+#define	SNDRV_PCM_FORMAT_U16_BE	((__force snd_pcm_format_t) 5)
+#define	SNDRV_PCM_FORMAT_S24_LE	((__force snd_pcm_format_t) 6) /* low three bytes */
+#define	SNDRV_PCM_FORMAT_S24_BE	((__force snd_pcm_format_t) 7) /* low three bytes */
+#define	SNDRV_PCM_FORMAT_U24_LE	((__force snd_pcm_format_t) 8) /* low three bytes */
+#define	SNDRV_PCM_FORMAT_U24_BE	((__force snd_pcm_format_t) 9) /* low three bytes */
+#define	SNDRV_PCM_FORMAT_S32_LE	((__force snd_pcm_format_t) 10)
+#define	SNDRV_PCM_FORMAT_S32_BE	((__force snd_pcm_format_t) 11)
+#define	SNDRV_PCM_FORMAT_U32_LE	((__force snd_pcm_format_t) 12)
+#define	SNDRV_PCM_FORMAT_U32_BE	((__force snd_pcm_format_t) 13)
+#define	SNDRV_PCM_FORMAT_FLOAT_LE	((__force snd_pcm_format_t) 14) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */
+#define	SNDRV_PCM_FORMAT_FLOAT_BE	((__force snd_pcm_format_t) 15) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */
+#define	SNDRV_PCM_FORMAT_FLOAT64_LE	((__force snd_pcm_format_t) 16) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */
+#define	SNDRV_PCM_FORMAT_FLOAT64_BE	((__force snd_pcm_format_t) 17) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */
+#define	SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((__force snd_pcm_format_t) 18) /* IEC-958 subframe, Little Endian */
+#define	SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((__force snd_pcm_format_t) 19) /* IEC-958 subframe, Big Endian */
+#define	SNDRV_PCM_FORMAT_MU_LAW		((__force snd_pcm_format_t) 20)
+#define	SNDRV_PCM_FORMAT_A_LAW		((__force snd_pcm_format_t) 21)
+#define	SNDRV_PCM_FORMAT_IMA_ADPCM	((__force snd_pcm_format_t) 22)
+#define	SNDRV_PCM_FORMAT_MPEG		((__force snd_pcm_format_t) 23)
+#define	SNDRV_PCM_FORMAT_GSM		((__force snd_pcm_format_t) 24)
+#define	SNDRV_PCM_FORMAT_SPECIAL	((__force snd_pcm_format_t) 31)
+#define	SNDRV_PCM_FORMAT_S24_3LE	((__force snd_pcm_format_t) 32)	/* in three bytes */
+#define	SNDRV_PCM_FORMAT_S24_3BE	((__force snd_pcm_format_t) 33)	/* in three bytes */
+#define	SNDRV_PCM_FORMAT_U24_3LE	((__force snd_pcm_format_t) 34)	/* in three bytes */
+#define	SNDRV_PCM_FORMAT_U24_3BE	((__force snd_pcm_format_t) 35)	/* in three bytes */
+#define	SNDRV_PCM_FORMAT_S20_3LE	((__force snd_pcm_format_t) 36)	/* in three bytes */
+#define	SNDRV_PCM_FORMAT_S20_3BE	((__force snd_pcm_format_t) 37)	/* in three bytes */
+#define	SNDRV_PCM_FORMAT_U20_3LE	((__force snd_pcm_format_t) 38)	/* in three bytes */
+#define	SNDRV_PCM_FORMAT_U20_3BE	((__force snd_pcm_format_t) 39)	/* in three bytes */
+#define	SNDRV_PCM_FORMAT_S18_3LE	((__force snd_pcm_format_t) 40)	/* in three bytes */
+#define	SNDRV_PCM_FORMAT_S18_3BE	((__force snd_pcm_format_t) 41)	/* in three bytes */
+#define	SNDRV_PCM_FORMAT_U18_3LE	((__force snd_pcm_format_t) 42)	/* in three bytes */
+#define	SNDRV_PCM_FORMAT_U18_3BE	((__force snd_pcm_format_t) 43)	/* in three bytes */
+#define	SNDRV_PCM_FORMAT_LAST		SNDRV_PCM_FORMAT_U18_3BE
 
 #ifdef SNDRV_LITTLE_ENDIAN
-	SNDRV_PCM_FORMAT_S16 = SNDRV_PCM_FORMAT_S16_LE,
-	SNDRV_PCM_FORMAT_U16 = SNDRV_PCM_FORMAT_U16_LE,
-	SNDRV_PCM_FORMAT_S24 = SNDRV_PCM_FORMAT_S24_LE,
-	SNDRV_PCM_FORMAT_U24 = SNDRV_PCM_FORMAT_U24_LE,
-	SNDRV_PCM_FORMAT_S32 = SNDRV_PCM_FORMAT_S32_LE,
-	SNDRV_PCM_FORMAT_U32 = SNDRV_PCM_FORMAT_U32_LE,
-	SNDRV_PCM_FORMAT_FLOAT = SNDRV_PCM_FORMAT_FLOAT_LE,
-	SNDRV_PCM_FORMAT_FLOAT64 = SNDRV_PCM_FORMAT_FLOAT64_LE,
-	SNDRV_PCM_FORMAT_IEC958_SUBFRAME = SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE,
+#define	SNDRV_PCM_FORMAT_S16		SNDRV_PCM_FORMAT_S16_LE
+#define	SNDRV_PCM_FORMAT_U16		SNDRV_PCM_FORMAT_U16_LE
+#define	SNDRV_PCM_FORMAT_S24		SNDRV_PCM_FORMAT_S24_LE
+#define	SNDRV_PCM_FORMAT_U24		SNDRV_PCM_FORMAT_U24_LE
+#define	SNDRV_PCM_FORMAT_S32		SNDRV_PCM_FORMAT_S32_LE
+#define	SNDRV_PCM_FORMAT_U32		SNDRV_PCM_FORMAT_U32_LE
+#define	SNDRV_PCM_FORMAT_FLOAT		SNDRV_PCM_FORMAT_FLOAT_LE
+#define	SNDRV_PCM_FORMAT_FLOAT64	SNDRV_PCM_FORMAT_FLOAT64_LE
+#define	SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE
 #endif
 #ifdef SNDRV_BIG_ENDIAN
-	SNDRV_PCM_FORMAT_S16 = SNDRV_PCM_FORMAT_S16_BE,
-	SNDRV_PCM_FORMAT_U16 = SNDRV_PCM_FORMAT_U16_BE,
-	SNDRV_PCM_FORMAT_S24 = SNDRV_PCM_FORMAT_S24_BE,
-	SNDRV_PCM_FORMAT_U24 = SNDRV_PCM_FORMAT_U24_BE,
-	SNDRV_PCM_FORMAT_S32 = SNDRV_PCM_FORMAT_S32_BE,
-	SNDRV_PCM_FORMAT_U32 = SNDRV_PCM_FORMAT_U32_BE,
-	SNDRV_PCM_FORMAT_FLOAT = SNDRV_PCM_FORMAT_FLOAT_BE,
-	SNDRV_PCM_FORMAT_FLOAT64 = SNDRV_PCM_FORMAT_FLOAT64_BE,
-	SNDRV_PCM_FORMAT_IEC958_SUBFRAME = SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE,
+#define	SNDRV_PCM_FORMAT_S16		SNDRV_PCM_FORMAT_S16_BE
+#define	SNDRV_PCM_FORMAT_U16		SNDRV_PCM_FORMAT_U16_BE
+#define	SNDRV_PCM_FORMAT_S24		SNDRV_PCM_FORMAT_S24_BE
+#define	SNDRV_PCM_FORMAT_U24		SNDRV_PCM_FORMAT_U24_BE
+#define	SNDRV_PCM_FORMAT_S32		SNDRV_PCM_FORMAT_S32_BE
+#define	SNDRV_PCM_FORMAT_U32		SNDRV_PCM_FORMAT_U32_BE
+#define	SNDRV_PCM_FORMAT_FLOAT		SNDRV_PCM_FORMAT_FLOAT_BE
+#define	SNDRV_PCM_FORMAT_FLOAT64	SNDRV_PCM_FORMAT_FLOAT64_BE
+#define	SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE
 #endif
-};
 
-enum sndrv_pcm_subformat {
-	SNDRV_PCM_SUBFORMAT_STD = 0,
-	SNDRV_PCM_SUBFORMAT_LAST = SNDRV_PCM_SUBFORMAT_STD,
-};
+typedef int __bitwise snd_pcm_subformat_t;
+#define	SNDRV_PCM_SUBFORMAT_STD		((__force snd_pcm_subformat_t) 0)
+#define	SNDRV_PCM_SUBFORMAT_LAST	SNDRV_PCM_SUBFORMAT_STD
 
 #define SNDRV_PCM_INFO_MMAP		0x00000001	/* hardware supports mmap */
 #define SNDRV_PCM_INFO_MMAP_VALID	0x00000002	/* period data are valid during transfer */
@@ -258,18 +255,17 @@ enum sndrv_pcm_subformat {
 #define SNDRV_PCM_INFO_JOINT_DUPLEX	0x00200000	/* playback and capture stream are somewhat correlated */
 #define SNDRV_PCM_INFO_SYNC_START	0x00400000	/* pcm support some kind of sync go */
 
-enum sndrv_pcm_state {
-	SNDRV_PCM_STATE_OPEN = 0,	/* stream is open */
-	SNDRV_PCM_STATE_SETUP,		/* stream has a setup */
-	SNDRV_PCM_STATE_PREPARED,	/* stream is ready to start */
-	SNDRV_PCM_STATE_RUNNING,	/* stream is running */
-	SNDRV_PCM_STATE_XRUN,		/* stream reached an xrun */
-	SNDRV_PCM_STATE_DRAINING,	/* stream is draining */
-	SNDRV_PCM_STATE_PAUSED,		/* stream is paused */
-	SNDRV_PCM_STATE_SUSPENDED,	/* hardware is suspended */
-	SNDRV_PCM_STATE_DISCONNECTED,	/* hardware is disconnected */
-	SNDRV_PCM_STATE_LAST = SNDRV_PCM_STATE_DISCONNECTED,
-};
+typedef int __bitwise snd_pcm_state_t;
+#define	SNDRV_PCM_STATE_OPEN		((__force snd_pcm_state_t) 0) /* stream is open */
+#define	SNDRV_PCM_STATE_SETUP		((__force snd_pcm_state_t) 1) /* stream has a setup */
+#define	SNDRV_PCM_STATE_PREPARED	((__force snd_pcm_state_t) 2) /* stream is ready to start */
+#define	SNDRV_PCM_STATE_RUNNING		((__force snd_pcm_state_t) 3) /* stream is running */
+#define	SNDRV_PCM_STATE_XRUN		((__force snd_pcm_state_t) 4) /* stream reached an xrun */
+#define	SNDRV_PCM_STATE_DRAINING	((__force snd_pcm_state_t) 5) /* stream is draining */
+#define	SNDRV_PCM_STATE_PAUSED		((__force snd_pcm_state_t) 6) /* stream is paused */
+#define	SNDRV_PCM_STATE_SUSPENDED	((__force snd_pcm_state_t) 7) /* hardware is suspended */
+#define	SNDRV_PCM_STATE_DISCONNECTED	((__force snd_pcm_state_t) 8) /* hardware is disconnected */
+#define	SNDRV_PCM_STATE_LAST		SNDRV_PCM_STATE_DISCONNECTED
 
 enum {
 	SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000,
@@ -277,55 +273,53 @@ enum {
 	SNDRV_PCM_MMAP_OFFSET_CONTROL = 0x81000000,
 };
 
-union sndrv_pcm_sync_id {
+union snd_pcm_sync_id {
 	unsigned char id[16];
 	unsigned short id16[8];
 	unsigned int id32[4];
 };
 
-struct sndrv_pcm_info {
+struct snd_pcm_info {
 	unsigned int device;		/* RO/WR (control): device number */
 	unsigned int subdevice;		/* RO/WR (control): subdevice number */
-	enum sndrv_pcm_stream stream;	/* RO/WR (control): stream number */
+	int stream;			/* RO/WR (control): stream direction */
 	int card;			/* R: card number */
 	unsigned char id[64];		/* ID (user selectable) */
 	unsigned char name[80];		/* name of this device */
 	unsigned char subname[32];	/* subdevice name */
-	enum sndrv_pcm_class dev_class;	/* SNDRV_PCM_CLASS_* */
-	enum sndrv_pcm_subclass dev_subclass; /* SNDRV_PCM_SUBCLASS_* */
+	int dev_class;			/* SNDRV_PCM_CLASS_* */
+	int dev_subclass;		/* SNDRV_PCM_SUBCLASS_* */
 	unsigned int subdevices_count;
 	unsigned int subdevices_avail;
-	union sndrv_pcm_sync_id sync;	/* hardware synchronization ID */
+	union snd_pcm_sync_id sync;	/* hardware synchronization ID */
 	unsigned char reserved[64];	/* reserved for future... */
 };
 
-enum sndrv_pcm_hw_param {
-	SNDRV_PCM_HW_PARAM_ACCESS = 0,	/* Access type */
-	SNDRV_PCM_HW_PARAM_FIRST_MASK = SNDRV_PCM_HW_PARAM_ACCESS,
-	SNDRV_PCM_HW_PARAM_FORMAT,	/* Format */
-	SNDRV_PCM_HW_PARAM_SUBFORMAT,	/* Subformat */
-	SNDRV_PCM_HW_PARAM_LAST_MASK = SNDRV_PCM_HW_PARAM_SUBFORMAT,
-
-	SNDRV_PCM_HW_PARAM_SAMPLE_BITS = 8, /* Bits per sample */
-	SNDRV_PCM_HW_PARAM_FIRST_INTERVAL = SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
-	SNDRV_PCM_HW_PARAM_FRAME_BITS,	/* Bits per frame */
-	SNDRV_PCM_HW_PARAM_CHANNELS,	/* Channels */
-	SNDRV_PCM_HW_PARAM_RATE,	/* Approx rate */
-	SNDRV_PCM_HW_PARAM_PERIOD_TIME,	/* Approx distance between interrupts
-					   in us */
-	SNDRV_PCM_HW_PARAM_PERIOD_SIZE,	/* Approx frames between interrupts */
-	SNDRV_PCM_HW_PARAM_PERIOD_BYTES, /* Approx bytes between interrupts */
-	SNDRV_PCM_HW_PARAM_PERIODS,	/* Approx interrupts per buffer */
-	SNDRV_PCM_HW_PARAM_BUFFER_TIME,	/* Approx duration of buffer in us */
-	SNDRV_PCM_HW_PARAM_BUFFER_SIZE,	/* Size of buffer in frames */
-	SNDRV_PCM_HW_PARAM_BUFFER_BYTES, /* Size of buffer in bytes */
-	SNDRV_PCM_HW_PARAM_TICK_TIME,	/* Approx tick duration in us */
-	SNDRV_PCM_HW_PARAM_LAST_INTERVAL = SNDRV_PCM_HW_PARAM_TICK_TIME
-};
+typedef int __bitwise snd_pcm_hw_param_t;
+#define	SNDRV_PCM_HW_PARAM_ACCESS	((__force snd_pcm_hw_param_t) 0) /* Access type */
+#define	SNDRV_PCM_HW_PARAM_FORMAT	((__force snd_pcm_hw_param_t) 1) /* Format */
+#define	SNDRV_PCM_HW_PARAM_SUBFORMAT	((__force snd_pcm_hw_param_t) 2) /* Subformat */
+#define	SNDRV_PCM_HW_PARAM_FIRST_MASK	SNDRV_PCM_HW_PARAM_ACCESS
+#define	SNDRV_PCM_HW_PARAM_LAST_MASK	SNDRV_PCM_HW_PARAM_SUBFORMAT
+
+#define	SNDRV_PCM_HW_PARAM_SAMPLE_BITS	((__force snd_pcm_hw_param_t) 8) /* Bits per sample */
+#define	SNDRV_PCM_HW_PARAM_FRAME_BITS	((__force snd_pcm_hw_param_t) 9) /* Bits per frame */
+#define	SNDRV_PCM_HW_PARAM_CHANNELS	((__force snd_pcm_hw_param_t) 10) /* Channels */
+#define	SNDRV_PCM_HW_PARAM_RATE		((__force snd_pcm_hw_param_t) 11) /* Approx rate */
+#define	SNDRV_PCM_HW_PARAM_PERIOD_TIME	((__force snd_pcm_hw_param_t) 12) /* Approx distance between interrupts in us */
+#define	SNDRV_PCM_HW_PARAM_PERIOD_SIZE	((__force snd_pcm_hw_param_t) 13) /* Approx frames between interrupts */
+#define	SNDRV_PCM_HW_PARAM_PERIOD_BYTES	((__force snd_pcm_hw_param_t) 14) /* Approx bytes between interrupts */
+#define	SNDRV_PCM_HW_PARAM_PERIODS	((__force snd_pcm_hw_param_t) 15) /* Approx interrupts per buffer */
+#define	SNDRV_PCM_HW_PARAM_BUFFER_TIME	((__force snd_pcm_hw_param_t) 16) /* Approx duration of buffer in us */
+#define	SNDRV_PCM_HW_PARAM_BUFFER_SIZE	((__force snd_pcm_hw_param_t) 17) /* Size of buffer in frames */
+#define	SNDRV_PCM_HW_PARAM_BUFFER_BYTES	((__force snd_pcm_hw_param_t) 18) /* Size of buffer in bytes */
+#define	SNDRV_PCM_HW_PARAM_TICK_TIME	((__force snd_pcm_hw_param_t) 19) /* Approx tick duration in us */
+#define	SNDRV_PCM_HW_PARAM_FIRST_INTERVAL	SNDRV_PCM_HW_PARAM_SAMPLE_BITS
+#define	SNDRV_PCM_HW_PARAM_LAST_INTERVAL	SNDRV_PCM_HW_PARAM_TICK_TIME
 
 #define SNDRV_PCM_HW_PARAMS_NORESAMPLE		(1<<0)	/* avoid rate resampling */
 
-struct sndrv_interval {
+struct snd_interval {
 	unsigned int min, max;
 	unsigned int openmin:1,
 		     openmax:1,
@@ -335,137 +329,137 @@ struct sndrv_interval {
 
 #define SNDRV_MASK_MAX	256
 
-struct sndrv_mask {
+struct snd_mask {
 	u_int32_t bits[(SNDRV_MASK_MAX+31)/32];
 };
 
-struct sndrv_pcm_hw_params {
+struct snd_pcm_hw_params {
 	unsigned int flags;
-	struct sndrv_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - 
+	struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - 
 			       SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
-	struct sndrv_mask mres[5];	/* reserved masks */
-	struct sndrv_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL -
+	struct snd_mask mres[5];	/* reserved masks */
+	struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL -
 				        SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
-	struct sndrv_interval ires[9];	/* reserved intervals */
+	struct snd_interval ires[9];	/* reserved intervals */
 	unsigned int rmask;		/* W: requested masks */
 	unsigned int cmask;		/* R: changed masks */
 	unsigned int info;		/* R: Info flags for returned setup */
 	unsigned int msbits;		/* R: used most significant bits */
 	unsigned int rate_num;		/* R: rate numerator */
 	unsigned int rate_den;		/* R: rate denominator */
-	sndrv_pcm_uframes_t fifo_size;	/* R: chip FIFO size in frames */
+	snd_pcm_uframes_t fifo_size;	/* R: chip FIFO size in frames */
 	unsigned char reserved[64];	/* reserved for future */
 };
 
-enum sndrv_pcm_tstamp {
+enum {
 	SNDRV_PCM_TSTAMP_NONE = 0,
 	SNDRV_PCM_TSTAMP_MMAP,
 	SNDRV_PCM_TSTAMP_LAST = SNDRV_PCM_TSTAMP_MMAP,
 };
 
-struct sndrv_pcm_sw_params {
-	enum sndrv_pcm_tstamp tstamp_mode;	/* timestamp mode */
+struct snd_pcm_sw_params {
+	int tstamp_mode;			/* timestamp mode */
 	unsigned int period_step;
 	unsigned int sleep_min;			/* min ticks to sleep */
-	sndrv_pcm_uframes_t avail_min;		/* min avail frames for wakeup */
-	sndrv_pcm_uframes_t xfer_align;		/* xfer size need to be a multiple */
-	sndrv_pcm_uframes_t start_threshold;	/* min hw_avail frames for automatic start */
-	sndrv_pcm_uframes_t stop_threshold;	/* min avail frames for automatic stop */
-	sndrv_pcm_uframes_t silence_threshold;	/* min distance from noise for silence filling */
-	sndrv_pcm_uframes_t silence_size;	/* silence block size */
-	sndrv_pcm_uframes_t boundary;		/* pointers wrap point */
+	snd_pcm_uframes_t avail_min;		/* min avail frames for wakeup */
+	snd_pcm_uframes_t xfer_align;		/* xfer size need to be a multiple */
+	snd_pcm_uframes_t start_threshold;	/* min hw_avail frames for automatic start */
+	snd_pcm_uframes_t stop_threshold;	/* min avail frames for automatic stop */
+	snd_pcm_uframes_t silence_threshold;	/* min distance from noise for silence filling */
+	snd_pcm_uframes_t silence_size;		/* silence block size */
+	snd_pcm_uframes_t boundary;		/* pointers wrap point */
 	unsigned char reserved[64];		/* reserved for future */
 };
 
-struct sndrv_pcm_channel_info {
+struct snd_pcm_channel_info {
 	unsigned int channel;
 	off_t offset;			/* mmap offset */
 	unsigned int first;		/* offset to first sample in bits */
 	unsigned int step;		/* samples distance in bits */
 };
 
-struct sndrv_pcm_status {
-	enum sndrv_pcm_state state;	/* stream state */
+struct snd_pcm_status {
+	snd_pcm_state_t state;		/* stream state */
 	struct timespec trigger_tstamp;	/* time when stream was started/stopped/paused */
 	struct timespec tstamp;		/* reference timestamp */
-	sndrv_pcm_uframes_t appl_ptr;	/* appl ptr */
-	sndrv_pcm_uframes_t hw_ptr;	/* hw ptr */
-	sndrv_pcm_sframes_t delay;	/* current delay in frames */
-	sndrv_pcm_uframes_t avail;	/* number of frames available */
-	sndrv_pcm_uframes_t avail_max;	/* max frames available on hw since last status */
-	sndrv_pcm_uframes_t overrange;	/* count of ADC (capture) overrange detections from last status */
-	enum sndrv_pcm_state suspended_state; /* suspended stream state */
+	snd_pcm_uframes_t appl_ptr;	/* appl ptr */
+	snd_pcm_uframes_t hw_ptr;	/* hw ptr */
+	snd_pcm_sframes_t delay;	/* current delay in frames */
+	snd_pcm_uframes_t avail;	/* number of frames available */
+	snd_pcm_uframes_t avail_max;	/* max frames available on hw since last status */
+	snd_pcm_uframes_t overrange;	/* count of ADC (capture) overrange detections from last status */
+	snd_pcm_state_t suspended_state; /* suspended stream state */
 	unsigned char reserved[60];	/* must be filled with zero */
 };
 
-struct sndrv_pcm_mmap_status {
-	enum sndrv_pcm_state state;	/* RO: state - SNDRV_PCM_STATE_XXXX */
+struct snd_pcm_mmap_status {
+	snd_pcm_state_t state;		/* RO: state - SNDRV_PCM_STATE_XXXX */
 	int pad1;			/* Needed for 64 bit alignment */
-	sndrv_pcm_uframes_t hw_ptr;	/* RO: hw ptr (0...boundary-1) */
+	snd_pcm_uframes_t hw_ptr;	/* RO: hw ptr (0...boundary-1) */
 	struct timespec tstamp;		/* Timestamp */
-	enum sndrv_pcm_state suspended_state; /* RO: suspended stream state */
+	snd_pcm_state_t suspended_state; /* RO: suspended stream state */
 };
 
-struct sndrv_pcm_mmap_control {
-	sndrv_pcm_uframes_t appl_ptr;	/* RW: appl ptr (0...boundary-1) */
-	sndrv_pcm_uframes_t avail_min;	/* RW: min available frames for wakeup */
+struct snd_pcm_mmap_control {
+	snd_pcm_uframes_t appl_ptr;	/* RW: appl ptr (0...boundary-1) */
+	snd_pcm_uframes_t avail_min;	/* RW: min available frames for wakeup */
 };
 
 #define SNDRV_PCM_SYNC_PTR_HWSYNC	(1<<0)	/* execute hwsync */
 #define SNDRV_PCM_SYNC_PTR_APPL		(1<<1)	/* get appl_ptr from driver (r/w op) */
 #define SNDRV_PCM_SYNC_PTR_AVAIL_MIN	(1<<2)	/* get avail_min from driver */
 
-struct sndrv_pcm_sync_ptr {
+struct snd_pcm_sync_ptr {
 	unsigned int flags;
 	union {
-		struct sndrv_pcm_mmap_status status;
+		struct snd_pcm_mmap_status status;
 		unsigned char reserved[64];
 	} s;
 	union {
-		struct sndrv_pcm_mmap_control control;
+		struct snd_pcm_mmap_control control;
 		unsigned char reserved[64];
 	} c;
 };
 
-struct sndrv_xferi {
-	sndrv_pcm_sframes_t result;
+struct snd_xferi {
+	snd_pcm_sframes_t result;
 	void __user *buf;
-	sndrv_pcm_uframes_t frames;
+	snd_pcm_uframes_t frames;
 };
 
-struct sndrv_xfern {
-	sndrv_pcm_sframes_t result;
+struct snd_xfern {
+	snd_pcm_sframes_t result;
 	void __user * __user *bufs;
-	sndrv_pcm_uframes_t frames;
+	snd_pcm_uframes_t frames;
 };
 
 enum {
 	SNDRV_PCM_IOCTL_PVERSION = _IOR('A', 0x00, int),
-	SNDRV_PCM_IOCTL_INFO = _IOR('A', 0x01, struct sndrv_pcm_info),
+	SNDRV_PCM_IOCTL_INFO = _IOR('A', 0x01, struct snd_pcm_info),
 	SNDRV_PCM_IOCTL_TSTAMP = _IOW('A', 0x02, int),
-	SNDRV_PCM_IOCTL_HW_REFINE = _IOWR('A', 0x10, struct sndrv_pcm_hw_params),
-	SNDRV_PCM_IOCTL_HW_PARAMS = _IOWR('A', 0x11, struct sndrv_pcm_hw_params),
+	SNDRV_PCM_IOCTL_HW_REFINE = _IOWR('A', 0x10, struct snd_pcm_hw_params),
+	SNDRV_PCM_IOCTL_HW_PARAMS = _IOWR('A', 0x11, struct snd_pcm_hw_params),
 	SNDRV_PCM_IOCTL_HW_FREE = _IO('A', 0x12),
-	SNDRV_PCM_IOCTL_SW_PARAMS = _IOWR('A', 0x13, struct sndrv_pcm_sw_params),
-	SNDRV_PCM_IOCTL_STATUS = _IOR('A', 0x20, struct sndrv_pcm_status),
-	SNDRV_PCM_IOCTL_DELAY = _IOR('A', 0x21, sndrv_pcm_sframes_t),
+	SNDRV_PCM_IOCTL_SW_PARAMS = _IOWR('A', 0x13, struct snd_pcm_sw_params),
+	SNDRV_PCM_IOCTL_STATUS = _IOR('A', 0x20, struct snd_pcm_status),
+	SNDRV_PCM_IOCTL_DELAY = _IOR('A', 0x21, snd_pcm_sframes_t),
 	SNDRV_PCM_IOCTL_HWSYNC = _IO('A', 0x22),
-	SNDRV_PCM_IOCTL_SYNC_PTR = _IOWR('A', 0x23, struct sndrv_pcm_sync_ptr),
-	SNDRV_PCM_IOCTL_CHANNEL_INFO = _IOR('A', 0x32, struct sndrv_pcm_channel_info),
+	SNDRV_PCM_IOCTL_SYNC_PTR = _IOWR('A', 0x23, struct snd_pcm_sync_ptr),
+	SNDRV_PCM_IOCTL_CHANNEL_INFO = _IOR('A', 0x32, struct snd_pcm_channel_info),
 	SNDRV_PCM_IOCTL_PREPARE = _IO('A', 0x40),
 	SNDRV_PCM_IOCTL_RESET = _IO('A', 0x41),
 	SNDRV_PCM_IOCTL_START = _IO('A', 0x42),
 	SNDRV_PCM_IOCTL_DROP = _IO('A', 0x43),
 	SNDRV_PCM_IOCTL_DRAIN = _IO('A', 0x44),
 	SNDRV_PCM_IOCTL_PAUSE = _IOW('A', 0x45, int),
-	SNDRV_PCM_IOCTL_REWIND = _IOW('A', 0x46, sndrv_pcm_uframes_t),
+	SNDRV_PCM_IOCTL_REWIND = _IOW('A', 0x46, snd_pcm_uframes_t),
 	SNDRV_PCM_IOCTL_RESUME = _IO('A', 0x47),
 	SNDRV_PCM_IOCTL_XRUN = _IO('A', 0x48),
-	SNDRV_PCM_IOCTL_FORWARD = _IOW('A', 0x49, sndrv_pcm_uframes_t),
-	SNDRV_PCM_IOCTL_WRITEI_FRAMES = _IOW('A', 0x50, struct sndrv_xferi),
-	SNDRV_PCM_IOCTL_READI_FRAMES = _IOR('A', 0x51, struct sndrv_xferi),
-	SNDRV_PCM_IOCTL_WRITEN_FRAMES = _IOW('A', 0x52, struct sndrv_xfern),
-	SNDRV_PCM_IOCTL_READN_FRAMES = _IOR('A', 0x53, struct sndrv_xfern),
+	SNDRV_PCM_IOCTL_FORWARD = _IOW('A', 0x49, snd_pcm_uframes_t),
+	SNDRV_PCM_IOCTL_WRITEI_FRAMES = _IOW('A', 0x50, struct snd_xferi),
+	SNDRV_PCM_IOCTL_READI_FRAMES = _IOR('A', 0x51, struct snd_xferi),
+	SNDRV_PCM_IOCTL_WRITEN_FRAMES = _IOW('A', 0x52, struct snd_xfern),
+	SNDRV_PCM_IOCTL_READN_FRAMES = _IOR('A', 0x53, struct snd_xfern),
 	SNDRV_PCM_IOCTL_LINK = _IOW('A', 0x60, int),
 	SNDRV_PCM_IOCTL_UNLINK = _IO('A', 0x61),
 };
@@ -485,7 +479,7 @@ enum {
 
 #define SNDRV_RAWMIDI_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 0)
 
-enum sndrv_rawmidi_stream {
+enum {
 	SNDRV_RAWMIDI_STREAM_OUTPUT = 0,
 	SNDRV_RAWMIDI_STREAM_INPUT,
 	SNDRV_RAWMIDI_STREAM_LAST = SNDRV_RAWMIDI_STREAM_INPUT,
@@ -495,10 +489,10 @@ enum sndrv_rawmidi_stream {
 #define SNDRV_RAWMIDI_INFO_INPUT		0x00000002
 #define SNDRV_RAWMIDI_INFO_DUPLEX		0x00000004
 
-struct sndrv_rawmidi_info {
+struct snd_rawmidi_info {
 	unsigned int device;		/* RO/WR (control): device number */
 	unsigned int subdevice;		/* RO/WR (control): subdevice number */
-	enum sndrv_rawmidi_stream stream; /* WR: stream */
+	int stream;			/* WR: stream */
 	int card;			/* R: card number */
 	unsigned int flags;		/* SNDRV_RAWMIDI_INFO_XXXX */
 	unsigned char id[64];		/* ID (user selectable) */
@@ -509,16 +503,16 @@ struct sndrv_rawmidi_info {
 	unsigned char reserved[64];	/* reserved for future use */
 };
 
-struct sndrv_rawmidi_params {
-	enum sndrv_rawmidi_stream stream;
+struct snd_rawmidi_params {
+	int stream;
 	size_t buffer_size;		/* queue size in bytes */
 	size_t avail_min;		/* minimum avail bytes for wakeup */
 	unsigned int no_active_sensing: 1; /* do not send active sensing byte in close() */
 	unsigned char reserved[16];	/* reserved for future use */
 };
 
-struct sndrv_rawmidi_status {
-	enum sndrv_rawmidi_stream stream;
+struct snd_rawmidi_status {
+	int stream;
 	struct timespec tstamp;		/* Timestamp */
 	size_t avail;			/* available bytes */
 	size_t xruns;			/* count of overruns since last status (in bytes) */
@@ -527,9 +521,9 @@ struct sndrv_rawmidi_status {
 
 enum {
 	SNDRV_RAWMIDI_IOCTL_PVERSION = _IOR('W', 0x00, int),
-	SNDRV_RAWMIDI_IOCTL_INFO = _IOR('W', 0x01, struct sndrv_rawmidi_info),
-	SNDRV_RAWMIDI_IOCTL_PARAMS = _IOWR('W', 0x10, struct sndrv_rawmidi_params),
-	SNDRV_RAWMIDI_IOCTL_STATUS = _IOWR('W', 0x20, struct sndrv_rawmidi_status),
+	SNDRV_RAWMIDI_IOCTL_INFO = _IOR('W', 0x01, struct snd_rawmidi_info),
+	SNDRV_RAWMIDI_IOCTL_PARAMS = _IOWR('W', 0x10, struct snd_rawmidi_params),
+	SNDRV_RAWMIDI_IOCTL_STATUS = _IOWR('W', 0x20, struct snd_rawmidi_status),
 	SNDRV_RAWMIDI_IOCTL_DROP = _IOW('W', 0x30, int),
 	SNDRV_RAWMIDI_IOCTL_DRAIN = _IOW('W', 0x31, int),
 };
@@ -540,7 +534,7 @@ enum {
 
 #define SNDRV_TIMER_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 5)
 
-enum sndrv_timer_class {
+enum {
 	SNDRV_TIMER_CLASS_NONE = -1,
 	SNDRV_TIMER_CLASS_SLAVE = 0,
 	SNDRV_TIMER_CLASS_GLOBAL,
@@ -550,7 +544,7 @@ enum sndrv_timer_class {
 };
 
 /* slave timer classes */
-enum sndrv_timer_slave_class {
+enum {
 	SNDRV_TIMER_SCLASS_NONE = 0,
 	SNDRV_TIMER_SCLASS_APPLICATION,
 	SNDRV_TIMER_SCLASS_SEQUENCER,		/* alias */
@@ -566,16 +560,16 @@ enum sndrv_timer_slave_class {
 /* info flags */
 #define SNDRV_TIMER_FLG_SLAVE		(1<<0)	/* cannot be controlled */
 
-struct sndrv_timer_id {
-	enum sndrv_timer_class dev_class;	
-	enum sndrv_timer_slave_class dev_sclass;
+struct snd_timer_id {
+	int dev_class;	
+	int dev_sclass;
 	int card;
 	int device;
 	int subdevice;
 };
 
-struct sndrv_timer_ginfo {
-	struct sndrv_timer_id tid;	/* requested timer ID */
+struct snd_timer_ginfo {
+	struct snd_timer_id tid;	/* requested timer ID */
 	unsigned int flags;		/* timer flags - SNDRV_TIMER_FLG_* */
 	int card;			/* card number */
 	unsigned char id[64];		/* timer identification */
@@ -588,27 +582,27 @@ struct sndrv_timer_ginfo {
 	unsigned char reserved[32];
 };
 
-struct sndrv_timer_gparams {
-	struct sndrv_timer_id tid;	/* requested timer ID */
+struct snd_timer_gparams {
+	struct snd_timer_id tid;	/* requested timer ID */
 	unsigned long period_num;	/* requested precise period duration (in seconds) - numerator */
 	unsigned long period_den;	/* requested precise period duration (in seconds) - denominator */
 	unsigned char reserved[32];
 };
 
-struct sndrv_timer_gstatus {
-	struct sndrv_timer_id tid;	/* requested timer ID */
+struct snd_timer_gstatus {
+	struct snd_timer_id tid;	/* requested timer ID */
 	unsigned long resolution;	/* current period resolution in ns */
 	unsigned long resolution_num;	/* precise current period resolution (in seconds) - numerator */
 	unsigned long resolution_den;	/* precise current period resolution (in seconds) - denominator */
 	unsigned char reserved[32];
 };
 
-struct sndrv_timer_select {
-	struct sndrv_timer_id id;	/* bind to timer ID */
+struct snd_timer_select {
+	struct snd_timer_id id;	/* bind to timer ID */
 	unsigned char reserved[32];	/* reserved */
 };
 
-struct sndrv_timer_info {
+struct snd_timer_info {
 	unsigned int flags;		/* timer flags - SNDRV_TIMER_FLG_* */
 	int card;			/* card number */
 	unsigned char id[64];		/* timer identificator */
@@ -622,7 +616,7 @@ struct sndrv_timer_info {
 #define SNDRV_TIMER_PSFLG_EXCLUSIVE	(1<<1)	/* exclusive use, precise start/stop/pause/continue */
 #define SNDRV_TIMER_PSFLG_EARLY_EVENT	(1<<2)	/* write early event to the poll queue */
 
-struct sndrv_timer_params {
+struct snd_timer_params {
 	unsigned int flags;		/* flags - SNDRV_MIXER_PSFLG_* */
 	unsigned int ticks;		/* requested resolution in ticks */
 	unsigned int queue_size;	/* total size of queue (32-1024) */
@@ -631,7 +625,7 @@ struct sndrv_timer_params {
 	unsigned char reserved[60];	/* reserved */
 };
 
-struct sndrv_timer_status {
+struct snd_timer_status {
 	struct timespec tstamp;		/* Timestamp - last update */
 	unsigned int resolution;	/* current period resolution in ns */
 	unsigned int lost;		/* counter of master tick lost */
@@ -642,15 +636,15 @@ struct sndrv_timer_status {
 
 enum {
 	SNDRV_TIMER_IOCTL_PVERSION = _IOR('T', 0x00, int),
-	SNDRV_TIMER_IOCTL_NEXT_DEVICE = _IOWR('T', 0x01, struct sndrv_timer_id),
+	SNDRV_TIMER_IOCTL_NEXT_DEVICE = _IOWR('T', 0x01, struct snd_timer_id),
 	SNDRV_TIMER_IOCTL_TREAD = _IOW('T', 0x02, int),
-	SNDRV_TIMER_IOCTL_GINFO = _IOWR('T', 0x03, struct sndrv_timer_ginfo),
-	SNDRV_TIMER_IOCTL_GPARAMS = _IOW('T', 0x04, struct sndrv_timer_gparams),
-	SNDRV_TIMER_IOCTL_GSTATUS = _IOWR('T', 0x05, struct sndrv_timer_gstatus),
-	SNDRV_TIMER_IOCTL_SELECT = _IOW('T', 0x10, struct sndrv_timer_select),
-	SNDRV_TIMER_IOCTL_INFO = _IOR('T', 0x11, struct sndrv_timer_info),
-	SNDRV_TIMER_IOCTL_PARAMS = _IOW('T', 0x12, struct sndrv_timer_params),
-	SNDRV_TIMER_IOCTL_STATUS = _IOR('T', 0x14, struct sndrv_timer_status),
+	SNDRV_TIMER_IOCTL_GINFO = _IOWR('T', 0x03, struct snd_timer_ginfo),
+	SNDRV_TIMER_IOCTL_GPARAMS = _IOW('T', 0x04, struct snd_timer_gparams),
+	SNDRV_TIMER_IOCTL_GSTATUS = _IOWR('T', 0x05, struct snd_timer_gstatus),
+	SNDRV_TIMER_IOCTL_SELECT = _IOW('T', 0x10, struct snd_timer_select),
+	SNDRV_TIMER_IOCTL_INFO = _IOR('T', 0x11, struct snd_timer_info),
+	SNDRV_TIMER_IOCTL_PARAMS = _IOW('T', 0x12, struct snd_timer_params),
+	SNDRV_TIMER_IOCTL_STATUS = _IOR('T', 0x14, struct snd_timer_status),
 	/* The following four ioctls are changed since 1.0.9 due to confliction */
 	SNDRV_TIMER_IOCTL_START = _IO('T', 0xa0),
 	SNDRV_TIMER_IOCTL_STOP = _IO('T', 0xa1),
@@ -658,12 +652,12 @@ enum {
 	SNDRV_TIMER_IOCTL_PAUSE = _IO('T', 0xa3),
 };
 
-struct sndrv_timer_read {
+struct snd_timer_read {
 	unsigned int resolution;
 	unsigned int ticks;
 };
 
-enum sndrv_timer_event {
+enum {
 	SNDRV_TIMER_EVENT_RESOLUTION = 0,	/* val = resolution in ns */
 	SNDRV_TIMER_EVENT_TICK,			/* val = ticks */
 	SNDRV_TIMER_EVENT_START,		/* val = resolution in ns */
@@ -682,8 +676,8 @@ enum sndrv_timer_event {
 	SNDRV_TIMER_EVENT_MRESUME = SNDRV_TIMER_EVENT_RESUME + 10,
 };
 
-struct sndrv_timer_tread {
-	enum sndrv_timer_event event;
+struct snd_timer_tread {
+	int event;
 	struct timespec tstamp;
 	unsigned int val;
 };
@@ -696,7 +690,7 @@ struct sndrv_timer_tread {
 
 #define SNDRV_CTL_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 3)
 
-struct sndrv_ctl_card_info {
+struct snd_ctl_card_info {
 	int card;			/* card number */
 	int pad;			/* reserved for future (was type) */
 	unsigned char id[16];		/* ID of card (user selectable) */
@@ -709,27 +703,25 @@ struct sndrv_ctl_card_info {
 	unsigned char reserved[48];	/* reserved for future */
 };
 
-enum sndrv_ctl_elem_type {
-	SNDRV_CTL_ELEM_TYPE_NONE = 0,		/* invalid */
-	SNDRV_CTL_ELEM_TYPE_BOOLEAN,		/* boolean type */
-	SNDRV_CTL_ELEM_TYPE_INTEGER,		/* integer type */
-	SNDRV_CTL_ELEM_TYPE_ENUMERATED,		/* enumerated type */
-	SNDRV_CTL_ELEM_TYPE_BYTES,		/* byte array */
-	SNDRV_CTL_ELEM_TYPE_IEC958,		/* IEC958 (S/PDIF) setup */
-	SNDRV_CTL_ELEM_TYPE_INTEGER64,		/* 64-bit integer type */
-	SNDRV_CTL_ELEM_TYPE_LAST = SNDRV_CTL_ELEM_TYPE_INTEGER64,
-};
-
-enum sndrv_ctl_elem_iface {
-	SNDRV_CTL_ELEM_IFACE_CARD = 0,		/* global control */
-	SNDRV_CTL_ELEM_IFACE_HWDEP,		/* hardware dependent device */
-	SNDRV_CTL_ELEM_IFACE_MIXER,		/* virtual mixer device */
-	SNDRV_CTL_ELEM_IFACE_PCM,		/* PCM device */
-	SNDRV_CTL_ELEM_IFACE_RAWMIDI,		/* RawMidi device */
-	SNDRV_CTL_ELEM_IFACE_TIMER,		/* timer device */
-	SNDRV_CTL_ELEM_IFACE_SEQUENCER,		/* sequencer client */
-	SNDRV_CTL_ELEM_IFACE_LAST = SNDRV_CTL_ELEM_IFACE_SEQUENCER,
-};
+typedef int __bitwise snd_ctl_elem_type_t;
+#define	SNDRV_CTL_ELEM_TYPE_NONE	((__force snd_ctl_elem_type_t) 0) /* invalid */
+#define	SNDRV_CTL_ELEM_TYPE_BOOLEAN	((__force snd_ctl_elem_type_t) 1) /* boolean type */
+#define	SNDRV_CTL_ELEM_TYPE_INTEGER	((__force snd_ctl_elem_type_t) 2) /* integer type */
+#define	SNDRV_CTL_ELEM_TYPE_ENUMERATED	((__force snd_ctl_elem_type_t) 3) /* enumerated type */
+#define	SNDRV_CTL_ELEM_TYPE_BYTES	((__force snd_ctl_elem_type_t) 4) /* byte array */
+#define	SNDRV_CTL_ELEM_TYPE_IEC958	((__force snd_ctl_elem_type_t) 5) /* IEC958 (S/PDIF) setup */
+#define	SNDRV_CTL_ELEM_TYPE_INTEGER64	((__force snd_ctl_elem_type_t) 6) /* 64-bit integer type */
+#define	SNDRV_CTL_ELEM_TYPE_LAST	SNDRV_CTL_ELEM_TYPE_INTEGER64
+
+typedef int __bitwise snd_ctl_elem_iface_t;
+#define	SNDRV_CTL_ELEM_IFACE_CARD	((__force snd_ctl_elem_iface_t) 0) /* global control */
+#define	SNDRV_CTL_ELEM_IFACE_HWDEP	((__force snd_ctl_elem_iface_t) 1) /* hardware dependent device */
+#define	SNDRV_CTL_ELEM_IFACE_MIXER	((__force snd_ctl_elem_iface_t) 2) /* virtual mixer device */
+#define	SNDRV_CTL_ELEM_IFACE_PCM	((__force snd_ctl_elem_iface_t) 3) /* PCM device */
+#define	SNDRV_CTL_ELEM_IFACE_RAWMIDI	((__force snd_ctl_elem_iface_t) 4) /* RawMidi device */
+#define	SNDRV_CTL_ELEM_IFACE_TIMER	((__force snd_ctl_elem_iface_t) 5) /* timer device */
+#define	SNDRV_CTL_ELEM_IFACE_SEQUENCER	((__force snd_ctl_elem_iface_t) 6) /* sequencer client */
+#define	SNDRV_CTL_ELEM_IFACE_LAST	SNDRV_CTL_ELEM_IFACE_SEQUENCER
 
 #define SNDRV_CTL_ELEM_ACCESS_READ		(1<<0)
 #define SNDRV_CTL_ELEM_ACCESS_WRITE		(1<<1)
@@ -751,27 +743,27 @@ enum sndrv_ctl_elem_iface {
 #define SNDRV_CTL_POWER_D3hot		(SNDRV_CTL_POWER_D3|0x0000)	/* Off, with power */
 #define SNDRV_CTL_POWER_D3cold		(SNDRV_CTL_POWER_D3|0x0001)	/* Off, without power */
 
-struct sndrv_ctl_elem_id {
+struct snd_ctl_elem_id {
 	unsigned int numid;		/* numeric identifier, zero = invalid */
-	enum sndrv_ctl_elem_iface iface; /* interface identifier */
+	snd_ctl_elem_iface_t iface;	/* interface identifier */
 	unsigned int device;		/* device/client number */
 	unsigned int subdevice;		/* subdevice (substream) number */
         unsigned char name[44];		/* ASCII name of item */
 	unsigned int index;		/* index of item */
 };
 
-struct sndrv_ctl_elem_list {
+struct snd_ctl_elem_list {
 	unsigned int offset;		/* W: first element ID to get */
 	unsigned int space;		/* W: count of element IDs to get */
 	unsigned int used;		/* R: count of element IDs set */
 	unsigned int count;		/* R: count of all elements */
-	struct sndrv_ctl_elem_id __user *pids; /* R: IDs */
+	struct snd_ctl_elem_id __user *pids; /* R: IDs */
 	unsigned char reserved[50];
 };
 
-struct sndrv_ctl_elem_info {
-	struct sndrv_ctl_elem_id id;	/* W: element ID */
-	enum sndrv_ctl_elem_type type;	/* R: value type - SNDRV_CTL_ELEM_TYPE_* */
+struct snd_ctl_elem_info {
+	struct snd_ctl_elem_id id;	/* W: element ID */
+	snd_ctl_elem_type_t type;	/* R: value type - SNDRV_CTL_ELEM_TYPE_* */
 	unsigned int access;		/* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */
 	unsigned int count;		/* count of values */
 	pid_t owner;			/* owner's PID of this control */
@@ -800,8 +792,8 @@ struct sndrv_ctl_elem_info {
 	unsigned char reserved[64-4*sizeof(unsigned short)];
 };
 
-struct sndrv_ctl_elem_value {
-	struct sndrv_ctl_elem_id id;	/* W: element ID */
+struct snd_ctl_elem_value {
+	struct snd_ctl_elem_id id;	/* W: element ID */
 	unsigned int indirect: 1;	/* W: use indirect pointer (xxx_ptr member) */
         union {
 		union {
@@ -820,7 +812,7 @@ struct sndrv_ctl_elem_value {
 			unsigned char data[512];
 			unsigned char *data_ptr;
 		} bytes;
-		struct sndrv_aes_iec958 iec958;
+		struct snd_aes_iec958 iec958;
         } value;                /* RO */
 	struct timespec tstamp;
         unsigned char reserved[128-sizeof(struct timespec)];
@@ -828,24 +820,24 @@ struct sndrv_ctl_elem_value {
 
 enum {
 	SNDRV_CTL_IOCTL_PVERSION = _IOR('U', 0x00, int),
-	SNDRV_CTL_IOCTL_CARD_INFO = _IOR('U', 0x01, struct sndrv_ctl_card_info),
-	SNDRV_CTL_IOCTL_ELEM_LIST = _IOWR('U', 0x10, struct sndrv_ctl_elem_list),
-	SNDRV_CTL_IOCTL_ELEM_INFO = _IOWR('U', 0x11, struct sndrv_ctl_elem_info),
-	SNDRV_CTL_IOCTL_ELEM_READ = _IOWR('U', 0x12, struct sndrv_ctl_elem_value),
-	SNDRV_CTL_IOCTL_ELEM_WRITE = _IOWR('U', 0x13, struct sndrv_ctl_elem_value),
-	SNDRV_CTL_IOCTL_ELEM_LOCK = _IOW('U', 0x14, struct sndrv_ctl_elem_id),
-	SNDRV_CTL_IOCTL_ELEM_UNLOCK = _IOW('U', 0x15, struct sndrv_ctl_elem_id),
+	SNDRV_CTL_IOCTL_CARD_INFO = _IOR('U', 0x01, struct snd_ctl_card_info),
+	SNDRV_CTL_IOCTL_ELEM_LIST = _IOWR('U', 0x10, struct snd_ctl_elem_list),
+	SNDRV_CTL_IOCTL_ELEM_INFO = _IOWR('U', 0x11, struct snd_ctl_elem_info),
+	SNDRV_CTL_IOCTL_ELEM_READ = _IOWR('U', 0x12, struct snd_ctl_elem_value),
+	SNDRV_CTL_IOCTL_ELEM_WRITE = _IOWR('U', 0x13, struct snd_ctl_elem_value),
+	SNDRV_CTL_IOCTL_ELEM_LOCK = _IOW('U', 0x14, struct snd_ctl_elem_id),
+	SNDRV_CTL_IOCTL_ELEM_UNLOCK = _IOW('U', 0x15, struct snd_ctl_elem_id),
 	SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS = _IOWR('U', 0x16, int),
-	SNDRV_CTL_IOCTL_ELEM_ADD = _IOWR('U', 0x17, struct sndrv_ctl_elem_info),
-	SNDRV_CTL_IOCTL_ELEM_REPLACE = _IOWR('U', 0x18, struct sndrv_ctl_elem_info),
-	SNDRV_CTL_IOCTL_ELEM_REMOVE = _IOWR('U', 0x19, struct sndrv_ctl_elem_id),
+	SNDRV_CTL_IOCTL_ELEM_ADD = _IOWR('U', 0x17, struct snd_ctl_elem_info),
+	SNDRV_CTL_IOCTL_ELEM_REPLACE = _IOWR('U', 0x18, struct snd_ctl_elem_info),
+	SNDRV_CTL_IOCTL_ELEM_REMOVE = _IOWR('U', 0x19, struct snd_ctl_elem_id),
 	SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE = _IOWR('U', 0x20, int),
-	SNDRV_CTL_IOCTL_HWDEP_INFO = _IOR('U', 0x21, struct sndrv_hwdep_info),
+	SNDRV_CTL_IOCTL_HWDEP_INFO = _IOR('U', 0x21, struct snd_hwdep_info),
 	SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE = _IOR('U', 0x30, int),
-	SNDRV_CTL_IOCTL_PCM_INFO = _IOWR('U', 0x31, struct sndrv_pcm_info),
+	SNDRV_CTL_IOCTL_PCM_INFO = _IOWR('U', 0x31, struct snd_pcm_info),
 	SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE = _IOW('U', 0x32, int),
 	SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE = _IOWR('U', 0x40, int),
-	SNDRV_CTL_IOCTL_RAWMIDI_INFO = _IOWR('U', 0x41, struct sndrv_rawmidi_info),
+	SNDRV_CTL_IOCTL_RAWMIDI_INFO = _IOWR('U', 0x41, struct snd_rawmidi_info),
 	SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE = _IOW('U', 0x42, int),
 	SNDRV_CTL_IOCTL_POWER = _IOWR('U', 0xd0, int),
 	SNDRV_CTL_IOCTL_POWER_STATE = _IOR('U', 0xd1, int),
@@ -865,12 +857,12 @@ enum sndrv_ctl_event_type {
 #define SNDRV_CTL_EVENT_MASK_ADD	(1<<2)	/* element was added */
 #define SNDRV_CTL_EVENT_MASK_REMOVE	(~0U)	/* element was removed */
 
-struct sndrv_ctl_event {
-	enum sndrv_ctl_event_type type;	/* event type - SNDRV_CTL_EVENT_* */
+struct snd_ctl_event {
+	int type;	/* event type - SNDRV_CTL_EVENT_* */
 	union {
 		struct {
 			unsigned int mask;
-			struct sndrv_ctl_elem_id id;
+			struct snd_ctl_elem_id id;
 		} elem;
                 unsigned char data8[60];
         } data;
@@ -898,14 +890,14 @@ struct sndrv_ctl_event {
  *
  */
 
-struct sndrv_xferv {
+struct snd_xferv {
 	const struct iovec *vector;
 	unsigned long count;
 };
 
 enum {
-	SNDRV_IOCTL_READV = _IOW('K', 0x00, struct sndrv_xferv),
-	SNDRV_IOCTL_WRITEV = _IOW('K', 0x01, struct sndrv_xferv),
+	SNDRV_IOCTL_READV = _IOW('K', 0x00, struct snd_xferv),
+	SNDRV_IOCTL_WRITEV = _IOW('K', 0x01, struct snd_xferv),
 };
 
 #endif /* __SOUND_ASOUND_H */
diff --git a/include/sound/core.h b/include/sound/core.h
index 2be65ad2fd8..f867433e65f 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -28,13 +28,6 @@
 #include <linux/workqueue.h>		/* struct workqueue_struct */
 #include <linux/pm.h>			/* pm_message_t */
 
-/* Typedef's */
-typedef struct sndrv_interval snd_interval_t;
-typedef enum sndrv_card_type snd_card_type;
-typedef struct sndrv_xferi snd_xferi_t;
-typedef struct sndrv_xfern snd_xfern_t;
-typedef struct sndrv_xferv snd_xferv_t;
-
 /* forward declarations */
 #ifdef CONFIG_PCI
 struct pci_dev;
@@ -47,76 +40,50 @@ struct sbus_dev;
 
 #define SNDRV_DEV_TYPE_RANGE_SIZE		0x1000
 
-typedef enum {
-	SNDRV_DEV_TOPLEVEL =		(0*SNDRV_DEV_TYPE_RANGE_SIZE),
-	SNDRV_DEV_CONTROL,
-	SNDRV_DEV_LOWLEVEL_PRE,
-	SNDRV_DEV_LOWLEVEL_NORMAL =	(1*SNDRV_DEV_TYPE_RANGE_SIZE),
-	SNDRV_DEV_PCM,
-	SNDRV_DEV_RAWMIDI,
-	SNDRV_DEV_TIMER,
-	SNDRV_DEV_SEQUENCER,
-	SNDRV_DEV_HWDEP,
-	SNDRV_DEV_INFO,
-	SNDRV_DEV_BUS,
-	SNDRV_DEV_CODEC,
-	SNDRV_DEV_LOWLEVEL =		(2*SNDRV_DEV_TYPE_RANGE_SIZE)
-} snd_device_type_t;
-
-typedef enum {
-	SNDRV_DEV_BUILD,
-	SNDRV_DEV_REGISTERED,
-	SNDRV_DEV_DISCONNECTED
-} snd_device_state_t;
-
-typedef enum {
-	SNDRV_DEV_CMD_PRE = 0,
-	SNDRV_DEV_CMD_NORMAL = 1,
-	SNDRV_DEV_CMD_POST = 2
-} snd_device_cmd_t;
-
-typedef struct _snd_card snd_card_t;
-typedef struct _snd_device snd_device_t;
-
-typedef int (snd_dev_free_t)(snd_device_t *device);
-typedef int (snd_dev_register_t)(snd_device_t *device);
-typedef int (snd_dev_disconnect_t)(snd_device_t *device);
-typedef int (snd_dev_unregister_t)(snd_device_t *device);
-
-typedef struct {
-	snd_dev_free_t *dev_free;
-	snd_dev_register_t *dev_register;
-	snd_dev_disconnect_t *dev_disconnect;
-	snd_dev_unregister_t *dev_unregister;
-} snd_device_ops_t;
-
-struct _snd_device {
+typedef int __bitwise snd_device_type_t;
+#define	SNDRV_DEV_TOPLEVEL	((__force snd_device_type_t) 0)
+#define	SNDRV_DEV_CONTROL	((__force snd_device_type_t) 1)
+#define	SNDRV_DEV_LOWLEVEL_PRE	((__force snd_device_type_t) 2)
+#define	SNDRV_DEV_LOWLEVEL_NORMAL ((__force snd_device_type_t) 0x1000)
+#define	SNDRV_DEV_PCM		((__force snd_device_type_t) 0x1001)
+#define	SNDRV_DEV_RAWMIDI	((__force snd_device_type_t) 0x1002)
+#define	SNDRV_DEV_TIMER		((__force snd_device_type_t) 0x1003)
+#define	SNDRV_DEV_SEQUENCER	((__force snd_device_type_t) 0x1004)
+#define	SNDRV_DEV_HWDEP		((__force snd_device_type_t) 0x1005)
+#define	SNDRV_DEV_INFO		((__force snd_device_type_t) 0x1006)
+#define	SNDRV_DEV_BUS		((__force snd_device_type_t) 0x1007)
+#define	SNDRV_DEV_CODEC		((__force snd_device_type_t) 0x1008)
+#define	SNDRV_DEV_LOWLEVEL	((__force snd_device_type_t) 0x2000)
+
+typedef int __bitwise snd_device_state_t;
+#define	SNDRV_DEV_BUILD		((__force snd_device_state_t) 0)
+#define	SNDRV_DEV_REGISTERED	((__force snd_device_state_t) 1)
+#define	SNDRV_DEV_DISCONNECTED	((__force snd_device_state_t) 2)
+
+typedef int __bitwise snd_device_cmd_t;
+#define	SNDRV_DEV_CMD_PRE	((__force snd_device_cmd_t) 0)
+#define	SNDRV_DEV_CMD_NORMAL	((__force snd_device_cmd_t) 1)	
+#define	SNDRV_DEV_CMD_POST	((__force snd_device_cmd_t) 2)
+
+struct snd_device;
+
+struct snd_device_ops {
+	int (*dev_free)(struct snd_device *dev);
+	int (*dev_register)(struct snd_device *dev);
+	int (*dev_disconnect)(struct snd_device *dev);
+	int (*dev_unregister)(struct snd_device *dev);
+};
+
+struct snd_device {
 	struct list_head list;		/* list of registered devices */
-	snd_card_t *card;		/* card which holds this device */
+	struct snd_card *card;		/* card which holds this device */
 	snd_device_state_t state;	/* state of the device */
 	snd_device_type_t type;		/* device type */
 	void *device_data;		/* device structure */
-	snd_device_ops_t *ops;		/* operations */
+	struct snd_device_ops *ops;	/* operations */
 };
 
-#define snd_device(n) list_entry(n, snd_device_t, list)
-
-/* various typedefs */
-
-typedef struct snd_info_entry snd_info_entry_t;
-typedef struct _snd_pcm snd_pcm_t;
-typedef struct _snd_pcm_str snd_pcm_str_t;
-typedef struct _snd_pcm_substream snd_pcm_substream_t;
-typedef struct _snd_mixer snd_kmixer_t;
-typedef struct _snd_rawmidi snd_rawmidi_t;
-typedef struct _snd_ctl_file snd_ctl_file_t;
-typedef struct _snd_kcontrol snd_kcontrol_t;
-typedef struct _snd_timer snd_timer_t;
-typedef struct _snd_timer_instance snd_timer_instance_t;
-typedef struct _snd_hwdep snd_hwdep_t;
-#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
-typedef struct _snd_oss_mixer snd_mixer_oss_t;
-#endif
+#define snd_device(n) list_entry(n, struct snd_device, list)
 
 /* monitor files for graceful shutdown (hotplug) */
 
@@ -129,7 +96,7 @@ struct snd_shutdown_f_ops;	/* define it later in init.c */
 
 /* main structure for soundcard */
 
-struct _snd_card {
+struct snd_card {
 	int number;			/* number of soundcard (index to
 								snd_cards) */
 
@@ -143,7 +110,7 @@ struct _snd_card {
 	struct module *module;		/* top-level module */
 
 	void *private_data;		/* private data for soundcard */
-	void (*private_free) (snd_card_t *card); /* callback for freeing of
+	void (*private_free) (struct snd_card *card); /* callback for freeing of
 								private data */
 	struct list_head devices;	/* devices */
 
@@ -155,8 +122,8 @@ struct _snd_card {
 	struct list_head controls;	/* all controls for this card */
 	struct list_head ctl_files;	/* active control files */
 
-	snd_info_entry_t *proc_root;	/* root for soundcard specific files */
-	snd_info_entry_t *proc_id;	/* the card id */
+	struct snd_info_entry *proc_root;	/* root for soundcard specific files */
+	struct snd_info_entry *proc_id;	/* the card id */
 	struct proc_dir_entry *proc_root_link;	/* number link to real id */
 
 	struct snd_monitor_file *files; /* all files associated to this card */
@@ -172,8 +139,8 @@ struct _snd_card {
 #endif
 
 #ifdef CONFIG_PM
-	int (*pm_suspend)(snd_card_t *card, pm_message_t state);
-	int (*pm_resume)(snd_card_t *card);
+	int (*pm_suspend)(struct snd_card *card, pm_message_t state);
+	int (*pm_resume)(struct snd_card *card);
 	void *pm_private_data;
 	unsigned int power_state;	/* power state */
 	struct semaphore power_lock;	/* power lock */
@@ -181,43 +148,43 @@ struct _snd_card {
 #endif
 
 #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
-	snd_mixer_oss_t *mixer_oss;
+	struct snd_mixer_oss *mixer_oss;
 	int mixer_oss_change_count;
 #endif
 };
 
 #ifdef CONFIG_PM
-static inline void snd_power_lock(snd_card_t *card)
+static inline void snd_power_lock(struct snd_card *card)
 {
 	down(&card->power_lock);
 }
 
-static inline void snd_power_unlock(snd_card_t *card)
+static inline void snd_power_unlock(struct snd_card *card)
 {
 	up(&card->power_lock);
 }
 
-static inline unsigned int snd_power_get_state(snd_card_t *card)
+static inline unsigned int snd_power_get_state(struct snd_card *card)
 {
 	return card->power_state;
 }
 
-static inline void snd_power_change_state(snd_card_t *card, unsigned int state)
+static inline void snd_power_change_state(struct snd_card *card, unsigned int state)
 {
 	card->power_state = state;
 	wake_up(&card->power_sleep);
 }
 
 /* init.c */
-int snd_power_wait(snd_card_t *card, unsigned int power_state, struct file *file);
+int snd_power_wait(struct snd_card *card, unsigned int power_state, struct file *file);
 
-int snd_card_set_pm_callback(snd_card_t *card,
-			     int (*suspend)(snd_card_t *, pm_message_t),
-			     int (*resume)(snd_card_t *),
+int snd_card_set_pm_callback(struct snd_card *card,
+			     int (*suspend)(struct snd_card *, pm_message_t),
+			     int (*resume)(struct snd_card *),
 			     void *private_data);
-int snd_card_set_generic_pm_callback(snd_card_t *card,
-				     int (*suspend)(snd_card_t *, pm_message_t),
-				     int (*resume)(snd_card_t *),
+int snd_card_set_generic_pm_callback(struct snd_card *card,
+				     int (*suspend)(struct snd_card *, pm_message_t),
+				     int (*resume)(struct snd_card *),
 				     void *private_data);
 #define snd_card_set_isa_pm_callback(card,suspend,resume,data) \
 	snd_card_set_generic_pm_callback(card, suspend, resume, data)
@@ -231,7 +198,7 @@ int snd_card_pci_resume(struct pci_dev *dev);
 
 #define snd_power_lock(card)		do { (void)(card); } while (0)
 #define snd_power_unlock(card)		do { (void)(card); } while (0)
-static inline int snd_power_wait(snd_card_t *card, unsigned int state, struct file *file) { return 0; }
+static inline int snd_power_wait(struct snd_card *card, unsigned int state, struct file *file) { return 0; }
 #define snd_power_get_state(card)	SNDRV_CTL_POWER_D0
 #define snd_power_change_state(card, state)	do { (void)(card); } while (0)
 #define snd_card_set_pm_callback(card,suspend,resume,data)
@@ -241,7 +208,7 @@ static inline int snd_power_wait(snd_card_t *card, unsigned int state, struct fi
 
 #endif /* CONFIG_PM */
 
-struct _snd_minor {
+struct snd_minor {
 	struct list_head list;		/* list of all minors per card */
 	int number;			/* minor number */
 	int device;			/* device number */
@@ -251,8 +218,6 @@ struct _snd_minor {
 								structure) */
 };
 
-typedef struct _snd_minor snd_minor_t;
-
 /* sound.c */
 
 extern int snd_major;
@@ -260,12 +225,12 @@ extern int snd_ecards_limit;
 
 void snd_request_card(int card);
 
-int snd_register_device(int type, snd_card_t *card, int dev, snd_minor_t *reg, const char *name);
-int snd_unregister_device(int type, snd_card_t *card, int dev);
+int snd_register_device(int type, struct snd_card *card, int dev, struct snd_minor *reg, const char *name);
+int snd_unregister_device(int type, struct snd_card *card, int dev);
 
 #ifdef CONFIG_SND_OSSEMUL
-int snd_register_oss_device(int type, snd_card_t *card, int dev, snd_minor_t *reg, const char *name);
-int snd_unregister_oss_device(int type, snd_card_t *card, int dev);
+int snd_register_oss_device(int type, struct snd_card *card, int dev, struct snd_minor *reg, const char *name);
+int snd_unregister_oss_device(int type, struct snd_card *card, int dev);
 #endif
 
 int snd_minor_info_init(void);
@@ -291,43 +256,43 @@ int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size
 /* init.c */
 
 extern unsigned int snd_cards_lock;
-extern snd_card_t *snd_cards[SNDRV_CARDS];
+extern struct snd_card *snd_cards[SNDRV_CARDS];
 extern rwlock_t snd_card_rwlock;
 #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
 #define SND_MIXER_OSS_NOTIFY_REGISTER	0
 #define SND_MIXER_OSS_NOTIFY_DISCONNECT	1
 #define SND_MIXER_OSS_NOTIFY_FREE	2
-extern int (*snd_mixer_oss_notify_callback)(snd_card_t *card, int cmd);
+extern int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int cmd);
 #endif
 
-snd_card_t *snd_card_new(int idx, const char *id,
+struct snd_card *snd_card_new(int idx, const char *id,
 			 struct module *module, int extra_size);
-int snd_card_disconnect(snd_card_t *card);
-int snd_card_free(snd_card_t *card);
-int snd_card_free_in_thread(snd_card_t *card);
-int snd_card_register(snd_card_t *card);
+int snd_card_disconnect(struct snd_card *card);
+int snd_card_free(struct snd_card *card);
+int snd_card_free_in_thread(struct snd_card *card);
+int snd_card_register(struct snd_card *card);
 int snd_card_info_init(void);
 int snd_card_info_done(void);
-int snd_component_add(snd_card_t *card, const char *component);
-int snd_card_file_add(snd_card_t *card, struct file *file);
-int snd_card_file_remove(snd_card_t *card, struct file *file);
+int snd_component_add(struct snd_card *card, const char *component);
+int snd_card_file_add(struct snd_card *card, struct file *file);
+int snd_card_file_remove(struct snd_card *card, struct file *file);
 
 #ifndef snd_card_set_dev
 #define snd_card_set_dev(card,devptr) ((card)->dev = (devptr))
 #endif
 /* register a generic device (for ISA, etc) */
-int snd_card_set_generic_dev(snd_card_t *card);
+int snd_card_set_generic_dev(struct snd_card *card);
 
 /* device.c */
 
-int snd_device_new(snd_card_t *card, snd_device_type_t type,
-		   void *device_data, snd_device_ops_t *ops);
-int snd_device_register(snd_card_t *card, void *device_data);
-int snd_device_register_all(snd_card_t *card);
-int snd_device_disconnect(snd_card_t *card, void *device_data);
-int snd_device_disconnect_all(snd_card_t *card);
-int snd_device_free(snd_card_t *card, void *device_data);
-int snd_device_free_all(snd_card_t *card, snd_device_cmd_t cmd);
+int snd_device_new(struct snd_card *card, snd_device_type_t type,
+		   void *device_data, struct snd_device_ops *ops);
+int snd_device_register(struct snd_card *card, void *device_data);
+int snd_device_register_all(struct snd_card *card);
+int snd_device_disconnect(struct snd_card *card, void *device_data);
+int snd_device_disconnect_all(struct snd_card *card);
+int snd_device_free(struct snd_card *card, void *device_data);
+int snd_device_free_all(struct snd_card *card, snd_device_cmd_t cmd);
 
 /* isadma.c */
 
@@ -443,4 +408,6 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
 #endif
 #endif
 
+#include "typedefs.h"
+
 #endif /* __SOUND_CORE_H */
diff --git a/sound/core/device.c b/sound/core/device.c
index 1f509f56e60..afa8cc7fb05 100644
--- a/sound/core/device.c
+++ b/sound/core/device.c
@@ -41,10 +41,10 @@
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_device_new(snd_card_t *card, snd_device_type_t type,
-		   void *device_data, snd_device_ops_t *ops)
+int snd_device_new(struct snd_card *card, snd_device_type_t type,
+		   void *device_data, struct snd_device_ops *ops)
 {
-	snd_device_t *dev;
+	struct snd_device *dev;
 
 	snd_assert(card != NULL, return -ENXIO);
 	snd_assert(device_data != NULL, return -ENXIO);
@@ -73,10 +73,10 @@ int snd_device_new(snd_card_t *card, snd_device_type_t type,
  * Returns zero if successful, or a negative error code on failure or if the
  * device not found.
  */
-int snd_device_free(snd_card_t *card, void *device_data)
+int snd_device_free(struct snd_card *card, void *device_data)
 {
 	struct list_head *list;
-	snd_device_t *dev;
+	struct snd_device *dev;
 	
 	snd_assert(card != NULL, return -ENXIO);
 	snd_assert(device_data != NULL, return -ENXIO);
@@ -86,7 +86,8 @@ int snd_device_free(snd_card_t *card, void *device_data)
 			continue;
 		/* unlink */
 		list_del(&dev->list);
-		if ((dev->state == SNDRV_DEV_REGISTERED || dev->state == SNDRV_DEV_DISCONNECTED) &&
+		if ((dev->state == SNDRV_DEV_REGISTERED ||
+		     dev->state == SNDRV_DEV_DISCONNECTED) &&
 		    dev->ops->dev_unregister) {
 			if (dev->ops->dev_unregister(dev))
 				snd_printk(KERN_ERR "device unregister failure\n");
@@ -99,7 +100,8 @@ int snd_device_free(snd_card_t *card, void *device_data)
 		kfree(dev);
 		return 0;
 	}
-	snd_printd("device free %p (from %p), not found\n", device_data, __builtin_return_address(0));
+	snd_printd("device free %p (from %p), not found\n", device_data,
+		   __builtin_return_address(0));
 	return -ENXIO;
 }
 
@@ -116,10 +118,10 @@ int snd_device_free(snd_card_t *card, void *device_data)
  * Returns zero if successful, or a negative error code on failure or if the
  * device not found.
  */
-int snd_device_disconnect(snd_card_t *card, void *device_data)
+int snd_device_disconnect(struct snd_card *card, void *device_data)
 {
 	struct list_head *list;
-	snd_device_t *dev;
+	struct snd_device *dev;
 
 	snd_assert(card != NULL, return -ENXIO);
 	snd_assert(device_data != NULL, return -ENXIO);
@@ -127,14 +129,16 @@ int snd_device_disconnect(snd_card_t *card, void *device_data)
 		dev = snd_device(list);
 		if (dev->device_data != device_data)
 			continue;
-		if (dev->state == SNDRV_DEV_REGISTERED && dev->ops->dev_disconnect) {
+		if (dev->state == SNDRV_DEV_REGISTERED &&
+		    dev->ops->dev_disconnect) {
 			if (dev->ops->dev_disconnect(dev))
 				snd_printk(KERN_ERR "device disconnect failure\n");
 			dev->state = SNDRV_DEV_DISCONNECTED;
 		}
 		return 0;
 	}
-	snd_printd("device disconnect %p (from %p), not found\n", device_data, __builtin_return_address(0));
+	snd_printd("device disconnect %p (from %p), not found\n", device_data,
+		   __builtin_return_address(0));
 	return -ENXIO;
 }
 
@@ -151,10 +155,10 @@ int snd_device_disconnect(snd_card_t *card, void *device_data)
  * Returns zero if successful, or a negative error code on failure or if the
  * device not found.
  */
-int snd_device_register(snd_card_t *card, void *device_data)
+int snd_device_register(struct snd_card *card, void *device_data)
 {
 	struct list_head *list;
-	snd_device_t *dev;
+	struct snd_device *dev;
 	int err;
 
 	snd_assert(card != NULL, return -ENXIO);
@@ -179,10 +183,10 @@ int snd_device_register(snd_card_t *card, void *device_data)
  * register all the devices on the card.
  * called from init.c
  */
-int snd_device_register_all(snd_card_t *card)
+int snd_device_register_all(struct snd_card *card)
 {
 	struct list_head *list;
-	snd_device_t *dev;
+	struct snd_device *dev;
 	int err;
 	
 	snd_assert(card != NULL, return -ENXIO);
@@ -201,9 +205,9 @@ int snd_device_register_all(snd_card_t *card)
  * disconnect all the devices on the card.
  * called from init.c
  */
-int snd_device_disconnect_all(snd_card_t *card)
+int snd_device_disconnect_all(struct snd_card *card)
 {
-	snd_device_t *dev;
+	struct snd_device *dev;
 	struct list_head *list;
 	int err = 0;
 
@@ -220,9 +224,9 @@ int snd_device_disconnect_all(snd_card_t *card)
  * release all the devices on the card.
  * called from init.c
  */
-int snd_device_free_all(snd_card_t *card, snd_device_cmd_t cmd)
+int snd_device_free_all(struct snd_card *card, snd_device_cmd_t cmd)
 {
-	snd_device_t *dev;
+	struct snd_device *dev;
 	struct list_head *list;
 	int err;
 	unsigned int range_low, range_high;
diff --git a/sound/core/init.c b/sound/core/init.c
index 33813f92ab5..dca64d199cb 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -40,14 +40,15 @@ struct snd_shutdown_f_ops {
 };
 
 unsigned int snd_cards_lock = 0;	/* locked for registering/using */
-snd_card_t *snd_cards[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = NULL};
+struct snd_card *snd_cards[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = NULL};
 DEFINE_RWLOCK(snd_card_rwlock);
 
 #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
-int (*snd_mixer_oss_notify_callback)(snd_card_t *card, int free_flag);
+int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int free_flag);
 #endif
 
-static void snd_card_id_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void snd_card_id_read(struct snd_info_entry *entry,
+			     struct snd_info_buffer *buffer)
 {
 	snd_iprintf(buffer, "%s\n", entry->card->id);
 }
@@ -63,13 +64,13 @@ static void snd_card_free_thread(void * __card);
  *
  *  Creates and initializes a soundcard structure.
  *
- *  Returns kmallocated snd_card_t structure. Creates the ALSA control interface
+ *  Returns kmallocated snd_card structure. Creates the ALSA control interface
  *  (which is blocked until snd_card_register function is called).
  */
-snd_card_t *snd_card_new(int idx, const char *xid,
+struct snd_card *snd_card_new(int idx, const char *xid,
 			 struct module *module, int extra_size)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	int err;
 
 	if (extra_size < 0)
@@ -132,7 +133,7 @@ snd_card_t *snd_card_new(int idx, const char *xid,
 		goto __error_ctl;
 	}
 	if (extra_size > 0)
-		card->private_data = (char *)card + sizeof(snd_card_t);
+		card->private_data = (char *)card + sizeof(struct snd_card);
 	return card;
 
       __error_ctl:
@@ -158,7 +159,7 @@ static unsigned int snd_disconnect_poll(struct file * file, poll_table * wait)
  *  Note: The current implementation replaces all active file->f_op with special
  *        dummy file operations (they do nothing except release).
  */
-int snd_card_disconnect(snd_card_t * card)
+int snd_card_disconnect(struct snd_card *card)
 {
 	struct snd_monitor_file *mfile;
 	struct file *file;
@@ -229,7 +230,7 @@ int snd_card_disconnect(snd_card_t * card)
 }
 
 #ifdef CONFIG_SND_GENERIC_DRIVER
-static void snd_generic_device_unregister(snd_card_t *card);
+static void snd_generic_device_unregister(struct snd_card *card);
 #else
 #define snd_generic_device_unregister(x) /*NOP*/
 #endif
@@ -245,7 +246,7 @@ static void snd_generic_device_unregister(snd_card_t *card);
  *  Returns zero. Frees all associated devices and frees the control
  *  interface associated to given soundcard.
  */
-int snd_card_free(snd_card_t * card)
+int snd_card_free(struct snd_card *card)
 {
 	struct snd_shutdown_f_ops *s_f_ops;
 
@@ -300,7 +301,7 @@ int snd_card_free(snd_card_t * card)
 
 static void snd_card_free_thread(void * __card)
 {
-	snd_card_t *card = __card;
+	struct snd_card *card = __card;
 	struct module * module = card->module;
 
 	if (!try_module_get(module)) {
@@ -327,7 +328,7 @@ static void snd_card_free_thread(void * __card)
  *  
  *  Returns - zero otherwise a negative error code if the start of thread failed.
  */
-int snd_card_free_in_thread(snd_card_t * card)
+int snd_card_free_in_thread(struct snd_card *card)
 {
 	if (card->files == NULL) {
 		snd_card_free(card);
@@ -343,7 +344,7 @@ int snd_card_free_in_thread(snd_card_t * card)
 	return -EFAULT;
 }
 
-static void choose_default_id(snd_card_t * card)
+static void choose_default_id(struct snd_card *card)
 {
 	int i, len, idx_flag = 0, loops = 8;
 	char *id, *spos;
@@ -415,10 +416,10 @@ static void choose_default_id(snd_card_t * card)
  *
  *  Returns zero otherwise a negative error code if the registrain failed.
  */
-int snd_card_register(snd_card_t * card)
+int snd_card_register(struct snd_card *card)
 {
 	int err;
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	snd_assert(card != NULL, return -EINVAL);
 	if ((err = snd_device_register_all(card)) < 0)
@@ -456,12 +457,12 @@ int snd_card_register(snd_card_t * card)
 	return 0;
 }
 
-static snd_info_entry_t *snd_card_info_entry = NULL;
+static struct snd_info_entry *snd_card_info_entry = NULL;
 
-static void snd_card_info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void snd_card_info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
 {
 	int idx, count;
-	snd_card_t *card;
+	struct snd_card *card;
 
 	for (idx = count = 0; idx < SNDRV_CARDS; idx++) {
 		read_lock(&snd_card_rwlock);
@@ -483,10 +484,10 @@ static void snd_card_info_read(snd_info_entry_t *entry, snd_info_buffer_t * buff
 
 #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
 
-void snd_card_info_read_oss(snd_info_buffer_t * buffer)
+void snd_card_info_read_oss(struct snd_info_buffer *buffer)
 {
 	int idx, count;
-	snd_card_t *card;
+	struct snd_card *card;
 
 	for (idx = count = 0; idx < SNDRV_CARDS; idx++) {
 		read_lock(&snd_card_rwlock);
@@ -504,11 +505,12 @@ void snd_card_info_read_oss(snd_info_buffer_t * buffer)
 #endif
 
 #ifdef MODULE
-static snd_info_entry_t *snd_card_module_info_entry;
-static void snd_card_module_info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static struct snd_info_entry *snd_card_module_info_entry;
+static void snd_card_module_info_read(struct snd_info_entry *entry,
+				      struct snd_info_buffer *buffer)
 {
 	int idx;
-	snd_card_t *card;
+	struct snd_card *card;
 
 	for (idx = 0; idx < SNDRV_CARDS; idx++) {
 		read_lock(&snd_card_rwlock);
@@ -521,7 +523,7 @@ static void snd_card_module_info_read(snd_info_entry_t *entry, snd_info_buffer_t
 
 int __init snd_card_info_init(void)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	entry = snd_info_create_module_entry(THIS_MODULE, "cards", NULL);
 	if (! entry)
@@ -571,7 +573,7 @@ int __exit snd_card_info_done(void)
  *  Returns zero otherwise a negative error code.
  */
   
-int snd_component_add(snd_card_t *card, const char *component)
+int snd_component_add(struct snd_card *card, const char *component)
 {
 	char *ptr;
 	int len = strlen(component);
@@ -602,7 +604,7 @@ int snd_component_add(snd_card_t *card, const char *component)
  *
  *  Returns zero or a negative error code.
  */
-int snd_card_file_add(snd_card_t *card, struct file *file)
+int snd_card_file_add(struct snd_card *card, struct file *file)
 {
 	struct snd_monitor_file *mfile;
 
@@ -636,7 +638,7 @@ int snd_card_file_add(snd_card_t *card, struct file *file)
  *
  *  Returns zero or a negative error code.
  */
-int snd_card_file_remove(snd_card_t *card, struct file *file)
+int snd_card_file_remove(struct snd_card *card, struct file *file)
 {
 	struct snd_monitor_file *mfile, *pfile = NULL;
 
@@ -671,7 +673,7 @@ int snd_card_file_remove(snd_card_t *card, struct file *file)
  */
 struct snd_generic_device {
 	struct platform_device pdev;
-	snd_card_t *card;
+	struct snd_card *card;
 };
 
 #define get_snd_generic_card(dev)	container_of(dev, struct snd_generic_device, pdev)->card
@@ -698,7 +700,7 @@ void snd_generic_device_release(struct device *dev)
 {
 }
 
-static int snd_generic_device_register(snd_card_t *card)
+static int snd_generic_device_register(struct snd_card *card)
 {
 	struct snd_generic_device *dev;
 	int err;
@@ -724,7 +726,7 @@ static int snd_generic_device_register(snd_card_t *card)
 	return 0;
 }
 
-static void snd_generic_device_unregister(snd_card_t *card)
+static void snd_generic_device_unregister(struct snd_card *card)
 {
 	struct snd_generic_device *dev = card->generic_dev;
 	if (dev) {
@@ -744,7 +746,7 @@ static void snd_generic_device_unregister(snd_card_t *card)
  * 
  * Returns zero if successful, or a negative error code.
  */
-int snd_card_set_generic_dev(snd_card_t *card)
+int snd_card_set_generic_dev(struct snd_card *card)
 {
 	int err;
 	if ((err = snd_generic_device_register(card)) < 0)
@@ -766,7 +768,7 @@ int snd_card_set_generic_dev(snd_card_t *card)
  *
  *  Note: the power lock must be active before call.
  */
-int snd_power_wait(snd_card_t *card, unsigned int power_state, struct file *file)
+int snd_power_wait(struct snd_card *card, unsigned int power_state, struct file *file)
 {
 	wait_queue_t wait;
 	int result = 0;
@@ -809,9 +811,9 @@ int snd_power_wait(snd_card_t *card, unsigned int power_state, struct file *file
  * These callbacks are called from ALSA's common PCI suspend/resume
  * handler and from the control API.
  */
-int snd_card_set_pm_callback(snd_card_t *card,
-			     int (*suspend)(snd_card_t *, pm_message_t),
-			     int (*resume)(snd_card_t *),
+int snd_card_set_pm_callback(struct snd_card *card,
+			     int (*suspend)(struct snd_card *, pm_message_t),
+			     int (*resume)(struct snd_card *),
 			     void *private_data)
 {
 	card->pm_suspend = suspend;
@@ -824,7 +826,7 @@ int snd_card_set_pm_callback(snd_card_t *card,
 /* suspend/resume callbacks for snd_generic platform device */
 static int snd_generic_suspend(struct platform_device *dev, pm_message_t state)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 
 	card = get_snd_generic_card(dev);
 	if (card->power_state == SNDRV_CTL_POWER_D3hot)
@@ -837,7 +839,7 @@ static int snd_generic_suspend(struct platform_device *dev, pm_message_t state)
 
 static int snd_generic_resume(struct platform_device *dev)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 
 	card = get_snd_generic_card(dev);
 	if (card->power_state == SNDRV_CTL_POWER_D0)
@@ -859,9 +861,9 @@ static int snd_generic_resume(struct platform_device *dev)
  * the given card.  These callbacks are called from the ALSA's common
  * PM handler and from the control API.
  */
-int snd_card_set_generic_pm_callback(snd_card_t *card,
-				 int (*suspend)(snd_card_t *, pm_message_t),
-				 int (*resume)(snd_card_t *),
+int snd_card_set_generic_pm_callback(struct snd_card *card,
+				 int (*suspend)(struct snd_card *, pm_message_t),
+				 int (*resume)(struct snd_card *),
 				 void *private_data)
 {
 	int err;
@@ -874,7 +876,7 @@ int snd_card_set_generic_pm_callback(snd_card_t *card,
 #ifdef CONFIG_PCI
 int snd_card_pci_suspend(struct pci_dev *dev, pm_message_t state)
 {
-	snd_card_t *card = pci_get_drvdata(dev);
+	struct snd_card *card = pci_get_drvdata(dev);
 	int err;
 	if (! card || ! card->pm_suspend)
 		return 0;
@@ -888,7 +890,7 @@ int snd_card_pci_suspend(struct pci_dev *dev, pm_message_t state)
 
 int snd_card_pci_resume(struct pci_dev *dev)
 {
-	snd_card_t *card = pci_get_drvdata(dev);
+	struct snd_card *card = pci_get_drvdata(dev);
 	if (! card || ! card->pm_resume)
 		return 0;
 	if (card->power_state == SNDRV_CTL_POWER_D0)
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 6e7cad1e947..04de0084e42 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -108,13 +108,13 @@ static void snd_request_other(int minor)
 
 #endif				/* request_module support */
 
-static snd_minor_t *snd_minor_search(int minor)
+static struct snd_minor *snd_minor_search(int minor)
 {
 	struct list_head *list;
-	snd_minor_t *mptr;
+	struct snd_minor *mptr;
 
 	list_for_each(list, &snd_minors_hash[SNDRV_MINOR_CARD(minor)]) {
-		mptr = list_entry(list, snd_minor_t, list);
+		mptr = list_entry(list, struct snd_minor, list);
 		if (mptr->number == minor)
 			return mptr;
 	}
@@ -126,7 +126,7 @@ static int snd_open(struct inode *inode, struct file *file)
 	int minor = iminor(inode);
 	int card = SNDRV_MINOR_CARD(minor);
 	int dev = SNDRV_MINOR_DEVICE(minor);
-	snd_minor_t *mptr = NULL;
+	struct snd_minor *mptr = NULL;
 	struct file_operations *old_fops;
 	int err = 0;
 
@@ -164,7 +164,7 @@ static struct file_operations snd_fops =
 	.open =		snd_open
 };
 
-static int snd_kernel_minor(int type, snd_card_t * card, int dev)
+static int snd_kernel_minor(int type, struct snd_card *card, int dev)
 {
 	int minor;
 
@@ -196,7 +196,7 @@ static int snd_kernel_minor(int type, snd_card_t * card, int dev)
  * @type: the device type, SNDRV_DEVICE_TYPE_XXX
  * @card: the card instance
  * @dev: the device index
- * @reg: the snd_minor_t record
+ * @reg: the struct snd_minor record
  * @name: the device file name
  *
  * Registers an ALSA device file for the given card.
@@ -204,16 +204,16 @@ static int snd_kernel_minor(int type, snd_card_t * card, int dev)
  *
  * Retrurns zero if successful, or a negative error code on failure.
  */
-int snd_register_device(int type, snd_card_t * card, int dev, snd_minor_t * reg, const char *name)
+int snd_register_device(int type, struct snd_card *card, int dev, struct snd_minor * reg, const char *name)
 {
 	int minor = snd_kernel_minor(type, card, dev);
-	snd_minor_t *preg;
+	struct snd_minor *preg;
 	struct device *device = NULL;
 
 	if (minor < 0)
 		return minor;
 	snd_assert(name, return -EINVAL);
-	preg = (snd_minor_t *)kmalloc(sizeof(snd_minor_t) + strlen(name) + 1, GFP_KERNEL);
+	preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL);
 	if (preg == NULL)
 		return -ENOMEM;
 	*preg = *reg;
@@ -248,10 +248,10 @@ int snd_register_device(int type, snd_card_t * card, int dev, snd_minor_t * reg,
  *
  * Returns zero if sucecessful, or a negative error code on failure
  */
-int snd_unregister_device(int type, snd_card_t * card, int dev)
+int snd_unregister_device(int type, struct snd_card *card, int dev)
 {
 	int minor = snd_kernel_minor(type, card, dev);
-	snd_minor_t *mptr;
+	struct snd_minor *mptr;
 
 	if (minor < 0)
 		return minor;
@@ -275,18 +275,18 @@ int snd_unregister_device(int type, snd_card_t * card, int dev)
  *  INFO PART
  */
 
-static snd_info_entry_t *snd_minor_info_entry = NULL;
+static struct snd_info_entry *snd_minor_info_entry = NULL;
 
-static void snd_minor_info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void snd_minor_info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
 {
 	int card, device;
 	struct list_head *list;
-	snd_minor_t *mptr;
+	struct snd_minor *mptr;
 
 	down(&sound_mutex);
 	for (card = 0; card < SNDRV_CARDS; card++) {
 		list_for_each(list, &snd_minors_hash[card]) {
-			mptr = list_entry(list, snd_minor_t, list);
+			mptr = list_entry(list, struct snd_minor, list);
 			if (SNDRV_MINOR_DEVICE(mptr->number) != SNDRV_MINOR_GLOBAL) {
 				if ((device = mptr->device) >= 0)
 					snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n", mptr->number, card, device, mptr->comment);
@@ -302,7 +302,7 @@ static void snd_minor_info_read(snd_info_entry_t *entry, snd_info_buffer_t * buf
 
 int __init snd_minor_info_init(void)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	entry = snd_info_create_module_entry(THIS_MODULE, "devices", NULL);
 	if (entry) {
-- 
cgit v1.2.3-70-g09d2


From 82e9bae6fd253af4aea9c690223c7800313632ad Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 13:53:23 +0100
Subject: [ALSA] Remove xxx_t typedefs: Controls

Modules: Control Midlevel

Remove xxx_t typedefs from the core controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/control.h     |  94 +++++++--------
 sound/core/control.c        | 274 ++++++++++++++++++++++++--------------------
 sound/core/control_compat.c |  73 ++++++------
 3 files changed, 228 insertions(+), 213 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/control.h b/include/sound/control.h
index ef7903c7a32..2489b1eb011 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -24,24 +24,14 @@
 
 #include <sound/asound.h>
 
-typedef struct sndrv_aes_iec958 snd_aes_iec958_t;
-typedef struct sndrv_ctl_card_info snd_ctl_card_info_t;
-typedef enum sndrv_ctl_elem_type snd_ctl_elem_type_t;
-typedef enum sndrv_ctl_elem_iface snd_ctl_elem_iface_t;
-typedef struct sndrv_ctl_elem_id snd_ctl_elem_id_t;
-typedef struct sndrv_ctl_elem_list snd_ctl_elem_list_t;
-typedef struct sndrv_ctl_elem_info snd_ctl_elem_info_t;
-typedef struct sndrv_ctl_elem_value snd_ctl_elem_value_t;
-typedef enum sndrv_ctl_event_type snd_ctl_event_type_t;
-typedef struct sndrv_ctl_event snd_ctl_event_t;
-
 #define snd_kcontrol_chip(kcontrol) ((kcontrol)->private_data)
 
-typedef int (snd_kcontrol_info_t) (snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo);
-typedef int (snd_kcontrol_get_t) (snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
-typedef int (snd_kcontrol_put_t) (snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
+struct snd_kcontrol;
+typedef int (snd_kcontrol_info_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_info * uinfo);
+typedef int (snd_kcontrol_get_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_value * ucontrol);
+typedef int (snd_kcontrol_put_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_value * ucontrol);
 
-typedef struct _snd_kcontrol_new {
+struct snd_kcontrol_new {
 	snd_ctl_elem_iface_t iface;	/* interface identifier */
 	unsigned int device;		/* device/client number */
 	unsigned int subdevice;		/* subdevice (substream) number */
@@ -53,40 +43,40 @@ typedef struct _snd_kcontrol_new {
 	snd_kcontrol_get_t *get;
 	snd_kcontrol_put_t *put;
 	unsigned long private_value;
-} snd_kcontrol_new_t;
+};
 
-typedef struct _snd_kcontrol_volatile {
-	snd_ctl_file_t *owner;	/* locked */
+struct snd_kcontrol_volatile {
+	struct snd_ctl_file *owner;	/* locked */
 	pid_t owner_pid;
 	unsigned int access;	/* access rights */
-} snd_kcontrol_volatile_t;
+};
 
-struct _snd_kcontrol {
+struct snd_kcontrol {
 	struct list_head list;		/* list of controls */
-	snd_ctl_elem_id_t id;
+	struct snd_ctl_elem_id id;
 	unsigned int count;		/* count of same elements */
 	snd_kcontrol_info_t *info;
 	snd_kcontrol_get_t *get;
 	snd_kcontrol_put_t *put;
 	unsigned long private_value;
 	void *private_data;
-	void (*private_free)(snd_kcontrol_t *kcontrol);
-	snd_kcontrol_volatile_t vd[0];	/* volatile data */
+	void (*private_free)(struct snd_kcontrol *kcontrol);
+	struct snd_kcontrol_volatile vd[0];	/* volatile data */
 };
 
-#define snd_kcontrol(n) list_entry(n, snd_kcontrol_t, list)
+#define snd_kcontrol(n) list_entry(n, struct snd_kcontrol, list)
 
-typedef struct _snd_kctl_event {
+struct snd_kctl_event {
 	struct list_head list;	/* list of events */
-	snd_ctl_elem_id_t id;
+	struct snd_ctl_elem_id id;
 	unsigned int mask;
-} snd_kctl_event_t;
+};
 
-#define snd_kctl_event(n) list_entry(n, snd_kctl_event_t, list)
+#define snd_kctl_event(n) list_entry(n, struct snd_kctl_event, list)
 
-struct _snd_ctl_file {
+struct snd_ctl_file {
 	struct list_head list;		/* list of all control files */
-	snd_card_t *card;
+	struct snd_card *card;
 	pid_t pid;
 	int prefer_pcm_subdevice;
 	int prefer_rawmidi_subdevice;
@@ -97,25 +87,25 @@ struct _snd_ctl_file {
 	struct list_head events;	/* waiting events for read */
 };
 
-#define snd_ctl_file(n) list_entry(n, snd_ctl_file_t, list)
+#define snd_ctl_file(n) list_entry(n, struct snd_ctl_file, list)
 
-typedef int (*snd_kctl_ioctl_func_t) (snd_card_t * card,
-				 snd_ctl_file_t * control,
-				 unsigned int cmd, unsigned long arg);
+typedef int (*snd_kctl_ioctl_func_t) (struct snd_card * card,
+				      struct snd_ctl_file * control,
+				      unsigned int cmd, unsigned long arg);
 
-void snd_ctl_notify(snd_card_t * card, unsigned int mask, snd_ctl_elem_id_t * id);
+void snd_ctl_notify(struct snd_card * card, unsigned int mask, struct snd_ctl_elem_id * id);
 
-snd_kcontrol_t *snd_ctl_new(snd_kcontrol_t * kcontrol, unsigned int access);
-snd_kcontrol_t *snd_ctl_new1(const snd_kcontrol_new_t * kcontrolnew, void * private_data);
-void snd_ctl_free_one(snd_kcontrol_t * kcontrol);
-int snd_ctl_add(snd_card_t * card, snd_kcontrol_t * kcontrol);
-int snd_ctl_remove(snd_card_t * card, snd_kcontrol_t * kcontrol);
-int snd_ctl_remove_id(snd_card_t * card, snd_ctl_elem_id_t *id);
-int snd_ctl_rename_id(snd_card_t * card, snd_ctl_elem_id_t *src_id, snd_ctl_elem_id_t *dst_id);
-snd_kcontrol_t *snd_ctl_find_numid(snd_card_t * card, unsigned int numid);
-snd_kcontrol_t *snd_ctl_find_id(snd_card_t * card, snd_ctl_elem_id_t *id);
+struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol * kcontrol, unsigned int access);
+struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new * kcontrolnew, void * private_data);
+void snd_ctl_free_one(struct snd_kcontrol * kcontrol);
+int snd_ctl_add(struct snd_card * card, struct snd_kcontrol * kcontrol);
+int snd_ctl_remove(struct snd_card * card, struct snd_kcontrol * kcontrol);
+int snd_ctl_remove_id(struct snd_card * card, struct snd_ctl_elem_id *id);
+int snd_ctl_rename_id(struct snd_card * card, struct snd_ctl_elem_id *src_id, struct snd_ctl_elem_id *dst_id);
+struct snd_kcontrol *snd_ctl_find_numid(struct snd_card * card, unsigned int numid);
+struct snd_kcontrol *snd_ctl_find_id(struct snd_card * card, struct snd_ctl_elem_id *id);
 
-int snd_ctl_create(snd_card_t *card);
+int snd_ctl_create(struct snd_card *card);
 
 int snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn);
 int snd_ctl_unregister_ioctl(snd_kctl_ioctl_func_t fcn);
@@ -127,20 +117,20 @@ int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn);
 #define snd_ctl_unregister_ioctl_compat(fcn)
 #endif
 
-int snd_ctl_elem_read(snd_card_t *card, snd_ctl_elem_value_t *control);
-int snd_ctl_elem_write(snd_card_t *card, snd_ctl_file_t *file, snd_ctl_elem_value_t *control);
+int snd_ctl_elem_read(struct snd_card *card, struct snd_ctl_elem_value *control);
+int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file, struct snd_ctl_elem_value *control);
 
-static inline unsigned int snd_ctl_get_ioffnum(snd_kcontrol_t *kctl, snd_ctl_elem_id_t *id)
+static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id)
 {
 	return id->numid - kctl->id.numid;
 }
 
-static inline unsigned int snd_ctl_get_ioffidx(snd_kcontrol_t *kctl, snd_ctl_elem_id_t *id)
+static inline unsigned int snd_ctl_get_ioffidx(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id)
 {
 	return id->index - kctl->id.index;
 }
 
-static inline unsigned int snd_ctl_get_ioff(snd_kcontrol_t *kctl, snd_ctl_elem_id_t *id)
+static inline unsigned int snd_ctl_get_ioff(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id)
 {
 	if (id->numid) {
 		return snd_ctl_get_ioffnum(kctl, id);
@@ -149,8 +139,8 @@ static inline unsigned int snd_ctl_get_ioff(snd_kcontrol_t *kctl, snd_ctl_elem_i
 	}
 }
 
-static inline snd_ctl_elem_id_t *snd_ctl_build_ioff(snd_ctl_elem_id_t *dst_id,
-						    snd_kcontrol_t *src_kctl,
+static inline struct snd_ctl_elem_id *snd_ctl_build_ioff(struct snd_ctl_elem_id *dst_id,
+						    struct snd_kcontrol *src_kctl,
 						    unsigned int offset)
 {
 	*dst_id = src_kctl->id;
diff --git a/sound/core/control.c b/sound/core/control.c
index 212c46a9437..1a14338bd51 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -34,12 +34,10 @@
 /* max number of user-defined controls */
 #define MAX_USER_CONTROLS	32
 
-typedef struct _snd_kctl_ioctl {
+struct snd_kctl_ioctl {
 	struct list_head list;		/* list of all ioctls */
 	snd_kctl_ioctl_func_t fioctl;
-} snd_kctl_ioctl_t;
-
-#define snd_kctl_ioctl(n) list_entry(n, snd_kctl_ioctl_t, list)
+};
 
 static DECLARE_RWSEM(snd_ioctl_rwsem);
 static LIST_HEAD(snd_control_ioctls);
@@ -51,8 +49,8 @@ static int snd_ctl_open(struct inode *inode, struct file *file)
 {
 	int cardnum = SNDRV_MINOR_CARD(iminor(inode));
 	unsigned long flags;
-	snd_card_t *card;
-	snd_ctl_file_t *ctl;
+	struct snd_card *card;
+	struct snd_ctl_file *ctl;
 	int err;
 
 	card = snd_cards[cardnum];
@@ -93,9 +91,9 @@ static int snd_ctl_open(struct inode *inode, struct file *file)
       	return err;
 }
 
-static void snd_ctl_empty_read_queue(snd_ctl_file_t * ctl)
+static void snd_ctl_empty_read_queue(struct snd_ctl_file * ctl)
 {
-	snd_kctl_event_t *cread;
+	struct snd_kctl_event *cread;
 	
 	spin_lock(&ctl->read_lock);
 	while (!list_empty(&ctl->events)) {
@@ -110,9 +108,9 @@ static int snd_ctl_release(struct inode *inode, struct file *file)
 {
 	unsigned long flags;
 	struct list_head *list;
-	snd_card_t *card;
-	snd_ctl_file_t *ctl;
-	snd_kcontrol_t *control;
+	struct snd_card *card;
+	struct snd_ctl_file *ctl;
+	struct snd_kcontrol *control;
 	unsigned int idx;
 
 	ctl = file->private_data;
@@ -137,12 +135,13 @@ static int snd_ctl_release(struct inode *inode, struct file *file)
 	return 0;
 }
 
-void snd_ctl_notify(snd_card_t *card, unsigned int mask, snd_ctl_elem_id_t *id)
+void snd_ctl_notify(struct snd_card *card, unsigned int mask,
+		    struct snd_ctl_elem_id *id)
 {
 	unsigned long flags;
 	struct list_head *flist;
-	snd_ctl_file_t *ctl;
-	snd_kctl_event_t *ev;
+	struct snd_ctl_file *ctl;
+	struct snd_kctl_event *ev;
 	
 	snd_assert(card != NULL && id != NULL, return);
 	read_lock(&card->ctl_files_rwlock);
@@ -183,19 +182,19 @@ void snd_ctl_notify(snd_card_t *card, unsigned int mask, snd_ctl_elem_id_t *id)
  * @control: the control template
  * @access: the default control access
  *
- * Allocates a new snd_kcontrol_t instance and copies the given template 
+ * Allocates a new struct snd_kcontrol instance and copies the given template 
  * to the new instance. It does not copy volatile data (access).
  *
  * Returns the pointer of the new instance, or NULL on failure.
  */
-snd_kcontrol_t *snd_ctl_new(snd_kcontrol_t * control, unsigned int access)
+struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control, unsigned int access)
 {
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 	unsigned int idx;
 	
 	snd_assert(control != NULL, return NULL);
 	snd_assert(control->count > 0, return NULL);
-	kctl = kzalloc(sizeof(*kctl) + sizeof(snd_kcontrol_volatile_t) * control->count, GFP_KERNEL);
+	kctl = kzalloc(sizeof(*kctl) + sizeof(struct snd_kcontrol_volatile) * control->count, GFP_KERNEL);
 	if (kctl == NULL)
 		return NULL;
 	*kctl = *control;
@@ -209,15 +208,16 @@ snd_kcontrol_t *snd_ctl_new(snd_kcontrol_t * control, unsigned int access)
  * @ncontrol: the initialization record
  * @private_data: the private data to set
  *
- * Allocates a new snd_kcontrol_t instance and initialize from the given 
+ * Allocates a new struct snd_kcontrol instance and initialize from the given 
  * template.  When the access field of ncontrol is 0, it's assumed as
  * READWRITE access. When the count field is 0, it's assumes as one.
  *
  * Returns the pointer of the newly generated instance, or NULL on failure.
  */
-snd_kcontrol_t *snd_ctl_new1(const snd_kcontrol_new_t * ncontrol, void *private_data)
+struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol,
+				  void *private_data)
 {
-	snd_kcontrol_t kctl;
+	struct snd_kcontrol kctl;
 	unsigned int access;
 	
 	snd_assert(ncontrol != NULL, return NULL);
@@ -249,7 +249,7 @@ snd_kcontrol_t *snd_ctl_new1(const snd_kcontrol_new_t * ncontrol, void *private_
  * or snd_ctl_new1().
  * Don't call this after the control was added to the card.
  */
-void snd_ctl_free_one(snd_kcontrol_t * kcontrol)
+void snd_ctl_free_one(struct snd_kcontrol *kcontrol)
 {
 	if (kcontrol) {
 		if (kcontrol->private_free)
@@ -258,11 +258,11 @@ void snd_ctl_free_one(snd_kcontrol_t * kcontrol)
 	}
 }
 
-static unsigned int snd_ctl_hole_check(snd_card_t * card,
+static unsigned int snd_ctl_hole_check(struct snd_card *card,
 				       unsigned int count)
 {
 	struct list_head *list;
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 
 	list_for_each(list, &card->controls) {
 		kctl = snd_kcontrol(list);
@@ -275,7 +275,7 @@ static unsigned int snd_ctl_hole_check(snd_card_t * card,
 	return card->last_numid;
 }
 
-static int snd_ctl_find_hole(snd_card_t * card, unsigned int count)
+static int snd_ctl_find_hole(struct snd_card *card, unsigned int count)
 {
 	unsigned int last_numid, iter = 100000;
 
@@ -304,9 +304,9 @@ static int snd_ctl_find_hole(snd_card_t * card, unsigned int count)
  *
  * It frees automatically the control which cannot be added.
  */
-int snd_ctl_add(snd_card_t * card, snd_kcontrol_t * kcontrol)
+int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol)
 {
-	snd_ctl_elem_id_t id;
+	struct snd_ctl_elem_id id;
 	unsigned int idx;
 
 	snd_assert(card != NULL && kcontrol != NULL, return -EINVAL);
@@ -350,9 +350,9 @@ int snd_ctl_add(snd_card_t * card, snd_kcontrol_t * kcontrol)
  * 
  * Returns 0 if successful, or a negative error code on failure.
  */
-int snd_ctl_remove(snd_card_t * card, snd_kcontrol_t * kcontrol)
+int snd_ctl_remove(struct snd_card *card, struct snd_kcontrol *kcontrol)
 {
-	snd_ctl_elem_id_t id;
+	struct snd_ctl_elem_id id;
 	unsigned int idx;
 
 	snd_assert(card != NULL && kcontrol != NULL, return -EINVAL);
@@ -375,9 +375,9 @@ int snd_ctl_remove(snd_card_t * card, snd_kcontrol_t * kcontrol)
  * 
  * Returns 0 if successful, or a negative error code on failure.
  */
-int snd_ctl_remove_id(snd_card_t * card, snd_ctl_elem_id_t *id)
+int snd_ctl_remove_id(struct snd_card *card, struct snd_ctl_elem_id *id)
 {
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 	int ret;
 
 	down_write(&card->controls_rwsem);
@@ -401,10 +401,11 @@ int snd_ctl_remove_id(snd_card_t * card, snd_ctl_elem_id_t *id)
  * 
  * Returns 0 if successful, or a negative error code on failure.
  */
-static int snd_ctl_remove_unlocked_id(snd_ctl_file_t * file, snd_ctl_elem_id_t *id)
+static int snd_ctl_remove_unlocked_id(struct snd_ctl_file * file,
+				      struct snd_ctl_elem_id *id)
 {
-	snd_card_t *card = file->card;
-	snd_kcontrol_t *kctl;
+	struct snd_card *card = file->card;
+	struct snd_kcontrol *kctl;
 	int idx, ret;
 
 	down_write(&card->controls_rwsem);
@@ -434,9 +435,10 @@ static int snd_ctl_remove_unlocked_id(snd_ctl_file_t * file, snd_ctl_elem_id_t *
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_ctl_rename_id(snd_card_t * card, snd_ctl_elem_id_t *src_id, snd_ctl_elem_id_t *dst_id)
+int snd_ctl_rename_id(struct snd_card *card, struct snd_ctl_elem_id *src_id,
+		      struct snd_ctl_elem_id *dst_id)
 {
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 
 	down_write(&card->controls_rwsem);
 	kctl = snd_ctl_find_id(card, src_id);
@@ -463,10 +465,10 @@ int snd_ctl_rename_id(snd_card_t * card, snd_ctl_elem_id_t *src_id, snd_ctl_elem
  * The caller must down card->controls_rwsem before calling this function
  * (if the race condition can happen).
  */
-snd_kcontrol_t *snd_ctl_find_numid(snd_card_t * card, unsigned int numid)
+struct snd_kcontrol *snd_ctl_find_numid(struct snd_card *card, unsigned int numid)
 {
 	struct list_head *list;
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 
 	snd_assert(card != NULL && numid != 0, return NULL);
 	list_for_each(list, &card->controls) {
@@ -489,10 +491,11 @@ snd_kcontrol_t *snd_ctl_find_numid(snd_card_t * card, unsigned int numid)
  * The caller must down card->controls_rwsem before calling this function
  * (if the race condition can happen).
  */
-snd_kcontrol_t *snd_ctl_find_id(snd_card_t * card, snd_ctl_elem_id_t *id)
+struct snd_kcontrol *snd_ctl_find_id(struct snd_card *card,
+				     struct snd_ctl_elem_id *id)
 {
 	struct list_head *list;
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 
 	snd_assert(card != NULL && id != NULL, return NULL);
 	if (id->numid != 0)
@@ -516,10 +519,10 @@ snd_kcontrol_t *snd_ctl_find_id(snd_card_t * card, snd_ctl_elem_id_t *id)
 	return NULL;
 }
 
-static int snd_ctl_card_info(snd_card_t * card, snd_ctl_file_t * ctl,
+static int snd_ctl_card_info(struct snd_card *card, struct snd_ctl_file * ctl,
 			     unsigned int cmd, void __user *arg)
 {
-	snd_ctl_card_info_t *info;
+	struct snd_ctl_card_info *info;
 
 	info = kzalloc(sizeof(*info), GFP_KERNEL);
 	if (! info)
@@ -533,7 +536,7 @@ static int snd_ctl_card_info(snd_card_t * card, snd_ctl_file_t * ctl,
 	strlcpy(info->mixername, card->mixername, sizeof(info->mixername));
 	strlcpy(info->components, card->components, sizeof(info->components));
 	up_read(&snd_ioctl_rwsem);
-	if (copy_to_user(arg, info, sizeof(snd_ctl_card_info_t))) {
+	if (copy_to_user(arg, info, sizeof(struct snd_ctl_card_info))) {
 		kfree(info);
 		return -EFAULT;
 	}
@@ -541,12 +544,13 @@ static int snd_ctl_card_info(snd_card_t * card, snd_ctl_file_t * ctl,
 	return 0;
 }
 
-static int snd_ctl_elem_list(snd_card_t *card, snd_ctl_elem_list_t __user *_list)
+static int snd_ctl_elem_list(struct snd_card *card,
+			     struct snd_ctl_elem_list __user *_list)
 {
 	struct list_head *plist;
-	snd_ctl_elem_list_t list;
-	snd_kcontrol_t *kctl;
-	snd_ctl_elem_id_t *dst, *id;
+	struct snd_ctl_elem_list list;
+	struct snd_kcontrol *kctl;
+	struct snd_ctl_elem_id *dst, *id;
 	unsigned int offset, space, first, jidx;
 	
 	if (copy_from_user(&list, _list, sizeof(list)))
@@ -559,7 +563,7 @@ static int snd_ctl_elem_list(snd_card_t *card, snd_ctl_elem_list_t __user *_list
 		return -ENOMEM;
 	if (space > 0) {
 		/* allocate temporary buffer for atomic operation */
-		dst = vmalloc(space * sizeof(snd_ctl_elem_id_t));
+		dst = vmalloc(space * sizeof(struct snd_ctl_elem_id));
 		if (dst == NULL)
 			return -ENOMEM;
 		down_read(&card->controls_rwsem);
@@ -588,7 +592,9 @@ static int snd_ctl_elem_list(snd_card_t *card, snd_ctl_elem_list_t __user *_list
 			offset = 0;
 		}
 		up_read(&card->controls_rwsem);
-		if (list.used > 0 && copy_to_user(list.pids, dst, list.used * sizeof(snd_ctl_elem_id_t))) {
+		if (list.used > 0 &&
+		    copy_to_user(list.pids, dst,
+				 list.used * sizeof(struct snd_ctl_elem_id))) {
 			vfree(dst);
 			return -EFAULT;
 		}
@@ -603,11 +609,12 @@ static int snd_ctl_elem_list(snd_card_t *card, snd_ctl_elem_list_t __user *_list
 	return 0;
 }
 
-static int snd_ctl_elem_info(snd_ctl_file_t *ctl, snd_ctl_elem_info_t *info)
+static int snd_ctl_elem_info(struct snd_ctl_file *ctl,
+			     struct snd_ctl_elem_info *info)
 {
-	snd_card_t *card = ctl->card;
-	snd_kcontrol_t *kctl;
-	snd_kcontrol_volatile_t *vd;
+	struct snd_card *card = ctl->card;
+	struct snd_kcontrol *kctl;
+	struct snd_kcontrol_volatile *vd;
 	unsigned int index_offset;
 	int result;
 	
@@ -640,9 +647,10 @@ static int snd_ctl_elem_info(snd_ctl_file_t *ctl, snd_ctl_elem_info_t *info)
 	return result;
 }
 
-static int snd_ctl_elem_info_user(snd_ctl_file_t *ctl, snd_ctl_elem_info_t __user *_info)
+static int snd_ctl_elem_info_user(struct snd_ctl_file *ctl,
+				  struct snd_ctl_elem_info __user *_info)
 {
-	snd_ctl_elem_info_t info;
+	struct snd_ctl_elem_info info;
 	int result;
 
 	if (copy_from_user(&info, _info, sizeof(info)))
@@ -654,10 +662,10 @@ static int snd_ctl_elem_info_user(snd_ctl_file_t *ctl, snd_ctl_elem_info_t __use
 	return result;
 }
 
-int snd_ctl_elem_read(snd_card_t *card, snd_ctl_elem_value_t *control)
+int snd_ctl_elem_read(struct snd_card *card, struct snd_ctl_elem_value *control)
 {
-	snd_kcontrol_t *kctl;
-	snd_kcontrol_volatile_t *vd;
+	struct snd_kcontrol *kctl;
+	struct snd_kcontrol_volatile *vd;
 	unsigned int index_offset;
 	int result, indirect;
 
@@ -684,9 +692,10 @@ int snd_ctl_elem_read(snd_card_t *card, snd_ctl_elem_value_t *control)
 	return result;
 }
 
-static int snd_ctl_elem_read_user(snd_card_t *card, snd_ctl_elem_value_t __user *_control)
+static int snd_ctl_elem_read_user(struct snd_card *card,
+				  struct snd_ctl_elem_value __user *_control)
 {
-	snd_ctl_elem_value_t *control;
+	struct snd_ctl_elem_value *control;
 	int result;
 	
 	control = kmalloc(sizeof(*control), GFP_KERNEL);
@@ -704,10 +713,11 @@ static int snd_ctl_elem_read_user(snd_card_t *card, snd_ctl_elem_value_t __user
 	return result;
 }
 
-int snd_ctl_elem_write(snd_card_t *card, snd_ctl_file_t *file, snd_ctl_elem_value_t *control)
+int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file,
+		       struct snd_ctl_elem_value *control)
 {
-	snd_kcontrol_t *kctl;
-	snd_kcontrol_volatile_t *vd;
+	struct snd_kcontrol *kctl;
+	struct snd_kcontrol_volatile *vd;
 	unsigned int index_offset;
 	int result, indirect;
 
@@ -741,9 +751,10 @@ int snd_ctl_elem_write(snd_card_t *card, snd_ctl_file_t *file, snd_ctl_elem_valu
 	return result;
 }
 
-static int snd_ctl_elem_write_user(snd_ctl_file_t *file, snd_ctl_elem_value_t __user *_control)
+static int snd_ctl_elem_write_user(struct snd_ctl_file *file,
+				   struct snd_ctl_elem_value __user *_control)
 {
-	snd_ctl_elem_value_t *control;
+	struct snd_ctl_elem_value *control;
 	int result;
 
 	control = kmalloc(sizeof(*control), GFP_KERNEL);
@@ -761,12 +772,13 @@ static int snd_ctl_elem_write_user(snd_ctl_file_t *file, snd_ctl_elem_value_t __
 	return result;
 }
 
-static int snd_ctl_elem_lock(snd_ctl_file_t *file, snd_ctl_elem_id_t __user *_id)
+static int snd_ctl_elem_lock(struct snd_ctl_file *file,
+			     struct snd_ctl_elem_id __user *_id)
 {
-	snd_card_t *card = file->card;
-	snd_ctl_elem_id_t id;
-	snd_kcontrol_t *kctl;
-	snd_kcontrol_volatile_t *vd;
+	struct snd_card *card = file->card;
+	struct snd_ctl_elem_id id;
+	struct snd_kcontrol *kctl;
+	struct snd_kcontrol_volatile *vd;
 	int result;
 	
 	if (copy_from_user(&id, _id, sizeof(id)))
@@ -789,12 +801,13 @@ static int snd_ctl_elem_lock(snd_ctl_file_t *file, snd_ctl_elem_id_t __user *_id
 	return result;
 }
 
-static int snd_ctl_elem_unlock(snd_ctl_file_t *file, snd_ctl_elem_id_t __user *_id)
+static int snd_ctl_elem_unlock(struct snd_ctl_file *file,
+			       struct snd_ctl_elem_id __user *_id)
 {
-	snd_card_t *card = file->card;
-	snd_ctl_elem_id_t id;
-	snd_kcontrol_t *kctl;
-	snd_kcontrol_volatile_t *vd;
+	struct snd_card *card = file->card;
+	struct snd_ctl_elem_id id;
+	struct snd_kcontrol *kctl;
+	struct snd_kcontrol_volatile *vd;
 	int result;
 	
 	if (copy_from_user(&id, _id, sizeof(id)))
@@ -820,14 +833,15 @@ static int snd_ctl_elem_unlock(snd_ctl_file_t *file, snd_ctl_elem_id_t __user *_
 }
 
 struct user_element {
-	snd_ctl_elem_info_t info;
+	struct snd_ctl_elem_info info;
 	void *elem_data;		/* element data */
 	unsigned long elem_data_size;	/* size of element data in bytes */
 	void *priv_data;		/* private data (like strings for enumerated type) */
 	unsigned long priv_data_size;	/* size of private data in bytes */
 };
 
-static int snd_ctl_elem_user_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int snd_ctl_elem_user_info(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_info *uinfo)
 {
 	struct user_element *ue = kcontrol->private_data;
 
@@ -835,7 +849,8 @@ static int snd_ctl_elem_user_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_ctl_elem_user_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ctl_elem_user_get(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
 	struct user_element *ue = kcontrol->private_data;
 
@@ -843,7 +858,8 @@ static int snd_ctl_elem_user_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_ctl_elem_user_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ctl_elem_user_put(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
 	int change;
 	struct user_element *ue = kcontrol->private_data;
@@ -854,15 +870,16 @@ static int snd_ctl_elem_user_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return change;
 }
 
-static void snd_ctl_elem_user_free(snd_kcontrol_t * kcontrol)
+static void snd_ctl_elem_user_free(struct snd_kcontrol *kcontrol)
 {
 	kfree(kcontrol->private_data);
 }
 
-static int snd_ctl_elem_add(snd_ctl_file_t *file, snd_ctl_elem_info_t *info, int replace)
+static int snd_ctl_elem_add(struct snd_ctl_file *file,
+			    struct snd_ctl_elem_info *info, int replace)
 {
-	snd_card_t *card = file->card;
-	snd_kcontrol_t kctl, *_kctl;
+	struct snd_card *card = file->card;
+	struct snd_kcontrol kctl, *_kctl;
 	unsigned int access;
 	long private_size;
 	struct user_element *ue;
@@ -873,7 +890,8 @@ static int snd_ctl_elem_add(snd_ctl_file_t *file, snd_ctl_elem_info_t *info, int
 	if (info->count > 1024)
 		return -EINVAL;
 	access = info->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE :
-		(info->access & (SNDRV_CTL_ELEM_ACCESS_READWRITE|SNDRV_CTL_ELEM_ACCESS_INACTIVE));
+		(info->access & (SNDRV_CTL_ELEM_ACCESS_READWRITE|
+				 SNDRV_CTL_ELEM_ACCESS_INACTIVE));
 	info->id.numid = 0;
 	memset(&kctl, 0, sizeof(kctl));
 	down_write(&card->controls_rwsem);
@@ -921,7 +939,7 @@ static int snd_ctl_elem_add(snd_ctl_file_t *file, snd_ctl_elem_info_t *info, int
 			return -EINVAL;
 		break;
 	case SNDRV_CTL_ELEM_TYPE_IEC958:
-		private_size = sizeof(struct sndrv_aes_iec958);
+		private_size = sizeof(struct snd_aes_iec958);
 		if (info->count != 1)
 			return -EINVAL;
 		break;
@@ -957,24 +975,26 @@ static int snd_ctl_elem_add(snd_ctl_file_t *file, snd_ctl_elem_info_t *info, int
 	return 0;
 }
 
-static int snd_ctl_elem_add_user(snd_ctl_file_t *file, snd_ctl_elem_info_t __user *_info, int replace)
+static int snd_ctl_elem_add_user(struct snd_ctl_file *file,
+				 struct snd_ctl_elem_info __user *_info, int replace)
 {
-	snd_ctl_elem_info_t info;
+	struct snd_ctl_elem_info info;
 	if (copy_from_user(&info, _info, sizeof(info)))
 		return -EFAULT;
 	return snd_ctl_elem_add(file, &info, replace);
 }
 
-static int snd_ctl_elem_remove(snd_ctl_file_t *file, snd_ctl_elem_id_t __user *_id)
+static int snd_ctl_elem_remove(struct snd_ctl_file *file,
+			       struct snd_ctl_elem_id __user *_id)
 {
-	snd_ctl_elem_id_t id;
+	struct snd_ctl_elem_id id;
 	int err;
 
 	if (copy_from_user(&id, _id, sizeof(id)))
 		return -EFAULT;
 	err = snd_ctl_remove_unlocked_id(file, &id);
 	if (! err) {
-		snd_card_t *card = file->card;
+		struct snd_card *card = file->card;
 		down_write(&card->controls_rwsem);
 		card->user_ctl_count--;
 		up_write(&card->controls_rwsem);
@@ -982,7 +1002,7 @@ static int snd_ctl_elem_remove(snd_ctl_file_t *file, snd_ctl_elem_id_t __user *_
 	return err;
 }
 
-static int snd_ctl_subscribe_events(snd_ctl_file_t *file, int __user *ptr)
+static int snd_ctl_subscribe_events(struct snd_ctl_file *file, int __user *ptr)
 {
 	int subscribe;
 	if (get_user(subscribe, ptr))
@@ -1007,7 +1027,7 @@ static int snd_ctl_subscribe_events(snd_ctl_file_t *file, int __user *ptr)
 /*
  * change the power state
  */
-static int snd_ctl_set_power_state(snd_card_t *card, unsigned int power_state)
+static int snd_ctl_set_power_state(struct snd_card *card, unsigned int power_state)
 {
 	switch (power_state) {
 	case SNDRV_CTL_POWER_D0:
@@ -1035,10 +1055,10 @@ static int snd_ctl_set_power_state(snd_card_t *card, unsigned int power_state)
 
 static long snd_ctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	snd_ctl_file_t *ctl;
-	snd_card_t *card;
+	struct snd_ctl_file *ctl;
+	struct snd_card *card;
 	struct list_head *list;
-	snd_kctl_ioctl_t *p;
+	struct snd_kctl_ioctl *p;
 	void __user *argp = (void __user *)arg;
 	int __user *ip = argp;
 	int err;
@@ -1094,7 +1114,7 @@ static long snd_ctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg
 	}
 	down_read(&snd_ioctl_rwsem);
 	list_for_each(list, &snd_control_ioctls) {
-		p = list_entry(list, snd_kctl_ioctl_t, list);
+		p = list_entry(list, struct snd_kctl_ioctl, list);
 		err = p->fioctl(card, ctl, cmd, arg);
 		if (err != -ENOIOCTLCMD) {
 			up_read(&snd_ioctl_rwsem);
@@ -1106,9 +1126,10 @@ static long snd_ctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg
 	return -ENOTTY;
 }
 
-static ssize_t snd_ctl_read(struct file *file, char __user *buffer, size_t count, loff_t * offset)
+static ssize_t snd_ctl_read(struct file *file, char __user *buffer,
+			    size_t count, loff_t * offset)
 {
-	snd_ctl_file_t *ctl;
+	struct snd_ctl_file *ctl;
 	int err = 0;
 	ssize_t result = 0;
 
@@ -1116,12 +1137,12 @@ static ssize_t snd_ctl_read(struct file *file, char __user *buffer, size_t count
 	snd_assert(ctl != NULL && ctl->card != NULL, return -ENXIO);
 	if (!ctl->subscribed)
 		return -EBADFD;
-	if (count < sizeof(snd_ctl_event_t))
+	if (count < sizeof(struct snd_ctl_event))
 		return -EINVAL;
 	spin_lock_irq(&ctl->read_lock);
-	while (count >= sizeof(snd_ctl_event_t)) {
-		snd_ctl_event_t ev;
-		snd_kctl_event_t *kev;
+	while (count >= sizeof(struct snd_ctl_event)) {
+		struct snd_ctl_event ev;
+		struct snd_kctl_event *kev;
 		while (list_empty(&ctl->events)) {
 			wait_queue_t wait;
 			if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) {
@@ -1145,14 +1166,14 @@ static ssize_t snd_ctl_read(struct file *file, char __user *buffer, size_t count
 		list_del(&kev->list);
 		spin_unlock_irq(&ctl->read_lock);
 		kfree(kev);
-		if (copy_to_user(buffer, &ev, sizeof(snd_ctl_event_t))) {
+		if (copy_to_user(buffer, &ev, sizeof(struct snd_ctl_event))) {
 			err = -EFAULT;
 			goto __end;
 		}
 		spin_lock_irq(&ctl->read_lock);
-		buffer += sizeof(snd_ctl_event_t);
-		count -= sizeof(snd_ctl_event_t);
-		result += sizeof(snd_ctl_event_t);
+		buffer += sizeof(struct snd_ctl_event);
+		count -= sizeof(struct snd_ctl_event);
+		result += sizeof(struct snd_ctl_event);
 	}
       __end_lock:
 	spin_unlock_irq(&ctl->read_lock);
@@ -1163,7 +1184,7 @@ static ssize_t snd_ctl_read(struct file *file, char __user *buffer, size_t count
 static unsigned int snd_ctl_poll(struct file *file, poll_table * wait)
 {
 	unsigned int mask;
-	snd_ctl_file_t *ctl;
+	struct snd_ctl_file *ctl;
 
 	ctl = file->private_data;
 	if (!ctl->subscribed)
@@ -1183,9 +1204,9 @@ static unsigned int snd_ctl_poll(struct file *file, poll_table * wait)
  */
 static int _snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn, struct list_head *lists)
 {
-	snd_kctl_ioctl_t *pn;
+	struct snd_kctl_ioctl *pn;
 
-	pn = kzalloc(sizeof(snd_kctl_ioctl_t), GFP_KERNEL);
+	pn = kzalloc(sizeof(struct snd_kctl_ioctl), GFP_KERNEL);
 	if (pn == NULL)
 		return -ENOMEM;
 	pn->fioctl = fcn;
@@ -1210,15 +1231,16 @@ int snd_ctl_register_ioctl_compat(snd_kctl_ioctl_func_t fcn)
 /*
  * de-register the device-specific control-ioctls.
  */
-static int _snd_ctl_unregister_ioctl(snd_kctl_ioctl_func_t fcn, struct list_head *lists)
+static int _snd_ctl_unregister_ioctl(snd_kctl_ioctl_func_t fcn,
+				     struct list_head *lists)
 {
 	struct list_head *list;
-	snd_kctl_ioctl_t *p;
+	struct snd_kctl_ioctl *p;
 
 	snd_assert(fcn != NULL, return -EINVAL);
 	down_write(&snd_ioctl_rwsem);
 	list_for_each(list, lists) {
-		p = list_entry(list, snd_kctl_ioctl_t, list);
+		p = list_entry(list, struct snd_kctl_ioctl, list);
 		if (p->fioctl == fcn) {
 			list_del(&p->list);
 			up_write(&snd_ioctl_rwsem);
@@ -1246,7 +1268,7 @@ int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn)
 
 static int snd_ctl_fasync(int fd, struct file * file, int on)
 {
-	snd_ctl_file_t *ctl;
+	struct snd_ctl_file *ctl;
 	int err;
 	ctl = file->private_data;
 	err = fasync_helper(fd, file, on, &ctl->fasync);
@@ -1280,7 +1302,7 @@ static struct file_operations snd_ctl_f_ops =
 	.fasync =	snd_ctl_fasync,
 };
 
-static snd_minor_t snd_ctl_reg =
+static struct snd_minor snd_ctl_reg =
 {
 	.comment =	"ctl",
 	.f_ops =	&snd_ctl_f_ops,
@@ -1289,9 +1311,9 @@ static snd_minor_t snd_ctl_reg =
 /*
  * registration of the control device
  */
-static int snd_ctl_dev_register(snd_device_t *device)
+static int snd_ctl_dev_register(struct snd_device *device)
 {
-	snd_card_t *card = device->device_data;
+	struct snd_card *card = device->device_data;
 	int err, cardnum;
 	char name[16];
 
@@ -1308,11 +1330,11 @@ static int snd_ctl_dev_register(snd_device_t *device)
 /*
  * disconnection of the control device
  */
-static int snd_ctl_dev_disconnect(snd_device_t *device)
+static int snd_ctl_dev_disconnect(struct snd_device *device)
 {
-	snd_card_t *card = device->device_data;
+	struct snd_card *card = device->device_data;
 	struct list_head *flist;
-	snd_ctl_file_t *ctl;
+	struct snd_ctl_file *ctl;
 
 	down_read(&card->controls_rwsem);
 	list_for_each(flist, &card->ctl_files) {
@@ -1327,10 +1349,10 @@ static int snd_ctl_dev_disconnect(snd_device_t *device)
 /*
  * free all controls
  */
-static int snd_ctl_dev_free(snd_device_t *device)
+static int snd_ctl_dev_free(struct snd_device *device)
 {
-	snd_card_t *card = device->device_data;
-	snd_kcontrol_t *control;
+	struct snd_card *card = device->device_data;
+	struct snd_kcontrol *control;
 
 	down_write(&card->controls_rwsem);
 	while (!list_empty(&card->controls)) {
@@ -1344,9 +1366,9 @@ static int snd_ctl_dev_free(snd_device_t *device)
 /*
  * de-registration of the control device
  */
-static int snd_ctl_dev_unregister(snd_device_t *device)
+static int snd_ctl_dev_unregister(struct snd_device *device)
 {
-	snd_card_t *card = device->device_data;
+	struct snd_card *card = device->device_data;
 	int err, cardnum;
 
 	snd_assert(card != NULL, return -ENXIO);
@@ -1361,9 +1383,9 @@ static int snd_ctl_dev_unregister(snd_device_t *device)
  * create control core:
  * called from init.c
  */
-int snd_ctl_create(snd_card_t *card)
+int snd_ctl_create(struct snd_card *card)
 {
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free = snd_ctl_dev_free,
 		.dev_register =	snd_ctl_dev_register,
 		.dev_disconnect = snd_ctl_dev_disconnect,
diff --git a/sound/core/control_compat.c b/sound/core/control_compat.c
index 207c7de5129..418c6d4e5da 100644
--- a/sound/core/control_compat.c
+++ b/sound/core/control_compat.c
@@ -22,7 +22,7 @@
 
 #include <linux/compat.h>
 
-struct sndrv_ctl_elem_list32 {
+struct snd_ctl_elem_list32 {
 	u32 offset;
 	u32 space;
 	u32 used;
@@ -31,9 +31,10 @@ struct sndrv_ctl_elem_list32 {
 	unsigned char reserved[50];
 } /* don't set packed attribute here */;
 
-static int snd_ctl_elem_list_compat(snd_card_t *card, struct sndrv_ctl_elem_list32 __user *data32)
+static int snd_ctl_elem_list_compat(struct snd_card *card,
+				    struct snd_ctl_elem_list32 __user *data32)
 {
-	struct sndrv_ctl_elem_list __user *data;
+	struct snd_ctl_elem_list __user *data;
 	compat_caddr_t ptr;
 	int err;
 
@@ -60,8 +61,8 @@ static int snd_ctl_elem_list_compat(snd_card_t *card, struct sndrv_ctl_elem_list
  * it uses union, so the things are not easy..
  */
 
-struct sndrv_ctl_elem_info32 {
-	struct sndrv_ctl_elem_id id; // the size of struct is same
+struct snd_ctl_elem_info32 {
+	struct snd_ctl_elem_id id; // the size of struct is same
 	s32 type;
 	u32 access;
 	u32 count;
@@ -87,9 +88,10 @@ struct sndrv_ctl_elem_info32 {
 	unsigned char reserved[64];
 } __attribute__((packed));
 
-static int snd_ctl_elem_info_compat(snd_ctl_file_t *ctl, struct sndrv_ctl_elem_info32 __user *data32)
+static int snd_ctl_elem_info_compat(struct snd_ctl_file *ctl,
+				    struct snd_ctl_elem_info32 __user *data32)
 {
-	struct sndrv_ctl_elem_info *data;
+	struct snd_ctl_elem_info *data;
 	int err;
 
 	data = kzalloc(sizeof(*data), GFP_KERNEL);
@@ -146,8 +148,8 @@ static int snd_ctl_elem_info_compat(snd_ctl_file_t *ctl, struct sndrv_ctl_elem_i
 }
 
 /* read / write */
-struct sndrv_ctl_elem_value32 {
-	struct sndrv_ctl_elem_id id;
+struct snd_ctl_elem_value32 {
+	struct snd_ctl_elem_id id;
 	unsigned int indirect;	/* bit-field causes misalignment */
         union {
 		s32 integer[128];
@@ -161,10 +163,11 @@ struct sndrv_ctl_elem_value32 {
 
 
 /* get the value type and count of the control */
-static int get_ctl_type(snd_card_t *card, snd_ctl_elem_id_t *id, int *countp)
+static int get_ctl_type(struct snd_card *card, struct snd_ctl_elem_id *id,
+			int *countp)
 {
-	snd_kcontrol_t *kctl;
-	snd_ctl_elem_info_t info;
+	struct snd_kcontrol *kctl;
+	struct snd_ctl_elem_info info;
 	int err;
 
 	down_read(&card->controls_rwsem);
@@ -193,15 +196,15 @@ static int get_elem_size(int type, int count)
 	case SNDRV_CTL_ELEM_TYPE_BYTES:
 		return 512;
 	case SNDRV_CTL_ELEM_TYPE_IEC958:
-		return sizeof(struct sndrv_aes_iec958);
+		return sizeof(struct snd_aes_iec958);
 	default:
 		return -1;
 	}
 }
 
-static int copy_ctl_value_from_user(snd_card_t *card,
-				    struct sndrv_ctl_elem_value *data,
-				    struct sndrv_ctl_elem_value32 __user *data32,
+static int copy_ctl_value_from_user(struct snd_card *card,
+				    struct snd_ctl_elem_value *data,
+				    struct snd_ctl_elem_value32 __user *data32,
 				    int *typep, int *countp)
 {
 	int i, type, count, size;
@@ -242,8 +245,8 @@ static int copy_ctl_value_from_user(snd_card_t *card,
 }
 
 /* restore the value to 32bit */
-static int copy_ctl_value_to_user(struct sndrv_ctl_elem_value32 __user *data32,
-				  struct sndrv_ctl_elem_value *data,
+static int copy_ctl_value_to_user(struct snd_ctl_elem_value32 __user *data32,
+				  struct snd_ctl_elem_value *data,
 				  int type, int count)
 {
 	int i, size;
@@ -265,10 +268,10 @@ static int copy_ctl_value_to_user(struct sndrv_ctl_elem_value32 __user *data32,
 	return 0;
 }
 
-static int snd_ctl_elem_read_user_compat(snd_card_t *card, 
-					 struct sndrv_ctl_elem_value32 __user *data32)
+static int snd_ctl_elem_read_user_compat(struct snd_card *card, 
+					 struct snd_ctl_elem_value32 __user *data32)
 {
-	struct sndrv_ctl_elem_value *data;
+	struct snd_ctl_elem_value *data;
 	int err, type, count;
 
 	data = kzalloc(sizeof(*data), GFP_KERNEL);
@@ -285,10 +288,10 @@ static int snd_ctl_elem_read_user_compat(snd_card_t *card,
 	return err;
 }
 
-static int snd_ctl_elem_write_user_compat(snd_ctl_file_t *file,
-					  struct sndrv_ctl_elem_value32 __user *data32)
+static int snd_ctl_elem_write_user_compat(struct snd_ctl_file *file,
+					  struct snd_ctl_elem_value32 __user *data32)
 {
-	struct sndrv_ctl_elem_value *data;
+	struct snd_ctl_elem_value *data;
 	int err, type, count;
 
 	data = kzalloc(sizeof(*data), GFP_KERNEL);
@@ -306,11 +309,11 @@ static int snd_ctl_elem_write_user_compat(snd_ctl_file_t *file,
 }
 
 /* add or replace a user control */
-static int snd_ctl_elem_add_compat(snd_ctl_file_t *file,
-				   struct sndrv_ctl_elem_info32 __user *data32,
+static int snd_ctl_elem_add_compat(struct snd_ctl_file *file,
+				   struct snd_ctl_elem_info32 __user *data32,
 				   int replace)
 {
-	struct sndrv_ctl_elem_info *data;
+	struct snd_ctl_elem_info *data;
 	int err;
 
 	data = kzalloc(sizeof(*data), GFP_KERNEL);
@@ -355,17 +358,17 @@ static int snd_ctl_elem_add_compat(snd_ctl_file_t *file,
 }  
 
 enum {
-	SNDRV_CTL_IOCTL_ELEM_LIST32 = _IOWR('U', 0x10, struct sndrv_ctl_elem_list32),
-	SNDRV_CTL_IOCTL_ELEM_INFO32 = _IOWR('U', 0x11, struct sndrv_ctl_elem_info32),
-	SNDRV_CTL_IOCTL_ELEM_READ32 = _IOWR('U', 0x12, struct sndrv_ctl_elem_value32),
-	SNDRV_CTL_IOCTL_ELEM_WRITE32 = _IOWR('U', 0x13, struct sndrv_ctl_elem_value32),
-	SNDRV_CTL_IOCTL_ELEM_ADD32 = _IOWR('U', 0x17, struct sndrv_ctl_elem_info32),
-	SNDRV_CTL_IOCTL_ELEM_REPLACE32 = _IOWR('U', 0x18, struct sndrv_ctl_elem_info32),
+	SNDRV_CTL_IOCTL_ELEM_LIST32 = _IOWR('U', 0x10, struct snd_ctl_elem_list32),
+	SNDRV_CTL_IOCTL_ELEM_INFO32 = _IOWR('U', 0x11, struct snd_ctl_elem_info32),
+	SNDRV_CTL_IOCTL_ELEM_READ32 = _IOWR('U', 0x12, struct snd_ctl_elem_value32),
+	SNDRV_CTL_IOCTL_ELEM_WRITE32 = _IOWR('U', 0x13, struct snd_ctl_elem_value32),
+	SNDRV_CTL_IOCTL_ELEM_ADD32 = _IOWR('U', 0x17, struct snd_ctl_elem_info32),
+	SNDRV_CTL_IOCTL_ELEM_REPLACE32 = _IOWR('U', 0x18, struct snd_ctl_elem_info32),
 };
 
 static inline long snd_ctl_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	snd_ctl_file_t *ctl;
+	struct snd_ctl_file *ctl;
 	struct list_head *list;
 	void __user *argp = compat_ptr(arg);
 	int err;
@@ -398,7 +401,7 @@ static inline long snd_ctl_ioctl_compat(struct file *file, unsigned int cmd, uns
 
 	down_read(&snd_ioctl_rwsem);
 	list_for_each(list, &snd_control_compat_ioctls) {
-		snd_kctl_ioctl_t *p = list_entry(list, snd_kctl_ioctl_t, list);
+		struct snd_kctl_ioctl *p = list_entry(list, struct snd_kctl_ioctl, list);
 		if (p->fioctl) {
 			err = p->fioctl(ctl->card, ctl, cmd, arg);
 			if (err != -ENOIOCTLCMD) {
-- 
cgit v1.2.3-70-g09d2


From 53d2f744afc1fcb4fb68975a443fb66eb6c44da4 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 13:56:05 +0100
Subject: [ALSA] Remove xxx_t typedefs: Timer

Modules: RTC timer driver,Timer Midlevel

Remove xxx_t typedefs from the core timer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/timer.h     |  94 ++++++-------
 sound/core/rtctimer.c     |  22 +--
 sound/core/timer.c        | 346 +++++++++++++++++++++++-----------------------
 sound/core/timer_compat.c |  22 +--
 4 files changed, 235 insertions(+), 249 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/timer.h b/include/sound/timer.h
index b55f38ae56e..5ece2bf541d 100644
--- a/include/sound/timer.h
+++ b/include/sound/timer.h
@@ -26,20 +26,6 @@
 #include <sound/asound.h>
 #include <linux/interrupt.h>
 
-typedef enum sndrv_timer_class snd_timer_class_t;
-typedef enum sndrv_timer_slave_class snd_timer_slave_class_t;
-typedef enum sndrv_timer_global snd_timer_global_t;
-typedef struct sndrv_timer_id snd_timer_id_t;
-typedef struct sndrv_timer_ginfo snd_timer_ginfo_t;
-typedef struct sndrv_timer_gparams snd_timer_gparams_t;
-typedef struct sndrv_timer_gstatus snd_timer_gstatus_t;
-typedef struct sndrv_timer_select snd_timer_select_t;
-typedef struct sndrv_timer_info snd_timer_info_t;
-typedef struct sndrv_timer_params snd_timer_params_t;
-typedef struct sndrv_timer_status snd_timer_status_t;
-typedef struct sndrv_timer_read snd_timer_read_t;
-typedef struct sndrv_timer_tread snd_timer_tread_t;
-
 #define snd_timer_chip(timer) ((timer)->private_data)
 
 #define SNDRV_TIMER_DEVICES	16
@@ -64,11 +50,9 @@ typedef struct sndrv_timer_tread snd_timer_tread_t;
 #define SNDRV_TIMER_FLG_CHANGE	0x00000001
 #define SNDRV_TIMER_FLG_RESCHED	0x00000002	/* need reschedule */
 
-typedef void (*snd_timer_callback_t) (snd_timer_instance_t * timeri, unsigned long ticks, unsigned long resolution);
-typedef void (*snd_timer_ccallback_t) (snd_timer_instance_t * timeri, enum sndrv_timer_event event,
-				       struct timespec * tstamp, unsigned long resolution);
+struct snd_timer;
 
-struct _snd_timer_hardware {
+struct snd_timer_hardware {
 	/* -- must be filled with low-level driver */
 	unsigned int flags;		/* various flags */
 	unsigned long resolution;	/* average timer resolution for one tick in nsec */
@@ -76,18 +60,18 @@ struct _snd_timer_hardware {
 	unsigned long resolution_max;	/* maximal resolution */
 	unsigned long ticks;		/* max timer ticks per interrupt */
 	/* -- low-level functions -- */
-	int (*open) (snd_timer_t * timer);
-	int (*close) (snd_timer_t * timer);
-	unsigned long (*c_resolution) (snd_timer_t * timer);
-	int (*start) (snd_timer_t * timer);
-	int (*stop) (snd_timer_t * timer);
-	int (*set_period) (snd_timer_t * timer, unsigned long period_num, unsigned long period_den);
-	int (*precise_resolution) (snd_timer_t * timer, unsigned long *num, unsigned long *den);
+	int (*open) (struct snd_timer * timer);
+	int (*close) (struct snd_timer * timer);
+	unsigned long (*c_resolution) (struct snd_timer * timer);
+	int (*start) (struct snd_timer * timer);
+	int (*stop) (struct snd_timer * timer);
+	int (*set_period) (struct snd_timer * timer, unsigned long period_num, unsigned long period_den);
+	int (*precise_resolution) (struct snd_timer * timer, unsigned long *num, unsigned long *den);
 };
 
-struct _snd_timer {
-	snd_timer_class_t tmr_class;
-	snd_card_t *card;
+struct snd_timer {
+	int tmr_class;
+	struct snd_card *card;
 	struct module *module;
 	int tmr_device;
 	int tmr_subdevice;
@@ -97,8 +81,8 @@ struct _snd_timer {
 	int running;			/* running instances */
 	unsigned long sticks;		/* schedule ticks */
 	void *private_data;
-	void (*private_free) (snd_timer_t *timer);
-	struct _snd_timer_hardware hw;
+	void (*private_free) (struct snd_timer *timer);
+	struct snd_timer_hardware hw;
 	spinlock_t lock;
 	struct list_head device_list;
 	struct list_head open_list_head;
@@ -108,49 +92,53 @@ struct _snd_timer {
 	struct tasklet_struct task_queue;
 };
 
-struct _snd_timer_instance {
-	snd_timer_t * timer;
+struct snd_timer_instance {
+	struct snd_timer *timer;
 	char *owner;
 	unsigned int flags;
 	void *private_data;
-	void (*private_free) (snd_timer_instance_t *ti);
-	snd_timer_callback_t callback;
-	snd_timer_ccallback_t ccallback;
+	void (*private_free) (struct snd_timer_instance *ti);
+	void (*callback) (struct snd_timer_instance *timeri,
+			  unsigned long ticks, unsigned long resolution);
+	void (*ccallback) (struct snd_timer_instance * timeri,
+			   int event,
+			   struct timespec * tstamp,
+			   unsigned long resolution);
 	void *callback_data;
 	unsigned long ticks;		/* auto-load ticks when expired */
 	unsigned long cticks;		/* current ticks */
 	unsigned long pticks;		/* accumulated ticks for callback */
 	unsigned long resolution;	/* current resolution for tasklet */
 	unsigned long lost;		/* lost ticks */
-	snd_timer_slave_class_t slave_class;
+	int slave_class;
 	unsigned int slave_id;
 	struct list_head open_list;
 	struct list_head active_list;
 	struct list_head ack_list;
 	struct list_head slave_list_head;
 	struct list_head slave_active_head;
-	snd_timer_instance_t *master;
+	struct snd_timer_instance *master;
 };
 
 /*
  *  Registering
  */
 
-extern int snd_timer_new(snd_card_t *card, char *id, snd_timer_id_t *tid, snd_timer_t ** rtimer);
-extern void snd_timer_notify(snd_timer_t *timer, enum sndrv_timer_event event, struct timespec *tstamp);
-extern int snd_timer_global_new(char *id, int device, snd_timer_t **rtimer);
-extern int snd_timer_global_free(snd_timer_t *timer);
-extern int snd_timer_global_register(snd_timer_t *timer);
-extern int snd_timer_global_unregister(snd_timer_t *timer);
-
-extern int snd_timer_open(snd_timer_instance_t ** ti, char *owner, snd_timer_id_t *tid, unsigned int slave_id);
-extern int snd_timer_close(snd_timer_instance_t * timeri);
-extern unsigned long snd_timer_resolution(snd_timer_instance_t * timeri);
-extern int snd_timer_start(snd_timer_instance_t * timeri, unsigned int ticks);
-extern int snd_timer_stop(snd_timer_instance_t * timeri);
-extern int snd_timer_continue(snd_timer_instance_t * timeri);
-extern int snd_timer_pause(snd_timer_instance_t * timeri);
-
-extern void snd_timer_interrupt(snd_timer_t * timer, unsigned long ticks_left);
+int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid, struct snd_timer **rtimer);
+void snd_timer_notify(struct snd_timer *timer, int event, struct timespec *tstamp);
+int snd_timer_global_new(char *id, int device, struct snd_timer **rtimer);
+int snd_timer_global_free(struct snd_timer *timer);
+int snd_timer_global_register(struct snd_timer *timer);
+int snd_timer_global_unregister(struct snd_timer *timer);
+
+int snd_timer_open(struct snd_timer_instance **ti, char *owner, struct snd_timer_id *tid, unsigned int slave_id);
+int snd_timer_close(struct snd_timer_instance *timeri);
+unsigned long snd_timer_resolution(struct snd_timer_instance *timeri);
+int snd_timer_start(struct snd_timer_instance *timeri, unsigned int ticks);
+int snd_timer_stop(struct snd_timer_instance *timeri);
+int snd_timer_continue(struct snd_timer_instance *timeri);
+int snd_timer_pause(struct snd_timer_instance *timeri);
+
+void snd_timer_interrupt(struct snd_timer *timer, unsigned long ticks_left);
 
 #endif /* __SOUND_TIMER_H */
diff --git a/sound/core/rtctimer.c b/sound/core/rtctimer.c
index c3c18568207..84704ccb182 100644
--- a/sound/core/rtctimer.c
+++ b/sound/core/rtctimer.c
@@ -40,16 +40,16 @@
 /*
  * prototypes
  */
-static int rtctimer_open(snd_timer_t *t);
-static int rtctimer_close(snd_timer_t *t);
-static int rtctimer_start(snd_timer_t *t);
-static int rtctimer_stop(snd_timer_t *t);
+static int rtctimer_open(struct snd_timer *t);
+static int rtctimer_close(struct snd_timer *t);
+static int rtctimer_start(struct snd_timer *t);
+static int rtctimer_stop(struct snd_timer *t);
 
 
 /*
  * The hardware dependent description for this timer.
  */
-static struct _snd_timer_hardware rtc_hw = {
+static struct snd_timer_hardware rtc_hw = {
 	.flags =	SNDRV_TIMER_HW_FIRST|SNDRV_TIMER_HW_AUTO,
 	.ticks =	100000000L,		/* FIXME: XXX */
 	.open =		rtctimer_open,
@@ -59,12 +59,12 @@ static struct _snd_timer_hardware rtc_hw = {
 };
 
 static int rtctimer_freq = RTC_FREQ;		/* frequency */
-static snd_timer_t *rtctimer;
+static struct snd_timer *rtctimer;
 static rtc_task_t rtc_task;
 
 
 static int
-rtctimer_open(snd_timer_t *t)
+rtctimer_open(struct snd_timer *t)
 {
 	int err;
 
@@ -76,7 +76,7 @@ rtctimer_open(snd_timer_t *t)
 }
 
 static int
-rtctimer_close(snd_timer_t *t)
+rtctimer_close(struct snd_timer *t)
 {
 	rtc_task_t *rtc = t->private_data;
 	if (rtc) {
@@ -87,7 +87,7 @@ rtctimer_close(snd_timer_t *t)
 }
 
 static int
-rtctimer_start(snd_timer_t *timer)
+rtctimer_start(struct snd_timer *timer)
 {
 	rtc_task_t *rtc = timer->private_data;
 	snd_assert(rtc != NULL, return -EINVAL);
@@ -97,7 +97,7 @@ rtctimer_start(snd_timer_t *timer)
 }
 
 static int
-rtctimer_stop(snd_timer_t *timer)
+rtctimer_stop(struct snd_timer *timer)
 {
 	rtc_task_t *rtc = timer->private_data;
 	snd_assert(rtc != NULL, return -EINVAL);
@@ -120,7 +120,7 @@ static void rtctimer_interrupt(void *private_data)
 static int __init rtctimer_init(void)
 {
 	int err;
-	snd_timer_t *timer;
+	struct snd_timer *timer;
 
 	if (rtctimer_freq < 2 || rtctimer_freq > 8192 ||
 	    (rtctimer_freq & (rtctimer_freq - 1)) != 0) {
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 1b90a38d10f..18d43a03785 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -53,8 +53,8 @@ MODULE_LICENSE("GPL");
 module_param(timer_limit, int, 0444);
 MODULE_PARM_DESC(timer_limit, "Maximum global timers in system.");
 
-typedef struct {
-	snd_timer_instance_t *timeri;
+struct snd_timer_user {
+	struct snd_timer_instance *timeri;
 	int tread;		/* enhanced read with timestamps and events */
 	unsigned long ticks;
 	unsigned long overrun;
@@ -62,8 +62,8 @@ typedef struct {
 	int qtail;
 	int qused;
 	int queue_size;
-	snd_timer_read_t *queue;
-	snd_timer_tread_t *tqueue;
+	struct snd_timer_read *queue;
+	struct snd_timer_tread *tqueue;
 	spinlock_t qlock;
 	unsigned long last_resolution;
 	unsigned int filter;
@@ -71,7 +71,7 @@ typedef struct {
 	wait_queue_head_t qchange_sleep;
 	struct fasync_struct *fasync;
 	struct semaphore tread_sem;
-} snd_timer_user_t;
+};
 
 /* list of timers */
 static LIST_HEAD(snd_timer_list);
@@ -84,21 +84,21 @@ static DEFINE_SPINLOCK(slave_active_lock);
 
 static DECLARE_MUTEX(register_mutex);
 
-static int snd_timer_free(snd_timer_t *timer);
-static int snd_timer_dev_free(snd_device_t *device);
-static int snd_timer_dev_register(snd_device_t *device);
-static int snd_timer_dev_unregister(snd_device_t *device);
+static int snd_timer_free(struct snd_timer *timer);
+static int snd_timer_dev_free(struct snd_device *device);
+static int snd_timer_dev_register(struct snd_device *device);
+static int snd_timer_dev_unregister(struct snd_device *device);
 
-static void snd_timer_reschedule(snd_timer_t * timer, unsigned long ticks_left);
+static void snd_timer_reschedule(struct snd_timer * timer, unsigned long ticks_left);
 
 /*
  * create a timer instance with the given owner string.
  * when timer is not NULL, increments the module counter
  */
-static snd_timer_instance_t *snd_timer_instance_new(char *owner,
-						    snd_timer_t *timer)
+static struct snd_timer_instance *snd_timer_instance_new(char *owner,
+							 struct snd_timer *timer)
 {
-	snd_timer_instance_t *timeri;
+	struct snd_timer_instance *timeri;
 	timeri = kzalloc(sizeof(*timeri), GFP_KERNEL);
 	if (timeri == NULL)
 		return NULL;
@@ -126,13 +126,13 @@ static snd_timer_instance_t *snd_timer_instance_new(char *owner,
 /*
  * find a timer instance from the given timer id
  */
-static snd_timer_t *snd_timer_find(snd_timer_id_t *tid)
+static struct snd_timer *snd_timer_find(struct snd_timer_id *tid)
 {
-	snd_timer_t *timer = NULL;
+	struct snd_timer *timer = NULL;
 	struct list_head *p;
 
 	list_for_each(p, &snd_timer_list) {
-		timer = list_entry(p, snd_timer_t, device_list);
+		timer = list_entry(p, struct snd_timer, device_list);
 
 		if (timer->tmr_class != tid->dev_class)
 			continue;
@@ -152,7 +152,7 @@ static snd_timer_t *snd_timer_find(snd_timer_id_t *tid)
 
 #ifdef CONFIG_KMOD
 
-static void snd_timer_request(snd_timer_id_t *tid)
+static void snd_timer_request(struct snd_timer_id *tid)
 {
 	if (! current->fs->root)
 		return;
@@ -179,17 +179,17 @@ static void snd_timer_request(snd_timer_id_t *tid)
  *
  * call this with register_mutex down.
  */
-static void snd_timer_check_slave(snd_timer_instance_t *slave)
+static void snd_timer_check_slave(struct snd_timer_instance *slave)
 {
-	snd_timer_t *timer;
-	snd_timer_instance_t *master;
+	struct snd_timer *timer;
+	struct snd_timer_instance *master;
 	struct list_head *p, *q;
 
 	/* FIXME: it's really dumb to look up all entries.. */
 	list_for_each(p, &snd_timer_list) {
-		timer = list_entry(p, snd_timer_t, device_list);
+		timer = list_entry(p, struct snd_timer, device_list);
 		list_for_each(q, &timer->open_list_head) {
-			master = list_entry(q, snd_timer_instance_t, open_list);
+			master = list_entry(q, struct snd_timer_instance, open_list);
 			if (slave->slave_class == master->slave_class &&
 			    slave->slave_id == master->slave_id) {
 				list_del(&slave->open_list);
@@ -211,14 +211,14 @@ static void snd_timer_check_slave(snd_timer_instance_t *slave)
  *
  * call this with register_mutex down.
  */
-static void snd_timer_check_master(snd_timer_instance_t *master)
+static void snd_timer_check_master(struct snd_timer_instance *master)
 {
-	snd_timer_instance_t *slave;
+	struct snd_timer_instance *slave;
 	struct list_head *p, *n;
 
 	/* check all pending slaves */
 	list_for_each_safe(p, n, &snd_timer_slave_list) {
-		slave = list_entry(p, snd_timer_instance_t, open_list);
+		slave = list_entry(p, struct snd_timer_instance, open_list);
 		if (slave->slave_class == master->slave_class &&
 		    slave->slave_id == master->slave_id) {
 			list_del(p);
@@ -238,12 +238,12 @@ static void snd_timer_check_master(snd_timer_instance_t *master)
  * open a timer instance
  * when opening a master, the slave id must be here given.
  */
-int snd_timer_open(snd_timer_instance_t **ti,
-		   char *owner, snd_timer_id_t *tid,
+int snd_timer_open(struct snd_timer_instance **ti,
+		   char *owner, struct snd_timer_id *tid,
 		   unsigned int slave_id)
 {
-	snd_timer_t *timer;
-	snd_timer_instance_t *timeri = NULL;
+	struct snd_timer *timer;
+	struct snd_timer_instance *timeri = NULL;
 
 	if (tid->dev_class == SNDRV_TIMER_CLASS_SLAVE) {
 		/* open a slave instance */
@@ -285,7 +285,7 @@ int snd_timer_open(snd_timer_instance_t **ti,
 	}
 	if (!list_empty(&timer->open_list_head)) {
 		timeri = list_entry(timer->open_list_head.next,
-				    snd_timer_instance_t, open_list);
+				    struct snd_timer_instance, open_list);
 		if (timeri->flags & SNDRV_TIMER_IFLG_EXCLUSIVE) {
 			up(&register_mutex);
 			return -EBUSY;
@@ -307,17 +307,17 @@ int snd_timer_open(snd_timer_instance_t **ti,
 	return 0;
 }
 
-static int _snd_timer_stop(snd_timer_instance_t * timeri,
-			   int keep_flag, enum sndrv_timer_event event);
+static int _snd_timer_stop(struct snd_timer_instance *timeri,
+			   int keep_flag, int event);
 
 /*
  * close a timer instance
  */
-int snd_timer_close(snd_timer_instance_t * timeri)
+int snd_timer_close(struct snd_timer_instance *timeri)
 {
-	snd_timer_t *timer = NULL;
+	struct snd_timer *timer = NULL;
 	struct list_head *p, *n;
-	snd_timer_instance_t *slave;
+	struct snd_timer_instance *slave;
 
 	snd_assert(timeri != NULL, return -ENXIO);
 
@@ -353,7 +353,7 @@ int snd_timer_close(snd_timer_instance_t * timeri)
 			timer->hw.close(timer);
 		/* remove slave links */
 		list_for_each_safe(p, n, &timeri->slave_list_head) {
-			slave = list_entry(p, snd_timer_instance_t, open_list);
+			slave = list_entry(p, struct snd_timer_instance, open_list);
 			spin_lock_irq(&slave_active_lock);
 			_snd_timer_stop(slave, 1, SNDRV_TIMER_EVENT_RESOLUTION);
 			list_del(p);
@@ -373,9 +373,9 @@ int snd_timer_close(snd_timer_instance_t * timeri)
 	return 0;
 }
 
-unsigned long snd_timer_resolution(snd_timer_instance_t * timeri)
+unsigned long snd_timer_resolution(struct snd_timer_instance *timeri)
 {
-	snd_timer_t * timer;
+	struct snd_timer * timer;
 
 	if (timeri == NULL)
 		return 0;
@@ -387,13 +387,12 @@ unsigned long snd_timer_resolution(snd_timer_instance_t * timeri)
 	return 0;
 }
 
-static void snd_timer_notify1(snd_timer_instance_t *ti,
-			      enum sndrv_timer_event event)
+static void snd_timer_notify1(struct snd_timer_instance *ti, int event)
 {
-	snd_timer_t *timer;
+	struct snd_timer *timer;
 	unsigned long flags;
 	unsigned long resolution = 0;
-	snd_timer_instance_t *ts;
+	struct snd_timer_instance *ts;
 	struct list_head *n;
 	struct timespec tstamp;
 
@@ -414,14 +413,14 @@ static void snd_timer_notify1(snd_timer_instance_t *ti,
 		return;
 	spin_lock_irqsave(&timer->lock, flags);
 	list_for_each(n, &ti->slave_active_head) {
-		ts = list_entry(n, snd_timer_instance_t, active_list);
+		ts = list_entry(n, struct snd_timer_instance, active_list);
 		if (ts->ccallback)
 			ts->ccallback(ti, event + 100, &tstamp, resolution);
 	}
 	spin_unlock_irqrestore(&timer->lock, flags);
 }
 
-static int snd_timer_start1(snd_timer_t *timer, snd_timer_instance_t *timeri,
+static int snd_timer_start1(struct snd_timer *timer, struct snd_timer_instance *timeri,
 			    unsigned long sticks)
 {
 	list_del(&timeri->active_list);
@@ -442,7 +441,7 @@ static int snd_timer_start1(snd_timer_t *timer, snd_timer_instance_t *timeri,
 	}
 }
 
-static int snd_timer_start_slave(snd_timer_instance_t *timeri)
+static int snd_timer_start_slave(struct snd_timer_instance *timeri)
 {
 	unsigned long flags;
 
@@ -458,9 +457,9 @@ static int snd_timer_start_slave(snd_timer_instance_t *timeri)
 /*
  *  start the timer instance
  */
-int snd_timer_start(snd_timer_instance_t * timeri, unsigned int ticks)
+int snd_timer_start(struct snd_timer_instance *timeri, unsigned int ticks)
 {
-	snd_timer_t *timer;
+	struct snd_timer *timer;
 	int result = -EINVAL;
 	unsigned long flags;
 
@@ -483,10 +482,10 @@ int snd_timer_start(snd_timer_instance_t * timeri, unsigned int ticks)
 	return result;
 }
 
-static int _snd_timer_stop(snd_timer_instance_t * timeri,
-			   int keep_flag, enum sndrv_timer_event event)
+static int _snd_timer_stop(struct snd_timer_instance * timeri,
+			   int keep_flag, int event)
 {
-	snd_timer_t *timer;
+	struct snd_timer *timer;
 	unsigned long flags;
 
 	snd_assert(timeri != NULL, return -ENXIO);
@@ -532,9 +531,9 @@ static int _snd_timer_stop(snd_timer_instance_t * timeri,
  *
  * do not call this from the timer callback!
  */
-int snd_timer_stop(snd_timer_instance_t * timeri)
+int snd_timer_stop(struct snd_timer_instance *timeri)
 {
-	snd_timer_t *timer;
+	struct snd_timer *timer;
 	unsigned long flags;
 	int err;
 
@@ -552,9 +551,9 @@ int snd_timer_stop(snd_timer_instance_t * timeri)
 /*
  * start again..  the tick is kept.
  */
-int snd_timer_continue(snd_timer_instance_t * timeri)
+int snd_timer_continue(struct snd_timer_instance *timeri)
 {
-	snd_timer_t *timer;
+	struct snd_timer *timer;
 	int result = -EINVAL;
 	unsigned long flags;
 
@@ -578,7 +577,7 @@ int snd_timer_continue(snd_timer_instance_t * timeri)
 /*
  * pause.. remember the ticks left
  */
-int snd_timer_pause(snd_timer_instance_t * timeri)
+int snd_timer_pause(struct snd_timer_instance * timeri)
 {
 	return _snd_timer_stop(timeri, 0, SNDRV_TIMER_EVENT_PAUSE);
 }
@@ -589,14 +588,14 @@ int snd_timer_pause(snd_timer_instance_t * timeri)
  * start pending instances and check the scheduling ticks.
  * when the scheduling ticks is changed set CHANGE flag to reprogram the timer.
  */
-static void snd_timer_reschedule(snd_timer_t * timer, unsigned long ticks_left)
+static void snd_timer_reschedule(struct snd_timer * timer, unsigned long ticks_left)
 {
-	snd_timer_instance_t *ti;
+	struct snd_timer_instance *ti;
 	unsigned long ticks = ~0UL;
 	struct list_head *p;
 
 	list_for_each(p, &timer->active_list_head) {
-		ti = list_entry(p, snd_timer_instance_t, active_list);
+		ti = list_entry(p, struct snd_timer_instance, active_list);
 		if (ti->flags & SNDRV_TIMER_IFLG_START) {
 			ti->flags &= ~SNDRV_TIMER_IFLG_START;
 			ti->flags |= SNDRV_TIMER_IFLG_RUNNING;
@@ -624,8 +623,8 @@ static void snd_timer_reschedule(snd_timer_t * timer, unsigned long ticks_left)
  */
 static void snd_timer_tasklet(unsigned long arg)
 {
-	snd_timer_t *timer = (snd_timer_t *) arg;
-	snd_timer_instance_t *ti;
+	struct snd_timer *timer = (struct snd_timer *) arg;
+	struct snd_timer_instance *ti;
 	struct list_head *p;
 	unsigned long resolution, ticks;
 
@@ -633,7 +632,7 @@ static void snd_timer_tasklet(unsigned long arg)
 	/* now process all callbacks */
 	while (!list_empty(&timer->sack_list_head)) {
 		p = timer->sack_list_head.next;		/* get first item */
-		ti = list_entry(p, snd_timer_instance_t, ack_list);
+		ti = list_entry(p, struct snd_timer_instance, ack_list);
 
 		/* remove from ack_list and make empty */
 		list_del_init(p);
@@ -658,9 +657,9 @@ static void snd_timer_tasklet(unsigned long arg)
  * ticks_left is usually equal to timer->sticks.
  *
  */
-void snd_timer_interrupt(snd_timer_t * timer, unsigned long ticks_left)
+void snd_timer_interrupt(struct snd_timer * timer, unsigned long ticks_left)
 {
-	snd_timer_instance_t *ti, *ts;
+	struct snd_timer_instance *ti, *ts;
 	unsigned long resolution, ticks;
 	struct list_head *p, *q, *n, *ack_list_head;
 	int use_tasklet = 0;
@@ -682,7 +681,7 @@ void snd_timer_interrupt(snd_timer_t * timer, unsigned long ticks_left)
 	 * is called.
 	 */
 	list_for_each_safe(p, n, &timer->active_list_head) {
-		ti = list_entry(p, snd_timer_instance_t, active_list);
+		ti = list_entry(p, struct snd_timer_instance, active_list);
 		if (!(ti->flags & SNDRV_TIMER_IFLG_RUNNING))
 			continue;
 		ti->pticks += ticks_left;
@@ -708,7 +707,7 @@ void snd_timer_interrupt(snd_timer_t * timer, unsigned long ticks_left)
 		if (list_empty(&ti->ack_list))
 			list_add_tail(&ti->ack_list, ack_list_head);
 		list_for_each(q, &ti->slave_active_head) {
-			ts = list_entry(q, snd_timer_instance_t, active_list);
+			ts = list_entry(q, struct snd_timer_instance, active_list);
 			ts->pticks = ti->pticks;
 			ts->resolution = resolution;
 			if (list_empty(&ts->ack_list))
@@ -735,7 +734,7 @@ void snd_timer_interrupt(snd_timer_t * timer, unsigned long ticks_left)
 	/* now process all fast callbacks */
 	while (!list_empty(&timer->ack_list_head)) {
 		p = timer->ack_list_head.next;		/* get first item */
-		ti = list_entry(p, snd_timer_instance_t, ack_list);
+		ti = list_entry(p, struct snd_timer_instance, ack_list);
 
 		/* remove from ack_list and make empty */
 		list_del_init(p);
@@ -763,12 +762,12 @@ void snd_timer_interrupt(snd_timer_t * timer, unsigned long ticks_left)
 
  */
 
-int snd_timer_new(snd_card_t *card, char *id, snd_timer_id_t *tid,
-		  snd_timer_t **rtimer)
+int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid,
+		  struct snd_timer **rtimer)
 {
-	snd_timer_t *timer;
+	struct snd_timer *timer;
 	int err;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free = snd_timer_dev_free,
 		.dev_register = snd_timer_dev_register,
 		.dev_unregister = snd_timer_dev_unregister
@@ -806,7 +805,7 @@ int snd_timer_new(snd_card_t *card, char *id, snd_timer_id_t *tid,
 	return 0;
 }
 
-static int snd_timer_free(snd_timer_t *timer)
+static int snd_timer_free(struct snd_timer *timer)
 {
 	snd_assert(timer != NULL, return -ENXIO);
 	if (timer->private_free)
@@ -815,16 +814,16 @@ static int snd_timer_free(snd_timer_t *timer)
 	return 0;
 }
 
-static int snd_timer_dev_free(snd_device_t *device)
+static int snd_timer_dev_free(struct snd_device *device)
 {
-	snd_timer_t *timer = device->device_data;
+	struct snd_timer *timer = device->device_data;
 	return snd_timer_free(timer);
 }
 
-static int snd_timer_dev_register(snd_device_t *dev)
+static int snd_timer_dev_register(struct snd_device *dev)
 {
-	snd_timer_t *timer = dev->device_data;
-	snd_timer_t *timer1;
+	struct snd_timer *timer = dev->device_data;
+	struct snd_timer *timer1;
 	struct list_head *p;
 
 	snd_assert(timer != NULL && timer->hw.start != NULL &&
@@ -835,7 +834,7 @@ static int snd_timer_dev_register(snd_device_t *dev)
 
 	down(&register_mutex);
 	list_for_each(p, &snd_timer_list) {
-		timer1 = list_entry(p, snd_timer_t, device_list);
+		timer1 = list_entry(p, struct snd_timer, device_list);
 		if (timer1->tmr_class > timer->tmr_class)
 			break;
 		if (timer1->tmr_class < timer->tmr_class)
@@ -863,10 +862,10 @@ static int snd_timer_dev_register(snd_device_t *dev)
 	return 0;
 }
 
-static int snd_timer_unregister(snd_timer_t *timer)
+static int snd_timer_unregister(struct snd_timer *timer)
 {
 	struct list_head *p, *n;
-	snd_timer_instance_t *ti;
+	struct snd_timer_instance *ti;
 
 	snd_assert(timer != NULL, return -ENXIO);
 	down(&register_mutex);
@@ -874,7 +873,7 @@ static int snd_timer_unregister(snd_timer_t *timer)
 		snd_printk(KERN_WARNING "timer 0x%lx is busy?\n", (long)timer);
 		list_for_each_safe(p, n, &timer->open_list_head) {
 			list_del_init(p);
-			ti = list_entry(p, snd_timer_instance_t, open_list);
+			ti = list_entry(p, struct snd_timer_instance, open_list);
 			ti->timer = NULL;
 		}
 	}
@@ -883,18 +882,17 @@ static int snd_timer_unregister(snd_timer_t *timer)
 	return snd_timer_free(timer);
 }
 
-static int snd_timer_dev_unregister(snd_device_t *device)
+static int snd_timer_dev_unregister(struct snd_device *device)
 {
-	snd_timer_t *timer = device->device_data;
+	struct snd_timer *timer = device->device_data;
 	return snd_timer_unregister(timer);
 }
 
-void snd_timer_notify(snd_timer_t *timer, enum sndrv_timer_event event,
-		      struct timespec *tstamp)
+void snd_timer_notify(struct snd_timer *timer, int event, struct timespec *tstamp)
 {
 	unsigned long flags;
 	unsigned long resolution = 0;
-	snd_timer_instance_t *ti, *ts;
+	struct snd_timer_instance *ti, *ts;
 	struct list_head *p, *n;
 
 	if (! (timer->hw.flags & SNDRV_TIMER_HW_SLAVE))
@@ -911,11 +909,11 @@ void snd_timer_notify(snd_timer_t *timer, enum sndrv_timer_event event,
 			resolution = timer->hw.resolution;
 	}
 	list_for_each(p, &timer->active_list_head) {
-		ti = list_entry(p, snd_timer_instance_t, active_list);
+		ti = list_entry(p, struct snd_timer_instance, active_list);
 		if (ti->ccallback)
 			ti->ccallback(ti, event, tstamp, resolution);
 		list_for_each(n, &ti->slave_active_head) {
-			ts = list_entry(n, snd_timer_instance_t, active_list);
+			ts = list_entry(n, struct snd_timer_instance, active_list);
 			if (ts->ccallback)
 				ts->ccallback(ts, event, tstamp, resolution);
 		}
@@ -926,9 +924,9 @@ void snd_timer_notify(snd_timer_t *timer, enum sndrv_timer_event event,
 /*
  * exported functions for global timers
  */
-int snd_timer_global_new(char *id, int device, snd_timer_t **rtimer)
+int snd_timer_global_new(char *id, int device, struct snd_timer **rtimer)
 {
-	snd_timer_id_t tid;
+	struct snd_timer_id tid;
 
 	tid.dev_class = SNDRV_TIMER_CLASS_GLOBAL;
 	tid.dev_sclass = SNDRV_TIMER_SCLASS_NONE;
@@ -938,21 +936,21 @@ int snd_timer_global_new(char *id, int device, snd_timer_t **rtimer)
 	return snd_timer_new(NULL, id, &tid, rtimer);
 }
 
-int snd_timer_global_free(snd_timer_t *timer)
+int snd_timer_global_free(struct snd_timer *timer)
 {
 	return snd_timer_free(timer);
 }
 
-int snd_timer_global_register(snd_timer_t *timer)
+int snd_timer_global_register(struct snd_timer *timer)
 {
-	snd_device_t dev;
+	struct snd_device dev;
 
 	memset(&dev, 0, sizeof(dev));
 	dev.device_data = timer;
 	return snd_timer_dev_register(&dev);
 }
 
-int snd_timer_global_unregister(snd_timer_t *timer)
+int snd_timer_global_unregister(struct snd_timer *timer)
 {
 	return snd_timer_unregister(timer);
 }
@@ -971,7 +969,7 @@ struct snd_timer_system_private {
 
 static void snd_timer_s_function(unsigned long data)
 {
-	snd_timer_t *timer = (snd_timer_t *)data;
+	struct snd_timer *timer = (struct snd_timer *)data;
 	struct snd_timer_system_private *priv = timer->private_data;
 	unsigned long jiff = jiffies;
 	if (time_after(jiff, priv->last_expires))
@@ -979,7 +977,7 @@ static void snd_timer_s_function(unsigned long data)
 	snd_timer_interrupt(timer, (long)jiff - (long)priv->last_jiffies);
 }
 
-static int snd_timer_s_start(snd_timer_t * timer)
+static int snd_timer_s_start(struct snd_timer * timer)
 {
 	struct snd_timer_system_private *priv;
 	unsigned long njiff;
@@ -998,7 +996,7 @@ static int snd_timer_s_start(snd_timer_t * timer)
 	return 0;
 }
 
-static int snd_timer_s_stop(snd_timer_t * timer)
+static int snd_timer_s_stop(struct snd_timer * timer)
 {
 	struct snd_timer_system_private *priv;
 	unsigned long jiff;
@@ -1013,7 +1011,7 @@ static int snd_timer_s_stop(snd_timer_t * timer)
 	return 0;
 }
 
-static struct _snd_timer_hardware snd_timer_system =
+static struct snd_timer_hardware snd_timer_system =
 {
 	.flags =	SNDRV_TIMER_HW_FIRST | SNDRV_TIMER_HW_TASKLET,
 	.resolution =	1000000000L / HZ,
@@ -1022,14 +1020,14 @@ static struct _snd_timer_hardware snd_timer_system =
 	.stop =		snd_timer_s_stop
 };
 
-static void snd_timer_free_system(snd_timer_t *timer)
+static void snd_timer_free_system(struct snd_timer *timer)
 {
 	kfree(timer->private_data);
 }
 
 static int snd_timer_register_system(void)
 {
-	snd_timer_t *timer;
+	struct snd_timer *timer;
 	struct snd_timer_system_private *priv;
 	int err;
 
@@ -1055,17 +1053,17 @@ static int snd_timer_register_system(void)
  *  Info interface
  */
 
-static void snd_timer_proc_read(snd_info_entry_t *entry,
-				snd_info_buffer_t * buffer)
+static void snd_timer_proc_read(struct snd_info_entry *entry,
+				struct snd_info_buffer *buffer)
 {
 	unsigned long flags;
-	snd_timer_t *timer;
-	snd_timer_instance_t *ti;
+	struct snd_timer *timer;
+	struct snd_timer_instance *ti;
 	struct list_head *p, *q;
 
 	down(&register_mutex);
 	list_for_each(p, &snd_timer_list) {
-		timer = list_entry(p, snd_timer_t, device_list);
+		timer = list_entry(p, struct snd_timer, device_list);
 		switch (timer->tmr_class) {
 		case SNDRV_TIMER_CLASS_GLOBAL:
 			snd_iprintf(buffer, "G%i: ", timer->tmr_device);
@@ -1094,7 +1092,7 @@ static void snd_timer_proc_read(snd_info_entry_t *entry,
 		snd_iprintf(buffer, "\n");
 		spin_lock_irqsave(&timer->lock, flags);
 		list_for_each(q, &timer->open_list_head) {
-			ti = list_entry(q, snd_timer_instance_t, open_list);
+			ti = list_entry(q, struct snd_timer_instance, open_list);
 			snd_iprintf(buffer, "  Client %s : %s\n",
 				    ti->owner ? ti->owner : "unknown",
 				    ti->flags & (SNDRV_TIMER_IFLG_START |
@@ -1110,12 +1108,12 @@ static void snd_timer_proc_read(snd_info_entry_t *entry,
  *  USER SPACE interface
  */
 
-static void snd_timer_user_interrupt(snd_timer_instance_t *timeri,
+static void snd_timer_user_interrupt(struct snd_timer_instance *timeri,
 				     unsigned long resolution,
 				     unsigned long ticks)
 {
-	snd_timer_user_t *tu = timeri->callback_data;
-	snd_timer_read_t *r;
+	struct snd_timer_user *tu = timeri->callback_data;
+	struct snd_timer_read *r;
 	int prev;
 
 	spin_lock(&tu->qlock);
@@ -1142,8 +1140,8 @@ static void snd_timer_user_interrupt(snd_timer_instance_t *timeri,
 	wake_up(&tu->qchange_sleep);
 }
 
-static void snd_timer_user_append_to_tqueue(snd_timer_user_t *tu,
-					    snd_timer_tread_t *tread)
+static void snd_timer_user_append_to_tqueue(struct snd_timer_user *tu,
+					    struct snd_timer_tread *tread)
 {
 	if (tu->qused >= tu->queue_size) {
 		tu->overrun++;
@@ -1154,13 +1152,13 @@ static void snd_timer_user_append_to_tqueue(snd_timer_user_t *tu,
 	}
 }
 
-static void snd_timer_user_ccallback(snd_timer_instance_t *timeri,
-				     enum sndrv_timer_event event,
+static void snd_timer_user_ccallback(struct snd_timer_instance *timeri,
+				     int event,
 				     struct timespec *tstamp,
 				     unsigned long resolution)
 {
-	snd_timer_user_t *tu = timeri->callback_data;
-	snd_timer_tread_t r1;
+	struct snd_timer_user *tu = timeri->callback_data;
+	struct snd_timer_tread r1;
 
 	if (event >= SNDRV_TIMER_EVENT_START &&
 	    event <= SNDRV_TIMER_EVENT_PAUSE)
@@ -1177,12 +1175,12 @@ static void snd_timer_user_ccallback(snd_timer_instance_t *timeri,
 	wake_up(&tu->qchange_sleep);
 }
 
-static void snd_timer_user_tinterrupt(snd_timer_instance_t *timeri,
+static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri,
 				      unsigned long resolution,
 				      unsigned long ticks)
 {
-	snd_timer_user_t *tu = timeri->callback_data;
-	snd_timer_tread_t *r, r1;
+	struct snd_timer_user *tu = timeri->callback_data;
+	struct snd_timer_tread *r, r1;
 	struct timespec tstamp;
 	int prev, append = 0;
 
@@ -1233,7 +1231,7 @@ static void snd_timer_user_tinterrupt(snd_timer_instance_t *timeri,
 
 static int snd_timer_user_open(struct inode *inode, struct file *file)
 {
-	snd_timer_user_t *tu;
+	struct snd_timer_user *tu;
 
 	tu = kzalloc(sizeof(*tu), GFP_KERNEL);
 	if (tu == NULL)
@@ -1243,7 +1241,7 @@ static int snd_timer_user_open(struct inode *inode, struct file *file)
 	init_MUTEX(&tu->tread_sem);
 	tu->ticks = 1;
 	tu->queue_size = 128;
-	tu->queue = kmalloc(tu->queue_size * sizeof(snd_timer_read_t),
+	tu->queue = kmalloc(tu->queue_size * sizeof(struct snd_timer_read),
 			    GFP_KERNEL);
 	if (tu->queue == NULL) {
 		kfree(tu);
@@ -1255,7 +1253,7 @@ static int snd_timer_user_open(struct inode *inode, struct file *file)
 
 static int snd_timer_user_release(struct inode *inode, struct file *file)
 {
-	snd_timer_user_t *tu;
+	struct snd_timer_user *tu;
 
 	if (file->private_data) {
 		tu = file->private_data;
@@ -1270,7 +1268,7 @@ static int snd_timer_user_release(struct inode *inode, struct file *file)
 	return 0;
 }
 
-static void snd_timer_user_zero_id(snd_timer_id_t *id)
+static void snd_timer_user_zero_id(struct snd_timer_id *id)
 {
 	id->dev_class = SNDRV_TIMER_CLASS_NONE;
 	id->dev_sclass = SNDRV_TIMER_SCLASS_NONE;
@@ -1279,7 +1277,7 @@ static void snd_timer_user_zero_id(snd_timer_id_t *id)
 	id->subdevice = -1;
 }
 
-static void snd_timer_user_copy_id(snd_timer_id_t *id, snd_timer_t *timer)
+static void snd_timer_user_copy_id(struct snd_timer_id *id, struct snd_timer *timer)
 {
 	id->dev_class = timer->tmr_class;
 	id->dev_sclass = SNDRV_TIMER_SCLASS_NONE;
@@ -1288,10 +1286,10 @@ static void snd_timer_user_copy_id(snd_timer_id_t *id, snd_timer_t *timer)
 	id->subdevice = timer->tmr_subdevice;
 }
 
-static int snd_timer_user_next_device(snd_timer_id_t __user *_tid)
+static int snd_timer_user_next_device(struct snd_timer_id __user *_tid)
 {
-	snd_timer_id_t id;
-	snd_timer_t *timer;
+	struct snd_timer_id id;
+	struct snd_timer *timer;
 	struct list_head *p;
 
 	if (copy_from_user(&id, _tid, sizeof(id)))
@@ -1302,7 +1300,7 @@ static int snd_timer_user_next_device(snd_timer_id_t __user *_tid)
 			snd_timer_user_zero_id(&id);
 		else {
 			timer = list_entry(snd_timer_list.next,
-					   snd_timer_t, device_list);
+					   struct snd_timer, device_list);
 			snd_timer_user_copy_id(&id, timer);
 		}
 	} else {
@@ -1310,7 +1308,7 @@ static int snd_timer_user_next_device(snd_timer_id_t __user *_tid)
 		case SNDRV_TIMER_CLASS_GLOBAL:
 			id.device = id.device < 0 ? 0 : id.device + 1;
 			list_for_each(p, &snd_timer_list) {
-				timer = list_entry(p, snd_timer_t, device_list);
+				timer = list_entry(p, struct snd_timer, device_list);
 				if (timer->tmr_class > SNDRV_TIMER_CLASS_GLOBAL) {
 					snd_timer_user_copy_id(&id, timer);
 					break;
@@ -1343,7 +1341,7 @@ static int snd_timer_user_next_device(snd_timer_id_t __user *_tid)
 				}
 			}
 			list_for_each(p, &snd_timer_list) {
-				timer = list_entry(p, snd_timer_t, device_list);
+				timer = list_entry(p, struct snd_timer, device_list);
 				if (timer->tmr_class > id.dev_class) {
 					snd_timer_user_copy_id(&id, timer);
 					break;
@@ -1385,11 +1383,11 @@ static int snd_timer_user_next_device(snd_timer_id_t __user *_tid)
 }
 
 static int snd_timer_user_ginfo(struct file *file,
-				snd_timer_ginfo_t __user *_ginfo)
+				struct snd_timer_ginfo __user *_ginfo)
 {
-	snd_timer_ginfo_t *ginfo;
-	snd_timer_id_t tid;
-	snd_timer_t *t;
+	struct snd_timer_ginfo *ginfo;
+	struct snd_timer_id tid;
+	struct snd_timer *t;
 	struct list_head *p;
 	int err = 0;
 
@@ -1430,10 +1428,10 @@ static int snd_timer_user_ginfo(struct file *file,
 }
 
 static int snd_timer_user_gparams(struct file *file,
-				  snd_timer_gparams_t __user *_gparams)
+				  struct snd_timer_gparams __user *_gparams)
 {
-	snd_timer_gparams_t gparams;
-	snd_timer_t *t;
+	struct snd_timer_gparams gparams;
+	struct snd_timer *t;
 	int err;
 
 	if (copy_from_user(&gparams, _gparams, sizeof(gparams)))
@@ -1459,11 +1457,11 @@ _error:
 }
 
 static int snd_timer_user_gstatus(struct file *file,
-				  snd_timer_gstatus_t __user *_gstatus)
+				  struct snd_timer_gstatus __user *_gstatus)
 {
-	snd_timer_gstatus_t gstatus;
-	snd_timer_id_t tid;
-	snd_timer_t *t;
+	struct snd_timer_gstatus gstatus;
+	struct snd_timer_id tid;
+	struct snd_timer *t;
 	int err = 0;
 
 	if (copy_from_user(&gstatus, _gstatus, sizeof(gstatus)))
@@ -1495,10 +1493,10 @@ static int snd_timer_user_gstatus(struct file *file,
 }
 
 static int snd_timer_user_tselect(struct file *file,
-				  snd_timer_select_t __user *_tselect)
+				  struct snd_timer_select __user *_tselect)
 {
-	snd_timer_user_t *tu;
-	snd_timer_select_t tselect;
+	struct snd_timer_user *tu;
+	struct snd_timer_select tselect;
 	char str[32];
 	int err = 0;
 
@@ -1524,12 +1522,12 @@ static int snd_timer_user_tselect(struct file *file,
 	kfree(tu->tqueue);
 	tu->tqueue = NULL;
 	if (tu->tread) {
-		tu->tqueue = kmalloc(tu->queue_size * sizeof(snd_timer_tread_t),
+		tu->tqueue = kmalloc(tu->queue_size * sizeof(struct snd_timer_tread),
 				     GFP_KERNEL);
 		if (tu->tqueue == NULL)
 			err = -ENOMEM;
 	} else {
-		tu->queue = kmalloc(tu->queue_size * sizeof(snd_timer_read_t),
+		tu->queue = kmalloc(tu->queue_size * sizeof(struct snd_timer_read),
 				    GFP_KERNEL);
 		if (tu->queue == NULL)
 			err = -ENOMEM;
@@ -1552,11 +1550,11 @@ static int snd_timer_user_tselect(struct file *file,
 }
 
 static int snd_timer_user_info(struct file *file,
-			       snd_timer_info_t __user *_info)
+			       struct snd_timer_info __user *_info)
 {
-	snd_timer_user_t *tu;
-	snd_timer_info_t *info;
-	snd_timer_t *t;
+	struct snd_timer_user *tu;
+	struct snd_timer_info *info;
+	struct snd_timer *t;
 	int err = 0;
 
 	tu = file->private_data;
@@ -1580,13 +1578,13 @@ static int snd_timer_user_info(struct file *file,
 }
 
 static int snd_timer_user_params(struct file *file,
-				 snd_timer_params_t __user *_params)
+				 struct snd_timer_params __user *_params)
 {
-	snd_timer_user_t *tu;
-	snd_timer_params_t params;
-	snd_timer_t *t;
-	snd_timer_read_t *tr;
-	snd_timer_tread_t *ttr;
+	struct snd_timer_user *tu;
+	struct snd_timer_params params;
+	struct snd_timer *t;
+	struct snd_timer_read *tr;
+	struct snd_timer_tread *ttr;
 	int err;
 
 	tu = file->private_data;
@@ -1656,14 +1654,14 @@ static int snd_timer_user_params(struct file *file,
 	tu->qhead = tu->qtail = tu->qused = 0;
 	if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
 		if (tu->tread) {
-			snd_timer_tread_t tread;
+			struct snd_timer_tread tread;
 			tread.event = SNDRV_TIMER_EVENT_EARLY;
 			tread.tstamp.tv_sec = 0;
 			tread.tstamp.tv_nsec = 0;
 			tread.val = 0;
 			snd_timer_user_append_to_tqueue(tu, &tread);
 		} else {
-			snd_timer_read_t *r = &tu->queue[0];
+			struct snd_timer_read *r = &tu->queue[0];
 			r->resolution = 0;
 			r->ticks = 0;
 			tu->qused++;
@@ -1680,10 +1678,10 @@ static int snd_timer_user_params(struct file *file,
 }
 
 static int snd_timer_user_status(struct file *file,
-				 snd_timer_status_t __user *_status)
+				 struct snd_timer_status __user *_status)
 {
-	snd_timer_user_t *tu;
-	snd_timer_status_t status;
+	struct snd_timer_user *tu;
+	struct snd_timer_status status;
 
 	tu = file->private_data;
 	snd_assert(tu->timeri != NULL, return -ENXIO);
@@ -1703,7 +1701,7 @@ static int snd_timer_user_status(struct file *file,
 static int snd_timer_user_start(struct file *file)
 {
 	int err;
-	snd_timer_user_t *tu;
+	struct snd_timer_user *tu;
 
 	tu = file->private_data;
 	snd_assert(tu->timeri != NULL, return -ENXIO);
@@ -1716,7 +1714,7 @@ static int snd_timer_user_start(struct file *file)
 static int snd_timer_user_stop(struct file *file)
 {
 	int err;
-	snd_timer_user_t *tu;
+	struct snd_timer_user *tu;
 
 	tu = file->private_data;
 	snd_assert(tu->timeri != NULL, return -ENXIO);
@@ -1726,7 +1724,7 @@ static int snd_timer_user_stop(struct file *file)
 static int snd_timer_user_continue(struct file *file)
 {
 	int err;
-	snd_timer_user_t *tu;
+	struct snd_timer_user *tu;
 
 	tu = file->private_data;
 	snd_assert(tu->timeri != NULL, return -ENXIO);
@@ -1737,7 +1735,7 @@ static int snd_timer_user_continue(struct file *file)
 static int snd_timer_user_pause(struct file *file)
 {
 	int err;
-	snd_timer_user_t *tu;
+	struct snd_timer_user *tu;
 
 	tu = file->private_data;
 	snd_assert(tu->timeri != NULL, return -ENXIO);
@@ -1754,7 +1752,7 @@ enum {
 static long snd_timer_user_ioctl(struct file *file, unsigned int cmd,
 				 unsigned long arg)
 {
-	snd_timer_user_t *tu;
+	struct snd_timer_user *tu;
 	void __user *argp = (void __user *)arg;
 	int __user *p = argp;
 
@@ -1813,7 +1811,7 @@ static long snd_timer_user_ioctl(struct file *file, unsigned int cmd,
 
 static int snd_timer_user_fasync(int fd, struct file * file, int on)
 {
-	snd_timer_user_t *tu;
+	struct snd_timer_user *tu;
 	int err;
 
 	tu = file->private_data;
@@ -1826,12 +1824,12 @@ static int snd_timer_user_fasync(int fd, struct file * file, int on)
 static ssize_t snd_timer_user_read(struct file *file, char __user *buffer,
 				   size_t count, loff_t *offset)
 {
-	snd_timer_user_t *tu;
+	struct snd_timer_user *tu;
 	long result = 0, unit;
 	int err = 0;
 
 	tu = file->private_data;
-	unit = tu->tread ? sizeof(snd_timer_tread_t) : sizeof(snd_timer_read_t);
+	unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
 	spin_lock_irq(&tu->qlock);
 	while ((long)count - result >= unit) {
 		while (!tu->qused) {
@@ -1864,13 +1862,13 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer,
 
 		if (tu->tread) {
 			if (copy_to_user(buffer, &tu->tqueue[tu->qhead++],
-					 sizeof(snd_timer_tread_t))) {
+					 sizeof(struct snd_timer_tread))) {
 				err = -EFAULT;
 				goto _error;
 			}
 		} else {
 			if (copy_to_user(buffer, &tu->queue[tu->qhead++],
-					 sizeof(snd_timer_read_t))) {
+					 sizeof(struct snd_timer_read))) {
 				err = -EFAULT;
 				goto _error;
 			}
@@ -1892,7 +1890,7 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer,
 static unsigned int snd_timer_user_poll(struct file *file, poll_table * wait)
 {
         unsigned int mask;
-        snd_timer_user_t *tu;
+        struct snd_timer_user *tu;
 
         tu = file->private_data;
 
@@ -1923,7 +1921,7 @@ static struct file_operations snd_timer_f_ops =
 	.fasync = 	snd_timer_user_fasync,
 };
 
-static snd_minor_t snd_timer_reg =
+static struct snd_minor snd_timer_reg =
 {
 	.comment =	"timer",
 	.f_ops =	&snd_timer_f_ops,
@@ -1933,12 +1931,12 @@ static snd_minor_t snd_timer_reg =
  *  ENTRY functions
  */
 
-static snd_info_entry_t *snd_timer_proc_entry = NULL;
+static struct snd_info_entry *snd_timer_proc_entry = NULL;
 
 static int __init alsa_timer_init(void)
 {
 	int err;
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 #ifdef SNDRV_OSS_INFO_DEV_TIMERS
 	snd_oss_info_register(SNDRV_OSS_INFO_DEV_TIMERS, SNDRV_CARDS - 1,
@@ -1971,7 +1969,7 @@ static void __exit alsa_timer_exit(void)
 	snd_unregister_device(SNDRV_DEVICE_TYPE_TIMER, NULL, 0);
 	/* unregister the system timer */
 	list_for_each_safe(p, n, &snd_timer_list) {
-		snd_timer_t *timer = list_entry(p, snd_timer_t, device_list);
+		struct snd_timer *timer = list_entry(p, struct snd_timer, device_list);
 		snd_timer_unregister(timer);
 	}
 	if (snd_timer_proc_entry) {
diff --git a/sound/core/timer_compat.c b/sound/core/timer_compat.c
index 3de552dfe80..5512f5373c5 100644
--- a/sound/core/timer_compat.c
+++ b/sound/core/timer_compat.c
@@ -22,7 +22,7 @@
 
 #include <linux/compat.h>
 
-struct sndrv_timer_info32 {
+struct snd_timer_info32 {
 	u32 flags;
 	s32 card;
 	unsigned char id[64];
@@ -33,11 +33,11 @@ struct sndrv_timer_info32 {
 };
 
 static int snd_timer_user_info_compat(struct file *file,
-				      struct sndrv_timer_info32 __user *_info)
+				      struct snd_timer_info32 __user *_info)
 {
-	snd_timer_user_t *tu;
-	struct sndrv_timer_info32 info;
-	snd_timer_t *t;
+	struct snd_timer_user *tu;
+	struct snd_timer_info32 info;
+	struct snd_timer *t;
 
 	tu = file->private_data;
 	snd_assert(tu->timeri != NULL, return -ENXIO);
@@ -55,7 +55,7 @@ static int snd_timer_user_info_compat(struct file *file,
 	return 0;
 }
 
-struct sndrv_timer_status32 {
+struct snd_timer_status32 {
 	struct compat_timespec tstamp;
 	u32 resolution;
 	u32 lost;
@@ -65,10 +65,10 @@ struct sndrv_timer_status32 {
 };
 
 static int snd_timer_user_status_compat(struct file *file,
-					struct sndrv_timer_status32 __user *_status)
+					struct snd_timer_status32 __user *_status)
 {
-	snd_timer_user_t *tu;
-	snd_timer_status_t status;
+	struct snd_timer_user *tu;
+	struct snd_timer_status status;
 	
 	tu = file->private_data;
 	snd_assert(tu->timeri != NULL, return -ENXIO);
@@ -89,8 +89,8 @@ static int snd_timer_user_status_compat(struct file *file,
  */
 
 enum {
-	SNDRV_TIMER_IOCTL_INFO32 = _IOR('T', 0x11, struct sndrv_timer_info32),
-	SNDRV_TIMER_IOCTL_STATUS32 = _IOW('T', 0x14, struct sndrv_timer_status32),
+	SNDRV_TIMER_IOCTL_INFO32 = _IOR('T', 0x11, struct snd_timer_info32),
+	SNDRV_TIMER_IOCTL_STATUS32 = _IOW('T', 0x14, struct snd_timer_status32),
 };
 
 static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg)
-- 
cgit v1.2.3-70-g09d2


From 48c9d417d7269da2a2da5b602fcb5fdbee36305e Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 13:56:51 +0100
Subject: [ALSA] Remove xxx_t typedefs: Raw MIDI

Modules: RawMidi Midlevel

Remove xxx_t typedefs from the core raw MIDI codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/rawmidi.h     | 123 +++++++++----------
 sound/core/rawmidi.c        | 280 +++++++++++++++++++++++---------------------
 sound/core/rawmidi_compat.c |  22 ++--
 3 files changed, 220 insertions(+), 205 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h
index 3f9db510dee..9492a32c102 100644
--- a/include/sound/rawmidi.h
+++ b/include/sound/rawmidi.h
@@ -36,11 +36,6 @@
  *  Raw MIDI interface
  */
 
-typedef enum sndrv_rawmidi_stream snd_rawmidi_stream_t;
-typedef struct sndrv_rawmidi_info snd_rawmidi_info_t;
-typedef struct sndrv_rawmidi_params snd_rawmidi_params_t;
-typedef struct sndrv_rawmidi_status snd_rawmidi_status_t;
-
 #define SNDRV_RAWMIDI_DEVICES		8
 
 #define SNDRV_RAWMIDI_LFLG_OUTPUT	(1<<0)
@@ -49,23 +44,22 @@ typedef struct sndrv_rawmidi_status snd_rawmidi_status_t;
 #define SNDRV_RAWMIDI_LFLG_APPEND	(1<<2)
 #define	SNDRV_RAWMIDI_LFLG_NOOPENLOCK	(1<<3)
 
-typedef struct _snd_rawmidi_runtime snd_rawmidi_runtime_t;
-typedef struct _snd_rawmidi_substream snd_rawmidi_substream_t;
-typedef struct _snd_rawmidi_str snd_rawmidi_str_t;
+struct snd_rawmidi;
+struct snd_rawmidi_substream;
 
-typedef struct _snd_rawmidi_ops {
-	int (*open) (snd_rawmidi_substream_t * substream);
-	int (*close) (snd_rawmidi_substream_t * substream);
-	void (*trigger) (snd_rawmidi_substream_t * substream, int up);
-	void (*drain) (snd_rawmidi_substream_t * substream);
-} snd_rawmidi_ops_t;
+struct snd_rawmidi_ops {
+	int (*open) (struct snd_rawmidi_substream * substream);
+	int (*close) (struct snd_rawmidi_substream * substream);
+	void (*trigger) (struct snd_rawmidi_substream * substream, int up);
+	void (*drain) (struct snd_rawmidi_substream * substream);
+};
 
-typedef struct _snd_rawmidi_global_ops {
-	int (*dev_register) (snd_rawmidi_t * rmidi);
-	int (*dev_unregister) (snd_rawmidi_t * rmidi);
-} snd_rawmidi_global_ops_t;
+struct snd_rawmidi_global_ops {
+	int (*dev_register) (struct snd_rawmidi * rmidi);
+	int (*dev_unregister) (struct snd_rawmidi * rmidi);
+};
 
-struct _snd_rawmidi_runtime {
+struct snd_rawmidi_runtime {
 	unsigned int drain: 1,	/* drain stage */
 		     oss: 1;	/* OSS compatible mode */
 	/* midi stream buffer */
@@ -80,15 +74,15 @@ struct _snd_rawmidi_runtime {
 	spinlock_t lock;
 	wait_queue_head_t sleep;
 	/* event handler (new bytes, input only) */
-	void (*event)(snd_rawmidi_substream_t *substream);
+	void (*event)(struct snd_rawmidi_substream *substream);
 	/* defers calls to event [input] or ops->trigger [output] */
 	struct tasklet_struct tasklet;
 	/* private data */
 	void *private_data;
-	void (*private_free)(snd_rawmidi_substream_t *substream);
+	void (*private_free)(struct snd_rawmidi_substream *substream);
 };
 
-struct _snd_rawmidi_substream {
+struct snd_rawmidi_substream {
 	struct list_head list;		/* list of all substream for given stream */
 	int stream;			/* direction */
 	int number;			/* substream number */
@@ -97,28 +91,28 @@ struct _snd_rawmidi_substream {
 		     active_sensing: 1; /* send active sensing when close */
 	int use_count;			/* use counter (for output) */
 	size_t bytes;
-	snd_rawmidi_t *rmidi;
-	snd_rawmidi_str_t *pstr;
+	struct snd_rawmidi *rmidi;
+	struct snd_rawmidi_str *pstr;
 	char name[32];
-	snd_rawmidi_runtime_t *runtime;
+	struct snd_rawmidi_runtime *runtime;
 	/* hardware layer */
-	snd_rawmidi_ops_t *ops;
+	struct snd_rawmidi_ops *ops;
 };
 
-typedef struct _snd_rawmidi_file {
-	snd_rawmidi_t *rmidi;
-	snd_rawmidi_substream_t *input;
-	snd_rawmidi_substream_t *output;
-} snd_rawmidi_file_t;
+struct snd_rawmidi_file {
+	struct snd_rawmidi *rmidi;
+	struct snd_rawmidi_substream *input;
+	struct snd_rawmidi_substream *output;
+};
 
-struct _snd_rawmidi_str {
+struct snd_rawmidi_str {
 	unsigned int substream_count;
 	unsigned int substream_opened;
 	struct list_head substreams;
 };
 
-struct _snd_rawmidi {
-	snd_card_t *card;
+struct snd_rawmidi {
+	struct snd_card *card;
 
 	unsigned int device;		/* device number */
 	unsigned int info_flags;	/* SNDRV_RAWMIDI_INFO_XXXX */
@@ -129,52 +123,61 @@ struct _snd_rawmidi {
 	int ossreg;
 #endif
 
-	snd_rawmidi_global_ops_t *ops;
+	struct snd_rawmidi_global_ops *ops;
 
-	snd_rawmidi_str_t streams[2];
+	struct snd_rawmidi_str streams[2];
 
 	void *private_data;
-	void (*private_free) (snd_rawmidi_t *rmidi);
+	void (*private_free) (struct snd_rawmidi *rmidi);
 
 	struct semaphore open_mutex;
 	wait_queue_head_t open_wait;
 
-	snd_info_entry_t *dev;
-	snd_info_entry_t *proc_entry;
+	struct snd_info_entry *dev;
+	struct snd_info_entry *proc_entry;
 
 #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
-	snd_seq_device_t *seq_dev;
+	struct snd_seq_device *seq_dev;
 #endif
 };
 
 /* main rawmidi functions */
 
-int snd_rawmidi_new(snd_card_t * card, char *id, int device,
+int snd_rawmidi_new(struct snd_card *card, char *id, int device,
 		    int output_count, int input_count,
-		    snd_rawmidi_t ** rmidi);
-void snd_rawmidi_set_ops(snd_rawmidi_t * rmidi, int stream, snd_rawmidi_ops_t * ops);
+		    struct snd_rawmidi **rmidi);
+void snd_rawmidi_set_ops(struct snd_rawmidi *rmidi, int stream,
+			 struct snd_rawmidi_ops *ops);
 
 /* callbacks */
 
-void snd_rawmidi_receive_reset(snd_rawmidi_substream_t * substream);
-int snd_rawmidi_receive(snd_rawmidi_substream_t * substream, const unsigned char *buffer, int count);
-void snd_rawmidi_transmit_reset(snd_rawmidi_substream_t * substream);
-int snd_rawmidi_transmit_empty(snd_rawmidi_substream_t * substream);
-int snd_rawmidi_transmit_peek(snd_rawmidi_substream_t * substream, unsigned char *buffer, int count);
-int snd_rawmidi_transmit_ack(snd_rawmidi_substream_t * substream, int count);
-int snd_rawmidi_transmit(snd_rawmidi_substream_t * substream, unsigned char *buffer, int count);
+void snd_rawmidi_receive_reset(struct snd_rawmidi_substream *substream);
+int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,
+			const unsigned char *buffer, int count);
+void snd_rawmidi_transmit_reset(struct snd_rawmidi_substream *substream);
+int snd_rawmidi_transmit_empty(struct snd_rawmidi_substream *substream);
+int snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream,
+			      unsigned char *buffer, int count);
+int snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream, int count);
+int snd_rawmidi_transmit(struct snd_rawmidi_substream *substream,
+			 unsigned char *buffer, int count);
 
 /* main midi functions */
 
-int snd_rawmidi_info_select(snd_card_t *card, snd_rawmidi_info_t *info);
-int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice, int mode, snd_rawmidi_file_t * rfile);
-int snd_rawmidi_kernel_release(snd_rawmidi_file_t * rfile);
-int snd_rawmidi_output_params(snd_rawmidi_substream_t * substream, snd_rawmidi_params_t * params);
-int snd_rawmidi_input_params(snd_rawmidi_substream_t * substream, snd_rawmidi_params_t * params);
-int snd_rawmidi_drop_output(snd_rawmidi_substream_t * substream);
-int snd_rawmidi_drain_output(snd_rawmidi_substream_t * substream);
-int snd_rawmidi_drain_input(snd_rawmidi_substream_t * substream);
-long snd_rawmidi_kernel_read(snd_rawmidi_substream_t * substream, unsigned char *buf, long count);
-long snd_rawmidi_kernel_write(snd_rawmidi_substream_t * substream, const unsigned char *buf, long count);
+int snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info);
+int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice, int mode,
+			    struct snd_rawmidi_file *rfile);
+int snd_rawmidi_kernel_release(struct snd_rawmidi_file *rfile);
+int snd_rawmidi_output_params(struct snd_rawmidi_substream *substream,
+			      struct snd_rawmidi_params *params);
+int snd_rawmidi_input_params(struct snd_rawmidi_substream *substream,
+			     struct snd_rawmidi_params *params);
+int snd_rawmidi_drop_output(struct snd_rawmidi_substream *substream);
+int snd_rawmidi_drain_output(struct snd_rawmidi_substream *substream);
+int snd_rawmidi_drain_input(struct snd_rawmidi_substream *substream);
+long snd_rawmidi_kernel_read(struct snd_rawmidi_substream *substream,
+			     unsigned char *buf, long count);
+long snd_rawmidi_kernel_write(struct snd_rawmidi_substream *substream,
+			      const unsigned char *buf, long count);
 
 #endif /* __SOUND_RAWMIDI_H */
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index d033e61c05c..ede0a6083d2 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -50,13 +50,13 @@ module_param_array(amidi_map, int, NULL, 0444);
 MODULE_PARM_DESC(amidi_map, "Raw MIDI device number assigned to 2nd OSS device.");
 #endif /* CONFIG_SND_OSSEMUL */
 
-static int snd_rawmidi_free(snd_rawmidi_t *rawmidi);
-static int snd_rawmidi_dev_free(snd_device_t *device);
-static int snd_rawmidi_dev_register(snd_device_t *device);
-static int snd_rawmidi_dev_disconnect(snd_device_t *device);
-static int snd_rawmidi_dev_unregister(snd_device_t *device);
+static int snd_rawmidi_free(struct snd_rawmidi *rawmidi);
+static int snd_rawmidi_dev_free(struct snd_device *device);
+static int snd_rawmidi_dev_register(struct snd_device *device);
+static int snd_rawmidi_dev_disconnect(struct snd_device *device);
+static int snd_rawmidi_dev_unregister(struct snd_device *device);
 
-static snd_rawmidi_t *snd_rawmidi_devices[SNDRV_CARDS * SNDRV_RAWMIDI_DEVICES];
+static struct snd_rawmidi *snd_rawmidi_devices[SNDRV_CARDS * SNDRV_RAWMIDI_DEVICES];
 
 static DECLARE_MUTEX(register_mutex);
 
@@ -72,34 +72,35 @@ static inline unsigned short snd_rawmidi_file_flags(struct file *file)
 	}
 }
 
-static inline int snd_rawmidi_ready(snd_rawmidi_substream_t * substream)
+static inline int snd_rawmidi_ready(struct snd_rawmidi_substream *substream)
 {
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 	return runtime->avail >= runtime->avail_min;
 }
 
-static inline int snd_rawmidi_ready_append(snd_rawmidi_substream_t * substream, size_t count)
+static inline int snd_rawmidi_ready_append(struct snd_rawmidi_substream *substream,
+					   size_t count)
 {
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 	return runtime->avail >= runtime->avail_min &&
 	       (!substream->append || runtime->avail >= count);
 }
 
 static void snd_rawmidi_input_event_tasklet(unsigned long data)
 {
-	snd_rawmidi_substream_t *substream = (snd_rawmidi_substream_t *)data;
+	struct snd_rawmidi_substream *substream = (struct snd_rawmidi_substream *)data;
 	substream->runtime->event(substream);
 }
 
 static void snd_rawmidi_output_trigger_tasklet(unsigned long data)
 {
-	snd_rawmidi_substream_t *substream = (snd_rawmidi_substream_t *)data;
+	struct snd_rawmidi_substream *substream = (struct snd_rawmidi_substream *)data;
 	substream->ops->trigger(substream, 1);
 }
 
-static int snd_rawmidi_runtime_create(snd_rawmidi_substream_t * substream)
+static int snd_rawmidi_runtime_create(struct snd_rawmidi_substream *substream)
 {
-	snd_rawmidi_runtime_t *runtime;
+	struct snd_rawmidi_runtime *runtime;
 
 	if ((runtime = kzalloc(sizeof(*runtime), GFP_KERNEL)) == NULL)
 		return -ENOMEM;
@@ -129,9 +130,9 @@ static int snd_rawmidi_runtime_create(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_rawmidi_runtime_free(snd_rawmidi_substream_t * substream)
+static int snd_rawmidi_runtime_free(struct snd_rawmidi_substream *substream)
 {
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 
 	kfree(runtime->buffer);
 	kfree(runtime);
@@ -139,7 +140,7 @@ static int snd_rawmidi_runtime_free(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static inline void snd_rawmidi_output_trigger(snd_rawmidi_substream_t * substream, int up)
+static inline void snd_rawmidi_output_trigger(struct snd_rawmidi_substream *substream,int up)
 {
 	if (up) {
 		tasklet_hi_schedule(&substream->runtime->tasklet);
@@ -149,17 +150,17 @@ static inline void snd_rawmidi_output_trigger(snd_rawmidi_substream_t * substrea
 	}
 }
 
-static void snd_rawmidi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_rawmidi_input_trigger(struct snd_rawmidi_substream *substream, int up)
 {
 	substream->ops->trigger(substream, up);
 	if (!up && substream->runtime->event)
 		tasklet_kill(&substream->runtime->tasklet);
 }
 
-int snd_rawmidi_drop_output(snd_rawmidi_substream_t * substream)
+int snd_rawmidi_drop_output(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 
 	snd_rawmidi_output_trigger(substream, 0);
 	runtime->drain = 0;
@@ -170,11 +171,11 @@ int snd_rawmidi_drop_output(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-int snd_rawmidi_drain_output(snd_rawmidi_substream_t * substream)
+int snd_rawmidi_drain_output(struct snd_rawmidi_substream *substream)
 {
 	int err;
 	long timeout;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 
 	err = 0;
 	runtime->drain = 1;
@@ -199,10 +200,10 @@ int snd_rawmidi_drain_output(snd_rawmidi_substream_t * substream)
 	return err;
 }
 
-int snd_rawmidi_drain_input(snd_rawmidi_substream_t * substream)
+int snd_rawmidi_drain_input(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 
 	snd_rawmidi_input_trigger(substream, 0);
 	runtime->drain = 0;
@@ -214,12 +215,12 @@ int snd_rawmidi_drain_input(snd_rawmidi_substream_t * substream)
 }
 
 int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice,
-			    int mode, snd_rawmidi_file_t * rfile)
+			    int mode, struct snd_rawmidi_file * rfile)
 {
-	snd_rawmidi_t *rmidi;
+	struct snd_rawmidi *rmidi;
 	struct list_head *list1, *list2;
-	snd_rawmidi_substream_t *sinput = NULL, *soutput = NULL;
-	snd_rawmidi_runtime_t *input = NULL, *output = NULL;
+	struct snd_rawmidi_substream *sinput = NULL, *soutput = NULL;
+	struct snd_rawmidi_runtime *input = NULL, *output = NULL;
 	int err;
 
 	if (rfile)
@@ -275,7 +276,7 @@ int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice,
 			}
 			break;
 		}
-		sinput = list_entry(list1, snd_rawmidi_substream_t, list);
+		sinput = list_entry(list1, struct snd_rawmidi_substream, list);
 		if ((mode & SNDRV_RAWMIDI_LFLG_INPUT) && sinput->opened)
 			goto __nexti;
 		if (subdevice < 0 || (subdevice >= 0 && subdevice == sinput->number))
@@ -293,7 +294,7 @@ int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice,
 			}
 			break;
 		}
-		soutput = list_entry(list2, snd_rawmidi_substream_t, list);
+		soutput = list_entry(list2, struct snd_rawmidi_substream, list);
 		if (mode & SNDRV_RAWMIDI_LFLG_OUTPUT) {
 			if (mode & SNDRV_RAWMIDI_LFLG_APPEND) {
 				if (soutput->opened && !soutput->append)
@@ -368,15 +369,15 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
 {
 	int maj = imajor(inode);
 	int cardnum;
-	snd_card_t *card;
+	struct snd_card *card;
 	int device, subdevice;
 	unsigned short fflags;
 	int err;
-	snd_rawmidi_t *rmidi;
-	snd_rawmidi_file_t *rawmidi_file;
+	struct snd_rawmidi *rmidi;
+	struct snd_rawmidi_file *rawmidi_file;
 	wait_queue_t wait;
 	struct list_head *list;
-	snd_ctl_file_t *kctl;
+	struct snd_ctl_file *kctl;
 
 	if (maj == snd_major) {
 		cardnum = SNDRV_MINOR_CARD(iminor(inode));
@@ -465,11 +466,11 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
 	return err;
 }
 
-int snd_rawmidi_kernel_release(snd_rawmidi_file_t * rfile)
+int snd_rawmidi_kernel_release(struct snd_rawmidi_file * rfile)
 {
-	snd_rawmidi_t *rmidi;
-	snd_rawmidi_substream_t *substream;
-	snd_rawmidi_runtime_t *runtime;
+	struct snd_rawmidi *rmidi;
+	struct snd_rawmidi_substream *substream;
+	struct snd_rawmidi_runtime *runtime;
 
 	snd_assert(rfile != NULL, return -ENXIO);
 	snd_assert(rfile->input != NULL || rfile->output != NULL, return -ENXIO);
@@ -515,8 +516,8 @@ int snd_rawmidi_kernel_release(snd_rawmidi_file_t * rfile)
 
 static int snd_rawmidi_release(struct inode *inode, struct file *file)
 {
-	snd_rawmidi_file_t *rfile;
-	snd_rawmidi_t *rmidi;
+	struct snd_rawmidi_file *rfile;
+	struct snd_rawmidi *rmidi;
 	int err;
 
 	rfile = file->private_data;
@@ -528,9 +529,10 @@ static int snd_rawmidi_release(struct inode *inode, struct file *file)
 	return err;
 }
 
-int snd_rawmidi_info(snd_rawmidi_substream_t *substream, snd_rawmidi_info_t *info)
+int snd_rawmidi_info(struct snd_rawmidi_substream *substream,
+		     struct snd_rawmidi_info *info)
 {
-	snd_rawmidi_t *rmidi;
+	struct snd_rawmidi *rmidi;
 	
 	if (substream == NULL)
 		return -ENODEV;
@@ -550,22 +552,23 @@ int snd_rawmidi_info(snd_rawmidi_substream_t *substream, snd_rawmidi_info_t *inf
 	return 0;
 }
 
-static int snd_rawmidi_info_user(snd_rawmidi_substream_t *substream, snd_rawmidi_info_t __user * _info)
+static int snd_rawmidi_info_user(struct snd_rawmidi_substream *substream,
+				 struct snd_rawmidi_info __user * _info)
 {
-	snd_rawmidi_info_t info;
+	struct snd_rawmidi_info info;
 	int err;
 	if ((err = snd_rawmidi_info(substream, &info)) < 0)
 		return err;
-	if (copy_to_user(_info, &info, sizeof(snd_rawmidi_info_t)))
+	if (copy_to_user(_info, &info, sizeof(struct snd_rawmidi_info)))
 		return -EFAULT;
 	return 0;
 }
 
-int snd_rawmidi_info_select(snd_card_t *card, snd_rawmidi_info_t *info)
+int snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info)
 {
-	snd_rawmidi_t *rmidi;
-	snd_rawmidi_str_t *pstr;
-	snd_rawmidi_substream_t *substream;
+	struct snd_rawmidi *rmidi;
+	struct snd_rawmidi_str *pstr;
+	struct snd_rawmidi_substream *substream;
 	struct list_head *list;
 	if (info->device >= SNDRV_RAWMIDI_DEVICES)
 		return -ENXIO;
@@ -578,18 +581,18 @@ int snd_rawmidi_info_select(snd_card_t *card, snd_rawmidi_info_t *info)
 	if (info->subdevice >= pstr->substream_count)
 		return -ENXIO;
 	list_for_each(list, &pstr->substreams) {
-		substream = list_entry(list, snd_rawmidi_substream_t, list);
+		substream = list_entry(list, struct snd_rawmidi_substream, list);
 		if ((unsigned int)substream->number == info->subdevice)
 			return snd_rawmidi_info(substream, info);
 	}
 	return -ENXIO;
 }
 
-static int snd_rawmidi_info_select_user(snd_card_t *card,
-					snd_rawmidi_info_t __user *_info)
+static int snd_rawmidi_info_select_user(struct snd_card *card,
+					struct snd_rawmidi_info __user *_info)
 {
 	int err;
-	snd_rawmidi_info_t info;
+	struct snd_rawmidi_info info;
 	if (get_user(info.device, &_info->device))
 		return -EFAULT;
 	if (get_user(info.stream, &_info->stream))
@@ -598,16 +601,16 @@ static int snd_rawmidi_info_select_user(snd_card_t *card,
 		return -EFAULT;
 	if ((err = snd_rawmidi_info_select(card, &info)) < 0)
 		return err;
-	if (copy_to_user(_info, &info, sizeof(snd_rawmidi_info_t)))
+	if (copy_to_user(_info, &info, sizeof(struct snd_rawmidi_info)))
 		return -EFAULT;
 	return 0;
 }
 
-int snd_rawmidi_output_params(snd_rawmidi_substream_t * substream,
-			      snd_rawmidi_params_t * params)
+int snd_rawmidi_output_params(struct snd_rawmidi_substream *substream,
+			      struct snd_rawmidi_params * params)
 {
 	char *newbuf;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 	
 	if (substream->append && substream->use_count > 1)
 		return -EBUSY;
@@ -630,11 +633,11 @@ int snd_rawmidi_output_params(snd_rawmidi_substream_t * substream,
 	return 0;
 }
 
-int snd_rawmidi_input_params(snd_rawmidi_substream_t * substream,
-			     snd_rawmidi_params_t * params)
+int snd_rawmidi_input_params(struct snd_rawmidi_substream *substream,
+			     struct snd_rawmidi_params * params)
 {
 	char *newbuf;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 
 	snd_rawmidi_drain_input(substream);
 	if (params->buffer_size < 32 || params->buffer_size > 1024L * 1024L) {
@@ -654,10 +657,10 @@ int snd_rawmidi_input_params(snd_rawmidi_substream_t * substream,
 	return 0;
 }
 
-static int snd_rawmidi_output_status(snd_rawmidi_substream_t * substream,
-				     snd_rawmidi_status_t * status)
+static int snd_rawmidi_output_status(struct snd_rawmidi_substream *substream,
+				     struct snd_rawmidi_status * status)
 {
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 
 	memset(status, 0, sizeof(*status));
 	status->stream = SNDRV_RAWMIDI_STREAM_OUTPUT;
@@ -667,10 +670,10 @@ static int snd_rawmidi_output_status(snd_rawmidi_substream_t * substream,
 	return 0;
 }
 
-static int snd_rawmidi_input_status(snd_rawmidi_substream_t * substream,
-				    snd_rawmidi_status_t * status)
+static int snd_rawmidi_input_status(struct snd_rawmidi_substream *substream,
+				    struct snd_rawmidi_status * status)
 {
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 
 	memset(status, 0, sizeof(*status));
 	status->stream = SNDRV_RAWMIDI_STREAM_INPUT;
@@ -684,7 +687,7 @@ static int snd_rawmidi_input_status(snd_rawmidi_substream_t * substream,
 
 static long snd_rawmidi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	snd_rawmidi_file_t *rfile;
+	struct snd_rawmidi_file *rfile;
 	void __user *argp = (void __user *)arg;
 
 	rfile = file->private_data;
@@ -695,8 +698,8 @@ static long snd_rawmidi_ioctl(struct file *file, unsigned int cmd, unsigned long
 		return put_user(SNDRV_RAWMIDI_VERSION, (int __user *)argp) ? -EFAULT : 0;
 	case SNDRV_RAWMIDI_IOCTL_INFO:
 	{
-		snd_rawmidi_stream_t stream;
-		snd_rawmidi_info_t __user *info = argp;
+		int stream;
+		struct snd_rawmidi_info __user *info = argp;
 		if (get_user(stream, &info->stream))
 			return -EFAULT;
 		switch (stream) {
@@ -710,8 +713,8 @@ static long snd_rawmidi_ioctl(struct file *file, unsigned int cmd, unsigned long
 	}
 	case SNDRV_RAWMIDI_IOCTL_PARAMS:
 	{
-		snd_rawmidi_params_t params;
-		if (copy_from_user(&params, argp, sizeof(snd_rawmidi_params_t)))
+		struct snd_rawmidi_params params;
+		if (copy_from_user(&params, argp, sizeof(struct snd_rawmidi_params)))
 			return -EFAULT;
 		switch (params.stream) {
 		case SNDRV_RAWMIDI_STREAM_OUTPUT:
@@ -729,8 +732,8 @@ static long snd_rawmidi_ioctl(struct file *file, unsigned int cmd, unsigned long
 	case SNDRV_RAWMIDI_IOCTL_STATUS:
 	{
 		int err = 0;
-		snd_rawmidi_status_t status;
-		if (copy_from_user(&status, argp, sizeof(snd_rawmidi_status_t)))
+		struct snd_rawmidi_status status;
+		if (copy_from_user(&status, argp, sizeof(struct snd_rawmidi_status)))
 			return -EFAULT;
 		switch (status.stream) {
 		case SNDRV_RAWMIDI_STREAM_OUTPUT:
@@ -748,7 +751,7 @@ static long snd_rawmidi_ioctl(struct file *file, unsigned int cmd, unsigned long
 		}
 		if (err < 0)
 			return err;
-		if (copy_to_user(argp, &status, sizeof(snd_rawmidi_status_t)))
+		if (copy_to_user(argp, &status, sizeof(struct snd_rawmidi_status)))
 			return -EFAULT;
 		return 0;
 	}
@@ -792,8 +795,8 @@ static long snd_rawmidi_ioctl(struct file *file, unsigned int cmd, unsigned long
 	return -ENOTTY;
 }
 
-static int snd_rawmidi_control_ioctl(snd_card_t * card,
-				     snd_ctl_file_t * control,
+static int snd_rawmidi_control_ioctl(struct snd_card *card,
+				     struct snd_ctl_file *control,
 				     unsigned int cmd,
 				     unsigned long arg)
 {
@@ -845,11 +848,12 @@ static int snd_rawmidi_control_ioctl(snd_card_t * card,
  *
  * Returns the size of read data, or a negative error code on failure.
  */
-int snd_rawmidi_receive(snd_rawmidi_substream_t * substream, const unsigned char *buffer, int count)
+int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,
+			const unsigned char *buffer, int count)
 {
 	unsigned long flags;
 	int result = 0, count1;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 
 	if (runtime->buffer == NULL) {
 		snd_printd("snd_rawmidi_receive: input is not active!!!\n");
@@ -904,12 +908,12 @@ int snd_rawmidi_receive(snd_rawmidi_substream_t * substream, const unsigned char
 	return result;
 }
 
-static long snd_rawmidi_kernel_read1(snd_rawmidi_substream_t *substream,
+static long snd_rawmidi_kernel_read1(struct snd_rawmidi_substream *substream,
 				     unsigned char *buf, long count, int kernel)
 {
 	unsigned long flags;
 	long result = 0, count1;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 
 	while (count > 0 && runtime->avail) {
 		count1 = runtime->buffer_size - runtime->appl_ptr;
@@ -938,19 +942,21 @@ static long snd_rawmidi_kernel_read1(snd_rawmidi_substream_t *substream,
 	return result;
 }
 
-long snd_rawmidi_kernel_read(snd_rawmidi_substream_t *substream, unsigned char *buf, long count)
+long snd_rawmidi_kernel_read(struct snd_rawmidi_substream *substream,
+			     unsigned char *buf, long count)
 {
 	snd_rawmidi_input_trigger(substream, 1);
 	return snd_rawmidi_kernel_read1(substream, buf, count, 1);
 }
 
-static ssize_t snd_rawmidi_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
+static ssize_t snd_rawmidi_read(struct file *file, char __user *buf, size_t count,
+				loff_t *offset)
 {
 	long result;
 	int count1;
-	snd_rawmidi_file_t *rfile;
-	snd_rawmidi_substream_t *substream;
-	snd_rawmidi_runtime_t *runtime;
+	struct snd_rawmidi_file *rfile;
+	struct snd_rawmidi_substream *substream;
+	struct snd_rawmidi_runtime *runtime;
 
 	rfile = file->private_data;
 	substream = rfile->input;
@@ -998,9 +1004,9 @@ static ssize_t snd_rawmidi_read(struct file *file, char __user *buf, size_t coun
  * 
  * Returns 1 if the internal output buffer is empty, 0 if not.
  */
-int snd_rawmidi_transmit_empty(snd_rawmidi_substream_t * substream)
+int snd_rawmidi_transmit_empty(struct snd_rawmidi_substream *substream)
 {
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 	int result;
 	unsigned long flags;
 
@@ -1028,11 +1034,12 @@ int snd_rawmidi_transmit_empty(snd_rawmidi_substream_t * substream)
  *
  * Returns the size of copied data, or a negative error code on failure.
  */
-int snd_rawmidi_transmit_peek(snd_rawmidi_substream_t * substream, unsigned char *buffer, int count)
+int snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream,
+			      unsigned char *buffer, int count)
 {
 	unsigned long flags;
 	int result, count1;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 
 	if (runtime->buffer == NULL) {
 		snd_printd("snd_rawmidi_transmit_peek: output is not active!!!\n");
@@ -1079,10 +1086,10 @@ int snd_rawmidi_transmit_peek(snd_rawmidi_substream_t * substream, unsigned char
  *
  * Returns the advanced size if successful, or a negative error code on failure.
  */
-int snd_rawmidi_transmit_ack(snd_rawmidi_substream_t * substream, int count)
+int snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream, int count)
 {
 	unsigned long flags;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 
 	if (runtime->buffer == NULL) {
 		snd_printd("snd_rawmidi_transmit_ack: output is not active!!!\n");
@@ -1112,7 +1119,8 @@ int snd_rawmidi_transmit_ack(snd_rawmidi_substream_t * substream, int count)
  *
  * Returns the copied size if successful, or a negative error code on failure.
  */
-int snd_rawmidi_transmit(snd_rawmidi_substream_t * substream, unsigned char *buffer, int count)
+int snd_rawmidi_transmit(struct snd_rawmidi_substream *substream,
+			 unsigned char *buffer, int count)
 {
 	count = snd_rawmidi_transmit_peek(substream, buffer, count);
 	if (count < 0)
@@ -1120,11 +1128,12 @@ int snd_rawmidi_transmit(snd_rawmidi_substream_t * substream, unsigned char *buf
 	return snd_rawmidi_transmit_ack(substream, count);
 }
 
-static long snd_rawmidi_kernel_write1(snd_rawmidi_substream_t * substream, const unsigned char *buf, long count, int kernel)
+static long snd_rawmidi_kernel_write1(struct snd_rawmidi_substream *substream,
+				      const unsigned char *buf, long count, int kernel)
 {
 	unsigned long flags;
 	long count1, result;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
 
 	snd_assert(buf != NULL, return -EINVAL);
 	snd_assert(runtime->buffer != NULL, return -EINVAL);
@@ -1170,18 +1179,20 @@ static long snd_rawmidi_kernel_write1(snd_rawmidi_substream_t * substream, const
 	return result;
 }
 
-long snd_rawmidi_kernel_write(snd_rawmidi_substream_t * substream, const unsigned char *buf, long count)
+long snd_rawmidi_kernel_write(struct snd_rawmidi_substream *substream,
+			      const unsigned char *buf, long count)
 {
 	return snd_rawmidi_kernel_write1(substream, buf, count, 1);
 }
 
-static ssize_t snd_rawmidi_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
+static ssize_t snd_rawmidi_write(struct file *file, const char __user *buf,
+				 size_t count, loff_t *offset)
 {
 	long result, timeout;
 	int count1;
-	snd_rawmidi_file_t *rfile;
-	snd_rawmidi_runtime_t *runtime;
-	snd_rawmidi_substream_t *substream;
+	struct snd_rawmidi_file *rfile;
+	struct snd_rawmidi_runtime *runtime;
+	struct snd_rawmidi_substream *substream;
 
 	rfile = file->private_data;
 	substream = rfile->output;
@@ -1246,8 +1257,8 @@ static ssize_t snd_rawmidi_write(struct file *file, const char __user *buf, size
 
 static unsigned int snd_rawmidi_poll(struct file *file, poll_table * wait)
 {
-	snd_rawmidi_file_t *rfile;
-	snd_rawmidi_runtime_t *runtime;
+	struct snd_rawmidi_file *rfile;
+	struct snd_rawmidi_runtime *runtime;
 	unsigned int mask;
 
 	rfile = file->private_data;
@@ -1284,12 +1295,12 @@ static unsigned int snd_rawmidi_poll(struct file *file, poll_table * wait)
 
  */
 
-static void snd_rawmidi_proc_info_read(snd_info_entry_t *entry,
-				       snd_info_buffer_t * buffer)
+static void snd_rawmidi_proc_info_read(struct snd_info_entry *entry,
+				       struct snd_info_buffer *buffer)
 {
-	snd_rawmidi_t *rmidi;
-	snd_rawmidi_substream_t *substream;
-	snd_rawmidi_runtime_t *runtime;
+	struct snd_rawmidi *rmidi;
+	struct snd_rawmidi_substream *substream;
+	struct snd_rawmidi_runtime *runtime;
 	struct list_head *list;
 
 	rmidi = entry->private_data;
@@ -1297,7 +1308,7 @@ static void snd_rawmidi_proc_info_read(snd_info_entry_t *entry,
 	down(&rmidi->open_mutex);
 	if (rmidi->info_flags & SNDRV_RAWMIDI_INFO_OUTPUT) {
 		list_for_each(list, &rmidi->streams[SNDRV_RAWMIDI_STREAM_OUTPUT].substreams) {
-			substream = list_entry(list, snd_rawmidi_substream_t, list);
+			substream = list_entry(list, struct snd_rawmidi_substream, list);
 			snd_iprintf(buffer,
 				    "Output %d\n"
 				    "  Tx bytes     : %lu\n",
@@ -1317,7 +1328,7 @@ static void snd_rawmidi_proc_info_read(snd_info_entry_t *entry,
 	}
 	if (rmidi->info_flags & SNDRV_RAWMIDI_INFO_INPUT) {
 		list_for_each(list, &rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT].substreams) {
-			substream = list_entry(list, snd_rawmidi_substream_t, list);
+			substream = list_entry(list, struct snd_rawmidi_substream, list);
 			snd_iprintf(buffer,
 				    "Input %d\n"
 				    "  Rx bytes     : %lu\n",
@@ -1354,18 +1365,18 @@ static struct file_operations snd_rawmidi_f_ops =
 	.compat_ioctl =	snd_rawmidi_ioctl_compat,
 };
 
-static snd_minor_t snd_rawmidi_reg =
+static struct snd_minor snd_rawmidi_reg =
 {
 	.comment =	"raw midi",
 	.f_ops =	&snd_rawmidi_f_ops,
 };
 
-static int snd_rawmidi_alloc_substreams(snd_rawmidi_t *rmidi,
-					snd_rawmidi_str_t *stream,
+static int snd_rawmidi_alloc_substreams(struct snd_rawmidi *rmidi,
+					struct snd_rawmidi_str *stream,
 					int direction,
 					int count)
 {
-	snd_rawmidi_substream_t *substream;
+	struct snd_rawmidi_substream *substream;
 	int idx;
 
 	INIT_LIST_HEAD(&stream->substreams);
@@ -1397,13 +1408,13 @@ static int snd_rawmidi_alloc_substreams(snd_rawmidi_t *rmidi,
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_rawmidi_new(snd_card_t * card, char *id, int device,
+int snd_rawmidi_new(struct snd_card *card, char *id, int device,
 		    int output_count, int input_count,
-		    snd_rawmidi_t ** rrawmidi)
+		    struct snd_rawmidi ** rrawmidi)
 {
-	snd_rawmidi_t *rmidi;
+	struct snd_rawmidi *rmidi;
 	int err;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free = snd_rawmidi_dev_free,
 		.dev_register = snd_rawmidi_dev_register,
 		.dev_disconnect = snd_rawmidi_dev_disconnect,
@@ -1438,18 +1449,18 @@ int snd_rawmidi_new(snd_card_t * card, char *id, int device,
 	return 0;
 }
 
-static void snd_rawmidi_free_substreams(snd_rawmidi_str_t *stream)
+static void snd_rawmidi_free_substreams(struct snd_rawmidi_str *stream)
 {
-	snd_rawmidi_substream_t *substream;
+	struct snd_rawmidi_substream *substream;
 
 	while (!list_empty(&stream->substreams)) {
-		substream = list_entry(stream->substreams.next, snd_rawmidi_substream_t, list);
+		substream = list_entry(stream->substreams.next, struct snd_rawmidi_substream, list);
 		list_del(&substream->list);
 		kfree(substream);
 	}
 }
 
-static int snd_rawmidi_free(snd_rawmidi_t *rmidi)
+static int snd_rawmidi_free(struct snd_rawmidi *rmidi)
 {
 	snd_assert(rmidi != NULL, return -ENXIO);	
 	snd_rawmidi_free_substreams(&rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT]);
@@ -1460,26 +1471,26 @@ static int snd_rawmidi_free(snd_rawmidi_t *rmidi)
 	return 0;
 }
 
-static int snd_rawmidi_dev_free(snd_device_t *device)
+static int snd_rawmidi_dev_free(struct snd_device *device)
 {
-	snd_rawmidi_t *rmidi = device->device_data;
+	struct snd_rawmidi *rmidi = device->device_data;
 	return snd_rawmidi_free(rmidi);
 }
 
 #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
-static void snd_rawmidi_dev_seq_free(snd_seq_device_t *device)
+static void snd_rawmidi_dev_seq_free(struct snd_seq_device *device)
 {
-	snd_rawmidi_t *rmidi = device->private_data;
+	struct snd_rawmidi *rmidi = device->private_data;
 	rmidi->seq_dev = NULL;
 }
 #endif
 
-static int snd_rawmidi_dev_register(snd_device_t *device)
+static int snd_rawmidi_dev_register(struct snd_device *device)
 {
 	int idx, err;
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 	char name[16];
-	snd_rawmidi_t *rmidi = device->device_data;
+	struct snd_rawmidi *rmidi = device->device_data;
 
 	if (rmidi->device >= SNDRV_RAWMIDI_DEVICES)
 		return -ENOMEM;
@@ -1554,9 +1565,9 @@ static int snd_rawmidi_dev_register(snd_device_t *device)
 	return 0;
 }
 
-static int snd_rawmidi_dev_disconnect(snd_device_t *device)
+static int snd_rawmidi_dev_disconnect(struct snd_device *device)
 {
-	snd_rawmidi_t *rmidi = device->device_data;
+	struct snd_rawmidi *rmidi = device->device_data;
 	int idx;
 
 	down(&register_mutex);
@@ -1566,10 +1577,10 @@ static int snd_rawmidi_dev_disconnect(snd_device_t *device)
 	return 0;
 }
 
-static int snd_rawmidi_dev_unregister(snd_device_t *device)
+static int snd_rawmidi_dev_unregister(struct snd_device *device)
 {
 	int idx;
-	snd_rawmidi_t *rmidi = device->device_data;
+	struct snd_rawmidi *rmidi = device->device_data;
 
 	snd_assert(rmidi != NULL, return -ENXIO);
 	down(&register_mutex);
@@ -1613,13 +1624,14 @@ static int snd_rawmidi_dev_unregister(snd_device_t *device)
  *
  * Sets the rawmidi operators for the given stream direction.
  */
-void snd_rawmidi_set_ops(snd_rawmidi_t *rmidi, int stream, snd_rawmidi_ops_t *ops)
+void snd_rawmidi_set_ops(struct snd_rawmidi *rmidi, int stream,
+			 struct snd_rawmidi_ops *ops)
 {
 	struct list_head *list;
-	snd_rawmidi_substream_t *substream;
+	struct snd_rawmidi_substream *substream;
 	
 	list_for_each(list, &rmidi->streams[stream].substreams) {
-		substream = list_entry(list, snd_rawmidi_substream_t, list);
+		substream = list_entry(list, struct snd_rawmidi_substream, list);
 		substream->ops = ops;
 	}
 }
diff --git a/sound/core/rawmidi_compat.c b/sound/core/rawmidi_compat.c
index d97631c3f3a..5268c1f58c2 100644
--- a/sound/core/rawmidi_compat.c
+++ b/sound/core/rawmidi_compat.c
@@ -22,7 +22,7 @@
 
 #include <linux/compat.h>
 
-struct sndrv_rawmidi_params32 {
+struct snd_rawmidi_params32 {
 	s32 stream;
 	u32 buffer_size;
 	u32 avail_min;
@@ -30,10 +30,10 @@ struct sndrv_rawmidi_params32 {
 	unsigned char reserved[16];
 } __attribute__((packed));
 
-static int snd_rawmidi_ioctl_params_compat(snd_rawmidi_file_t *rfile,
-					   struct sndrv_rawmidi_params32 __user *src)
+static int snd_rawmidi_ioctl_params_compat(struct snd_rawmidi_file *rfile,
+					   struct snd_rawmidi_params32 __user *src)
 {
-	snd_rawmidi_params_t params;
+	struct snd_rawmidi_params params;
 	unsigned int val;
 
 	if (rfile->output == NULL)
@@ -53,7 +53,7 @@ static int snd_rawmidi_ioctl_params_compat(snd_rawmidi_file_t *rfile,
 	return -EINVAL;
 }
 
-struct sndrv_rawmidi_status32 {
+struct snd_rawmidi_status32 {
 	s32 stream;
 	struct compat_timespec tstamp;
 	u32 avail;
@@ -61,11 +61,11 @@ struct sndrv_rawmidi_status32 {
 	unsigned char reserved[16];
 } __attribute__((packed));
 
-static int snd_rawmidi_ioctl_status_compat(snd_rawmidi_file_t *rfile,
-					   struct sndrv_rawmidi_status32 __user *src)
+static int snd_rawmidi_ioctl_status_compat(struct snd_rawmidi_file *rfile,
+					   struct snd_rawmidi_status32 __user *src)
 {
 	int err;
-	snd_rawmidi_status_t status;
+	struct snd_rawmidi_status status;
 
 	if (rfile->output == NULL)
 		return -EINVAL;
@@ -95,13 +95,13 @@ static int snd_rawmidi_ioctl_status_compat(snd_rawmidi_file_t *rfile,
 }
 
 enum {
-	SNDRV_RAWMIDI_IOCTL_PARAMS32 = _IOWR('W', 0x10, struct sndrv_rawmidi_params32),
-	SNDRV_RAWMIDI_IOCTL_STATUS32 = _IOWR('W', 0x20, struct sndrv_rawmidi_status32),
+	SNDRV_RAWMIDI_IOCTL_PARAMS32 = _IOWR('W', 0x10, struct snd_rawmidi_params32),
+	SNDRV_RAWMIDI_IOCTL_STATUS32 = _IOWR('W', 0x20, struct snd_rawmidi_status32),
 };
 
 static long snd_rawmidi_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	snd_rawmidi_file_t *rfile;
+	struct snd_rawmidi_file *rfile;
 	void __user *argp = compat_ptr(arg);
 
 	rfile = file->private_data;
-- 
cgit v1.2.3-70-g09d2


From d9a98de218ce18befabb5782c43cb4a2766b4b02 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 13:58:21 +0100
Subject: [ALSA] Remove xxx_t typedefs: Hwdep

Modules: HWDEP Midlevel

Remove xxx_t typedefs from the core hwdep codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/hwdep.h     | 42 +++++++++++-----------
 sound/core/hwdep.c        | 90 ++++++++++++++++++++++++++---------------------
 sound/core/hwdep_compat.c | 15 ++++----
 3 files changed, 77 insertions(+), 70 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/hwdep.h b/include/sound/hwdep.h
index 043876348fa..04b20bc4f14 100644
--- a/include/sound/hwdep.h
+++ b/include/sound/hwdep.h
@@ -25,27 +25,24 @@
 #include <sound/asound.h>
 #include <linux/poll.h>
 
-typedef enum sndrv_hwdep_iface snd_hwdep_iface_t;
-typedef struct sndrv_hwdep_info snd_hwdep_info_t;
-typedef struct sndrv_hwdep_dsp_status snd_hwdep_dsp_status_t;
-typedef struct sndrv_hwdep_dsp_image snd_hwdep_dsp_image_t;
+struct snd_hwdep;
 
-typedef struct _snd_hwdep_ops {
-	long long (*llseek) (snd_hwdep_t *hw, struct file * file, long long offset, int orig);
-	long (*read) (snd_hwdep_t * hw, char __user *buf, long count, loff_t *offset);
-	long (*write) (snd_hwdep_t * hw, const char __user *buf, long count, loff_t *offset);
-	int (*open) (snd_hwdep_t * hw, struct file * file);
-	int (*release) (snd_hwdep_t * hw, struct file * file);
-	unsigned int (*poll) (snd_hwdep_t * hw, struct file * file, poll_table * wait);
-	int (*ioctl) (snd_hwdep_t * hw, struct file * file, unsigned int cmd, unsigned long arg);
-	int (*ioctl_compat) (snd_hwdep_t * hw, struct file * file, unsigned int cmd, unsigned long arg);
-	int (*mmap) (snd_hwdep_t * hw, struct file * file, struct vm_area_struct * vma);
-	int (*dsp_status) (snd_hwdep_t * hw, snd_hwdep_dsp_status_t * status);
-	int (*dsp_load) (snd_hwdep_t * hw, snd_hwdep_dsp_image_t * image);
-} snd_hwdep_ops_t;
+struct snd_hwdep_ops {
+	long long (*llseek) (struct snd_hwdep *hw, struct file * file, long long offset, int orig);
+	long (*read) (struct snd_hwdep *hw, char __user *buf, long count, loff_t *offset);
+	long (*write) (struct snd_hwdep *hw, const char __user *buf, long count, loff_t *offset);
+	int (*open) (struct snd_hwdep * hw, struct file * file);
+	int (*release) (struct snd_hwdep *hw, struct file * file);
+	unsigned int (*poll) (struct snd_hwdep *hw, struct file * file, poll_table * wait);
+	int (*ioctl) (struct snd_hwdep *hw, struct file * file, unsigned int cmd, unsigned long arg);
+	int (*ioctl_compat) (struct snd_hwdep *hw, struct file * file, unsigned int cmd, unsigned long arg);
+	int (*mmap) (struct snd_hwdep *hw, struct file * file, struct vm_area_struct * vma);
+	int (*dsp_status) (struct snd_hwdep *hw, struct snd_hwdep_dsp_status *status);
+	int (*dsp_load) (struct snd_hwdep *hw, struct snd_hwdep_dsp_image *image);
+};
 
-struct _snd_hwdep {
-	snd_card_t *card;
+struct snd_hwdep {
+	struct snd_card *card;
 	int device;
 	char id[32];
 	char name[80];
@@ -57,10 +54,10 @@ struct _snd_hwdep {
 	int ossreg;
 #endif
 
-	snd_hwdep_ops_t ops;
+	struct snd_hwdep_ops ops;
 	wait_queue_head_t open_wait;
 	void *private_data;
-	void (*private_free) (snd_hwdep_t *hwdep);
+	void (*private_free) (struct snd_hwdep *hwdep);
 
 	struct semaphore open_mutex;
 	int used;
@@ -68,6 +65,7 @@ struct _snd_hwdep {
 	unsigned int exclusive: 1;
 };
 
-extern int snd_hwdep_new(snd_card_t * card, char *id, int device, snd_hwdep_t ** rhwdep);
+extern int snd_hwdep_new(struct snd_card *card, char *id, int device,
+			 struct snd_hwdep **rhwdep);
 
 #endif /* __SOUND_HWDEP_H */
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index e91cee35a4b..da0fb9f0841 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -35,14 +35,14 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("Hardware dependent layer");
 MODULE_LICENSE("GPL");
 
-static snd_hwdep_t *snd_hwdep_devices[SNDRV_CARDS * SNDRV_MINOR_HWDEPS];
+static struct snd_hwdep *snd_hwdep_devices[SNDRV_CARDS * SNDRV_MINOR_HWDEPS];
 
 static DECLARE_MUTEX(register_mutex);
 
-static int snd_hwdep_free(snd_hwdep_t *hwdep);
-static int snd_hwdep_dev_free(snd_device_t *device);
-static int snd_hwdep_dev_register(snd_device_t *device);
-static int snd_hwdep_dev_unregister(snd_device_t *device);
+static int snd_hwdep_free(struct snd_hwdep *hwdep);
+static int snd_hwdep_dev_free(struct snd_device *device);
+static int snd_hwdep_dev_register(struct snd_device *device);
+static int snd_hwdep_dev_unregister(struct snd_device *device);
 
 /*
 
@@ -50,23 +50,25 @@ static int snd_hwdep_dev_unregister(snd_device_t *device);
 
 static loff_t snd_hwdep_llseek(struct file * file, loff_t offset, int orig)
 {
-	snd_hwdep_t *hw = file->private_data;
+	struct snd_hwdep *hw = file->private_data;
 	if (hw->ops.llseek)
 		return hw->ops.llseek(hw, file, offset, orig);
 	return -ENXIO;
 }
 
-static ssize_t snd_hwdep_read(struct file * file, char __user *buf, size_t count, loff_t *offset)
+static ssize_t snd_hwdep_read(struct file * file, char __user *buf,
+			      size_t count, loff_t *offset)
 {
-	snd_hwdep_t *hw = file->private_data;
+	struct snd_hwdep *hw = file->private_data;
 	if (hw->ops.read)
 		return hw->ops.read(hw, buf, count, offset);
 	return -ENXIO;	
 }
 
-static ssize_t snd_hwdep_write(struct file * file, const char __user *buf, size_t count, loff_t *offset)
+static ssize_t snd_hwdep_write(struct file * file, const char __user *buf,
+			       size_t count, loff_t *offset)
 {
-	snd_hwdep_t *hw = file->private_data;
+	struct snd_hwdep *hw = file->private_data;
 	if (hw->ops.write)
 		return hw->ops.write(hw, buf, count, offset);
 	return -ENXIO;	
@@ -77,7 +79,7 @@ static int snd_hwdep_open(struct inode *inode, struct file * file)
 	int major = imajor(inode);
 	int cardnum;
 	int device;
-	snd_hwdep_t *hw;
+	struct snd_hwdep *hw;
 	int err;
 	wait_queue_t wait;
 
@@ -154,7 +156,7 @@ static int snd_hwdep_open(struct inode *inode, struct file * file)
 static int snd_hwdep_release(struct inode *inode, struct file * file)
 {
 	int err = -ENXIO;
-	snd_hwdep_t *hw = file->private_data;
+	struct snd_hwdep *hw = file->private_data;
 	down(&hw->open_mutex);
 	if (hw->ops.release) {
 		err = hw->ops.release(hw, file);
@@ -170,15 +172,16 @@ static int snd_hwdep_release(struct inode *inode, struct file * file)
 
 static unsigned int snd_hwdep_poll(struct file * file, poll_table * wait)
 {
-	snd_hwdep_t *hw = file->private_data;
+	struct snd_hwdep *hw = file->private_data;
 	if (hw->ops.poll)
 		return hw->ops.poll(hw, file, wait);
 	return 0;
 }
 
-static int snd_hwdep_info(snd_hwdep_t *hw, snd_hwdep_info_t __user *_info)
+static int snd_hwdep_info(struct snd_hwdep *hw,
+			  struct snd_hwdep_info __user *_info)
 {
-	snd_hwdep_info_t info;
+	struct snd_hwdep_info info;
 	
 	memset(&info, 0, sizeof(info));
 	info.card = hw->card->number;
@@ -190,9 +193,10 @@ static int snd_hwdep_info(snd_hwdep_t *hw, snd_hwdep_info_t __user *_info)
 	return 0;
 }
 
-static int snd_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t __user *_info)
+static int snd_hwdep_dsp_status(struct snd_hwdep *hw,
+				struct snd_hwdep_dsp_status __user *_info)
 {
-	snd_hwdep_dsp_status_t info;
+	struct snd_hwdep_dsp_status info;
 	int err;
 	
 	if (! hw->ops.dsp_status)
@@ -206,9 +210,10 @@ static int snd_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t __user *
 	return 0;
 }
 
-static int snd_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t __user *_info)
+static int snd_hwdep_dsp_load(struct snd_hwdep *hw,
+			      struct snd_hwdep_dsp_image __user *_info)
 {
-	snd_hwdep_dsp_image_t info;
+	struct snd_hwdep_dsp_image info;
 	int err;
 	
 	if (! hw->ops.dsp_load)
@@ -228,9 +233,10 @@ static int snd_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t __user *_in
 	return 0;
 }
 
-static long snd_hwdep_ioctl(struct file * file, unsigned int cmd, unsigned long arg)
+static long snd_hwdep_ioctl(struct file * file, unsigned int cmd,
+			    unsigned long arg)
 {
-	snd_hwdep_t *hw = file->private_data;
+	struct snd_hwdep *hw = file->private_data;
 	void __user *argp = (void __user *)arg;
 	switch (cmd) {
 	case SNDRV_HWDEP_IOCTL_PVERSION:
@@ -249,13 +255,14 @@ static long snd_hwdep_ioctl(struct file * file, unsigned int cmd, unsigned long
 
 static int snd_hwdep_mmap(struct file * file, struct vm_area_struct * vma)
 {
-	snd_hwdep_t *hw = file->private_data;
+	struct snd_hwdep *hw = file->private_data;
 	if (hw->ops.mmap)
 		return hw->ops.mmap(hw, file, vma);
 	return -ENXIO;
 }
 
-static int snd_hwdep_control_ioctl(snd_card_t * card, snd_ctl_file_t * control,
+static int snd_hwdep_control_ioctl(struct snd_card *card,
+				   struct snd_ctl_file * control,
 				   unsigned int cmd, unsigned long arg)
 {
 	unsigned int tmp;
@@ -282,9 +289,9 @@ static int snd_hwdep_control_ioctl(snd_card_t * card, snd_ctl_file_t * control,
 		}
 	case SNDRV_CTL_IOCTL_HWDEP_INFO:
 		{
-			snd_hwdep_info_t __user *info = (snd_hwdep_info_t __user *)arg;
+			struct snd_hwdep_info __user *info = (struct snd_hwdep_info __user *)arg;
 			int device;
-			snd_hwdep_t *hwdep;
+			struct snd_hwdep *hwdep;
 
 			if (get_user(device, &info->device))
 				return -EFAULT;
@@ -323,7 +330,7 @@ static struct file_operations snd_hwdep_f_ops =
 	.mmap =		snd_hwdep_mmap,
 };
 
-static snd_minor_t snd_hwdep_reg =
+static struct snd_minor snd_hwdep_reg =
 {
 	.comment =	"hardware dependent",
 	.f_ops =	&snd_hwdep_f_ops,
@@ -342,11 +349,12 @@ static snd_minor_t snd_hwdep_reg =
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_hwdep_new(snd_card_t * card, char *id, int device, snd_hwdep_t ** rhwdep)
+int snd_hwdep_new(struct snd_card *card, char *id, int device,
+		  struct snd_hwdep **rhwdep)
 {
-	snd_hwdep_t *hwdep;
+	struct snd_hwdep *hwdep;
 	int err;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free = snd_hwdep_dev_free,
 		.dev_register = snd_hwdep_dev_register,
 		.dev_unregister = snd_hwdep_dev_unregister
@@ -376,7 +384,7 @@ int snd_hwdep_new(snd_card_t * card, char *id, int device, snd_hwdep_t ** rhwdep
 	return 0;
 }
 
-static int snd_hwdep_free(snd_hwdep_t *hwdep)
+static int snd_hwdep_free(struct snd_hwdep *hwdep)
 {
 	snd_assert(hwdep != NULL, return -ENXIO);
 	if (hwdep->private_free)
@@ -385,15 +393,15 @@ static int snd_hwdep_free(snd_hwdep_t *hwdep)
 	return 0;
 }
 
-static int snd_hwdep_dev_free(snd_device_t *device)
+static int snd_hwdep_dev_free(struct snd_device *device)
 {
-	snd_hwdep_t *hwdep = device->device_data;
+	struct snd_hwdep *hwdep = device->device_data;
 	return snd_hwdep_free(hwdep);
 }
 
-static int snd_hwdep_dev_register(snd_device_t *device)
+static int snd_hwdep_dev_register(struct snd_device *device)
 {
-	snd_hwdep_t *hwdep = device->device_data;
+	struct snd_hwdep *hwdep = device->device_data;
 	int idx, err;
 	char name[32];
 
@@ -434,9 +442,9 @@ static int snd_hwdep_dev_register(snd_device_t *device)
 	return 0;
 }
 
-static int snd_hwdep_dev_unregister(snd_device_t *device)
+static int snd_hwdep_dev_unregister(struct snd_device *device)
 {
-	snd_hwdep_t *hwdep = device->device_data;
+	struct snd_hwdep *hwdep = device->device_data;
 	int idx;
 
 	snd_assert(hwdep != NULL, return -ENXIO);
@@ -460,11 +468,11 @@ static int snd_hwdep_dev_unregister(snd_device_t *device)
  *  Info interface
  */
 
-static void snd_hwdep_proc_read(snd_info_entry_t *entry,
-				snd_info_buffer_t * buffer)
+static void snd_hwdep_proc_read(struct snd_info_entry *entry,
+				struct snd_info_buffer *buffer)
 {
 	int idx;
-	snd_hwdep_t *hwdep;
+	struct snd_hwdep *hwdep;
 
 	down(&register_mutex);
 	for (idx = 0; idx < SNDRV_CARDS * SNDRV_MINOR_HWDEPS; idx++) {
@@ -483,11 +491,11 @@ static void snd_hwdep_proc_read(snd_info_entry_t *entry,
  *  ENTRY functions
  */
 
-static snd_info_entry_t *snd_hwdep_proc_entry = NULL;
+static struct snd_info_entry *snd_hwdep_proc_entry = NULL;
 
 static int __init alsa_hwdep_init(void)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	memset(snd_hwdep_devices, 0, sizeof(snd_hwdep_devices));
 	if ((entry = snd_info_create_module_entry(THIS_MODULE, "hwdep", NULL)) != NULL) {
diff --git a/sound/core/hwdep_compat.c b/sound/core/hwdep_compat.c
index 6866f423d4b..938f7758096 100644
--- a/sound/core/hwdep_compat.c
+++ b/sound/core/hwdep_compat.c
@@ -22,7 +22,7 @@
 
 #include <linux/compat.h>
 
-struct sndrv_hwdep_dsp_image32 {
+struct snd_hwdep_dsp_image32 {
 	u32 index;
 	unsigned char name[64];
 	u32 image;	/* pointer */
@@ -30,10 +30,10 @@ struct sndrv_hwdep_dsp_image32 {
 	u32 driver_data;
 } /* don't set packed attribute here */;
 
-static int snd_hwdep_dsp_load_compat(snd_hwdep_t *hw,
-				     struct sndrv_hwdep_dsp_image32 __user *src)
+static int snd_hwdep_dsp_load_compat(struct snd_hwdep *hw,
+				     struct snd_hwdep_dsp_image32 __user *src)
 {
-	struct sndrv_hwdep_dsp_image *dst;
+	struct snd_hwdep_dsp_image *dst;
 	compat_caddr_t ptr;
 	u32 val;
 
@@ -56,12 +56,13 @@ static int snd_hwdep_dsp_load_compat(snd_hwdep_t *hw,
 }
 
 enum {
-	SNDRV_HWDEP_IOCTL_DSP_LOAD32   = _IOW('H', 0x03, struct sndrv_hwdep_dsp_image32)
+	SNDRV_HWDEP_IOCTL_DSP_LOAD32   = _IOW('H', 0x03, struct snd_hwdep_dsp_image32)
 };
 
-static long snd_hwdep_ioctl_compat(struct file * file, unsigned int cmd, unsigned long arg)
+static long snd_hwdep_ioctl_compat(struct file * file, unsigned int cmd,
+				   unsigned long arg)
 {
-	snd_hwdep_t *hw = file->private_data;
+	struct snd_hwdep *hw = file->private_data;
 	void __user *argp = compat_ptr(arg);
 	switch (cmd) {
 	case SNDRV_HWDEP_IOCTL_PVERSION:
-- 
cgit v1.2.3-70-g09d2


From 24c1f93188b4438c7f30df5b4cd78340cdb28daf Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 13:58:48 +0100
Subject: [ALSA] Remove xxx_t typedefs: Proc handler

Modules: ALSA Core

Remove xxx_t typedefs from the core proc handler codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/info.h |  94 +++++++++++++++++++++----------------------
 sound/core/info.c    | 110 +++++++++++++++++++++++++--------------------------
 2 files changed, 101 insertions(+), 103 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/info.h b/include/sound/info.h
index 1d76bf3cb05..df03e601754 100644
--- a/include/sound/info.h
+++ b/include/sound/info.h
@@ -34,8 +34,6 @@ struct snd_info_buffer {
 	int error;		/* error code */
 };
 
-typedef struct snd_info_buffer snd_info_buffer_t;
-
 #define SNDRV_INFO_CONTENT_TEXT		0
 #define SNDRV_INFO_CONTENT_DATA		1
 
@@ -44,28 +42,28 @@ struct snd_info_entry;
 struct snd_info_entry_text {
 	unsigned long read_size;
 	unsigned long write_size;
-	void (*read) (snd_info_entry_t *entry, snd_info_buffer_t * buffer);
-	void (*write) (snd_info_entry_t *entry, snd_info_buffer_t * buffer);
+	void (*read) (struct snd_info_entry *entry, struct snd_info_buffer *buffer);
+	void (*write) (struct snd_info_entry *entry, struct snd_info_buffer *buffer);
 };
 
 struct snd_info_entry_ops {
-	int (*open) (snd_info_entry_t *entry,
+	int (*open) (struct snd_info_entry *entry,
 		     unsigned short mode, void **file_private_data);
-	int (*release) (snd_info_entry_t * entry,
+	int (*release) (struct snd_info_entry * entry,
 			unsigned short mode, void *file_private_data);
-	long (*read) (snd_info_entry_t *entry, void *file_private_data,
+	long (*read) (struct snd_info_entry *entry, void *file_private_data,
 		      struct file * file, char __user *buf,
 		      unsigned long count, unsigned long pos);
-	long (*write) (snd_info_entry_t *entry, void *file_private_data,
+	long (*write) (struct snd_info_entry *entry, void *file_private_data,
 		       struct file * file, const char __user *buf,
 		       unsigned long count, unsigned long pos);
-	long long (*llseek) (snd_info_entry_t *entry, void *file_private_data,
+	long long (*llseek) (struct snd_info_entry *entry, void *file_private_data,
 			    struct file * file, long long offset, int orig);
-	unsigned int (*poll) (snd_info_entry_t *entry, void *file_private_data,
+	unsigned int (*poll) (struct snd_info_entry *entry, void *file_private_data,
 			      struct file * file, poll_table * wait);
-	int (*ioctl) (snd_info_entry_t *entry, void *file_private_data,
+	int (*ioctl) (struct snd_info_entry *entry, void *file_private_data,
 		      struct file * file, unsigned int cmd, unsigned long arg);
-	int (*mmap) (snd_info_entry_t *entry, void *file_private_data,
+	int (*mmap) (struct snd_info_entry *entry, void *file_private_data,
 		     struct inode * inode, struct file * file,
 		     struct vm_area_struct * vma);
 };
@@ -80,20 +78,20 @@ struct snd_info_entry {
 		struct snd_info_entry_text text;
 		struct snd_info_entry_ops *ops;
 	} c;
-	snd_info_entry_t *parent;
-	snd_card_t *card;
+	struct snd_info_entry *parent;
+	struct snd_card *card;
 	struct module *module;
 	void *private_data;
-	void (*private_free)(snd_info_entry_t *entry);
+	void (*private_free)(struct snd_info_entry *entry);
 	struct proc_dir_entry *p;
 	struct semaphore access;
 };
 
-extern int snd_info_check_reserved_words(const char *str);
+int snd_info_check_reserved_words(const char *str);
 
 #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
-extern int snd_info_minor_register(void);
-extern int snd_info_minor_unregister(void);
+int snd_info_minor_register(void);
+int snd_info_minor_unregister(void);
 #else
 #define snd_info_minor_register() /* NOP */
 #define snd_info_minor_unregister() /* NOP */
@@ -102,42 +100,42 @@ extern int snd_info_minor_unregister(void);
 
 #ifdef CONFIG_PROC_FS
 
-extern snd_info_entry_t *snd_seq_root;
+extern struct snd_info_entry *snd_seq_root;
 #ifdef CONFIG_SND_OSSEMUL
-extern snd_info_entry_t *snd_oss_root;
+extern struct snd_info_entry *snd_oss_root;
 #else
 #define snd_oss_root NULL
 #endif
 
-int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...) __attribute__ ((format (printf, 2, 3)));
+int snd_iprintf(struct snd_info_buffer * buffer, char *fmt,...) __attribute__ ((format (printf, 2, 3)));
 int snd_info_init(void);
 int snd_info_done(void);
 
-int snd_info_get_line(snd_info_buffer_t * buffer, char *line, int len);
+int snd_info_get_line(struct snd_info_buffer * buffer, char *line, int len);
 char *snd_info_get_str(char *dest, char *src, int len);
-snd_info_entry_t *snd_info_create_module_entry(struct module * module,
+struct snd_info_entry *snd_info_create_module_entry(struct module * module,
 					       const char *name,
-					       snd_info_entry_t * parent);
-snd_info_entry_t *snd_info_create_card_entry(snd_card_t * card,
+					       struct snd_info_entry * parent);
+struct snd_info_entry *snd_info_create_card_entry(struct snd_card * card,
 					     const char *name,
-					     snd_info_entry_t * parent);
-void snd_info_free_entry(snd_info_entry_t * entry);
-int snd_info_store_text(snd_info_entry_t * entry);
-int snd_info_restore_text(snd_info_entry_t * entry);
+					     struct snd_info_entry * parent);
+void snd_info_free_entry(struct snd_info_entry * entry);
+int snd_info_store_text(struct snd_info_entry * entry);
+int snd_info_restore_text(struct snd_info_entry * entry);
 
-int snd_info_card_create(snd_card_t * card);
-int snd_info_card_register(snd_card_t * card);
-int snd_info_card_free(snd_card_t * card);
-int snd_info_register(snd_info_entry_t * entry);
-int snd_info_unregister(snd_info_entry_t * entry);
+int snd_info_card_create(struct snd_card * card);
+int snd_info_card_register(struct snd_card * card);
+int snd_info_card_free(struct snd_card * card);
+int snd_info_register(struct snd_info_entry * entry);
+int snd_info_unregister(struct snd_info_entry * entry);
 
 /* for card drivers */
-int snd_card_proc_new(snd_card_t *card, const char *name, snd_info_entry_t **entryp);
+int snd_card_proc_new(struct snd_card *card, const char *name, struct snd_info_entry **entryp);
 
-static inline void snd_info_set_text_ops(snd_info_entry_t *entry, 
+static inline void snd_info_set_text_ops(struct snd_info_entry *entry, 
 					 void *private_data,
 					 long read_size,
-					 void (*read)(snd_info_entry_t *, snd_info_buffer_t *))
+					 void (*read)(struct snd_info_entry *, struct snd_info_buffer *))
 {
 	entry->private_data = private_data;
 	entry->c.text.read_size = read_size;
@@ -150,21 +148,21 @@ static inline void snd_info_set_text_ops(snd_info_entry_t *entry,
 #define snd_seq_root NULL
 #define snd_oss_root NULL
 
-static inline int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...) { return 0; }
+static inline int snd_iprintf(struct snd_info_buffer * buffer, char *fmt,...) { return 0; }
 static inline int snd_info_init(void) { return 0; }
 static inline int snd_info_done(void) { return 0; }
 
-static inline int snd_info_get_line(snd_info_buffer_t * buffer, char *line, int len) { return 0; }
+static inline int snd_info_get_line(struct snd_info_buffer * buffer, char *line, int len) { return 0; }
 static inline char *snd_info_get_str(char *dest, char *src, int len) { return NULL; }
-static inline snd_info_entry_t *snd_info_create_module_entry(struct module * module, const char *name, snd_info_entry_t * parent) { return NULL; }
-static inline snd_info_entry_t *snd_info_create_card_entry(snd_card_t * card, const char *name, snd_info_entry_t * parent) { return NULL; }
-static inline void snd_info_free_entry(snd_info_entry_t * entry) { ; }
+static inline struct snd_info_entry *snd_info_create_module_entry(struct module * module, const char *name, struct snd_info_entry * parent) { return NULL; }
+static inline struct snd_info_entry *snd_info_create_card_entry(struct snd_card * card, const char *name, struct snd_info_entry * parent) { return NULL; }
+static inline void snd_info_free_entry(struct snd_info_entry * entry) { ; }
 
-static inline int snd_info_card_create(snd_card_t * card) { return 0; }
-static inline int snd_info_card_register(snd_card_t * card) { return 0; }
-static inline int snd_info_card_free(snd_card_t * card) { return 0; }
-static inline int snd_info_register(snd_info_entry_t * entry) { return 0; }
-static inline int snd_info_unregister(snd_info_entry_t * entry) { return 0; }
+static inline int snd_info_card_create(struct snd_card * card) { return 0; }
+static inline int snd_info_card_register(struct snd_card * card) { return 0; }
+static inline int snd_info_card_free(struct snd_card * card) { return 0; }
+static inline int snd_info_register(struct snd_info_entry * entry) { return 0; }
+static inline int snd_info_unregister(struct snd_info_entry * entry) { return 0; }
 
 #define snd_card_proc_new(card,name,entryp)  0 /* always success */
 #define snd_info_set_text_ops(entry,private_data,read_size,read) /*NOP*/
@@ -185,7 +183,7 @@ static inline int snd_info_unregister(snd_info_entry_t * entry) { return 0; }
 
 #define SNDRV_OSS_INFO_DEV_COUNT	6
 
-extern int snd_oss_info_register(int dev, int num, char *string);
+int snd_oss_info_register(int dev, int num, char *string);
 #define snd_oss_info_unregister(dev, num) snd_oss_info_register(dev, num, NULL)
 
 #endif /* CONFIG_SND_OSSEMUL && CONFIG_PROC_FS */
diff --git a/sound/core/info.c b/sound/core/info.c
index 39f9b97d921..ec3282f266f 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -70,12 +70,12 @@ int snd_info_check_reserved_words(const char *str)
 
 static DECLARE_MUTEX(info_mutex);
 
-typedef struct _snd_info_private_data {
-	snd_info_buffer_t *rbuffer;
-	snd_info_buffer_t *wbuffer;
-	snd_info_entry_t *entry;
+struct snd_info_private_data {
+	struct snd_info_buffer *rbuffer;
+	struct snd_info_buffer *wbuffer;
+	struct snd_info_entry *entry;
 	void *file_private_data;
-} snd_info_private_data_t;
+};
 
 static int snd_info_version_init(void);
 static int snd_info_version_done(void);
@@ -90,7 +90,7 @@ static int snd_info_version_done(void);
  *
  * Returns the size of output string.
  */
-int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...)
+int snd_iprintf(struct snd_info_buffer *buffer, char *fmt,...)
 {
 	va_list args;
 	int len, res;
@@ -115,9 +115,9 @@ int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...)
  */
 
 static struct proc_dir_entry *snd_proc_root = NULL;
-snd_info_entry_t *snd_seq_root = NULL;
+struct snd_info_entry *snd_seq_root = NULL;
 #ifdef CONFIG_SND_OSSEMUL
-snd_info_entry_t *snd_oss_root = NULL;
+struct snd_info_entry *snd_oss_root = NULL;
 #endif
 
 static inline void snd_info_entry_prepare(struct proc_dir_entry *de)
@@ -134,7 +134,7 @@ static void snd_remove_proc_entry(struct proc_dir_entry *parent,
 
 static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig)
 {
-	snd_info_private_data_t *data;
+	struct snd_info_private_data *data;
 	struct snd_info_entry *entry;
 	loff_t ret;
 
@@ -176,9 +176,9 @@ out:
 static ssize_t snd_info_entry_read(struct file *file, char __user *buffer,
 				   size_t count, loff_t * offset)
 {
-	snd_info_private_data_t *data;
+	struct snd_info_private_data *data;
 	struct snd_info_entry *entry;
-	snd_info_buffer_t *buf;
+	struct snd_info_buffer *buf;
 	size_t size = 0;
 	loff_t pos;
 
@@ -217,9 +217,9 @@ static ssize_t snd_info_entry_read(struct file *file, char __user *buffer,
 static ssize_t snd_info_entry_write(struct file *file, const char __user *buffer,
 				    size_t count, loff_t * offset)
 {
-	snd_info_private_data_t *data;
+	struct snd_info_private_data *data;
 	struct snd_info_entry *entry;
-	snd_info_buffer_t *buf;
+	struct snd_info_buffer *buf;
 	size_t size = 0;
 	loff_t pos;
 
@@ -259,15 +259,15 @@ static ssize_t snd_info_entry_write(struct file *file, const char __user *buffer
 
 static int snd_info_entry_open(struct inode *inode, struct file *file)
 {
-	snd_info_entry_t *entry;
-	snd_info_private_data_t *data;
-	snd_info_buffer_t *buffer;
+	struct snd_info_entry *entry;
+	struct snd_info_private_data *data;
+	struct snd_info_buffer *buffer;
 	struct proc_dir_entry *p;
 	int mode, err;
 
 	down(&info_mutex);
 	p = PDE(inode);
-	entry = p == NULL ? NULL : (snd_info_entry_t *)p->data;
+	entry = p == NULL ? NULL : (struct snd_info_entry *)p->data;
 	if (entry == NULL || entry->disconnected) {
 		up(&info_mutex);
 		return -ENODEV;
@@ -381,8 +381,8 @@ static int snd_info_entry_open(struct inode *inode, struct file *file)
 
 static int snd_info_entry_release(struct inode *inode, struct file *file)
 {
-	snd_info_entry_t *entry;
-	snd_info_private_data_t *data;
+	struct snd_info_entry *entry;
+	struct snd_info_private_data *data;
 	int mode;
 
 	mode = file->f_flags & O_ACCMODE;
@@ -420,7 +420,7 @@ static int snd_info_entry_release(struct inode *inode, struct file *file)
 
 static unsigned int snd_info_entry_poll(struct file *file, poll_table * wait)
 {
-	snd_info_private_data_t *data;
+	struct snd_info_private_data *data;
 	struct snd_info_entry *entry;
 	unsigned int mask;
 
@@ -447,7 +447,7 @@ static unsigned int snd_info_entry_poll(struct file *file, poll_table * wait)
 static inline int _snd_info_entry_ioctl(struct inode *inode, struct file *file,
 					unsigned int cmd, unsigned long arg)
 {
-	snd_info_private_data_t *data;
+	struct snd_info_private_data *data;
 	struct snd_info_entry *entry;
 
 	data = file->private_data;
@@ -479,7 +479,7 @@ static int snd_info_entry_ioctl(struct inode *inode, struct file *file,
 static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma)
 {
 	struct inode *inode = file->f_dentry->d_inode;
-	snd_info_private_data_t *data;
+	struct snd_info_private_data *data;
 	struct snd_info_entry *entry;
 
 	data = file->private_data;
@@ -541,7 +541,7 @@ int __init snd_info_init(void)
 	snd_proc_root = p;
 #ifdef CONFIG_SND_OSSEMUL
 	{
-		snd_info_entry_t *entry;
+		struct snd_info_entry *entry;
 		if ((entry = snd_info_create_module_entry(THIS_MODULE, "oss", NULL)) == NULL)
 			return -ENOMEM;
 		entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
@@ -554,7 +554,7 @@ int __init snd_info_init(void)
 #endif
 #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
 	{
-		snd_info_entry_t *entry;
+		struct snd_info_entry *entry;
 		if ((entry = snd_info_create_module_entry(THIS_MODULE, "seq", NULL)) == NULL)
 			return -ENOMEM;
 		entry->mode = S_IFDIR | S_IRUGO | S_IXUGO;
@@ -601,10 +601,10 @@ int __exit snd_info_done(void)
  * create a card proc file
  * called from init.c
  */
-int snd_info_card_create(snd_card_t * card)
+int snd_info_card_create(struct snd_card *card)
 {
 	char str[8];
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	snd_assert(card != NULL, return -ENXIO);
 
@@ -624,7 +624,7 @@ int snd_info_card_create(snd_card_t * card)
  * register the card proc file
  * called from init.c
  */
-int snd_info_card_register(snd_card_t * card)
+int snd_info_card_register(struct snd_card *card)
 {
 	struct proc_dir_entry *p;
 
@@ -644,7 +644,7 @@ int snd_info_card_register(snd_card_t * card)
  * de-register the card proc file
  * called from init.c
  */
-int snd_info_card_free(snd_card_t * card)
+int snd_info_card_free(struct snd_card *card)
 {
 	snd_assert(card != NULL, return -ENXIO);
 	if (card->proc_root_link) {
@@ -669,7 +669,7 @@ int snd_info_card_free(snd_card_t * card)
  *
  * Returns zero if successful, or 1 if error or EOF.
  */
-int snd_info_get_line(snd_info_buffer_t * buffer, char *line, int len)
+int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len)
 {
 	int c = -1;
 
@@ -747,9 +747,9 @@ char *snd_info_get_str(char *dest, char *src, int len)
  *
  * Returns the pointer of the new instance, or NULL on failure.
  */
-static snd_info_entry_t *snd_info_create_entry(const char *name)
+static struct snd_info_entry *snd_info_create_entry(const char *name)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 	entry = kzalloc(sizeof(*entry), GFP_KERNEL);
 	if (entry == NULL)
 		return NULL;
@@ -774,11 +774,11 @@ static snd_info_entry_t *snd_info_create_entry(const char *name)
  *
  * Returns the pointer of the new instance, or NULL on failure.
  */
-snd_info_entry_t *snd_info_create_module_entry(struct module * module,
+struct snd_info_entry *snd_info_create_module_entry(struct module * module,
 					       const char *name,
-					       snd_info_entry_t *parent)
+					       struct snd_info_entry *parent)
 {
-	snd_info_entry_t *entry = snd_info_create_entry(name);
+	struct snd_info_entry *entry = snd_info_create_entry(name);
 	if (entry) {
 		entry->module = module;
 		entry->parent = parent;
@@ -796,11 +796,11 @@ snd_info_entry_t *snd_info_create_module_entry(struct module * module,
  *
  * Returns the pointer of the new instance, or NULL on failure.
  */
-snd_info_entry_t *snd_info_create_card_entry(snd_card_t * card,
+struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card,
 					     const char *name,
-					     snd_info_entry_t * parent)
+					     struct snd_info_entry * parent)
 {
-	snd_info_entry_t *entry = snd_info_create_entry(name);
+	struct snd_info_entry *entry = snd_info_create_entry(name);
 	if (entry) {
 		entry->module = card->module;
 		entry->card = card;
@@ -809,29 +809,29 @@ snd_info_entry_t *snd_info_create_card_entry(snd_card_t * card,
 	return entry;
 }
 
-static int snd_info_dev_free_entry(snd_device_t *device)
+static int snd_info_dev_free_entry(struct snd_device *device)
 {
-	snd_info_entry_t *entry = device->device_data;
+	struct snd_info_entry *entry = device->device_data;
 	snd_info_free_entry(entry);
 	return 0;
 }
 
-static int snd_info_dev_register_entry(snd_device_t *device)
+static int snd_info_dev_register_entry(struct snd_device *device)
 {
-	snd_info_entry_t *entry = device->device_data;
+	struct snd_info_entry *entry = device->device_data;
 	return snd_info_register(entry);
 }
 
-static int snd_info_dev_disconnect_entry(snd_device_t *device)
+static int snd_info_dev_disconnect_entry(struct snd_device *device)
 {
-	snd_info_entry_t *entry = device->device_data;
+	struct snd_info_entry *entry = device->device_data;
 	entry->disconnected = 1;
 	return 0;
 }
 
-static int snd_info_dev_unregister_entry(snd_device_t *device)
+static int snd_info_dev_unregister_entry(struct snd_device *device)
 {
-	snd_info_entry_t *entry = device->device_data;
+	struct snd_info_entry *entry = device->device_data;
 	return snd_info_unregister(entry);
 }
 
@@ -855,16 +855,16 @@ static int snd_info_dev_unregister_entry(snd_device_t *device)
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_card_proc_new(snd_card_t *card, const char *name,
-		      snd_info_entry_t **entryp)
+int snd_card_proc_new(struct snd_card *card, const char *name,
+		      struct snd_info_entry **entryp)
 {
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free = snd_info_dev_free_entry,
 		.dev_register =	snd_info_dev_register_entry,
 		.dev_disconnect = snd_info_dev_disconnect_entry,
 		.dev_unregister = snd_info_dev_unregister_entry
 	};
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 	int err;
 
 	entry = snd_info_create_card_entry(card, name, card->proc_root);
@@ -885,7 +885,7 @@ int snd_card_proc_new(snd_card_t *card, const char *name,
  *
  * Releases the info entry.  Don't call this after registered.
  */
-void snd_info_free_entry(snd_info_entry_t * entry)
+void snd_info_free_entry(struct snd_info_entry * entry)
 {
 	if (entry == NULL)
 		return;
@@ -903,7 +903,7 @@ void snd_info_free_entry(snd_info_entry_t * entry)
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_info_register(snd_info_entry_t * entry)
+int snd_info_register(struct snd_info_entry * entry)
 {
 	struct proc_dir_entry *root, *p = NULL;
 
@@ -933,7 +933,7 @@ int snd_info_register(snd_info_entry_t * entry)
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_info_unregister(snd_info_entry_t * entry)
+int snd_info_unregister(struct snd_info_entry * entry)
 {
 	struct proc_dir_entry *root;
 
@@ -952,9 +952,9 @@ int snd_info_unregister(snd_info_entry_t * entry)
 
  */
 
-static snd_info_entry_t *snd_info_version_entry = NULL;
+static struct snd_info_entry *snd_info_version_entry = NULL;
 
-static void snd_info_version_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void snd_info_version_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
 {
 	snd_iprintf(buffer,
 		    "Advanced Linux Sound Architecture Driver Version "
@@ -964,7 +964,7 @@ static void snd_info_version_read(snd_info_entry_t *entry, snd_info_buffer_t * b
 
 static int __init snd_info_version_init(void)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	entry = snd_info_create_module_entry(THIS_MODULE, "version", NULL);
 	if (entry == NULL)
-- 
cgit v1.2.3-70-g09d2


From 877211f5e1b1196179ba1290e8e1a3dc00427c55 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 13:59:38 +0100
Subject: [ALSA] Remove xxx_t typedefs: PCM

Modules: PCM Midlevel

Remove xxx_t typedefs from the core PCM codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/pcm-indirect.h |  28 +-
 include/sound/pcm.h          | 477 ++++++++++++++++-----------------
 include/sound/pcm_params.h   |  86 +++---
 sound/core/pcm.c             | 214 ++++++++-------
 sound/core/pcm_compat.c      | 110 ++++----
 sound/core/pcm_lib.c         | 320 +++++++++++-----------
 sound/core/pcm_memory.c      |  45 ++--
 sound/core/pcm_misc.c        |   2 +-
 sound/core/pcm_native.c      | 623 +++++++++++++++++++++++--------------------
 sound/core/pcm_timer.c       |  30 +--
 10 files changed, 983 insertions(+), 952 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/pcm-indirect.h b/include/sound/pcm-indirect.h
index 31fa7a54508..7003d7702e2 100644
--- a/include/sound/pcm-indirect.h
+++ b/include/sound/pcm-indirect.h
@@ -24,7 +24,7 @@
 
 #include <sound/pcm.h>
 
-typedef struct sndrv_pcm_indirect {
+struct snd_pcm_indirect {
 	unsigned int hw_buffer_size;	/* Byte size of hardware buffer */
 	unsigned int hw_queue_size;	/* Max queue size of hw buffer (0 = buffer size) */
 	unsigned int hw_data;	/* Offset to next dst (or src) in hw ring buffer */
@@ -35,20 +35,20 @@ typedef struct sndrv_pcm_indirect {
 	unsigned int sw_io;	/* Current software pointer in bytes */
 	int sw_ready;		/* Bytes ready to be transferred to/from hw */
 	snd_pcm_uframes_t appl_ptr;	/* Last seen appl_ptr */
-} snd_pcm_indirect_t;
+};
 
-typedef void (*snd_pcm_indirect_copy_t)(snd_pcm_substream_t *substream,
-					snd_pcm_indirect_t *rec, size_t bytes);
+typedef void (*snd_pcm_indirect_copy_t)(struct snd_pcm_substream *substream,
+					struct snd_pcm_indirect *rec, size_t bytes);
 
 /*
  * helper function for playback ack callback
  */
 static inline void
-snd_pcm_indirect_playback_transfer(snd_pcm_substream_t *substream,
-				   snd_pcm_indirect_t *rec,
+snd_pcm_indirect_playback_transfer(struct snd_pcm_substream *substream,
+				   struct snd_pcm_indirect *rec,
 				   snd_pcm_indirect_copy_t copy)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_uframes_t appl_ptr = runtime->control->appl_ptr;
 	snd_pcm_sframes_t diff = appl_ptr - rec->appl_ptr;
 	int qsize;
@@ -89,8 +89,8 @@ snd_pcm_indirect_playback_transfer(snd_pcm_substream_t *substream,
  * ptr = current byte pointer
  */
 static inline snd_pcm_uframes_t
-snd_pcm_indirect_playback_pointer(snd_pcm_substream_t *substream,
-				  snd_pcm_indirect_t *rec, unsigned int ptr)
+snd_pcm_indirect_playback_pointer(struct snd_pcm_substream *substream,
+				  struct snd_pcm_indirect *rec, unsigned int ptr)
 {
 	int bytes = ptr - rec->hw_io;
 	if (bytes < 0)
@@ -110,11 +110,11 @@ snd_pcm_indirect_playback_pointer(snd_pcm_substream_t *substream,
  * helper function for capture ack callback
  */
 static inline void
-snd_pcm_indirect_capture_transfer(snd_pcm_substream_t *substream,
-				  snd_pcm_indirect_t *rec,
+snd_pcm_indirect_capture_transfer(struct snd_pcm_substream *substream,
+				  struct snd_pcm_indirect *rec,
 				  snd_pcm_indirect_copy_t copy)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_uframes_t appl_ptr = runtime->control->appl_ptr;
 	snd_pcm_sframes_t diff = appl_ptr - rec->appl_ptr;
 
@@ -154,8 +154,8 @@ snd_pcm_indirect_capture_transfer(snd_pcm_substream_t *substream,
  * ptr = current byte pointer
  */
 static inline snd_pcm_uframes_t
-snd_pcm_indirect_capture_pointer(snd_pcm_substream_t *substream,
-				 snd_pcm_indirect_t *rec, unsigned int ptr)
+snd_pcm_indirect_capture_pointer(struct snd_pcm_substream *substream,
+				 struct snd_pcm_indirect *rec, unsigned int ptr)
 {
 	int qsize;
 	int bytes = ptr - rec->hw_io;
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index acc4fa9d5ab..7e77c0add80 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -28,36 +28,9 @@
 #include <linux/poll.h>
 #include <linux/bitops.h>
 
-typedef sndrv_pcm_uframes_t snd_pcm_uframes_t;
-typedef sndrv_pcm_sframes_t snd_pcm_sframes_t;
-typedef enum sndrv_pcm_class snd_pcm_class_t;
-typedef enum sndrv_pcm_subclass snd_pcm_subclass_t;
-typedef enum sndrv_pcm_stream snd_pcm_stream_t;
-typedef enum sndrv_pcm_access snd_pcm_access_t;
-typedef enum sndrv_pcm_format snd_pcm_format_t;
-typedef enum sndrv_pcm_subformat snd_pcm_subformat_t;
-typedef enum sndrv_pcm_state snd_pcm_state_t;
-typedef union sndrv_pcm_sync_id snd_pcm_sync_id_t;
-typedef struct sndrv_pcm_info snd_pcm_info_t;
-typedef enum sndrv_pcm_hw_param snd_pcm_hw_param_t;
-typedef struct sndrv_pcm_hw_params snd_pcm_hw_params_t;
-typedef enum sndrv_pcm_start snd_pcm_start_t;
-typedef enum sndrv_pcm_xrun snd_pcm_xrun_t;
-typedef enum sndrv_pcm_tstamp snd_pcm_tstamp_t;
-typedef struct sndrv_pcm_sw_params snd_pcm_sw_params_t;
-typedef struct sndrv_pcm_channel_info snd_pcm_channel_info_t;
-typedef struct sndrv_pcm_status snd_pcm_status_t;
-typedef struct sndrv_pcm_mmap_status snd_pcm_mmap_status_t;
-typedef struct sndrv_pcm_mmap_control snd_pcm_mmap_control_t;
-typedef struct sndrv_mask snd_mask_t;
-typedef struct snd_sg_buf snd_pcm_sgbuf_t;
-
 #define snd_pcm_substream_chip(substream) ((substream)->private_data)
 #define snd_pcm_chip(pcm) ((pcm)->private_data)
 
-typedef struct _snd_pcm_file snd_pcm_file_t;
-typedef struct _snd_pcm_runtime snd_pcm_runtime_t;
-
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
 #include "pcm_oss.h"
 #endif
@@ -66,7 +39,7 @@ typedef struct _snd_pcm_runtime snd_pcm_runtime_t;
  *  Hardware (lowlevel) section
  */
 
-typedef struct _snd_pcm_hardware {
+struct snd_pcm_hardware {
 	unsigned int info;		/* SNDRV_PCM_INFO_* */
 	u64 formats;			/* SNDRV_PCM_FMTBIT_* */
 	unsigned int rates;		/* SNDRV_PCM_RATE_* */
@@ -80,26 +53,29 @@ typedef struct _snd_pcm_hardware {
 	unsigned int periods_min;	/* min # of periods */
 	unsigned int periods_max;	/* max # of periods */
 	size_t fifo_size;		/* fifo size in bytes */
-} snd_pcm_hardware_t;
+};
 
-typedef struct _snd_pcm_ops {
-	int (*open)(snd_pcm_substream_t *substream);
-	int (*close)(snd_pcm_substream_t *substream);
-	int (*ioctl)(snd_pcm_substream_t * substream,
+struct snd_pcm_ops {
+	int (*open)(struct snd_pcm_substream *substream);
+	int (*close)(struct snd_pcm_substream *substream);
+	int (*ioctl)(struct snd_pcm_substream * substream,
 		     unsigned int cmd, void *arg);
-	int (*hw_params)(snd_pcm_substream_t * substream, snd_pcm_hw_params_t * params);
-	int (*hw_free)(snd_pcm_substream_t *substream);
-	int (*prepare)(snd_pcm_substream_t * substream);
-	int (*trigger)(snd_pcm_substream_t * substream, int cmd);
-	snd_pcm_uframes_t (*pointer)(snd_pcm_substream_t * substream);
-	int (*copy)(snd_pcm_substream_t *substream, int channel, snd_pcm_uframes_t pos,
+	int (*hw_params)(struct snd_pcm_substream *substream,
+			 struct snd_pcm_hw_params *params);
+	int (*hw_free)(struct snd_pcm_substream *substream);
+	int (*prepare)(struct snd_pcm_substream *substream);
+	int (*trigger)(struct snd_pcm_substream *substream, int cmd);
+	snd_pcm_uframes_t (*pointer)(struct snd_pcm_substream *substream);
+	int (*copy)(struct snd_pcm_substream *substream, int channel,
+		    snd_pcm_uframes_t pos,
 		    void __user *buf, snd_pcm_uframes_t count);
-	int (*silence)(snd_pcm_substream_t *substream, int channel, 
+	int (*silence)(struct snd_pcm_substream *substream, int channel, 
 		       snd_pcm_uframes_t pos, snd_pcm_uframes_t count);
-	struct page *(*page)(snd_pcm_substream_t *substream, unsigned long offset);
-	int (*mmap)(snd_pcm_substream_t *substream, struct vm_area_struct *vma);
-	int (*ack)(snd_pcm_substream_t *substream);
-} snd_pcm_ops_t;
+	struct page *(*page)(struct snd_pcm_substream *substream,
+			     unsigned long offset);
+	int (*mmap)(struct snd_pcm_substream *substream, struct vm_area_struct *vma);
+	int (*ack)(struct snd_pcm_substream *substream);
+};
 
 /*
  *
@@ -212,17 +188,16 @@ typedef struct _snd_pcm_ops {
 #define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE
 #endif
 
-struct _snd_pcm_file {
-	snd_pcm_substream_t * substream;
-	struct _snd_pcm_file * next;
+struct snd_pcm_file {
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_file *next;
 };
 
-typedef struct _snd_pcm_hw_rule snd_pcm_hw_rule_t;
+struct snd_pcm_hw_rule;
+typedef int (*snd_pcm_hw_rule_func_t)(struct snd_pcm_hw_params *params,
+				      struct snd_pcm_hw_rule *rule);
 
-typedef int (*snd_pcm_hw_rule_func_t)(snd_pcm_hw_params_t *params,
-				      snd_pcm_hw_rule_t *rule);
-
-struct _snd_pcm_hw_rule {
+struct snd_pcm_hw_rule {
 	unsigned int cond;
 	snd_pcm_hw_rule_func_t func;
 	int var;
@@ -230,57 +205,57 @@ struct _snd_pcm_hw_rule {
 	void *private;
 };
 
-typedef struct _snd_pcm_hw_constraints {
-	snd_mask_t masks[SNDRV_PCM_HW_PARAM_LAST_MASK - 
+struct snd_pcm_hw_constraints {
+	struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - 
 			 SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
-	snd_interval_t intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL -
+	struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL -
 			     SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
 	unsigned int rules_num;
 	unsigned int rules_all;
-	snd_pcm_hw_rule_t *rules;
-} snd_pcm_hw_constraints_t;
+	struct snd_pcm_hw_rule *rules;
+};
 
-static inline snd_mask_t *constrs_mask(snd_pcm_hw_constraints_t *constrs,
-				       snd_pcm_hw_param_t var)
+static inline struct snd_mask *constrs_mask(struct snd_pcm_hw_constraints *constrs,
+					    snd_pcm_hw_param_t var)
 {
 	return &constrs->masks[var - SNDRV_PCM_HW_PARAM_FIRST_MASK];
 }
 
-static inline snd_interval_t *constrs_interval(snd_pcm_hw_constraints_t *constrs,
-					  snd_pcm_hw_param_t var)
+static inline struct snd_interval *constrs_interval(struct snd_pcm_hw_constraints *constrs,
+						    snd_pcm_hw_param_t var)
 {
 	return &constrs->intervals[var - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL];
 }
 
-typedef struct {
+struct snd_ratnum {
 	unsigned int num;
 	unsigned int den_min, den_max, den_step;
-} ratnum_t;
+};
 
-typedef struct {
+struct snd_ratden {
 	unsigned int num_min, num_max, num_step;
 	unsigned int den;
-} ratden_t;
+};
 
-typedef struct {
+struct snd_pcm_hw_constraint_ratnums {
 	int nrats;
-	ratnum_t *rats;
-} snd_pcm_hw_constraint_ratnums_t;
+	struct snd_ratnum *rats;
+};
 
-typedef struct {
+struct snd_pcm_hw_constraint_ratdens {
 	int nrats;
-	ratden_t *rats;
-} snd_pcm_hw_constraint_ratdens_t;
+	struct snd_ratden *rats;
+};
 
-typedef struct {
+struct snd_pcm_hw_constraint_list {
 	unsigned int count;
 	unsigned int *list;
 	unsigned int mask;
-} snd_pcm_hw_constraint_list_t;
+};
 
-struct _snd_pcm_runtime {
+struct snd_pcm_runtime {
 	/* -- Status -- */
-	snd_pcm_substream_t *trigger_master;
+	struct snd_pcm_substream *trigger_master;
 	struct timespec trigger_tstamp;	/* trigger timestamp */
 	int overrange;
 	snd_pcm_uframes_t avail_max;
@@ -306,7 +281,7 @@ struct _snd_pcm_runtime {
 	unsigned int rate_den;
 
 	/* -- SW params -- */
-	snd_pcm_tstamp_t tstamp_mode;	/* mmap timestamp is updated */
+	int tstamp_mode;		/* mmap timestamp is updated */
   	unsigned int period_step;
 	unsigned int sleep_min;		/* min ticks to sleep */
 	snd_pcm_uframes_t xfer_align;	/* xfer size need to be a multiple */
@@ -320,11 +295,11 @@ struct _snd_pcm_runtime {
 	snd_pcm_uframes_t silence_start; /* starting pointer to silence area */
 	snd_pcm_uframes_t silence_filled; /* size filled with silence */
 
-	snd_pcm_sync_id_t sync;		/* hardware synchronization ID */
+	union snd_pcm_sync_id sync;	/* hardware synchronization ID */
 
 	/* -- mmap -- */
-	volatile snd_pcm_mmap_status_t *status;
-	volatile snd_pcm_mmap_control_t *control;
+	volatile struct snd_pcm_mmap_status *status;
+	volatile struct snd_pcm_mmap_control *control;
 	atomic_t mmap_count;
 
 	/* -- locking / scheduling -- */
@@ -334,15 +309,15 @@ struct _snd_pcm_runtime {
 
 	/* -- private section -- */
 	void *private_data;
-	void (*private_free)(snd_pcm_runtime_t *runtime);
+	void (*private_free)(struct snd_pcm_runtime *runtime);
 
 	/* -- hardware description -- */
-	snd_pcm_hardware_t hw;
-	snd_pcm_hw_constraints_t hw_constraints;
+	struct snd_pcm_hardware hw;
+	struct snd_pcm_hw_constraints hw_constraints;
 
 	/* -- interrupt callbacks -- */
-	void (*transfer_ack_begin)(snd_pcm_substream_t *substream);
-	void (*transfer_ack_end)(snd_pcm_substream_t *substream);
+	void (*transfer_ack_begin)(struct snd_pcm_substream *substream);
+	void (*transfer_ack_end)(struct snd_pcm_substream *substream);
 
 	/* -- timer -- */
 	unsigned int timer_resolution;	/* timer resolution */
@@ -356,19 +331,19 @@ struct _snd_pcm_runtime {
 
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
 	/* -- OSS things -- */
-	snd_pcm_oss_runtime_t oss;
+	struct snd_pcm_oss_runtime oss;
 #endif
 };
 
-typedef struct _snd_pcm_group {		/* keep linked substreams */
+struct snd_pcm_group {		/* keep linked substreams */
 	spinlock_t lock;
 	struct list_head substreams;
 	int count;
-} snd_pcm_group_t;
+};
 
-struct _snd_pcm_substream {
-	snd_pcm_t *pcm;
-	snd_pcm_str_t *pstr;
+struct snd_pcm_substream {
+	struct snd_pcm *pcm;
+	struct snd_pcm_str *pstr;
 	void *private_data;		/* copied from pcm->private_data */
 	int number;
 	char name[32];			/* substream name */
@@ -378,32 +353,32 @@ struct _snd_pcm_substream {
 	unsigned int dma_buf_id;
 	size_t dma_max;
 	/* -- hardware operations -- */
-	snd_pcm_ops_t *ops;
+	struct snd_pcm_ops *ops;
 	/* -- runtime information -- */
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
         /* -- timer section -- */
-	snd_timer_t *timer;		/* timer */
+	struct snd_timer *timer;		/* timer */
 	unsigned timer_running: 1;	/* time is running */
 	spinlock_t timer_lock;
 	/* -- next substream -- */
-	snd_pcm_substream_t *next;
+	struct snd_pcm_substream *next;
 	/* -- linked substreams -- */
 	struct list_head link_list;	/* linked list member */
-	snd_pcm_group_t self_group;	/* fake group for non linked substream (with substream lock inside) */
-	snd_pcm_group_t *group;		/* pointer to current group */
+	struct snd_pcm_group self_group;	/* fake group for non linked substream (with substream lock inside) */
+	struct snd_pcm_group *group;		/* pointer to current group */
 	/* -- assigned files -- */
-	snd_pcm_file_t *file;
+	struct snd_pcm_file *file;
 	struct file *ffile;
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
 	/* -- OSS things -- */
-	snd_pcm_oss_substream_t oss;
+	struct snd_pcm_oss_substream oss;
 #endif
-	snd_info_entry_t *proc_root;
-	snd_info_entry_t *proc_info_entry;
-	snd_info_entry_t *proc_hw_params_entry;
-	snd_info_entry_t *proc_sw_params_entry;
-	snd_info_entry_t *proc_status_entry;
-	snd_info_entry_t *proc_prealloc_entry;
+	struct snd_info_entry *proc_root;
+	struct snd_info_entry *proc_info_entry;
+	struct snd_info_entry *proc_hw_params_entry;
+	struct snd_info_entry *proc_sw_params_entry;
+	struct snd_info_entry *proc_status_entry;
+	struct snd_info_entry *proc_prealloc_entry;
 	/* misc flags */
 	unsigned int no_mmap_ctrl: 1;
 };
@@ -415,65 +390,65 @@ struct _snd_pcm_substream {
 #endif
 
 
-struct _snd_pcm_str {
+struct snd_pcm_str {
 	int stream;				/* stream (direction) */
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	/* -- substreams -- */
 	unsigned int substream_count;
 	unsigned int substream_opened;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
 	/* -- OSS things -- */
-	snd_pcm_oss_stream_t oss;
+	struct snd_pcm_oss_stream oss;
 #endif
-	snd_pcm_file_t *files;
-	snd_minor_t *reg;
-	snd_info_entry_t *proc_root;
-	snd_info_entry_t *proc_info_entry;
+	struct snd_pcm_file *files;
+	struct snd_minor *reg;
+	struct snd_info_entry *proc_root;
+	struct snd_info_entry *proc_info_entry;
 #ifdef CONFIG_SND_DEBUG
 	unsigned int xrun_debug;	/* 0 = disabled, 1 = verbose, 2 = stacktrace */
-	snd_info_entry_t *proc_xrun_debug_entry;
+	struct snd_info_entry *proc_xrun_debug_entry;
 #endif
 };
 
-struct _snd_pcm {
-	snd_card_t *card;
+struct snd_pcm {
+	struct snd_card *card;
 	unsigned int device;	/* device number */
 	unsigned int info_flags;
 	unsigned short dev_class;
 	unsigned short dev_subclass;
 	char id[64];
 	char name[80];
-	snd_pcm_str_t streams[2];
+	struct snd_pcm_str streams[2];
 	struct semaphore open_mutex;
 	wait_queue_head_t open_wait;
 	void *private_data;
-	void (*private_free) (snd_pcm_t *pcm);
+	void (*private_free) (struct snd_pcm *pcm);
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
-	snd_pcm_oss_t oss;
+	struct snd_pcm_oss oss;
 #endif
 };
 
-typedef struct _snd_pcm_notify {
-	int (*n_register) (snd_pcm_t * pcm);
-	int (*n_disconnect) (snd_pcm_t * pcm);
-	int (*n_unregister) (snd_pcm_t * pcm);
+struct snd_pcm_notify {
+	int (*n_register) (struct snd_pcm * pcm);
+	int (*n_disconnect) (struct snd_pcm * pcm);
+	int (*n_unregister) (struct snd_pcm * pcm);
 	struct list_head list;
-} snd_pcm_notify_t;
+};
 
 /*
  *  Registering
  */
 
-extern snd_pcm_t *snd_pcm_devices[];
-extern snd_minor_t snd_pcm_reg[2];
+extern struct snd_pcm *snd_pcm_devices[];
+extern struct snd_minor snd_pcm_reg[2];
 
-int snd_pcm_new(snd_card_t * card, char *id, int device,
+int snd_pcm_new(struct snd_card *card, char *id, int device,
 		int playback_count, int capture_count,
-		snd_pcm_t **rpcm);
-int snd_pcm_new_stream(snd_pcm_t *pcm, int stream, int substream_count);
+		struct snd_pcm **rpcm);
+int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count);
 
-int snd_pcm_notify(snd_pcm_notify_t *notify, int nfree);
+int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree);
 
 /*
  *  Native I/O
@@ -481,24 +456,26 @@ int snd_pcm_notify(snd_pcm_notify_t *notify, int nfree);
 
 extern rwlock_t snd_pcm_link_rwlock;
 
-int snd_pcm_info(snd_pcm_substream_t * substream, snd_pcm_info_t *info);
-int snd_pcm_info_user(snd_pcm_substream_t * substream, snd_pcm_info_t __user *info);
-int snd_pcm_status(snd_pcm_substream_t * substream, snd_pcm_status_t *status);
-int snd_pcm_prepare(snd_pcm_substream_t *substream);
-int snd_pcm_start(snd_pcm_substream_t *substream);
-int snd_pcm_stop(snd_pcm_substream_t *substream, int status);
-int snd_pcm_drain_done(snd_pcm_substream_t *substream);
+int snd_pcm_info(struct snd_pcm_substream *substream, struct snd_pcm_info *info);
+int snd_pcm_info_user(struct snd_pcm_substream *substream,
+		      struct snd_pcm_info __user *info);
+int snd_pcm_status(struct snd_pcm_substream *substream,
+		   struct snd_pcm_status *status);
+int snd_pcm_prepare(struct snd_pcm_substream *substream);
+int snd_pcm_start(struct snd_pcm_substream *substream);
+int snd_pcm_stop(struct snd_pcm_substream *substream, int status);
+int snd_pcm_drain_done(struct snd_pcm_substream *substream);
 #ifdef CONFIG_PM
-int snd_pcm_suspend(snd_pcm_substream_t *substream);
-int snd_pcm_suspend_all(snd_pcm_t *pcm);
+int snd_pcm_suspend(struct snd_pcm_substream *substream);
+int snd_pcm_suspend_all(struct snd_pcm *pcm);
 #endif
-int snd_pcm_kernel_playback_ioctl(snd_pcm_substream_t *substream, unsigned int cmd, void *arg);
-int snd_pcm_kernel_capture_ioctl(snd_pcm_substream_t *substream, unsigned int cmd, void *arg);
-int snd_pcm_kernel_ioctl(snd_pcm_substream_t *substream, unsigned int cmd, void *arg);
-int snd_pcm_open_substream(snd_pcm_t *pcm, int stream, snd_pcm_substream_t **rsubstream);
-void snd_pcm_release_substream(snd_pcm_substream_t *substream);
+int snd_pcm_kernel_playback_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg);
+int snd_pcm_kernel_capture_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg);
+int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg);
+int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, struct snd_pcm_substream **rsubstream);
+void snd_pcm_release_substream(struct snd_pcm_substream *substream);
 void snd_pcm_vma_notify_data(void *client, void *data);
-int snd_pcm_mmap_data(snd_pcm_substream_t *substream, struct file *file, struct vm_area_struct *area);
+int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area);
 
 #if BITS_PER_LONG >= 64
 
@@ -578,30 +555,30 @@ static inline void div64_32(u_int64_t *n, u_int32_t div, u_int32_t *rem)
  *  PCM library
  */
 
-static inline int snd_pcm_stream_linked(snd_pcm_substream_t *substream)
+static inline int snd_pcm_stream_linked(struct snd_pcm_substream *substream)
 {
 	return substream->group != &substream->self_group;
 }
 
-static inline void snd_pcm_stream_lock(snd_pcm_substream_t *substream)
+static inline void snd_pcm_stream_lock(struct snd_pcm_substream *substream)
 {
 	read_lock(&snd_pcm_link_rwlock);
 	spin_lock(&substream->self_group.lock);
 }
 
-static inline void snd_pcm_stream_unlock(snd_pcm_substream_t *substream)
+static inline void snd_pcm_stream_unlock(struct snd_pcm_substream *substream)
 {
 	spin_unlock(&substream->self_group.lock);
 	read_unlock(&snd_pcm_link_rwlock);
 }
 
-static inline void snd_pcm_stream_lock_irq(snd_pcm_substream_t *substream)
+static inline void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream)
 {
 	read_lock_irq(&snd_pcm_link_rwlock);
 	spin_lock(&substream->self_group.lock);
 }
 
-static inline void snd_pcm_stream_unlock_irq(snd_pcm_substream_t *substream)
+static inline void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream)
 {
 	spin_unlock(&substream->self_group.lock);
 	read_unlock_irq(&snd_pcm_link_rwlock);
@@ -623,56 +600,56 @@ do { \
 	list_for_each(pos, &substream->group->substreams)
 
 #define snd_pcm_group_substream_entry(pos) \
-	list_entry(pos, snd_pcm_substream_t, link_list)
+	list_entry(pos, struct snd_pcm_substream, link_list)
 
-static inline int snd_pcm_running(snd_pcm_substream_t *substream)
+static inline int snd_pcm_running(struct snd_pcm_substream *substream)
 {
 	return (substream->runtime->status->state == SNDRV_PCM_STATE_RUNNING ||
 		(substream->runtime->status->state == SNDRV_PCM_STATE_DRAINING &&
 		 substream->stream == SNDRV_PCM_STREAM_PLAYBACK));
 }
 
-static inline ssize_t bytes_to_samples(snd_pcm_runtime_t *runtime, ssize_t size)
+static inline ssize_t bytes_to_samples(struct snd_pcm_runtime *runtime, ssize_t size)
 {
 	return size * 8 / runtime->sample_bits;
 }
 
-static inline snd_pcm_sframes_t bytes_to_frames(snd_pcm_runtime_t *runtime, ssize_t size)
+static inline snd_pcm_sframes_t bytes_to_frames(struct snd_pcm_runtime *runtime, ssize_t size)
 {
 	return size * 8 / runtime->frame_bits;
 }
 
-static inline ssize_t samples_to_bytes(snd_pcm_runtime_t *runtime, ssize_t size)
+static inline ssize_t samples_to_bytes(struct snd_pcm_runtime *runtime, ssize_t size)
 {
 	return size * runtime->sample_bits / 8;
 }
 
-static inline ssize_t frames_to_bytes(snd_pcm_runtime_t *runtime, snd_pcm_sframes_t size)
+static inline ssize_t frames_to_bytes(struct snd_pcm_runtime *runtime, snd_pcm_sframes_t size)
 {
 	return size * runtime->frame_bits / 8;
 }
 
-static inline int frame_aligned(snd_pcm_runtime_t *runtime, ssize_t bytes)
+static inline int frame_aligned(struct snd_pcm_runtime *runtime, ssize_t bytes)
 {
 	return bytes % runtime->byte_align == 0;
 }
 
-static inline size_t snd_pcm_lib_buffer_bytes(snd_pcm_substream_t *substream)
+static inline size_t snd_pcm_lib_buffer_bytes(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	return frames_to_bytes(runtime, runtime->buffer_size);
 }
 
-static inline size_t snd_pcm_lib_period_bytes(snd_pcm_substream_t *substream)
+static inline size_t snd_pcm_lib_period_bytes(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	return frames_to_bytes(runtime, runtime->period_size);
 }
 
 /*
  *  result is: 0 ... (boundary - 1)
  */
-static inline snd_pcm_uframes_t snd_pcm_playback_avail(snd_pcm_runtime_t *runtime)
+static inline snd_pcm_uframes_t snd_pcm_playback_avail(struct snd_pcm_runtime *runtime)
 {
 	snd_pcm_sframes_t avail = runtime->status->hw_ptr + runtime->buffer_size - runtime->control->appl_ptr;
 	if (avail < 0)
@@ -685,7 +662,7 @@ static inline snd_pcm_uframes_t snd_pcm_playback_avail(snd_pcm_runtime_t *runtim
 /*
  *  result is: 0 ... (boundary - 1)
  */
-static inline snd_pcm_uframes_t snd_pcm_capture_avail(snd_pcm_runtime_t *runtime)
+static inline snd_pcm_uframes_t snd_pcm_capture_avail(struct snd_pcm_runtime *runtime)
 {
 	snd_pcm_sframes_t avail = runtime->status->hw_ptr - runtime->control->appl_ptr;
 	if (avail < 0)
@@ -693,12 +670,12 @@ static inline snd_pcm_uframes_t snd_pcm_capture_avail(snd_pcm_runtime_t *runtime
 	return avail;
 }
 
-static inline snd_pcm_sframes_t snd_pcm_playback_hw_avail(snd_pcm_runtime_t *runtime)
+static inline snd_pcm_sframes_t snd_pcm_playback_hw_avail(struct snd_pcm_runtime *runtime)
 {
 	return runtime->buffer_size - snd_pcm_playback_avail(runtime);
 }
 
-static inline snd_pcm_sframes_t snd_pcm_capture_hw_avail(snd_pcm_runtime_t *runtime)
+static inline snd_pcm_sframes_t snd_pcm_capture_hw_avail(struct snd_pcm_runtime *runtime)
 {
 	return runtime->buffer_size - snd_pcm_capture_avail(runtime);
 }
@@ -711,9 +688,9 @@ static inline snd_pcm_sframes_t snd_pcm_capture_hw_avail(snd_pcm_runtime_t *runt
  *
  * Returns non-zero if available, or zero if not.
  */
-static inline int snd_pcm_playback_ready(snd_pcm_substream_t *substream)
+static inline int snd_pcm_playback_ready(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	return snd_pcm_playback_avail(runtime) >= runtime->control->avail_min;
 }
 
@@ -725,9 +702,9 @@ static inline int snd_pcm_playback_ready(snd_pcm_substream_t *substream)
  *
  * Returns non-zero if available, or zero if not.
  */
-static inline int snd_pcm_capture_ready(snd_pcm_substream_t *substream)
+static inline int snd_pcm_capture_ready(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	return snd_pcm_capture_avail(runtime) >= runtime->control->avail_min;
 }
 
@@ -740,9 +717,9 @@ static inline int snd_pcm_capture_ready(snd_pcm_substream_t *substream)
  *
  * Returns non-zero if exists, or zero if not.
  */
-static inline int snd_pcm_playback_data(snd_pcm_substream_t *substream)
+static inline int snd_pcm_playback_data(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	
 	if (runtime->stop_threshold >= runtime->boundary)
 		return 1;
@@ -757,9 +734,9 @@ static inline int snd_pcm_playback_data(snd_pcm_substream_t *substream)
  *
  * Returns non-zero if empty, or zero if not.
  */
-static inline int snd_pcm_playback_empty(snd_pcm_substream_t *substream)
+static inline int snd_pcm_playback_empty(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	return snd_pcm_playback_avail(runtime) >= runtime->buffer_size;
 }
 
@@ -771,14 +748,14 @@ static inline int snd_pcm_playback_empty(snd_pcm_substream_t *substream)
  *
  * Returns non-zero if empty, or zero if not.
  */
-static inline int snd_pcm_capture_empty(snd_pcm_substream_t *substream)
+static inline int snd_pcm_capture_empty(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	return snd_pcm_capture_avail(runtime) == 0;
 }
 
-static inline void snd_pcm_trigger_done(snd_pcm_substream_t *substream, 
-					snd_pcm_substream_t *master)
+static inline void snd_pcm_trigger_done(struct snd_pcm_substream *substream, 
+					struct snd_pcm_substream *master)
 {
 	substream->runtime->trigger_master = master;
 }
@@ -795,28 +772,28 @@ static inline int hw_is_interval(int var)
 		var <= SNDRV_PCM_HW_PARAM_LAST_INTERVAL;
 }
 
-static inline snd_mask_t *hw_param_mask(snd_pcm_hw_params_t *params,
+static inline struct snd_mask *hw_param_mask(struct snd_pcm_hw_params *params,
 				     snd_pcm_hw_param_t var)
 {
 	return &params->masks[var - SNDRV_PCM_HW_PARAM_FIRST_MASK];
 }
 
-static inline snd_interval_t *hw_param_interval(snd_pcm_hw_params_t *params,
+static inline struct snd_interval *hw_param_interval(struct snd_pcm_hw_params *params,
 					     snd_pcm_hw_param_t var)
 {
 	return &params->intervals[var - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL];
 }
 
-static inline const snd_mask_t *hw_param_mask_c(const snd_pcm_hw_params_t *params,
+static inline const struct snd_mask *hw_param_mask_c(const struct snd_pcm_hw_params *params,
 					     snd_pcm_hw_param_t var)
 {
-	return (const snd_mask_t *)hw_param_mask((snd_pcm_hw_params_t*) params, var);
+	return (const struct snd_mask *)hw_param_mask((struct snd_pcm_hw_params*) params, var);
 }
 
-static inline const snd_interval_t *hw_param_interval_c(const snd_pcm_hw_params_t *params,
+static inline const struct snd_interval *hw_param_interval_c(const struct snd_pcm_hw_params *params,
 						     snd_pcm_hw_param_t var)
 {
-	return (const snd_interval_t *)hw_param_interval((snd_pcm_hw_params_t*) params, var);
+	return (const struct snd_interval *)hw_param_interval((struct snd_pcm_hw_params*) params, var);
 }
 
 #define params_access(p) snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_ACCESS))
@@ -832,66 +809,66 @@ static inline const snd_interval_t *hw_param_interval_c(const snd_pcm_hw_params_
 #define params_tick_time(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_TICK_TIME)->min
 
 
-int snd_interval_refine(snd_interval_t *i, const snd_interval_t *v);
-void snd_interval_mul(const snd_interval_t *a, const snd_interval_t *b, snd_interval_t *c);
-void snd_interval_div(const snd_interval_t *a, const snd_interval_t *b, snd_interval_t *c);
-void snd_interval_muldivk(const snd_interval_t *a, const snd_interval_t *b, 
-			  unsigned int k, snd_interval_t *c);
-void snd_interval_mulkdiv(const snd_interval_t *a, unsigned int k,
-			  const snd_interval_t *b, snd_interval_t *c);
-int snd_interval_list(snd_interval_t *i, unsigned int count, unsigned int *list, unsigned int mask);
-int snd_interval_ratnum(snd_interval_t *i,
-			unsigned int rats_count, ratnum_t *rats,
+int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v);
+void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c);
+void snd_interval_div(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c);
+void snd_interval_muldivk(const struct snd_interval *a, const struct snd_interval *b, 
+			  unsigned int k, struct snd_interval *c);
+void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k,
+			  const struct snd_interval *b, struct snd_interval *c);
+int snd_interval_list(struct snd_interval *i, unsigned int count, unsigned int *list, unsigned int mask);
+int snd_interval_ratnum(struct snd_interval *i,
+			unsigned int rats_count, struct snd_ratnum *rats,
 			unsigned int *nump, unsigned int *denp);
 
-void _snd_pcm_hw_params_any(snd_pcm_hw_params_t *params);
-void _snd_pcm_hw_param_setempty(snd_pcm_hw_params_t *params, snd_pcm_hw_param_t var);
-int snd_pcm_hw_param_near(snd_pcm_substream_t *substream, 
-			  snd_pcm_hw_params_t *params,
+void _snd_pcm_hw_params_any(struct snd_pcm_hw_params *params);
+void _snd_pcm_hw_param_setempty(struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var);
+int snd_pcm_hw_param_near(struct snd_pcm_substream *substream, 
+			  struct snd_pcm_hw_params *params,
 			  snd_pcm_hw_param_t var, 
 			  unsigned int val, int *dir);
-int snd_pcm_hw_param_set(snd_pcm_substream_t *pcm,
-			 snd_pcm_hw_params_t *params,
+int snd_pcm_hw_param_set(struct snd_pcm_substream *pcm,
+			 struct snd_pcm_hw_params *params,
 			 snd_pcm_hw_param_t var,
 			 unsigned int val, int dir);
-int snd_pcm_hw_params_choose(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params);
+int snd_pcm_hw_params_choose(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params);
 
-int snd_pcm_hw_refine(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params);
+int snd_pcm_hw_refine(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params);
 
-int snd_pcm_hw_constraints_init(snd_pcm_substream_t *substream);
-int snd_pcm_hw_constraints_complete(snd_pcm_substream_t *substream);
+int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream);
+int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream);
 
-int snd_pcm_hw_constraint_mask(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var,
+int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
 			       u_int32_t mask);
-int snd_pcm_hw_constraint_mask64(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var,
+int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
 				 u_int64_t mask);
-int snd_pcm_hw_constraint_minmax(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var,
+int snd_pcm_hw_constraint_minmax(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
 				 unsigned int min, unsigned int max);
-int snd_pcm_hw_constraint_integer(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var);
-int snd_pcm_hw_constraint_list(snd_pcm_runtime_t *runtime, 
+int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var);
+int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime, 
 			       unsigned int cond,
 			       snd_pcm_hw_param_t var,
-			       snd_pcm_hw_constraint_list_t *l);
-int snd_pcm_hw_constraint_ratnums(snd_pcm_runtime_t *runtime, 
+			       struct snd_pcm_hw_constraint_list *l);
+int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, 
 				  unsigned int cond,
 				  snd_pcm_hw_param_t var,
-				  snd_pcm_hw_constraint_ratnums_t *r);
-int snd_pcm_hw_constraint_ratdens(snd_pcm_runtime_t *runtime, 
+				  struct snd_pcm_hw_constraint_ratnums *r);
+int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime, 
 				  unsigned int cond,
 				  snd_pcm_hw_param_t var,
-				  snd_pcm_hw_constraint_ratdens_t *r);
-int snd_pcm_hw_constraint_msbits(snd_pcm_runtime_t *runtime, 
+				  struct snd_pcm_hw_constraint_ratdens *r);
+int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime, 
 				 unsigned int cond,
 				 unsigned int width,
 				 unsigned int msbits);
-int snd_pcm_hw_constraint_step(snd_pcm_runtime_t *runtime,
+int snd_pcm_hw_constraint_step(struct snd_pcm_runtime *runtime,
 			       unsigned int cond,
 			       snd_pcm_hw_param_t var,
 			       unsigned long step);
-int snd_pcm_hw_constraint_pow2(snd_pcm_runtime_t *runtime,
+int snd_pcm_hw_constraint_pow2(struct snd_pcm_runtime *runtime,
 			       unsigned int cond,
 			       snd_pcm_hw_param_t var);
-int snd_pcm_hw_rule_add(snd_pcm_runtime_t *runtime,
+int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime,
 			unsigned int cond,
 			int var,
 			snd_pcm_hw_rule_func_t func, void *private,
@@ -925,37 +902,37 @@ int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int
 snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian);
 const char *snd_pcm_format_name(snd_pcm_format_t format);
 
-void snd_pcm_set_ops(snd_pcm_t * pcm, int direction, snd_pcm_ops_t *ops);
-void snd_pcm_set_sync(snd_pcm_substream_t * substream);
-int snd_pcm_lib_interleave_len(snd_pcm_substream_t *substream);
-int snd_pcm_lib_ioctl(snd_pcm_substream_t *substream,
+void snd_pcm_set_ops(struct snd_pcm * pcm, int direction, struct snd_pcm_ops *ops);
+void snd_pcm_set_sync(struct snd_pcm_substream *substream);
+int snd_pcm_lib_interleave_len(struct snd_pcm_substream *substream);
+int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,
 		      unsigned int cmd, void *arg);                      
-int snd_pcm_update_hw_ptr(snd_pcm_substream_t *substream);
-int snd_pcm_playback_xrun_check(snd_pcm_substream_t *substream);
-int snd_pcm_capture_xrun_check(snd_pcm_substream_t *substream);
-int snd_pcm_playback_xrun_asap(snd_pcm_substream_t *substream);
-int snd_pcm_capture_xrun_asap(snd_pcm_substream_t *substream);
-void snd_pcm_playback_silence(snd_pcm_substream_t *substream, snd_pcm_uframes_t new_hw_ptr);
-void snd_pcm_tick_prepare(snd_pcm_substream_t *substream);
-void snd_pcm_tick_set(snd_pcm_substream_t *substream, unsigned long ticks);
-void snd_pcm_tick_elapsed(snd_pcm_substream_t *substream);
-void snd_pcm_period_elapsed(snd_pcm_substream_t *substream);
-snd_pcm_sframes_t snd_pcm_lib_write(snd_pcm_substream_t *substream,
+int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream);
+int snd_pcm_playback_xrun_check(struct snd_pcm_substream *substream);
+int snd_pcm_capture_xrun_check(struct snd_pcm_substream *substream);
+int snd_pcm_playback_xrun_asap(struct snd_pcm_substream *substream);
+int snd_pcm_capture_xrun_asap(struct snd_pcm_substream *substream);
+void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_uframes_t new_hw_ptr);
+void snd_pcm_tick_prepare(struct snd_pcm_substream *substream);
+void snd_pcm_tick_set(struct snd_pcm_substream *substream, unsigned long ticks);
+void snd_pcm_tick_elapsed(struct snd_pcm_substream *substream);
+void snd_pcm_period_elapsed(struct snd_pcm_substream *substream);
+snd_pcm_sframes_t snd_pcm_lib_write(struct snd_pcm_substream *substream,
 				    const void __user *buf,
 				    snd_pcm_uframes_t frames);
-snd_pcm_sframes_t snd_pcm_lib_read(snd_pcm_substream_t *substream,
+snd_pcm_sframes_t snd_pcm_lib_read(struct snd_pcm_substream *substream,
 				   void __user *buf, snd_pcm_uframes_t frames);
-snd_pcm_sframes_t snd_pcm_lib_writev(snd_pcm_substream_t *substream,
+snd_pcm_sframes_t snd_pcm_lib_writev(struct snd_pcm_substream *substream,
 				     void __user **bufs, snd_pcm_uframes_t frames);
-snd_pcm_sframes_t snd_pcm_lib_readv(snd_pcm_substream_t *substream,
+snd_pcm_sframes_t snd_pcm_lib_readv(struct snd_pcm_substream *substream,
 				    void __user **bufs, snd_pcm_uframes_t frames);
 
-int snd_pcm_limit_hw_rates(snd_pcm_runtime_t *runtime);
+int snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime);
 
-static inline void snd_pcm_set_runtime_buffer(snd_pcm_substream_t *substream,
+static inline void snd_pcm_set_runtime_buffer(struct snd_pcm_substream *substream,
 					      struct snd_dma_buffer *bufp)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (bufp) {
 		runtime->dma_buffer_p = bufp;
 		runtime->dma_area = bufp->area;
@@ -973,47 +950,47 @@ static inline void snd_pcm_set_runtime_buffer(snd_pcm_substream_t *substream,
  *  Timer interface
  */
 
-void snd_pcm_timer_resolution_change(snd_pcm_substream_t *substream);
-void snd_pcm_timer_init(snd_pcm_substream_t * substream);
-void snd_pcm_timer_done(snd_pcm_substream_t * substream);
+void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream);
+void snd_pcm_timer_init(struct snd_pcm_substream *substream);
+void snd_pcm_timer_done(struct snd_pcm_substream *substream);
 
 /*
  *  Memory
  */
 
-int snd_pcm_lib_preallocate_free(snd_pcm_substream_t *substream);
-int snd_pcm_lib_preallocate_free_for_all(snd_pcm_t *pcm);
-int snd_pcm_lib_preallocate_pages(snd_pcm_substream_t *substream,
+int snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream);
+int snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm);
+int snd_pcm_lib_preallocate_pages(struct snd_pcm_substream *substream,
 				  int type, struct device *data,
 				  size_t size, size_t max);
-int snd_pcm_lib_preallocate_pages_for_all(snd_pcm_t *pcm,
+int snd_pcm_lib_preallocate_pages_for_all(struct snd_pcm *pcm,
 					  int type, void *data,
 					  size_t size, size_t max);
-int snd_pcm_lib_malloc_pages(snd_pcm_substream_t *substream, size_t size);
-int snd_pcm_lib_free_pages(snd_pcm_substream_t *substream);
+int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size);
+int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream);
 
 #define snd_pcm_substream_sgbuf(substream) ((substream)->runtime->dma_buffer_p->private_data)
 #define snd_pcm_sgbuf_pages(size) snd_sgbuf_aligned_pages(size)
 #define snd_pcm_sgbuf_get_addr(sgbuf,ofs) snd_sgbuf_get_addr(sgbuf,ofs)
-struct page *snd_pcm_sgbuf_ops_page(snd_pcm_substream_t *substream, unsigned long offset);
+struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, unsigned long offset);
 
 /* handle mmap counter - PCM mmap callback should handle this counter properly */
 static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area)
 {
-	snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data;
+	struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
 	atomic_inc(&substream->runtime->mmap_count);
 }
 
 static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area)
 {
-	snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data;
+	struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
 	atomic_dec(&substream->runtime->mmap_count);
 }
 
 /* mmap for io-memory area */
 #if defined(CONFIG_X86) || defined(CONFIG_PPC) || defined(CONFIG_ALPHA)
 #define SNDRV_PCM_INFO_MMAP_IOMEM	SNDRV_PCM_INFO_MMAP
-int snd_pcm_lib_mmap_iomem(snd_pcm_substream_t *substream, struct vm_area_struct *area);
+int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_struct *area);
 #else
 #define SNDRV_PCM_INFO_MMAP_IOMEM	0
 #define snd_pcm_lib_mmap_iomem	NULL
diff --git a/include/sound/pcm_params.h b/include/sound/pcm_params.h
index 60b0e92e26f..fb18aef7734 100644
--- a/include/sound/pcm_params.h
+++ b/include/sound/pcm_params.h
@@ -22,17 +22,17 @@
  *
  */
 
-extern int snd_pcm_hw_param_mask(snd_pcm_substream_t *pcm, snd_pcm_hw_params_t *params,
-				 snd_pcm_hw_param_t var, const snd_mask_t *val);
-extern unsigned int snd_pcm_hw_param_value_min(const snd_pcm_hw_params_t *params,
+extern int snd_pcm_hw_param_mask(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params,
+				 snd_pcm_hw_param_t var, const struct snd_mask *val);
+extern unsigned int snd_pcm_hw_param_value_min(const struct snd_pcm_hw_params *params,
 					       snd_pcm_hw_param_t var, int *dir);
-extern unsigned int snd_pcm_hw_param_value_max(const snd_pcm_hw_params_t *params,
+extern unsigned int snd_pcm_hw_param_value_max(const struct snd_pcm_hw_params *params,
 					       snd_pcm_hw_param_t var, int *dir);
-extern int _snd_pcm_hw_param_min(snd_pcm_hw_params_t *params,
+extern int _snd_pcm_hw_param_min(struct snd_pcm_hw_params *params,
 				 snd_pcm_hw_param_t var, unsigned int val, int dir);
-extern int _snd_pcm_hw_param_setinteger(snd_pcm_hw_params_t *params,
+extern int _snd_pcm_hw_param_setinteger(struct snd_pcm_hw_params *params,
 					snd_pcm_hw_param_t var);
-extern int _snd_pcm_hw_param_set(snd_pcm_hw_params_t *params,
+extern int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params,
 				 snd_pcm_hw_param_t var, unsigned int val, int dir);
 
 /* To share the same code we have  alsa-lib */
@@ -71,20 +71,20 @@ INLINE unsigned int ld2(u_int32_t v)
 
 INLINE size_t snd_mask_sizeof(void)
 {
-	return sizeof(snd_mask_t);
+	return sizeof(struct snd_mask);
 }
 
-INLINE void snd_mask_none(snd_mask_t *mask)
+INLINE void snd_mask_none(struct snd_mask *mask)
 {
 	memset(mask, 0, sizeof(*mask));
 }
 
-INLINE void snd_mask_any(snd_mask_t *mask)
+INLINE void snd_mask_any(struct snd_mask *mask)
 {
 	memset(mask, 0xff, SNDRV_MASK_SIZE * sizeof(u_int32_t));
 }
 
-INLINE int snd_mask_empty(const snd_mask_t *mask)
+INLINE int snd_mask_empty(const struct snd_mask *mask)
 {
 	int i;
 	for (i = 0; i < SNDRV_MASK_SIZE; i++)
@@ -93,7 +93,7 @@ INLINE int snd_mask_empty(const snd_mask_t *mask)
 	return 1;
 }
 
-INLINE unsigned int snd_mask_min(const snd_mask_t *mask)
+INLINE unsigned int snd_mask_min(const struct snd_mask *mask)
 {
 	int i;
 	assert(!snd_mask_empty(mask));
@@ -104,7 +104,7 @@ INLINE unsigned int snd_mask_min(const snd_mask_t *mask)
 	return 0;
 }
 
-INLINE unsigned int snd_mask_max(const snd_mask_t *mask)
+INLINE unsigned int snd_mask_max(const struct snd_mask *mask)
 {
 	int i;
 	assert(!snd_mask_empty(mask));
@@ -115,19 +115,19 @@ INLINE unsigned int snd_mask_max(const snd_mask_t *mask)
 	return 0;
 }
 
-INLINE void snd_mask_set(snd_mask_t *mask, unsigned int val)
+INLINE void snd_mask_set(struct snd_mask *mask, unsigned int val)
 {
 	assert(val <= SNDRV_MASK_BITS);
 	mask->bits[MASK_OFS(val)] |= MASK_BIT(val);
 }
 
-INLINE void snd_mask_reset(snd_mask_t *mask, unsigned int val)
+INLINE void snd_mask_reset(struct snd_mask *mask, unsigned int val)
 {
 	assert(val <= SNDRV_MASK_BITS);
 	mask->bits[MASK_OFS(val)] &= ~MASK_BIT(val);
 }
 
-INLINE void snd_mask_set_range(snd_mask_t *mask, unsigned int from, unsigned int to)
+INLINE void snd_mask_set_range(struct snd_mask *mask, unsigned int from, unsigned int to)
 {
 	unsigned int i;
 	assert(to <= SNDRV_MASK_BITS && from <= to);
@@ -135,7 +135,7 @@ INLINE void snd_mask_set_range(snd_mask_t *mask, unsigned int from, unsigned int
 		mask->bits[MASK_OFS(i)] |= MASK_BIT(i);
 }
 
-INLINE void snd_mask_reset_range(snd_mask_t *mask, unsigned int from, unsigned int to)
+INLINE void snd_mask_reset_range(struct snd_mask *mask, unsigned int from, unsigned int to)
 {
 	unsigned int i;
 	assert(to <= SNDRV_MASK_BITS && from <= to);
@@ -143,7 +143,7 @@ INLINE void snd_mask_reset_range(snd_mask_t *mask, unsigned int from, unsigned i
 		mask->bits[MASK_OFS(i)] &= ~MASK_BIT(i);
 }
 
-INLINE void snd_mask_leave(snd_mask_t *mask, unsigned int val)
+INLINE void snd_mask_leave(struct snd_mask *mask, unsigned int val)
 {
 	unsigned int v;
 	assert(val <= SNDRV_MASK_BITS);
@@ -152,30 +152,30 @@ INLINE void snd_mask_leave(snd_mask_t *mask, unsigned int val)
 	mask->bits[MASK_OFS(val)] = v;
 }
 
-INLINE void snd_mask_intersect(snd_mask_t *mask, const snd_mask_t *v)
+INLINE void snd_mask_intersect(struct snd_mask *mask, const struct snd_mask *v)
 {
 	int i;
 	for (i = 0; i < SNDRV_MASK_SIZE; i++)
 		mask->bits[i] &= v->bits[i];
 }
 
-INLINE int snd_mask_eq(const snd_mask_t *mask, const snd_mask_t *v)
+INLINE int snd_mask_eq(const struct snd_mask *mask, const struct snd_mask *v)
 {
 	return ! memcmp(mask, v, SNDRV_MASK_SIZE * sizeof(u_int32_t));
 }
 
-INLINE void snd_mask_copy(snd_mask_t *mask, const snd_mask_t *v)
+INLINE void snd_mask_copy(struct snd_mask *mask, const struct snd_mask *v)
 {
 	*mask = *v;
 }
 
-INLINE int snd_mask_test(const snd_mask_t *mask, unsigned int val)
+INLINE int snd_mask_test(const struct snd_mask *mask, unsigned int val)
 {
 	assert(val <= SNDRV_MASK_BITS);
 	return mask->bits[MASK_OFS(val)] & MASK_BIT(val);
 }
 
-INLINE int snd_mask_single(const snd_mask_t *mask)
+INLINE int snd_mask_single(const struct snd_mask *mask)
 {
 	int i, c = 0;
 	assert(!snd_mask_empty(mask));
@@ -191,9 +191,9 @@ INLINE int snd_mask_single(const snd_mask_t *mask)
 	return 1;
 }
 
-INLINE int snd_mask_refine(snd_mask_t *mask, const snd_mask_t *v)
+INLINE int snd_mask_refine(struct snd_mask *mask, const struct snd_mask *v)
 {
-	snd_mask_t old;
+	struct snd_mask old;
 	assert(!snd_mask_empty(mask));
 	snd_mask_copy(&old, mask);
 	snd_mask_intersect(mask, v);
@@ -202,7 +202,7 @@ INLINE int snd_mask_refine(snd_mask_t *mask, const snd_mask_t *v)
 	return !snd_mask_eq(mask, &old);
 }
 
-INLINE int snd_mask_refine_first(snd_mask_t *mask)
+INLINE int snd_mask_refine_first(struct snd_mask *mask)
 {
 	assert(!snd_mask_empty(mask));
 	if (snd_mask_single(mask))
@@ -211,7 +211,7 @@ INLINE int snd_mask_refine_first(snd_mask_t *mask)
 	return 1;
 }
 
-INLINE int snd_mask_refine_last(snd_mask_t *mask)
+INLINE int snd_mask_refine_last(struct snd_mask *mask)
 {
 	assert(!snd_mask_empty(mask));
 	if (snd_mask_single(mask))
@@ -220,7 +220,7 @@ INLINE int snd_mask_refine_last(snd_mask_t *mask)
 	return 1;
 }
 
-INLINE int snd_mask_refine_min(snd_mask_t *mask, unsigned int val)
+INLINE int snd_mask_refine_min(struct snd_mask *mask, unsigned int val)
 {
 	assert(!snd_mask_empty(mask));
 	if (snd_mask_min(mask) >= val)
@@ -231,7 +231,7 @@ INLINE int snd_mask_refine_min(snd_mask_t *mask, unsigned int val)
 	return 1;
 }
 
-INLINE int snd_mask_refine_max(snd_mask_t *mask, unsigned int val)
+INLINE int snd_mask_refine_max(struct snd_mask *mask, unsigned int val)
 {
 	assert(!snd_mask_empty(mask));
 	if (snd_mask_max(mask) <= val)
@@ -242,7 +242,7 @@ INLINE int snd_mask_refine_max(snd_mask_t *mask, unsigned int val)
 	return 1;
 }
 
-INLINE int snd_mask_refine_set(snd_mask_t *mask, unsigned int val)
+INLINE int snd_mask_refine_set(struct snd_mask *mask, unsigned int val)
 {
 	int changed;
 	assert(!snd_mask_empty(mask));
@@ -253,13 +253,13 @@ INLINE int snd_mask_refine_set(snd_mask_t *mask, unsigned int val)
 	return changed;
 }
 
-INLINE int snd_mask_value(const snd_mask_t *mask)
+INLINE int snd_mask_value(const struct snd_mask *mask)
 {
 	assert(!snd_mask_empty(mask));
 	return snd_mask_min(mask);
 }
 
-INLINE void snd_interval_any(snd_interval_t *i)
+INLINE void snd_interval_any(struct snd_interval *i)
 {
 	i->min = 0;
 	i->openmin = 0;
@@ -269,42 +269,42 @@ INLINE void snd_interval_any(snd_interval_t *i)
 	i->empty = 0;
 }
 
-INLINE void snd_interval_none(snd_interval_t *i)
+INLINE void snd_interval_none(struct snd_interval *i)
 {
 	i->empty = 1;
 }
 
-INLINE int snd_interval_checkempty(const snd_interval_t *i)
+INLINE int snd_interval_checkempty(const struct snd_interval *i)
 {
 	return (i->min > i->max ||
 		(i->min == i->max && (i->openmin || i->openmax)));
 }
 
-INLINE int snd_interval_empty(const snd_interval_t *i)
+INLINE int snd_interval_empty(const struct snd_interval *i)
 {
 	return i->empty;
 }
 
-INLINE int snd_interval_single(const snd_interval_t *i)
+INLINE int snd_interval_single(const struct snd_interval *i)
 {
 	assert(!snd_interval_empty(i));
 	return (i->min == i->max || 
 		(i->min + 1 == i->max && i->openmax));
 }
 
-INLINE int snd_interval_value(const snd_interval_t *i)
+INLINE int snd_interval_value(const struct snd_interval *i)
 {
 	assert(snd_interval_single(i));
 	return i->min;
 }
 
-INLINE int snd_interval_min(const snd_interval_t *i)
+INLINE int snd_interval_min(const struct snd_interval *i)
 {
 	assert(!snd_interval_empty(i));
 	return i->min;
 }
 
-INLINE int snd_interval_max(const snd_interval_t *i)
+INLINE int snd_interval_max(const struct snd_interval *i)
 {
 	unsigned int v;
 	assert(!snd_interval_empty(i));
@@ -314,18 +314,18 @@ INLINE int snd_interval_max(const snd_interval_t *i)
 	return v;
 }
 
-INLINE int snd_interval_test(const snd_interval_t *i, unsigned int val)
+INLINE int snd_interval_test(const struct snd_interval *i, unsigned int val)
 {
 	return !((i->min > val || (i->min == val && i->openmin) ||
 		  i->max < val || (i->max == val && i->openmax)));
 }
 
-INLINE void snd_interval_copy(snd_interval_t *d, const snd_interval_t *s)
+INLINE void snd_interval_copy(struct snd_interval *d, const struct snd_interval *s)
 {
 	*d = *s;
 }
 
-INLINE int snd_interval_setinteger(snd_interval_t *i)
+INLINE int snd_interval_setinteger(struct snd_interval *i)
 {
 	if (i->integer)
 		return 0;
@@ -335,7 +335,7 @@ INLINE int snd_interval_setinteger(snd_interval_t *i)
 	return 1;
 }
 
-INLINE int snd_interval_eq(const snd_interval_t *i1, const snd_interval_t *i2)
+INLINE int snd_interval_eq(const struct snd_interval *i1, const struct snd_interval *i2)
 {
 	if (i1->empty)
 		return i2->empty;
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 184e74b75ba..59c995bbf15 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -33,18 +33,18 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>, Abramo Bagnara <abramo@alsa-proj
 MODULE_DESCRIPTION("Midlevel PCM code for ALSA.");
 MODULE_LICENSE("GPL");
 
-snd_pcm_t *snd_pcm_devices[SNDRV_CARDS * SNDRV_PCM_DEVICES];
+struct snd_pcm *snd_pcm_devices[SNDRV_CARDS * SNDRV_PCM_DEVICES];
 static LIST_HEAD(snd_pcm_notify_list);
 static DECLARE_MUTEX(register_mutex);
 
-static int snd_pcm_free(snd_pcm_t *pcm);
-static int snd_pcm_dev_free(snd_device_t *device);
-static int snd_pcm_dev_register(snd_device_t *device);
-static int snd_pcm_dev_disconnect(snd_device_t *device);
-static int snd_pcm_dev_unregister(snd_device_t *device);
+static int snd_pcm_free(struct snd_pcm *pcm);
+static int snd_pcm_dev_free(struct snd_device *device);
+static int snd_pcm_dev_register(struct snd_device *device);
+static int snd_pcm_dev_disconnect(struct snd_device *device);
+static int snd_pcm_dev_unregister(struct snd_device *device);
 
-static int snd_pcm_control_ioctl(snd_card_t * card,
-				 snd_ctl_file_t * control,
+static int snd_pcm_control_ioctl(struct snd_card *card,
+				 struct snd_ctl_file *control,
 				 unsigned int cmd, unsigned long arg)
 {
 	unsigned int tmp;
@@ -71,13 +71,13 @@ static int snd_pcm_control_ioctl(snd_card_t * card,
 		}
 	case SNDRV_CTL_IOCTL_PCM_INFO:
 		{
-			snd_pcm_info_t __user *info;
+			struct snd_pcm_info __user *info;
 			unsigned int device, subdevice;
-			snd_pcm_stream_t stream;
-			snd_pcm_t *pcm;
-			snd_pcm_str_t *pstr;
-			snd_pcm_substream_t *substream;
-			info = (snd_pcm_info_t __user *)arg;
+			int stream;
+			struct snd_pcm *pcm;
+			struct snd_pcm_str *pstr;
+			struct snd_pcm_substream *substream;
+			info = (struct snd_pcm_info __user *)arg;
 			if (get_user(device, &info->device))
 				return -EFAULT;
 			if (device >= SNDRV_PCM_DEVICES)
@@ -200,7 +200,7 @@ static char *snd_pcm_tstamp_mode_names[] = {
 	TSTAMP(MMAP),
 };
 
-static const char *snd_pcm_stream_name(snd_pcm_stream_t stream)
+static const char *snd_pcm_stream_name(int stream)
 {
 	snd_assert(stream <= SNDRV_PCM_STREAM_LAST, return NULL);
 	return snd_pcm_stream_names[stream];
@@ -208,23 +208,20 @@ static const char *snd_pcm_stream_name(snd_pcm_stream_t stream)
 
 static const char *snd_pcm_access_name(snd_pcm_access_t access)
 {
-	snd_assert(access <= SNDRV_PCM_ACCESS_LAST, return NULL);
 	return snd_pcm_access_names[access];
 }
 
 const char *snd_pcm_format_name(snd_pcm_format_t format)
 {
-	snd_assert(format <= SNDRV_PCM_FORMAT_LAST, return NULL);
 	return snd_pcm_format_names[format];
 }
 
 static const char *snd_pcm_subformat_name(snd_pcm_subformat_t subformat)
 {
-	snd_assert(subformat <= SNDRV_PCM_SUBFORMAT_LAST, return NULL);
 	return snd_pcm_subformat_names[subformat];
 }
 
-static const char *snd_pcm_tstamp_mode_name(snd_pcm_tstamp_t mode)
+static const char *snd_pcm_tstamp_mode_name(int mode)
 {
 	snd_assert(mode <= SNDRV_PCM_TSTAMP_LAST, return NULL);
 	return snd_pcm_tstamp_mode_names[mode];
@@ -232,7 +229,6 @@ static const char *snd_pcm_tstamp_mode_name(snd_pcm_tstamp_t mode)
 
 static const char *snd_pcm_state_name(snd_pcm_state_t state)
 {
-	snd_assert(state <= SNDRV_PCM_STATE_LAST, return NULL);
 	return snd_pcm_state_names[state];
 }
 
@@ -268,9 +264,10 @@ static const char *snd_pcm_oss_format_name(int format)
 #endif
 
 #ifdef CONFIG_PROC_FS
-static void snd_pcm_proc_info_read(snd_pcm_substream_t *substream, snd_info_buffer_t *buffer)
+static void snd_pcm_proc_info_read(struct snd_pcm_substream *substream,
+				   struct snd_info_buffer *buffer)
 {
-	snd_pcm_info_t *info;
+	struct snd_pcm_info *info;
 	int err;
 
 	if (! substream)
@@ -302,20 +299,25 @@ static void snd_pcm_proc_info_read(snd_pcm_substream_t *substream, snd_info_buff
 	kfree(info);
 }
 
-static void snd_pcm_stream_proc_info_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
+static void snd_pcm_stream_proc_info_read(struct snd_info_entry *entry,
+					  struct snd_info_buffer *buffer)
 {
-	snd_pcm_proc_info_read(((snd_pcm_str_t *)entry->private_data)->substream, buffer);
+	snd_pcm_proc_info_read(((struct snd_pcm_str *)entry->private_data)->substream,
+			       buffer);
 }
 
-static void snd_pcm_substream_proc_info_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
+static void snd_pcm_substream_proc_info_read(struct snd_info_entry *entry,
+					     struct snd_info_buffer *buffer)
 {
-	snd_pcm_proc_info_read((snd_pcm_substream_t *)entry->private_data, buffer);
+	snd_pcm_proc_info_read((struct snd_pcm_substream *)entry->private_data,
+			       buffer);
 }
 
-static void snd_pcm_substream_proc_hw_params_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
+static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry,
+						  struct snd_info_buffer *buffer)
 {
-	snd_pcm_substream_t *substream = (snd_pcm_substream_t *)entry->private_data;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_substream *substream = entry->private_data;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (!runtime) {
 		snd_iprintf(buffer, "closed\n");
 		return;
@@ -347,10 +349,11 @@ static void snd_pcm_substream_proc_hw_params_read(snd_info_entry_t *entry, snd_i
 	snd_pcm_stream_unlock_irq(substream);
 }
 
-static void snd_pcm_substream_proc_sw_params_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
+static void snd_pcm_substream_proc_sw_params_read(struct snd_info_entry *entry,
+						  struct snd_info_buffer *buffer)
 {
-	snd_pcm_substream_t *substream = (snd_pcm_substream_t *)entry->private_data;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_substream *substream = entry->private_data;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (!runtime) {
 		snd_iprintf(buffer, "closed\n");
 		return;
@@ -374,11 +377,12 @@ static void snd_pcm_substream_proc_sw_params_read(snd_info_entry_t *entry, snd_i
 	snd_pcm_stream_unlock_irq(substream);
 }
 
-static void snd_pcm_substream_proc_status_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
+static void snd_pcm_substream_proc_status_read(struct snd_info_entry *entry,
+					       struct snd_info_buffer *buffer)
 {
-	snd_pcm_substream_t *substream = (snd_pcm_substream_t *)entry->private_data;
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_pcm_status_t status;
+	struct snd_pcm_substream *substream = entry->private_data;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_pcm_status status;
 	int err;
 	if (!runtime) {
 		snd_iprintf(buffer, "closed\n");
@@ -405,25 +409,27 @@ static void snd_pcm_substream_proc_status_read(snd_info_entry_t *entry, snd_info
 #endif
 
 #ifdef CONFIG_SND_DEBUG
-static void snd_pcm_xrun_debug_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
+static void snd_pcm_xrun_debug_read(struct snd_info_entry *entry,
+				    struct snd_info_buffer *buffer)
 {
-	snd_pcm_str_t *pstr = (snd_pcm_str_t *)entry->private_data;
+	struct snd_pcm_str *pstr = entry->private_data;
 	snd_iprintf(buffer, "%d\n", pstr->xrun_debug);
 }
 
-static void snd_pcm_xrun_debug_write(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
+static void snd_pcm_xrun_debug_write(struct snd_info_entry *entry,
+				     struct snd_info_buffer *buffer)
 {
-	snd_pcm_str_t *pstr = (snd_pcm_str_t *)entry->private_data;
+	struct snd_pcm_str *pstr = entry->private_data;
 	char line[64];
 	if (!snd_info_get_line(buffer, line, sizeof(line)))
 		pstr->xrun_debug = simple_strtoul(line, NULL, 10);
 }
 #endif
 
-static int snd_pcm_stream_proc_init(snd_pcm_str_t *pstr)
+static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr)
 {
-	snd_pcm_t *pcm = pstr->pcm;
-	snd_info_entry_t *entry;
+	struct snd_pcm *pcm = pstr->pcm;
+	struct snd_info_entry *entry;
 	char name[16];
 
 	sprintf(name, "pcm%i%c", pcm->device, 
@@ -447,7 +453,8 @@ static int snd_pcm_stream_proc_init(snd_pcm_str_t *pstr)
 	pstr->proc_info_entry = entry;
 
 #ifdef CONFIG_SND_DEBUG
-	if ((entry = snd_info_create_card_entry(pcm->card, "xrun_debug", pstr->proc_root)) != NULL) {
+	if ((entry = snd_info_create_card_entry(pcm->card, "xrun_debug",
+						pstr->proc_root)) != NULL) {
 		entry->c.text.read_size = 64;
 		entry->c.text.read = snd_pcm_xrun_debug_read;
 		entry->c.text.write_size = 64;
@@ -464,7 +471,7 @@ static int snd_pcm_stream_proc_init(snd_pcm_str_t *pstr)
 	return 0;
 }
 
-static int snd_pcm_stream_proc_done(snd_pcm_str_t *pstr)
+static int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr)
 {
 #ifdef CONFIG_SND_DEBUG
 	if (pstr->proc_xrun_debug_entry) {
@@ -483,10 +490,10 @@ static int snd_pcm_stream_proc_done(snd_pcm_str_t *pstr)
 	return 0;
 }
 
-static int snd_pcm_substream_proc_init(snd_pcm_substream_t *substream)
+static int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream)
 {
-	snd_info_entry_t *entry;
-	snd_card_t *card;
+	struct snd_info_entry *entry;
+	struct snd_card *card;
 	char name[16];
 
 	card = substream->pcm->card;
@@ -540,7 +547,7 @@ static int snd_pcm_substream_proc_init(snd_pcm_substream_t *substream)
 	return 0;
 }
 		
-static int snd_pcm_substream_proc_done(snd_pcm_substream_t *substream)
+static int snd_pcm_substream_proc_done(struct snd_pcm_substream *substream)
 {
 	if (substream->proc_info_entry) {
 		snd_info_unregister(substream->proc_info_entry);
@@ -578,11 +585,11 @@ static int snd_pcm_substream_proc_done(snd_pcm_substream_t *substream)
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_pcm_new_stream(snd_pcm_t *pcm, int stream, int substream_count)
+int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count)
 {
 	int idx, err;
-	snd_pcm_str_t *pstr = &pcm->streams[stream];
-	snd_pcm_substream_t *substream, *prev;
+	struct snd_pcm_str *pstr = &pcm->streams[stream];
+	struct snd_pcm_substream *substream, *prev;
 
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
 	init_MUTEX(&pstr->oss.setup_mutex);
@@ -642,13 +649,13 @@ int snd_pcm_new_stream(snd_pcm_t *pcm, int stream, int substream_count)
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_pcm_new(snd_card_t * card, char *id, int device,
+int snd_pcm_new(struct snd_card *card, char *id, int device,
 		int playback_count, int capture_count,
-	        snd_pcm_t ** rpcm)
+	        struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free = snd_pcm_dev_free,
 		.dev_register =	snd_pcm_dev_register,
 		.dev_disconnect = snd_pcm_dev_disconnect,
@@ -684,11 +691,11 @@ int snd_pcm_new(snd_card_t * card, char *id, int device,
 	return 0;
 }
 
-static void snd_pcm_free_stream(snd_pcm_str_t * pstr)
+static void snd_pcm_free_stream(struct snd_pcm_str * pstr)
 {
-	snd_pcm_substream_t *substream, *substream_next;
+	struct snd_pcm_substream *substream, *substream_next;
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
-	snd_pcm_oss_setup_t *setup, *setupn;
+	struct snd_pcm_oss_setup *setup, *setupn;
 #endif
 	substream = pstr->substream;
 	while (substream) {
@@ -707,7 +714,7 @@ static void snd_pcm_free_stream(snd_pcm_str_t * pstr)
 #endif
 }
 
-static int snd_pcm_free(snd_pcm_t *pcm)
+static int snd_pcm_free(struct snd_pcm *pcm)
 {
 	snd_assert(pcm != NULL, return -ENXIO);
 	if (pcm->private_free)
@@ -719,26 +726,26 @@ static int snd_pcm_free(snd_pcm_t *pcm)
 	return 0;
 }
 
-static int snd_pcm_dev_free(snd_device_t *device)
+static int snd_pcm_dev_free(struct snd_device *device)
 {
-	snd_pcm_t *pcm = device->device_data;
+	struct snd_pcm *pcm = device->device_data;
 	return snd_pcm_free(pcm);
 }
 
 static void snd_pcm_tick_timer_func(unsigned long data)
 {
-	snd_pcm_substream_t *substream = (snd_pcm_substream_t*) data;
+	struct snd_pcm_substream *substream = (struct snd_pcm_substream *) data;
 	snd_pcm_tick_elapsed(substream);
 }
 
-int snd_pcm_open_substream(snd_pcm_t *pcm, int stream,
-			   snd_pcm_substream_t **rsubstream)
+int snd_pcm_open_substream(struct snd_pcm *pcm, int stream,
+			   struct snd_pcm_substream **rsubstream)
 {
-	snd_pcm_str_t * pstr;
-	snd_pcm_substream_t * substream;
-	snd_pcm_runtime_t * runtime;
-	snd_ctl_file_t *kctl;
-	snd_card_t *card;
+	struct snd_pcm_str * pstr;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
+	struct snd_ctl_file *kctl;
+	struct snd_card *card;
 	struct list_head *list;
 	int prefer_subdevice = -1;
 	size_t size;
@@ -800,7 +807,7 @@ int snd_pcm_open_substream(snd_pcm_t *pcm, int stream,
 	if (runtime == NULL)
 		return -ENOMEM;
 
-	size = PAGE_ALIGN(sizeof(snd_pcm_mmap_status_t));
+	size = PAGE_ALIGN(sizeof(struct snd_pcm_mmap_status));
 	runtime->status = snd_malloc_pages(size, GFP_KERNEL);
 	if (runtime->status == NULL) {
 		kfree(runtime);
@@ -808,10 +815,11 @@ int snd_pcm_open_substream(snd_pcm_t *pcm, int stream,
 	}
 	memset((void*)runtime->status, 0, size);
 
-	size = PAGE_ALIGN(sizeof(snd_pcm_mmap_control_t));
+	size = PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control));
 	runtime->control = snd_malloc_pages(size, GFP_KERNEL);
 	if (runtime->control == NULL) {
-		snd_free_pages((void*)runtime->status, PAGE_ALIGN(sizeof(snd_pcm_mmap_status_t)));
+		snd_free_pages((void*)runtime->status,
+			       PAGE_ALIGN(sizeof(struct snd_pcm_mmap_status)));
 		kfree(runtime);
 		return -ENOMEM;
 	}
@@ -832,30 +840,32 @@ int snd_pcm_open_substream(snd_pcm_t *pcm, int stream,
 	return 0;
 }
 
-void snd_pcm_release_substream(snd_pcm_substream_t *substream)
+void snd_pcm_release_substream(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t * runtime;
+	struct snd_pcm_runtime *runtime;
 	substream->file = NULL;
 	runtime = substream->runtime;
 	snd_assert(runtime != NULL, return);
 	if (runtime->private_free != NULL)
 		runtime->private_free(runtime);
-	snd_free_pages((void*)runtime->status, PAGE_ALIGN(sizeof(snd_pcm_mmap_status_t)));
-	snd_free_pages((void*)runtime->control, PAGE_ALIGN(sizeof(snd_pcm_mmap_control_t)));
+	snd_free_pages((void*)runtime->status,
+		       PAGE_ALIGN(sizeof(struct snd_pcm_mmap_status)));
+	snd_free_pages((void*)runtime->control,
+		       PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control)));
 	kfree(runtime->hw_constraints.rules);
 	kfree(runtime);
 	substream->runtime = NULL;
 	substream->pstr->substream_opened--;
 }
 
-static int snd_pcm_dev_register(snd_device_t *device)
+static int snd_pcm_dev_register(struct snd_device *device)
 {
 	int idx, cidx, err;
 	unsigned short minor;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	struct list_head *list;
 	char str[16];
-	snd_pcm_t *pcm = device->device_data;
+	struct snd_pcm *pcm = device->device_data;
 
 	snd_assert(pcm != NULL && device != NULL, return -ENXIO);
 	down(&register_mutex);
@@ -890,19 +900,19 @@ static int snd_pcm_dev_register(snd_device_t *device)
 			snd_pcm_timer_init(substream);
 	}
 	list_for_each(list, &snd_pcm_notify_list) {
-		snd_pcm_notify_t *notify;
-		notify = list_entry(list, snd_pcm_notify_t, list);
+		struct snd_pcm_notify *notify;
+		notify = list_entry(list, struct snd_pcm_notify, list);
 		notify->n_register(pcm);
 	}
 	up(&register_mutex);
 	return 0;
 }
 
-static int snd_pcm_dev_disconnect(snd_device_t *device)
+static int snd_pcm_dev_disconnect(struct snd_device *device)
 {
-	snd_pcm_t *pcm = device->device_data;
+	struct snd_pcm *pcm = device->device_data;
 	struct list_head *list;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	int idx, cidx;
 
 	down(&register_mutex);
@@ -913,20 +923,20 @@ static int snd_pcm_dev_disconnect(snd_device_t *device)
 			if (substream->runtime)
 				substream->runtime->status->state = SNDRV_PCM_STATE_DISCONNECTED;
 	list_for_each(list, &snd_pcm_notify_list) {
-		snd_pcm_notify_t *notify;
-		notify = list_entry(list, snd_pcm_notify_t, list);
+		struct snd_pcm_notify *notify;
+		notify = list_entry(list, struct snd_pcm_notify, list);
 		notify->n_disconnect(pcm);
 	}
 	up(&register_mutex);
 	return 0;
 }
 
-static int snd_pcm_dev_unregister(snd_device_t *device)
+static int snd_pcm_dev_unregister(struct snd_device *device)
 {
 	int idx, cidx, devtype;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	struct list_head *list;
-	snd_pcm_t *pcm = device->device_data;
+	struct snd_pcm *pcm = device->device_data;
 
 	snd_assert(pcm != NULL, return -ENXIO);
 	down(&register_mutex);
@@ -947,15 +957,15 @@ static int snd_pcm_dev_unregister(snd_device_t *device)
 			snd_pcm_timer_done(substream);
 	}
 	list_for_each(list, &snd_pcm_notify_list) {
-		snd_pcm_notify_t *notify;
-		notify = list_entry(list, snd_pcm_notify_t, list);
+		struct snd_pcm_notify *notify;
+		notify = list_entry(list, struct snd_pcm_notify, list);
 		notify->n_unregister(pcm);
 	}
 	up(&register_mutex);
 	return snd_pcm_free(pcm);
 }
 
-int snd_pcm_notify(snd_pcm_notify_t *notify, int nfree)
+int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree)
 {
 	int idx;
 
@@ -984,10 +994,11 @@ int snd_pcm_notify(snd_pcm_notify_t *notify, int nfree)
  *  Info interface
  */
 
-static void snd_pcm_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void snd_pcm_proc_read(struct snd_info_entry *entry,
+			      struct snd_info_buffer *buffer)
 {
 	int idx;
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 
 	down(&register_mutex);
 	for (idx = 0; idx < SNDRV_CARDS * SNDRV_PCM_DEVICES; idx++) {
@@ -997,9 +1008,11 @@ static void snd_pcm_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffe
 		snd_iprintf(buffer, "%02i-%02i: %s : %s", idx / SNDRV_PCM_DEVICES,
 			    idx % SNDRV_PCM_DEVICES, pcm->id, pcm->name);
 		if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream)
-			snd_iprintf(buffer, " : playback %i", pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream_count);
+			snd_iprintf(buffer, " : playback %i",
+				    pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream_count);
 		if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream)
-			snd_iprintf(buffer, " : capture %i", pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream_count);
+			snd_iprintf(buffer, " : capture %i",
+				    pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream_count);
 		snd_iprintf(buffer, "\n");
 	}
 	up(&register_mutex);
@@ -1009,16 +1022,17 @@ static void snd_pcm_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffe
  *  ENTRY functions
  */
 
-static snd_info_entry_t *snd_pcm_proc_entry = NULL;
+static struct snd_info_entry *snd_pcm_proc_entry = NULL;
 
 static int __init alsa_pcm_init(void)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	snd_ctl_register_ioctl(snd_pcm_control_ioctl);
 	snd_ctl_register_ioctl_compat(snd_pcm_control_ioctl);
 	if ((entry = snd_info_create_module_entry(THIS_MODULE, "pcm", NULL)) != NULL) {
-		snd_info_set_text_ops(entry, NULL, SNDRV_CARDS * SNDRV_PCM_DEVICES * 128, snd_pcm_proc_read);
+		snd_info_set_text_ops(entry, NULL, SNDRV_CARDS * SNDRV_PCM_DEVICES * 128,
+				      snd_pcm_proc_read);
 		if (snd_info_register(entry) < 0) {
 			snd_info_free_entry(entry);
 			entry = NULL;
diff --git a/sound/core/pcm_compat.c b/sound/core/pcm_compat.c
index 4b6307df846..e5133033de5 100644
--- a/sound/core/pcm_compat.c
+++ b/sound/core/pcm_compat.c
@@ -22,7 +22,7 @@
 
 #include <linux/compat.h>
 
-static int snd_pcm_ioctl_delay_compat(snd_pcm_substream_t *substream,
+static int snd_pcm_ioctl_delay_compat(struct snd_pcm_substream *substream,
 				      s32 __user *src)
 {
 	snd_pcm_sframes_t delay;
@@ -39,7 +39,7 @@ static int snd_pcm_ioctl_delay_compat(snd_pcm_substream_t *substream,
 	return err;
 }
 
-static int snd_pcm_ioctl_rewind_compat(snd_pcm_substream_t *substream,
+static int snd_pcm_ioctl_rewind_compat(struct snd_pcm_substream *substream,
 				       u32 __user *src)
 {
 	snd_pcm_uframes_t frames;
@@ -56,7 +56,7 @@ static int snd_pcm_ioctl_rewind_compat(snd_pcm_substream_t *substream,
 	return err < 0 ? err : 0;
 }
 
-static int snd_pcm_ioctl_forward_compat(snd_pcm_substream_t *substream,
+static int snd_pcm_ioctl_forward_compat(struct snd_pcm_substream *substream,
 				       u32 __user *src)
 {
 	snd_pcm_uframes_t frames;
@@ -73,12 +73,12 @@ static int snd_pcm_ioctl_forward_compat(snd_pcm_substream_t *substream,
 	return err < 0 ? err : 0;
 }
 
-struct sndrv_pcm_hw_params32 {
+struct snd_pcm_hw_params32 {
 	u32 flags;
-	struct sndrv_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; /* this must be identical */
-	struct sndrv_mask mres[5];	/* reserved masks */
-	struct sndrv_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
-	struct sndrv_interval ires[9];	/* reserved intervals */
+	struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; /* this must be identical */
+	struct snd_mask mres[5];	/* reserved masks */
+	struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
+	struct snd_interval ires[9];	/* reserved intervals */
 	u32 rmask;
 	u32 cmask;
 	u32 info;
@@ -89,7 +89,7 @@ struct sndrv_pcm_hw_params32 {
 	unsigned char reserved[64];
 };
 
-struct sndrv_pcm_sw_params32 {
+struct snd_pcm_sw_params32 {
 	s32 tstamp_mode;
 	u32 period_step;
 	u32 sleep_min;
@@ -104,7 +104,7 @@ struct sndrv_pcm_sw_params32 {
 };
 
 /* recalcuate the boundary within 32bit */
-static snd_pcm_uframes_t recalculate_boundary(snd_pcm_runtime_t *runtime)
+static snd_pcm_uframes_t recalculate_boundary(struct snd_pcm_runtime *runtime)
 {
 	snd_pcm_uframes_t boundary;
 
@@ -116,10 +116,10 @@ static snd_pcm_uframes_t recalculate_boundary(snd_pcm_runtime_t *runtime)
 	return boundary;
 }
 
-static int snd_pcm_ioctl_sw_params_compat(snd_pcm_substream_t *substream,
-					  struct sndrv_pcm_sw_params32 __user *src)
+static int snd_pcm_ioctl_sw_params_compat(struct snd_pcm_substream *substream,
+					  struct snd_pcm_sw_params32 __user *src)
 {
-	snd_pcm_sw_params_t params;
+	struct snd_pcm_sw_params params;
 	snd_pcm_uframes_t boundary;
 	int err;
 
@@ -149,17 +149,17 @@ static int snd_pcm_ioctl_sw_params_compat(snd_pcm_substream_t *substream,
 	return err;
 }
 
-struct sndrv_pcm_channel_info32 {
+struct snd_pcm_channel_info32 {
 	u32 channel;
 	u32 offset;
 	u32 first;
 	u32 step;
 };
 
-static int snd_pcm_ioctl_channel_info_compat(snd_pcm_substream_t *substream,
-					     struct sndrv_pcm_channel_info32 __user *src)
+static int snd_pcm_ioctl_channel_info_compat(struct snd_pcm_substream *substream,
+					     struct snd_pcm_channel_info32 __user *src)
 {
-	snd_pcm_channel_info_t info;
+	struct snd_pcm_channel_info info;
 	int err;
 
 	if (get_user(info.channel, &src->channel) ||
@@ -178,7 +178,7 @@ static int snd_pcm_ioctl_channel_info_compat(snd_pcm_substream_t *substream,
 	return err;
 }
 
-struct sndrv_pcm_status32 {
+struct snd_pcm_status32 {
 	s32 state;
 	struct compat_timespec trigger_tstamp;
 	struct compat_timespec tstamp;
@@ -193,10 +193,10 @@ struct sndrv_pcm_status32 {
 } __attribute__((packed));
 
 
-static int snd_pcm_status_user_compat(snd_pcm_substream_t *substream,
-				      struct sndrv_pcm_status32 __user *src)
+static int snd_pcm_status_user_compat(struct snd_pcm_substream *substream,
+				      struct snd_pcm_status32 __user *src)
 {
-	snd_pcm_status_t status;
+	struct snd_pcm_status status;
 	int err;
 
 	err = snd_pcm_status(substream, &status);
@@ -221,12 +221,12 @@ static int snd_pcm_status_user_compat(snd_pcm_substream_t *substream,
 }
 
 /* both for HW_PARAMS and HW_REFINE */
-static int snd_pcm_ioctl_hw_params_compat(snd_pcm_substream_t *substream,
+static int snd_pcm_ioctl_hw_params_compat(struct snd_pcm_substream *substream,
 					  int refine, 
-					  struct sndrv_pcm_hw_params32 __user *data32)
+					  struct snd_pcm_hw_params32 __user *data32)
 {
-	struct sndrv_pcm_hw_params *data;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_hw_params *data;
+	struct snd_pcm_runtime *runtime;
 	int err;
 
 	if (! (runtime = substream->runtime))
@@ -265,14 +265,14 @@ static int snd_pcm_ioctl_hw_params_compat(snd_pcm_substream_t *substream,
 
 /*
  */
-struct sndrv_xferi32 {
+struct snd_xferi32 {
 	s32 result;
 	u32 buf;
 	u32 frames;
 };
 
-static int snd_pcm_ioctl_xferi_compat(snd_pcm_substream_t *substream,
-				      int dir, struct sndrv_xferi32 __user *data32)
+static int snd_pcm_ioctl_xferi_compat(struct snd_pcm_substream *substream,
+				      int dir, struct snd_xferi32 __user *data32)
 {
 	compat_caddr_t buf;
 	u32 frames;
@@ -303,7 +303,7 @@ static int snd_pcm_ioctl_xferi_compat(snd_pcm_substream_t *substream,
 
 
 /* snd_xfern needs remapping of bufs */
-struct sndrv_xfern32 {
+struct snd_xfern32 {
 	s32 result;
 	u32 bufs;  /* this is void **; */
 	u32 frames;
@@ -315,8 +315,8 @@ struct sndrv_xfern32 {
  * handler there expands again the same 128 pointers on stack, so it is better
  * to handle the function (calling pcm_readv/writev) directly in this handler.
  */
-static int snd_pcm_ioctl_xfern_compat(snd_pcm_substream_t *substream,
-				      int dir, struct sndrv_xfern32 __user *data32)
+static int snd_pcm_ioctl_xfern_compat(struct snd_pcm_substream *substream,
+				      int dir, struct snd_xfern32 __user *data32)
 {
 	compat_caddr_t buf;
 	compat_caddr_t __user *bufptr;
@@ -360,7 +360,7 @@ static int snd_pcm_ioctl_xfern_compat(snd_pcm_substream_t *substream,
 }
 
 
-struct sndrv_pcm_mmap_status32 {
+struct snd_pcm_mmap_status32 {
 	s32 state;
 	s32 pad1;
 	u32 hw_ptr;
@@ -368,32 +368,32 @@ struct sndrv_pcm_mmap_status32 {
 	s32 suspended_state;
 } __attribute__((packed));
 
-struct sndrv_pcm_mmap_control32 {
+struct snd_pcm_mmap_control32 {
 	u32 appl_ptr;
 	u32 avail_min;
 };
 
-struct sndrv_pcm_sync_ptr32 {
+struct snd_pcm_sync_ptr32 {
 	u32 flags;
 	union {
-		struct sndrv_pcm_mmap_status32 status;
+		struct snd_pcm_mmap_status32 status;
 		unsigned char reserved[64];
 	} s;
 	union {
-		struct sndrv_pcm_mmap_control32 control;
+		struct snd_pcm_mmap_control32 control;
 		unsigned char reserved[64];
 	} c;
 } __attribute__((packed));
 
-static int snd_pcm_ioctl_sync_ptr_compat(snd_pcm_substream_t *substream,
-					 struct sndrv_pcm_sync_ptr32 __user *src)
+static int snd_pcm_ioctl_sync_ptr_compat(struct snd_pcm_substream *substream,
+					 struct snd_pcm_sync_ptr32 __user *src)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	volatile struct sndrv_pcm_mmap_status *status;
-	volatile struct sndrv_pcm_mmap_control *control;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	volatile struct snd_pcm_mmap_status *status;
+	volatile struct snd_pcm_mmap_control *control;
 	u32 sflags;
-	struct sndrv_pcm_mmap_control scontrol;
-	struct sndrv_pcm_mmap_status sstatus;
+	struct snd_pcm_mmap_control scontrol;
+	struct snd_pcm_mmap_status sstatus;
 	snd_pcm_uframes_t boundary;
 	int err;
 
@@ -444,26 +444,26 @@ static int snd_pcm_ioctl_sync_ptr_compat(snd_pcm_substream_t *substream,
 /*
  */
 enum {
-	SNDRV_PCM_IOCTL_HW_REFINE32 = _IOWR('A', 0x10, struct sndrv_pcm_hw_params32),
-	SNDRV_PCM_IOCTL_HW_PARAMS32 = _IOWR('A', 0x11, struct sndrv_pcm_hw_params32),
-	SNDRV_PCM_IOCTL_SW_PARAMS32 = _IOWR('A', 0x13, struct sndrv_pcm_sw_params32),
-	SNDRV_PCM_IOCTL_STATUS32 = _IOR('A', 0x20, struct sndrv_pcm_status32),
+	SNDRV_PCM_IOCTL_HW_REFINE32 = _IOWR('A', 0x10, struct snd_pcm_hw_params32),
+	SNDRV_PCM_IOCTL_HW_PARAMS32 = _IOWR('A', 0x11, struct snd_pcm_hw_params32),
+	SNDRV_PCM_IOCTL_SW_PARAMS32 = _IOWR('A', 0x13, struct snd_pcm_sw_params32),
+	SNDRV_PCM_IOCTL_STATUS32 = _IOR('A', 0x20, struct snd_pcm_status32),
 	SNDRV_PCM_IOCTL_DELAY32 = _IOR('A', 0x21, s32),
-	SNDRV_PCM_IOCTL_CHANNEL_INFO32 = _IOR('A', 0x32, struct sndrv_pcm_channel_info32),
+	SNDRV_PCM_IOCTL_CHANNEL_INFO32 = _IOR('A', 0x32, struct snd_pcm_channel_info32),
 	SNDRV_PCM_IOCTL_REWIND32 = _IOW('A', 0x46, u32),
 	SNDRV_PCM_IOCTL_FORWARD32 = _IOW('A', 0x49, u32),
-	SNDRV_PCM_IOCTL_WRITEI_FRAMES32 = _IOW('A', 0x50, struct sndrv_xferi32),
-	SNDRV_PCM_IOCTL_READI_FRAMES32 = _IOR('A', 0x51, struct sndrv_xferi32),
-	SNDRV_PCM_IOCTL_WRITEN_FRAMES32 = _IOW('A', 0x52, struct sndrv_xfern32),
-	SNDRV_PCM_IOCTL_READN_FRAMES32 = _IOR('A', 0x53, struct sndrv_xfern32),
-	SNDRV_PCM_IOCTL_SYNC_PTR32 = _IOWR('A', 0x23, struct sndrv_pcm_sync_ptr32),
+	SNDRV_PCM_IOCTL_WRITEI_FRAMES32 = _IOW('A', 0x50, struct snd_xferi32),
+	SNDRV_PCM_IOCTL_READI_FRAMES32 = _IOR('A', 0x51, struct snd_xferi32),
+	SNDRV_PCM_IOCTL_WRITEN_FRAMES32 = _IOW('A', 0x52, struct snd_xfern32),
+	SNDRV_PCM_IOCTL_READN_FRAMES32 = _IOR('A', 0x53, struct snd_xfern32),
+	SNDRV_PCM_IOCTL_SYNC_PTR32 = _IOWR('A', 0x23, struct snd_pcm_sync_ptr32),
 
 };
 
 static long snd_pcm_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	snd_pcm_file_t *pcm_file;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_file *pcm_file;
+	struct snd_pcm_substream *substream;
 	void __user *argp = compat_ptr(arg);
 
 	pcm_file = file->private_data;
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 3dbf9bf2ac1..c58ec67d1cb 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -39,9 +39,9 @@
  *
  * when runtime->silence_size >= runtime->boundary - fill processed area with silence immediately
  */
-void snd_pcm_playback_silence(snd_pcm_substream_t *substream, snd_pcm_uframes_t new_hw_ptr)
+void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_uframes_t new_hw_ptr)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_uframes_t frames, ofs, transfer;
 
 	if (runtime->silence_size < runtime->boundary) {
@@ -128,7 +128,7 @@ void snd_pcm_playback_silence(snd_pcm_substream_t *substream, snd_pcm_uframes_t
 	}
 }
 
-static void xrun(snd_pcm_substream_t *substream)
+static void xrun(struct snd_pcm_substream *substream)
 {
 	snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN);
 #ifdef CONFIG_SND_DEBUG
@@ -143,8 +143,8 @@ static void xrun(snd_pcm_substream_t *substream)
 #endif
 }
 
-static inline snd_pcm_uframes_t snd_pcm_update_hw_ptr_pos(snd_pcm_substream_t *substream,
-							  snd_pcm_runtime_t *runtime)
+static inline snd_pcm_uframes_t snd_pcm_update_hw_ptr_pos(struct snd_pcm_substream *substream,
+							  struct snd_pcm_runtime *runtime)
 {
 	snd_pcm_uframes_t pos;
 
@@ -162,8 +162,8 @@ static inline snd_pcm_uframes_t snd_pcm_update_hw_ptr_pos(snd_pcm_substream_t *s
 	return pos;
 }
 
-static inline int snd_pcm_update_hw_ptr_post(snd_pcm_substream_t *substream,
-					     snd_pcm_runtime_t *runtime)
+static inline int snd_pcm_update_hw_ptr_post(struct snd_pcm_substream *substream,
+					     struct snd_pcm_runtime *runtime)
 {
 	snd_pcm_uframes_t avail;
 
@@ -185,9 +185,9 @@ static inline int snd_pcm_update_hw_ptr_post(snd_pcm_substream_t *substream,
 	return 0;
 }
 
-static inline int snd_pcm_update_hw_ptr_interrupt(snd_pcm_substream_t *substream)
+static inline int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_uframes_t pos;
 	snd_pcm_uframes_t new_hw_ptr, hw_ptr_interrupt;
 	snd_pcm_sframes_t delta;
@@ -232,9 +232,9 @@ static inline int snd_pcm_update_hw_ptr_interrupt(snd_pcm_substream_t *substream
 }
 
 /* CAUTION: call it with irq disabled */
-int snd_pcm_update_hw_ptr(snd_pcm_substream_t *substream)
+int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_uframes_t pos;
 	snd_pcm_uframes_t old_hw_ptr, new_hw_ptr;
 	snd_pcm_sframes_t delta;
@@ -281,10 +281,10 @@ int snd_pcm_update_hw_ptr(snd_pcm_substream_t *substream)
  *
  * Sets the given PCM operators to the pcm instance.
  */
-void snd_pcm_set_ops(snd_pcm_t *pcm, int direction, snd_pcm_ops_t *ops)
+void snd_pcm_set_ops(struct snd_pcm *pcm, int direction, struct snd_pcm_ops *ops)
 {
-	snd_pcm_str_t *stream = &pcm->streams[direction];
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_str *stream = &pcm->streams[direction];
+	struct snd_pcm_substream *substream;
 	
 	for (substream = stream->substream; substream != NULL; substream = substream->next)
 		substream->ops = ops;
@@ -297,9 +297,9 @@ void snd_pcm_set_ops(snd_pcm_t *pcm, int direction, snd_pcm_ops_t *ops)
  *
  * Sets the PCM sync identifier for the card.
  */
-void snd_pcm_set_sync(snd_pcm_substream_t * substream)
+void snd_pcm_set_sync(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	
 	runtime->sync.id32[0] = substream->pcm->card->number;
 	runtime->sync.id32[1] = -1;
@@ -370,7 +370,7 @@ static inline unsigned int muldiv32(unsigned int a, unsigned int b,
 	return n;
 }
 
-static int snd_interval_refine_min(snd_interval_t *i, unsigned int min, int openmin)
+static int snd_interval_refine_min(struct snd_interval *i, unsigned int min, int openmin)
 {
 	int changed = 0;
 	assert(!snd_interval_empty(i));
@@ -395,7 +395,7 @@ static int snd_interval_refine_min(snd_interval_t *i, unsigned int min, int open
 	return changed;
 }
 
-static int snd_interval_refine_max(snd_interval_t *i, unsigned int max, int openmax)
+static int snd_interval_refine_max(struct snd_interval *i, unsigned int max, int openmax)
 {
 	int changed = 0;
 	assert(!snd_interval_empty(i));
@@ -431,7 +431,7 @@ static int snd_interval_refine_max(snd_interval_t *i, unsigned int max, int open
  *
  * Returns non-zero if the value is changed, zero if not changed.
  */
-int snd_interval_refine(snd_interval_t *i, const snd_interval_t *v)
+int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v)
 {
 	int changed = 0;
 	assert(!snd_interval_empty(i));
@@ -473,7 +473,7 @@ int snd_interval_refine(snd_interval_t *i, const snd_interval_t *v)
 	return changed;
 }
 
-static int snd_interval_refine_first(snd_interval_t *i)
+static int snd_interval_refine_first(struct snd_interval *i)
 {
 	assert(!snd_interval_empty(i));
 	if (snd_interval_single(i))
@@ -485,7 +485,7 @@ static int snd_interval_refine_first(snd_interval_t *i)
 	return 1;
 }
 
-static int snd_interval_refine_last(snd_interval_t *i)
+static int snd_interval_refine_last(struct snd_interval *i)
 {
 	assert(!snd_interval_empty(i));
 	if (snd_interval_single(i))
@@ -497,9 +497,9 @@ static int snd_interval_refine_last(snd_interval_t *i)
 	return 1;
 }
 
-static int snd_interval_refine_set(snd_interval_t *i, unsigned int val)
+static int snd_interval_refine_set(struct snd_interval *i, unsigned int val)
 {
-	snd_interval_t t;
+	struct snd_interval t;
 	t.empty = 0;
 	t.min = t.max = val;
 	t.openmin = t.openmax = 0;
@@ -507,7 +507,7 @@ static int snd_interval_refine_set(snd_interval_t *i, unsigned int val)
 	return snd_interval_refine(i, &t);
 }
 
-void snd_interval_mul(const snd_interval_t *a, const snd_interval_t *b, snd_interval_t *c)
+void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c)
 {
 	if (a->empty || b->empty) {
 		snd_interval_none(c);
@@ -531,7 +531,7 @@ void snd_interval_mul(const snd_interval_t *a, const snd_interval_t *b, snd_inte
  *
  * Returns non-zero if the value is changed, zero if not changed.
  */
-void snd_interval_div(const snd_interval_t *a, const snd_interval_t *b, snd_interval_t *c)
+void snd_interval_div(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c)
 {
 	unsigned int r;
 	if (a->empty || b->empty) {
@@ -566,8 +566,8 @@ void snd_interval_div(const snd_interval_t *a, const snd_interval_t *b, snd_inte
  *
  * Returns non-zero if the value is changed, zero if not changed.
  */
-void snd_interval_muldivk(const snd_interval_t *a, const snd_interval_t *b,
-		      unsigned int k, snd_interval_t *c)
+void snd_interval_muldivk(const struct snd_interval *a, const struct snd_interval *b,
+		      unsigned int k, struct snd_interval *c)
 {
 	unsigned int r;
 	if (a->empty || b->empty) {
@@ -597,8 +597,8 @@ void snd_interval_muldivk(const snd_interval_t *a, const snd_interval_t *b,
  *
  * Returns non-zero if the value is changed, zero if not changed.
  */
-void snd_interval_mulkdiv(const snd_interval_t *a, unsigned int k,
-		      const snd_interval_t *b, snd_interval_t *c)
+void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k,
+		      const struct snd_interval *b, struct snd_interval *c)
 {
 	unsigned int r;
 	if (a->empty || b->empty) {
@@ -636,13 +636,13 @@ void snd_interval_mulkdiv(const snd_interval_t *a, unsigned int k,
  *
  * Returns non-zero if the value is changed, zero if not changed.
  */
-int snd_interval_ratnum(snd_interval_t *i,
-		    unsigned int rats_count, ratnum_t *rats,
-		    unsigned int *nump, unsigned int *denp)
+int snd_interval_ratnum(struct snd_interval *i,
+			unsigned int rats_count, struct snd_ratnum *rats,
+			unsigned int *nump, unsigned int *denp)
 {
 	unsigned int best_num, best_diff, best_den;
 	unsigned int k;
-	snd_interval_t t;
+	struct snd_interval t;
 	int err;
 
 	best_num = best_den = best_diff = 0;
@@ -731,20 +731,20 @@ int snd_interval_ratnum(snd_interval_t *i,
 /**
  * snd_interval_ratden - refine the interval value
  * @i: interval to refine
- * @rats_count: number of ratden_t
- * @rats: ratden_t array
+ * @rats_count: number of struct ratden
+ * @rats: struct ratden array
  * @nump: pointer to store the resultant numerator
  * @denp: pointer to store the resultant denominator
  *
  * Returns non-zero if the value is changed, zero if not changed.
  */
-static int snd_interval_ratden(snd_interval_t *i,
-			       unsigned int rats_count, ratden_t *rats,
+static int snd_interval_ratden(struct snd_interval *i,
+			       unsigned int rats_count, struct snd_ratden *rats,
 			       unsigned int *nump, unsigned int *denp)
 {
 	unsigned int best_num, best_diff, best_den;
 	unsigned int k;
-	snd_interval_t t;
+	struct snd_interval t;
 	int err;
 
 	best_num = best_den = best_diff = 0;
@@ -837,7 +837,7 @@ static int snd_interval_ratden(snd_interval_t *i,
  *
  * Returns non-zero if the value is changed, zero if not changed.
  */
-int snd_interval_list(snd_interval_t *i, unsigned int count, unsigned int *list, unsigned int mask)
+int snd_interval_list(struct snd_interval *i, unsigned int count, unsigned int *list, unsigned int mask)
 {
         unsigned int k;
 	int changed = 0;
@@ -878,7 +878,7 @@ int snd_interval_list(snd_interval_t *i, unsigned int count, unsigned int *list,
         return changed;
 }
 
-static int snd_interval_step(snd_interval_t *i, unsigned int min, unsigned int step)
+static int snd_interval_step(struct snd_interval *i, unsigned int min, unsigned int step)
 {
 	unsigned int n;
 	int changed = 0;
@@ -912,18 +912,18 @@ static int snd_interval_step(snd_interval_t *i, unsigned int min, unsigned int s
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_pcm_hw_rule_add(snd_pcm_runtime_t *runtime, unsigned int cond,
+int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond,
 			int var,
 			snd_pcm_hw_rule_func_t func, void *private,
 			int dep, ...)
 {
-	snd_pcm_hw_constraints_t *constrs = &runtime->hw_constraints;
-	snd_pcm_hw_rule_t *c;
+	struct snd_pcm_hw_constraints *constrs = &runtime->hw_constraints;
+	struct snd_pcm_hw_rule *c;
 	unsigned int k;
 	va_list args;
 	va_start(args, dep);
 	if (constrs->rules_num >= constrs->rules_all) {
-		snd_pcm_hw_rule_t *new;
+		struct snd_pcm_hw_rule *new;
 		unsigned int new_rules = constrs->rules_all + 16;
 		new = kcalloc(new_rules, sizeof(*c), GFP_KERNEL);
 		if (!new)
@@ -962,11 +962,11 @@ int snd_pcm_hw_rule_add(snd_pcm_runtime_t *runtime, unsigned int cond,
  *
  * Apply the constraint of the given bitmap mask to a mask parameter.
  */
-int snd_pcm_hw_constraint_mask(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var,
+int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
 			       u_int32_t mask)
 {
-	snd_pcm_hw_constraints_t *constrs = &runtime->hw_constraints;
-	snd_mask_t *maskp = constrs_mask(constrs, var);
+	struct snd_pcm_hw_constraints *constrs = &runtime->hw_constraints;
+	struct snd_mask *maskp = constrs_mask(constrs, var);
 	*maskp->bits &= mask;
 	memset(maskp->bits + 1, 0, (SNDRV_MASK_MAX-32) / 8); /* clear rest */
 	if (*maskp->bits == 0)
@@ -982,11 +982,11 @@ int snd_pcm_hw_constraint_mask(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t va
  *
  * Apply the constraint of the given bitmap mask to a mask parameter.
  */
-int snd_pcm_hw_constraint_mask64(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var,
+int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
 				 u_int64_t mask)
 {
-	snd_pcm_hw_constraints_t *constrs = &runtime->hw_constraints;
-	snd_mask_t *maskp = constrs_mask(constrs, var);
+	struct snd_pcm_hw_constraints *constrs = &runtime->hw_constraints;
+	struct snd_mask *maskp = constrs_mask(constrs, var);
 	maskp->bits[0] &= (u_int32_t)mask;
 	maskp->bits[1] &= (u_int32_t)(mask >> 32);
 	memset(maskp->bits + 2, 0, (SNDRV_MASK_MAX-64) / 8); /* clear rest */
@@ -1002,9 +1002,9 @@ int snd_pcm_hw_constraint_mask64(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t
  *
  * Apply the constraint of integer to an interval parameter.
  */
-int snd_pcm_hw_constraint_integer(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var)
+int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var)
 {
-	snd_pcm_hw_constraints_t *constrs = &runtime->hw_constraints;
+	struct snd_pcm_hw_constraints *constrs = &runtime->hw_constraints;
 	return snd_interval_setinteger(constrs_interval(constrs, var));
 }
 
@@ -1017,11 +1017,11 @@ int snd_pcm_hw_constraint_integer(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t
  * 
  * Apply the min/max range constraint to an interval parameter.
  */
-int snd_pcm_hw_constraint_minmax(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var,
+int snd_pcm_hw_constraint_minmax(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
 				 unsigned int min, unsigned int max)
 {
-	snd_pcm_hw_constraints_t *constrs = &runtime->hw_constraints;
-	snd_interval_t t;
+	struct snd_pcm_hw_constraints *constrs = &runtime->hw_constraints;
+	struct snd_interval t;
 	t.min = min;
 	t.max = max;
 	t.openmin = t.openmax = 0;
@@ -1029,10 +1029,10 @@ int snd_pcm_hw_constraint_minmax(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t
 	return snd_interval_refine(constrs_interval(constrs, var), &t);
 }
 
-static int snd_pcm_hw_rule_list(snd_pcm_hw_params_t *params,
-				snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params,
+				struct snd_pcm_hw_rule *rule)
 {
-	snd_pcm_hw_constraint_list_t *list = rule->private;
+	struct snd_pcm_hw_constraint_list *list = rule->private;
 	return snd_interval_list(hw_param_interval(params, rule->var), list->count, list->list, list->mask);
 }		
 
@@ -1046,20 +1046,20 @@ static int snd_pcm_hw_rule_list(snd_pcm_hw_params_t *params,
  * 
  * Apply the list of constraints to an interval parameter.
  */
-int snd_pcm_hw_constraint_list(snd_pcm_runtime_t *runtime,
+int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime,
 			       unsigned int cond,
 			       snd_pcm_hw_param_t var,
-			       snd_pcm_hw_constraint_list_t *l)
+			       struct snd_pcm_hw_constraint_list *l)
 {
 	return snd_pcm_hw_rule_add(runtime, cond, var,
 				   snd_pcm_hw_rule_list, l,
 				   var, -1);
 }
 
-static int snd_pcm_hw_rule_ratnums(snd_pcm_hw_params_t *params,
-				   snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_ratnums(struct snd_pcm_hw_params *params,
+				   struct snd_pcm_hw_rule *rule)
 {
-	snd_pcm_hw_constraint_ratnums_t *r = rule->private;
+	struct snd_pcm_hw_constraint_ratnums *r = rule->private;
 	unsigned int num = 0, den = 0;
 	int err;
 	err = snd_interval_ratnum(hw_param_interval(params, rule->var),
@@ -1076,22 +1076,22 @@ static int snd_pcm_hw_rule_ratnums(snd_pcm_hw_params_t *params,
  * @runtime: PCM runtime instance
  * @cond: condition bits
  * @var: hw_params variable to apply the ratnums constraint
- * @r: ratnums_t constriants
+ * @r: struct snd_ratnums constriants
  */
-int snd_pcm_hw_constraint_ratnums(snd_pcm_runtime_t *runtime, 
+int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, 
 				  unsigned int cond,
 				  snd_pcm_hw_param_t var,
-				  snd_pcm_hw_constraint_ratnums_t *r)
+				  struct snd_pcm_hw_constraint_ratnums *r)
 {
 	return snd_pcm_hw_rule_add(runtime, cond, var,
 				   snd_pcm_hw_rule_ratnums, r,
 				   var, -1);
 }
 
-static int snd_pcm_hw_rule_ratdens(snd_pcm_hw_params_t *params,
-				   snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_ratdens(struct snd_pcm_hw_params *params,
+				   struct snd_pcm_hw_rule *rule)
 {
-	snd_pcm_hw_constraint_ratdens_t *r = rule->private;
+	struct snd_pcm_hw_constraint_ratdens *r = rule->private;
 	unsigned int num = 0, den = 0;
 	int err = snd_interval_ratden(hw_param_interval(params, rule->var),
 				  r->nrats, r->rats, &num, &den);
@@ -1107,25 +1107,25 @@ static int snd_pcm_hw_rule_ratdens(snd_pcm_hw_params_t *params,
  * @runtime: PCM runtime instance
  * @cond: condition bits
  * @var: hw_params variable to apply the ratdens constraint
- * @r: ratdens_t constriants
+ * @r: struct snd_ratdens constriants
  */
-int snd_pcm_hw_constraint_ratdens(snd_pcm_runtime_t *runtime, 
+int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime, 
 				  unsigned int cond,
 				  snd_pcm_hw_param_t var,
-				  snd_pcm_hw_constraint_ratdens_t *r)
+				  struct snd_pcm_hw_constraint_ratdens *r)
 {
 	return snd_pcm_hw_rule_add(runtime, cond, var,
 				   snd_pcm_hw_rule_ratdens, r,
 				   var, -1);
 }
 
-static int snd_pcm_hw_rule_msbits(snd_pcm_hw_params_t *params,
-				  snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_msbits(struct snd_pcm_hw_params *params,
+				  struct snd_pcm_hw_rule *rule)
 {
 	unsigned int l = (unsigned long) rule->private;
 	int width = l & 0xffff;
 	unsigned int msbits = l >> 16;
-	snd_interval_t *i = hw_param_interval(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS);
+	struct snd_interval *i = hw_param_interval(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS);
 	if (snd_interval_single(i) && snd_interval_value(i) == width)
 		params->msbits = msbits;
 	return 0;
@@ -1138,7 +1138,7 @@ static int snd_pcm_hw_rule_msbits(snd_pcm_hw_params_t *params,
  * @width: sample bits width
  * @msbits: msbits width
  */
-int snd_pcm_hw_constraint_msbits(snd_pcm_runtime_t *runtime, 
+int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime, 
 				 unsigned int cond,
 				 unsigned int width,
 				 unsigned int msbits)
@@ -1150,8 +1150,8 @@ int snd_pcm_hw_constraint_msbits(snd_pcm_runtime_t *runtime,
 				    SNDRV_PCM_HW_PARAM_SAMPLE_BITS, -1);
 }
 
-static int snd_pcm_hw_rule_step(snd_pcm_hw_params_t *params,
-				snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_step(struct snd_pcm_hw_params *params,
+				struct snd_pcm_hw_rule *rule)
 {
 	unsigned long step = (unsigned long) rule->private;
 	return snd_interval_step(hw_param_interval(params, rule->var), 0, step);
@@ -1164,7 +1164,7 @@ static int snd_pcm_hw_rule_step(snd_pcm_hw_params_t *params,
  * @var: hw_params variable to apply the step constraint
  * @step: step size
  */
-int snd_pcm_hw_constraint_step(snd_pcm_runtime_t *runtime,
+int snd_pcm_hw_constraint_step(struct snd_pcm_runtime *runtime,
 			       unsigned int cond,
 			       snd_pcm_hw_param_t var,
 			       unsigned long step)
@@ -1174,7 +1174,7 @@ int snd_pcm_hw_constraint_step(snd_pcm_runtime_t *runtime,
 				   var, -1);
 }
 
-static int snd_pcm_hw_rule_pow2(snd_pcm_hw_params_t *params, snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_pow2(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule)
 {
 	static int pow2_sizes[] = {
 		1<<0, 1<<1, 1<<2, 1<<3, 1<<4, 1<<5, 1<<6, 1<<7,
@@ -1192,7 +1192,7 @@ static int snd_pcm_hw_rule_pow2(snd_pcm_hw_params_t *params, snd_pcm_hw_rule_t *
  * @cond: condition bits
  * @var: hw_params variable to apply the power-of-2 constraint
  */
-int snd_pcm_hw_constraint_pow2(snd_pcm_runtime_t *runtime,
+int snd_pcm_hw_constraint_pow2(struct snd_pcm_runtime *runtime,
 			       unsigned int cond,
 			       snd_pcm_hw_param_t var)
 {
@@ -1202,13 +1202,12 @@ int snd_pcm_hw_constraint_pow2(snd_pcm_runtime_t *runtime,
 }
 
 /* To use the same code we have in alsa-lib */
-#define snd_pcm_t snd_pcm_substream_t
 #define assert(i) snd_assert((i), return -EINVAL)
 #ifndef INT_MIN
 #define INT_MIN ((int)((unsigned int)INT_MAX+1))
 #endif
 
-static void _snd_pcm_hw_param_any(snd_pcm_hw_params_t *params,
+static void _snd_pcm_hw_param_any(struct snd_pcm_hw_params *params,
 				  snd_pcm_hw_param_t var)
 {
 	if (hw_is_mask(var)) {
@@ -1230,7 +1229,7 @@ static void _snd_pcm_hw_param_any(snd_pcm_hw_params_t *params,
 /*
  * snd_pcm_hw_param_any
  */
-int snd_pcm_hw_param_any(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
+int snd_pcm_hw_param_any(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params,
 			 snd_pcm_hw_param_t var)
 {
 	_snd_pcm_hw_param_any(params, var);
@@ -1238,7 +1237,7 @@ int snd_pcm_hw_param_any(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
 }
 #endif  /*  0  */
 
-void _snd_pcm_hw_params_any(snd_pcm_hw_params_t *params)
+void _snd_pcm_hw_params_any(struct snd_pcm_hw_params *params)
 {
 	unsigned int k;
 	memset(params, 0, sizeof(*params));
@@ -1255,7 +1254,7 @@ void _snd_pcm_hw_params_any(snd_pcm_hw_params_t *params)
  *
  * Fill PARAMS with full configuration space boundaries
  */
-int snd_pcm_hw_params_any(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
+int snd_pcm_hw_params_any(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params)
 {
 	_snd_pcm_hw_params_any(params);
 	return snd_pcm_hw_refine(pcm, params);
@@ -1271,11 +1270,11 @@ int snd_pcm_hw_params_any(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
  * Return the value for field PAR if it's fixed in configuration space 
  *  defined by PARAMS. Return -EINVAL otherwise
  */
-static int snd_pcm_hw_param_value(const snd_pcm_hw_params_t *params,
+static int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params,
 				  snd_pcm_hw_param_t var, int *dir)
 {
 	if (hw_is_mask(var)) {
-		const snd_mask_t *mask = hw_param_mask_c(params, var);
+		const struct snd_mask *mask = hw_param_mask_c(params, var);
 		if (!snd_mask_single(mask))
 			return -EINVAL;
 		if (dir)
@@ -1283,7 +1282,7 @@ static int snd_pcm_hw_param_value(const snd_pcm_hw_params_t *params,
 		return snd_mask_value(mask);
 	}
 	if (hw_is_interval(var)) {
-		const snd_interval_t *i = hw_param_interval_c(params, var);
+		const struct snd_interval *i = hw_param_interval_c(params, var);
 		if (!snd_interval_single(i))
 			return -EINVAL;
 		if (dir)
@@ -1302,7 +1301,7 @@ static int snd_pcm_hw_param_value(const snd_pcm_hw_params_t *params,
  *
  * Return the minimum value for field PAR.
  */
-unsigned int snd_pcm_hw_param_value_min(const snd_pcm_hw_params_t *params,
+unsigned int snd_pcm_hw_param_value_min(const struct snd_pcm_hw_params *params,
 					snd_pcm_hw_param_t var, int *dir)
 {
 	if (hw_is_mask(var)) {
@@ -1311,7 +1310,7 @@ unsigned int snd_pcm_hw_param_value_min(const snd_pcm_hw_params_t *params,
 		return snd_mask_min(hw_param_mask_c(params, var));
 	}
 	if (hw_is_interval(var)) {
-		const snd_interval_t *i = hw_param_interval_c(params, var);
+		const struct snd_interval *i = hw_param_interval_c(params, var);
 		if (dir)
 			*dir = i->openmin;
 		return snd_interval_min(i);
@@ -1328,7 +1327,7 @@ unsigned int snd_pcm_hw_param_value_min(const snd_pcm_hw_params_t *params,
  *
  * Return the maximum value for field PAR.
  */
-unsigned int snd_pcm_hw_param_value_max(const snd_pcm_hw_params_t *params,
+unsigned int snd_pcm_hw_param_value_max(const struct snd_pcm_hw_params *params,
 					snd_pcm_hw_param_t var, int *dir)
 {
 	if (hw_is_mask(var)) {
@@ -1337,7 +1336,7 @@ unsigned int snd_pcm_hw_param_value_max(const snd_pcm_hw_params_t *params,
 		return snd_mask_max(hw_param_mask_c(params, var));
 	}
 	if (hw_is_interval(var)) {
-		const snd_interval_t *i = hw_param_interval_c(params, var);
+		const struct snd_interval *i = hw_param_interval_c(params, var);
 		if (dir)
 			*dir = - (int) i->openmax;
 		return snd_interval_max(i);
@@ -1346,7 +1345,7 @@ unsigned int snd_pcm_hw_param_value_max(const snd_pcm_hw_params_t *params,
 	return -EINVAL;
 }
 
-void _snd_pcm_hw_param_setempty(snd_pcm_hw_params_t *params,
+void _snd_pcm_hw_param_setempty(struct snd_pcm_hw_params *params,
 				snd_pcm_hw_param_t var)
 {
 	if (hw_is_mask(var)) {
@@ -1362,7 +1361,7 @@ void _snd_pcm_hw_param_setempty(snd_pcm_hw_params_t *params,
 	}
 }
 
-int _snd_pcm_hw_param_setinteger(snd_pcm_hw_params_t *params,
+int _snd_pcm_hw_param_setinteger(struct snd_pcm_hw_params *params,
 				 snd_pcm_hw_param_t var)
 {
 	int changed;
@@ -1383,8 +1382,8 @@ int _snd_pcm_hw_param_setinteger(snd_pcm_hw_params_t *params,
  * non integer values. Reduce configuration space accordingly.
  * Return -EINVAL if the configuration space is empty
  */
-int snd_pcm_hw_param_setinteger(snd_pcm_t *pcm, 
-				snd_pcm_hw_params_t *params,
+int snd_pcm_hw_param_setinteger(struct snd_pcm_substream *pcm, 
+				struct snd_pcm_hw_params *params,
 				snd_pcm_hw_param_t var)
 {
 	int changed = _snd_pcm_hw_param_setinteger(params, var);
@@ -1399,7 +1398,7 @@ int snd_pcm_hw_param_setinteger(snd_pcm_t *pcm,
 }
 #endif  /*  0  */
 
-static int _snd_pcm_hw_param_first(snd_pcm_hw_params_t *params,
+static int _snd_pcm_hw_param_first(struct snd_pcm_hw_params *params,
 				   snd_pcm_hw_param_t var)
 {
 	int changed;
@@ -1430,8 +1429,8 @@ static int _snd_pcm_hw_param_first(snd_pcm_hw_params_t *params,
  * values > minimum. Reduce configuration space accordingly.
  * Return the minimum.
  */
-static int snd_pcm_hw_param_first(snd_pcm_t *pcm, 
-				  snd_pcm_hw_params_t *params, 
+static int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm, 
+				  struct snd_pcm_hw_params *params, 
 				  snd_pcm_hw_param_t var, int *dir)
 {
 	int changed = _snd_pcm_hw_param_first(params, var);
@@ -1444,7 +1443,7 @@ static int snd_pcm_hw_param_first(snd_pcm_t *pcm,
 	return snd_pcm_hw_param_value(params, var, dir);
 }
 
-static int _snd_pcm_hw_param_last(snd_pcm_hw_params_t *params,
+static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params,
 				  snd_pcm_hw_param_t var)
 {
 	int changed;
@@ -1475,8 +1474,8 @@ static int _snd_pcm_hw_param_last(snd_pcm_hw_params_t *params,
  * values < maximum. Reduce configuration space accordingly.
  * Return the maximum.
  */
-static int snd_pcm_hw_param_last(snd_pcm_t *pcm, 
-				 snd_pcm_hw_params_t *params,
+static int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, 
+				 struct snd_pcm_hw_params *params,
 				 snd_pcm_hw_param_t var, int *dir)
 {
 	int changed = _snd_pcm_hw_param_last(params, var);
@@ -1489,7 +1488,7 @@ static int snd_pcm_hw_param_last(snd_pcm_t *pcm,
 	return snd_pcm_hw_param_value(params, var, dir);
 }
 
-int _snd_pcm_hw_param_min(snd_pcm_hw_params_t *params,
+int _snd_pcm_hw_param_min(struct snd_pcm_hw_params *params,
 			  snd_pcm_hw_param_t var, unsigned int val, int dir)
 {
 	int changed;
@@ -1531,7 +1530,7 @@ int _snd_pcm_hw_param_min(snd_pcm_hw_params_t *params,
  * values < VAL. Reduce configuration space accordingly.
  * Return new minimum or -EINVAL if the configuration space is empty
  */
-static int snd_pcm_hw_param_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
+static int snd_pcm_hw_param_min(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params,
 				snd_pcm_hw_param_t var, unsigned int val,
 				int *dir)
 {
@@ -1546,7 +1545,7 @@ static int snd_pcm_hw_param_min(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
 	return snd_pcm_hw_param_value_min(params, var, dir);
 }
 
-static int _snd_pcm_hw_param_max(snd_pcm_hw_params_t *params,
+static int _snd_pcm_hw_param_max(struct snd_pcm_hw_params *params,
 				 snd_pcm_hw_param_t var, unsigned int val,
 				 int dir)
 {
@@ -1591,7 +1590,7 @@ static int _snd_pcm_hw_param_max(snd_pcm_hw_params_t *params,
  *  values >= VAL + 1. Reduce configuration space accordingly.
  *  Return new maximum or -EINVAL if the configuration space is empty
  */
-static int snd_pcm_hw_param_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
+static int snd_pcm_hw_param_max(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params,
 				snd_pcm_hw_param_t var, unsigned int val,
 				int *dir)
 {
@@ -1606,12 +1605,12 @@ static int snd_pcm_hw_param_max(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
 	return snd_pcm_hw_param_value_max(params, var, dir);
 }
 
-int _snd_pcm_hw_param_set(snd_pcm_hw_params_t *params,
+int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params,
 			  snd_pcm_hw_param_t var, unsigned int val, int dir)
 {
 	int changed;
 	if (hw_is_mask(var)) {
-		snd_mask_t *m = hw_param_mask(params, var);
+		struct snd_mask *m = hw_param_mask(params, var);
 		if (val == 0 && dir < 0) {
 			changed = -EINVAL;
 			snd_mask_none(m);
@@ -1623,14 +1622,14 @@ int _snd_pcm_hw_param_set(snd_pcm_hw_params_t *params,
 			changed = snd_mask_refine_set(hw_param_mask(params, var), val);
 		}
 	} else if (hw_is_interval(var)) {
-		snd_interval_t *i = hw_param_interval(params, var);
+		struct snd_interval *i = hw_param_interval(params, var);
 		if (val == 0 && dir < 0) {
 			changed = -EINVAL;
 			snd_interval_none(i);
 		} else if (dir == 0)
 			changed = snd_interval_refine_set(i, val);
 		else {
-			snd_interval_t t;
+			struct snd_interval t;
 			t.openmin = 1;
 			t.openmax = 1;
 			t.empty = 0;
@@ -1667,7 +1666,7 @@ int _snd_pcm_hw_param_set(snd_pcm_hw_params_t *params,
  * values != VAL. Reduce configuration space accordingly.
  *  Return VAL or -EINVAL if the configuration space is empty
  */
-int snd_pcm_hw_param_set(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
+int snd_pcm_hw_param_set(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params,
 			 snd_pcm_hw_param_t var, unsigned int val, int dir)
 {
 	int changed = _snd_pcm_hw_param_set(params, var, val, dir);
@@ -1681,8 +1680,8 @@ int snd_pcm_hw_param_set(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
 	return snd_pcm_hw_param_value(params, var, NULL);
 }
 
-static int _snd_pcm_hw_param_mask(snd_pcm_hw_params_t *params,
-				  snd_pcm_hw_param_t var, const snd_mask_t *val)
+static int _snd_pcm_hw_param_mask(struct snd_pcm_hw_params *params,
+				  snd_pcm_hw_param_t var, const struct snd_mask *val)
 {
 	int changed;
 	assert(hw_is_mask(var));
@@ -1708,8 +1707,8 @@ static int _snd_pcm_hw_param_mask(snd_pcm_hw_params_t *params,
  * Return 0 on success or -EINVAL
  * if the configuration space is empty
  */
-int snd_pcm_hw_param_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
-			  snd_pcm_hw_param_t var, const snd_mask_t *val)
+int snd_pcm_hw_param_mask(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params,
+			  snd_pcm_hw_param_t var, const struct snd_mask *val)
 {
 	int changed = _snd_pcm_hw_param_mask(params, var, val);
 	if (changed < 0)
@@ -1784,10 +1783,10 @@ static int boundary_nearer(int min, int mindir,
  * SNDRV_PCM_HW_PARAM_FORMAT, SNDRV_PCM_HW_PARAM_SUBFORMAT.
  * Return the value found.
   */
-int snd_pcm_hw_param_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
+int snd_pcm_hw_param_near(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params,
 			  snd_pcm_hw_param_t var, unsigned int best, int *dir)
 {
-	snd_pcm_hw_params_t *save = NULL;
+	struct snd_pcm_hw_params *save = NULL;
 	int v;
 	unsigned int saved_min;
 	int last = 0;
@@ -1814,7 +1813,7 @@ int snd_pcm_hw_param_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
 	saved_min = min;
 	min = snd_pcm_hw_param_min(pcm, params, var, min, &mindir);
 	if (min >= 0) {
-		snd_pcm_hw_params_t *params1;
+		struct snd_pcm_hw_params *params1;
 		if (max < 0)
 			goto _end;
 		if ((unsigned int)min == saved_min && mindir == valdir)
@@ -1861,7 +1860,7 @@ int snd_pcm_hw_param_near(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
  * first access, first format, first subformat, min channels,
  * min rate, min period time, max buffer size, min tick time
  */
-int snd_pcm_hw_params_choose(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
+int snd_pcm_hw_params_choose(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params)
 {
 	int err;
 
@@ -1892,13 +1891,12 @@ int snd_pcm_hw_params_choose(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
 	return 0;
 }
 
-#undef snd_pcm_t
 #undef assert
 
-static int snd_pcm_lib_ioctl_reset(snd_pcm_substream_t *substream,
+static int snd_pcm_lib_ioctl_reset(struct snd_pcm_substream *substream,
 				   void *arg)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned long flags;
 	snd_pcm_stream_lock_irqsave(substream, flags);
 	if (snd_pcm_running(substream) &&
@@ -1910,11 +1908,11 @@ static int snd_pcm_lib_ioctl_reset(snd_pcm_substream_t *substream,
 	return 0;
 }
 
-static int snd_pcm_lib_ioctl_channel_info(snd_pcm_substream_t *substream,
+static int snd_pcm_lib_ioctl_channel_info(struct snd_pcm_substream *substream,
 					  void *arg)
 {
-	snd_pcm_channel_info_t *info = arg;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_channel_info *info = arg;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int width;
 	if (!(runtime->info & SNDRV_PCM_INFO_MMAP)) {
 		info->offset = -1;
@@ -1956,7 +1954,7 @@ static int snd_pcm_lib_ioctl_channel_info(snd_pcm_substream_t *substream,
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_pcm_lib_ioctl(snd_pcm_substream_t *substream,
+int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,
 		      unsigned int cmd, void *arg)
 {
 	switch (cmd) {
@@ -1974,10 +1972,10 @@ int snd_pcm_lib_ioctl(snd_pcm_substream_t *substream,
  *  Conditions
  */
 
-static void snd_pcm_system_tick_set(snd_pcm_substream_t *substream, 
+static void snd_pcm_system_tick_set(struct snd_pcm_substream *substream, 
 				    unsigned long ticks)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (ticks == 0)
 		del_timer(&runtime->tick_timer);
 	else {
@@ -1988,14 +1986,14 @@ static void snd_pcm_system_tick_set(snd_pcm_substream_t *substream,
 }
 
 /* Temporary alias */
-void snd_pcm_tick_set(snd_pcm_substream_t *substream, unsigned long ticks)
+void snd_pcm_tick_set(struct snd_pcm_substream *substream, unsigned long ticks)
 {
 	snd_pcm_system_tick_set(substream, ticks);
 }
 
-void snd_pcm_tick_prepare(snd_pcm_substream_t *substream)
+void snd_pcm_tick_prepare(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_uframes_t frames = ULONG_MAX;
 	snd_pcm_uframes_t avail, dist;
 	unsigned int ticks;
@@ -2046,9 +2044,9 @@ void snd_pcm_tick_prepare(snd_pcm_substream_t *substream)
 	snd_pcm_tick_set(substream, (unsigned long) ticks);
 }
 
-void snd_pcm_tick_elapsed(snd_pcm_substream_t *substream)
+void snd_pcm_tick_elapsed(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	unsigned long flags;
 	
 	snd_assert(substream != NULL, return);
@@ -2076,9 +2074,9 @@ void snd_pcm_tick_elapsed(snd_pcm_substream_t *substream)
  * Even if more than one periods have elapsed since the last call, you
  * have to call this only once.
  */
-void snd_pcm_period_elapsed(snd_pcm_substream_t *substream)
+void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	unsigned long flags;
 
 	snd_assert(substream != NULL, return);
@@ -2104,12 +2102,12 @@ void snd_pcm_period_elapsed(snd_pcm_substream_t *substream)
 	kill_fasync(&runtime->fasync, SIGIO, POLL_IN);
 }
 
-static int snd_pcm_lib_write_transfer(snd_pcm_substream_t *substream,
+static int snd_pcm_lib_write_transfer(struct snd_pcm_substream *substream,
 				      unsigned int hwoff,
 				      unsigned long data, unsigned int off,
 				      snd_pcm_uframes_t frames)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 	char __user *buf = (char __user *) data + frames_to_bytes(runtime, off);
 	if (substream->ops->copy) {
@@ -2124,17 +2122,17 @@ static int snd_pcm_lib_write_transfer(snd_pcm_substream_t *substream,
 	return 0;
 }
  
-typedef int (*transfer_f)(snd_pcm_substream_t *substream, unsigned int hwoff,
+typedef int (*transfer_f)(struct snd_pcm_substream *substream, unsigned int hwoff,
 			  unsigned long data, unsigned int off,
 			  snd_pcm_uframes_t size);
 
-static snd_pcm_sframes_t snd_pcm_lib_write1(snd_pcm_substream_t *substream, 
+static snd_pcm_sframes_t snd_pcm_lib_write1(struct snd_pcm_substream *substream, 
 					    unsigned long data,
 					    snd_pcm_uframes_t size,
 					    int nonblock,
 					    transfer_f transfer)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_uframes_t xfer = 0;
 	snd_pcm_uframes_t offset = 0;
 	int err = 0;
@@ -2290,9 +2288,9 @@ static snd_pcm_sframes_t snd_pcm_lib_write1(snd_pcm_substream_t *substream,
 	return xfer > 0 ? (snd_pcm_sframes_t)xfer : err;
 }
 
-snd_pcm_sframes_t snd_pcm_lib_write(snd_pcm_substream_t *substream, const void __user *buf, snd_pcm_uframes_t size)
+snd_pcm_sframes_t snd_pcm_lib_write(struct snd_pcm_substream *substream, const void __user *buf, snd_pcm_uframes_t size)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	int nonblock;
 
 	snd_assert(substream != NULL, return -ENXIO);
@@ -2306,7 +2304,7 @@ snd_pcm_sframes_t snd_pcm_lib_write(snd_pcm_substream_t *substream, const void _
 	nonblock = !!(substream->ffile->f_flags & O_NONBLOCK);
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
 	if (substream->oss.oss) {
-		snd_pcm_oss_setup_t *setup = substream->oss.setup;
+		struct snd_pcm_oss_setup *setup = substream->oss.setup;
 		if (setup != NULL) {
 			if (setup->nonblock)
 				nonblock = 1;
@@ -2323,12 +2321,12 @@ snd_pcm_sframes_t snd_pcm_lib_write(snd_pcm_substream_t *substream, const void _
 				  snd_pcm_lib_write_transfer);
 }
 
-static int snd_pcm_lib_writev_transfer(snd_pcm_substream_t *substream,
+static int snd_pcm_lib_writev_transfer(struct snd_pcm_substream *substream,
 				       unsigned int hwoff,
 				       unsigned long data, unsigned int off,
 				       snd_pcm_uframes_t frames)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 	void __user **bufs = (void __user **)data;
 	int channels = runtime->channels;
@@ -2363,11 +2361,11 @@ static int snd_pcm_lib_writev_transfer(snd_pcm_substream_t *substream,
 	return 0;
 }
  
-snd_pcm_sframes_t snd_pcm_lib_writev(snd_pcm_substream_t *substream,
+snd_pcm_sframes_t snd_pcm_lib_writev(struct snd_pcm_substream *substream,
 				     void __user **bufs,
 				     snd_pcm_uframes_t frames)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	int nonblock;
 
 	snd_assert(substream != NULL, return -ENXIO);
@@ -2381,7 +2379,7 @@ snd_pcm_sframes_t snd_pcm_lib_writev(snd_pcm_substream_t *substream,
 	nonblock = !!(substream->ffile->f_flags & O_NONBLOCK);
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
 	if (substream->oss.oss) {
-		snd_pcm_oss_setup_t *setup = substream->oss.setup;
+		struct snd_pcm_oss_setup *setup = substream->oss.setup;
 		if (setup != NULL) {
 			if (setup->nonblock)
 				nonblock = 1;
@@ -2397,12 +2395,12 @@ snd_pcm_sframes_t snd_pcm_lib_writev(snd_pcm_substream_t *substream,
 				  nonblock, snd_pcm_lib_writev_transfer);
 }
 
-static int snd_pcm_lib_read_transfer(snd_pcm_substream_t *substream, 
+static int snd_pcm_lib_read_transfer(struct snd_pcm_substream *substream, 
 				     unsigned int hwoff,
 				     unsigned long data, unsigned int off,
 				     snd_pcm_uframes_t frames)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 	char __user *buf = (char __user *) data + frames_to_bytes(runtime, off);
 	if (substream->ops->copy) {
@@ -2417,13 +2415,13 @@ static int snd_pcm_lib_read_transfer(snd_pcm_substream_t *substream,
 	return 0;
 }
 
-static snd_pcm_sframes_t snd_pcm_lib_read1(snd_pcm_substream_t *substream,
+static snd_pcm_sframes_t snd_pcm_lib_read1(struct snd_pcm_substream *substream,
 					   unsigned long data,
 					   snd_pcm_uframes_t size,
 					   int nonblock,
 					   transfer_f transfer)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_uframes_t xfer = 0;
 	snd_pcm_uframes_t offset = 0;
 	int err = 0;
@@ -2587,9 +2585,9 @@ static snd_pcm_sframes_t snd_pcm_lib_read1(snd_pcm_substream_t *substream,
 	return xfer > 0 ? (snd_pcm_sframes_t)xfer : err;
 }
 
-snd_pcm_sframes_t snd_pcm_lib_read(snd_pcm_substream_t *substream, void __user *buf, snd_pcm_uframes_t size)
+snd_pcm_sframes_t snd_pcm_lib_read(struct snd_pcm_substream *substream, void __user *buf, snd_pcm_uframes_t size)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	int nonblock;
 	
 	snd_assert(substream != NULL, return -ENXIO);
@@ -2603,7 +2601,7 @@ snd_pcm_sframes_t snd_pcm_lib_read(snd_pcm_substream_t *substream, void __user *
 	nonblock = !!(substream->ffile->f_flags & O_NONBLOCK);
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
 	if (substream->oss.oss) {
-		snd_pcm_oss_setup_t *setup = substream->oss.setup;
+		struct snd_pcm_oss_setup *setup = substream->oss.setup;
 		if (setup != NULL) {
 			if (setup->nonblock)
 				nonblock = 1;
@@ -2617,12 +2615,12 @@ snd_pcm_sframes_t snd_pcm_lib_read(snd_pcm_substream_t *substream, void __user *
 	return snd_pcm_lib_read1(substream, (unsigned long)buf, size, nonblock, snd_pcm_lib_read_transfer);
 }
 
-static int snd_pcm_lib_readv_transfer(snd_pcm_substream_t *substream,
+static int snd_pcm_lib_readv_transfer(struct snd_pcm_substream *substream,
 				      unsigned int hwoff,
 				      unsigned long data, unsigned int off,
 				      snd_pcm_uframes_t frames)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 	void __user **bufs = (void __user **)data;
 	int channels = runtime->channels;
@@ -2654,11 +2652,11 @@ static int snd_pcm_lib_readv_transfer(snd_pcm_substream_t *substream,
 	return 0;
 }
  
-snd_pcm_sframes_t snd_pcm_lib_readv(snd_pcm_substream_t *substream,
+snd_pcm_sframes_t snd_pcm_lib_readv(struct snd_pcm_substream *substream,
 				    void __user **bufs,
 				    snd_pcm_uframes_t frames)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	int nonblock;
 
 	snd_assert(substream != NULL, return -ENXIO);
@@ -2672,7 +2670,7 @@ snd_pcm_sframes_t snd_pcm_lib_readv(snd_pcm_substream_t *substream,
 	nonblock = !!(substream->ffile->f_flags & O_NONBLOCK);
 #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
 	if (substream->oss.oss) {
-		snd_pcm_oss_setup_t *setup = substream->oss.setup;
+		struct snd_pcm_oss_setup *setup = substream->oss.setup;
 		if (setup != NULL) {
 			if (setup->nonblock)
 				nonblock = 1;
diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c
index b3f5344f60b..d37bcb76188 100644
--- a/sound/core/pcm_memory.c
+++ b/sound/core/pcm_memory.c
@@ -46,7 +46,7 @@ static const size_t snd_minimum_buffer = 16384;
  *
  * the minimum size is snd_minimum_buffer.  it should be power of 2.
  */
-static int preallocate_pcm_pages(snd_pcm_substream_t *substream, size_t size)
+static int preallocate_pcm_pages(struct snd_pcm_substream *substream, size_t size)
 {
 	struct snd_dma_buffer *dmab = &substream->dma_buffer;
 	int err;
@@ -78,7 +78,7 @@ static int preallocate_pcm_pages(snd_pcm_substream_t *substream, size_t size)
 /*
  * release the preallocated buffer if not yet done.
  */
-static void snd_pcm_lib_preallocate_dma_free(snd_pcm_substream_t *substream)
+static void snd_pcm_lib_preallocate_dma_free(struct snd_pcm_substream *substream)
 {
 	if (substream->dma_buffer.area == NULL)
 		return;
@@ -97,7 +97,7 @@ static void snd_pcm_lib_preallocate_dma_free(snd_pcm_substream_t *substream)
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_pcm_lib_preallocate_free(snd_pcm_substream_t *substream)
+int snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream)
 {
 	snd_pcm_lib_preallocate_dma_free(substream);
 	if (substream->proc_prealloc_entry) {
@@ -115,9 +115,9 @@ int snd_pcm_lib_preallocate_free(snd_pcm_substream_t *substream)
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_pcm_lib_preallocate_free_for_all(snd_pcm_t *pcm)
+int snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm)
 {
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	int stream;
 
 	for (stream = 0; stream < 2; stream++)
@@ -131,10 +131,10 @@ int snd_pcm_lib_preallocate_free_for_all(snd_pcm_t *pcm)
  *
  * prints the current allocated size in kB.
  */
-static void snd_pcm_lib_preallocate_proc_read(snd_info_entry_t *entry,
-					      snd_info_buffer_t *buffer)
+static void snd_pcm_lib_preallocate_proc_read(struct snd_info_entry *entry,
+					      struct snd_info_buffer *buffer)
 {
-	snd_pcm_substream_t *substream = (snd_pcm_substream_t *)entry->private_data;
+	struct snd_pcm_substream *substream = entry->private_data;
 	snd_iprintf(buffer, "%lu\n", (unsigned long) substream->dma_buffer.bytes / 1024);
 }
 
@@ -143,10 +143,10 @@ static void snd_pcm_lib_preallocate_proc_read(snd_info_entry_t *entry,
  *
  * accepts the preallocation size in kB.
  */
-static void snd_pcm_lib_preallocate_proc_write(snd_info_entry_t *entry,
-					       snd_info_buffer_t *buffer)
+static void snd_pcm_lib_preallocate_proc_write(struct snd_info_entry *entry,
+					       struct snd_info_buffer *buffer)
 {
-	snd_pcm_substream_t *substream = (snd_pcm_substream_t *)entry->private_data;
+	struct snd_pcm_substream *substream = entry->private_data;
 	char line[64], str[64];
 	size_t size;
 	struct snd_dma_buffer new_dmab;
@@ -188,10 +188,10 @@ static void snd_pcm_lib_preallocate_proc_write(snd_info_entry_t *entry,
 /*
  * pre-allocate the buffer and create a proc file for the substream
  */
-static int snd_pcm_lib_preallocate_pages1(snd_pcm_substream_t *substream,
+static int snd_pcm_lib_preallocate_pages1(struct snd_pcm_substream *substream,
 					  size_t size, size_t max)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	if (size > 0 && preallocate_dma && substream->number < maximum_substreams)
 		preallocate_pcm_pages(substream, size);
@@ -233,7 +233,7 @@ static int snd_pcm_lib_preallocate_pages1(snd_pcm_substream_t *substream,
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_pcm_lib_preallocate_pages(snd_pcm_substream_t *substream,
+int snd_pcm_lib_preallocate_pages(struct snd_pcm_substream *substream,
 				  int type, struct device *data,
 				  size_t size, size_t max)
 {
@@ -255,11 +255,11 @@ int snd_pcm_lib_preallocate_pages(snd_pcm_substream_t *substream,
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_pcm_lib_preallocate_pages_for_all(snd_pcm_t *pcm,
+int snd_pcm_lib_preallocate_pages_for_all(struct snd_pcm *pcm,
 					  int type, void *data,
 					  size_t size, size_t max)
 {
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	int stream, err;
 
 	for (stream = 0; stream < 2; stream++)
@@ -277,7 +277,7 @@ int snd_pcm_lib_preallocate_pages_for_all(snd_pcm_t *pcm,
  * Returns the page struct at the given buffer offset.
  * Used as the page callback of PCM ops.
  */
-struct page *snd_pcm_sgbuf_ops_page(snd_pcm_substream_t *substream, unsigned long offset)
+struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, unsigned long offset)
 {
 	struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
 
@@ -298,9 +298,9 @@ struct page *snd_pcm_sgbuf_ops_page(snd_pcm_substream_t *substream, unsigned lon
  * Returns 1 if the buffer is changed, 0 if not changed, or a negative
  * code on failure.
  */
-int snd_pcm_lib_malloc_pages(snd_pcm_substream_t *substream, size_t size)
+int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	struct snd_dma_buffer *dmab = NULL;
 
 	snd_assert(substream->dma_buffer.dev.type != SNDRV_DMA_TYPE_UNKNOWN, return -EINVAL);
@@ -318,7 +318,8 @@ int snd_pcm_lib_malloc_pages(snd_pcm_substream_t *substream, size_t size)
 		}
 		snd_pcm_lib_free_pages(substream);
 	}
-	if (substream->dma_buffer.area != NULL && substream->dma_buffer.bytes >= size) {
+	if (substream->dma_buffer.area != NULL &&
+	    substream->dma_buffer.bytes >= size) {
 		dmab = &substream->dma_buffer; /* use the pre-allocated buffer */
 	} else {
 		dmab = kzalloc(sizeof(*dmab), GFP_KERNEL);
@@ -345,9 +346,9 @@ int snd_pcm_lib_malloc_pages(snd_pcm_substream_t *substream, size_t size)
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_pcm_lib_free_pages(snd_pcm_substream_t *substream)
+int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 
 	snd_assert(substream != NULL, return -EINVAL);
 	runtime = substream->runtime;
diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c
index 1453743e4da..593c77f4d18 100644
--- a/sound/core/pcm_misc.c
+++ b/sound/core/pcm_misc.c
@@ -441,7 +441,7 @@ snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_end
  *
  * Returns zero if successful.
  */
-int snd_pcm_limit_hw_rates(snd_pcm_runtime_t *runtime)
+int snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime)
 {
 	static unsigned rates[] = {
 		/* ATTENTION: these values depend on the definition in pcm.h! */
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 16e252f5495..263c01a70fd 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -39,11 +39,11 @@
  *  Compatibility
  */
 
-struct sndrv_pcm_hw_params_old {
+struct snd_pcm_hw_params_old {
 	unsigned int flags;
 	unsigned int masks[SNDRV_PCM_HW_PARAM_SUBFORMAT -
 			   SNDRV_PCM_HW_PARAM_ACCESS + 1];
-	struct sndrv_interval intervals[SNDRV_PCM_HW_PARAM_TICK_TIME -
+	struct snd_interval intervals[SNDRV_PCM_HW_PARAM_TICK_TIME -
 					SNDRV_PCM_HW_PARAM_SAMPLE_BITS + 1];
 	unsigned int rmask;
 	unsigned int cmask;
@@ -51,15 +51,17 @@ struct sndrv_pcm_hw_params_old {
 	unsigned int msbits;
 	unsigned int rate_num;
 	unsigned int rate_den;
-	sndrv_pcm_uframes_t fifo_size;
+	snd_pcm_uframes_t fifo_size;
 	unsigned char reserved[64];
 };
 
-#define SNDRV_PCM_IOCTL_HW_REFINE_OLD _IOWR('A', 0x10, struct sndrv_pcm_hw_params_old)
-#define SNDRV_PCM_IOCTL_HW_PARAMS_OLD _IOWR('A', 0x11, struct sndrv_pcm_hw_params_old)
+#define SNDRV_PCM_IOCTL_HW_REFINE_OLD _IOWR('A', 0x10, struct snd_pcm_hw_params_old)
+#define SNDRV_PCM_IOCTL_HW_PARAMS_OLD _IOWR('A', 0x11, struct snd_pcm_hw_params_old)
 
-static int snd_pcm_hw_refine_old_user(snd_pcm_substream_t * substream, struct sndrv_pcm_hw_params_old __user * _oparams);
-static int snd_pcm_hw_params_old_user(snd_pcm_substream_t * substream, struct sndrv_pcm_hw_params_old __user * _oparams);
+static int snd_pcm_hw_refine_old_user(struct snd_pcm_substream *substream,
+				      struct snd_pcm_hw_params_old __user * _oparams);
+static int snd_pcm_hw_params_old_user(struct snd_pcm_substream *substream,
+				      struct snd_pcm_hw_params_old __user * _oparams);
 
 /*
  *
@@ -83,11 +85,11 @@ static inline void snd_leave_user(mm_segment_t fs)
 
 
 
-int snd_pcm_info(snd_pcm_substream_t * substream, snd_pcm_info_t *info)
+int snd_pcm_info(struct snd_pcm_substream *substream, struct snd_pcm_info *info)
 {
-	snd_pcm_runtime_t * runtime;
-	snd_pcm_t *pcm = substream->pcm;
-	snd_pcm_str_t *pstr = substream->pstr;
+	struct snd_pcm_runtime *runtime;
+	struct snd_pcm *pcm = substream->pcm;
+	struct snd_pcm_str *pstr = substream->pstr;
 
 	snd_assert(substream != NULL, return -ENXIO);
 	memset(info, 0, sizeof(*info));
@@ -111,9 +113,10 @@ int snd_pcm_info(snd_pcm_substream_t * substream, snd_pcm_info_t *info)
 	return 0;
 }
 
-int snd_pcm_info_user(snd_pcm_substream_t * substream, snd_pcm_info_t __user * _info)
+int snd_pcm_info_user(struct snd_pcm_substream *substream,
+		      struct snd_pcm_info __user * _info)
 {
-	snd_pcm_info_t *info;
+	struct snd_pcm_info *info;
 	int err;
 
 	info = kmalloc(sizeof(*info), GFP_KERNEL);
@@ -151,14 +154,14 @@ char *snd_pcm_hw_param_names[] = {
 };
 #endif
 
-int snd_pcm_hw_refine(snd_pcm_substream_t *substream, 
-		      snd_pcm_hw_params_t *params)
+int snd_pcm_hw_refine(struct snd_pcm_substream *substream, 
+		      struct snd_pcm_hw_params *params)
 {
 	unsigned int k;
-	snd_pcm_hardware_t *hw;
-	snd_interval_t *i = NULL;
-	snd_mask_t *m = NULL;
-	snd_pcm_hw_constraints_t *constrs = &substream->runtime->hw_constraints;
+	struct snd_pcm_hardware *hw;
+	struct snd_interval *i = NULL;
+	struct snd_mask *m = NULL;
+	struct snd_pcm_hw_constraints *constrs = &substream->runtime->hw_constraints;
 	unsigned int rstamps[constrs->rules_num];
 	unsigned int vstamps[SNDRV_PCM_HW_PARAM_LAST_INTERVAL + 1];
 	unsigned int stamp = 2;
@@ -231,7 +234,7 @@ int snd_pcm_hw_refine(snd_pcm_substream_t *substream,
 	do {
 		again = 0;
 		for (k = 0; k < constrs->rules_num; k++) {
-			snd_pcm_hw_rule_t *r = &constrs->rules[k];
+			struct snd_pcm_hw_rule *r = &constrs->rules[k];
 			unsigned int d;
 			int doit = 0;
 			if (r->cond && !(r->cond & params->flags))
@@ -313,9 +316,10 @@ int snd_pcm_hw_refine(snd_pcm_substream_t *substream,
 	return 0;
 }
 
-static int snd_pcm_hw_refine_user(snd_pcm_substream_t * substream, snd_pcm_hw_params_t __user * _params)
+static int snd_pcm_hw_refine_user(struct snd_pcm_substream *substream,
+				  struct snd_pcm_hw_params __user * _params)
 {
-	snd_pcm_hw_params_t *params;
+	struct snd_pcm_hw_params *params;
 	int err;
 
 	params = kmalloc(sizeof(*params), GFP_KERNEL);
@@ -337,10 +341,10 @@ out:
 	return err;
 }
 
-static int snd_pcm_hw_params(snd_pcm_substream_t *substream,
-			     snd_pcm_hw_params_t *params)
+static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
+			     struct snd_pcm_hw_params *params)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	int err;
 	unsigned int bits;
 	snd_pcm_uframes_t frames;
@@ -432,9 +436,10 @@ static int snd_pcm_hw_params(snd_pcm_substream_t *substream,
 	return err;
 }
 
-static int snd_pcm_hw_params_user(snd_pcm_substream_t * substream, snd_pcm_hw_params_t __user * _params)
+static int snd_pcm_hw_params_user(struct snd_pcm_substream *substream,
+				  struct snd_pcm_hw_params __user * _params)
 {
-	snd_pcm_hw_params_t *params;
+	struct snd_pcm_hw_params *params;
 	int err;
 
 	params = kmalloc(sizeof(*params), GFP_KERNEL);
@@ -456,9 +461,9 @@ out:
 	return err;
 }
 
-static int snd_pcm_hw_free(snd_pcm_substream_t * substream)
+static int snd_pcm_hw_free(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	int result = 0;
 
 	snd_assert(substream != NULL, return -ENXIO);
@@ -482,9 +487,10 @@ static int snd_pcm_hw_free(snd_pcm_substream_t * substream)
 	return result;
 }
 
-static int snd_pcm_sw_params(snd_pcm_substream_t * substream, snd_pcm_sw_params_t *params)
+static int snd_pcm_sw_params(struct snd_pcm_substream *substream,
+			     struct snd_pcm_sw_params *params)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 
 	snd_assert(substream != NULL, return -ENXIO);
 	runtime = substream->runtime;
@@ -537,9 +543,10 @@ static int snd_pcm_sw_params(snd_pcm_substream_t * substream, snd_pcm_sw_params_
 	return 0;
 }
 
-static int snd_pcm_sw_params_user(snd_pcm_substream_t * substream, snd_pcm_sw_params_t __user * _params)
+static int snd_pcm_sw_params_user(struct snd_pcm_substream *substream,
+				  struct snd_pcm_sw_params __user * _params)
 {
-	snd_pcm_sw_params_t params;
+	struct snd_pcm_sw_params params;
 	int err;
 	if (copy_from_user(&params, _params, sizeof(params)))
 		return -EFAULT;
@@ -549,10 +556,10 @@ static int snd_pcm_sw_params_user(snd_pcm_substream_t * substream, snd_pcm_sw_pa
 	return err;
 }
 
-int snd_pcm_status(snd_pcm_substream_t *substream,
-		   snd_pcm_status_t *status)
+int snd_pcm_status(struct snd_pcm_substream *substream,
+		   struct snd_pcm_status *status)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	snd_pcm_stream_lock_irq(substream);
 	status->state = runtime->status->state;
@@ -593,10 +600,11 @@ int snd_pcm_status(snd_pcm_substream_t *substream,
 	return 0;
 }
 
-static int snd_pcm_status_user(snd_pcm_substream_t * substream, snd_pcm_status_t __user * _status)
+static int snd_pcm_status_user(struct snd_pcm_substream *substream,
+			       struct snd_pcm_status __user * _status)
 {
-	snd_pcm_status_t status;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_status status;
+	struct snd_pcm_runtime *runtime;
 	int res;
 	
 	snd_assert(substream != NULL, return -ENXIO);
@@ -610,9 +618,10 @@ static int snd_pcm_status_user(snd_pcm_substream_t * substream, snd_pcm_status_t
 	return 0;
 }
 
-static int snd_pcm_channel_info(snd_pcm_substream_t * substream, snd_pcm_channel_info_t * info)
+static int snd_pcm_channel_info(struct snd_pcm_substream *substream,
+				struct snd_pcm_channel_info * info)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	unsigned int channel;
 	
 	snd_assert(substream != NULL, return -ENXIO);
@@ -631,9 +640,10 @@ static int snd_pcm_channel_info(snd_pcm_substream_t * substream, snd_pcm_channel
 	return substream->ops->ioctl(substream, SNDRV_PCM_IOCTL1_CHANNEL_INFO, info);
 }
 
-static int snd_pcm_channel_info_user(snd_pcm_substream_t * substream, snd_pcm_channel_info_t __user * _info)
+static int snd_pcm_channel_info_user(struct snd_pcm_substream *substream,
+				     struct snd_pcm_channel_info __user * _info)
 {
-	snd_pcm_channel_info_t info;
+	struct snd_pcm_channel_info info;
 	int res;
 	
 	if (copy_from_user(&info, _info, sizeof(info)))
@@ -646,9 +656,9 @@ static int snd_pcm_channel_info_user(snd_pcm_substream_t * substream, snd_pcm_ch
 	return 0;
 }
 
-static void snd_pcm_trigger_tstamp(snd_pcm_substream_t *substream)
+static void snd_pcm_trigger_tstamp(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (runtime->trigger_master == NULL)
 		return;
 	if (runtime->trigger_master == substream) {
@@ -661,10 +671,10 @@ static void snd_pcm_trigger_tstamp(snd_pcm_substream_t *substream)
 }
 
 struct action_ops {
-	int (*pre_action)(snd_pcm_substream_t *substream, int state);
-	int (*do_action)(snd_pcm_substream_t *substream, int state);
-	void (*undo_action)(snd_pcm_substream_t *substream, int state);
-	void (*post_action)(snd_pcm_substream_t *substream, int state);
+	int (*pre_action)(struct snd_pcm_substream *substream, int state);
+	int (*do_action)(struct snd_pcm_substream *substream, int state);
+	void (*undo_action)(struct snd_pcm_substream *substream, int state);
+	void (*post_action)(struct snd_pcm_substream *substream, int state);
 };
 
 /*
@@ -673,12 +683,12 @@ struct action_ops {
  *  Note2: call with calling stream lock + link lock
  */
 static int snd_pcm_action_group(struct action_ops *ops,
-				snd_pcm_substream_t *substream,
+				struct snd_pcm_substream *substream,
 				int state, int do_lock)
 {
 	struct list_head *pos;
-	snd_pcm_substream_t *s = NULL;
-	snd_pcm_substream_t *s1;
+	struct snd_pcm_substream *s = NULL;
+	struct snd_pcm_substream *s1;
 	int res = 0;
 
 	snd_pcm_group_for_each(pos, substream) {
@@ -727,7 +737,7 @@ static int snd_pcm_action_group(struct action_ops *ops,
  *  Note: call with stream lock
  */
 static int snd_pcm_action_single(struct action_ops *ops,
-				 snd_pcm_substream_t *substream,
+				 struct snd_pcm_substream *substream,
 				 int state)
 {
 	int res;
@@ -747,7 +757,7 @@ static int snd_pcm_action_single(struct action_ops *ops,
  *  Note: call with stream lock
  */
 static int snd_pcm_action(struct action_ops *ops,
-			  snd_pcm_substream_t *substream,
+			  struct snd_pcm_substream *substream,
 			  int state)
 {
 	int res;
@@ -770,7 +780,7 @@ static int snd_pcm_action(struct action_ops *ops,
  *  Note: don't use any locks before
  */
 static int snd_pcm_action_lock_irq(struct action_ops *ops,
-				   snd_pcm_substream_t *substream,
+				   struct snd_pcm_substream *substream,
 				   int state)
 {
 	int res;
@@ -794,7 +804,7 @@ static int snd_pcm_action_lock_irq(struct action_ops *ops,
 /*
  */
 static int snd_pcm_action_nonatomic(struct action_ops *ops,
-				    snd_pcm_substream_t *substream,
+				    struct snd_pcm_substream *substream,
 				    int state)
 {
 	int res;
@@ -811,9 +821,9 @@ static int snd_pcm_action_nonatomic(struct action_ops *ops,
 /*
  * start callbacks
  */
-static int snd_pcm_pre_start(snd_pcm_substream_t *substream, int state)
+static int snd_pcm_pre_start(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (runtime->status->state != SNDRV_PCM_STATE_PREPARED)
 		return -EBADFD;
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
@@ -823,22 +833,22 @@ static int snd_pcm_pre_start(snd_pcm_substream_t *substream, int state)
 	return 0;
 }
 
-static int snd_pcm_do_start(snd_pcm_substream_t *substream, int state)
+static int snd_pcm_do_start(struct snd_pcm_substream *substream, int state)
 {
 	if (substream->runtime->trigger_master != substream)
 		return 0;
 	return substream->ops->trigger(substream, SNDRV_PCM_TRIGGER_START);
 }
 
-static void snd_pcm_undo_start(snd_pcm_substream_t *substream, int state)
+static void snd_pcm_undo_start(struct snd_pcm_substream *substream, int state)
 {
 	if (substream->runtime->trigger_master == substream)
 		substream->ops->trigger(substream, SNDRV_PCM_TRIGGER_STOP);
 }
 
-static void snd_pcm_post_start(snd_pcm_substream_t *substream, int state)
+static void snd_pcm_post_start(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_trigger_tstamp(substream);
 	runtime->status->state = state;
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
@@ -847,7 +857,8 @@ static void snd_pcm_post_start(snd_pcm_substream_t *substream, int state)
 	if (runtime->sleep_min)
 		snd_pcm_tick_prepare(substream);
 	if (substream->timer)
-		snd_timer_notify(substream->timer, SNDRV_TIMER_EVENT_MSTART, &runtime->trigger_tstamp);
+		snd_timer_notify(substream->timer, SNDRV_TIMER_EVENT_MSTART,
+				 &runtime->trigger_tstamp);
 }
 
 static struct action_ops snd_pcm_action_start = {
@@ -863,24 +874,25 @@ static struct action_ops snd_pcm_action_start = {
  *
  * Start all linked streams.
  */
-int snd_pcm_start(snd_pcm_substream_t *substream)
+int snd_pcm_start(struct snd_pcm_substream *substream)
 {
-	return snd_pcm_action(&snd_pcm_action_start, substream, SNDRV_PCM_STATE_RUNNING);
+	return snd_pcm_action(&snd_pcm_action_start, substream,
+			      SNDRV_PCM_STATE_RUNNING);
 }
 
 /*
  * stop callbacks
  */
-static int snd_pcm_pre_stop(snd_pcm_substream_t *substream, int state)
+static int snd_pcm_pre_stop(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
 		return -EBADFD;
 	runtime->trigger_master = substream;
 	return 0;
 }
 
-static int snd_pcm_do_stop(snd_pcm_substream_t *substream, int state)
+static int snd_pcm_do_stop(struct snd_pcm_substream *substream, int state)
 {
 	if (substream->runtime->trigger_master == substream &&
 	    snd_pcm_running(substream))
@@ -888,13 +900,14 @@ static int snd_pcm_do_stop(snd_pcm_substream_t *substream, int state)
 	return 0; /* unconditonally stop all substreams */
 }
 
-static void snd_pcm_post_stop(snd_pcm_substream_t *substream, int state)
+static void snd_pcm_post_stop(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (runtime->status->state != state) {
 		snd_pcm_trigger_tstamp(substream);
 		if (substream->timer)
-			snd_timer_notify(substream->timer, SNDRV_TIMER_EVENT_MSTOP, &runtime->trigger_tstamp);
+			snd_timer_notify(substream->timer, SNDRV_TIMER_EVENT_MSTOP,
+					 &runtime->trigger_tstamp);
 		runtime->status->state = state;
 		snd_pcm_tick_set(substream, 0);
 	}
@@ -915,7 +928,7 @@ static struct action_ops snd_pcm_action_stop = {
  * Try to stop all running streams in the substream group.
  * The state of each stream is changed to the given value after that unconditionally.
  */
-int snd_pcm_stop(snd_pcm_substream_t *substream, int state)
+int snd_pcm_stop(struct snd_pcm_substream *substream, int state)
 {
 	return snd_pcm_action(&snd_pcm_action_stop, substream, state);
 }
@@ -928,17 +941,18 @@ int snd_pcm_stop(snd_pcm_substream_t *substream, int state)
  * The state is changed to SETUP.
  * Unlike snd_pcm_stop(), this affects only the given stream.
  */
-int snd_pcm_drain_done(snd_pcm_substream_t *substream)
+int snd_pcm_drain_done(struct snd_pcm_substream *substream)
 {
-	return snd_pcm_action_single(&snd_pcm_action_stop, substream, SNDRV_PCM_STATE_SETUP);
+	return snd_pcm_action_single(&snd_pcm_action_stop, substream,
+				     SNDRV_PCM_STATE_SETUP);
 }
 
 /*
  * pause callbacks
  */
-static int snd_pcm_pre_pause(snd_pcm_substream_t *substream, int push)
+static int snd_pcm_pre_pause(struct snd_pcm_substream *substream, int push)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (!(runtime->info & SNDRV_PCM_INFO_PAUSE))
 		return -ENOSYS;
 	if (push) {
@@ -950,7 +964,7 @@ static int snd_pcm_pre_pause(snd_pcm_substream_t *substream, int push)
 	return 0;
 }
 
-static int snd_pcm_do_pause(snd_pcm_substream_t *substream, int push)
+static int snd_pcm_do_pause(struct snd_pcm_substream *substream, int push)
 {
 	if (substream->runtime->trigger_master != substream)
 		return 0;
@@ -959,7 +973,7 @@ static int snd_pcm_do_pause(snd_pcm_substream_t *substream, int push)
 					      SNDRV_PCM_TRIGGER_PAUSE_RELEASE);
 }
 
-static void snd_pcm_undo_pause(snd_pcm_substream_t *substream, int push)
+static void snd_pcm_undo_pause(struct snd_pcm_substream *substream, int push)
 {
 	if (substream->runtime->trigger_master == substream)
 		substream->ops->trigger(substream,
@@ -967,14 +981,16 @@ static void snd_pcm_undo_pause(snd_pcm_substream_t *substream, int push)
 					SNDRV_PCM_TRIGGER_PAUSE_PUSH);
 }
 
-static void snd_pcm_post_pause(snd_pcm_substream_t *substream, int push)
+static void snd_pcm_post_pause(struct snd_pcm_substream *substream, int push)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_trigger_tstamp(substream);
 	if (push) {
 		runtime->status->state = SNDRV_PCM_STATE_PAUSED;
 		if (substream->timer)
-			snd_timer_notify(substream->timer, SNDRV_TIMER_EVENT_MPAUSE, &runtime->trigger_tstamp);
+			snd_timer_notify(substream->timer,
+					 SNDRV_TIMER_EVENT_MPAUSE,
+					 &runtime->trigger_tstamp);
 		snd_pcm_tick_set(substream, 0);
 		wake_up(&runtime->sleep);
 	} else {
@@ -982,7 +998,9 @@ static void snd_pcm_post_pause(snd_pcm_substream_t *substream, int push)
 		if (runtime->sleep_min)
 			snd_pcm_tick_prepare(substream);
 		if (substream->timer)
-			snd_timer_notify(substream->timer, SNDRV_TIMER_EVENT_MCONTINUE, &runtime->trigger_tstamp);
+			snd_timer_notify(substream->timer,
+					 SNDRV_TIMER_EVENT_MCONTINUE,
+					 &runtime->trigger_tstamp);
 	}
 }
 
@@ -996,7 +1014,7 @@ static struct action_ops snd_pcm_action_pause = {
 /*
  * Push/release the pause for all linked streams.
  */
-static int snd_pcm_pause(snd_pcm_substream_t *substream, int push)
+static int snd_pcm_pause(struct snd_pcm_substream *substream, int push)
 {
 	return snd_pcm_action(&snd_pcm_action_pause, substream, push);
 }
@@ -1004,18 +1022,18 @@ static int snd_pcm_pause(snd_pcm_substream_t *substream, int push)
 #ifdef CONFIG_PM
 /* suspend */
 
-static int snd_pcm_pre_suspend(snd_pcm_substream_t *substream, int state)
+static int snd_pcm_pre_suspend(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (runtime->status->state == SNDRV_PCM_STATE_SUSPENDED)
 		return -EBUSY;
 	runtime->trigger_master = substream;
 	return 0;
 }
 
-static int snd_pcm_do_suspend(snd_pcm_substream_t *substream, int state)
+static int snd_pcm_do_suspend(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (runtime->trigger_master != substream)
 		return 0;
 	if (! snd_pcm_running(substream))
@@ -1024,12 +1042,13 @@ static int snd_pcm_do_suspend(snd_pcm_substream_t *substream, int state)
 	return 0; /* suspend unconditionally */
 }
 
-static void snd_pcm_post_suspend(snd_pcm_substream_t *substream, int state)
+static void snd_pcm_post_suspend(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_trigger_tstamp(substream);
 	if (substream->timer)
-		snd_timer_notify(substream->timer, SNDRV_TIMER_EVENT_MSUSPEND, &runtime->trigger_tstamp);
+		snd_timer_notify(substream->timer, SNDRV_TIMER_EVENT_MSUSPEND,
+				 &runtime->trigger_tstamp);
 	runtime->status->suspended_state = runtime->status->state;
 	runtime->status->state = SNDRV_PCM_STATE_SUSPENDED;
 	snd_pcm_tick_set(substream, 0);
@@ -1049,7 +1068,7 @@ static struct action_ops snd_pcm_action_suspend = {
  * Trigger SUSPEND to all linked streams.
  * After this call, all streams are changed to SUSPENDED state.
  */
-int snd_pcm_suspend(snd_pcm_substream_t *substream)
+int snd_pcm_suspend(struct snd_pcm_substream *substream)
 {
 	int err;
 	unsigned long flags;
@@ -1067,13 +1086,14 @@ int snd_pcm_suspend(snd_pcm_substream_t *substream)
  * Trigger SUSPEND to all substreams in the given pcm.
  * After this call, all streams are changed to SUSPENDED state.
  */
-int snd_pcm_suspend_all(snd_pcm_t *pcm)
+int snd_pcm_suspend_all(struct snd_pcm *pcm)
 {
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	int stream, err = 0;
 
 	for (stream = 0; stream < 2; stream++) {
-		for (substream = pcm->streams[stream].substream; substream; substream = substream->next) {
+		for (substream = pcm->streams[stream].substream;
+		     substream; substream = substream->next) {
 			/* FIXME: the open/close code should lock this as well */
 			if (substream->runtime == NULL)
 				continue;
@@ -1087,18 +1107,18 @@ int snd_pcm_suspend_all(snd_pcm_t *pcm)
 
 /* resume */
 
-static int snd_pcm_pre_resume(snd_pcm_substream_t *substream, int state)
+static int snd_pcm_pre_resume(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (!(runtime->info & SNDRV_PCM_INFO_RESUME))
 		return -ENOSYS;
 	runtime->trigger_master = substream;
 	return 0;
 }
 
-static int snd_pcm_do_resume(snd_pcm_substream_t *substream, int state)
+static int snd_pcm_do_resume(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (runtime->trigger_master != substream)
 		return 0;
 	/* DMA not running previously? */
@@ -1109,19 +1129,20 @@ static int snd_pcm_do_resume(snd_pcm_substream_t *substream, int state)
 	return substream->ops->trigger(substream, SNDRV_PCM_TRIGGER_RESUME);
 }
 
-static void snd_pcm_undo_resume(snd_pcm_substream_t *substream, int state)
+static void snd_pcm_undo_resume(struct snd_pcm_substream *substream, int state)
 {
 	if (substream->runtime->trigger_master == substream &&
 	    snd_pcm_running(substream))
 		substream->ops->trigger(substream, SNDRV_PCM_TRIGGER_SUSPEND);
 }
 
-static void snd_pcm_post_resume(snd_pcm_substream_t *substream, int state)
+static void snd_pcm_post_resume(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_trigger_tstamp(substream);
 	if (substream->timer)
-		snd_timer_notify(substream->timer, SNDRV_TIMER_EVENT_MRESUME, &runtime->trigger_tstamp);
+		snd_timer_notify(substream->timer, SNDRV_TIMER_EVENT_MRESUME,
+				 &runtime->trigger_tstamp);
 	runtime->status->state = runtime->status->suspended_state;
 	if (runtime->sleep_min)
 		snd_pcm_tick_prepare(substream);
@@ -1134,9 +1155,9 @@ static struct action_ops snd_pcm_action_resume = {
 	.post_action = snd_pcm_post_resume
 };
 
-static int snd_pcm_resume(snd_pcm_substream_t *substream)
+static int snd_pcm_resume(struct snd_pcm_substream *substream)
 {
-	snd_card_t *card = substream->pcm->card;
+	struct snd_card *card = substream->pcm->card;
 	int res;
 
 	snd_power_lock(card);
@@ -1148,7 +1169,7 @@ static int snd_pcm_resume(snd_pcm_substream_t *substream)
 
 #else
 
-static int snd_pcm_resume(snd_pcm_substream_t *substream)
+static int snd_pcm_resume(struct snd_pcm_substream *substream)
 {
 	return -ENOSYS;
 }
@@ -1160,10 +1181,10 @@ static int snd_pcm_resume(snd_pcm_substream_t *substream)
  *
  * Change the RUNNING stream(s) to XRUN state.
  */
-static int snd_pcm_xrun(snd_pcm_substream_t *substream)
+static int snd_pcm_xrun(struct snd_pcm_substream *substream)
 {
-	snd_card_t *card = substream->pcm->card;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_card *card = substream->pcm->card;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int result;
 
 	snd_power_lock(card);
@@ -1193,9 +1214,9 @@ static int snd_pcm_xrun(snd_pcm_substream_t *substream)
 /*
  * reset ioctl
  */
-static int snd_pcm_pre_reset(snd_pcm_substream_t * substream, int state)
+static int snd_pcm_pre_reset(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	switch (runtime->status->state) {
 	case SNDRV_PCM_STATE_RUNNING:
 	case SNDRV_PCM_STATE_PREPARED:
@@ -1207,23 +1228,24 @@ static int snd_pcm_pre_reset(snd_pcm_substream_t * substream, int state)
 	}
 }
 
-static int snd_pcm_do_reset(snd_pcm_substream_t * substream, int state)
+static int snd_pcm_do_reset(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err = substream->ops->ioctl(substream, SNDRV_PCM_IOCTL1_RESET, NULL);
 	if (err < 0)
 		return err;
 	// snd_assert(runtime->status->hw_ptr < runtime->buffer_size, );
 	runtime->hw_ptr_base = 0;
-	runtime->hw_ptr_interrupt = runtime->status->hw_ptr - runtime->status->hw_ptr % runtime->period_size;
+	runtime->hw_ptr_interrupt = runtime->status->hw_ptr -
+		runtime->status->hw_ptr % runtime->period_size;
 	runtime->silence_start = runtime->status->hw_ptr;
 	runtime->silence_filled = 0;
 	return 0;
 }
 
-static void snd_pcm_post_reset(snd_pcm_substream_t * substream, int state)
+static void snd_pcm_post_reset(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	runtime->control->appl_ptr = runtime->status->hw_ptr;
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
 	    runtime->silence_size > 0)
@@ -1236,7 +1258,7 @@ static struct action_ops snd_pcm_action_reset = {
 	.post_action = snd_pcm_post_reset
 };
 
-static int snd_pcm_reset(snd_pcm_substream_t *substream)
+static int snd_pcm_reset(struct snd_pcm_substream *substream)
 {
 	return snd_pcm_action_nonatomic(&snd_pcm_action_reset, substream, 0);
 }
@@ -1244,9 +1266,9 @@ static int snd_pcm_reset(snd_pcm_substream_t *substream)
 /*
  * prepare ioctl
  */
-static int snd_pcm_pre_prepare(snd_pcm_substream_t * substream, int state)
+static int snd_pcm_pre_prepare(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
 		return -EBADFD;
 	if (snd_pcm_running(substream))
@@ -1254,7 +1276,7 @@ static int snd_pcm_pre_prepare(snd_pcm_substream_t * substream, int state)
 	return 0;
 }
 
-static int snd_pcm_do_prepare(snd_pcm_substream_t * substream, int state)
+static int snd_pcm_do_prepare(struct snd_pcm_substream *substream, int state)
 {
 	int err;
 	err = substream->ops->prepare(substream);
@@ -1263,9 +1285,9 @@ static int snd_pcm_do_prepare(snd_pcm_substream_t * substream, int state)
 	return snd_pcm_do_reset(substream, 0);
 }
 
-static void snd_pcm_post_prepare(snd_pcm_substream_t * substream, int state)
+static void snd_pcm_post_prepare(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	runtime->control->appl_ptr = runtime->status->hw_ptr;
 	runtime->status->state = SNDRV_PCM_STATE_PREPARED;
 }
@@ -1282,10 +1304,10 @@ static struct action_ops snd_pcm_action_prepare = {
  *
  * Prepare the PCM substream to be triggerable.
  */
-int snd_pcm_prepare(snd_pcm_substream_t *substream)
+int snd_pcm_prepare(struct snd_pcm_substream *substream)
 {
 	int res;
-	snd_card_t *card = substream->pcm->card;
+	struct snd_card *card = substream->pcm->card;
 
 	snd_power_lock(card);
 	if ((res = snd_power_wait(card, SNDRV_CTL_POWER_D0, substream->ffile)) >= 0)
@@ -1298,7 +1320,7 @@ int snd_pcm_prepare(snd_pcm_substream_t *substream)
  * drain ioctl
  */
 
-static int snd_pcm_pre_drain_init(snd_pcm_substream_t * substream, int state)
+static int snd_pcm_pre_drain_init(struct snd_pcm_substream *substream, int state)
 {
 	if (substream->ffile->f_flags & O_NONBLOCK)
 		return -EAGAIN;
@@ -1306,9 +1328,9 @@ static int snd_pcm_pre_drain_init(snd_pcm_substream_t * substream, int state)
 	return 0;
 }
 
-static int snd_pcm_do_drain_init(snd_pcm_substream_t * substream, int state)
+static int snd_pcm_do_drain_init(struct snd_pcm_substream *substream, int state)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
 		switch (runtime->status->state) {
 		case SNDRV_PCM_STATE_PREPARED:
@@ -1336,7 +1358,7 @@ static int snd_pcm_do_drain_init(snd_pcm_substream_t * substream, int state)
 	return 0;
 }
 
-static void snd_pcm_post_drain_init(snd_pcm_substream_t * substream, int state)
+static void snd_pcm_post_drain_init(struct snd_pcm_substream *substream, int state)
 {
 }
 
@@ -1347,12 +1369,12 @@ static struct action_ops snd_pcm_action_drain_init = {
 };
 
 struct drain_rec {
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	wait_queue_t wait;
 	snd_pcm_uframes_t stop_threshold;
 };
 
-static int snd_pcm_drop(snd_pcm_substream_t *substream);
+static int snd_pcm_drop(struct snd_pcm_substream *substream);
 
 /*
  * Drain the stream(s).
@@ -1361,10 +1383,10 @@ static int snd_pcm_drop(snd_pcm_substream_t *substream);
  * After this call, all streams are supposed to be either SETUP or DRAINING
  * (capture only) state.
  */
-static int snd_pcm_drain(snd_pcm_substream_t *substream)
+static int snd_pcm_drain(struct snd_pcm_substream *substream)
 {
-	snd_card_t *card;
-	snd_pcm_runtime_t *runtime;
+	struct snd_card *card;
+	struct snd_pcm_runtime *runtime;
 	struct list_head *pos;
 	int result = 0;
 	int i, num_drecs;
@@ -1401,7 +1423,7 @@ static int snd_pcm_drain(snd_pcm_substream_t *substream)
 	/* count only playback streams */
 	num_drecs = 0;
 	snd_pcm_group_for_each(pos, substream) {
-		snd_pcm_substream_t *s = snd_pcm_group_substream_entry(pos);
+		struct snd_pcm_substream *s = snd_pcm_group_substream_entry(pos);
 		runtime = s->runtime;
 		if (s->stream == SNDRV_PCM_STREAM_PLAYBACK) {
 			d = &drec[num_drecs++];
@@ -1487,10 +1509,10 @@ static int snd_pcm_drain(snd_pcm_substream_t *substream)
  *
  * Immediately put all linked substreams into SETUP state.
  */
-static int snd_pcm_drop(snd_pcm_substream_t *substream)
+static int snd_pcm_drop(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime;
-	snd_card_t *card;
+	struct snd_pcm_runtime *runtime;
+	struct snd_card *card;
 	int result = 0;
 	
 	snd_assert(substream != NULL, return -ENXIO);
@@ -1548,12 +1570,12 @@ static struct file *snd_pcm_file_fd(int fd)
 /*
  * PCM link handling
  */
-static int snd_pcm_link(snd_pcm_substream_t *substream, int fd)
+static int snd_pcm_link(struct snd_pcm_substream *substream, int fd)
 {
 	int res = 0;
 	struct file *file;
-	snd_pcm_file_t *pcm_file;
-	snd_pcm_substream_t *substream1;
+	struct snd_pcm_file *pcm_file;
+	struct snd_pcm_substream *substream1;
 
 	file = snd_pcm_file_fd(fd);
 	if (!file)
@@ -1572,7 +1594,7 @@ static int snd_pcm_link(snd_pcm_substream_t *substream, int fd)
 		goto _end;
 	}
 	if (!snd_pcm_stream_linked(substream)) {
-		substream->group = kmalloc(sizeof(snd_pcm_group_t), GFP_ATOMIC);
+		substream->group = kmalloc(sizeof(struct snd_pcm_group), GFP_ATOMIC);
 		if (substream->group == NULL) {
 			res = -ENOMEM;
 			goto _end;
@@ -1592,14 +1614,14 @@ static int snd_pcm_link(snd_pcm_substream_t *substream, int fd)
 	return res;
 }
 
-static void relink_to_local(snd_pcm_substream_t *substream)
+static void relink_to_local(struct snd_pcm_substream *substream)
 {
 	substream->group = &substream->self_group;
 	INIT_LIST_HEAD(&substream->self_group.substreams);
 	list_add_tail(&substream->link_list, &substream->self_group.substreams);
 }
 
-static int snd_pcm_unlink(snd_pcm_substream_t *substream)
+static int snd_pcm_unlink(struct snd_pcm_substream *substream)
 {
 	struct list_head *pos;
 	int res = 0;
@@ -1629,51 +1651,51 @@ static int snd_pcm_unlink(snd_pcm_substream_t *substream)
 /*
  * hw configurator
  */
-static int snd_pcm_hw_rule_mul(snd_pcm_hw_params_t *params,
-			       snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_mul(struct snd_pcm_hw_params *params,
+			       struct snd_pcm_hw_rule *rule)
 {
-	snd_interval_t t;
+	struct snd_interval t;
 	snd_interval_mul(hw_param_interval_c(params, rule->deps[0]),
 		     hw_param_interval_c(params, rule->deps[1]), &t);
 	return snd_interval_refine(hw_param_interval(params, rule->var), &t);
 }
 
-static int snd_pcm_hw_rule_div(snd_pcm_hw_params_t *params,
-			       snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_div(struct snd_pcm_hw_params *params,
+			       struct snd_pcm_hw_rule *rule)
 {
-	snd_interval_t t;
+	struct snd_interval t;
 	snd_interval_div(hw_param_interval_c(params, rule->deps[0]),
 		     hw_param_interval_c(params, rule->deps[1]), &t);
 	return snd_interval_refine(hw_param_interval(params, rule->var), &t);
 }
 
-static int snd_pcm_hw_rule_muldivk(snd_pcm_hw_params_t *params,
-				   snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_muldivk(struct snd_pcm_hw_params *params,
+				   struct snd_pcm_hw_rule *rule)
 {
-	snd_interval_t t;
+	struct snd_interval t;
 	snd_interval_muldivk(hw_param_interval_c(params, rule->deps[0]),
 			 hw_param_interval_c(params, rule->deps[1]),
 			 (unsigned long) rule->private, &t);
 	return snd_interval_refine(hw_param_interval(params, rule->var), &t);
 }
 
-static int snd_pcm_hw_rule_mulkdiv(snd_pcm_hw_params_t *params,
-				   snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_mulkdiv(struct snd_pcm_hw_params *params,
+				   struct snd_pcm_hw_rule *rule)
 {
-	snd_interval_t t;
+	struct snd_interval t;
 	snd_interval_mulkdiv(hw_param_interval_c(params, rule->deps[0]),
 			 (unsigned long) rule->private,
 			 hw_param_interval_c(params, rule->deps[1]), &t);
 	return snd_interval_refine(hw_param_interval(params, rule->var), &t);
 }
 
-static int snd_pcm_hw_rule_format(snd_pcm_hw_params_t *params,
-				  snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_format(struct snd_pcm_hw_params *params,
+				  struct snd_pcm_hw_rule *rule)
 {
 	unsigned int k;
-	snd_interval_t *i = hw_param_interval(params, rule->deps[0]);
-	snd_mask_t m;
-	snd_mask_t *mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
+	struct snd_interval *i = hw_param_interval(params, rule->deps[0]);
+	struct snd_mask m;
+	struct snd_mask *mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
 	snd_mask_any(&m);
 	for (k = 0; k <= SNDRV_PCM_FORMAT_LAST; ++k) {
 		int bits;
@@ -1688,10 +1710,10 @@ static int snd_pcm_hw_rule_format(snd_pcm_hw_params_t *params,
 	return snd_mask_refine(mask, &m);
 }
 
-static int snd_pcm_hw_rule_sample_bits(snd_pcm_hw_params_t *params,
-				       snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_sample_bits(struct snd_pcm_hw_params *params,
+				       struct snd_pcm_hw_rule *rule)
 {
-	snd_interval_t t;
+	struct snd_interval t;
 	unsigned int k;
 	t.min = UINT_MAX;
 	t.max = 0;
@@ -1720,19 +1742,19 @@ static int snd_pcm_hw_rule_sample_bits(snd_pcm_hw_params_t *params,
 static unsigned int rates[] = { 5512, 8000, 11025, 16000, 22050, 32000, 44100,
                                  48000, 64000, 88200, 96000, 176400, 192000 };
 
-static int snd_pcm_hw_rule_rate(snd_pcm_hw_params_t *params,
-				snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_rate(struct snd_pcm_hw_params *params,
+				struct snd_pcm_hw_rule *rule)
 {
-	snd_pcm_hardware_t *hw = rule->private;
+	struct snd_pcm_hardware *hw = rule->private;
 	return snd_interval_list(hw_param_interval(params, rule->var),
 				 ARRAY_SIZE(rates), rates, hw->rates);
 }		
 
-static int snd_pcm_hw_rule_buffer_bytes_max(snd_pcm_hw_params_t *params,
-					    snd_pcm_hw_rule_t *rule)
+static int snd_pcm_hw_rule_buffer_bytes_max(struct snd_pcm_hw_params *params,
+					    struct snd_pcm_hw_rule *rule)
 {
-	snd_interval_t t;
-	snd_pcm_substream_t *substream = rule->private;
+	struct snd_interval t;
+	struct snd_pcm_substream *substream = rule->private;
 	t.min = 0;
 	t.max = substream->buffer_bytes_max;
 	t.openmin = 0;
@@ -1741,10 +1763,10 @@ static int snd_pcm_hw_rule_buffer_bytes_max(snd_pcm_hw_params_t *params,
 	return snd_interval_refine(hw_param_interval(params, rule->var), &t);
 }		
 
-int snd_pcm_hw_constraints_init(snd_pcm_substream_t *substream)
+int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_pcm_hw_constraints_t *constrs = &runtime->hw_constraints;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_pcm_hw_constraints *constrs = &runtime->hw_constraints;
 	int k, err;
 
 	for (k = SNDRV_PCM_HW_PARAM_FIRST_MASK; k <= SNDRV_PCM_HW_PARAM_LAST_MASK; k++) {
@@ -1865,10 +1887,10 @@ int snd_pcm_hw_constraints_init(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-int snd_pcm_hw_constraints_complete(snd_pcm_substream_t *substream)
+int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_pcm_hardware_t *hw = &runtime->hw;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_pcm_hardware *hw = &runtime->hw;
 	int err;
 	unsigned int mask = 0;
 
@@ -1941,17 +1963,17 @@ int snd_pcm_hw_constraints_complete(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-static void snd_pcm_add_file(snd_pcm_str_t *str,
-			     snd_pcm_file_t *pcm_file)
+static void snd_pcm_add_file(struct snd_pcm_str *str,
+			     struct snd_pcm_file *pcm_file)
 {
 	pcm_file->next = str->files;
 	str->files = pcm_file;
 }
 
-static void snd_pcm_remove_file(snd_pcm_str_t *str,
-				snd_pcm_file_t *pcm_file)
+static void snd_pcm_remove_file(struct snd_pcm_str *str,
+				struct snd_pcm_file *pcm_file)
 {
-	snd_pcm_file_t * pcm_file1;
+	struct snd_pcm_file * pcm_file1;
 	if (str->files == pcm_file) {
 		str->files = pcm_file->next;
 	} else {
@@ -1963,11 +1985,11 @@ static void snd_pcm_remove_file(snd_pcm_str_t *str,
 	}
 }
 
-static int snd_pcm_release_file(snd_pcm_file_t * pcm_file)
+static int snd_pcm_release_file(struct snd_pcm_file * pcm_file)
 {
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
-	snd_pcm_str_t * str;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
+	struct snd_pcm_str * str;
 
 	snd_assert(pcm_file != NULL, return -ENXIO);
 	substream = pcm_file->substream;
@@ -1988,14 +2010,14 @@ static int snd_pcm_release_file(snd_pcm_file_t * pcm_file)
 }
 
 static int snd_pcm_open_file(struct file *file,
-			     snd_pcm_t *pcm,
+			     struct snd_pcm *pcm,
 			     int stream,
-			     snd_pcm_file_t **rpcm_file)
+			     struct snd_pcm_file **rpcm_file)
 {
 	int err = 0;
-	snd_pcm_file_t *pcm_file;
-	snd_pcm_substream_t *substream;
-	snd_pcm_str_t *str;
+	struct snd_pcm_file *pcm_file;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_str *str;
 
 	snd_assert(rpcm_file != NULL, return -EINVAL);
 	*rpcm_file = NULL;
@@ -2048,8 +2070,8 @@ static int snd_pcm_open(struct inode *inode, struct file *file)
 	int cardnum = SNDRV_MINOR_CARD(iminor(inode));
 	int device = SNDRV_MINOR_DEVICE(iminor(inode));
 	int err;
-	snd_pcm_t *pcm;
-	snd_pcm_file_t *pcm_file;
+	struct snd_pcm *pcm;
+	struct snd_pcm_file *pcm_file;
 	wait_queue_t wait;
 
 	if (device < SNDRV_MINOR_PCM_PLAYBACK || device >= SNDRV_MINOR_DEVICES)
@@ -2105,9 +2127,9 @@ static int snd_pcm_open(struct inode *inode, struct file *file)
 
 static int snd_pcm_release(struct inode *inode, struct file *file)
 {
-	snd_pcm_t *pcm;
-	snd_pcm_substream_t *substream;
-	snd_pcm_file_t *pcm_file;
+	struct snd_pcm *pcm;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_file *pcm_file;
 
 	pcm_file = file->private_data;
 	substream = pcm_file->substream;
@@ -2125,9 +2147,10 @@ static int snd_pcm_release(struct inode *inode, struct file *file)
 	return 0;
 }
 
-static snd_pcm_sframes_t snd_pcm_playback_rewind(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t snd_pcm_playback_rewind(struct snd_pcm_substream *substream,
+						 snd_pcm_uframes_t frames)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_sframes_t appl_ptr;
 	snd_pcm_sframes_t ret;
 	snd_pcm_sframes_t hw_avail;
@@ -2174,9 +2197,10 @@ static snd_pcm_sframes_t snd_pcm_playback_rewind(snd_pcm_substream_t *substream,
 	return ret;
 }
 
-static snd_pcm_sframes_t snd_pcm_capture_rewind(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t snd_pcm_capture_rewind(struct snd_pcm_substream *substream,
+						snd_pcm_uframes_t frames)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_sframes_t appl_ptr;
 	snd_pcm_sframes_t ret;
 	snd_pcm_sframes_t hw_avail;
@@ -2223,9 +2247,10 @@ static snd_pcm_sframes_t snd_pcm_capture_rewind(snd_pcm_substream_t *substream,
 	return ret;
 }
 
-static snd_pcm_sframes_t snd_pcm_playback_forward(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t snd_pcm_playback_forward(struct snd_pcm_substream *substream,
+						  snd_pcm_uframes_t frames)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_sframes_t appl_ptr;
 	snd_pcm_sframes_t ret;
 	snd_pcm_sframes_t avail;
@@ -2273,9 +2298,10 @@ static snd_pcm_sframes_t snd_pcm_playback_forward(snd_pcm_substream_t *substream
 	return ret;
 }
 
-static snd_pcm_sframes_t snd_pcm_capture_forward(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t snd_pcm_capture_forward(struct snd_pcm_substream *substream,
+						 snd_pcm_uframes_t frames)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_sframes_t appl_ptr;
 	snd_pcm_sframes_t ret;
 	snd_pcm_sframes_t avail;
@@ -2323,9 +2349,9 @@ static snd_pcm_sframes_t snd_pcm_capture_forward(snd_pcm_substream_t *substream,
 	return ret;
 }
 
-static int snd_pcm_hwsync(snd_pcm_substream_t *substream)
+static int snd_pcm_hwsync(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 
 	snd_pcm_stream_lock_irq(substream);
@@ -2353,9 +2379,10 @@ static int snd_pcm_hwsync(snd_pcm_substream_t *substream)
 	return err;
 }
 		
-static int snd_pcm_delay(snd_pcm_substream_t *substream, snd_pcm_sframes_t __user *res)
+static int snd_pcm_delay(struct snd_pcm_substream *substream,
+			 snd_pcm_sframes_t __user *res)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 	snd_pcm_sframes_t n = 0;
 
@@ -2391,18 +2418,19 @@ static int snd_pcm_delay(snd_pcm_substream_t *substream, snd_pcm_sframes_t __use
 	return err;
 }
 		
-static int snd_pcm_sync_ptr(snd_pcm_substream_t *substream, struct sndrv_pcm_sync_ptr __user *_sync_ptr)
+static int snd_pcm_sync_ptr(struct snd_pcm_substream *substream,
+			    struct snd_pcm_sync_ptr __user *_sync_ptr)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	struct sndrv_pcm_sync_ptr sync_ptr;
-	volatile struct sndrv_pcm_mmap_status *status;
-	volatile struct sndrv_pcm_mmap_control *control;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_pcm_sync_ptr sync_ptr;
+	volatile struct snd_pcm_mmap_status *status;
+	volatile struct snd_pcm_mmap_control *control;
 	int err;
 
 	memset(&sync_ptr, 0, sizeof(sync_ptr));
 	if (get_user(sync_ptr.flags, (unsigned __user *)&(_sync_ptr->flags)))
 		return -EFAULT;
-	if (copy_from_user(&sync_ptr.c.control, &(_sync_ptr->c.control), sizeof(struct sndrv_pcm_mmap_control)))
+	if (copy_from_user(&sync_ptr.c.control, &(_sync_ptr->c.control), sizeof(struct snd_pcm_mmap_control)))
 		return -EFAULT;	
 	status = runtime->status;
 	control = runtime->control;
@@ -2430,12 +2458,12 @@ static int snd_pcm_sync_ptr(snd_pcm_substream_t *substream, struct sndrv_pcm_syn
 	return 0;
 }
 		
-static int snd_pcm_playback_ioctl1(snd_pcm_substream_t *substream,
+static int snd_pcm_playback_ioctl1(struct snd_pcm_substream *substream,
 				   unsigned int cmd, void __user *arg);
-static int snd_pcm_capture_ioctl1(snd_pcm_substream_t *substream,
+static int snd_pcm_capture_ioctl1(struct snd_pcm_substream *substream,
 				  unsigned int cmd, void __user *arg);
 
-static int snd_pcm_common_ioctl1(snd_pcm_substream_t *substream,
+static int snd_pcm_common_ioctl1(struct snd_pcm_substream *substream,
 				 unsigned int cmd, void __user *arg)
 {
 	snd_assert(substream != NULL, return -ENXIO);
@@ -2492,7 +2520,7 @@ static int snd_pcm_common_ioctl1(snd_pcm_substream_t *substream,
 	return -ENOTTY;
 }
 
-static int snd_pcm_playback_ioctl1(snd_pcm_substream_t *substream,
+static int snd_pcm_playback_ioctl1(struct snd_pcm_substream *substream,
 				   unsigned int cmd, void __user *arg)
 {
 	snd_assert(substream != NULL, return -ENXIO);
@@ -2500,9 +2528,9 @@ static int snd_pcm_playback_ioctl1(snd_pcm_substream_t *substream,
 	switch (cmd) {
 	case SNDRV_PCM_IOCTL_WRITEI_FRAMES:
 	{
-		snd_xferi_t xferi;
-		snd_xferi_t __user *_xferi = arg;
-		snd_pcm_runtime_t *runtime = substream->runtime;
+		struct snd_xferi xferi;
+		struct snd_xferi __user *_xferi = arg;
+		struct snd_pcm_runtime *runtime = substream->runtime;
 		snd_pcm_sframes_t result;
 		if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
 			return -EBADFD;
@@ -2516,9 +2544,9 @@ static int snd_pcm_playback_ioctl1(snd_pcm_substream_t *substream,
 	}
 	case SNDRV_PCM_IOCTL_WRITEN_FRAMES:
 	{
-		snd_xfern_t xfern;
-		snd_xfern_t __user *_xfern = arg;
-		snd_pcm_runtime_t *runtime = substream->runtime;
+		struct snd_xfern xfern;
+		struct snd_xfern __user *_xfern = arg;
+		struct snd_pcm_runtime *runtime = substream->runtime;
 		void __user **bufs;
 		snd_pcm_sframes_t result;
 		if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
@@ -2579,7 +2607,7 @@ static int snd_pcm_playback_ioctl1(snd_pcm_substream_t *substream,
 	return snd_pcm_common_ioctl1(substream, cmd, arg);
 }
 
-static int snd_pcm_capture_ioctl1(snd_pcm_substream_t *substream,
+static int snd_pcm_capture_ioctl1(struct snd_pcm_substream *substream,
 				  unsigned int cmd, void __user *arg)
 {
 	snd_assert(substream != NULL, return -ENXIO);
@@ -2587,9 +2615,9 @@ static int snd_pcm_capture_ioctl1(snd_pcm_substream_t *substream,
 	switch (cmd) {
 	case SNDRV_PCM_IOCTL_READI_FRAMES:
 	{
-		snd_xferi_t xferi;
-		snd_xferi_t __user *_xferi = arg;
-		snd_pcm_runtime_t *runtime = substream->runtime;
+		struct snd_xferi xferi;
+		struct snd_xferi __user *_xferi = arg;
+		struct snd_pcm_runtime *runtime = substream->runtime;
 		snd_pcm_sframes_t result;
 		if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
 			return -EBADFD;
@@ -2603,9 +2631,9 @@ static int snd_pcm_capture_ioctl1(snd_pcm_substream_t *substream,
 	}
 	case SNDRV_PCM_IOCTL_READN_FRAMES:
 	{
-		snd_xfern_t xfern;
-		snd_xfern_t __user *_xfern = arg;
-		snd_pcm_runtime_t *runtime = substream->runtime;
+		struct snd_xfern xfern;
+		struct snd_xfern __user *_xfern = arg;
+		struct snd_pcm_runtime *runtime = substream->runtime;
 		void *bufs;
 		snd_pcm_sframes_t result;
 		if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
@@ -2658,9 +2686,10 @@ static int snd_pcm_capture_ioctl1(snd_pcm_substream_t *substream,
 	return snd_pcm_common_ioctl1(substream, cmd, arg);
 }
 
-static long snd_pcm_playback_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+static long snd_pcm_playback_ioctl(struct file *file, unsigned int cmd,
+				   unsigned long arg)
 {
-	snd_pcm_file_t *pcm_file;
+	struct snd_pcm_file *pcm_file;
 
 	pcm_file = file->private_data;
 
@@ -2670,9 +2699,10 @@ static long snd_pcm_playback_ioctl(struct file *file, unsigned int cmd, unsigned
 	return snd_pcm_playback_ioctl1(pcm_file->substream, cmd, (void __user *)arg);
 }
 
-static long snd_pcm_capture_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+static long snd_pcm_capture_ioctl(struct file *file, unsigned int cmd,
+				  unsigned long arg)
 {
-	snd_pcm_file_t *pcm_file;
+	struct snd_pcm_file *pcm_file;
 
 	pcm_file = file->private_data;
 
@@ -2682,7 +2712,7 @@ static long snd_pcm_capture_ioctl(struct file *file, unsigned int cmd, unsigned
 	return snd_pcm_capture_ioctl1(pcm_file->substream, cmd, (void __user *)arg);
 }
 
-int snd_pcm_kernel_playback_ioctl(snd_pcm_substream_t *substream,
+int snd_pcm_kernel_playback_ioctl(struct snd_pcm_substream *substream,
 				  unsigned int cmd, void *arg)
 {
 	mm_segment_t fs;
@@ -2694,7 +2724,7 @@ int snd_pcm_kernel_playback_ioctl(snd_pcm_substream_t *substream,
 	return result;
 }
 
-int snd_pcm_kernel_capture_ioctl(snd_pcm_substream_t *substream,
+int snd_pcm_kernel_capture_ioctl(struct snd_pcm_substream *substream,
 				 unsigned int cmd, void *arg)
 {
 	mm_segment_t fs;
@@ -2706,7 +2736,7 @@ int snd_pcm_kernel_capture_ioctl(snd_pcm_substream_t *substream,
 	return result;
 }
 
-int snd_pcm_kernel_ioctl(snd_pcm_substream_t *substream,
+int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream,
 			 unsigned int cmd, void *arg)
 {
 	switch (substream->stream) {
@@ -2719,11 +2749,12 @@ int snd_pcm_kernel_ioctl(snd_pcm_substream_t *substream,
 	}
 }
 
-static ssize_t snd_pcm_read(struct file *file, char __user *buf, size_t count, loff_t * offset)
+static ssize_t snd_pcm_read(struct file *file, char __user *buf, size_t count,
+			    loff_t * offset)
 {
-	snd_pcm_file_t *pcm_file;
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_file *pcm_file;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
 	snd_pcm_sframes_t result;
 
 	pcm_file = file->private_data;
@@ -2741,11 +2772,12 @@ static ssize_t snd_pcm_read(struct file *file, char __user *buf, size_t count, l
 	return result;
 }
 
-static ssize_t snd_pcm_write(struct file *file, const char __user *buf, size_t count, loff_t * offset)
+static ssize_t snd_pcm_write(struct file *file, const char __user *buf,
+			     size_t count, loff_t * offset)
 {
-	snd_pcm_file_t *pcm_file;
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_file *pcm_file;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
 	snd_pcm_sframes_t result;
 
 	pcm_file = file->private_data;
@@ -2772,9 +2804,9 @@ static ssize_t snd_pcm_readv(struct file *file, const struct iovec *_vector,
 			     unsigned long count, loff_t * offset)
 
 {
-	snd_pcm_file_t *pcm_file;
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_file *pcm_file;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
 	snd_pcm_sframes_t result;
 	unsigned long i;
 	void __user **bufs;
@@ -2806,9 +2838,9 @@ static ssize_t snd_pcm_readv(struct file *file, const struct iovec *_vector,
 static ssize_t snd_pcm_writev(struct file *file, const struct iovec *_vector,
 			      unsigned long count, loff_t * offset)
 {
-	snd_pcm_file_t *pcm_file;
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_file *pcm_file;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
 	snd_pcm_sframes_t result;
 	unsigned long i;
 	void __user **bufs;
@@ -2843,9 +2875,9 @@ static ssize_t snd_pcm_writev(struct file *file, const struct iovec *_vector,
 
 static unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait)
 {
-	snd_pcm_file_t *pcm_file;
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_file *pcm_file;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
         unsigned int mask;
 	snd_pcm_uframes_t avail;
 
@@ -2881,9 +2913,9 @@ static unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait)
 
 static unsigned int snd_pcm_capture_poll(struct file *file, poll_table * wait)
 {
-	snd_pcm_file_t *pcm_file;
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_file *pcm_file;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
         unsigned int mask;
 	snd_pcm_uframes_t avail;
 
@@ -2933,10 +2965,11 @@ static unsigned int snd_pcm_capture_poll(struct file *file, poll_table * wait)
 /*
  * mmap status record
  */
-static struct page * snd_pcm_mmap_status_nopage(struct vm_area_struct *area, unsigned long address, int *type)
+static struct page * snd_pcm_mmap_status_nopage(struct vm_area_struct *area,
+						unsigned long address, int *type)
 {
-	snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_substream *substream = area->vm_private_data;
+	struct snd_pcm_runtime *runtime;
 	struct page * page;
 	
 	if (substream == NULL)
@@ -2954,17 +2987,17 @@ static struct vm_operations_struct snd_pcm_vm_ops_status =
 	.nopage =	snd_pcm_mmap_status_nopage,
 };
 
-static int snd_pcm_mmap_status(snd_pcm_substream_t *substream, struct file *file,
+static int snd_pcm_mmap_status(struct snd_pcm_substream *substream, struct file *file,
 			       struct vm_area_struct *area)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	long size;
 	if (!(area->vm_flags & VM_READ))
 		return -EINVAL;
 	runtime = substream->runtime;
 	snd_assert(runtime != NULL, return -EAGAIN);
 	size = area->vm_end - area->vm_start;
-	if (size != PAGE_ALIGN(sizeof(snd_pcm_mmap_status_t)))
+	if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_status)))
 		return -EINVAL;
 	area->vm_ops = &snd_pcm_vm_ops_status;
 	area->vm_private_data = substream;
@@ -2975,10 +3008,11 @@ static int snd_pcm_mmap_status(snd_pcm_substream_t *substream, struct file *file
 /*
  * mmap control record
  */
-static struct page * snd_pcm_mmap_control_nopage(struct vm_area_struct *area, unsigned long address, int *type)
+static struct page * snd_pcm_mmap_control_nopage(struct vm_area_struct *area,
+						 unsigned long address, int *type)
 {
-	snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_substream *substream = area->vm_private_data;
+	struct snd_pcm_runtime *runtime;
 	struct page * page;
 	
 	if (substream == NULL)
@@ -2996,17 +3030,17 @@ static struct vm_operations_struct snd_pcm_vm_ops_control =
 	.nopage =	snd_pcm_mmap_control_nopage,
 };
 
-static int snd_pcm_mmap_control(snd_pcm_substream_t *substream, struct file *file,
+static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file *file,
 				struct vm_area_struct *area)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	long size;
 	if (!(area->vm_flags & VM_READ))
 		return -EINVAL;
 	runtime = substream->runtime;
 	snd_assert(runtime != NULL, return -EAGAIN);
 	size = area->vm_end - area->vm_start;
-	if (size != PAGE_ALIGN(sizeof(snd_pcm_mmap_control_t)))
+	if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control)))
 		return -EINVAL;
 	area->vm_ops = &snd_pcm_vm_ops_control;
 	area->vm_private_data = substream;
@@ -3017,12 +3051,12 @@ static int snd_pcm_mmap_control(snd_pcm_substream_t *substream, struct file *fil
 /*
  * don't support mmap for status and control records.
  */
-static int snd_pcm_mmap_status(snd_pcm_substream_t *substream, struct file *file,
+static int snd_pcm_mmap_status(struct snd_pcm_substream *substream, struct file *file,
 			       struct vm_area_struct *area)
 {
 	return -ENXIO;
 }
-static int snd_pcm_mmap_control(snd_pcm_substream_t *substream, struct file *file,
+static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file *file,
 				struct vm_area_struct *area)
 {
 	return -ENXIO;
@@ -3032,10 +3066,11 @@ static int snd_pcm_mmap_control(snd_pcm_substream_t *substream, struct file *fil
 /*
  * nopage callback for mmapping a RAM page
  */
-static struct page *snd_pcm_mmap_data_nopage(struct vm_area_struct *area, unsigned long address, int *type)
+static struct page *snd_pcm_mmap_data_nopage(struct vm_area_struct *area,
+					     unsigned long address, int *type)
 {
-	snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_substream *substream = area->vm_private_data;
+	struct snd_pcm_runtime *runtime;
 	unsigned long offset;
 	struct page * page;
 	void *vaddr;
@@ -3074,7 +3109,8 @@ static struct vm_operations_struct snd_pcm_vm_ops_data =
 /*
  * mmap the DMA buffer on RAM
  */
-static int snd_pcm_default_mmap(snd_pcm_substream_t *substream, struct vm_area_struct *area)
+static int snd_pcm_default_mmap(struct snd_pcm_substream *substream,
+				struct vm_area_struct *area)
 {
 	area->vm_ops = &snd_pcm_vm_ops_data;
 	area->vm_private_data = substream;
@@ -3093,7 +3129,8 @@ static struct vm_operations_struct snd_pcm_vm_ops_data_mmio =
 	.close =	snd_pcm_mmap_data_close,
 };
 
-int snd_pcm_lib_mmap_iomem(snd_pcm_substream_t *substream, struct vm_area_struct *area)
+int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream,
+			   struct vm_area_struct *area)
 {
 	long size;
 	unsigned long offset;
@@ -3118,10 +3155,10 @@ int snd_pcm_lib_mmap_iomem(snd_pcm_substream_t *substream, struct vm_area_struct
 /*
  * mmap DMA buffer
  */
-int snd_pcm_mmap_data(snd_pcm_substream_t *substream, struct file *file,
+int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file,
 		      struct vm_area_struct *area)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	long size;
 	unsigned long offset;
 	size_t dma_bytes;
@@ -3158,8 +3195,8 @@ int snd_pcm_mmap_data(snd_pcm_substream_t *substream, struct file *file,
 
 static int snd_pcm_mmap(struct file *file, struct vm_area_struct *area)
 {
-	snd_pcm_file_t * pcm_file;
-	snd_pcm_substream_t *substream;	
+	struct snd_pcm_file * pcm_file;
+	struct snd_pcm_substream *substream;	
 	unsigned long offset;
 	
 	pcm_file = file->private_data;
@@ -3184,9 +3221,9 @@ static int snd_pcm_mmap(struct file *file, struct vm_area_struct *area)
 
 static int snd_pcm_fasync(int fd, struct file * file, int on)
 {
-	snd_pcm_file_t * pcm_file;
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_file * pcm_file;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
 	int err;
 
 	pcm_file = file->private_data;
@@ -3216,7 +3253,8 @@ static int snd_pcm_fasync(int fd, struct file * file, int on)
 #define __OLD_TO_NEW_MASK(x) ((x&7)|((x&0x07fffff8)<<5))
 #define __NEW_TO_OLD_MASK(x) ((x&7)|((x&0xffffff00)>>5))
 
-static void snd_pcm_hw_convert_from_old_params(snd_pcm_hw_params_t *params, struct sndrv_pcm_hw_params_old *oparams)
+static void snd_pcm_hw_convert_from_old_params(struct snd_pcm_hw_params *params,
+					       struct snd_pcm_hw_params_old *oparams)
 {
 	unsigned int i;
 
@@ -3234,7 +3272,8 @@ static void snd_pcm_hw_convert_from_old_params(snd_pcm_hw_params_t *params, stru
 	params->fifo_size = oparams->fifo_size;
 }
 
-static void snd_pcm_hw_convert_to_old_params(struct sndrv_pcm_hw_params_old *oparams, snd_pcm_hw_params_t *params)
+static void snd_pcm_hw_convert_to_old_params(struct snd_pcm_hw_params_old *oparams,
+					     struct snd_pcm_hw_params *params)
 {
 	unsigned int i;
 
@@ -3252,10 +3291,11 @@ static void snd_pcm_hw_convert_to_old_params(struct sndrv_pcm_hw_params_old *opa
 	oparams->fifo_size = params->fifo_size;
 }
 
-static int snd_pcm_hw_refine_old_user(snd_pcm_substream_t * substream, struct sndrv_pcm_hw_params_old __user * _oparams)
+static int snd_pcm_hw_refine_old_user(struct snd_pcm_substream *substream,
+				      struct snd_pcm_hw_params_old __user * _oparams)
 {
-	snd_pcm_hw_params_t *params;
-	struct sndrv_pcm_hw_params_old *oparams = NULL;
+	struct snd_pcm_hw_params *params;
+	struct snd_pcm_hw_params_old *oparams = NULL;
 	int err;
 
 	params = kmalloc(sizeof(*params), GFP_KERNEL);
@@ -3286,10 +3326,11 @@ out:
 	return err;
 }
 
-static int snd_pcm_hw_params_old_user(snd_pcm_substream_t * substream, struct sndrv_pcm_hw_params_old __user * _oparams)
+static int snd_pcm_hw_params_old_user(struct snd_pcm_substream *substream,
+				      struct snd_pcm_hw_params_old __user * _oparams)
 {
-	snd_pcm_hw_params_t *params;
-	struct sndrv_pcm_hw_params_old *oparams = NULL;
+	struct snd_pcm_hw_params *params;
+	struct snd_pcm_hw_params_old *oparams = NULL;
 	int err;
 
 	params = kmalloc(sizeof(*params), GFP_KERNEL);
@@ -3349,7 +3390,7 @@ static struct file_operations snd_pcm_f_ops_capture = {
 	.fasync =	snd_pcm_fasync,
 };
 
-snd_minor_t snd_pcm_reg[2] =
+struct snd_minor snd_pcm_reg[2] =
 {
 	{
 		.comment =	"digital audio playback",
diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c
index 884eaea31fe..d94ed16d21e 100644
--- a/sound/core/pcm_timer.c
+++ b/sound/core/pcm_timer.c
@@ -45,10 +45,10 @@ static unsigned long gcd(unsigned long a, unsigned long b)
 	return b;
 }
 
-void snd_pcm_timer_resolution_change(snd_pcm_substream_t *substream)
+void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream)
 {
 	unsigned long rate, mult, fsize, l, post;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	
         mult = 1000000000;
 	rate = runtime->rate;
@@ -74,18 +74,18 @@ void snd_pcm_timer_resolution_change(snd_pcm_substream_t *substream)
 	runtime->timer_resolution = (mult * fsize / rate) * post;
 }
 
-static unsigned long snd_pcm_timer_resolution(snd_timer_t * timer)
+static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer)
 {
-	snd_pcm_substream_t * substream;
+	struct snd_pcm_substream *substream;
 	
 	substream = timer->private_data;
 	return substream->runtime ? substream->runtime->timer_resolution : 0;
 }
 
-static int snd_pcm_timer_start(snd_timer_t * timer)
+static int snd_pcm_timer_start(struct snd_timer * timer)
 {
 	unsigned long flags;
-	snd_pcm_substream_t * substream;
+	struct snd_pcm_substream *substream;
 	
 	substream = snd_timer_chip(timer);
 	spin_lock_irqsave(&substream->timer_lock, flags);
@@ -94,10 +94,10 @@ static int snd_pcm_timer_start(snd_timer_t * timer)
 	return 0;
 }
 
-static int snd_pcm_timer_stop(snd_timer_t * timer)
+static int snd_pcm_timer_stop(struct snd_timer * timer)
 {
 	unsigned long flags;
-	snd_pcm_substream_t * substream;
+	struct snd_pcm_substream *substream;
 	
 	substream = snd_timer_chip(timer);
 	spin_lock_irqsave(&substream->timer_lock, flags);
@@ -106,7 +106,7 @@ static int snd_pcm_timer_stop(snd_timer_t * timer)
 	return 0;
 }
 
-static struct _snd_timer_hardware snd_pcm_timer =
+static struct snd_timer_hardware snd_pcm_timer =
 {
 	.flags =	SNDRV_TIMER_HW_AUTO | SNDRV_TIMER_HW_SLAVE,
 	.resolution =	0,
@@ -120,16 +120,16 @@ static struct _snd_timer_hardware snd_pcm_timer =
  *  Init functions
  */
 
-static void snd_pcm_timer_free(snd_timer_t *timer)
+static void snd_pcm_timer_free(struct snd_timer *timer)
 {
-	snd_pcm_substream_t *substream = timer->private_data;
+	struct snd_pcm_substream *substream = timer->private_data;
 	substream->timer = NULL;
 }
 
-void snd_pcm_timer_init(snd_pcm_substream_t *substream)
+void snd_pcm_timer_init(struct snd_pcm_substream *substream)
 {
-	snd_timer_id_t tid;
-	snd_timer_t *timer;
+	struct snd_timer_id tid;
+	struct snd_timer *timer;
 	
 	tid.dev_sclass = SNDRV_TIMER_SCLASS_NONE;
 	tid.dev_class = SNDRV_TIMER_CLASS_PCM;
@@ -152,7 +152,7 @@ void snd_pcm_timer_init(snd_pcm_substream_t *substream)
 	substream->timer = timer;
 }
 
-void snd_pcm_timer_done(snd_pcm_substream_t *substream)
+void snd_pcm_timer_done(struct snd_pcm_substream *substream)
 {
 	if (substream->timer) {
 		snd_device_free(substream->pcm->card, substream->timer);
-- 
cgit v1.2.3-70-g09d2


From f956b4a3ae790e1bdde865ac42dd1b99b64a6256 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:01:22 +0100
Subject: [ALSA] Remove xxx_t typedefs: Mixer OSS-emulation

Modules: ALSA<-OSS emulation

Remove xxx_t typedefs from the core mixer OSS-emulation codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/mixer_oss.h  |  54 +++++-----
 sound/core/oss/mixer_oss.c | 240 ++++++++++++++++++++++-----------------------
 2 files changed, 148 insertions(+), 146 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/mixer_oss.h b/include/sound/mixer_oss.h
index ed75b2fb00a..ca5b4822b62 100644
--- a/include/sound/mixer_oss.h
+++ b/include/sound/mixer_oss.h
@@ -24,51 +24,53 @@
 
 #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
 
-typedef struct _snd_oss_mixer_slot snd_mixer_oss_slot_t;
-typedef struct _snd_oss_file snd_mixer_oss_file_t;
-
-typedef int (*snd_mixer_oss_get_volume_t)(snd_mixer_oss_file_t *fmixer, snd_mixer_oss_slot_t *chn, int *left, int *right);
-typedef int (*snd_mixer_oss_put_volume_t)(snd_mixer_oss_file_t *fmixer, snd_mixer_oss_slot_t *chn, int left, int right);
-typedef int (*snd_mixer_oss_get_recsrc_t)(snd_mixer_oss_file_t *fmixer, snd_mixer_oss_slot_t *chn, int *active);
-typedef int (*snd_mixer_oss_put_recsrc_t)(snd_mixer_oss_file_t *fmixer, snd_mixer_oss_slot_t *chn, int active);
-typedef int (*snd_mixer_oss_get_recsrce_t)(snd_mixer_oss_file_t *fmixer, unsigned int *active_index);
-typedef int (*snd_mixer_oss_put_recsrce_t)(snd_mixer_oss_file_t *fmixer, unsigned int active_index);
-
 #define SNDRV_OSS_MAX_MIXERS	32
 
-struct _snd_oss_mixer_slot {
+struct snd_mixer_oss_file;
+
+struct snd_mixer_oss_slot {
 	int number;
 	unsigned int stereo: 1;
-	snd_mixer_oss_get_volume_t get_volume;
-	snd_mixer_oss_put_volume_t put_volume;
-	snd_mixer_oss_get_recsrc_t get_recsrc;
-	snd_mixer_oss_put_recsrc_t put_recsrc;
+	int (*get_volume)(struct snd_mixer_oss_file *fmixer,
+			  struct snd_mixer_oss_slot *chn,
+			  int *left, int *right);
+	int (*put_volume)(struct snd_mixer_oss_file *fmixer,
+			  struct snd_mixer_oss_slot *chn,
+			  int left, int right);
+	int (*get_recsrc)(struct snd_mixer_oss_file *fmixer,
+			  struct snd_mixer_oss_slot *chn,
+			  int *active);
+	int (*put_recsrc)(struct snd_mixer_oss_file *fmixer,
+			  struct snd_mixer_oss_slot *chn,
+			  int active);
 	unsigned long private_value;
 	void *private_data;
-	void (*private_free)(snd_mixer_oss_slot_t *slot);
+	void (*private_free)(struct snd_mixer_oss_slot *slot);
 	int volume[2];
 };
 
-struct _snd_oss_mixer {
-	snd_card_t *card;
+struct snd_mixer_oss {
+	struct snd_card *card;
 	char id[16];
 	char name[32];
-	snd_mixer_oss_slot_t slots[SNDRV_OSS_MAX_MIXERS]; /* OSS mixer slots */
+	struct snd_mixer_oss_slot slots[SNDRV_OSS_MAX_MIXERS]; /* OSS mixer slots */
 	unsigned int mask_recsrc;		/* exclusive recsrc mask */
-	snd_mixer_oss_get_recsrce_t get_recsrc;
-	snd_mixer_oss_put_recsrce_t put_recsrc;
+	int (*get_recsrc)(struct snd_mixer_oss_file *fmixer,
+			  unsigned int *active_index);
+	int (*put_recsrc)(struct snd_mixer_oss_file *fmixer,
+			  unsigned int active_index);
 	void *private_data_recsrc;
-	void (*private_free_recsrc)(snd_mixer_oss_t *mixer);
+	void (*private_free_recsrc)(struct snd_mixer_oss *mixer);
 	struct semaphore reg_mutex;
-	snd_info_entry_t *proc_entry;
+	struct snd_info_entry *proc_entry;
 	int oss_dev_alloc;
 	/* --- */
 	int oss_recsrc;
 };
 
-struct _snd_oss_file {
-	snd_card_t *card;
-	snd_mixer_oss_t *mixer;
+struct snd_mixer_oss_file {
+	struct snd_card *card;
+	struct snd_mixer_oss *mixer;
 };
 
 #endif /* CONFIG_SND_MIXER_OSS */
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index 214933cf5d4..e448002ca7b 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -42,8 +42,8 @@ MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MIXER);
 static int snd_mixer_oss_open(struct inode *inode, struct file *file)
 {
 	int cardnum = SNDRV_MINOR_OSS_CARD(iminor(inode));
-	snd_card_t *card;
-	snd_mixer_oss_file_t *fmixer;
+	struct snd_card *card;
+	struct snd_mixer_oss_file *fmixer;
 	int err;
 
 	if ((card = snd_cards[cardnum]) == NULL)
@@ -71,10 +71,10 @@ static int snd_mixer_oss_open(struct inode *inode, struct file *file)
 
 static int snd_mixer_oss_release(struct inode *inode, struct file *file)
 {
-	snd_mixer_oss_file_t *fmixer;
+	struct snd_mixer_oss_file *fmixer;
 
 	if (file->private_data) {
-		fmixer = (snd_mixer_oss_file_t *) file->private_data;
+		fmixer = (struct snd_mixer_oss_file *) file->private_data;
 		module_put(fmixer->card->module);
 		snd_card_file_remove(fmixer->card, file);
 		kfree(fmixer);
@@ -82,11 +82,11 @@ static int snd_mixer_oss_release(struct inode *inode, struct file *file)
 	return 0;
 }
 
-static int snd_mixer_oss_info(snd_mixer_oss_file_t *fmixer,
+static int snd_mixer_oss_info(struct snd_mixer_oss_file *fmixer,
 			      mixer_info __user *_info)
 {
-	snd_card_t *card = fmixer->card;
-	snd_mixer_oss_t *mixer = fmixer->mixer;
+	struct snd_card *card = fmixer->card;
+	struct snd_mixer_oss *mixer = fmixer->mixer;
 	struct mixer_info info;
 	
 	memset(&info, 0, sizeof(info));
@@ -98,11 +98,11 @@ static int snd_mixer_oss_info(snd_mixer_oss_file_t *fmixer,
 	return 0;
 }
 
-static int snd_mixer_oss_info_obsolete(snd_mixer_oss_file_t *fmixer,
+static int snd_mixer_oss_info_obsolete(struct snd_mixer_oss_file *fmixer,
 				       _old_mixer_info __user *_info)
 {
-	snd_card_t *card = fmixer->card;
-	snd_mixer_oss_t *mixer = fmixer->mixer;
+	struct snd_card *card = fmixer->card;
+	struct snd_mixer_oss *mixer = fmixer->mixer;
 	_old_mixer_info info;
 	
 	memset(&info, 0, sizeof(info));
@@ -113,9 +113,9 @@ static int snd_mixer_oss_info_obsolete(snd_mixer_oss_file_t *fmixer,
 	return 0;
 }
 
-static int snd_mixer_oss_caps(snd_mixer_oss_file_t *fmixer)
+static int snd_mixer_oss_caps(struct snd_mixer_oss_file *fmixer)
 {
-	snd_mixer_oss_t *mixer = fmixer->mixer;
+	struct snd_mixer_oss *mixer = fmixer->mixer;
 	int result = 0;
 
 	if (mixer == NULL)
@@ -125,10 +125,10 @@ static int snd_mixer_oss_caps(snd_mixer_oss_file_t *fmixer)
 	return result;
 }
 
-static int snd_mixer_oss_devmask(snd_mixer_oss_file_t *fmixer)
+static int snd_mixer_oss_devmask(struct snd_mixer_oss_file *fmixer)
 {
-	snd_mixer_oss_t *mixer = fmixer->mixer;
-	snd_mixer_oss_slot_t *pslot;
+	struct snd_mixer_oss *mixer = fmixer->mixer;
+	struct snd_mixer_oss_slot *pslot;
 	int result = 0, chn;
 
 	if (mixer == NULL)
@@ -141,10 +141,10 @@ static int snd_mixer_oss_devmask(snd_mixer_oss_file_t *fmixer)
 	return result;
 }
 
-static int snd_mixer_oss_stereodevs(snd_mixer_oss_file_t *fmixer)
+static int snd_mixer_oss_stereodevs(struct snd_mixer_oss_file *fmixer)
 {
-	snd_mixer_oss_t *mixer = fmixer->mixer;
-	snd_mixer_oss_slot_t *pslot;
+	struct snd_mixer_oss *mixer = fmixer->mixer;
+	struct snd_mixer_oss_slot *pslot;
 	int result = 0, chn;
 
 	if (mixer == NULL)
@@ -157,9 +157,9 @@ static int snd_mixer_oss_stereodevs(snd_mixer_oss_file_t *fmixer)
 	return result;
 }
 
-static int snd_mixer_oss_recmask(snd_mixer_oss_file_t *fmixer)
+static int snd_mixer_oss_recmask(struct snd_mixer_oss_file *fmixer)
 {
-	snd_mixer_oss_t *mixer = fmixer->mixer;
+	struct snd_mixer_oss *mixer = fmixer->mixer;
 	int result = 0;
 
 	if (mixer == NULL)
@@ -167,7 +167,7 @@ static int snd_mixer_oss_recmask(snd_mixer_oss_file_t *fmixer)
 	if (mixer->put_recsrc && mixer->get_recsrc) {	/* exclusive */
 		result = mixer->mask_recsrc;
 	} else {
-		snd_mixer_oss_slot_t *pslot;
+		struct snd_mixer_oss_slot *pslot;
 		int chn;
 		for (chn = 0; chn < 31; chn++) {
 			pslot = &mixer->slots[chn];
@@ -178,9 +178,9 @@ static int snd_mixer_oss_recmask(snd_mixer_oss_file_t *fmixer)
 	return result;
 }
 
-static int snd_mixer_oss_get_recsrc(snd_mixer_oss_file_t *fmixer)
+static int snd_mixer_oss_get_recsrc(struct snd_mixer_oss_file *fmixer)
 {
-	snd_mixer_oss_t *mixer = fmixer->mixer;
+	struct snd_mixer_oss *mixer = fmixer->mixer;
 	int result = 0;
 
 	if (mixer == NULL)
@@ -191,7 +191,7 @@ static int snd_mixer_oss_get_recsrc(snd_mixer_oss_file_t *fmixer)
 			return err;
 		result = 1 << result;
 	} else {
-		snd_mixer_oss_slot_t *pslot;
+		struct snd_mixer_oss_slot *pslot;
 		int chn;
 		for (chn = 0; chn < 31; chn++) {
 			pslot = &mixer->slots[chn];
@@ -206,10 +206,10 @@ static int snd_mixer_oss_get_recsrc(snd_mixer_oss_file_t *fmixer)
 	return mixer->oss_recsrc = result;
 }
 
-static int snd_mixer_oss_set_recsrc(snd_mixer_oss_file_t *fmixer, int recsrc)
+static int snd_mixer_oss_set_recsrc(struct snd_mixer_oss_file *fmixer, int recsrc)
 {
-	snd_mixer_oss_t *mixer = fmixer->mixer;
-	snd_mixer_oss_slot_t *pslot;
+	struct snd_mixer_oss *mixer = fmixer->mixer;
+	struct snd_mixer_oss_slot *pslot;
 	int chn, active;
 	int result = 0;
 
@@ -243,10 +243,10 @@ static int snd_mixer_oss_set_recsrc(snd_mixer_oss_file_t *fmixer, int recsrc)
 	return result;
 }
 
-static int snd_mixer_oss_get_volume(snd_mixer_oss_file_t *fmixer, int slot)
+static int snd_mixer_oss_get_volume(struct snd_mixer_oss_file *fmixer, int slot)
 {
-	snd_mixer_oss_t *mixer = fmixer->mixer;
-	snd_mixer_oss_slot_t *pslot;
+	struct snd_mixer_oss *mixer = fmixer->mixer;
+	struct snd_mixer_oss_slot *pslot;
 	int result = 0, left, right;
 
 	if (mixer == NULL || slot > 30)
@@ -268,11 +268,11 @@ static int snd_mixer_oss_get_volume(snd_mixer_oss_file_t *fmixer, int slot)
 	return result;
 }
 
-static int snd_mixer_oss_set_volume(snd_mixer_oss_file_t *fmixer,
+static int snd_mixer_oss_set_volume(struct snd_mixer_oss_file *fmixer,
 				    int slot, int volume)
 {
-	snd_mixer_oss_t *mixer = fmixer->mixer;
-	snd_mixer_oss_slot_t *pslot;
+	struct snd_mixer_oss *mixer = fmixer->mixer;
+	struct snd_mixer_oss_slot *pslot;
 	int result = 0, left = volume & 0xff, right = (volume >> 8) & 0xff;
 
 	if (mixer == NULL || slot > 30)
@@ -293,7 +293,7 @@ static int snd_mixer_oss_set_volume(snd_mixer_oss_file_t *fmixer,
  	return (left & 0xff) | ((right & 0xff) << 8);
 }
 
-static int snd_mixer_oss_ioctl1(snd_mixer_oss_file_t *fmixer, unsigned int cmd, unsigned long arg)
+static int snd_mixer_oss_ioctl1(struct snd_mixer_oss_file *fmixer, unsigned int cmd, unsigned long arg)
 {
 	void __user *argp = (void __user *)arg;
 	int __user *p = argp;
@@ -362,12 +362,12 @@ static int snd_mixer_oss_ioctl1(snd_mixer_oss_file_t *fmixer, unsigned int cmd,
 
 static long snd_mixer_oss_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	return snd_mixer_oss_ioctl1((snd_mixer_oss_file_t *) file->private_data, cmd, arg);
+	return snd_mixer_oss_ioctl1((struct snd_mixer_oss_file *) file->private_data, cmd, arg);
 }
 
-int snd_mixer_oss_ioctl_card(snd_card_t *card, unsigned int cmd, unsigned long arg)
+int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg)
 {
-	snd_mixer_oss_file_t fmixer;
+	struct snd_mixer_oss_file fmixer;
 	
 	snd_assert(card != NULL, return -ENXIO);
 	if (card->mixer_oss == NULL)
@@ -398,7 +398,7 @@ static struct file_operations snd_mixer_oss_f_ops =
 	.compat_ioctl =	snd_mixer_oss_ioctl_compat,
 };
 
-static snd_minor_t snd_mixer_oss_reg =
+static struct snd_minor snd_mixer_oss_reg =
 {
 	.comment =	"mixer",
 	.f_ops =	&snd_mixer_oss_f_ops,
@@ -432,16 +432,16 @@ static long snd_mixer_oss_conv2(long val, long min, long max)
 }
 
 #if 0
-static void snd_mixer_oss_recsrce_set(snd_card_t *card, int slot)
+static void snd_mixer_oss_recsrce_set(struct snd_card *card, int slot)
 {
-	snd_mixer_oss_t *mixer = card->mixer_oss;
+	struct snd_mixer_oss *mixer = card->mixer_oss;
 	if (mixer)
 		mixer->mask_recsrc |= 1 << slot;
 }
 
-static int snd_mixer_oss_recsrce_get(snd_card_t *card, int slot)
+static int snd_mixer_oss_recsrce_get(struct snd_card *card, int slot)
 {
-	snd_mixer_oss_t *mixer = card->mixer_oss;
+	struct snd_mixer_oss *mixer = card->mixer_oss;
 	if (mixer && (mixer->mask_recsrc & (1 << slot)))
 		return 1;
 	return 0;
@@ -488,10 +488,10 @@ struct slot {
 
 #define ID_UNKNOWN	((unsigned int)-1)
 
-static snd_kcontrol_t *snd_mixer_oss_test_id(snd_mixer_oss_t *mixer, const char *name, int index)
+static struct snd_kcontrol *snd_mixer_oss_test_id(struct snd_mixer_oss *mixer, const char *name, int index)
 {
-	snd_card_t * card = mixer->card;
-	snd_ctl_elem_id_t id;
+	struct snd_card *card = mixer->card;
+	struct snd_ctl_elem_id id;
 	
 	memset(&id, 0, sizeof(id));
 	id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
@@ -500,15 +500,15 @@ static snd_kcontrol_t *snd_mixer_oss_test_id(snd_mixer_oss_t *mixer, const char
 	return snd_ctl_find_id(card, &id);
 }
 
-static void snd_mixer_oss_get_volume1_vol(snd_mixer_oss_file_t *fmixer,
-					  snd_mixer_oss_slot_t *pslot,
+static void snd_mixer_oss_get_volume1_vol(struct snd_mixer_oss_file *fmixer,
+					  struct snd_mixer_oss_slot *pslot,
 					  unsigned int numid,
 					  int *left, int *right)
 {
-	snd_ctl_elem_info_t *uinfo;
-	snd_ctl_elem_value_t *uctl;
-	snd_kcontrol_t *kctl;
-	snd_card_t *card = fmixer->card;
+	struct snd_ctl_elem_info *uinfo;
+	struct snd_ctl_elem_value *uctl;
+	struct snd_kcontrol *kctl;
+	struct snd_card *card = fmixer->card;
 
 	if (numid == ID_UNKNOWN)
 		return;
@@ -537,16 +537,16 @@ static void snd_mixer_oss_get_volume1_vol(snd_mixer_oss_file_t *fmixer,
       	kfree(uinfo);
 }
 
-static void snd_mixer_oss_get_volume1_sw(snd_mixer_oss_file_t *fmixer,
-					 snd_mixer_oss_slot_t *pslot,
+static void snd_mixer_oss_get_volume1_sw(struct snd_mixer_oss_file *fmixer,
+					 struct snd_mixer_oss_slot *pslot,
 					 unsigned int numid,
 					 int *left, int *right,
 					 int route)
 {
-	snd_ctl_elem_info_t *uinfo;
-	snd_ctl_elem_value_t *uctl;
-	snd_kcontrol_t *kctl;
-	snd_card_t *card = fmixer->card;
+	struct snd_ctl_elem_info *uinfo;
+	struct snd_ctl_elem_value *uctl;
+	struct snd_kcontrol *kctl;
+	struct snd_card *card = fmixer->card;
 
 	if (numid == ID_UNKNOWN)
 		return;
@@ -576,8 +576,8 @@ static void snd_mixer_oss_get_volume1_sw(snd_mixer_oss_file_t *fmixer,
 	kfree(uinfo);
 }
 
-static int snd_mixer_oss_get_volume1(snd_mixer_oss_file_t *fmixer,
-				     snd_mixer_oss_slot_t *pslot,
+static int snd_mixer_oss_get_volume1(struct snd_mixer_oss_file *fmixer,
+				     struct snd_mixer_oss_slot *pslot,
 				     int *left, int *right)
 {
 	struct slot *slot = (struct slot *)pslot->private_data;
@@ -602,15 +602,15 @@ static int snd_mixer_oss_get_volume1(snd_mixer_oss_file_t *fmixer,
 	return 0;
 }
 
-static void snd_mixer_oss_put_volume1_vol(snd_mixer_oss_file_t *fmixer,
-					  snd_mixer_oss_slot_t *pslot,
+static void snd_mixer_oss_put_volume1_vol(struct snd_mixer_oss_file *fmixer,
+					  struct snd_mixer_oss_slot *pslot,
 					  unsigned int numid,
 					  int left, int right)
 {
-	snd_ctl_elem_info_t *uinfo;
-	snd_ctl_elem_value_t *uctl;
-	snd_kcontrol_t *kctl;
-	snd_card_t *card = fmixer->card;
+	struct snd_ctl_elem_info *uinfo;
+	struct snd_ctl_elem_value *uctl;
+	struct snd_kcontrol *kctl;
+	struct snd_card *card = fmixer->card;
 	int res;
 
 	if (numid == ID_UNKNOWN)
@@ -640,16 +640,16 @@ static void snd_mixer_oss_put_volume1_vol(snd_mixer_oss_file_t *fmixer,
 	kfree(uinfo);
 }
 
-static void snd_mixer_oss_put_volume1_sw(snd_mixer_oss_file_t *fmixer,
-					 snd_mixer_oss_slot_t *pslot,
+static void snd_mixer_oss_put_volume1_sw(struct snd_mixer_oss_file *fmixer,
+					 struct snd_mixer_oss_slot *pslot,
 					 unsigned int numid,
 					 int left, int right,
 					 int route)
 {
-	snd_ctl_elem_info_t *uinfo;
-	snd_ctl_elem_value_t *uctl;
-	snd_kcontrol_t *kctl;
-	snd_card_t *card = fmixer->card;
+	struct snd_ctl_elem_info *uinfo;
+	struct snd_ctl_elem_value *uctl;
+	struct snd_kcontrol *kctl;
+	struct snd_card *card = fmixer->card;
 	int res;
 
 	if (numid == ID_UNKNOWN)
@@ -685,8 +685,8 @@ static void snd_mixer_oss_put_volume1_sw(snd_mixer_oss_file_t *fmixer,
 	kfree(uinfo);
 }
 
-static int snd_mixer_oss_put_volume1(snd_mixer_oss_file_t *fmixer,
-				     snd_mixer_oss_slot_t *pslot,
+static int snd_mixer_oss_put_volume1(struct snd_mixer_oss_file *fmixer,
+				     struct snd_mixer_oss_slot *pslot,
 				     int left, int right)
 {
 	struct slot *slot = (struct slot *)pslot->private_data;
@@ -723,8 +723,8 @@ static int snd_mixer_oss_put_volume1(snd_mixer_oss_file_t *fmixer,
 	return 0;
 }
 
-static int snd_mixer_oss_get_recsrc1_sw(snd_mixer_oss_file_t *fmixer,
-					snd_mixer_oss_slot_t *pslot,
+static int snd_mixer_oss_get_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
+					struct snd_mixer_oss_slot *pslot,
 					int *active)
 {
 	struct slot *slot = (struct slot *)pslot->private_data;
@@ -736,8 +736,8 @@ static int snd_mixer_oss_get_recsrc1_sw(snd_mixer_oss_file_t *fmixer,
 	return 0;
 }
 
-static int snd_mixer_oss_get_recsrc1_route(snd_mixer_oss_file_t *fmixer,
-					   snd_mixer_oss_slot_t *pslot,
+static int snd_mixer_oss_get_recsrc1_route(struct snd_mixer_oss_file *fmixer,
+					   struct snd_mixer_oss_slot *pslot,
 					   int *active)
 {
 	struct slot *slot = (struct slot *)pslot->private_data;
@@ -749,8 +749,8 @@ static int snd_mixer_oss_get_recsrc1_route(snd_mixer_oss_file_t *fmixer,
 	return 0;
 }
 
-static int snd_mixer_oss_put_recsrc1_sw(snd_mixer_oss_file_t *fmixer,
-					snd_mixer_oss_slot_t *pslot,
+static int snd_mixer_oss_put_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
+					struct snd_mixer_oss_slot *pslot,
 					int active)
 {
 	struct slot *slot = (struct slot *)pslot->private_data;
@@ -759,8 +759,8 @@ static int snd_mixer_oss_put_recsrc1_sw(snd_mixer_oss_file_t *fmixer,
 	return 0;
 }
 
-static int snd_mixer_oss_put_recsrc1_route(snd_mixer_oss_file_t *fmixer,
-					   snd_mixer_oss_slot_t *pslot,
+static int snd_mixer_oss_put_recsrc1_route(struct snd_mixer_oss_file *fmixer,
+					   struct snd_mixer_oss_slot *pslot,
 					   int active)
 {
 	struct slot *slot = (struct slot *)pslot->private_data;
@@ -769,15 +769,15 @@ static int snd_mixer_oss_put_recsrc1_route(snd_mixer_oss_file_t *fmixer,
 	return 0;
 }
 
-static int snd_mixer_oss_get_recsrc2(snd_mixer_oss_file_t *fmixer, unsigned int *active_index)
+static int snd_mixer_oss_get_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned int *active_index)
 {
-	snd_card_t *card = fmixer->card;
-	snd_mixer_oss_t *mixer = fmixer->mixer;
-	snd_kcontrol_t *kctl;
-	snd_mixer_oss_slot_t *pslot;
+	struct snd_card *card = fmixer->card;
+	struct snd_mixer_oss *mixer = fmixer->mixer;
+	struct snd_kcontrol *kctl;
+	struct snd_mixer_oss_slot *pslot;
 	struct slot *slot;
-	snd_ctl_elem_info_t *uinfo;
-	snd_ctl_elem_value_t *uctl;
+	struct snd_ctl_elem_info *uinfo;
+	struct snd_ctl_elem_value *uctl;
 	int err, idx;
 	
 	uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
@@ -818,15 +818,15 @@ static int snd_mixer_oss_get_recsrc2(snd_mixer_oss_file_t *fmixer, unsigned int
       	return err;
 }
 
-static int snd_mixer_oss_put_recsrc2(snd_mixer_oss_file_t *fmixer, unsigned int active_index)
+static int snd_mixer_oss_put_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned int active_index)
 {
-	snd_card_t *card = fmixer->card;
-	snd_mixer_oss_t *mixer = fmixer->mixer;
-	snd_kcontrol_t *kctl;
-	snd_mixer_oss_slot_t *pslot;
+	struct snd_card *card = fmixer->card;
+	struct snd_mixer_oss *mixer = fmixer->mixer;
+	struct snd_kcontrol *kctl;
+	struct snd_mixer_oss_slot *pslot;
 	struct slot *slot = NULL;
-	snd_ctl_elem_info_t *uinfo;
-	snd_ctl_elem_value_t *uctl;
+	struct snd_ctl_elem_info *uinfo;
+	struct snd_ctl_elem_value *uctl;
 	int err;
 	unsigned int idx;
 
@@ -878,11 +878,11 @@ struct snd_mixer_oss_assign_table {
 	int index;
 };
 
-static int snd_mixer_oss_build_test(snd_mixer_oss_t *mixer, struct slot *slot, const char *name, int index, int item)
+static int snd_mixer_oss_build_test(struct snd_mixer_oss *mixer, struct slot *slot, const char *name, int index, int item)
 {
-	snd_ctl_elem_info_t *info;
-	snd_kcontrol_t *kcontrol;
-	snd_card_t *card = mixer->card;
+	struct snd_ctl_elem_info *info;
+	struct snd_kcontrol *kcontrol;
+	struct snd_card *card = mixer->card;
 	int err;
 
 	down_read(&card->controls_rwsem);
@@ -910,7 +910,7 @@ static int snd_mixer_oss_build_test(snd_mixer_oss_t *mixer, struct slot *slot, c
 	return 0;
 }
 
-static void snd_mixer_oss_slot_free(snd_mixer_oss_slot_t *chn)
+static void snd_mixer_oss_slot_free(struct snd_mixer_oss_slot *chn)
 {
 	struct slot *p = (struct slot *)chn->private_data;
 	if (p) {
@@ -922,7 +922,7 @@ static void snd_mixer_oss_slot_free(snd_mixer_oss_slot_t *chn)
 	}
 }
 
-static void mixer_slot_clear(snd_mixer_oss_slot_t *rslot)
+static void mixer_slot_clear(struct snd_mixer_oss_slot *rslot)
 {
 	int idx = rslot->number; /* remember this */
 	if (rslot->private_free)
@@ -936,12 +936,12 @@ static void mixer_slot_clear(snd_mixer_oss_slot_t *rslot)
  * ptr_allocated means the entry is dynamically allocated (change via proc file).
  * when replace_old = 1, the old entry is replaced with the new one.
  */
-static int snd_mixer_oss_build_input(snd_mixer_oss_t *mixer, struct snd_mixer_oss_assign_table *ptr, int ptr_allocated, int replace_old)
+static int snd_mixer_oss_build_input(struct snd_mixer_oss *mixer, struct snd_mixer_oss_assign_table *ptr, int ptr_allocated, int replace_old)
 {
 	struct slot slot;
 	struct slot *pslot;
-	snd_kcontrol_t *kctl;
-	snd_mixer_oss_slot_t *rslot;
+	struct snd_kcontrol *kctl;
+	struct snd_mixer_oss_slot *rslot;
 	char str[64];	
 	
 	/* check if already assigned */
@@ -991,7 +991,7 @@ static int snd_mixer_oss_build_input(snd_mixer_oss_t *mixer, struct snd_mixer_os
 		return 0;
 	down_read(&mixer->card->controls_rwsem);
 	if (ptr->index == 0 && (kctl = snd_mixer_oss_test_id(mixer, "Capture Source", 0)) != NULL) {
-		snd_ctl_elem_info_t *uinfo;
+		struct snd_ctl_elem_info *uinfo;
 
 		uinfo = kmalloc(sizeof(*uinfo), GFP_KERNEL);
 		if (! uinfo) {
@@ -1093,10 +1093,10 @@ static char *oss_mixer_names[SNDRV_OSS_MAX_MIXERS] = {
  *  /proc interface
  */
 
-static void snd_mixer_oss_proc_read(snd_info_entry_t *entry,
-				    snd_info_buffer_t * buffer)
+static void snd_mixer_oss_proc_read(struct snd_info_entry *entry,
+				    struct snd_info_buffer *buffer)
 {
-	snd_mixer_oss_t *mixer = entry->private_data;
+	struct snd_mixer_oss *mixer = entry->private_data;
 	int i;
 
 	down(&mixer->reg_mutex);
@@ -1117,10 +1117,10 @@ static void snd_mixer_oss_proc_read(snd_info_entry_t *entry,
 	up(&mixer->reg_mutex);
 }
 
-static void snd_mixer_oss_proc_write(snd_info_entry_t *entry,
-				     snd_info_buffer_t * buffer)
+static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
+				     struct snd_info_buffer *buffer)
 {
-	snd_mixer_oss_t *mixer = entry->private_data;
+	struct snd_mixer_oss *mixer = entry->private_data;
 	char line[128], str[32], idxstr[16], *cptr;
 	int ch, idx;
 	struct snd_mixer_oss_assign_table *tbl;
@@ -1176,9 +1176,9 @@ static void snd_mixer_oss_proc_write(snd_info_entry_t *entry,
 	}
 }
 
-static void snd_mixer_oss_proc_init(snd_mixer_oss_t *mixer)
+static void snd_mixer_oss_proc_init(struct snd_mixer_oss *mixer)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	entry = snd_info_create_card_entry(mixer->card, "oss_mixer",
 					   mixer->card->proc_root);
@@ -1198,7 +1198,7 @@ static void snd_mixer_oss_proc_init(snd_mixer_oss_t *mixer)
 	mixer->proc_entry = entry;
 }
 
-static void snd_mixer_oss_proc_done(snd_mixer_oss_t *mixer)
+static void snd_mixer_oss_proc_done(struct snd_mixer_oss *mixer)
 {
 	if (mixer->proc_entry) {
 		snd_info_unregister(mixer->proc_entry);
@@ -1206,7 +1206,7 @@ static void snd_mixer_oss_proc_done(snd_mixer_oss_t *mixer)
 	}
 }
 
-static void snd_mixer_oss_build(snd_mixer_oss_t *mixer)
+static void snd_mixer_oss_build(struct snd_mixer_oss *mixer)
 {
 	static struct snd_mixer_oss_assign_table table[] = {
 		{ SOUND_MIXER_VOLUME, 	"Master",		0 },
@@ -1260,8 +1260,8 @@ static void snd_mixer_oss_build(snd_mixer_oss_t *mixer)
 
 static int snd_mixer_oss_free1(void *private)
 {
-	snd_mixer_oss_t *mixer = private;
-	snd_card_t * card;
+	struct snd_mixer_oss *mixer = private;
+	struct snd_card *card;
 	int idx;
  
 	snd_assert(mixer != NULL, return -ENXIO);
@@ -1269,7 +1269,7 @@ static int snd_mixer_oss_free1(void *private)
 	snd_assert(mixer == card->mixer_oss, return -ENXIO);
 	card->mixer_oss = NULL;
 	for (idx = 0; idx < SNDRV_OSS_MAX_MIXERS; idx++) {
-		snd_mixer_oss_slot_t *chn = &mixer->slots[idx];
+		struct snd_mixer_oss_slot *chn = &mixer->slots[idx];
 		if (chn->private_free)
 			chn->private_free(chn);
 	}
@@ -1277,9 +1277,9 @@ static int snd_mixer_oss_free1(void *private)
 	return 0;
 }
 
-static int snd_mixer_oss_notify_handler(snd_card_t * card, int cmd)
+static int snd_mixer_oss_notify_handler(struct snd_card *card, int cmd)
 {
-	snd_mixer_oss_t *mixer;
+	struct snd_mixer_oss *mixer;
 
 	if (cmd == SND_MIXER_OSS_NOTIFY_REGISTER) {
 		char name[128];
-- 
cgit v1.2.3-70-g09d2


From 6ac77bc180fbd985988015020c2e2347e802959d Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:01:49 +0100
Subject: [ALSA] Remove xxx_t typedefs: PCM OSS-emulation

Modules: ALSA<-OSS emulation

Remove xxx_t typedefs from the core PCM OSS-emulation codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/pcm_oss.h     |  41 +++--
 sound/core/oss/copy.c       |  16 +-
 sound/core/oss/io.c         |  28 ++--
 sound/core/oss/linear.c     |  38 ++---
 sound/core/oss/mulaw.c      |  54 +++----
 sound/core/oss/pcm_oss.c    | 364 ++++++++++++++++++++++----------------------
 sound/core/oss/pcm_plugin.c | 110 ++++++-------
 sound/core/oss/pcm_plugin.h | 208 +++++++++++++------------
 sound/core/oss/rate.c       |  83 +++++-----
 sound/core/oss/route.c      | 134 ++++++++--------
 10 files changed, 543 insertions(+), 533 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h
index 0b67c9d105a..fddaddde47b 100644
--- a/include/sound/pcm_oss.h
+++ b/include/sound/pcm_oss.h
@@ -22,10 +22,7 @@
  *
  */
 
-typedef struct _snd_pcm_plugin snd_pcm_plugin_t;
-typedef struct _snd_pcm_oss_setup snd_pcm_oss_setup_t;
-
-struct _snd_pcm_oss_setup {
+struct snd_pcm_oss_setup {
 	char *task_name;
 	unsigned int disable:1,
 		     direct:1,
@@ -36,10 +33,10 @@ struct _snd_pcm_oss_setup {
 		     buggyptr:1;
 	unsigned int periods;
 	unsigned int period_size;
-	snd_pcm_oss_setup_t *next;
+	struct snd_pcm_oss_setup *next;
 };
 
-typedef struct _snd_pcm_oss_runtime {
+struct snd_pcm_oss_runtime {
 	unsigned params: 1,			/* format/parameter change */
 		 prepare: 1,			/* need to prepare the operation */
 		 trigger: 1,			/* trigger flag */
@@ -59,30 +56,30 @@ typedef struct _snd_pcm_oss_runtime {
 	size_t mmap_bytes;
 	char *buffer;				/* vmallocated period */
 	size_t buffer_used;			/* used length from period buffer */
-	snd_pcm_plugin_t *plugin_first;
-	snd_pcm_plugin_t *plugin_last;
+	struct snd_pcm_plugin *plugin_first;
+	struct snd_pcm_plugin *plugin_last;
 	unsigned int prev_hw_ptr_interrupt;
-} snd_pcm_oss_runtime_t;
+};
 
-typedef struct _snd_pcm_oss_file {
-	snd_pcm_substream_t *streams[2];
-} snd_pcm_oss_file_t;
+struct snd_pcm_oss_file {
+	struct snd_pcm_substream *streams[2];
+};
 
-typedef struct _snd_pcm_oss_substream {
+struct snd_pcm_oss_substream {
 	unsigned oss: 1;			/* oss mode */
-	snd_pcm_oss_setup_t *setup;		/* active setup */
-	snd_pcm_oss_file_t *file;
-} snd_pcm_oss_substream_t;
+	struct snd_pcm_oss_setup *setup;		/* active setup */
+	struct snd_pcm_oss_file *file;
+};
 
-typedef struct _snd_pcm_oss_stream {
-	snd_pcm_oss_setup_t *setup_list;	/* setup list */
+struct snd_pcm_oss_stream {
+	struct snd_pcm_oss_setup *setup_list;	/* setup list */
         struct semaphore setup_mutex;
-	snd_info_entry_t *proc_entry;
-} snd_pcm_oss_stream_t;
+	struct snd_info_entry *proc_entry;
+};
 
-typedef struct _snd_pcm_oss {
+struct snd_pcm_oss {
 	int reg;
 	unsigned int reg_mask;
-} snd_pcm_oss_t;
+};
 
 #endif /* __SOUND_PCM_OSS_H */
diff --git a/sound/core/oss/copy.c b/sound/core/oss/copy.c
index edecbe7417b..d6a04c2d5a7 100644
--- a/sound/core/oss/copy.c
+++ b/sound/core/oss/copy.c
@@ -25,9 +25,9 @@
 #include <sound/pcm.h>
 #include "pcm_plugin.h"
 
-static snd_pcm_sframes_t copy_transfer(snd_pcm_plugin_t *plugin,
-			     const snd_pcm_plugin_channel_t *src_channels,
-			     snd_pcm_plugin_channel_t *dst_channels,
+static snd_pcm_sframes_t copy_transfer(struct snd_pcm_plugin *plugin,
+			     const struct snd_pcm_plugin_channel *src_channels,
+			     struct snd_pcm_plugin_channel *dst_channels,
 			     snd_pcm_uframes_t frames)
 {
 	unsigned int channel;
@@ -58,13 +58,13 @@ static snd_pcm_sframes_t copy_transfer(snd_pcm_plugin_t *plugin,
 	return frames;
 }
 
-int snd_pcm_plugin_build_copy(snd_pcm_plug_t *plug,
-			      snd_pcm_plugin_format_t *src_format,
-			      snd_pcm_plugin_format_t *dst_format,
-			      snd_pcm_plugin_t **r_plugin)
+int snd_pcm_plugin_build_copy(struct snd_pcm_substream *plug,
+			      struct snd_pcm_plugin_format *src_format,
+			      struct snd_pcm_plugin_format *dst_format,
+			      struct snd_pcm_plugin **r_plugin)
 {
 	int err;
-	snd_pcm_plugin_t *plugin;
+	struct snd_pcm_plugin *plugin;
 	int width;
 
 	snd_assert(r_plugin != NULL, return -ENXIO);
diff --git a/sound/core/oss/io.c b/sound/core/oss/io.c
index 63eca9aec96..322702e05f3 100644
--- a/sound/core/oss/io.c
+++ b/sound/core/oss/io.c
@@ -35,9 +35,9 @@
  *  Basic io plugin
  */
  
-static snd_pcm_sframes_t io_playback_transfer(snd_pcm_plugin_t *plugin,
-				    const snd_pcm_plugin_channel_t *src_channels,
-				    snd_pcm_plugin_channel_t *dst_channels,
+static snd_pcm_sframes_t io_playback_transfer(struct snd_pcm_plugin *plugin,
+				    const struct snd_pcm_plugin_channel *src_channels,
+				    struct snd_pcm_plugin_channel *dst_channels,
 				    snd_pcm_uframes_t frames)
 {
 	snd_assert(plugin != NULL, return -ENXIO);
@@ -58,9 +58,9 @@ static snd_pcm_sframes_t io_playback_transfer(snd_pcm_plugin_t *plugin,
 	}
 }
  
-static snd_pcm_sframes_t io_capture_transfer(snd_pcm_plugin_t *plugin,
-				   const snd_pcm_plugin_channel_t *src_channels,
-				   snd_pcm_plugin_channel_t *dst_channels,
+static snd_pcm_sframes_t io_capture_transfer(struct snd_pcm_plugin *plugin,
+				   const struct snd_pcm_plugin_channel *src_channels,
+				   struct snd_pcm_plugin_channel *dst_channels,
 				   snd_pcm_uframes_t frames)
 {
 	snd_assert(plugin != NULL, return -ENXIO);
@@ -82,13 +82,13 @@ static snd_pcm_sframes_t io_capture_transfer(snd_pcm_plugin_t *plugin,
 	return 0;
 }
  
-static snd_pcm_sframes_t io_src_channels(snd_pcm_plugin_t *plugin,
+static snd_pcm_sframes_t io_src_channels(struct snd_pcm_plugin *plugin,
 			     snd_pcm_uframes_t frames,
-			     snd_pcm_plugin_channel_t **channels)
+			     struct snd_pcm_plugin_channel **channels)
 {
 	int err;
 	unsigned int channel;
-	snd_pcm_plugin_channel_t *v;
+	struct snd_pcm_plugin_channel *v;
 	err = snd_pcm_plugin_client_channels(plugin, frames, &v);
 	if (err < 0)
 		return err;
@@ -100,13 +100,13 @@ static snd_pcm_sframes_t io_src_channels(snd_pcm_plugin_t *plugin,
 	return frames;
 }
 
-int snd_pcm_plugin_build_io(snd_pcm_plug_t *plug,
-			    snd_pcm_hw_params_t *params,
-			    snd_pcm_plugin_t **r_plugin)
+int snd_pcm_plugin_build_io(struct snd_pcm_substream *plug,
+			    struct snd_pcm_hw_params *params,
+			    struct snd_pcm_plugin **r_plugin)
 {
 	int err;
-	snd_pcm_plugin_format_t format;
-	snd_pcm_plugin_t *plugin;
+	struct snd_pcm_plugin_format format;
+	struct snd_pcm_plugin *plugin;
 
 	snd_assert(r_plugin != NULL, return -ENXIO);
 	*r_plugin = NULL;
diff --git a/sound/core/oss/linear.c b/sound/core/oss/linear.c
index 12ed27a57b2..8cbfa415ce4 100644
--- a/sound/core/oss/linear.c
+++ b/sound/core/oss/linear.c
@@ -30,19 +30,19 @@
  *  Basic linear conversion plugin
  */
  
-typedef struct linear_private_data {
+struct linear_priv {
 	int conv;
-} linear_t;
+};
 
-static void convert(snd_pcm_plugin_t *plugin,
-		    const snd_pcm_plugin_channel_t *src_channels,
-		    snd_pcm_plugin_channel_t *dst_channels,
+static void convert(struct snd_pcm_plugin *plugin,
+		    const struct snd_pcm_plugin_channel *src_channels,
+		    struct snd_pcm_plugin_channel *dst_channels,
 		    snd_pcm_uframes_t frames)
 {
 #define CONV_LABELS
 #include "plugin_ops.h"
 #undef CONV_LABELS
-	linear_t *data = (linear_t *)plugin->extra_data;
+	struct linear_priv *data = (struct linear_priv *)plugin->extra_data;
 	void *conv = conv_labels[data->conv];
 	int channel;
 	int nchannels = plugin->src_format.channels;
@@ -75,15 +75,15 @@ static void convert(snd_pcm_plugin_t *plugin,
 	}
 }
 
-static snd_pcm_sframes_t linear_transfer(snd_pcm_plugin_t *plugin,
-			       const snd_pcm_plugin_channel_t *src_channels,
-			       snd_pcm_plugin_channel_t *dst_channels,
+static snd_pcm_sframes_t linear_transfer(struct snd_pcm_plugin *plugin,
+			       const struct snd_pcm_plugin_channel *src_channels,
+			       struct snd_pcm_plugin_channel *dst_channels,
 			       snd_pcm_uframes_t frames)
 {
-	linear_t *data;
+	struct linear_priv *data;
 
 	snd_assert(plugin != NULL && src_channels != NULL && dst_channels != NULL, return -ENXIO);
-	data = (linear_t *)plugin->extra_data;
+	data = (struct linear_priv *)plugin->extra_data;
 	if (frames == 0)
 		return 0;
 #ifdef CONFIG_SND_DEBUG
@@ -128,14 +128,14 @@ int conv_index(int src_format, int dst_format)
 	return src_width * 32 + src_endian * 16 + sign * 8 + dst_width * 2 + dst_endian;
 }
 
-int snd_pcm_plugin_build_linear(snd_pcm_plug_t *plug,
-				snd_pcm_plugin_format_t *src_format,
-				snd_pcm_plugin_format_t *dst_format,
-				snd_pcm_plugin_t **r_plugin)
+int snd_pcm_plugin_build_linear(struct snd_pcm_substream *plug,
+				struct snd_pcm_plugin_format *src_format,
+				struct snd_pcm_plugin_format *dst_format,
+				struct snd_pcm_plugin **r_plugin)
 {
 	int err;
-	struct linear_private_data *data;
-	snd_pcm_plugin_t *plugin;
+	struct linear_priv *data;
+	struct snd_pcm_plugin *plugin;
 
 	snd_assert(r_plugin != NULL, return -ENXIO);
 	*r_plugin = NULL;
@@ -147,10 +147,10 @@ int snd_pcm_plugin_build_linear(snd_pcm_plug_t *plug,
 
 	err = snd_pcm_plugin_build(plug, "linear format conversion",
 				   src_format, dst_format,
-				   sizeof(linear_t), &plugin);
+				   sizeof(struct linear_priv), &plugin);
 	if (err < 0)
 		return err;
-	data = (linear_t *)plugin->extra_data;
+	data = (struct linear_priv *)plugin->extra_data;
 	data->conv = conv_index(src_format->format, dst_format->format);
 	plugin->transfer = linear_transfer;
 	*r_plugin = plugin;
diff --git a/sound/core/oss/mulaw.c b/sound/core/oss/mulaw.c
index 44ec4c66eb1..14f5578ec7a 100644
--- a/sound/core/oss/mulaw.c
+++ b/sound/core/oss/mulaw.c
@@ -139,25 +139,25 @@ static int ulaw2linear(unsigned char u_val)
  *  Basic Mu-Law plugin
  */
 
-typedef void (*mulaw_f)(snd_pcm_plugin_t *plugin,
-			const snd_pcm_plugin_channel_t *src_channels,
-			snd_pcm_plugin_channel_t *dst_channels,
+typedef void (*mulaw_f)(struct snd_pcm_plugin *plugin,
+			const struct snd_pcm_plugin_channel *src_channels,
+			struct snd_pcm_plugin_channel *dst_channels,
 			snd_pcm_uframes_t frames);
 
-typedef struct mulaw_private_data {
+struct mulaw_priv {
 	mulaw_f func;
 	int conv;
-} mulaw_t;
+};
 
-static void mulaw_decode(snd_pcm_plugin_t *plugin,
-			const snd_pcm_plugin_channel_t *src_channels,
-			snd_pcm_plugin_channel_t *dst_channels,
+static void mulaw_decode(struct snd_pcm_plugin *plugin,
+			const struct snd_pcm_plugin_channel *src_channels,
+			struct snd_pcm_plugin_channel *dst_channels,
 			snd_pcm_uframes_t frames)
 {
 #define PUT_S16_LABELS
 #include "plugin_ops.h"
 #undef PUT_S16_LABELS
-	mulaw_t *data = (mulaw_t *)plugin->extra_data;
+	struct mulaw_priv *data = (struct mulaw_priv *)plugin->extra_data;
 	void *put = put_s16_labels[data->conv];
 	int channel;
 	int nchannels = plugin->src_format.channels;
@@ -191,15 +191,15 @@ static void mulaw_decode(snd_pcm_plugin_t *plugin,
 	}
 }
 
-static void mulaw_encode(snd_pcm_plugin_t *plugin,
-			const snd_pcm_plugin_channel_t *src_channels,
-			snd_pcm_plugin_channel_t *dst_channels,
+static void mulaw_encode(struct snd_pcm_plugin *plugin,
+			const struct snd_pcm_plugin_channel *src_channels,
+			struct snd_pcm_plugin_channel *dst_channels,
 			snd_pcm_uframes_t frames)
 {
 #define GET_S16_LABELS
 #include "plugin_ops.h"
 #undef GET_S16_LABELS
-	mulaw_t *data = (mulaw_t *)plugin->extra_data;
+	struct mulaw_priv *data = (struct mulaw_priv *)plugin->extra_data;
 	void *get = get_s16_labels[data->conv];
 	int channel;
 	int nchannels = plugin->src_format.channels;
@@ -234,12 +234,12 @@ static void mulaw_encode(snd_pcm_plugin_t *plugin,
 	}
 }
 
-static snd_pcm_sframes_t mulaw_transfer(snd_pcm_plugin_t *plugin,
-			      const snd_pcm_plugin_channel_t *src_channels,
-			      snd_pcm_plugin_channel_t *dst_channels,
+static snd_pcm_sframes_t mulaw_transfer(struct snd_pcm_plugin *plugin,
+			      const struct snd_pcm_plugin_channel *src_channels,
+			      struct snd_pcm_plugin_channel *dst_channels,
 			      snd_pcm_uframes_t frames)
 {
-	mulaw_t *data;
+	struct mulaw_priv *data;
 
 	snd_assert(plugin != NULL && src_channels != NULL && dst_channels != NULL, return -ENXIO);
 	if (frames == 0)
@@ -257,20 +257,20 @@ static snd_pcm_sframes_t mulaw_transfer(snd_pcm_plugin_t *plugin,
 		}
 	}
 #endif
-	data = (mulaw_t *)plugin->extra_data;
+	data = (struct mulaw_priv *)plugin->extra_data;
 	data->func(plugin, src_channels, dst_channels, frames);
 	return frames;
 }
 
-int snd_pcm_plugin_build_mulaw(snd_pcm_plug_t *plug,
-			       snd_pcm_plugin_format_t *src_format,
-			       snd_pcm_plugin_format_t *dst_format,
-			       snd_pcm_plugin_t **r_plugin)
+int snd_pcm_plugin_build_mulaw(struct snd_pcm_substream *plug,
+			       struct snd_pcm_plugin_format *src_format,
+			       struct snd_pcm_plugin_format *dst_format,
+			       struct snd_pcm_plugin **r_plugin)
 {
 	int err;
-	mulaw_t *data;
-	snd_pcm_plugin_t *plugin;
-	snd_pcm_plugin_format_t *format;
+	struct mulaw_priv *data;
+	struct snd_pcm_plugin *plugin;
+	struct snd_pcm_plugin_format *format;
 	mulaw_f func;
 
 	snd_assert(r_plugin != NULL, return -ENXIO);
@@ -295,10 +295,10 @@ int snd_pcm_plugin_build_mulaw(snd_pcm_plug_t *plug,
 
 	err = snd_pcm_plugin_build(plug, "Mu-Law<->linear conversion",
 				   src_format, dst_format,
-				   sizeof(mulaw_t), &plugin);
+				   sizeof(struct mulaw_priv), &plugin);
 	if (err < 0)
 		return err;
-	data = (mulaw_t*)plugin->extra_data;
+	data = (struct mulaw_priv *)plugin->extra_data;
 	data->func = func;
 	data->conv = getput_index(format->format);
 	snd_assert(data->conv >= 0 && data->conv < 4*2*2, return -EINVAL);
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index bcc97075913..ffc13b9194b 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -61,10 +61,10 @@ MODULE_PARM_DESC(nonblock_open, "Don't block opening busy PCM devices.");
 MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_PCM);
 MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_PCM1);
 
-extern int snd_mixer_oss_ioctl_card(snd_card_t *card, unsigned int cmd, unsigned long arg);
-static int snd_pcm_oss_get_rate(snd_pcm_oss_file_t *pcm_oss_file);
-static int snd_pcm_oss_get_channels(snd_pcm_oss_file_t *pcm_oss_file);
-static int snd_pcm_oss_get_format(snd_pcm_oss_file_t *pcm_oss_file);
+extern int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg);
+static int snd_pcm_oss_get_rate(struct snd_pcm_oss_file *pcm_oss_file);
+static int snd_pcm_oss_get_channels(struct snd_pcm_oss_file *pcm_oss_file);
+static int snd_pcm_oss_get_format(struct snd_pcm_oss_file *pcm_oss_file);
 
 static inline mm_segment_t snd_enter_user(void)
 {
@@ -78,10 +78,10 @@ static inline void snd_leave_user(mm_segment_t fs)
 	set_fs(fs);
 }
 
-static int snd_pcm_oss_plugin_clear(snd_pcm_substream_t *substream)
+static int snd_pcm_oss_plugin_clear(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_pcm_plugin_t *plugin, *next;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_pcm_plugin *plugin, *next;
 	
 	plugin = runtime->oss.plugin_first;
 	while (plugin) {
@@ -93,9 +93,9 @@ static int snd_pcm_oss_plugin_clear(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-static int snd_pcm_plugin_insert(snd_pcm_plugin_t *plugin)
+static int snd_pcm_plugin_insert(struct snd_pcm_plugin *plugin)
 {
-	snd_pcm_runtime_t *runtime = plugin->plug->runtime;
+	struct snd_pcm_runtime *runtime = plugin->plug->runtime;
 	plugin->next = runtime->oss.plugin_first;
 	plugin->prev = NULL;
 	if (runtime->oss.plugin_first) {
@@ -108,9 +108,9 @@ static int snd_pcm_plugin_insert(snd_pcm_plugin_t *plugin)
 	return 0;
 }
 
-int snd_pcm_plugin_append(snd_pcm_plugin_t *plugin)
+int snd_pcm_plugin_append(struct snd_pcm_plugin *plugin)
 {
-	snd_pcm_runtime_t *runtime = plugin->plug->runtime;
+	struct snd_pcm_runtime *runtime = plugin->plug->runtime;
 	plugin->next = NULL;
 	plugin->prev = runtime->oss.plugin_last;
 	if (runtime->oss.plugin_last) {
@@ -123,9 +123,9 @@ int snd_pcm_plugin_append(snd_pcm_plugin_t *plugin)
 	return 0;
 }
 
-static long snd_pcm_oss_bytes(snd_pcm_substream_t *substream, long frames)
+static long snd_pcm_oss_bytes(struct snd_pcm_substream *substream, long frames)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	long buffer_size = snd_pcm_lib_buffer_bytes(substream);
 	long bytes = frames_to_bytes(runtime, frames);
 	if (buffer_size == runtime->oss.buffer_bytes)
@@ -142,9 +142,9 @@ static long snd_pcm_oss_bytes(snd_pcm_substream_t *substream, long frames)
 #endif
 }
 
-static long snd_pcm_alsa_frames(snd_pcm_substream_t *substream, long bytes)
+static long snd_pcm_alsa_frames(struct snd_pcm_substream *substream, long bytes)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	long buffer_size = snd_pcm_lib_buffer_bytes(substream);
 	if (buffer_size == runtime->oss.buffer_bytes)
 		return bytes_to_frames(runtime, bytes);
@@ -185,14 +185,14 @@ static int snd_pcm_oss_format_to(int format)
 	}
 }
 
-static int snd_pcm_oss_period_size(snd_pcm_substream_t *substream, 
-				   snd_pcm_hw_params_t *oss_params,
-				   snd_pcm_hw_params_t *slave_params)
+static int snd_pcm_oss_period_size(struct snd_pcm_substream *substream, 
+				   struct snd_pcm_hw_params *oss_params,
+				   struct snd_pcm_hw_params *slave_params)
 {
 	size_t s;
 	size_t oss_buffer_size, oss_period_size, oss_periods;
 	size_t min_period_size, max_period_size;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	size_t oss_frame_size;
 
 	oss_frame_size = snd_pcm_format_physical_width(params_format(oss_params)) *
@@ -277,11 +277,11 @@ static int snd_pcm_oss_period_size(snd_pcm_substream_t *substream,
 	return 0;
 }
 
-static int choose_rate(snd_pcm_substream_t *substream,
-		       snd_pcm_hw_params_t *params, unsigned int best_rate)
+static int choose_rate(struct snd_pcm_substream *substream,
+		       struct snd_pcm_hw_params *params, unsigned int best_rate)
 {
-	snd_interval_t *it;
-	snd_pcm_hw_params_t *save;
+	struct snd_interval *it;
+	struct snd_pcm_hw_params *save;
 	unsigned int rate, prev;
 
 	save = kmalloc(sizeof(*save), GFP_KERNEL);
@@ -317,18 +317,18 @@ static int choose_rate(snd_pcm_substream_t *substream,
 	return snd_pcm_hw_param_near(substream, params, SNDRV_PCM_HW_PARAM_RATE, best_rate, NULL);
 }
 
-static int snd_pcm_oss_change_params(snd_pcm_substream_t *substream)
+static int snd_pcm_oss_change_params(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_pcm_hw_params_t *params, *sparams;
-	snd_pcm_sw_params_t *sw_params;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_pcm_hw_params *params, *sparams;
+	struct snd_pcm_sw_params *sw_params;
 	ssize_t oss_buffer_size, oss_period_size;
 	size_t oss_frame_size;
 	int err;
 	int direct;
 	int format, sformat, n;
-	snd_mask_t sformat_mask;
-	snd_mask_t mask;
+	struct snd_mask sformat_mask;
+	struct snd_mask mask;
 
 	sw_params = kmalloc(sizeof(*sw_params), GFP_KERNEL);
 	params = kmalloc(sizeof(*params), GFP_KERNEL);
@@ -342,7 +342,7 @@ static int snd_pcm_oss_change_params(snd_pcm_substream_t *substream)
 	if (atomic_read(&runtime->mmap_count)) {
 		direct = 1;
 	} else {
-		snd_pcm_oss_setup_t *setup = substream->oss.setup;
+		struct snd_pcm_oss_setup *setup = substream->oss.setup;
 		direct = (setup != NULL && setup->direct);
 	}
 
@@ -424,7 +424,7 @@ static int snd_pcm_oss_change_params(snd_pcm_substream_t *substream)
 			goto failure;
 		}
 		if (runtime->oss.plugin_first) {
-			snd_pcm_plugin_t *plugin;
+			struct snd_pcm_plugin *plugin;
 			if ((err = snd_pcm_plugin_build_io(substream, sparams, &plugin)) < 0) {
 				snd_printd("snd_pcm_plugin_build_io failed: %i\n", err);
 				snd_pcm_oss_plugin_clear(substream);
@@ -540,10 +540,10 @@ failure:
 	return err;
 }
 
-static int snd_pcm_oss_get_active_substream(snd_pcm_oss_file_t *pcm_oss_file, snd_pcm_substream_t **r_substream)
+static int snd_pcm_oss_get_active_substream(struct snd_pcm_oss_file *pcm_oss_file, struct snd_pcm_substream **r_substream)
 {
 	int idx, err;
-	snd_pcm_substream_t *asubstream = NULL, *substream;
+	struct snd_pcm_substream *asubstream = NULL, *substream;
 
 	for (idx = 0; idx < 2; idx++) {
 		substream = pcm_oss_file->streams[idx];
@@ -563,10 +563,10 @@ static int snd_pcm_oss_get_active_substream(snd_pcm_oss_file_t *pcm_oss_file, sn
 	return 0;
 }
 
-static int snd_pcm_oss_prepare(snd_pcm_substream_t *substream)
+static int snd_pcm_oss_prepare(struct snd_pcm_substream *substream)
 {
 	int err;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	err = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_PREPARE, NULL);
 	if (err < 0) {
@@ -581,9 +581,9 @@ static int snd_pcm_oss_prepare(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-static int snd_pcm_oss_make_ready(snd_pcm_substream_t *substream)
+static int snd_pcm_oss_make_ready(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	int err;
 
 	if (substream == NULL)
@@ -602,9 +602,9 @@ static int snd_pcm_oss_make_ready(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-static int snd_pcm_oss_capture_position_fixup(snd_pcm_substream_t *substream, snd_pcm_sframes_t *delay)
+static int snd_pcm_oss_capture_position_fixup(struct snd_pcm_substream *substream, snd_pcm_sframes_t *delay)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	snd_pcm_uframes_t frames;
 	int err = 0;
 
@@ -627,9 +627,9 @@ static int snd_pcm_oss_capture_position_fixup(snd_pcm_substream_t *substream, sn
 	return err;
 }
 
-snd_pcm_sframes_t snd_pcm_oss_write3(snd_pcm_substream_t *substream, const char *ptr, snd_pcm_uframes_t frames, int in_kernel)
+snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream, const char *ptr, snd_pcm_uframes_t frames, int in_kernel)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int ret;
 	while (1) {
 		if (runtime->status->state == SNDRV_PCM_STATE_XRUN ||
@@ -662,9 +662,9 @@ snd_pcm_sframes_t snd_pcm_oss_write3(snd_pcm_substream_t *substream, const char
 	return ret;
 }
 
-snd_pcm_sframes_t snd_pcm_oss_read3(snd_pcm_substream_t *substream, char *ptr, snd_pcm_uframes_t frames, int in_kernel)
+snd_pcm_sframes_t snd_pcm_oss_read3(struct snd_pcm_substream *substream, char *ptr, snd_pcm_uframes_t frames, int in_kernel)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_sframes_t delay;
 	int ret;
 	while (1) {
@@ -709,9 +709,9 @@ snd_pcm_sframes_t snd_pcm_oss_read3(snd_pcm_substream_t *substream, char *ptr, s
 	return ret;
 }
 
-snd_pcm_sframes_t snd_pcm_oss_writev3(snd_pcm_substream_t *substream, void **bufs, snd_pcm_uframes_t frames, int in_kernel)
+snd_pcm_sframes_t snd_pcm_oss_writev3(struct snd_pcm_substream *substream, void **bufs, snd_pcm_uframes_t frames, int in_kernel)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int ret;
 	while (1) {
 		if (runtime->status->state == SNDRV_PCM_STATE_XRUN ||
@@ -745,9 +745,9 @@ snd_pcm_sframes_t snd_pcm_oss_writev3(snd_pcm_substream_t *substream, void **buf
 	return ret;
 }
 	
-snd_pcm_sframes_t snd_pcm_oss_readv3(snd_pcm_substream_t *substream, void **bufs, snd_pcm_uframes_t frames, int in_kernel)
+snd_pcm_sframes_t snd_pcm_oss_readv3(struct snd_pcm_substream *substream, void **bufs, snd_pcm_uframes_t frames, int in_kernel)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int ret;
 	while (1) {
 		if (runtime->status->state == SNDRV_PCM_STATE_XRUN ||
@@ -780,12 +780,12 @@ snd_pcm_sframes_t snd_pcm_oss_readv3(snd_pcm_substream_t *substream, void **bufs
 	return ret;
 }
 
-static ssize_t snd_pcm_oss_write2(snd_pcm_substream_t *substream, const char *buf, size_t bytes, int in_kernel)
+static ssize_t snd_pcm_oss_write2(struct snd_pcm_substream *substream, const char *buf, size_t bytes, int in_kernel)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_sframes_t frames, frames1;
 	if (runtime->oss.plugin_first) {
-		snd_pcm_plugin_channel_t *channels;
+		struct snd_pcm_plugin_channel *channels;
 		size_t oss_frame_bytes = (runtime->oss.plugin_first->src_width * runtime->oss.plugin_first->src_format.channels) / 8;
 		if (!in_kernel) {
 			if (copy_from_user(runtime->oss.buffer, (const char __user *)buf, bytes))
@@ -810,11 +810,11 @@ static ssize_t snd_pcm_oss_write2(snd_pcm_substream_t *substream, const char *bu
 	return bytes;
 }
 
-static ssize_t snd_pcm_oss_write1(snd_pcm_substream_t *substream, const char __user *buf, size_t bytes)
+static ssize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const char __user *buf, size_t bytes)
 {
 	size_t xfer = 0;
 	ssize_t tmp;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	if (atomic_read(&runtime->mmap_count))
 		return -ENXIO;
@@ -867,13 +867,13 @@ static ssize_t snd_pcm_oss_write1(snd_pcm_substream_t *substream, const char __u
 	return xfer;
 }
 
-static ssize_t snd_pcm_oss_read2(snd_pcm_substream_t *substream, char *buf, size_t bytes, int in_kernel)
+static ssize_t snd_pcm_oss_read2(struct snd_pcm_substream *substream, char *buf, size_t bytes, int in_kernel)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_sframes_t frames, frames1;
 	char __user *final_dst = (char __user *)buf;
 	if (runtime->oss.plugin_first) {
-		snd_pcm_plugin_channel_t *channels;
+		struct snd_pcm_plugin_channel *channels;
 		size_t oss_frame_bytes = (runtime->oss.plugin_last->dst_width * runtime->oss.plugin_last->dst_format.channels) / 8;
 		if (!in_kernel)
 			buf = runtime->oss.buffer;
@@ -897,11 +897,11 @@ static ssize_t snd_pcm_oss_read2(snd_pcm_substream_t *substream, char *buf, size
 	return bytes;
 }
 
-static ssize_t snd_pcm_oss_read1(snd_pcm_substream_t *substream, char __user *buf, size_t bytes)
+static ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __user *buf, size_t bytes)
 {
 	size_t xfer = 0;
 	ssize_t tmp;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	if (atomic_read(&runtime->mmap_count))
 		return -ENXIO;
@@ -941,9 +941,9 @@ static ssize_t snd_pcm_oss_read1(snd_pcm_substream_t *substream, char __user *bu
 	return xfer;
 }
 
-static int snd_pcm_oss_reset(snd_pcm_oss_file_t *pcm_oss_file)
+static int snd_pcm_oss_reset(struct snd_pcm_oss_file *pcm_oss_file)
 {
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 
 	substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
 	if (substream != NULL) {
@@ -958,9 +958,9 @@ static int snd_pcm_oss_reset(snd_pcm_oss_file_t *pcm_oss_file)
 	return 0;
 }
 
-static int snd_pcm_oss_post(snd_pcm_oss_file_t *pcm_oss_file)
+static int snd_pcm_oss_post(struct snd_pcm_oss_file *pcm_oss_file)
 {
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	int err;
 
 	substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
@@ -974,9 +974,9 @@ static int snd_pcm_oss_post(snd_pcm_oss_file_t *pcm_oss_file)
 	return 0;
 }
 
-static int snd_pcm_oss_sync1(snd_pcm_substream_t *substream, size_t size)
+static int snd_pcm_oss_sync1(struct snd_pcm_substream *substream, size_t size)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	ssize_t result = 0;
 	long res;
 	wait_queue_t wait;
@@ -1020,12 +1020,12 @@ static int snd_pcm_oss_sync1(snd_pcm_substream_t *substream, size_t size)
 	return result;
 }
 
-static int snd_pcm_oss_sync(snd_pcm_oss_file_t *pcm_oss_file)
+static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
 {
 	int err = 0;
 	unsigned int saved_f_flags;
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
 	snd_pcm_format_t format;
 	unsigned long width;
 	size_t size;
@@ -1117,13 +1117,13 @@ static int snd_pcm_oss_sync(snd_pcm_oss_file_t *pcm_oss_file)
 	return 0;
 }
 
-static int snd_pcm_oss_set_rate(snd_pcm_oss_file_t *pcm_oss_file, int rate)
+static int snd_pcm_oss_set_rate(struct snd_pcm_oss_file *pcm_oss_file, int rate)
 {
 	int idx;
 
 	for (idx = 1; idx >= 0; --idx) {
-		snd_pcm_substream_t *substream = pcm_oss_file->streams[idx];
-		snd_pcm_runtime_t *runtime;
+		struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
+		struct snd_pcm_runtime *runtime;
 		if (substream == NULL)
 			continue;
 		runtime = substream->runtime;
@@ -1139,9 +1139,9 @@ static int snd_pcm_oss_set_rate(snd_pcm_oss_file_t *pcm_oss_file, int rate)
 	return snd_pcm_oss_get_rate(pcm_oss_file);
 }
 
-static int snd_pcm_oss_get_rate(snd_pcm_oss_file_t *pcm_oss_file)
+static int snd_pcm_oss_get_rate(struct snd_pcm_oss_file *pcm_oss_file)
 {
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	int err;
 	
 	if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0)
@@ -1149,7 +1149,7 @@ static int snd_pcm_oss_get_rate(snd_pcm_oss_file_t *pcm_oss_file)
 	return substream->runtime->oss.rate;
 }
 
-static int snd_pcm_oss_set_channels(snd_pcm_oss_file_t *pcm_oss_file, unsigned int channels)
+static int snd_pcm_oss_set_channels(struct snd_pcm_oss_file *pcm_oss_file, unsigned int channels)
 {
 	int idx;
 	if (channels < 1)
@@ -1157,8 +1157,8 @@ static int snd_pcm_oss_set_channels(snd_pcm_oss_file_t *pcm_oss_file, unsigned i
 	if (channels > 128)
 		return -EINVAL;
 	for (idx = 1; idx >= 0; --idx) {
-		snd_pcm_substream_t *substream = pcm_oss_file->streams[idx];
-		snd_pcm_runtime_t *runtime;
+		struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
+		struct snd_pcm_runtime *runtime;
 		if (substream == NULL)
 			continue;
 		runtime = substream->runtime;
@@ -1170,9 +1170,9 @@ static int snd_pcm_oss_set_channels(snd_pcm_oss_file_t *pcm_oss_file, unsigned i
 	return snd_pcm_oss_get_channels(pcm_oss_file);
 }
 
-static int snd_pcm_oss_get_channels(snd_pcm_oss_file_t *pcm_oss_file)
+static int snd_pcm_oss_get_channels(struct snd_pcm_oss_file *pcm_oss_file)
 {
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	int err;
 	
 	if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0)
@@ -1180,9 +1180,9 @@ static int snd_pcm_oss_get_channels(snd_pcm_oss_file_t *pcm_oss_file)
 	return substream->runtime->oss.channels;
 }
 
-static int snd_pcm_oss_get_block_size(snd_pcm_oss_file_t *pcm_oss_file)
+static int snd_pcm_oss_get_block_size(struct snd_pcm_oss_file *pcm_oss_file)
 {
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	int err;
 	
 	if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0)
@@ -1190,14 +1190,14 @@ static int snd_pcm_oss_get_block_size(snd_pcm_oss_file_t *pcm_oss_file)
 	return substream->runtime->oss.period_bytes;
 }
 
-static int snd_pcm_oss_get_formats(snd_pcm_oss_file_t *pcm_oss_file)
+static int snd_pcm_oss_get_formats(struct snd_pcm_oss_file *pcm_oss_file)
 {
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	int err;
 	int direct;
-	snd_pcm_hw_params_t *params;
+	struct snd_pcm_hw_params *params;
 	unsigned int formats = 0;
-	snd_mask_t format_mask;
+	struct snd_mask format_mask;
 	int fmt;
 
 	if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0)
@@ -1205,7 +1205,7 @@ static int snd_pcm_oss_get_formats(snd_pcm_oss_file_t *pcm_oss_file)
 	if (atomic_read(&substream->runtime->mmap_count)) {
 		direct = 1;
 	} else {
-		snd_pcm_oss_setup_t *setup = substream->oss.setup;
+		struct snd_pcm_oss_setup *setup = substream->oss.setup;
 		direct = (setup != NULL && setup->direct);
 	}
 	if (!direct)
@@ -1231,7 +1231,7 @@ static int snd_pcm_oss_get_formats(snd_pcm_oss_file_t *pcm_oss_file)
 	return formats;
 }
 
-static int snd_pcm_oss_set_format(snd_pcm_oss_file_t *pcm_oss_file, int format)
+static int snd_pcm_oss_set_format(struct snd_pcm_oss_file *pcm_oss_file, int format)
 {
 	int formats, idx;
 	
@@ -1240,8 +1240,8 @@ static int snd_pcm_oss_set_format(snd_pcm_oss_file_t *pcm_oss_file, int format)
 		if (!(formats & format))
 			format = AFMT_U8;
 		for (idx = 1; idx >= 0; --idx) {
-			snd_pcm_substream_t *substream = pcm_oss_file->streams[idx];
-			snd_pcm_runtime_t *runtime;
+			struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
+			struct snd_pcm_runtime *runtime;
 			if (substream == NULL)
 				continue;
 			runtime = substream->runtime;
@@ -1254,9 +1254,9 @@ static int snd_pcm_oss_set_format(snd_pcm_oss_file_t *pcm_oss_file, int format)
 	return snd_pcm_oss_get_format(pcm_oss_file);
 }
 
-static int snd_pcm_oss_get_format(snd_pcm_oss_file_t *pcm_oss_file)
+static int snd_pcm_oss_get_format(struct snd_pcm_oss_file *pcm_oss_file)
 {
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	int err;
 	
 	if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0)
@@ -1264,9 +1264,9 @@ static int snd_pcm_oss_get_format(snd_pcm_oss_file_t *pcm_oss_file)
 	return substream->runtime->oss.format;
 }
 
-static int snd_pcm_oss_set_subdivide1(snd_pcm_substream_t *substream, int subdivide)
+static int snd_pcm_oss_set_subdivide1(struct snd_pcm_substream *substream, int subdivide)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 
 	if (substream == NULL)
 		return 0;
@@ -1287,12 +1287,12 @@ static int snd_pcm_oss_set_subdivide1(snd_pcm_substream_t *substream, int subdiv
 	return subdivide;
 }
 
-static int snd_pcm_oss_set_subdivide(snd_pcm_oss_file_t *pcm_oss_file, int subdivide)
+static int snd_pcm_oss_set_subdivide(struct snd_pcm_oss_file *pcm_oss_file, int subdivide)
 {
 	int err = -EINVAL, idx;
 
 	for (idx = 1; idx >= 0; --idx) {
-		snd_pcm_substream_t *substream = pcm_oss_file->streams[idx];
+		struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
 		if (substream == NULL)
 			continue;
 		if ((err = snd_pcm_oss_set_subdivide1(substream, subdivide)) < 0)
@@ -1301,9 +1301,9 @@ static int snd_pcm_oss_set_subdivide(snd_pcm_oss_file_t *pcm_oss_file, int subdi
 	return err;
 }
 
-static int snd_pcm_oss_set_fragment1(snd_pcm_substream_t *substream, unsigned int val)
+static int snd_pcm_oss_set_fragment1(struct snd_pcm_substream *substream, unsigned int val)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 
 	if (substream == NULL)
 		return 0;
@@ -1320,12 +1320,12 @@ static int snd_pcm_oss_set_fragment1(snd_pcm_substream_t *substream, unsigned in
 	return 0;
 }
 
-static int snd_pcm_oss_set_fragment(snd_pcm_oss_file_t *pcm_oss_file, unsigned int val)
+static int snd_pcm_oss_set_fragment(struct snd_pcm_oss_file *pcm_oss_file, unsigned int val)
 {
 	int err = -EINVAL, idx;
 
 	for (idx = 1; idx >= 0; --idx) {
-		snd_pcm_substream_t *substream = pcm_oss_file->streams[idx];
+		struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
 		if (substream == NULL)
 			continue;
 		if ((err = snd_pcm_oss_set_fragment1(substream, val)) < 0)
@@ -1340,7 +1340,7 @@ static int snd_pcm_oss_nonblock(struct file * file)
 	return 0;
 }
 
-static int snd_pcm_oss_get_caps1(snd_pcm_substream_t *substream, int res)
+static int snd_pcm_oss_get_caps1(struct snd_pcm_substream *substream, int res)
 {
 
 	if (substream == NULL) {
@@ -1356,7 +1356,7 @@ static int snd_pcm_oss_get_caps1(snd_pcm_substream_t *substream, int res)
 	/* all ALSA drivers can return actual pointer in ring buffer */
 #if defined(DSP_CAP_REALTIME) && 0
 	{
-		snd_pcm_runtime_t *runtime = substream->runtime;
+		struct snd_pcm_runtime *runtime = substream->runtime;
 		if (runtime->info & (SNDRV_PCM_INFO_BLOCK_TRANSFER|SNDRV_PCM_INFO_BATCH))
 			res &= ~DSP_CAP_REALTIME;
 	}
@@ -1364,32 +1364,32 @@ static int snd_pcm_oss_get_caps1(snd_pcm_substream_t *substream, int res)
 	return res;
 }
 
-static int snd_pcm_oss_get_caps(snd_pcm_oss_file_t *pcm_oss_file)
+static int snd_pcm_oss_get_caps(struct snd_pcm_oss_file *pcm_oss_file)
 {
 	int result, idx;
 	
 	result = DSP_CAP_TRIGGER | DSP_CAP_MMAP	| DSP_CAP_DUPLEX | DSP_CAP_REALTIME;
 	for (idx = 0; idx < 2; idx++) {
-		snd_pcm_substream_t *substream = pcm_oss_file->streams[idx];
+		struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
 		result = snd_pcm_oss_get_caps1(substream, result);
 	}
 	result |= 0x0001;	/* revision - same as SB AWE 64 */
 	return result;
 }
 
-static void snd_pcm_oss_simulate_fill(snd_pcm_substream_t *substream, snd_pcm_uframes_t hw_ptr)
+static void snd_pcm_oss_simulate_fill(struct snd_pcm_substream *substream, snd_pcm_uframes_t hw_ptr)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_uframes_t appl_ptr;
 	appl_ptr = hw_ptr + runtime->buffer_size;
 	appl_ptr %= runtime->boundary;
 	runtime->control->appl_ptr = appl_ptr;
 }
 
-static int snd_pcm_oss_set_trigger(snd_pcm_oss_file_t *pcm_oss_file, int trigger)
+static int snd_pcm_oss_set_trigger(struct snd_pcm_oss_file *pcm_oss_file, int trigger)
 {
-	snd_pcm_runtime_t *runtime;
-	snd_pcm_substream_t *psubstream = NULL, *csubstream = NULL;
+	struct snd_pcm_runtime *runtime;
+	struct snd_pcm_substream *psubstream = NULL, *csubstream = NULL;
 	int err, cmd;
 
 #ifdef OSS_DEBUG
@@ -1454,9 +1454,9 @@ static int snd_pcm_oss_set_trigger(snd_pcm_oss_file_t *pcm_oss_file, int trigger
 	return 0;
 }
 
-static int snd_pcm_oss_get_trigger(snd_pcm_oss_file_t *pcm_oss_file)
+static int snd_pcm_oss_get_trigger(struct snd_pcm_oss_file *pcm_oss_file)
 {
-	snd_pcm_substream_t *psubstream = NULL, *csubstream = NULL;
+	struct snd_pcm_substream *psubstream = NULL, *csubstream = NULL;
 	int result = 0;
 
 	psubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
@@ -1468,10 +1468,10 @@ static int snd_pcm_oss_get_trigger(snd_pcm_oss_file_t *pcm_oss_file)
 	return result;
 }
 
-static int snd_pcm_oss_get_odelay(snd_pcm_oss_file_t *pcm_oss_file)
+static int snd_pcm_oss_get_odelay(struct snd_pcm_oss_file *pcm_oss_file)
 {
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
 	snd_pcm_sframes_t delay;
 	int err;
 
@@ -1491,10 +1491,10 @@ static int snd_pcm_oss_get_odelay(snd_pcm_oss_file_t *pcm_oss_file)
 	return snd_pcm_oss_bytes(substream, delay);
 }
 
-static int snd_pcm_oss_get_ptr(snd_pcm_oss_file_t *pcm_oss_file, int stream, struct count_info __user * _info)
+static int snd_pcm_oss_get_ptr(struct snd_pcm_oss_file *pcm_oss_file, int stream, struct count_info __user * _info)
 {	
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
 	snd_pcm_sframes_t delay;
 	int fixup;
 	struct count_info info;
@@ -1543,7 +1543,7 @@ static int snd_pcm_oss_get_ptr(snd_pcm_oss_file_t *pcm_oss_file, int stream, str
 	} else {
 		delay = snd_pcm_oss_bytes(substream, delay);
 		if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
-			snd_pcm_oss_setup_t *setup = substream->oss.setup;
+			struct snd_pcm_oss_setup *setup = substream->oss.setup;
 			if (setup && setup->buggyptr)
 				info.blocks = (runtime->oss.buffer_bytes - delay - fixup) / runtime->oss.period_bytes;
 			else
@@ -1560,10 +1560,10 @@ static int snd_pcm_oss_get_ptr(snd_pcm_oss_file_t *pcm_oss_file, int stream, str
 	return 0;
 }
 
-static int snd_pcm_oss_get_space(snd_pcm_oss_file_t *pcm_oss_file, int stream, struct audio_buf_info __user *_info)
+static int snd_pcm_oss_get_space(struct snd_pcm_oss_file *pcm_oss_file, int stream, struct audio_buf_info __user *_info)
 {
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
 	snd_pcm_sframes_t avail;
 	int fixup;
 	struct audio_buf_info info;
@@ -1619,17 +1619,17 @@ static int snd_pcm_oss_get_space(snd_pcm_oss_file_t *pcm_oss_file, int stream, s
 	return 0;
 }
 
-static int snd_pcm_oss_get_mapbuf(snd_pcm_oss_file_t *pcm_oss_file, int stream, struct buffmem_desc __user * _info)
+static int snd_pcm_oss_get_mapbuf(struct snd_pcm_oss_file *pcm_oss_file, int stream, struct buffmem_desc __user * _info)
 {
 	// it won't be probably implemented
 	// snd_printd("TODO: snd_pcm_oss_get_mapbuf\n");
 	return -EINVAL;
 }
 
-static snd_pcm_oss_setup_t *snd_pcm_oss_look_for_setup(snd_pcm_t *pcm, int stream, const char *task_name)
+static struct snd_pcm_oss_setup *snd_pcm_oss_look_for_setup(struct snd_pcm *pcm, int stream, const char *task_name)
 {
 	const char *ptr, *ptrl;
-	snd_pcm_oss_setup_t *setup;
+	struct snd_pcm_oss_setup *setup;
 
 	down(&pcm->streams[stream].oss.setup_mutex);
 	for (setup = pcm->streams[stream].oss.setup_list; setup; setup = setup->next) {
@@ -1659,11 +1659,11 @@ static snd_pcm_oss_setup_t *snd_pcm_oss_look_for_setup(snd_pcm_t *pcm, int strea
 	return NULL;
 }
 
-static void snd_pcm_oss_init_substream(snd_pcm_substream_t *substream,
-				       snd_pcm_oss_setup_t *setup,
+static void snd_pcm_oss_init_substream(struct snd_pcm_substream *substream,
+				       struct snd_pcm_oss_setup *setup,
 				       int minor)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 
 	substream->oss.oss = 1;
 	substream->oss.setup = setup;
@@ -1687,9 +1687,9 @@ static void snd_pcm_oss_init_substream(snd_pcm_substream_t *substream,
 	runtime->oss.subdivision = 0;
 }
 
-static void snd_pcm_oss_release_substream(snd_pcm_substream_t *substream)
+static void snd_pcm_oss_release_substream(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	runtime = substream->runtime;
 	vfree(runtime->oss.buffer);
 	snd_pcm_oss_plugin_clear(substream);
@@ -1697,13 +1697,13 @@ static void snd_pcm_oss_release_substream(snd_pcm_substream_t *substream)
 	substream->oss.oss = 0;
 }
 
-static int snd_pcm_oss_release_file(snd_pcm_oss_file_t *pcm_oss_file)
+static int snd_pcm_oss_release_file(struct snd_pcm_oss_file *pcm_oss_file)
 {
 	int cidx;
 	snd_assert(pcm_oss_file != NULL, return -ENXIO);
 	for (cidx = 0; cidx < 2; ++cidx) {
-		snd_pcm_substream_t *substream = pcm_oss_file->streams[cidx];
-		snd_pcm_runtime_t *runtime;
+		struct snd_pcm_substream *substream = pcm_oss_file->streams[cidx];
+		struct snd_pcm_runtime *runtime;
 		if (substream == NULL)
 			continue;
 		runtime = substream->runtime;
@@ -1726,15 +1726,15 @@ static int snd_pcm_oss_release_file(snd_pcm_oss_file_t *pcm_oss_file)
 }
 
 static int snd_pcm_oss_open_file(struct file *file,
-				 snd_pcm_t *pcm,
-				 snd_pcm_oss_file_t **rpcm_oss_file,
+				 struct snd_pcm *pcm,
+				 struct snd_pcm_oss_file **rpcm_oss_file,
 				 int minor,
-				 snd_pcm_oss_setup_t *psetup,
-				 snd_pcm_oss_setup_t *csetup)
+				 struct snd_pcm_oss_setup *psetup,
+				 struct snd_pcm_oss_setup *csetup)
 {
 	int err = 0;
-	snd_pcm_oss_file_t *pcm_oss_file;
-	snd_pcm_substream_t *psubstream = NULL, *csubstream = NULL;
+	struct snd_pcm_oss_file *pcm_oss_file;
+	struct snd_pcm_substream *psubstream = NULL, *csubstream = NULL;
 	unsigned int f_mode = file->f_mode;
 
 	snd_assert(rpcm_oss_file != NULL, return -EINVAL);
@@ -1839,9 +1839,9 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file)
 	int device;
 	int err;
 	char task_name[32];
-	snd_pcm_t *pcm;
-	snd_pcm_oss_file_t *pcm_oss_file;
-	snd_pcm_oss_setup_t *psetup = NULL, *csetup = NULL;
+	struct snd_pcm *pcm;
+	struct snd_pcm_oss_file *pcm_oss_file;
+	struct snd_pcm_oss_setup *psetup = NULL, *csetup = NULL;
 	int nonblock;
 	wait_queue_t wait;
 
@@ -1925,9 +1925,9 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file)
 
 static int snd_pcm_oss_release(struct inode *inode, struct file *file)
 {
-	snd_pcm_t *pcm;
-	snd_pcm_substream_t *substream;
-	snd_pcm_oss_file_t *pcm_oss_file;
+	struct snd_pcm *pcm;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_oss_file *pcm_oss_file;
 
 	pcm_oss_file = file->private_data;
 	substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
@@ -1947,7 +1947,7 @@ static int snd_pcm_oss_release(struct inode *inode, struct file *file)
 
 static long snd_pcm_oss_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	snd_pcm_oss_file_t *pcm_oss_file;
+	struct snd_pcm_oss_file *pcm_oss_file;
 	int __user *p = (int __user *)arg;
 	int res;
 
@@ -1958,7 +1958,7 @@ static long snd_pcm_oss_ioctl(struct file *file, unsigned int cmd, unsigned long
 		return put_user(1, p);
 #if defined(CONFIG_SND_MIXER_OSS) || (defined(MODULE) && defined(CONFIG_SND_MIXER_OSS_MODULE))
 	if (((cmd >> 8) & 0xff) == 'M')	{	/* mixer ioctl - for OSS compatibility */
-		snd_pcm_substream_t *substream;
+		struct snd_pcm_substream *substream;
 		int idx;
 		for (idx = 0; idx < 2; ++idx) {
 			substream = pcm_oss_file->streams[idx];
@@ -2113,8 +2113,8 @@ static long snd_pcm_oss_ioctl(struct file *file, unsigned int cmd, unsigned long
 
 static ssize_t snd_pcm_oss_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
 {
-	snd_pcm_oss_file_t *pcm_oss_file;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_oss_file *pcm_oss_file;
+	struct snd_pcm_substream *substream;
 
 	pcm_oss_file = file->private_data;
 	substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
@@ -2133,8 +2133,8 @@ static ssize_t snd_pcm_oss_read(struct file *file, char __user *buf, size_t coun
 
 static ssize_t snd_pcm_oss_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
 {
-	snd_pcm_oss_file_t *pcm_oss_file;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_oss_file *pcm_oss_file;
+	struct snd_pcm_substream *substream;
 	long result;
 
 	pcm_oss_file = file->private_data;
@@ -2150,18 +2150,18 @@ static ssize_t snd_pcm_oss_write(struct file *file, const char __user *buf, size
 	return result;
 }
 
-static int snd_pcm_oss_playback_ready(snd_pcm_substream_t *substream)
+static int snd_pcm_oss_playback_ready(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (atomic_read(&runtime->mmap_count))
 		return runtime->oss.prev_hw_ptr_interrupt != runtime->hw_ptr_interrupt;
 	else
 		return snd_pcm_playback_avail(runtime) >= runtime->oss.period_frames;
 }
 
-static int snd_pcm_oss_capture_ready(snd_pcm_substream_t *substream)
+static int snd_pcm_oss_capture_ready(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	if (atomic_read(&runtime->mmap_count))
 		return runtime->oss.prev_hw_ptr_interrupt != runtime->hw_ptr_interrupt;
 	else
@@ -2170,9 +2170,9 @@ static int snd_pcm_oss_capture_ready(snd_pcm_substream_t *substream)
 
 static unsigned int snd_pcm_oss_poll(struct file *file, poll_table * wait)
 {
-	snd_pcm_oss_file_t *pcm_oss_file;
+	struct snd_pcm_oss_file *pcm_oss_file;
 	unsigned int mask;
-	snd_pcm_substream_t *psubstream = NULL, *csubstream = NULL;
+	struct snd_pcm_substream *psubstream = NULL, *csubstream = NULL;
 	
 	pcm_oss_file = file->private_data;
 
@@ -2181,7 +2181,7 @@ static unsigned int snd_pcm_oss_poll(struct file *file, poll_table * wait)
 
 	mask = 0;
 	if (psubstream != NULL) {
-		snd_pcm_runtime_t *runtime = psubstream->runtime;
+		struct snd_pcm_runtime *runtime = psubstream->runtime;
 		poll_wait(file, &runtime->sleep, wait);
 		snd_pcm_stream_lock_irq(psubstream);
 		if (runtime->status->state != SNDRV_PCM_STATE_DRAINING &&
@@ -2191,8 +2191,8 @@ static unsigned int snd_pcm_oss_poll(struct file *file, poll_table * wait)
 		snd_pcm_stream_unlock_irq(psubstream);
 	}
 	if (csubstream != NULL) {
-		snd_pcm_runtime_t *runtime = csubstream->runtime;
-		enum sndrv_pcm_state ostate;
+		struct snd_pcm_runtime *runtime = csubstream->runtime;
+		snd_pcm_state_t ostate;
 		poll_wait(file, &runtime->sleep, wait);
 		snd_pcm_stream_lock_irq(csubstream);
 		if ((ostate = runtime->status->state) != SNDRV_PCM_STATE_RUNNING ||
@@ -2200,7 +2200,7 @@ static unsigned int snd_pcm_oss_poll(struct file *file, poll_table * wait)
 			mask |= POLLIN | POLLRDNORM;
 		snd_pcm_stream_unlock_irq(csubstream);
 		if (ostate != SNDRV_PCM_STATE_RUNNING && runtime->oss.trigger) {
-			snd_pcm_oss_file_t ofile;
+			struct snd_pcm_oss_file ofile;
 			memset(&ofile, 0, sizeof(ofile));
 			ofile.streams[SNDRV_PCM_STREAM_CAPTURE] = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
 			runtime->oss.trigger = 0;
@@ -2213,9 +2213,9 @@ static unsigned int snd_pcm_oss_poll(struct file *file, poll_table * wait)
 
 static int snd_pcm_oss_mmap(struct file *file, struct vm_area_struct *area)
 {
-	snd_pcm_oss_file_t *pcm_oss_file;
-	snd_pcm_substream_t *substream = NULL;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_oss_file *pcm_oss_file;
+	struct snd_pcm_substream *substream = NULL;
+	struct snd_pcm_runtime *runtime;
 	int err;
 
 #ifdef OSS_DEBUG
@@ -2279,11 +2279,11 @@ static int snd_pcm_oss_mmap(struct file *file, struct vm_area_struct *area)
  *  /proc interface
  */
 
-static void snd_pcm_oss_proc_read(snd_info_entry_t *entry,
-				  snd_info_buffer_t * buffer)
+static void snd_pcm_oss_proc_read(struct snd_info_entry *entry,
+				  struct snd_info_buffer *buffer)
 {
-	snd_pcm_str_t *pstr = (snd_pcm_str_t *)entry->private_data;
-	snd_pcm_oss_setup_t *setup = pstr->oss.setup_list;
+	struct snd_pcm_str *pstr = entry->private_data;
+	struct snd_pcm_oss_setup *setup = pstr->oss.setup_list;
 	down(&pstr->oss.setup_mutex);
 	while (setup) {
 		snd_iprintf(buffer, "%s %u %u%s%s%s%s%s%s\n",
@@ -2301,11 +2301,11 @@ static void snd_pcm_oss_proc_read(snd_info_entry_t *entry,
 	up(&pstr->oss.setup_mutex);
 }
 
-static void snd_pcm_oss_proc_free_setup_list(snd_pcm_str_t * pstr)
+static void snd_pcm_oss_proc_free_setup_list(struct snd_pcm_str * pstr)
 {
 	unsigned int idx;
-	snd_pcm_substream_t *substream;
-	snd_pcm_oss_setup_t *setup, *setupn;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_oss_setup *setup, *setupn;
 
 	for (idx = 0, substream = pstr->substream;
 	     idx < pstr->substream_count; idx++, substream = substream->next)
@@ -2319,13 +2319,13 @@ static void snd_pcm_oss_proc_free_setup_list(snd_pcm_str_t * pstr)
 	pstr->oss.setup_list = NULL;
 }
 
-static void snd_pcm_oss_proc_write(snd_info_entry_t *entry,
-				   snd_info_buffer_t * buffer)
+static void snd_pcm_oss_proc_write(struct snd_info_entry *entry,
+				   struct snd_info_buffer *buffer)
 {
-	snd_pcm_str_t *pstr = (snd_pcm_str_t *)entry->private_data;
+	struct snd_pcm_str *pstr = entry->private_data;
 	char line[128], str[32], task_name[32], *ptr;
 	int idx1;
-	snd_pcm_oss_setup_t *setup, *setup1, template;
+	struct snd_pcm_oss_setup *setup, *setup1, template;
 
 	while (!snd_info_get_line(buffer, line, sizeof(line))) {
 		down(&pstr->oss.setup_mutex);
@@ -2370,7 +2370,7 @@ static void snd_pcm_oss_proc_write(snd_info_entry_t *entry,
 			}
 		} while (*str);
 		if (setup == NULL) {
-			setup = (snd_pcm_oss_setup_t *) kmalloc(sizeof(snd_pcm_oss_setup_t), GFP_KERNEL);
+			setup = kmalloc(sizeof(struct snd_pcm_oss_setup), GFP_KERNEL);
 			if (setup) {
 				if (pstr->oss.setup_list == NULL) {
 					pstr->oss.setup_list = setup;
@@ -2389,12 +2389,12 @@ static void snd_pcm_oss_proc_write(snd_info_entry_t *entry,
 	}
 }
 
-static void snd_pcm_oss_proc_init(snd_pcm_t *pcm)
+static void snd_pcm_oss_proc_init(struct snd_pcm *pcm)
 {
 	int stream;
 	for (stream = 0; stream < 2; ++stream) {
-		snd_info_entry_t *entry;
-		snd_pcm_str_t *pstr = &pcm->streams[stream];
+		struct snd_info_entry *entry;
+		struct snd_pcm_str *pstr = &pcm->streams[stream];
 		if (pstr->substream_count == 0)
 			continue;
 		if ((entry = snd_info_create_card_entry(pcm->card, "oss", pstr->proc_root)) != NULL) {
@@ -2414,11 +2414,11 @@ static void snd_pcm_oss_proc_init(snd_pcm_t *pcm)
 	}
 }
 
-static void snd_pcm_oss_proc_done(snd_pcm_t *pcm)
+static void snd_pcm_oss_proc_done(struct snd_pcm *pcm)
 {
 	int stream;
 	for (stream = 0; stream < 2; ++stream) {
-		snd_pcm_str_t *pstr = &pcm->streams[stream];
+		struct snd_pcm_str *pstr = &pcm->streams[stream];
 		if (pstr->oss.proc_entry) {
 			snd_info_unregister(pstr->oss.proc_entry);
 			pstr->oss.proc_entry = NULL;
@@ -2444,13 +2444,13 @@ static struct file_operations snd_pcm_oss_f_reg =
 	.mmap =		snd_pcm_oss_mmap,
 };
 
-static snd_minor_t snd_pcm_oss_reg =
+static struct snd_minor snd_pcm_oss_reg =
 {
 	.comment =	"digital audio",
 	.f_ops =	&snd_pcm_oss_f_reg,
 };
 
-static void register_oss_dsp(snd_pcm_t *pcm, int index)
+static void register_oss_dsp(struct snd_pcm *pcm, int index)
 {
 	char name[128];
 	sprintf(name, "dsp%i%i", pcm->card->number, pcm->device);
@@ -2462,7 +2462,7 @@ static void register_oss_dsp(snd_pcm_t *pcm, int index)
 	}
 }
 
-static int snd_pcm_oss_register_minor(snd_pcm_t * pcm)
+static int snd_pcm_oss_register_minor(struct snd_pcm *pcm)
 {
 	pcm->oss.reg = 0;
 	if (dsp_map[pcm->card->number] == (int)pcm->device) {
@@ -2493,7 +2493,7 @@ static int snd_pcm_oss_register_minor(snd_pcm_t * pcm)
 	return 0;
 }
 
-static int snd_pcm_oss_disconnect_minor(snd_pcm_t * pcm)
+static int snd_pcm_oss_disconnect_minor(struct snd_pcm *pcm)
 {
 	if (pcm->oss.reg) {
 		if (pcm->oss.reg_mask & 1) {
@@ -2510,7 +2510,7 @@ static int snd_pcm_oss_disconnect_minor(snd_pcm_t * pcm)
 	return 0;
 }
 
-static int snd_pcm_oss_unregister_minor(snd_pcm_t * pcm)
+static int snd_pcm_oss_unregister_minor(struct snd_pcm *pcm)
 {
 	snd_pcm_oss_disconnect_minor(pcm);
 	if (pcm->oss.reg) {
@@ -2525,7 +2525,7 @@ static int snd_pcm_oss_unregister_minor(snd_pcm_t * pcm)
 	return 0;
 }
 
-static snd_pcm_notify_t snd_pcm_oss_notify =
+static struct snd_pcm_notify snd_pcm_oss_notify =
 {
 	.n_register =	snd_pcm_oss_register_minor,
 	.n_disconnect = snd_pcm_oss_disconnect_minor,
diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
index 312ae1f2bfc..7e8676880dd 100644
--- a/sound/core/oss/pcm_plugin.c
+++ b/sound/core/oss/pcm_plugin.c
@@ -36,7 +36,7 @@
 #define snd_pcm_plug_first(plug) ((plug)->runtime->oss.plugin_first)
 #define snd_pcm_plug_last(plug) ((plug)->runtime->oss.plugin_last)
 
-static int snd_pcm_plugin_src_channels_mask(snd_pcm_plugin_t *plugin,
+static int snd_pcm_plugin_src_channels_mask(struct snd_pcm_plugin *plugin,
 					    unsigned long *dst_vmask,
 					    unsigned long **src_vmask)
 {
@@ -46,7 +46,7 @@ static int snd_pcm_plugin_src_channels_mask(snd_pcm_plugin_t *plugin,
 	return 0;
 }
 
-static int snd_pcm_plugin_dst_channels_mask(snd_pcm_plugin_t *plugin,
+static int snd_pcm_plugin_dst_channels_mask(struct snd_pcm_plugin *plugin,
 					    unsigned long *src_vmask,
 					    unsigned long **dst_vmask)
 {
@@ -67,13 +67,13 @@ static int rate_match(unsigned int src_rate, unsigned int dst_rate)
 	return dst_rate >= low && dst_rate <= high;
 }
 
-static int snd_pcm_plugin_alloc(snd_pcm_plugin_t *plugin, snd_pcm_uframes_t frames)
+static int snd_pcm_plugin_alloc(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t frames)
 {
-	snd_pcm_plugin_format_t *format;
+	struct snd_pcm_plugin_format *format;
 	ssize_t width;
 	size_t size;
 	unsigned int channel;
-	snd_pcm_plugin_channel_t *c;
+	struct snd_pcm_plugin_channel *c;
 
 	if (plugin->stream == SNDRV_PCM_STREAM_PLAYBACK) {
 		format = &plugin->src_format;
@@ -120,12 +120,12 @@ static int snd_pcm_plugin_alloc(snd_pcm_plugin_t *plugin, snd_pcm_uframes_t fram
 	return 0;
 }
 
-int snd_pcm_plug_alloc(snd_pcm_plug_t *plug, snd_pcm_uframes_t frames)
+int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)
 {
 	int err;
 	snd_assert(snd_pcm_plug_first(plug) != NULL, return -ENXIO);
 	if (snd_pcm_plug_stream(plug) == SNDRV_PCM_STREAM_PLAYBACK) {
-		snd_pcm_plugin_t *plugin = snd_pcm_plug_first(plug);
+		struct snd_pcm_plugin *plugin = snd_pcm_plug_first(plug);
 		while (plugin->next) {
 			if (plugin->dst_frames)
 				frames = plugin->dst_frames(plugin, frames);
@@ -136,7 +136,7 @@ int snd_pcm_plug_alloc(snd_pcm_plug_t *plug, snd_pcm_uframes_t frames)
 				return err;
 		}
 	} else {
-		snd_pcm_plugin_t *plugin = snd_pcm_plug_last(plug);
+		struct snd_pcm_plugin *plugin = snd_pcm_plug_last(plug);
 		while (plugin->prev) {
 			if (plugin->src_frames)
 				frames = plugin->src_frames(plugin, frames);
@@ -151,22 +151,22 @@ int snd_pcm_plug_alloc(snd_pcm_plug_t *plug, snd_pcm_uframes_t frames)
 }
 
 
-snd_pcm_sframes_t snd_pcm_plugin_client_channels(snd_pcm_plugin_t *plugin,
+snd_pcm_sframes_t snd_pcm_plugin_client_channels(struct snd_pcm_plugin *plugin,
 				       snd_pcm_uframes_t frames,
-				       snd_pcm_plugin_channel_t **channels)
+				       struct snd_pcm_plugin_channel **channels)
 {
 	*channels = plugin->buf_channels;
 	return frames;
 }
 
-int snd_pcm_plugin_build(snd_pcm_plug_t *plug,
+int snd_pcm_plugin_build(struct snd_pcm_substream *plug,
 			 const char *name,
-			 snd_pcm_plugin_format_t *src_format,
-			 snd_pcm_plugin_format_t *dst_format,
+			 struct snd_pcm_plugin_format *src_format,
+			 struct snd_pcm_plugin_format *dst_format,
 			 size_t extra,
-			 snd_pcm_plugin_t **ret)
+			 struct snd_pcm_plugin **ret)
 {
-	snd_pcm_plugin_t *plugin;
+	struct snd_pcm_plugin *plugin;
 	unsigned int channels;
 	
 	snd_assert(plug != NULL, return -ENXIO);
@@ -210,7 +210,7 @@ int snd_pcm_plugin_build(snd_pcm_plug_t *plug,
 	return 0;
 }
 
-int snd_pcm_plugin_free(snd_pcm_plugin_t *plugin)
+int snd_pcm_plugin_free(struct snd_pcm_plugin *plugin)
 {
 	if (! plugin)
 		return 0;
@@ -224,9 +224,9 @@ int snd_pcm_plugin_free(snd_pcm_plugin_t *plugin)
 	return 0;
 }
 
-snd_pcm_sframes_t snd_pcm_plug_client_size(snd_pcm_plug_t *plug, snd_pcm_uframes_t drv_frames)
+snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *plug, snd_pcm_uframes_t drv_frames)
 {
-	snd_pcm_plugin_t *plugin, *plugin_prev, *plugin_next;
+	struct snd_pcm_plugin *plugin, *plugin_prev, *plugin_next;
 	int stream = snd_pcm_plug_stream(plug);
 
 	snd_assert(plug != NULL, return -ENXIO);
@@ -253,9 +253,9 @@ snd_pcm_sframes_t snd_pcm_plug_client_size(snd_pcm_plug_t *plug, snd_pcm_uframes
 	return drv_frames;
 }
 
-snd_pcm_sframes_t snd_pcm_plug_slave_size(snd_pcm_plug_t *plug, snd_pcm_uframes_t clt_frames)
+snd_pcm_sframes_t snd_pcm_plug_slave_size(struct snd_pcm_substream *plug, snd_pcm_uframes_t clt_frames)
 {
-	snd_pcm_plugin_t *plugin, *plugin_prev, *plugin_next;
+	struct snd_pcm_plugin *plugin, *plugin_prev, *plugin_next;
 	snd_pcm_sframes_t frames;
 	int stream = snd_pcm_plug_stream(plug);
 	
@@ -290,9 +290,9 @@ snd_pcm_sframes_t snd_pcm_plug_slave_size(snd_pcm_plug_t *plug, snd_pcm_uframes_
 	return frames;
 }
 
-static int snd_pcm_plug_formats(snd_mask_t *mask, int format)
+static int snd_pcm_plug_formats(struct snd_mask *mask, int format)
 {
-	snd_mask_t formats = *mask;
+	struct snd_mask formats = *mask;
 	u64 linfmts = (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 |
 		       SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_S16_LE |
 		       SNDRV_PCM_FMTBIT_U16_BE | SNDRV_PCM_FMTBIT_S16_BE |
@@ -326,7 +326,7 @@ static int preferred_formats[] = {
 	SNDRV_PCM_FORMAT_U8
 };
 
-int snd_pcm_plug_slave_format(int format, snd_mask_t *format_mask)
+int snd_pcm_plug_slave_format(int format, struct snd_mask *format_mask)
 {
 	if (snd_mask_test(format_mask, format))
 		return format;
@@ -376,15 +376,15 @@ int snd_pcm_plug_slave_format(int format, snd_mask_t *format_mask)
 	}
 }
 
-int snd_pcm_plug_format_plugins(snd_pcm_plug_t *plug,
-				snd_pcm_hw_params_t *params,
-				snd_pcm_hw_params_t *slave_params)
+int snd_pcm_plug_format_plugins(struct snd_pcm_substream *plug,
+				struct snd_pcm_hw_params *params,
+				struct snd_pcm_hw_params *slave_params)
 {
-	snd_pcm_plugin_format_t tmpformat;
-	snd_pcm_plugin_format_t dstformat;
-	snd_pcm_plugin_format_t srcformat;
+	struct snd_pcm_plugin_format tmpformat;
+	struct snd_pcm_plugin_format dstformat;
+	struct snd_pcm_plugin_format srcformat;
 	int src_access, dst_access;
-	snd_pcm_plugin_t *plugin = NULL;
+	struct snd_pcm_plugin *plugin = NULL;
 	int err;
 	int stream = snd_pcm_plug_stream(plug);
 	int slave_interleaved = (params_channels(slave_params) == 1 ||
@@ -462,7 +462,7 @@ int snd_pcm_plug_format_plugins(snd_pcm_plug_t *plug,
 	if (srcformat.channels > dstformat.channels) {
 		int sv = srcformat.channels;
 		int dv = dstformat.channels;
-		route_ttable_entry_t *ttable = kcalloc(dv * sv, sizeof(*ttable), GFP_KERNEL);
+		int *ttable = kcalloc(dv * sv, sizeof(*ttable), GFP_KERNEL);
 		if (ttable == NULL)
 			return -ENOMEM;
 #if 1
@@ -525,7 +525,7 @@ int snd_pcm_plug_format_plugins(snd_pcm_plug_t *plug,
 	if (srcformat.channels < dstformat.channels) {
 		int sv = srcformat.channels;
 		int dv = dstformat.channels;
-		route_ttable_entry_t *ttable = kcalloc(dv * sv, sizeof(*ttable), GFP_KERNEL);
+		int *ttable = kcalloc(dv * sv, sizeof(*ttable), GFP_KERNEL);
 		if (ttable == NULL)
 			return -ENOMEM;
 #if 0
@@ -614,14 +614,14 @@ int snd_pcm_plug_format_plugins(snd_pcm_plug_t *plug,
 	return 0;
 }
 
-snd_pcm_sframes_t snd_pcm_plug_client_channels_buf(snd_pcm_plug_t *plug,
+snd_pcm_sframes_t snd_pcm_plug_client_channels_buf(struct snd_pcm_substream *plug,
 					 char *buf,
 					 snd_pcm_uframes_t count,
-					 snd_pcm_plugin_channel_t **channels)
+					 struct snd_pcm_plugin_channel **channels)
 {
-	snd_pcm_plugin_t *plugin;
-	snd_pcm_plugin_channel_t *v;
-	snd_pcm_plugin_format_t *format;
+	struct snd_pcm_plugin *plugin;
+	struct snd_pcm_plugin_channel *v;
+	struct snd_pcm_plugin_format *format;
 	int width, nchannels, channel;
 	int stream = snd_pcm_plug_stream(plug);
 
@@ -650,10 +650,10 @@ snd_pcm_sframes_t snd_pcm_plug_client_channels_buf(snd_pcm_plug_t *plug,
 	return count;
 }
 
-static int snd_pcm_plug_playback_channels_mask(snd_pcm_plug_t *plug,
+static int snd_pcm_plug_playback_channels_mask(struct snd_pcm_substream *plug,
 					       unsigned long *client_vmask)
 {
-	snd_pcm_plugin_t *plugin = snd_pcm_plug_last(plug);
+	struct snd_pcm_plugin *plugin = snd_pcm_plug_last(plug);
 	if (plugin == NULL) {
 		return 0;
 	} else {
@@ -678,10 +678,10 @@ static int snd_pcm_plug_playback_channels_mask(snd_pcm_plug_t *plug,
 	}
 }
 
-static int snd_pcm_plug_playback_disable_useless_channels(snd_pcm_plug_t *plug,
-							  snd_pcm_plugin_channel_t *src_channels)
+static int snd_pcm_plug_playback_disable_useless_channels(struct snd_pcm_substream *plug,
+							  struct snd_pcm_plugin_channel *src_channels)
 {
-	snd_pcm_plugin_t *plugin = snd_pcm_plug_first(plug);
+	struct snd_pcm_plugin *plugin = snd_pcm_plug_first(plug);
 	unsigned int nchannels = plugin->src_format.channels;
 	DECLARE_BITMAP(bs, nchannels);
 	unsigned long *srcmask = bs;
@@ -703,11 +703,11 @@ static int snd_pcm_plug_playback_disable_useless_channels(snd_pcm_plug_t *plug,
 	return 0;
 }
 
-static int snd_pcm_plug_capture_disable_useless_channels(snd_pcm_plug_t *plug,
-							 snd_pcm_plugin_channel_t *src_channels,
-							 snd_pcm_plugin_channel_t *client_channels)
+static int snd_pcm_plug_capture_disable_useless_channels(struct snd_pcm_substream *plug,
+							 struct snd_pcm_plugin_channel *src_channels,
+							 struct snd_pcm_plugin_channel *client_channels)
 {
-	snd_pcm_plugin_t *plugin = snd_pcm_plug_last(plug);
+	struct snd_pcm_plugin *plugin = snd_pcm_plug_last(plug);
 	unsigned int nchannels = plugin->dst_format.channels;
 	DECLARE_BITMAP(bs, nchannels);
 	unsigned long *dstmask = bs;
@@ -736,10 +736,10 @@ static int snd_pcm_plug_capture_disable_useless_channels(snd_pcm_plug_t *plug,
 	return 0;
 }
 
-snd_pcm_sframes_t snd_pcm_plug_write_transfer(snd_pcm_plug_t *plug, snd_pcm_plugin_channel_t *src_channels, snd_pcm_uframes_t size)
+snd_pcm_sframes_t snd_pcm_plug_write_transfer(struct snd_pcm_substream *plug, struct snd_pcm_plugin_channel *src_channels, snd_pcm_uframes_t size)
 {
-	snd_pcm_plugin_t *plugin, *next;
-	snd_pcm_plugin_channel_t *dst_channels;
+	struct snd_pcm_plugin *plugin, *next;
+	struct snd_pcm_plugin_channel *dst_channels;
 	int err;
 	snd_pcm_sframes_t frames = size;
 
@@ -771,10 +771,10 @@ snd_pcm_sframes_t snd_pcm_plug_write_transfer(snd_pcm_plug_t *plug, snd_pcm_plug
 	return snd_pcm_plug_client_size(plug, frames);
 }
 
-snd_pcm_sframes_t snd_pcm_plug_read_transfer(snd_pcm_plug_t *plug, snd_pcm_plugin_channel_t *dst_channels_final, snd_pcm_uframes_t size)
+snd_pcm_sframes_t snd_pcm_plug_read_transfer(struct snd_pcm_substream *plug, struct snd_pcm_plugin_channel *dst_channels_final, snd_pcm_uframes_t size)
 {
-	snd_pcm_plugin_t *plugin, *next;
-	snd_pcm_plugin_channel_t *src_channels, *dst_channels;
+	struct snd_pcm_plugin *plugin, *next;
+	struct snd_pcm_plugin_channel *src_channels, *dst_channels;
 	snd_pcm_sframes_t frames = size;
 	int err;
 
@@ -806,7 +806,7 @@ snd_pcm_sframes_t snd_pcm_plug_read_transfer(snd_pcm_plug_t *plug, snd_pcm_plugi
 	return frames;
 }
 
-int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_area, size_t dst_offset,
+int snd_pcm_area_silence(const struct snd_pcm_channel_area *dst_area, size_t dst_offset,
 			 size_t samples, int format)
 {
 	/* FIXME: sub byte resolution and odd dst_offset */
@@ -852,8 +852,8 @@ int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_area, size_t dst_offs
 	return 0;
 }
 
-int snd_pcm_area_copy(const snd_pcm_channel_area_t *src_area, size_t src_offset,
-		      const snd_pcm_channel_area_t *dst_area, size_t dst_offset,
+int snd_pcm_area_copy(const struct snd_pcm_channel_area *src_area, size_t src_offset,
+		      const struct snd_pcm_channel_area *dst_area, size_t dst_offset,
 		      size_t samples, int format)
 {
 	/* FIXME: sub byte resolution and odd dst_offset */
diff --git a/sound/core/oss/pcm_plugin.h b/sound/core/oss/pcm_plugin.h
index 69a43172142..29198da615c 100644
--- a/sound/core/oss/pcm_plugin.h
+++ b/sound/core/oss/pcm_plugin.h
@@ -29,147 +29,157 @@ static inline unsigned long *bitmap_alloc(unsigned int nbits)
 	return kmalloc(BITS_TO_LONGS(nbits), GFP_KERNEL);
 }
 
-#define snd_pcm_plug_t snd_pcm_substream_t
 #define snd_pcm_plug_stream(plug) ((plug)->stream)
 
-typedef enum {
+enum snd_pcm_plugin_action {
 	INIT = 0,
 	PREPARE = 1,
-} snd_pcm_plugin_action_t;
+};
 
-typedef struct _snd_pcm_channel_area {
+struct snd_pcm_channel_area {
 	void *addr;			/* base address of channel samples */
 	unsigned int first;		/* offset to first sample in bits */
 	unsigned int step;		/* samples distance in bits */
-} snd_pcm_channel_area_t;
+};
 
-typedef struct _snd_pcm_plugin_channel {
+struct snd_pcm_plugin_channel {
 	void *aptr;			/* pointer to the allocated area */
-	snd_pcm_channel_area_t area;
+	struct snd_pcm_channel_area area;
 	snd_pcm_uframes_t frames;	/* allocated frames */
 	unsigned int enabled:1;		/* channel need to be processed */
 	unsigned int wanted:1;		/* channel is wanted */
-} snd_pcm_plugin_channel_t;
+};
 
-typedef struct _snd_pcm_plugin_format {
+struct snd_pcm_plugin_format {
 	int format;
 	unsigned int rate;
 	unsigned int channels;
-} snd_pcm_plugin_format_t;
+};
 
-struct _snd_pcm_plugin {
+struct snd_pcm_plugin {
 	const char *name;		/* plug-in name */
 	int stream;
-	snd_pcm_plugin_format_t src_format;	/* source format */
-	snd_pcm_plugin_format_t dst_format;	/* destination format */
+	struct snd_pcm_plugin_format src_format;	/* source format */
+	struct snd_pcm_plugin_format dst_format;	/* destination format */
 	int src_width;			/* sample width in bits */
 	int dst_width;			/* sample width in bits */
 	int access;
-	snd_pcm_sframes_t (*src_frames)(snd_pcm_plugin_t *plugin, snd_pcm_uframes_t dst_frames);
-	snd_pcm_sframes_t (*dst_frames)(snd_pcm_plugin_t *plugin, snd_pcm_uframes_t src_frames);
-	snd_pcm_sframes_t (*client_channels)(snd_pcm_plugin_t *plugin,
-				 snd_pcm_uframes_t frames,
-				 snd_pcm_plugin_channel_t **channels);
-	int (*src_channels_mask)(snd_pcm_plugin_t *plugin,
+	snd_pcm_sframes_t (*src_frames)(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t dst_frames);
+	snd_pcm_sframes_t (*dst_frames)(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t src_frames);
+	snd_pcm_sframes_t (*client_channels)(struct snd_pcm_plugin *plugin,
+					     snd_pcm_uframes_t frames,
+					     struct snd_pcm_plugin_channel **channels);
+	int (*src_channels_mask)(struct snd_pcm_plugin *plugin,
 				 unsigned long *dst_vmask,
 				 unsigned long **src_vmask);
-	int (*dst_channels_mask)(snd_pcm_plugin_t *plugin,
+	int (*dst_channels_mask)(struct snd_pcm_plugin *plugin,
 				 unsigned long *src_vmask,
 				 unsigned long **dst_vmask);
-	snd_pcm_sframes_t (*transfer)(snd_pcm_plugin_t *plugin,
-			    const snd_pcm_plugin_channel_t *src_channels,
-			    snd_pcm_plugin_channel_t *dst_channels,
-			    snd_pcm_uframes_t frames);
-	int (*action)(snd_pcm_plugin_t *plugin,
-		      snd_pcm_plugin_action_t action,
+	snd_pcm_sframes_t (*transfer)(struct snd_pcm_plugin *plugin,
+				      const struct snd_pcm_plugin_channel *src_channels,
+				      struct snd_pcm_plugin_channel *dst_channels,
+				      snd_pcm_uframes_t frames);
+	int (*action)(struct snd_pcm_plugin *plugin,
+		      enum snd_pcm_plugin_action action,
 		      unsigned long data);
-	snd_pcm_plugin_t *prev;
-	snd_pcm_plugin_t *next;
-	snd_pcm_plug_t *plug;
+	struct snd_pcm_plugin *prev;
+	struct snd_pcm_plugin *next;
+	struct snd_pcm_substream *plug;
 	void *private_data;
-	void (*private_free)(snd_pcm_plugin_t *plugin);
+	void (*private_free)(struct snd_pcm_plugin *plugin);
 	char *buf;
 	snd_pcm_uframes_t buf_frames;
-	snd_pcm_plugin_channel_t *buf_channels;
+	struct snd_pcm_plugin_channel *buf_channels;
 	unsigned long *src_vmask;
 	unsigned long *dst_vmask;
 	char extra_data[0];
 };
 
-int snd_pcm_plugin_build(snd_pcm_plug_t *handle,
+int snd_pcm_plugin_build(struct snd_pcm_substream *handle,
                          const char *name,
-                         snd_pcm_plugin_format_t *src_format,
-                         snd_pcm_plugin_format_t *dst_format,
+                         struct snd_pcm_plugin_format *src_format,
+                         struct snd_pcm_plugin_format *dst_format,
                          size_t extra,
-                         snd_pcm_plugin_t **ret);
-int snd_pcm_plugin_free(snd_pcm_plugin_t *plugin);
-int snd_pcm_plugin_clear(snd_pcm_plugin_t **first);
-int snd_pcm_plug_alloc(snd_pcm_plug_t *plug, snd_pcm_uframes_t frames);
-snd_pcm_sframes_t snd_pcm_plug_client_size(snd_pcm_plug_t *handle, snd_pcm_uframes_t drv_size);
-snd_pcm_sframes_t snd_pcm_plug_slave_size(snd_pcm_plug_t *handle, snd_pcm_uframes_t clt_size);
+                         struct snd_pcm_plugin **ret);
+int snd_pcm_plugin_free(struct snd_pcm_plugin *plugin);
+int snd_pcm_plugin_clear(struct snd_pcm_plugin **first);
+int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames);
+snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *handle, snd_pcm_uframes_t drv_size);
+snd_pcm_sframes_t snd_pcm_plug_slave_size(struct snd_pcm_substream *handle, snd_pcm_uframes_t clt_size);
 
 #define FULL ROUTE_PLUGIN_RESOLUTION
 #define HALF ROUTE_PLUGIN_RESOLUTION / 2
-typedef int route_ttable_entry_t;
-
-int snd_pcm_plugin_build_io(snd_pcm_plug_t *handle,
-			    snd_pcm_hw_params_t *params,
-			    snd_pcm_plugin_t **r_plugin);
-int snd_pcm_plugin_build_linear(snd_pcm_plug_t *handle,
-				snd_pcm_plugin_format_t *src_format,
-				snd_pcm_plugin_format_t *dst_format,
-				snd_pcm_plugin_t **r_plugin);
-int snd_pcm_plugin_build_mulaw(snd_pcm_plug_t *handle,
-			       snd_pcm_plugin_format_t *src_format,
-			       snd_pcm_plugin_format_t *dst_format,
-			       snd_pcm_plugin_t **r_plugin);
-int snd_pcm_plugin_build_rate(snd_pcm_plug_t *handle,
-			      snd_pcm_plugin_format_t *src_format,
-			      snd_pcm_plugin_format_t *dst_format,
-			      snd_pcm_plugin_t **r_plugin);
-int snd_pcm_plugin_build_route(snd_pcm_plug_t *handle,
-			       snd_pcm_plugin_format_t *src_format,
-			       snd_pcm_plugin_format_t *dst_format,
-			       route_ttable_entry_t *ttable,
-		               snd_pcm_plugin_t **r_plugin);
-int snd_pcm_plugin_build_copy(snd_pcm_plug_t *handle,
-			      snd_pcm_plugin_format_t *src_format,
-			      snd_pcm_plugin_format_t *dst_format,
-			      snd_pcm_plugin_t **r_plugin);
-
-int snd_pcm_plug_format_plugins(snd_pcm_plug_t *substream,
-				snd_pcm_hw_params_t *params,
-				snd_pcm_hw_params_t *slave_params);
-
-int snd_pcm_plug_slave_format(int format, snd_mask_t *format_mask);
-
-int snd_pcm_plugin_append(snd_pcm_plugin_t *plugin);
-
-snd_pcm_sframes_t snd_pcm_plug_write_transfer(snd_pcm_plug_t *handle, snd_pcm_plugin_channel_t *src_channels, snd_pcm_uframes_t size);
-snd_pcm_sframes_t snd_pcm_plug_read_transfer(snd_pcm_plug_t *handle, snd_pcm_plugin_channel_t *dst_channels_final, snd_pcm_uframes_t size);
-
-snd_pcm_sframes_t snd_pcm_plug_client_channels_buf(snd_pcm_plug_t *handle,
-					 char *buf, snd_pcm_uframes_t count,
-					 snd_pcm_plugin_channel_t **channels);
-
-snd_pcm_sframes_t snd_pcm_plugin_client_channels(snd_pcm_plugin_t *plugin,
-				       snd_pcm_uframes_t frames,
-				       snd_pcm_plugin_channel_t **channels);
-
-int snd_pcm_area_silence(const snd_pcm_channel_area_t *dst_channel, size_t dst_offset,
+
+int snd_pcm_plugin_build_io(struct snd_pcm_substream *handle,
+			    struct snd_pcm_hw_params *params,
+			    struct snd_pcm_plugin **r_plugin);
+int snd_pcm_plugin_build_linear(struct snd_pcm_substream *handle,
+				struct snd_pcm_plugin_format *src_format,
+				struct snd_pcm_plugin_format *dst_format,
+				struct snd_pcm_plugin **r_plugin);
+int snd_pcm_plugin_build_mulaw(struct snd_pcm_substream *handle,
+			       struct snd_pcm_plugin_format *src_format,
+			       struct snd_pcm_plugin_format *dst_format,
+			       struct snd_pcm_plugin **r_plugin);
+int snd_pcm_plugin_build_rate(struct snd_pcm_substream *handle,
+			      struct snd_pcm_plugin_format *src_format,
+			      struct snd_pcm_plugin_format *dst_format,
+			      struct snd_pcm_plugin **r_plugin);
+int snd_pcm_plugin_build_route(struct snd_pcm_substream *handle,
+			       struct snd_pcm_plugin_format *src_format,
+			       struct snd_pcm_plugin_format *dst_format,
+			       int *ttable,
+		               struct snd_pcm_plugin **r_plugin);
+int snd_pcm_plugin_build_copy(struct snd_pcm_substream *handle,
+			      struct snd_pcm_plugin_format *src_format,
+			      struct snd_pcm_plugin_format *dst_format,
+			      struct snd_pcm_plugin **r_plugin);
+
+int snd_pcm_plug_format_plugins(struct snd_pcm_substream *substream,
+				struct snd_pcm_hw_params *params,
+				struct snd_pcm_hw_params *slave_params);
+
+int snd_pcm_plug_slave_format(int format, struct snd_mask *format_mask);
+
+int snd_pcm_plugin_append(struct snd_pcm_plugin *plugin);
+
+snd_pcm_sframes_t snd_pcm_plug_write_transfer(struct snd_pcm_substream *handle,
+					      struct snd_pcm_plugin_channel *src_channels,
+					      snd_pcm_uframes_t size);
+snd_pcm_sframes_t snd_pcm_plug_read_transfer(struct snd_pcm_substream *handle,
+					     struct snd_pcm_plugin_channel *dst_channels_final,
+					     snd_pcm_uframes_t size);
+
+snd_pcm_sframes_t snd_pcm_plug_client_channels_buf(struct snd_pcm_substream *handle,
+						   char *buf, snd_pcm_uframes_t count,
+						   struct snd_pcm_plugin_channel **channels);
+
+snd_pcm_sframes_t snd_pcm_plugin_client_channels(struct snd_pcm_plugin *plugin,
+						 snd_pcm_uframes_t frames,
+						 struct snd_pcm_plugin_channel **channels);
+
+int snd_pcm_area_silence(const struct snd_pcm_channel_area *dst_channel,
+			 size_t dst_offset,
 			 size_t samples, int format);
-int snd_pcm_area_copy(const snd_pcm_channel_area_t *src_channel, size_t src_offset,
-		      const snd_pcm_channel_area_t *dst_channel, size_t dst_offset,
+int snd_pcm_area_copy(const struct snd_pcm_channel_area *src_channel,
+		      size_t src_offset,
+		      const struct snd_pcm_channel_area *dst_channel,
+		      size_t dst_offset,
 		      size_t samples, int format);
 
-void *snd_pcm_plug_buf_alloc(snd_pcm_plug_t *plug, snd_pcm_uframes_t size);
-void snd_pcm_plug_buf_unlock(snd_pcm_plug_t *plug, void *ptr);
-snd_pcm_sframes_t snd_pcm_oss_write3(snd_pcm_substream_t *substream, const char *ptr, snd_pcm_uframes_t size, int in_kernel);
-snd_pcm_sframes_t snd_pcm_oss_read3(snd_pcm_substream_t *substream, char *ptr, snd_pcm_uframes_t size, int in_kernel);
-snd_pcm_sframes_t snd_pcm_oss_writev3(snd_pcm_substream_t *substream, void **bufs, snd_pcm_uframes_t frames, int in_kernel);
-snd_pcm_sframes_t snd_pcm_oss_readv3(snd_pcm_substream_t *substream, void **bufs, snd_pcm_uframes_t frames, int in_kernel);
-
-
+void *snd_pcm_plug_buf_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t size);
+void snd_pcm_plug_buf_unlock(struct snd_pcm_substream *plug, void *ptr);
+snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream,
+				     const char *ptr, snd_pcm_uframes_t size,
+				     int in_kernel);
+snd_pcm_sframes_t snd_pcm_oss_read3(struct snd_pcm_substream *substream,
+				    char *ptr, snd_pcm_uframes_t size, int in_kernel);
+snd_pcm_sframes_t snd_pcm_oss_writev3(struct snd_pcm_substream *substream,
+				      void **bufs, snd_pcm_uframes_t frames,
+				      int in_kernel);
+snd_pcm_sframes_t snd_pcm_oss_readv3(struct snd_pcm_substream *substream,
+				     void **bufs, snd_pcm_uframes_t frames,
+				     int in_kernel);
 
 #define ROUTE_PLUGIN_RESOLUTION 16
 
@@ -177,8 +187,8 @@ int getput_index(int format);
 int copy_index(int format);
 int conv_index(int src_format, int dst_format);
 
-void zero_channel(snd_pcm_plugin_t *plugin,
-		  const snd_pcm_plugin_channel_t *dst_channel,
+void zero_channel(struct snd_pcm_plugin *plugin,
+		  const struct snd_pcm_plugin_channel *dst_channel,
 		  size_t samples);
 
 #ifdef PLUGIN_DEBUG
diff --git a/sound/core/oss/rate.c b/sound/core/oss/rate.c
index 7e325ca5870..4854cef6fb4 100644
--- a/sound/core/oss/rate.c
+++ b/sound/core/oss/rate.c
@@ -33,29 +33,29 @@
  *  Basic rate conversion plugin
  */
 
-typedef struct {
+struct rate_channel {
 	signed short last_S1;
 	signed short last_S2;
-} rate_channel_t;
+};
  
-typedef void (*rate_f)(snd_pcm_plugin_t *plugin,
-		       const snd_pcm_plugin_channel_t *src_channels,
-		       snd_pcm_plugin_channel_t *dst_channels,
+typedef void (*rate_f)(struct snd_pcm_plugin *plugin,
+		       const struct snd_pcm_plugin_channel *src_channels,
+		       struct snd_pcm_plugin_channel *dst_channels,
 		       int src_frames, int dst_frames);
 
-typedef struct rate_private_data {
+struct rate_priv {
 	unsigned int pitch;
 	unsigned int pos;
 	rate_f func;
 	int get, put;
 	snd_pcm_sframes_t old_src_frames, old_dst_frames;
-	rate_channel_t channels[0];
-} rate_t;
+	struct rate_channel channels[0];
+};
 
-static void rate_init(snd_pcm_plugin_t *plugin)
+static void rate_init(struct snd_pcm_plugin *plugin)
 {
 	unsigned int channel;
-	rate_t *data = (rate_t *)plugin->extra_data;
+	struct rate_priv *data = (struct rate_priv *)plugin->extra_data;
 	data->pos = 0;
 	for (channel = 0; channel < plugin->src_format.channels; channel++) {
 		data->channels[channel].last_S1 = 0;
@@ -63,9 +63,9 @@ static void rate_init(snd_pcm_plugin_t *plugin)
 	}
 }
 
-static void resample_expand(snd_pcm_plugin_t *plugin,
-			    const snd_pcm_plugin_channel_t *src_channels,
-			    snd_pcm_plugin_channel_t *dst_channels,
+static void resample_expand(struct snd_pcm_plugin *plugin,
+			    const struct snd_pcm_plugin_channel *src_channels,
+			    struct snd_pcm_plugin_channel *dst_channels,
 			    int src_frames, int dst_frames)
 {
 	unsigned int pos = 0;
@@ -75,8 +75,8 @@ static void resample_expand(snd_pcm_plugin_t *plugin,
 	unsigned int channel;
 	int src_step, dst_step;
 	int src_frames1, dst_frames1;
-	rate_t *data = (rate_t *)plugin->extra_data;
-	rate_channel_t *rchannels = data->channels;
+	struct rate_priv *data = (struct rate_priv *)plugin->extra_data;
+	struct rate_channel *rchannels = data->channels;
 
 #define GET_S16_LABELS
 #define PUT_S16_LABELS
@@ -139,9 +139,9 @@ static void resample_expand(snd_pcm_plugin_t *plugin,
 	data->pos = pos;
 }
 
-static void resample_shrink(snd_pcm_plugin_t *plugin,
-			    const snd_pcm_plugin_channel_t *src_channels,
-			    snd_pcm_plugin_channel_t *dst_channels,
+static void resample_shrink(struct snd_pcm_plugin *plugin,
+			    const struct snd_pcm_plugin_channel *src_channels,
+			    struct snd_pcm_plugin_channel *dst_channels,
 			    int src_frames, int dst_frames)
 {
 	unsigned int pos = 0;
@@ -151,8 +151,8 @@ static void resample_shrink(snd_pcm_plugin_t *plugin,
 	unsigned int channel;
 	int src_step, dst_step;
 	int src_frames1, dst_frames1;
-	rate_t *data = (rate_t *)plugin->extra_data;
-	rate_channel_t *rchannels = data->channels;
+	struct rate_priv *data = (struct rate_priv *)plugin->extra_data;
+	struct rate_channel *rchannels = data->channels;
 	
 #define GET_S16_LABELS
 #define PUT_S16_LABELS
@@ -216,15 +216,15 @@ static void resample_shrink(snd_pcm_plugin_t *plugin,
 	data->pos = pos;
 }
 
-static snd_pcm_sframes_t rate_src_frames(snd_pcm_plugin_t *plugin, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t rate_src_frames(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t frames)
 {
-	rate_t *data;
+	struct rate_priv *data;
 	snd_pcm_sframes_t res;
 
 	snd_assert(plugin != NULL, return -ENXIO);
 	if (frames == 0)
 		return 0;
-	data = (rate_t *)plugin->extra_data;
+	data = (struct rate_priv *)plugin->extra_data;
 	if (plugin->src_format.rate < plugin->dst_format.rate) {
 		res = (((frames * data->pitch) + (BITS/2)) >> SHIFT);
 	} else {
@@ -248,15 +248,15 @@ static snd_pcm_sframes_t rate_src_frames(snd_pcm_plugin_t *plugin, snd_pcm_ufram
 	return res;
 }
 
-static snd_pcm_sframes_t rate_dst_frames(snd_pcm_plugin_t *plugin, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t rate_dst_frames(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t frames)
 {
-	rate_t *data;
+	struct rate_priv *data;
 	snd_pcm_sframes_t res;
 
 	snd_assert(plugin != NULL, return -ENXIO);
 	if (frames == 0)
 		return 0;
-	data = (rate_t *)plugin->extra_data;
+	data = (struct rate_priv *)plugin->extra_data;
 	if (plugin->src_format.rate < plugin->dst_format.rate) {
 		res = (((frames << SHIFT) + (data->pitch / 2)) / data->pitch);
 	} else {
@@ -280,13 +280,13 @@ static snd_pcm_sframes_t rate_dst_frames(snd_pcm_plugin_t *plugin, snd_pcm_ufram
 	return res;
 }
 
-static snd_pcm_sframes_t rate_transfer(snd_pcm_plugin_t *plugin,
-			     const snd_pcm_plugin_channel_t *src_channels,
-			     snd_pcm_plugin_channel_t *dst_channels,
+static snd_pcm_sframes_t rate_transfer(struct snd_pcm_plugin *plugin,
+			     const struct snd_pcm_plugin_channel *src_channels,
+			     struct snd_pcm_plugin_channel *dst_channels,
 			     snd_pcm_uframes_t frames)
 {
 	snd_pcm_uframes_t dst_frames;
-	rate_t *data;
+	struct rate_priv *data;
 
 	snd_assert(plugin != NULL && src_channels != NULL && dst_channels != NULL, return -ENXIO);
 	if (frames == 0)
@@ -308,13 +308,13 @@ static snd_pcm_sframes_t rate_transfer(snd_pcm_plugin_t *plugin,
 	dst_frames = rate_dst_frames(plugin, frames);
 	if (dst_frames > dst_channels[0].frames)
 		dst_frames = dst_channels[0].frames;
-	data = (rate_t *)plugin->extra_data;
+	data = (struct rate_priv *)plugin->extra_data;
 	data->func(plugin, src_channels, dst_channels, frames, dst_frames);
 	return dst_frames;
 }
 
-static int rate_action(snd_pcm_plugin_t *plugin,
-		       snd_pcm_plugin_action_t action,
+static int rate_action(struct snd_pcm_plugin *plugin,
+		       enum snd_pcm_plugin_action action,
 		       unsigned long udata)
 {
 	snd_assert(plugin != NULL, return -ENXIO);
@@ -329,14 +329,14 @@ static int rate_action(snd_pcm_plugin_t *plugin,
 	return 0;	/* silenty ignore other actions */
 }
 
-int snd_pcm_plugin_build_rate(snd_pcm_plug_t *plug,
-			      snd_pcm_plugin_format_t *src_format,
-			      snd_pcm_plugin_format_t *dst_format,
-			      snd_pcm_plugin_t **r_plugin)
+int snd_pcm_plugin_build_rate(struct snd_pcm_substream *plug,
+			      struct snd_pcm_plugin_format *src_format,
+			      struct snd_pcm_plugin_format *dst_format,
+			      struct snd_pcm_plugin **r_plugin)
 {
 	int err;
-	rate_t *data;
-	snd_pcm_plugin_t *plugin;
+	struct rate_priv *data;
+	struct snd_pcm_plugin *plugin;
 
 	snd_assert(r_plugin != NULL, return -ENXIO);
 	*r_plugin = NULL;
@@ -349,11 +349,12 @@ int snd_pcm_plugin_build_rate(snd_pcm_plug_t *plug,
 
 	err = snd_pcm_plugin_build(plug, "rate conversion",
 				   src_format, dst_format,
-				   sizeof(rate_t) + src_format->channels * sizeof(rate_channel_t),
+				   sizeof(struct rate_priv) +
+				   src_format->channels * sizeof(struct rate_channel),
 				   &plugin);
 	if (err < 0)
 		return err;
-	data = (rate_t *)plugin->extra_data;
+	data = (struct rate_priv *)plugin->extra_data;
 	data->get = getput_index(src_format->format);
 	snd_assert(data->get >= 0 && data->get < 4*2*2, return -EINVAL);
 	data->put = getput_index(dst_format->format);
diff --git a/sound/core/oss/route.c b/sound/core/oss/route.c
index 7519aed757c..726c5caa3fd 100644
--- a/sound/core/oss/route.c
+++ b/sound/core/oss/route.c
@@ -35,61 +35,62 @@
 #error "Add some code here"
 #endif
 
-typedef struct ttable_dst ttable_dst_t;
-typedef struct route_private_data route_t;
+struct ttable_dst;
 
-typedef void (*route_channel_f)(snd_pcm_plugin_t *plugin,
-			      const snd_pcm_plugin_channel_t *src_channels,
-			      snd_pcm_plugin_channel_t *dst_channel,
-			      ttable_dst_t* ttable, snd_pcm_uframes_t frames);
+typedef void (*route_channel_f)(struct snd_pcm_plugin *plugin,
+				const struct snd_pcm_plugin_channel *src_channels,
+				struct snd_pcm_plugin_channel *dst_channel,
+				struct ttable_dst *ttable, snd_pcm_uframes_t frames);
 
-typedef struct {
+struct ttable_src {
 	int channel;
 	int as_int;
-} ttable_src_t;
+};
 
 struct ttable_dst {
 	int att;	/* Attenuated */
 	unsigned int nsrcs;
-	ttable_src_t* srcs;
+	struct ttable_src *srcs;
 	route_channel_f func;
 };
 
-struct route_private_data {
+struct route_priv {
 	enum {R_UINT32=0, R_UINT64=1} sum_type;
 	int get, put;
 	int conv;
 	int src_sample_size;
-	ttable_dst_t ttable[0];
+	struct ttable_dst ttable[0];
 };
 
-typedef union {
+union sum {
 	u_int32_t as_uint32;
 	u_int64_t as_uint64;
-} sum_t;
+};
 
 
-static void route_to_channel_from_zero(snd_pcm_plugin_t *plugin,
-				     const snd_pcm_plugin_channel_t *src_channels,
-				     snd_pcm_plugin_channel_t *dst_channel,
-				     ttable_dst_t* ttable, snd_pcm_uframes_t frames)
+static void route_to_channel_from_zero(struct snd_pcm_plugin *plugin,
+				       const struct snd_pcm_plugin_channel *src_channels,
+				       struct snd_pcm_plugin_channel *dst_channel,
+				       struct ttable_dst *ttable,
+				       snd_pcm_uframes_t frames)
 {
 	if (dst_channel->wanted)
 		snd_pcm_area_silence(&dst_channel->area, 0, frames, plugin->dst_format.format);
 	dst_channel->enabled = 0;
 }
 
-static void route_to_channel_from_one(snd_pcm_plugin_t *plugin,
-				    const snd_pcm_plugin_channel_t *src_channels,
-				    snd_pcm_plugin_channel_t *dst_channel,
-				    ttable_dst_t* ttable, snd_pcm_uframes_t frames)
+static void route_to_channel_from_one(struct snd_pcm_plugin *plugin,
+				      const struct snd_pcm_plugin_channel *src_channels,
+				      struct snd_pcm_plugin_channel *dst_channel,
+				      struct ttable_dst *ttable,
+				      snd_pcm_uframes_t frames)
 {
 #define CONV_LABELS
 #include "plugin_ops.h"
 #undef CONV_LABELS
-	route_t *data = (route_t *)plugin->extra_data;
+	struct route_priv *data = (struct route_priv *)plugin->extra_data;
 	void *conv;
-	const snd_pcm_plugin_channel_t *src_channel = NULL;
+	const struct snd_pcm_plugin_channel *src_channel = NULL;
 	unsigned int srcidx;
 	char *src, *dst;
 	int src_step, dst_step;
@@ -120,10 +121,10 @@ static void route_to_channel_from_one(snd_pcm_plugin_t *plugin,
 	}
 }
 
-static void route_to_channel(snd_pcm_plugin_t *plugin,
-			   const snd_pcm_plugin_channel_t *src_channels,
-			   snd_pcm_plugin_channel_t *dst_channel,
-			   ttable_dst_t* ttable, snd_pcm_uframes_t frames)
+static void route_to_channel(struct snd_pcm_plugin *plugin,
+			     const struct snd_pcm_plugin_channel *src_channels,
+			     struct snd_pcm_plugin_channel *dst_channel,
+			     struct ttable_dst *ttable, snd_pcm_uframes_t frames)
 {
 #define GET_U_LABELS
 #define PUT_U32_LABELS
@@ -153,18 +154,18 @@ static void route_to_channel(snd_pcm_plugin_t *plugin,
 					 &&norm_int64_16_att,
 					 &&norm_int64_24_att,
 	};
-	route_t *data = (route_t *)plugin->extra_data;
+	struct route_priv *data = (struct route_priv *)plugin->extra_data;
 	void *zero, *get, *add, *norm, *put_u32;
 	int nsrcs = ttable->nsrcs;
 	char *dst;
 	int dst_step;
 	char *srcs[nsrcs];
 	int src_steps[nsrcs];
-	ttable_src_t src_tt[nsrcs];
+	struct ttable_src src_tt[nsrcs];
 	u_int32_t sample = 0;
 	int srcidx, srcidx1 = 0;
 	for (srcidx = 0; srcidx < nsrcs; ++srcidx) {
-		const snd_pcm_plugin_channel_t *src_channel = &src_channels[ttable->srcs[srcidx].channel];
+		const struct snd_pcm_plugin_channel *src_channel = &src_channels[ttable->srcs[srcidx].channel];
 		if (!src_channel->enabled)
 			continue;
 		srcs[srcidx1] = src_channel->area.addr + src_channel->area.first / 8;
@@ -191,8 +192,8 @@ static void route_to_channel(snd_pcm_plugin_t *plugin,
 	dst_step = dst_channel->area.step / 8;
 
 	while (frames-- > 0) {
-		ttable_src_t *ttp = src_tt;
-		sum_t sum;
+		struct ttable_src *ttp = src_tt;
+		union sum sum;
 
 		/* Zero sum */
 		goto *zero;
@@ -297,20 +298,20 @@ static void route_to_channel(snd_pcm_plugin_t *plugin,
 	}
 }
 
-static int route_src_channels_mask(snd_pcm_plugin_t *plugin,
+static int route_src_channels_mask(struct snd_pcm_plugin *plugin,
 				   unsigned long *dst_vmask,
 				   unsigned long **src_vmask)
 {
-	route_t *data = (route_t *)plugin->extra_data;
+	struct route_priv *data = (struct route_priv *)plugin->extra_data;
 	int schannels = plugin->src_format.channels;
 	int dchannels = plugin->dst_format.channels;
 	unsigned long *vmask = plugin->src_vmask;
 	int channel;
-	ttable_dst_t *dp = data->ttable;
+	struct ttable_dst *dp = data->ttable;
 	bitmap_zero(vmask, schannels);
 	for (channel = 0; channel < dchannels; channel++, dp++) {
 		unsigned int src;
-		ttable_src_t *sp;
+		struct ttable_src *sp;
 		if (!test_bit(channel, dst_vmask))
 			continue;
 		sp = dp->srcs;
@@ -321,19 +322,19 @@ static int route_src_channels_mask(snd_pcm_plugin_t *plugin,
 	return 0;
 }
 
-static int route_dst_channels_mask(snd_pcm_plugin_t *plugin,
+static int route_dst_channels_mask(struct snd_pcm_plugin *plugin,
 				   unsigned long *src_vmask,
 				   unsigned long **dst_vmask)
 {
-	route_t *data = (route_t *)plugin->extra_data;
+	struct route_priv *data = (struct route_priv *)plugin->extra_data;
 	int dchannels = plugin->dst_format.channels;
 	unsigned long *vmask = plugin->dst_vmask;
 	int channel;
-	ttable_dst_t *dp = data->ttable;
+	struct ttable_dst *dp = data->ttable;
 	bitmap_zero(vmask, dchannels);
 	for (channel = 0; channel < dchannels; channel++, dp++) {
 		unsigned int src;
-		ttable_src_t *sp;
+		struct ttable_src *sp;
 		sp = dp->srcs;
 		for (src = 0; src < dp->nsrcs; src++, sp++) {
 			if (test_bit(sp->channel, src_vmask)) {
@@ -346,33 +347,33 @@ static int route_dst_channels_mask(snd_pcm_plugin_t *plugin,
 	return 0;
 }
 
-static void route_free(snd_pcm_plugin_t *plugin)
+static void route_free(struct snd_pcm_plugin *plugin)
 {
-	route_t *data = (route_t *)plugin->extra_data;
+	struct route_priv *data = (struct route_priv *)plugin->extra_data;
 	unsigned int dst_channel;
 	for (dst_channel = 0; dst_channel < plugin->dst_format.channels; ++dst_channel) {
 		kfree(data->ttable[dst_channel].srcs);
 	}
 }
 
-static int route_load_ttable(snd_pcm_plugin_t *plugin, 
-			     const route_ttable_entry_t* src_ttable)
+static int route_load_ttable(struct snd_pcm_plugin *plugin, 
+			     const int *src_ttable)
 {
-	route_t *data;
+	struct route_priv *data;
 	unsigned int src_channel, dst_channel;
-	const route_ttable_entry_t *sptr;
-	ttable_dst_t *dptr;
+	const int *sptr;
+	struct ttable_dst *dptr;
 	if (src_ttable == NULL)
 		return 0;
-	data = (route_t *)plugin->extra_data;
+	data = (struct route_priv *)plugin->extra_data;
 	dptr = data->ttable;
 	sptr = src_ttable;
 	plugin->private_free = route_free;
 	for (dst_channel = 0; dst_channel < plugin->dst_format.channels; ++dst_channel) {
-		route_ttable_entry_t t = 0;
+		int t = 0;
 		int att = 0;
 		int nsrcs = 0;
-		ttable_src_t srcs[plugin->src_format.channels];
+		struct ttable_src srcs[plugin->src_format.channels];
 		for (src_channel = 0; src_channel < plugin->src_format.channels; ++src_channel) {
 			snd_assert(*sptr >= 0 || *sptr <= FULL, return -ENXIO);
 			if (*sptr != 0) {
@@ -405,21 +406,21 @@ static int route_load_ttable(snd_pcm_plugin_t *plugin,
 	return 0;
 }
 
-static snd_pcm_sframes_t route_transfer(snd_pcm_plugin_t *plugin,
-			      const snd_pcm_plugin_channel_t *src_channels,
-			      snd_pcm_plugin_channel_t *dst_channels,
+static snd_pcm_sframes_t route_transfer(struct snd_pcm_plugin *plugin,
+			      const struct snd_pcm_plugin_channel *src_channels,
+			      struct snd_pcm_plugin_channel *dst_channels,
 			      snd_pcm_uframes_t frames)
 {
-	route_t *data;
+	struct route_priv *data;
 	int src_nchannels, dst_nchannels;
 	int dst_channel;
-	ttable_dst_t *ttp;
-	snd_pcm_plugin_channel_t *dvp;
+	struct ttable_dst *ttp;
+	struct snd_pcm_plugin_channel *dvp;
 
 	snd_assert(plugin != NULL && src_channels != NULL && dst_channels != NULL, return -ENXIO);
 	if (frames == 0)
 		return 0;
-	data = (route_t *)plugin->extra_data;
+	data = (struct route_priv *)plugin->extra_data;
 
 	src_nchannels = plugin->src_format.channels;
 	dst_nchannels = plugin->dst_format.channels;
@@ -469,14 +470,14 @@ int getput_index(int format)
 	return width * 4 + endian * 2 + sign;
 }
 
-int snd_pcm_plugin_build_route(snd_pcm_plug_t *plug,
-			       snd_pcm_plugin_format_t *src_format,
-			       snd_pcm_plugin_format_t *dst_format,
-			       route_ttable_entry_t *ttable,
-			       snd_pcm_plugin_t **r_plugin)
+int snd_pcm_plugin_build_route(struct snd_pcm_substream *plug,
+			       struct snd_pcm_plugin_format *src_format,
+			       struct snd_pcm_plugin_format *dst_format,
+			       int *ttable,
+			       struct snd_pcm_plugin **r_plugin)
 {
-	route_t *data;
-	snd_pcm_plugin_t *plugin;
+	struct route_priv *data;
+	struct snd_pcm_plugin *plugin;
 	int err;
 
 	snd_assert(r_plugin != NULL, return -ENXIO);
@@ -488,12 +489,13 @@ int snd_pcm_plugin_build_route(snd_pcm_plug_t *plug,
 
 	err = snd_pcm_plugin_build(plug, "attenuated route conversion",
 				   src_format, dst_format,
-				   sizeof(route_t) + sizeof(data->ttable[0]) * dst_format->channels,
+				   sizeof(struct route_priv) +
+				   sizeof(data->ttable[0]) * dst_format->channels,
 				   &plugin);
 	if (err < 0)
 		return err;
 
-	data = (route_t *) plugin->extra_data;
+	data = (struct route_priv *)plugin->extra_data;
 
 	data->get = getput_index(src_format->format);
 	snd_assert(data->get >= 0 && data->get < 4*2*2, return -EINVAL);
-- 
cgit v1.2.3-70-g09d2


From c7e0b5bf9fff1b726495081447c107a2333fb82c Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:04:02 +0100
Subject: [ALSA] Remove xxx_t typedefs: Sequencer

Modules: ALSA sequencer

Remove xxx_t typedefs from the core sequencer codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/asequencer.h      | 368 ++++++++++++++++----------------
 include/sound/seq_device.h      |  18 +-
 include/sound/seq_instr.h       |  64 +++---
 include/sound/seq_kernel.h      | 119 +++--------
 include/sound/seq_midi_emul.h   |  44 ++--
 include/sound/seq_midi_event.h  |  22 +-
 include/sound/seq_virmidi.h     |  22 +-
 sound/core/seq/seq_clientmgr.c  | 460 ++++++++++++++++++++++------------------
 sound/core/seq/seq_clientmgr.h  |  42 ++--
 sound/core/seq/seq_compat.c     |  22 +-
 sound/core/seq/seq_device.c     | 120 ++++++-----
 sound/core/seq/seq_dummy.c      |  31 +--
 sound/core/seq/seq_fifo.c       |  40 ++--
 sound/core/seq/seq_fifo.h       |  26 +--
 sound/core/seq/seq_info.c       |  13 +-
 sound/core/seq/seq_info.h       |   6 +-
 sound/core/seq/seq_instr.c      | 162 +++++++-------
 sound/core/seq/seq_memory.c     |  71 ++++---
 sound/core/seq/seq_memory.h     |  37 ++--
 sound/core/seq/seq_midi.c       | 102 ++++-----
 sound/core/seq/seq_midi_emul.c  |  86 ++++----
 sound/core/seq/seq_midi_event.c |  98 +++++----
 sound/core/seq/seq_ports.c      | 152 +++++++------
 sound/core/seq/seq_ports.h      |  64 +++---
 sound/core/seq/seq_prioq.c      |  52 ++---
 sound/core/seq/seq_prioq.h      |  26 +--
 sound/core/seq/seq_queue.c      | 105 ++++-----
 sound/core/seq/seq_queue.h      |  22 +-
 sound/core/seq/seq_system.c     |  18 +-
 sound/core/seq/seq_system.h     |   2 +-
 sound/core/seq/seq_timer.c      |  68 +++---
 sound/core/seq/seq_timer.h      |  54 ++---
 sound/core/seq/seq_virmidi.c    | 106 ++++-----
 33 files changed, 1363 insertions(+), 1279 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/asequencer.h b/include/sound/asequencer.h
index 562637b4884..59485be0579 100644
--- a/include/sound/asequencer.h
+++ b/include/sound/asequencer.h
@@ -35,13 +35,13 @@
  */
 
 /** system messages
- * event data type = #sndrv_seq_result_t
+ * event data type = #snd_seq_result
  */
 #define SNDRV_SEQ_EVENT_SYSTEM		0
 #define SNDRV_SEQ_EVENT_RESULT		1
 
 /** note messages (channel specific)
- * event data type = #sndrv_seq_ev_note
+ * event data type = #snd_seq_ev_note
  */
 #define SNDRV_SEQ_EVENT_NOTE		5
 #define SNDRV_SEQ_EVENT_NOTEON		6
@@ -49,7 +49,7 @@
 #define SNDRV_SEQ_EVENT_KEYPRESS	8
 	
 /** control messages (channel specific)
- * event data type = #sndrv_seq_ev_ctrl
+ * event data type = #snd_seq_ev_ctrl
  */
 #define SNDRV_SEQ_EVENT_CONTROLLER	10
 #define SNDRV_SEQ_EVENT_PGMCHANGE	11
@@ -60,7 +60,7 @@
 #define SNDRV_SEQ_EVENT_REGPARAM	16	/**< 14 bit RPN address + 14 bit unsigned value */
 
 /** synchronisation messages
- * event data type = #sndrv_seq_ev_ctrl
+ * event data type = #snd_seq_ev_ctrl
  */
 #define SNDRV_SEQ_EVENT_SONGPOS		20	/* Song Position Pointer with LSB and MSB values */
 #define SNDRV_SEQ_EVENT_SONGSEL		21	/* Song Select with song ID number */
@@ -69,7 +69,7 @@
 #define SNDRV_SEQ_EVENT_KEYSIGN		24	/* SMF Key Signature event */
 	        
 /** timer messages
- * event data type = sndrv_seq_ev_queue_control_t
+ * event data type = snd_seq_ev_queue_control
  */
 #define SNDRV_SEQ_EVENT_START		30	/* midi Real Time Start message */
 #define SNDRV_SEQ_EVENT_CONTINUE	31	/* midi Real Time Continue message */
@@ -95,7 +95,7 @@
 #define SNDRV_SEQ_EVENT_OSS		51	/* OSS raw event */
 
 /** system status messages (broadcast for subscribers)
- * event data type = sndrv_seq_addr_t
+ * event data type = snd_seq_addr
  */
 #define SNDRV_SEQ_EVENT_CLIENT_START	60	/* new client has connected */
 #define SNDRV_SEQ_EVENT_CLIENT_EXIT	61	/* client has left the system */
@@ -105,13 +105,13 @@
 #define SNDRV_SEQ_EVENT_PORT_CHANGE	65	/* port status/info has changed */
 
 /** port connection changes
- * event data type = sndrv_seq_connect_t
+ * event data type = snd_seq_connect
  */
 #define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED	66	/* ports connected */
 #define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67	/* ports disconnected */
 
 /** synthesizer events
- * event data type = sndrv_seq_eve_sample_control_t
+ * event data type = snd_seq_eve_sample_control
  */
 #define SNDRV_SEQ_EVENT_SAMPLE		70	/* sample select */
 #define SNDRV_SEQ_EVENT_SAMPLE_CLUSTER	71	/* sample cluster select */
@@ -162,7 +162,7 @@
 /* 119-129: reserved */
 
 /* 130-139: variable length events
- * event data type = sndrv_seq_ev_ext
+ * event data type = snd_seq_ev_ext
  * (SNDRV_SEQ_EVENT_LENGTH_VARIABLE must be set)
  */
 #define SNDRV_SEQ_EVENT_SYSEX		130	/* system exclusive data (variable length) */
@@ -186,18 +186,18 @@
 #define SNDRV_SEQ_EVENT_NONE		255
 
 
-typedef unsigned char sndrv_seq_event_type_t;
+typedef unsigned char snd_seq_event_type_t;
 
 /** event address */
-struct sndrv_seq_addr {
+struct snd_seq_addr {
 	unsigned char client;	/**< Client number:         0..255, 255 = broadcast to all clients */
 	unsigned char port;	/**< Port within client:    0..255, 255 = broadcast to all ports */
 };
 
 /** port connection */
-struct sndrv_seq_connect {
-	struct sndrv_seq_addr sender;
-	struct sndrv_seq_addr dest;
+struct snd_seq_connect {
+	struct snd_seq_addr sender;
+	struct snd_seq_addr dest;
 };
 
 
@@ -226,7 +226,7 @@ struct sndrv_seq_connect {
 
 
 	/* note event */
-struct sndrv_seq_ev_note {
+struct snd_seq_ev_note {
 	unsigned char channel;
 	unsigned char note;
 	unsigned char velocity;
@@ -235,7 +235,7 @@ struct sndrv_seq_ev_note {
 };
 
 	/* controller event */
-struct sndrv_seq_ev_ctrl {
+struct snd_seq_ev_ctrl {
 	unsigned char channel;
 	unsigned char unused1, unused2, unused3;	/* pad */
 	unsigned int param;
@@ -243,59 +243,59 @@ struct sndrv_seq_ev_ctrl {
 };
 
 	/* generic set of bytes (12x8 bit) */
-struct sndrv_seq_ev_raw8 {
+struct snd_seq_ev_raw8 {
 	unsigned char d[12];	/* 8 bit value */
 };
 
 	/* generic set of integers (3x32 bit) */
-struct sndrv_seq_ev_raw32 {
+struct snd_seq_ev_raw32 {
 	unsigned int d[3];	/* 32 bit value */
 };
 
 	/* external stored data */
-struct sndrv_seq_ev_ext {
+struct snd_seq_ev_ext {
 	unsigned int len;	/* length of data */
 	void *ptr;		/* pointer to data (note: maybe 64-bit) */
 } __attribute__((packed));
 
 /* Instrument cluster type */
-typedef unsigned int sndrv_seq_instr_cluster_t;
+typedef unsigned int snd_seq_instr_cluster_t;
 
 /* Instrument type */
-struct sndrv_seq_instr {
-	sndrv_seq_instr_cluster_t cluster;
+struct snd_seq_instr {
+	snd_seq_instr_cluster_t cluster;
 	unsigned int std;		/* the upper byte means a private instrument (owner - client #) */
 	unsigned short bank;
 	unsigned short prg;
 };
 
 	/* sample number */
-struct sndrv_seq_ev_sample {
+struct snd_seq_ev_sample {
 	unsigned int std;
 	unsigned short bank;
 	unsigned short prg;
 };
 
 	/* sample cluster */
-struct sndrv_seq_ev_cluster {
-	sndrv_seq_instr_cluster_t cluster;
+struct snd_seq_ev_cluster {
+	snd_seq_instr_cluster_t cluster;
 };
 
 	/* sample position */
-typedef unsigned int sndrv_seq_position_t; /* playback position (in samples) * 16 */
+typedef unsigned int snd_seq_position_t; /* playback position (in samples) * 16 */
 
 	/* sample stop mode */
-enum sndrv_seq_stop_mode {
+enum {
 	SAMPLE_STOP_IMMEDIATELY = 0,	/* terminate playing immediately */
 	SAMPLE_STOP_VENVELOPE = 1,	/* finish volume envelope */
 	SAMPLE_STOP_LOOP = 2		/* terminate loop and finish wave */
 };
 
 	/* sample frequency */
-typedef int sndrv_seq_frequency_t; /* playback frequency in HZ * 16 */
+typedef int snd_seq_frequency_t; /* playback frequency in HZ * 16 */
 
 	/* sample volume control; if any value is set to -1 == do not change */
-struct sndrv_seq_ev_volume {
+struct snd_seq_ev_volume {
 	signed short volume;	/* range: 0-16383 */
 	signed short lr;	/* left-right balance; range: 0-16383 */
 	signed short fr;	/* front-rear balance; range: 0-16383 */
@@ -303,22 +303,22 @@ struct sndrv_seq_ev_volume {
 };
 
 	/* simple loop redefinition */
-struct sndrv_seq_ev_loop {
+struct snd_seq_ev_loop {
 	unsigned int start;	/* loop start (in samples) * 16 */
 	unsigned int end;	/* loop end (in samples) * 16 */
 };
 
-struct sndrv_seq_ev_sample_control {
+struct snd_seq_ev_sample_control {
 	unsigned char channel;
 	unsigned char unused1, unused2, unused3;	/* pad */
 	union {
-		struct sndrv_seq_ev_sample sample;
-		struct sndrv_seq_ev_cluster cluster;
-		sndrv_seq_position_t position;
-		enum sndrv_seq_stop_mode stop_mode;
-		sndrv_seq_frequency_t frequency;
-		struct sndrv_seq_ev_volume volume;
-		struct sndrv_seq_ev_loop loop;
+		struct snd_seq_ev_sample sample;
+		struct snd_seq_ev_cluster cluster;
+		snd_seq_position_t position;
+		int stop_mode;
+		snd_seq_frequency_t frequency;
+		struct snd_seq_ev_volume volume;
+		struct snd_seq_ev_loop loop;
 		unsigned char raw8[8];
 	} param;
 };
@@ -326,82 +326,82 @@ struct sndrv_seq_ev_sample_control {
 
 
 /* INSTR_BEGIN event */
-struct sndrv_seq_ev_instr_begin {
+struct snd_seq_ev_instr_begin {
 	int timeout;		/* zero = forever, otherwise timeout in ms */
 };
 
-struct sndrv_seq_result {
+struct snd_seq_result {
 	int event;		/* processed event type */
 	int result;
 };
 
 
-struct sndrv_seq_real_time {
+struct snd_seq_real_time {
 	unsigned int tv_sec;	/* seconds */
 	unsigned int tv_nsec;	/* nanoseconds */
 };
 
-typedef unsigned int sndrv_seq_tick_time_t;	/* midi ticks */
+typedef unsigned int snd_seq_tick_time_t;	/* midi ticks */
 
-union sndrv_seq_timestamp {
-	sndrv_seq_tick_time_t tick;
-	struct sndrv_seq_real_time time;
+union snd_seq_timestamp {
+	snd_seq_tick_time_t tick;
+	struct snd_seq_real_time time;
 };
 
-struct sndrv_seq_queue_skew {
+struct snd_seq_queue_skew {
 	unsigned int value;
 	unsigned int base;
 };
 
 	/* queue timer control */
-struct sndrv_seq_ev_queue_control {
+struct snd_seq_ev_queue_control {
 	unsigned char queue;			/* affected queue */
 	unsigned char pad[3];			/* reserved */
 	union {
 		signed int value;		/* affected value (e.g. tempo) */
-		union sndrv_seq_timestamp time;	/* time */
+		union snd_seq_timestamp time;	/* time */
 		unsigned int position;		/* sync position */
-		struct sndrv_seq_queue_skew skew;
+		struct snd_seq_queue_skew skew;
 		unsigned int d32[2];
 		unsigned char d8[8];
 	} param;
 };
 
 	/* quoted event - inside the kernel only */
-struct sndrv_seq_ev_quote {
-	struct sndrv_seq_addr origin;		/* original sender */
+struct snd_seq_ev_quote {
+	struct snd_seq_addr origin;		/* original sender */
 	unsigned short value;		/* optional data */
-	struct sndrv_seq_event *event;		/* quoted event */
+	struct snd_seq_event *event;		/* quoted event */
 } __attribute__((packed));
 
 
 	/* sequencer event */
-struct sndrv_seq_event {
-	sndrv_seq_event_type_t type;	/* event type */
+struct snd_seq_event {
+	snd_seq_event_type_t type;	/* event type */
 	unsigned char flags;		/* event flags */
 	char tag;
 	
 	unsigned char queue;		/* schedule queue */
-	union sndrv_seq_timestamp time;	/* schedule time */
+	union snd_seq_timestamp time;	/* schedule time */
 
 
-	struct sndrv_seq_addr source;	/* source address */
-	struct sndrv_seq_addr dest;	/* destination address */
+	struct snd_seq_addr source;	/* source address */
+	struct snd_seq_addr dest;	/* destination address */
 
 	union {				/* event data... */
-		struct sndrv_seq_ev_note note;
-		struct sndrv_seq_ev_ctrl control;
-		struct sndrv_seq_ev_raw8 raw8;
-		struct sndrv_seq_ev_raw32 raw32;
-		struct sndrv_seq_ev_ext ext;
-		struct sndrv_seq_ev_queue_control queue;
-		union sndrv_seq_timestamp time;
-		struct sndrv_seq_addr addr;
-		struct sndrv_seq_connect connect;
-		struct sndrv_seq_result result;
-		struct sndrv_seq_ev_instr_begin instr_begin;
-		struct sndrv_seq_ev_sample_control sample;
-		struct sndrv_seq_ev_quote quote;
+		struct snd_seq_ev_note note;
+		struct snd_seq_ev_ctrl control;
+		struct snd_seq_ev_raw8 raw8;
+		struct snd_seq_ev_raw32 raw32;
+		struct snd_seq_ev_ext ext;
+		struct snd_seq_ev_queue_control queue;
+		union snd_seq_timestamp time;
+		struct snd_seq_addr addr;
+		struct snd_seq_connect connect;
+		struct snd_seq_result result;
+		struct snd_seq_ev_instr_begin instr_begin;
+		struct snd_seq_ev_sample_control sample;
+		struct snd_seq_ev_quote quote;
 	} data;
 };
 
@@ -409,72 +409,77 @@ struct sndrv_seq_event {
 /*
  * bounce event - stored as variable size data
  */
-struct sndrv_seq_event_bounce {
+struct snd_seq_event_bounce {
 	int err;
-	struct sndrv_seq_event event;
+	struct snd_seq_event event;
 	/* external data follows here. */
 };
 
-#define sndrv_seq_event_bounce_ext_data(ev) ((void*)((char *)(ev)->data.ext.ptr + sizeof(sndrv_seq_event_bounce_t)))
+#ifdef __KERNEL__
+
+/* helper macro */
+#define snd_seq_event_bounce_ext_data(ev) ((void*)((char *)(ev)->data.ext.ptr + sizeof(struct snd_seq_event_bounce)))
 
 /*
  * type check macros
  */
 /* result events: 0-4 */
-#define sndrv_seq_ev_is_result_type(ev)	((ev)->type < 5)
+#define snd_seq_ev_is_result_type(ev)	((ev)->type < 5)
 /* channel specific events: 5-19 */
-#define sndrv_seq_ev_is_channel_type(ev)	((ev)->type >= 5 && (ev)->type < 20)
+#define snd_seq_ev_is_channel_type(ev)	((ev)->type >= 5 && (ev)->type < 20)
 /* note events: 5-9 */
-#define sndrv_seq_ev_is_note_type(ev)	((ev)->type >= 5 && (ev)->type < 10)
+#define snd_seq_ev_is_note_type(ev)	((ev)->type >= 5 && (ev)->type < 10)
 /* control events: 10-19 */
-#define sndrv_seq_ev_is_control_type(ev)	((ev)->type >= 10 && (ev)->type < 20)
+#define snd_seq_ev_is_control_type(ev)	((ev)->type >= 10 && (ev)->type < 20)
 /* queue control events: 30-39 */
-#define sndrv_seq_ev_is_queue_type(ev)	((ev)->type >= 30 && (ev)->type < 40)
+#define snd_seq_ev_is_queue_type(ev)	((ev)->type >= 30 && (ev)->type < 40)
 /* system status messages */
-#define sndrv_seq_ev_is_message_type(ev)	((ev)->type >= 60 && (ev)->type < 69)
+#define snd_seq_ev_is_message_type(ev)	((ev)->type >= 60 && (ev)->type < 69)
 /* sample messages */
-#define sndrv_seq_ev_is_sample_type(ev)	((ev)->type >= 70 && (ev)->type < 79)
+#define snd_seq_ev_is_sample_type(ev)	((ev)->type >= 70 && (ev)->type < 79)
 /* user-defined messages */
-#define sndrv_seq_ev_is_user_type(ev)	((ev)->type >= 90 && (ev)->type < 99)
+#define snd_seq_ev_is_user_type(ev)	((ev)->type >= 90 && (ev)->type < 99)
 /* fixed length events: 0-99 */
-#define sndrv_seq_ev_is_fixed_type(ev)	((ev)->type < 100)
+#define snd_seq_ev_is_fixed_type(ev)	((ev)->type < 100)
 /* instrument layer events: 100-129 */
-#define sndrv_seq_ev_is_instr_type(ev)	((ev)->type >= 100 && (ev)->type < 130)
+#define snd_seq_ev_is_instr_type(ev)	((ev)->type >= 100 && (ev)->type < 130)
 /* variable length events: 130-139 */
-#define sndrv_seq_ev_is_variable_type(ev)	((ev)->type >= 130 && (ev)->type < 140)
+#define snd_seq_ev_is_variable_type(ev)	((ev)->type >= 130 && (ev)->type < 140)
 /* reserved for kernel */
-#define sndrv_seq_ev_is_reserved(ev)	((ev)->type >= 150)
+#define snd_seq_ev_is_reserved(ev)	((ev)->type >= 150)
 
 /* direct dispatched events */
-#define sndrv_seq_ev_is_direct(ev)	((ev)->queue == SNDRV_SEQ_QUEUE_DIRECT)
+#define snd_seq_ev_is_direct(ev)	((ev)->queue == SNDRV_SEQ_QUEUE_DIRECT)
 
 /*
  * macros to check event flags
  */
 /* prior events */
-#define sndrv_seq_ev_is_prior(ev)		(((ev)->flags & SNDRV_SEQ_PRIORITY_MASK) == SNDRV_SEQ_PRIORITY_HIGH)
+#define snd_seq_ev_is_prior(ev)		(((ev)->flags & SNDRV_SEQ_PRIORITY_MASK) == SNDRV_SEQ_PRIORITY_HIGH)
 
 /* event length type */
-#define sndrv_seq_ev_length_type(ev)	((ev)->flags & SNDRV_SEQ_EVENT_LENGTH_MASK)
-#define sndrv_seq_ev_is_fixed(ev)		(sndrv_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_FIXED)
-#define sndrv_seq_ev_is_variable(ev)	(sndrv_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARIABLE)
-#define sndrv_seq_ev_is_varusr(ev)	(sndrv_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARUSR)
+#define snd_seq_ev_length_type(ev)	((ev)->flags & SNDRV_SEQ_EVENT_LENGTH_MASK)
+#define snd_seq_ev_is_fixed(ev)		(snd_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_FIXED)
+#define snd_seq_ev_is_variable(ev)	(snd_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARIABLE)
+#define snd_seq_ev_is_varusr(ev)	(snd_seq_ev_length_type(ev) == SNDRV_SEQ_EVENT_LENGTH_VARUSR)
 
 /* time-stamp type */
-#define sndrv_seq_ev_timestamp_type(ev)	((ev)->flags & SNDRV_SEQ_TIME_STAMP_MASK)
-#define sndrv_seq_ev_is_tick(ev)		(sndrv_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_TICK)
-#define sndrv_seq_ev_is_real(ev)		(sndrv_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_REAL)
+#define snd_seq_ev_timestamp_type(ev)	((ev)->flags & SNDRV_SEQ_TIME_STAMP_MASK)
+#define snd_seq_ev_is_tick(ev)		(snd_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_TICK)
+#define snd_seq_ev_is_real(ev)		(snd_seq_ev_timestamp_type(ev) == SNDRV_SEQ_TIME_STAMP_REAL)
 
 /* time-mode type */
-#define sndrv_seq_ev_timemode_type(ev)	((ev)->flags & SNDRV_SEQ_TIME_MODE_MASK)
-#define sndrv_seq_ev_is_abstime(ev)	(sndrv_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_ABS)
-#define sndrv_seq_ev_is_reltime(ev)	(sndrv_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_REL)
+#define snd_seq_ev_timemode_type(ev)	((ev)->flags & SNDRV_SEQ_TIME_MODE_MASK)
+#define snd_seq_ev_is_abstime(ev)	(snd_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_ABS)
+#define snd_seq_ev_is_reltime(ev)	(snd_seq_ev_timemode_type(ev) == SNDRV_SEQ_TIME_MODE_REL)
 
 /* queue sync port */
-#define sndrv_seq_queue_sync_port(q)	((q) + 16)
+#define snd_seq_queue_sync_port(q)	((q) + 16)
+
+#endif /* __KERNEL__ */
 
 	/* system information */
-struct sndrv_seq_system_info {
+struct snd_seq_system_info {
 	int queues;			/* maximum queues count */
 	int clients;			/* maximum clients count */
 	int ports;			/* maximum ports per client */
@@ -486,7 +491,7 @@ struct sndrv_seq_system_info {
 
 
 	/* system running information */
-struct sndrv_seq_running_info {
+struct snd_seq_running_info {
 	unsigned char client;		/* client id */
 	unsigned char big_endian;	/* 1 = big-endian */
 	unsigned char cpu_mode;		/* 4 = 32bit, 8 = 64bit */
@@ -502,11 +507,10 @@ struct sndrv_seq_running_info {
 
 
 	/* client types */
-enum sndrv_seq_client_type {
-	NO_CLIENT       = 0,
-	USER_CLIENT     = 1,
-	KERNEL_CLIENT   = 2
-};
+typedef int __bitwise snd_seq_client_type_t;
+#define	NO_CLIENT	((__force snd_seq_client_type_t) 0)
+#define	USER_CLIENT	((__force snd_seq_client_type_t) 1)
+#define	KERNEL_CLIENT	((__force snd_seq_client_type_t) 2)
                         
 	/* event filter flags */
 #define SNDRV_SEQ_FILTER_BROADCAST	(1<<0)	/* accept broadcast messages */
@@ -514,9 +518,9 @@ enum sndrv_seq_client_type {
 #define SNDRV_SEQ_FILTER_BOUNCE		(1<<2)	/* accept bounce event in error */
 #define SNDRV_SEQ_FILTER_USE_EVENT	(1<<31)	/* use event filter */
 
-struct sndrv_seq_client_info {
+struct snd_seq_client_info {
 	int client;			/* client number to inquire */
-	enum sndrv_seq_client_type type;	/* client type */
+	snd_seq_client_type_t type;	/* client type */
 	char name[64];			/* client name */
 	unsigned int filter;		/* filter flags */
 	unsigned char multicast_filter[8]; /* multicast filter bitmap */
@@ -528,7 +532,7 @@ struct sndrv_seq_client_info {
 
 
 /* client pool size */
-struct sndrv_seq_client_pool {
+struct snd_seq_client_pool {
 	int client;			/* client number to inquire */
 	int output_pool;		/* outgoing (write) pool size */
 	int input_pool;			/* incoming (read) pool size */
@@ -552,13 +556,13 @@ struct sndrv_seq_client_pool {
 #define SNDRV_SEQ_REMOVE_IGNORE_OFF 	(1<<8)	/* Do not flush off events */
 #define SNDRV_SEQ_REMOVE_TAG_MATCH 	(1<<9)	/* Restrict to events with given tag */
 
-struct sndrv_seq_remove_events {
+struct snd_seq_remove_events {
 	unsigned int  remove_mode;	/* Flags that determine what gets removed */
 
-	union sndrv_seq_timestamp time;
+	union snd_seq_timestamp time;
 
 	unsigned char queue;	/* Queue for REMOVE_DEST */
-	struct sndrv_seq_addr dest;	/* Address for REMOVE_DEST */
+	struct snd_seq_addr dest;	/* Address for REMOVE_DEST */
 	unsigned char channel;	/* Channel for REMOVE_DEST */
 
 	int  type;	/* For REMOVE_EVENT_TYPE */
@@ -607,8 +611,8 @@ struct sndrv_seq_remove_events {
 #define SNDRV_SEQ_PORT_FLG_TIMESTAMP	(1<<1)
 #define SNDRV_SEQ_PORT_FLG_TIME_REAL	(1<<2)
 
-struct sndrv_seq_port_info {
-	struct sndrv_seq_addr addr;	/* client/port numbers */
+struct snd_seq_port_info {
+	struct snd_seq_addr addr;	/* client/port numbers */
 	char name[64];			/* port name */
 
 	unsigned int capability;	/* port capability bits */
@@ -631,7 +635,7 @@ struct sndrv_seq_port_info {
 #define SNDRV_SEQ_QUEUE_FLG_SYNC	(1<<0)	/* sync enabled */
 
 /* queue information */
-struct sndrv_seq_queue_info {
+struct snd_seq_queue_info {
 	int queue;		/* queue id */
 
 	/*
@@ -647,11 +651,11 @@ struct sndrv_seq_queue_info {
 };
 
 /* queue info/status */
-struct sndrv_seq_queue_status {
+struct snd_seq_queue_status {
 	int queue;			/* queue id */
 	int events;			/* read-only - queue size */
-	sndrv_seq_tick_time_t tick;	/* current tick */
-	struct sndrv_seq_real_time time; /* current time */
+	snd_seq_tick_time_t tick;	/* current tick */
+	struct snd_seq_real_time time;	/* current time */
 	int running;			/* running state of queue */
 	int flags;			/* various flags */
 	char reserved[64];		/* for the future */
@@ -659,7 +663,7 @@ struct sndrv_seq_queue_status {
 
 
 /* queue tempo */
-struct sndrv_seq_queue_tempo {
+struct snd_seq_queue_tempo {
 	int queue;			/* sequencer queue */
 	unsigned int tempo;		/* current tempo, us/tick */
 	int ppq;			/* time resolution, ticks/quarter */
@@ -675,12 +679,12 @@ struct sndrv_seq_queue_tempo {
 #define SNDRV_SEQ_TIMER_MIDI_TICK	2	/* Midi Timer Tick (TICK event) */
 
 /* queue timer info */
-struct sndrv_seq_queue_timer {
+struct snd_seq_queue_timer {
 	int queue;			/* sequencer queue */
 	int type;			/* source timer type */
 	union {
 		struct {
-			struct sndrv_timer_id id;	/* ALSA's timer ID */
+			struct snd_timer_id id;	/* ALSA's timer ID */
 			unsigned int resolution;	/* resolution in Hz */
 		} alsa;
 	} u;
@@ -688,7 +692,7 @@ struct sndrv_seq_queue_timer {
 };
 
 
-struct sndrv_seq_queue_client {
+struct snd_seq_queue_client {
 	int queue;		/* sequencer queue */
 	int client;		/* sequencer client */
 	int used;		/* queue is used with this client
@@ -702,9 +706,9 @@ struct sndrv_seq_queue_client {
 #define SNDRV_SEQ_PORT_SUBS_TIMESTAMP	(1<<1)
 #define SNDRV_SEQ_PORT_SUBS_TIME_REAL	(1<<2)
 
-struct sndrv_seq_port_subscribe {
-	struct sndrv_seq_addr sender;	/* sender address */
-	struct sndrv_seq_addr dest;	/* destination address */
+struct snd_seq_port_subscribe {
+	struct snd_seq_addr sender;	/* sender address */
+	struct snd_seq_addr dest;	/* destination address */
 	unsigned int voices;		/* number of voices to be allocated (0 = don't care) */
 	unsigned int flags;		/* modes */
 	unsigned char queue;		/* input time-stamp queue (optional) */
@@ -716,12 +720,12 @@ struct sndrv_seq_port_subscribe {
 #define SNDRV_SEQ_QUERY_SUBS_READ	0
 #define SNDRV_SEQ_QUERY_SUBS_WRITE	1
 
-struct sndrv_seq_query_subs {
-	struct sndrv_seq_addr root;	/* client/port id to be searched */
+struct snd_seq_query_subs {
+	struct snd_seq_addr root;	/* client/port id to be searched */
 	int type;		/* READ or WRITE */
 	int index;		/* 0..N-1 */
 	int num_subs;		/* R/O: number of subscriptions on this port */
-	struct sndrv_seq_addr addr;	/* R/O: result */
+	struct snd_seq_addr addr;	/* R/O: result */
 	unsigned char queue;	/* R/O: result */
 	unsigned int flags;	/* R/O: result */
 	char reserved[64];	/* for future use */
@@ -778,72 +782,72 @@ struct sndrv_seq_query_subs {
 #define SNDRV_SEQ_INSTR_FREE_CMD_SINGLE		3
 
 /* size of ROM/RAM */
-typedef unsigned int sndrv_seq_instr_size_t;
+typedef unsigned int snd_seq_instr_size_t;
 
 /* INSTR_INFO */
 
-struct sndrv_seq_instr_info {
+struct snd_seq_instr_info {
 	int result;			/* operation result */
 	unsigned int formats[8];	/* bitmap of supported formats */
 	int ram_count;			/* count of RAM banks */
-	sndrv_seq_instr_size_t ram_sizes[16]; /* size of RAM banks */
+	snd_seq_instr_size_t ram_sizes[16]; /* size of RAM banks */
 	int rom_count;			/* count of ROM banks */
-	sndrv_seq_instr_size_t rom_sizes[8]; /* size of ROM banks */
+	snd_seq_instr_size_t rom_sizes[8]; /* size of ROM banks */
 	char reserved[128];
 };
 
 /* INSTR_STATUS */
 
-struct sndrv_seq_instr_status {
+struct snd_seq_instr_status {
 	int result;			/* operation result */
-	sndrv_seq_instr_size_t free_ram[16]; /* free RAM in banks */
+	snd_seq_instr_size_t free_ram[16]; /* free RAM in banks */
 	int instrument_count;		/* count of downloaded instruments */
 	char reserved[128];
 };
 
 /* INSTR_FORMAT_INFO */
 
-struct sndrv_seq_instr_format_info {
+struct snd_seq_instr_format_info {
 	char format[16];		/* format identifier - SNDRV_SEQ_INSTR_ID_* */	
 	unsigned int len;		/* max data length (without this structure) */
 };
 
-struct sndrv_seq_instr_format_info_result {
+struct snd_seq_instr_format_info_result {
 	int result;			/* operation result */
 	char format[16];		/* format identifier */
 	unsigned int len;		/* filled data length (without this structure) */
 };
 
 /* instrument data */
-struct sndrv_seq_instr_data {
+struct snd_seq_instr_data {
 	char name[32];			/* instrument name */
 	char reserved[16];		/* for the future use */
 	int type;			/* instrument type */
 	union {
 		char format[16];	/* format identifier */
-		struct sndrv_seq_instr alias;
+		struct snd_seq_instr alias;
 	} data;
 };
 
 /* INSTR_PUT/GET, data are stored in one block (extended), header + data */
 
-struct sndrv_seq_instr_header {
+struct snd_seq_instr_header {
 	union {
-		struct sndrv_seq_instr instr;
-		sndrv_seq_instr_cluster_t cluster;
+		struct snd_seq_instr instr;
+		snd_seq_instr_cluster_t cluster;
 	} id;				/* instrument identifier */
 	unsigned int cmd;		/* get/put/free command */
 	unsigned int flags;		/* query flags (only for get) */
 	unsigned int len;		/* real instrument data length (without header) */
 	int result;			/* operation result */
 	char reserved[16];		/* for the future */
-	struct sndrv_seq_instr_data data; /* instrument data (for put/get result) */
+	struct snd_seq_instr_data data; /* instrument data (for put/get result) */
 };
 
 /* INSTR_CLUSTER_SET */
 
-struct sndrv_seq_instr_cluster_set {
-	sndrv_seq_instr_cluster_t cluster; /* cluster identifier */
+struct snd_seq_instr_cluster_set {
+	snd_seq_instr_cluster_t cluster; /* cluster identifier */
 	char name[32];			/* cluster name */
 	int priority;			/* cluster priority */
 	char reserved[64];		/* for the future use */
@@ -851,8 +855,8 @@ struct sndrv_seq_instr_cluster_set {
 
 /* INSTR_CLUSTER_GET */
 
-struct sndrv_seq_instr_cluster_get {
-	sndrv_seq_instr_cluster_t cluster; /* cluster identifier */
+struct snd_seq_instr_cluster_get {
+	snd_seq_instr_cluster_t cluster; /* cluster identifier */
 	char name[32];			/* cluster name */
 	int priority;			/* cluster priority */
 	char reserved[64];		/* for the future use */
@@ -864,44 +868,44 @@ struct sndrv_seq_instr_cluster_get {
 
 #define SNDRV_SEQ_IOCTL_PVERSION	_IOR ('S', 0x00, int)
 #define SNDRV_SEQ_IOCTL_CLIENT_ID	_IOR ('S', 0x01, int)
-#define SNDRV_SEQ_IOCTL_SYSTEM_INFO	_IOWR('S', 0x02, struct sndrv_seq_system_info)
-#define SNDRV_SEQ_IOCTL_RUNNING_MODE	_IOWR('S', 0x03, struct sndrv_seq_running_info)
-
-#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO	_IOWR('S', 0x10, struct sndrv_seq_client_info)
-#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO	_IOW ('S', 0x11, struct sndrv_seq_client_info)
-
-#define SNDRV_SEQ_IOCTL_CREATE_PORT	_IOWR('S', 0x20, struct sndrv_seq_port_info)
-#define SNDRV_SEQ_IOCTL_DELETE_PORT	_IOW ('S', 0x21, struct sndrv_seq_port_info)
-#define SNDRV_SEQ_IOCTL_GET_PORT_INFO	_IOWR('S', 0x22, struct sndrv_seq_port_info)
-#define SNDRV_SEQ_IOCTL_SET_PORT_INFO	_IOW ('S', 0x23, struct sndrv_seq_port_info)
-
-#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT	_IOW ('S', 0x30, struct sndrv_seq_port_subscribe)
-#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct sndrv_seq_port_subscribe)
-
-#define SNDRV_SEQ_IOCTL_CREATE_QUEUE	_IOWR('S', 0x32, struct sndrv_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_DELETE_QUEUE	_IOW ('S', 0x33, struct sndrv_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO	_IOWR('S', 0x34, struct sndrv_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO	_IOWR('S', 0x35, struct sndrv_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE	_IOWR('S', 0x36, struct sndrv_seq_queue_info)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct sndrv_seq_queue_status)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO	_IOWR('S', 0x41, struct sndrv_seq_queue_tempo)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO	_IOW ('S', 0x42, struct sndrv_seq_queue_tempo)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER	_IOWR('S', 0x43, struct sndrv_seq_queue_owner)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER	_IOW ('S', 0x44, struct sndrv_seq_queue_owner)
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER	_IOWR('S', 0x45, struct sndrv_seq_queue_timer)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER	_IOW ('S', 0x46, struct sndrv_seq_queue_timer)
+#define SNDRV_SEQ_IOCTL_SYSTEM_INFO	_IOWR('S', 0x02, struct snd_seq_system_info)
+#define SNDRV_SEQ_IOCTL_RUNNING_MODE	_IOWR('S', 0x03, struct snd_seq_running_info)
+
+#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO	_IOWR('S', 0x10, struct snd_seq_client_info)
+#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO	_IOW ('S', 0x11, struct snd_seq_client_info)
+
+#define SNDRV_SEQ_IOCTL_CREATE_PORT	_IOWR('S', 0x20, struct snd_seq_port_info)
+#define SNDRV_SEQ_IOCTL_DELETE_PORT	_IOW ('S', 0x21, struct snd_seq_port_info)
+#define SNDRV_SEQ_IOCTL_GET_PORT_INFO	_IOWR('S', 0x22, struct snd_seq_port_info)
+#define SNDRV_SEQ_IOCTL_SET_PORT_INFO	_IOW ('S', 0x23, struct snd_seq_port_info)
+
+#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT	_IOW ('S', 0x30, struct snd_seq_port_subscribe)
+#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct snd_seq_port_subscribe)
+
+#define SNDRV_SEQ_IOCTL_CREATE_QUEUE	_IOWR('S', 0x32, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_DELETE_QUEUE	_IOW ('S', 0x33, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO	_IOWR('S', 0x34, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO	_IOWR('S', 0x35, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE	_IOWR('S', 0x36, struct snd_seq_queue_info)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO	_IOWR('S', 0x41, struct snd_seq_queue_tempo)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO	_IOW ('S', 0x42, struct snd_seq_queue_tempo)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER	_IOWR('S', 0x43, struct snd_seq_queue_owner)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER	_IOW ('S', 0x44, struct snd_seq_queue_owner)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER	_IOWR('S', 0x45, struct snd_seq_queue_timer)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER	_IOW ('S', 0x46, struct snd_seq_queue_timer)
 /* XXX
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_SYNC	_IOWR('S', 0x53, struct sndrv_seq_queue_sync)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_SYNC	_IOW ('S', 0x54, struct sndrv_seq_queue_sync)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_SYNC	_IOWR('S', 0x53, struct snd_seq_queue_sync)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_SYNC	_IOW ('S', 0x54, struct snd_seq_queue_sync)
 */
-#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT	_IOWR('S', 0x49, struct sndrv_seq_queue_client)
-#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT	_IOW ('S', 0x4a, struct sndrv_seq_queue_client)
-#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL	_IOWR('S', 0x4b, struct sndrv_seq_client_pool)
-#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL	_IOW ('S', 0x4c, struct sndrv_seq_client_pool)
-#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS	_IOW ('S', 0x4e, struct sndrv_seq_remove_events)
-#define SNDRV_SEQ_IOCTL_QUERY_SUBS	_IOWR('S', 0x4f, struct sndrv_seq_query_subs)
-#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION	_IOWR('S', 0x50, struct sndrv_seq_port_subscribe)
-#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT	_IOWR('S', 0x51, struct sndrv_seq_client_info)
-#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT	_IOWR('S', 0x52, struct sndrv_seq_port_info)
+#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT	_IOWR('S', 0x49, struct snd_seq_queue_client)
+#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT	_IOW ('S', 0x4a, struct snd_seq_queue_client)
+#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL	_IOWR('S', 0x4b, struct snd_seq_client_pool)
+#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL	_IOW ('S', 0x4c, struct snd_seq_client_pool)
+#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS	_IOW ('S', 0x4e, struct snd_seq_remove_events)
+#define SNDRV_SEQ_IOCTL_QUERY_SUBS	_IOWR('S', 0x4f, struct snd_seq_query_subs)
+#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION	_IOWR('S', 0x50, struct snd_seq_port_subscribe)
+#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT	_IOWR('S', 0x51, struct snd_seq_client_info)
+#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT	_IOWR('S', 0x52, struct snd_seq_port_info)
 
 #endif /* __SOUND_ASEQUENCER_H */
diff --git a/include/sound/seq_device.h b/include/sound/seq_device.h
index 204ca540c28..2b5f24cc754 100644
--- a/include/sound/seq_device.h
+++ b/include/sound/seq_device.h
@@ -21,9 +21,6 @@
  *
  */
 
-typedef struct snd_seq_device snd_seq_device_t;
-typedef struct snd_seq_dev_ops snd_seq_dev_ops_t;
-
 /*
  * registered device information
  */
@@ -36,7 +33,7 @@ typedef struct snd_seq_dev_ops snd_seq_dev_ops_t;
 
 struct snd_seq_device {
 	/* device info */
-	snd_card_t *card;	/* sound card */
+	struct snd_card *card;	/* sound card */
 	int device;		/* device number */
 	char id[ID_LEN];	/* driver id */
 	char name[80];		/* device name */
@@ -44,7 +41,7 @@ struct snd_seq_device {
 	void *driver_data;	/* private data for driver */
 	int status;		/* flag - read only */
 	void *private_data;	/* private data for the caller */
-	void (*private_free)(snd_seq_device_t *device);
+	void (*private_free)(struct snd_seq_device *device);
 	struct list_head list;	/* link to next device */
 };
 
@@ -63,19 +60,19 @@ struct snd_seq_device {
  *	Typically, call snd_device_free(dev->card, dev->driver_data)
  */
 struct snd_seq_dev_ops {
-	int (*init_device)(snd_seq_device_t *dev);
-	int (*free_device)(snd_seq_device_t *dev);
+	int (*init_device)(struct snd_seq_device *dev);
+	int (*free_device)(struct snd_seq_device *dev);
 };
 
 /*
  * prototypes
  */
 void snd_seq_device_load_drivers(void);
-int snd_seq_device_new(snd_card_t *card, int device, char *id, int argsize, snd_seq_device_t **result);
-int snd_seq_device_register_driver(char *id, snd_seq_dev_ops_t *entry, int argsize);
+int snd_seq_device_new(struct snd_card *card, int device, char *id, int argsize, struct snd_seq_device **result);
+int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry, int argsize);
 int snd_seq_device_unregister_driver(char *id);
 
-#define SNDRV_SEQ_DEVICE_ARGPTR(dev) (void *)((char *)(dev) + sizeof(snd_seq_device_t))
+#define SNDRV_SEQ_DEVICE_ARGPTR(dev) (void *)((char *)(dev) + sizeof(struct snd_seq_device))
 
 
 /*
@@ -84,5 +81,4 @@ int snd_seq_device_unregister_driver(char *id);
 #define SNDRV_SEQ_DEV_ID_MIDISYNTH	"seq-midi"
 #define SNDRV_SEQ_DEV_ID_OPL3		"opl3-synth"
 
-
 #endif /* __SOUND_SEQ_DEVICE_H */
diff --git a/include/sound/seq_instr.h b/include/sound/seq_instr.h
index 1a654df4aa9..db764f09efb 100644
--- a/include/sound/seq_instr.h
+++ b/include/sound/seq_instr.h
@@ -24,29 +24,27 @@
 #include "seq_kernel.h"
 
 /* Instrument cluster */
-typedef struct _snd_seq_kcluster {
+struct snd_seq_kcluster {
 	snd_seq_instr_cluster_t cluster;
 	char name[32];
 	int priority;
-	struct _snd_seq_kcluster *next;
-} snd_seq_kcluster_t;
+	struct snd_seq_kcluster *next;
+};
 
 /* return pointer to private data */
-#define KINSTR_DATA(kinstr)	(void *)(((char *)kinstr) + sizeof(snd_seq_kinstr_t))
-
-typedef struct snd_seq_kinstr_ops snd_seq_kinstr_ops_t;
+#define KINSTR_DATA(kinstr)	(void *)(((char *)kinstr) + sizeof(struct snd_seq_kinstr))
 
 /* Instrument structure */
-typedef struct _snd_seq_kinstr {
-	snd_seq_instr_t instr;
+struct snd_seq_kinstr {
+	struct snd_seq_instr instr;
 	char name[32];
 	int type;			/* instrument type */
 	int use;			/* use count */
 	int busy;			/* not useable */
 	int add_len;			/* additional length */
-	snd_seq_kinstr_ops_t *ops;	/* operations */
-	struct _snd_seq_kinstr *next;
-} snd_seq_kinstr_t;
+	struct snd_seq_kinstr_ops *ops;	/* operations */
+	struct snd_seq_kinstr *next;
+};
 
 #define SNDRV_SEQ_INSTR_HASH_SIZE		32
 
@@ -54,11 +52,11 @@ typedef struct _snd_seq_kinstr {
 #define SNDRV_SEQ_INSTR_FLG_DIRECT	(1<<0)	/* accept only direct events */
 
 /* List of all instruments */
-typedef struct {
-	snd_seq_kinstr_t *hash[SNDRV_SEQ_INSTR_HASH_SIZE];
+struct snd_seq_kinstr_list {
+	struct snd_seq_kinstr *hash[SNDRV_SEQ_INSTR_HASH_SIZE];
 	int count;			/* count of all instruments */
 	
-	snd_seq_kcluster_t *chash[SNDRV_SEQ_INSTR_HASH_SIZE];
+	struct snd_seq_kcluster *chash[SNDRV_SEQ_INSTR_HASH_SIZE];
 	int ccount;			/* count of all clusters */
 
 	int owner;			/* current owner of the instrument list */
@@ -68,7 +66,7 @@ typedef struct {
 	spinlock_t ops_lock;
 	struct semaphore ops_mutex;
 	unsigned long ops_flags;
-} snd_seq_kinstr_list_t;
+};
 
 #define SNDRV_SEQ_INSTR_NOTIFY_REMOVE	0
 #define SNDRV_SEQ_INSTR_NOTIFY_CHANGE	1
@@ -78,33 +76,33 @@ struct snd_seq_kinstr_ops {
 	long add_len;			/* additional length */
 	char *instr_type;
 	int (*info)(void *private_data, char *info_data, long len);
-	int (*put)(void *private_data, snd_seq_kinstr_t *kinstr,
+	int (*put)(void *private_data, struct snd_seq_kinstr *kinstr,
 		   char __user *instr_data, long len, int atomic, int cmd);
-	int (*get)(void *private_data, snd_seq_kinstr_t *kinstr,
+	int (*get)(void *private_data, struct snd_seq_kinstr *kinstr,
 		   char __user *instr_data, long len, int atomic, int cmd);
-	int (*get_size)(void *private_data, snd_seq_kinstr_t *kinstr, long *size);
-	int (*remove)(void *private_data, snd_seq_kinstr_t *kinstr, int atomic);
-	void (*notify)(void *private_data, snd_seq_kinstr_t *kinstr, int what);
+	int (*get_size)(void *private_data, struct snd_seq_kinstr *kinstr, long *size);
+	int (*remove)(void *private_data, struct snd_seq_kinstr *kinstr, int atomic);
+	void (*notify)(void *private_data, struct snd_seq_kinstr *kinstr, int what);
 	struct snd_seq_kinstr_ops *next;
 };
 
 
 /* instrument operations */
-snd_seq_kinstr_list_t *snd_seq_instr_list_new(void);
-void snd_seq_instr_list_free(snd_seq_kinstr_list_t **list);
-int snd_seq_instr_list_free_cond(snd_seq_kinstr_list_t *list,
-				 snd_seq_instr_header_t *ifree,
+struct snd_seq_kinstr_list *snd_seq_instr_list_new(void);
+void snd_seq_instr_list_free(struct snd_seq_kinstr_list **list);
+int snd_seq_instr_list_free_cond(struct snd_seq_kinstr_list *list,
+				 struct snd_seq_instr_header *ifree,
 				 int client,
 				 int atomic);
-snd_seq_kinstr_t *snd_seq_instr_find(snd_seq_kinstr_list_t *list,
-				     snd_seq_instr_t *instr,
-				     int exact,
-				     int follow_alias);
-void snd_seq_instr_free_use(snd_seq_kinstr_list_t *list,
-			    snd_seq_kinstr_t *instr);
-int snd_seq_instr_event(snd_seq_kinstr_ops_t *ops,
-			snd_seq_kinstr_list_t *list,
-			snd_seq_event_t *ev,
+struct snd_seq_kinstr *snd_seq_instr_find(struct snd_seq_kinstr_list *list,
+					  struct snd_seq_instr *instr,
+					  int exact,
+					  int follow_alias);
+void snd_seq_instr_free_use(struct snd_seq_kinstr_list *list,
+			    struct snd_seq_kinstr *instr);
+int snd_seq_instr_event(struct snd_seq_kinstr_ops *ops,
+			struct snd_seq_kinstr_list *list,
+			struct snd_seq_event *ev,
 			int client,
 			int atomic,
 			int hop);
diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h
index 4beca1952c7..1b60890b44c 100644
--- a/include/sound/seq_kernel.h
+++ b/include/sound/seq_kernel.h
@@ -24,62 +24,8 @@
 #include <linux/time.h>
 #include "asequencer.h"
 
-typedef sndrv_seq_tick_time_t snd_seq_tick_time_t;
-typedef sndrv_seq_position_t snd_seq_position_t;
-typedef sndrv_seq_frequency_t snd_seq_frequency_t;
-typedef sndrv_seq_instr_cluster_t snd_seq_instr_cluster_t;
-typedef enum sndrv_seq_client_type snd_seq_client_type_t;
-typedef enum sndrv_seq_stop_mode snd_seq_stop_mode_t;
-typedef struct sndrv_seq_port_info snd_seq_port_info_t;
-typedef struct sndrv_seq_port_subscribe snd_seq_port_subscribe_t;
-typedef struct sndrv_seq_event snd_seq_event_t;
-typedef struct sndrv_seq_addr snd_seq_addr_t;
-typedef struct sndrv_seq_ev_volume snd_seq_ev_volume_t;
-typedef struct sndrv_seq_ev_loop snd_seq_ev_loop_t;
-typedef struct sndrv_seq_remove_events snd_seq_remove_events_t;
-typedef struct sndrv_seq_query_subs snd_seq_query_subs_t;
-typedef struct sndrv_seq_real_time snd_seq_real_time_t;
-typedef struct sndrv_seq_system_info snd_seq_system_info_t;
-typedef struct sndrv_seq_client_info snd_seq_client_info_t;
-typedef struct sndrv_seq_queue_info snd_seq_queue_info_t;
-typedef struct sndrv_seq_queue_status snd_seq_queue_status_t;
-typedef struct sndrv_seq_queue_tempo snd_seq_queue_tempo_t;
-typedef struct sndrv_seq_queue_owner snd_seq_queue_owner_t;
-typedef struct sndrv_seq_queue_timer snd_seq_queue_timer_t;
-typedef struct sndrv_seq_queue_client snd_seq_queue_client_t;
-typedef struct sndrv_seq_client_pool snd_seq_client_pool_t;
-typedef struct sndrv_seq_instr snd_seq_instr_t;
-typedef struct sndrv_seq_instr_data snd_seq_instr_data_t;
-typedef struct sndrv_seq_instr_header snd_seq_instr_header_t;
-typedef union sndrv_seq_timestamp snd_seq_timestamp_t;
-
-#define snd_seq_event_bounce_ext_data	sndrv_seq_event_bounce_ext_data 
-#define snd_seq_ev_is_result_type	sndrv_seq_ev_is_result_type     
-#define snd_seq_ev_is_channel_type	sndrv_seq_ev_is_channel_type    
-#define snd_seq_ev_is_note_type		sndrv_seq_ev_is_note_type       
-#define snd_seq_ev_is_control_type	sndrv_seq_ev_is_control_type    
-#define snd_seq_ev_is_queue_type	sndrv_seq_ev_is_queue_type      
-#define snd_seq_ev_is_message_type	sndrv_seq_ev_is_message_type    
-#define snd_seq_ev_is_sample_type	sndrv_seq_ev_is_sample_type     
-#define snd_seq_ev_is_user_type		sndrv_seq_ev_is_user_type       
-#define snd_seq_ev_is_fixed_type	sndrv_seq_ev_is_fixed_type      
-#define snd_seq_ev_is_instr_type	sndrv_seq_ev_is_instr_type      
-#define snd_seq_ev_is_variable_type	sndrv_seq_ev_is_variable_type   
-#define snd_seq_ev_is_reserved		sndrv_seq_ev_is_reserved        
-#define snd_seq_ev_is_direct		sndrv_seq_ev_is_direct          
-#define snd_seq_ev_is_prior		sndrv_seq_ev_is_prior           
-#define snd_seq_ev_length_type		sndrv_seq_ev_length_type        
-#define snd_seq_ev_is_fixed		sndrv_seq_ev_is_fixed           
-#define snd_seq_ev_is_variable		sndrv_seq_ev_is_variable        
-#define snd_seq_ev_is_varusr		sndrv_seq_ev_is_varusr          
-#define snd_seq_ev_timestamp_type	sndrv_seq_ev_timestamp_type     
-#define snd_seq_ev_is_tick		sndrv_seq_ev_is_tick            
-#define snd_seq_ev_is_real		sndrv_seq_ev_is_real            
-#define snd_seq_ev_timemode_type	sndrv_seq_ev_timemode_type      
-#define snd_seq_ev_is_abstime		sndrv_seq_ev_is_abstime         
-#define snd_seq_ev_is_reltime		sndrv_seq_ev_is_reltime         
-#define snd_seq_queue_sync_port		sndrv_seq_queue_sync_port       
-#define snd_seq_queue_owner		sndrv_seq_queue_owner           
+typedef struct snd_seq_real_time snd_seq_real_time_t;
+typedef union snd_seq_timestamp snd_seq_timestamp_t;
 
 /* maximum number of events dequeued per schedule interval */
 #define SNDRV_SEQ_MAX_DEQUEUE		50
@@ -114,69 +60,56 @@ typedef union sndrv_seq_timestamp snd_seq_timestamp_t;
 /* max size of event size */
 #define SNDRV_SEQ_MAX_EVENT_LEN		0x3fffffff
 
-/* typedefs */
-struct _snd_seq_user_client;
-struct _snd_seq_kernel_client;
-struct _snd_seq_client;
-struct _snd_seq_queue;
-
-typedef struct _snd_seq_user_client user_client_t;
-typedef struct _snd_seq_kernel_client kernel_client_t;
-typedef struct _snd_seq_client client_t;
-typedef struct _snd_seq_queue queue_t;
-
 /* call-backs for kernel client */
 
-typedef struct {
+struct snd_seq_client_callback {
 	void *private_data;
 	unsigned allow_input: 1,
 		 allow_output: 1;
 	/*...*/
-} snd_seq_client_callback_t;
+};
 
 /* call-backs for kernel port */
-typedef int (snd_seq_kernel_port_open_t)(void *private_data, snd_seq_port_subscribe_t *info);
-typedef int (snd_seq_kernel_port_close_t)(void *private_data, snd_seq_port_subscribe_t *info);
-typedef int (snd_seq_kernel_port_input_t)(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int hop);
-typedef void (snd_seq_kernel_port_private_free_t)(void *private_data);
-
-typedef struct {
+struct snd_seq_port_callback {
 	struct module *owner;
 	void *private_data;
-	snd_seq_kernel_port_open_t *subscribe;
-	snd_seq_kernel_port_close_t *unsubscribe;
-	snd_seq_kernel_port_open_t *use;
-	snd_seq_kernel_port_close_t *unuse;
-	snd_seq_kernel_port_input_t *event_input;
-	snd_seq_kernel_port_private_free_t *private_free;
+	int (*subscribe)(void *private_data, struct snd_seq_port_subscribe *info);
+	int (*unsubscribe)(void *private_data, struct snd_seq_port_subscribe *info);
+	int (*use)(void *private_data, struct snd_seq_port_subscribe *info);
+	int (*unuse)(void *private_data, struct snd_seq_port_subscribe *info);
+	int (*event_input)(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop);
+	void (*private_free)(void *private_data);
 	unsigned int callback_all;	/* call subscribe callbacks at each connection/disconnection */
 	/*...*/
-} snd_seq_port_callback_t;
+};
 
 /* interface for kernel client */
-extern int snd_seq_create_kernel_client(snd_card_t *card, int client_index, snd_seq_client_callback_t *callback);
-extern int snd_seq_delete_kernel_client(int client);
-extern int snd_seq_kernel_client_enqueue(int client, snd_seq_event_t *ev, int atomic, int hop);
-extern int snd_seq_kernel_client_dispatch(int client, snd_seq_event_t *ev, int atomic, int hop);
-extern int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void *arg);
+int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
+				 struct snd_seq_client_callback *callback);
+int snd_seq_delete_kernel_client(int client);
+int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
+int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event *ev, int atomic, int hop);
+int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void *arg);
 
 #define SNDRV_SEQ_EXT_MASK	0xc0000000
 #define SNDRV_SEQ_EXT_USRPTR	0x80000000
 #define SNDRV_SEQ_EXT_CHAINED	0x40000000
 
 typedef int (*snd_seq_dump_func_t)(void *ptr, void *buf, int count);
-int snd_seq_expand_var_event(const snd_seq_event_t *event, int count, char *buf, int in_kernel, int size_aligned);
-int snd_seq_dump_var_event(const snd_seq_event_t *event, snd_seq_dump_func_t func, void *private_data);
+int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char *buf,
+			     int in_kernel, int size_aligned);
+int snd_seq_dump_var_event(const struct snd_seq_event *event,
+			   snd_seq_dump_func_t func, void *private_data);
 
 /* interface for OSS emulation */
-int snd_seq_set_queue_tempo(int client, snd_seq_queue_tempo_t *tempo);
+int snd_seq_set_queue_tempo(int client, struct snd_seq_queue_tempo *tempo);
 
 /* port callback routines */
-void snd_port_init_callback(snd_seq_port_callback_t *p);
-snd_seq_port_callback_t *snd_port_alloc_callback(void);
+void snd_port_init_callback(struct snd_seq_port_callback *p);
+struct snd_seq_port_callback *snd_port_alloc_callback(void);
 
 /* port attach/detach */
-int snd_seq_event_port_attach(int client, snd_seq_port_callback_t *pcbp,
+int snd_seq_event_port_attach(int client, struct snd_seq_port_callback *pcbp,
 			      int cap, int type, int midi_channels, int midi_voices, char *portname);
 int snd_seq_event_port_detach(int client, int port);
 
diff --git a/include/sound/seq_midi_emul.h b/include/sound/seq_midi_emul.h
index e58ca45bc73..d6c4615901b 100644
--- a/include/sound/seq_midi_emul.h
+++ b/include/sound/seq_midi_emul.h
@@ -29,7 +29,7 @@
  * channel.  All drivers for hardware that does not understand midi
  * directly will probably need to use this structure.
  */
-typedef struct snd_midi_channel {
+struct snd_midi_channel {
 	void *private;		/* A back pointer to driver data */
 	int  number;		/* The channel number */
 	int  client;		/* The client associated with this channel */
@@ -53,41 +53,43 @@ typedef struct snd_midi_channel {
 	short gm_rpn_fine_tuning; 	/* Master fine tuning */
 	short gm_rpn_coarse_tuning;	/* Master coarse tuning */
 
-} snd_midi_channel_t;
+};
 
 /*
  * A structure that represets a set of channels bound to a port.  There
  * would usually be 16 channels per port.  But fewer could be used for
  * particular cases.
  * The channel set consists of information describing the client and
- * port for this midi synth and an array of snd_midi_channel_t structures.
- * A driver that had no need for snd_midi_channel_t could still use the
+ * port for this midi synth and an array of snd_midi_channel structures.
+ * A driver that had no need for snd_midi_channel could still use the
  * channel set type if it wished with the channel array null.
  */
-typedef struct snd_midi_channel_set {
+struct snd_midi_channel_set {
 	void *private_data;		/* Driver data */
 	int  client;			/* Client for this port */
 	int  port;			/* The port number */
 
 	int  max_channels;		/* Size of the channels array */
-	snd_midi_channel_t *channels;
+	struct snd_midi_channel *channels;
 
 	unsigned char midi_mode;	/* MIDI operating mode */
 	unsigned char gs_master_volume;	/* SYSEX master volume: 0-127 */
 	unsigned char gs_chorus_mode;
 	unsigned char gs_reverb_mode;
 
-} snd_midi_channel_set_t;
+};
 
-typedef struct snd_seq_midi_op {
-	void (*note_on)(void *private_data, int note, int vel, snd_midi_channel_t *chan);
-	void (*note_off)(void *private_data,int note, int vel, snd_midi_channel_t *chan); /* release note */
-	void (*key_press)(void *private_data, int note, int vel, snd_midi_channel_t *chan);
-	void (*note_terminate)(void *private_data, int note, snd_midi_channel_t *chan); /* terminate note immediately */
-	void (*control)(void *private_data, int type, snd_midi_channel_t *chan);
-	void (*nrpn)(void *private_data, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset);
-	void (*sysex)(void *private_data, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset);
-} snd_midi_op_t;
+struct snd_midi_op {
+	void (*note_on)(void *private_data, int note, int vel, struct snd_midi_channel *chan);
+	void (*note_off)(void *private_data,int note, int vel, struct snd_midi_channel *chan); /* release note */
+	void (*key_press)(void *private_data, int note, int vel, struct snd_midi_channel *chan);
+	void (*note_terminate)(void *private_data, int note, struct snd_midi_channel *chan); /* terminate note immediately */
+	void (*control)(void *private_data, int type, struct snd_midi_channel *chan);
+	void (*nrpn)(void *private_data, struct snd_midi_channel *chan,
+		     struct snd_midi_channel_set *chset);
+	void (*sysex)(void *private_data, unsigned char *buf, int len, int parsed,
+		      struct snd_midi_channel_set *chset);
+};
 
 /*
  * These defines are used so that pitchbend, aftertouch etc, can be
@@ -186,10 +188,10 @@ enum {
 };
 
 /* Prototypes for midi_process.c */
-void snd_midi_process_event(snd_midi_op_t *ops, snd_seq_event_t *ev,
-			    snd_midi_channel_set_t *chanset);
-void snd_midi_channel_set_clear(snd_midi_channel_set_t *chset);
-snd_midi_channel_set_t *snd_midi_channel_alloc_set(int n);
-void snd_midi_channel_free_set(snd_midi_channel_set_t *chset);
+void snd_midi_process_event(struct snd_midi_op *ops, struct snd_seq_event *ev,
+			    struct snd_midi_channel_set *chanset);
+void snd_midi_channel_set_clear(struct snd_midi_channel_set *chset);
+struct snd_midi_channel_set *snd_midi_channel_alloc_set(int n);
+void snd_midi_channel_free_set(struct snd_midi_channel_set *chset);
 
 #endif /* __SOUND_SEQ_MIDI_EMUL_H */
diff --git a/include/sound/seq_midi_event.h b/include/sound/seq_midi_event.h
index 8857e2bd31a..dd789e7cdb2 100644
--- a/include/sound/seq_midi_event.h
+++ b/include/sound/seq_midi_event.h
@@ -26,10 +26,8 @@
 
 #define MAX_MIDI_EVENT_BUF	256
 
-typedef struct snd_midi_event_t snd_midi_event_t;
-
 /* midi status */
-struct snd_midi_event_t {
+struct snd_midi_event {
 	int qlen;		/* queue length */
 	int read;		/* chars read */
 	int type;		/* current event type */
@@ -40,15 +38,17 @@ struct snd_midi_event_t {
 	spinlock_t lock;
 };
 
-int snd_midi_event_new(int bufsize, snd_midi_event_t **rdev);
-void snd_midi_event_free(snd_midi_event_t *dev);
-void snd_midi_event_reset_encode(snd_midi_event_t *dev);
-void snd_midi_event_reset_decode(snd_midi_event_t *dev);
-void snd_midi_event_no_status(snd_midi_event_t *dev, int on);
+int snd_midi_event_new(int bufsize, struct snd_midi_event **rdev);
+void snd_midi_event_free(struct snd_midi_event *dev);
+void snd_midi_event_reset_encode(struct snd_midi_event *dev);
+void snd_midi_event_reset_decode(struct snd_midi_event *dev);
+void snd_midi_event_no_status(struct snd_midi_event *dev, int on);
 /* encode from byte stream - return number of written bytes if success */
-long snd_midi_event_encode(snd_midi_event_t *dev, unsigned char *buf, long count, snd_seq_event_t *ev);
-int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev);
+long snd_midi_event_encode(struct snd_midi_event *dev, unsigned char *buf, long count,
+			   struct snd_seq_event *ev);
+int snd_midi_event_encode_byte(struct snd_midi_event *dev, int c, struct snd_seq_event *ev);
 /* decode from event to bytes - return number of written bytes if success */
-long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, snd_seq_event_t *ev);
+long snd_midi_event_decode(struct snd_midi_event *dev, unsigned char *buf, long count,
+			   struct snd_seq_event *ev);
 
 #endif /* __SOUND_SEQ_MIDI_EVENT_H */
diff --git a/include/sound/seq_virmidi.h b/include/sound/seq_virmidi.h
index 1ad27e859af..8d5aea76d7c 100644
--- a/include/sound/seq_virmidi.h
+++ b/include/sound/seq_virmidi.h
@@ -25,25 +25,23 @@
 #include "rawmidi.h"
 #include "seq_midi_event.h"
 
-typedef struct _snd_virmidi_dev snd_virmidi_dev_t;
-
 /*
  * device file instance:
  * This instance is created at each time the midi device file is
  * opened.  Each instance has its own input buffer and MIDI parser
  * (buffer), and is associated with the device instance.
  */
-typedef struct _snd_virmidi {
+struct snd_virmidi {
 	struct list_head list;
 	int seq_mode;
 	int client;
 	int port;
 	unsigned int trigger: 1;
-	snd_midi_event_t *parser;
-	snd_seq_event_t event;
-	snd_virmidi_dev_t *rdev;
-	snd_rawmidi_substream_t *substream;
-} snd_virmidi_t;
+	struct snd_midi_event *parser;
+	struct snd_seq_event event;
+	struct snd_virmidi_dev *rdev;
+	struct snd_rawmidi_substream *substream;
+};
 
 #define SNDRV_VIRMIDI_SUBSCRIBE		(1<<0)
 #define SNDRV_VIRMIDI_USE		(1<<1)
@@ -53,9 +51,9 @@ typedef struct _snd_virmidi {
  * Each virtual midi device has one device instance.  It contains
  * common information and the linked-list of opened files, 
  */
-struct _snd_virmidi_dev {
-	snd_card_t *card;		/* associated card */
-	snd_rawmidi_t *rmidi;		/* rawmidi device */
+struct snd_virmidi_dev {
+	struct snd_card *card;		/* associated card */
+	struct snd_rawmidi *rmidi;		/* rawmidi device */
 	int seq_mode;			/* SNDRV_VIRMIDI_XXX */
 	int device;			/* sequencer device */
 	int client;			/* created/attached client */
@@ -78,6 +76,6 @@ struct _snd_virmidi_dev {
 #define SNDRV_VIRMIDI_SEQ_ATTACH	1
 #define SNDRV_VIRMIDI_SEQ_DISPATCH	2
 
-int snd_virmidi_new(snd_card_t *card, int device, snd_rawmidi_t **rrmidi);
+int snd_virmidi_new(struct snd_card *card, int device, struct snd_rawmidi **rrmidi);
 
 #endif /* __SOUND_SEQ_VIRMIDI */
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index a886db94b1f..5eab4201c64 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -58,14 +58,18 @@ static DECLARE_MUTEX(register_mutex);
  * client table
  */
 static char clienttablock[SNDRV_SEQ_MAX_CLIENTS];
-static client_t *clienttab[SNDRV_SEQ_MAX_CLIENTS];
-static usage_t client_usage;
+static struct snd_seq_client *clienttab[SNDRV_SEQ_MAX_CLIENTS];
+static struct snd_seq_usage client_usage;
 
 /*
  * prototypes
  */
-static int bounce_error_event(client_t *client, snd_seq_event_t *event, int err, int atomic, int hop);
-static int snd_seq_deliver_single_event(client_t *client, snd_seq_event_t *event, int filter, int atomic, int hop);
+static int bounce_error_event(struct snd_seq_client *client,
+			      struct snd_seq_event *event,
+			      int err, int atomic, int hop);
+static int snd_seq_deliver_single_event(struct snd_seq_client *client,
+					struct snd_seq_event *event,
+					int filter, int atomic, int hop);
 
 /*
  */
@@ -96,16 +100,17 @@ static inline unsigned short snd_seq_file_flags(struct file *file)
         }
 }
 
-static inline int snd_seq_write_pool_allocated(client_t *client)
+static inline int snd_seq_write_pool_allocated(struct snd_seq_client *client)
 {
 	return snd_seq_total_cells(client->pool) > 0;
 }
 
 /* return pointer to client structure for specified id */
-static client_t *clientptr(int clientid)
+static struct snd_seq_client *clientptr(int clientid)
 {
 	if (clientid < 0 || clientid >= SNDRV_SEQ_MAX_CLIENTS) {
-		snd_printd("Seq: oops. Trying to get pointer to client %d\n", clientid);
+		snd_printd("Seq: oops. Trying to get pointer to client %d\n",
+			   clientid);
 		return NULL;
 	}
 	return clienttab[clientid];
@@ -113,13 +118,14 @@ static client_t *clientptr(int clientid)
 
 extern int seq_client_load[];
 
-client_t *snd_seq_client_use_ptr(int clientid)
+struct snd_seq_client *snd_seq_client_use_ptr(int clientid)
 {
 	unsigned long flags;
-	client_t *client;
+	struct snd_seq_client *client;
 
 	if (clientid < 0 || clientid >= SNDRV_SEQ_MAX_CLIENTS) {
-		snd_printd("Seq: oops. Trying to get pointer to client %d\n", clientid);
+		snd_printd("Seq: oops. Trying to get pointer to client %d\n",
+			   clientid);
 		return NULL;
 	}
 	spin_lock_irqsave(&clients_lock, flags);
@@ -144,7 +150,8 @@ client_t *snd_seq_client_use_ptr(int clientid)
 					if (seq_client_load[idx] < 0)
 						break;
 					if (seq_client_load[idx] == clientid) {
-						request_module("snd-seq-client-%i", clientid);
+						request_module("snd-seq-client-%i",
+							       clientid);
 						break;
 					}
 				}
@@ -174,14 +181,14 @@ client_t *snd_seq_client_use_ptr(int clientid)
 	return client;
 }
 
-static void usage_alloc(usage_t * res, int num)
+static void usage_alloc(struct snd_seq_usage *res, int num)
 {
 	res->cur += num;
 	if (res->cur > res->peak)
 		res->peak = res->cur;
 }
 
-static void usage_free(usage_t * res, int num)
+static void usage_free(struct snd_seq_usage *res, int num)
 {
 	res->cur -= num;
 }
@@ -196,11 +203,11 @@ int __init client_init_data(void)
 }
 
 
-static client_t *seq_create_client1(int client_index, int poolsize)
+static struct snd_seq_client *seq_create_client1(int client_index, int poolsize)
 {
 	unsigned long flags;
 	int c;
-	client_t *client;
+	struct snd_seq_client *client;
 
 	/* init client data */
 	client = kzalloc(sizeof(*client), GFP_KERNEL);
@@ -241,7 +248,7 @@ static client_t *seq_create_client1(int client_index, int poolsize)
 }
 
 
-static int seq_free_client1(client_t *client)
+static int seq_free_client1(struct snd_seq_client *client)
 {
 	unsigned long flags;
 
@@ -263,12 +270,13 @@ static int seq_free_client1(client_t *client)
 }
 
 
-static void seq_free_client(client_t * client)
+static void seq_free_client(struct snd_seq_client * client)
 {
 	down(&register_mutex);
 	switch (client->type) {
 	case NO_CLIENT:
-		snd_printk(KERN_WARNING "Seq: Trying to free unused client %d\n", client->number);
+		snd_printk(KERN_WARNING "Seq: Trying to free unused client %d\n",
+			   client->number);
 		break;
 	case USER_CLIENT:
 	case KERNEL_CLIENT:
@@ -277,7 +285,8 @@ static void seq_free_client(client_t * client)
 		break;
 
 	default:
-		snd_printk(KERN_ERR "Seq: Trying to free client %d with undefined type = %d\n", client->number, client->type);
+		snd_printk(KERN_ERR "Seq: Trying to free client %d with undefined type = %d\n",
+			   client->number, client->type);
 	}
 	up(&register_mutex);
 
@@ -292,8 +301,8 @@ static void seq_free_client(client_t * client)
 static int snd_seq_open(struct inode *inode, struct file *file)
 {
 	int c, mode;			/* client id */
-	client_t *client;
-	user_client_t *user;
+	struct snd_seq_client *client;
+	struct snd_seq_user_client *user;
 
 	if (down_interruptible(&register_mutex))
 		return -ERESTARTSYS;
@@ -344,7 +353,7 @@ static int snd_seq_open(struct inode *inode, struct file *file)
 /* delete a user client */
 static int snd_seq_release(struct inode *inode, struct file *file)
 {
-	client_t *client = (client_t *) file->private_data;
+	struct snd_seq_client *client = file->private_data;
 
 	if (client) {
 		seq_free_client(client);
@@ -364,13 +373,14 @@ static int snd_seq_release(struct inode *inode, struct file *file)
  *	-EINVAL	no enough user-space buffer to write the whole event
  *	-EFAULT	seg. fault during copy to user space
  */
-static ssize_t snd_seq_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
+static ssize_t snd_seq_read(struct file *file, char __user *buf, size_t count,
+			    loff_t *offset)
 {
-	client_t *client = (client_t *) file->private_data;
-	fifo_t *fifo;
+	struct snd_seq_client *client = file->private_data;
+	struct snd_seq_fifo *fifo;
 	int err;
 	long result = 0;
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 
 	if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_INPUT))
 		return -ENXIO;
@@ -396,7 +406,7 @@ static ssize_t snd_seq_read(struct file *file, char __user *buf, size_t count, l
 	snd_seq_fifo_lock(fifo);
 
 	/* while data available in queue */
-	while (count >= sizeof(snd_seq_event_t)) {
+	while (count >= sizeof(struct snd_seq_event)) {
 		int nonblock;
 
 		nonblock = (file->f_flags & O_NONBLOCK) || result > 0;
@@ -404,34 +414,34 @@ static ssize_t snd_seq_read(struct file *file, char __user *buf, size_t count, l
 			break;
 		}
 		if (snd_seq_ev_is_variable(&cell->event)) {
-			snd_seq_event_t tmpev;
+			struct snd_seq_event tmpev;
 			tmpev = cell->event;
 			tmpev.data.ext.len &= ~SNDRV_SEQ_EXT_MASK;
-			if (copy_to_user(buf, &tmpev, sizeof(snd_seq_event_t))) {
+			if (copy_to_user(buf, &tmpev, sizeof(struct snd_seq_event))) {
 				err = -EFAULT;
 				break;
 			}
-			count -= sizeof(snd_seq_event_t);
-			buf += sizeof(snd_seq_event_t);
+			count -= sizeof(struct snd_seq_event);
+			buf += sizeof(struct snd_seq_event);
 			err = snd_seq_expand_var_event(&cell->event, count,
 						       (char __force *)buf, 0,
-						       sizeof(snd_seq_event_t));
+						       sizeof(struct snd_seq_event));
 			if (err < 0)
 				break;
 			result += err;
 			count -= err;
 			buf += err;
 		} else {
-			if (copy_to_user(buf, &cell->event, sizeof(snd_seq_event_t))) {
+			if (copy_to_user(buf, &cell->event, sizeof(struct snd_seq_event))) {
 				err = -EFAULT;
 				break;
 			}
-			count -= sizeof(snd_seq_event_t);
-			buf += sizeof(snd_seq_event_t);
+			count -= sizeof(struct snd_seq_event);
+			buf += sizeof(struct snd_seq_event);
 		}
 		snd_seq_cell_free(cell);
 		cell = NULL; /* to be sure */
-		result += sizeof(snd_seq_event_t);
+		result += sizeof(struct snd_seq_event);
 	}
 
 	if (err < 0) {
@@ -449,7 +459,7 @@ static ssize_t snd_seq_read(struct file *file, char __user *buf, size_t count, l
 /*
  * check access permission to the port
  */
-static int check_port_perm(client_port_t *port, unsigned int flags)
+static int check_port_perm(struct snd_seq_client_port *port, unsigned int flags)
 {
 	if ((port->capability & flags) != flags)
 		return 0;
@@ -460,9 +470,10 @@ static int check_port_perm(client_port_t *port, unsigned int flags)
  * check if the destination client is available, and return the pointer
  * if filter is non-zero, client filter bitmap is tested.
  */
-static client_t *get_event_dest_client(snd_seq_event_t *event, int filter)
+static struct snd_seq_client *get_event_dest_client(struct snd_seq_event *event,
+						    int filter)
 {
-	client_t *dest;
+	struct snd_seq_client *dest;
 
 	dest = snd_seq_client_use_ptr(event->dest.client);
 	if (dest == NULL)
@@ -493,10 +504,11 @@ __not_avail:
  * quoted in SNDRV_SEQ_EVENT_KERNEL_ERROR, since this requires no extra
  * kmalloc.
  */
-static int bounce_error_event(client_t *client, snd_seq_event_t *event,
+static int bounce_error_event(struct snd_seq_client *client,
+			      struct snd_seq_event *event,
 			      int err, int atomic, int hop)
 {
-	snd_seq_event_t bounce_ev;
+	struct snd_seq_event bounce_ev;
 	int result;
 
 	if (client == NULL ||
@@ -531,9 +543,10 @@ static int bounce_error_event(client_t *client, snd_seq_event_t *event,
  * of the given queue.
  * return non-zero if updated.
  */
-static int update_timestamp_of_queue(snd_seq_event_t *event, int queue, int real_time)
+static int update_timestamp_of_queue(struct snd_seq_event *event,
+				     int queue, int real_time)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	q = queueptr(queue);
 	if (! q)
@@ -559,12 +572,12 @@ static int update_timestamp_of_queue(snd_seq_event_t *event, int queue, int real
  *  RETURN VALUE: 0 : if succeeded
  *		 <0 : error
  */
-static int snd_seq_deliver_single_event(client_t *client,
-					snd_seq_event_t *event,
+static int snd_seq_deliver_single_event(struct snd_seq_client *client,
+					struct snd_seq_event *event,
 					int filter, int atomic, int hop)
 {
-	client_t *dest = NULL;
-	client_port_t *dest_port = NULL;
+	struct snd_seq_client *dest = NULL;
+	struct snd_seq_client_port *dest_port = NULL;
 	int result = -ENOENT;
 	int direct;
 
@@ -596,7 +609,9 @@ static int snd_seq_deliver_single_event(client_t *client,
 	case KERNEL_CLIENT:
 		if (dest_port->event_input == NULL)
 			break;
-		result = dest_port->event_input(event, direct, dest_port->private_data, atomic, hop);
+		result = dest_port->event_input(event, direct,
+						dest_port->private_data,
+						atomic, hop);
 		break;
 	default:
 		break;
@@ -618,16 +633,16 @@ static int snd_seq_deliver_single_event(client_t *client,
 /*
  * send the event to all subscribers:
  */
-static int deliver_to_subscribers(client_t *client,
-				  snd_seq_event_t *event,
+static int deliver_to_subscribers(struct snd_seq_client *client,
+				  struct snd_seq_event *event,
 				  int atomic, int hop)
 {
-	subscribers_t *subs;
+	struct snd_seq_subscribers *subs;
 	int err = 0, num_ev = 0;
-	snd_seq_event_t event_saved;
-	client_port_t *src_port;
+	struct snd_seq_event event_saved;
+	struct snd_seq_client_port *src_port;
 	struct list_head *p;
-	port_subs_info_t *grp;
+	struct snd_seq_port_subs_info *grp;
 
 	src_port = snd_seq_port_use_ptr(client, event->source.port);
 	if (src_port == NULL)
@@ -642,7 +657,7 @@ static int deliver_to_subscribers(client_t *client,
 	else
 		down_read(&grp->list_mutex);
 	list_for_each(p, &grp->list_head) {
-		subs = list_entry(p, subscribers_t, src_list);
+		subs = list_entry(p, struct snd_seq_subscribers, src_list);
 		event->dest = subs->info.dest;
 		if (subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIMESTAMP)
 			/* convert time according to flag with subscription */
@@ -670,12 +685,12 @@ static int deliver_to_subscribers(client_t *client,
 /*
  * broadcast to all ports:
  */
-static int port_broadcast_event(client_t *client,
-				snd_seq_event_t *event,
+static int port_broadcast_event(struct snd_seq_client *client,
+				struct snd_seq_event *event,
 				int atomic, int hop)
 {
 	int num_ev = 0, err = 0;
-	client_t *dest_client;
+	struct snd_seq_client *dest_client;
 	struct list_head *p;
 
 	dest_client = get_event_dest_client(event, SNDRV_SEQ_FILTER_BROADCAST);
@@ -684,7 +699,7 @@ static int port_broadcast_event(client_t *client,
 
 	read_lock(&dest_client->ports_lock);
 	list_for_each(p, &dest_client->ports_list_head) {
-		client_port_t *port = list_entry(p, client_port_t, list);
+		struct snd_seq_client_port *port = list_entry(p, struct snd_seq_client_port, list);
 		event->dest.port = port->addr.port;
 		/* pass NULL as source client to avoid error bounce */
 		err = snd_seq_deliver_single_event(NULL, event,
@@ -704,12 +719,12 @@ static int port_broadcast_event(client_t *client,
  * send the event to all clients:
  * if destination port is also ADDRESS_BROADCAST, deliver to all ports.
  */
-static int broadcast_event(client_t *client,
-			   snd_seq_event_t *event, int atomic, int hop)
+static int broadcast_event(struct snd_seq_client *client,
+			   struct snd_seq_event *event, int atomic, int hop)
 {
 	int err = 0, num_ev = 0;
 	int dest;
-	snd_seq_addr_t addr;
+	struct snd_seq_addr addr;
 
 	addr = event->dest; /* save */
 
@@ -736,7 +751,7 @@ static int broadcast_event(client_t *client,
 
 
 /* multicast - not supported yet */
-static int multicast_event(client_t *client, snd_seq_event_t *event,
+static int multicast_event(struct snd_seq_client *client, struct snd_seq_event *event,
 			   int atomic, int hop)
 {
 	snd_printd("seq: multicast not supported yet.\n");
@@ -753,7 +768,7 @@ static int multicast_event(client_t *client, snd_seq_event_t *event,
  *               n == 0 : the event was not passed to any client.
  *               n < 0  : error - event was not processed.
  */
-static int snd_seq_deliver_event(client_t *client, snd_seq_event_t *event,
+static int snd_seq_deliver_event(struct snd_seq_client *client, struct snd_seq_event *event,
 				 int atomic, int hop)
 {
 	int result;
@@ -794,9 +809,9 @@ static int snd_seq_deliver_event(client_t *client, snd_seq_event_t *event,
  *		 n == 0 : the event was not passed to any client.
  *		 n < 0  : error - event was not processed.
  */
-int snd_seq_dispatch_event(snd_seq_event_cell_t *cell, int atomic, int hop)
+int snd_seq_dispatch_event(struct snd_seq_event_cell *cell, int atomic, int hop)
 {
-	client_t *client;
+	struct snd_seq_client *client;
 	int result;
 
 	snd_assert(cell != NULL, return -EINVAL);
@@ -812,7 +827,7 @@ int snd_seq_dispatch_event(snd_seq_event_cell_t *cell, int atomic, int hop)
 		 * the event cell is re-used as a NOTE-OFF event and
 		 * enqueued again.
 		 */
-		snd_seq_event_t tmpev, *ev;
+		struct snd_seq_event tmpev, *ev;
 
 		/* reserve this event to enqueue note-off later */
 		tmpev = cell->event;
@@ -865,12 +880,12 @@ int snd_seq_dispatch_event(snd_seq_event_cell_t *cell, int atomic, int hop)
  * if pool is empty and blocking is TRUE, sleep until a new cell is
  * available.
  */
-static int snd_seq_client_enqueue_event(client_t *client,
-					snd_seq_event_t *event,
+static int snd_seq_client_enqueue_event(struct snd_seq_client *client,
+					struct snd_seq_event *event,
 					struct file *file, int blocking,
 					int atomic, int hop)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 	int err;
 
 	/* special queue values - force direct passing */
@@ -886,7 +901,7 @@ static int snd_seq_client_enqueue_event(client_t *client,
 #endif
 	if (event->dest.client == SNDRV_SEQ_ADDRESS_SUBSCRIBERS) {
 		/* check presence of source port */
-		client_port_t *src_port = snd_seq_port_use_ptr(client, event->source.port);
+		struct snd_seq_client_port *src_port = snd_seq_port_use_ptr(client, event->source.port);
 		if (src_port == NULL)
 			return -EINVAL;
 		snd_seq_port_unlock(src_port);
@@ -924,7 +939,7 @@ static int snd_seq_client_enqueue_event(client_t *client,
  * check validity of event type and data length.
  * return non-zero if invalid.
  */
-static int check_event_type_and_length(snd_seq_event_t *ev)
+static int check_event_type_and_length(struct snd_seq_event *ev)
 {
 	switch (snd_seq_ev_length_type(ev)) {
 	case SNDRV_SEQ_EVENT_LENGTH_FIXED:
@@ -957,12 +972,13 @@ static int check_event_type_and_length(snd_seq_event_t *ev)
  *	-EMLINK	too many hops
  *	others	depends on return value from driver callback
  */
-static ssize_t snd_seq_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
+static ssize_t snd_seq_write(struct file *file, const char __user *buf,
+			     size_t count, loff_t *offset)
 {
-	client_t *client = (client_t *) file->private_data;
+	struct snd_seq_client *client = file->private_data;
 	int written = 0, len;
 	int err = -EINVAL;
-	snd_seq_event_t event;
+	struct snd_seq_event event;
 
 	if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_OUTPUT))
 		return -ENXIO;
@@ -980,7 +996,7 @@ static ssize_t snd_seq_write(struct file *file, const char __user *buf, size_t c
 	}
 
 	/* only process whole events */
-	while (count >= sizeof(snd_seq_event_t)) {
+	while (count >= sizeof(struct snd_seq_event)) {
 		/* Read in the event header from the user */
 		len = sizeof(event);
 		if (copy_from_user(&event, buf, len)) {
@@ -1012,7 +1028,7 @@ static ssize_t snd_seq_write(struct file *file, const char __user *buf, size_t c
 			/* set user space pointer */
 			event.data.ext.len = extlen | SNDRV_SEQ_EXT_USRPTR;
 			event.data.ext.ptr = (char __force *)buf
-						+ sizeof(snd_seq_event_t);
+						+ sizeof(struct snd_seq_event);
 			len += extlen; /* increment data length */
 		} else {
 #ifdef CONFIG_COMPAT
@@ -1046,7 +1062,7 @@ static ssize_t snd_seq_write(struct file *file, const char __user *buf, size_t c
  */
 static unsigned int snd_seq_poll(struct file *file, poll_table * wait)
 {
-	client_t *client = (client_t *) file->private_data;
+	struct snd_seq_client *client = file->private_data;
 	unsigned int mask = 0;
 
 	/* check client structures are in place */
@@ -1076,9 +1092,9 @@ static unsigned int snd_seq_poll(struct file *file, poll_table * wait)
 
 
 /* SYSTEM_INFO ioctl() */
-static int snd_seq_ioctl_system_info(client_t *client, void __user *arg)
+static int snd_seq_ioctl_system_info(struct snd_seq_client *client, void __user *arg)
 {
-	snd_seq_system_info_t info;
+	struct snd_seq_system_info info;
 
 	memset(&info, 0, sizeof(info));
 	/* fill the info fields */
@@ -1096,10 +1112,10 @@ static int snd_seq_ioctl_system_info(client_t *client, void __user *arg)
 
 
 /* RUNNING_MODE ioctl() */
-static int snd_seq_ioctl_running_mode(client_t *client, void __user *arg)
+static int snd_seq_ioctl_running_mode(struct snd_seq_client *client, void __user *arg)
 {
-	struct sndrv_seq_running_info info;
-	client_t *cptr;
+	struct snd_seq_running_info info;
+	struct snd_seq_client *cptr;
 	int err = 0;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
@@ -1133,7 +1149,8 @@ static int snd_seq_ioctl_running_mode(client_t *client, void __user *arg)
 }
 
 /* CLIENT_INFO ioctl() */
-static void get_client_info(client_t *cptr, snd_seq_client_info_t *info)
+static void get_client_info(struct snd_seq_client *cptr,
+			    struct snd_seq_client_info *info)
 {
 	info->client = cptr->number;
 
@@ -1147,10 +1164,11 @@ static void get_client_info(client_t *cptr, snd_seq_client_info_t *info)
 	memset(info->reserved, 0, sizeof(info->reserved));
 }
 
-static int snd_seq_ioctl_get_client_info(client_t * client, void __user *arg)
+static int snd_seq_ioctl_get_client_info(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	client_t *cptr;
-	snd_seq_client_info_t client_info;
+	struct snd_seq_client *cptr;
+	struct snd_seq_client_info client_info;
 
 	if (copy_from_user(&client_info, arg, sizeof(client_info)))
 		return -EFAULT;
@@ -1170,9 +1188,10 @@ static int snd_seq_ioctl_get_client_info(client_t * client, void __user *arg)
 
 
 /* CLIENT_INFO ioctl() */
-static int snd_seq_ioctl_set_client_info(client_t * client, void __user *arg)
+static int snd_seq_ioctl_set_client_info(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	snd_seq_client_info_t client_info;
+	struct snd_seq_client_info client_info;
 
 	if (copy_from_user(&client_info, arg, sizeof(client_info)))
 		return -EFAULT;
@@ -1199,11 +1218,12 @@ static int snd_seq_ioctl_set_client_info(client_t * client, void __user *arg)
 /* 
  * CREATE PORT ioctl() 
  */
-static int snd_seq_ioctl_create_port(client_t * client, void __user *arg)
+static int snd_seq_ioctl_create_port(struct snd_seq_client *client,
+				     void __user *arg)
 {
-	client_port_t *port;
-	snd_seq_port_info_t info;
-	snd_seq_port_callback_t *callback;
+	struct snd_seq_client_port *port;
+	struct snd_seq_port_info info;
+	struct snd_seq_port_callback *callback;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1249,9 +1269,10 @@ static int snd_seq_ioctl_create_port(client_t * client, void __user *arg)
 /* 
  * DELETE PORT ioctl() 
  */
-static int snd_seq_ioctl_delete_port(client_t * client, void __user *arg)
+static int snd_seq_ioctl_delete_port(struct snd_seq_client *client,
+				     void __user *arg)
 {
-	snd_seq_port_info_t info;
+	struct snd_seq_port_info info;
 	int err;
 
 	/* set passed parameters */
@@ -1272,11 +1293,12 @@ static int snd_seq_ioctl_delete_port(client_t * client, void __user *arg)
 /* 
  * GET_PORT_INFO ioctl() (on any client) 
  */
-static int snd_seq_ioctl_get_port_info(client_t *client, void __user *arg)
+static int snd_seq_ioctl_get_port_info(struct snd_seq_client *client,
+				       void __user *arg)
 {
-	client_t *cptr;
-	client_port_t *port;
-	snd_seq_port_info_t info;
+	struct snd_seq_client *cptr;
+	struct snd_seq_client_port *port;
+	struct snd_seq_port_info info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1304,10 +1326,11 @@ static int snd_seq_ioctl_get_port_info(client_t *client, void __user *arg)
 /* 
  * SET_PORT_INFO ioctl() (only ports on this/own client) 
  */
-static int snd_seq_ioctl_set_port_info(client_t * client, void __user *arg)
+static int snd_seq_ioctl_set_port_info(struct snd_seq_client *client,
+				       void __user *arg)
 {
-	client_port_t *port;
-	snd_seq_port_info_t info;
+	struct snd_seq_client_port *port;
+	struct snd_seq_port_info info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1329,9 +1352,10 @@ static int snd_seq_ioctl_set_port_info(client_t * client, void __user *arg)
 #define PERM_RD		(SNDRV_SEQ_PORT_CAP_READ|SNDRV_SEQ_PORT_CAP_SUBS_READ)
 #define PERM_WR		(SNDRV_SEQ_PORT_CAP_WRITE|SNDRV_SEQ_PORT_CAP_SUBS_WRITE)
 
-static int check_subscription_permission(client_t *client, client_port_t *sport,
-					 client_port_t *dport,
-					 snd_seq_port_subscribe_t *subs)
+static int check_subscription_permission(struct snd_seq_client *client,
+					 struct snd_seq_client_port *sport,
+					 struct snd_seq_client_port *dport,
+					 struct snd_seq_port_subscribe *subs)
 {
 	if (client->number != subs->sender.client &&
 	    client->number != subs->dest.client) {
@@ -1363,9 +1387,10 @@ static int check_subscription_permission(client_t *client, client_port_t *sport,
  * client must be user client.
  */
 int snd_seq_client_notify_subscription(int client, int port,
-				       snd_seq_port_subscribe_t *info, int evtype)
+				       struct snd_seq_port_subscribe *info,
+				       int evtype)
 {
-	snd_seq_event_t event;
+	struct snd_seq_event event;
 
 	memset(&event, 0, sizeof(event));
 	event.type = evtype;
@@ -1379,12 +1404,13 @@ int snd_seq_client_notify_subscription(int client, int port,
 /* 
  * add to port's subscription list IOCTL interface 
  */
-static int snd_seq_ioctl_subscribe_port(client_t * client, void __user *arg)
+static int snd_seq_ioctl_subscribe_port(struct snd_seq_client *client,
+					void __user *arg)
 {
 	int result = -EINVAL;
-	client_t *receiver = NULL, *sender = NULL;
-	client_port_t *sport = NULL, *dport = NULL;
-	snd_seq_port_subscribe_t subs;
+	struct snd_seq_client *receiver = NULL, *sender = NULL;
+	struct snd_seq_client_port *sport = NULL, *dport = NULL;
+	struct snd_seq_port_subscribe subs;
 
 	if (copy_from_user(&subs, arg, sizeof(subs)))
 		return -EFAULT;
@@ -1423,12 +1449,13 @@ static int snd_seq_ioctl_subscribe_port(client_t * client, void __user *arg)
 /* 
  * remove from port's subscription list 
  */
-static int snd_seq_ioctl_unsubscribe_port(client_t * client, void __user *arg)
+static int snd_seq_ioctl_unsubscribe_port(struct snd_seq_client *client,
+					  void __user *arg)
 {
 	int result = -ENXIO;
-	client_t *receiver = NULL, *sender = NULL;
-	client_port_t *sport = NULL, *dport = NULL;
-	snd_seq_port_subscribe_t subs;
+	struct snd_seq_client *receiver = NULL, *sender = NULL;
+	struct snd_seq_client_port *sport = NULL, *dport = NULL;
+	struct snd_seq_port_subscribe subs;
 
 	if (copy_from_user(&subs, arg, sizeof(subs)))
 		return -EFAULT;
@@ -1464,11 +1491,12 @@ static int snd_seq_ioctl_unsubscribe_port(client_t * client, void __user *arg)
 
 
 /* CREATE_QUEUE ioctl() */
-static int snd_seq_ioctl_create_queue(client_t *client, void __user *arg)
+static int snd_seq_ioctl_create_queue(struct snd_seq_client *client,
+				      void __user *arg)
 {
-	snd_seq_queue_info_t info;
+	struct snd_seq_queue_info info;
 	int result;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1498,9 +1526,10 @@ static int snd_seq_ioctl_create_queue(client_t *client, void __user *arg)
 }
 
 /* DELETE_QUEUE ioctl() */
-static int snd_seq_ioctl_delete_queue(client_t *client, void __user *arg)
+static int snd_seq_ioctl_delete_queue(struct snd_seq_client *client,
+				      void __user *arg)
 {
-	snd_seq_queue_info_t info;
+	struct snd_seq_queue_info info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1509,10 +1538,11 @@ static int snd_seq_ioctl_delete_queue(client_t *client, void __user *arg)
 }
 
 /* GET_QUEUE_INFO ioctl() */
-static int snd_seq_ioctl_get_queue_info(client_t *client, void __user *arg)
+static int snd_seq_ioctl_get_queue_info(struct snd_seq_client *client,
+					void __user *arg)
 {
-	snd_seq_queue_info_t info;
-	queue_t *q;
+	struct snd_seq_queue_info info;
+	struct snd_seq_queue *q;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1535,10 +1565,11 @@ static int snd_seq_ioctl_get_queue_info(client_t *client, void __user *arg)
 }
 
 /* SET_QUEUE_INFO ioctl() */
-static int snd_seq_ioctl_set_queue_info(client_t *client, void __user *arg)
+static int snd_seq_ioctl_set_queue_info(struct snd_seq_client *client,
+					void __user *arg)
 {
-	snd_seq_queue_info_t info;
-	queue_t *q;
+	struct snd_seq_queue_info info;
+	struct snd_seq_queue *q;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1570,10 +1601,10 @@ static int snd_seq_ioctl_set_queue_info(client_t *client, void __user *arg)
 }
 
 /* GET_NAMED_QUEUE ioctl() */
-static int snd_seq_ioctl_get_named_queue(client_t *client, void __user *arg)
+static int snd_seq_ioctl_get_named_queue(struct snd_seq_client *client, void __user *arg)
 {
-	snd_seq_queue_info_t info;
-	queue_t *q;
+	struct snd_seq_queue_info info;
+	struct snd_seq_queue *q;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1593,11 +1624,12 @@ static int snd_seq_ioctl_get_named_queue(client_t *client, void __user *arg)
 }
 
 /* GET_QUEUE_STATUS ioctl() */
-static int snd_seq_ioctl_get_queue_status(client_t * client, void __user *arg)
+static int snd_seq_ioctl_get_queue_status(struct snd_seq_client *client,
+					  void __user *arg)
 {
-	snd_seq_queue_status_t status;
-	queue_t *queue;
-	seq_timer_t *tmr;
+	struct snd_seq_queue_status status;
+	struct snd_seq_queue *queue;
+	struct snd_seq_timer *tmr;
 
 	if (copy_from_user(&status, arg, sizeof(status)))
 		return -EFAULT;
@@ -1626,11 +1658,12 @@ static int snd_seq_ioctl_get_queue_status(client_t * client, void __user *arg)
 
 
 /* GET_QUEUE_TEMPO ioctl() */
-static int snd_seq_ioctl_get_queue_tempo(client_t * client, void __user *arg)
+static int snd_seq_ioctl_get_queue_tempo(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	snd_seq_queue_tempo_t tempo;
-	queue_t *queue;
-	seq_timer_t *tmr;
+	struct snd_seq_queue_tempo tempo;
+	struct snd_seq_queue *queue;
+	struct snd_seq_timer *tmr;
 
 	if (copy_from_user(&tempo, arg, sizeof(tempo)))
 		return -EFAULT;
@@ -1656,17 +1689,18 @@ static int snd_seq_ioctl_get_queue_tempo(client_t * client, void __user *arg)
 
 
 /* SET_QUEUE_TEMPO ioctl() */
-int snd_seq_set_queue_tempo(int client, snd_seq_queue_tempo_t *tempo)
+int snd_seq_set_queue_tempo(int client, struct snd_seq_queue_tempo *tempo)
 {
 	if (!snd_seq_queue_check_access(tempo->queue, client))
 		return -EPERM;
 	return snd_seq_queue_timer_set_tempo(tempo->queue, client, tempo);
 }
 
-static int snd_seq_ioctl_set_queue_tempo(client_t * client, void __user *arg)
+static int snd_seq_ioctl_set_queue_tempo(struct snd_seq_client *client,
+					 void __user *arg)
 {
 	int result;
-	snd_seq_queue_tempo_t tempo;
+	struct snd_seq_queue_tempo tempo;
 
 	if (copy_from_user(&tempo, arg, sizeof(tempo)))
 		return -EFAULT;
@@ -1677,11 +1711,12 @@ static int snd_seq_ioctl_set_queue_tempo(client_t * client, void __user *arg)
 
 
 /* GET_QUEUE_TIMER ioctl() */
-static int snd_seq_ioctl_get_queue_timer(client_t * client, void __user *arg)
+static int snd_seq_ioctl_get_queue_timer(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	snd_seq_queue_timer_t timer;
-	queue_t *queue;
-	seq_timer_t *tmr;
+	struct snd_seq_queue_timer timer;
+	struct snd_seq_queue *queue;
+	struct snd_seq_timer *tmr;
 
 	if (copy_from_user(&timer, arg, sizeof(timer)))
 		return -EFAULT;
@@ -1713,10 +1748,11 @@ static int snd_seq_ioctl_get_queue_timer(client_t * client, void __user *arg)
 
 
 /* SET_QUEUE_TIMER ioctl() */
-static int snd_seq_ioctl_set_queue_timer(client_t * client, void __user *arg)
+static int snd_seq_ioctl_set_queue_timer(struct snd_seq_client *client,
+					 void __user *arg)
 {
 	int result = 0;
-	snd_seq_queue_timer_t timer;
+	struct snd_seq_queue_timer timer;
 
 	if (copy_from_user(&timer, arg, sizeof(timer)))
 		return -EFAULT;
@@ -1725,8 +1761,8 @@ static int snd_seq_ioctl_set_queue_timer(client_t * client, void __user *arg)
 		return -EINVAL;
 
 	if (snd_seq_queue_check_access(timer.queue, client->number)) {
-		queue_t *q;
-		seq_timer_t *tmr;
+		struct snd_seq_queue *q;
+		struct snd_seq_timer *tmr;
 
 		q = queueptr(timer.queue);
 		if (q == NULL)
@@ -1754,9 +1790,10 @@ static int snd_seq_ioctl_set_queue_timer(client_t * client, void __user *arg)
 
 
 /* GET_QUEUE_CLIENT ioctl() */
-static int snd_seq_ioctl_get_queue_client(client_t * client, void __user *arg)
+static int snd_seq_ioctl_get_queue_client(struct snd_seq_client *client,
+					  void __user *arg)
 {
-	snd_seq_queue_client_t info;
+	struct snd_seq_queue_client info;
 	int used;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
@@ -1775,10 +1812,11 @@ static int snd_seq_ioctl_get_queue_client(client_t * client, void __user *arg)
 
 
 /* SET_QUEUE_CLIENT ioctl() */
-static int snd_seq_ioctl_set_queue_client(client_t * client, void __user *arg)
+static int snd_seq_ioctl_set_queue_client(struct snd_seq_client *client,
+					  void __user *arg)
 {
 	int err;
-	snd_seq_queue_client_t info;
+	struct snd_seq_queue_client info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1794,10 +1832,11 @@ static int snd_seq_ioctl_set_queue_client(client_t * client, void __user *arg)
 
 
 /* GET_CLIENT_POOL ioctl() */
-static int snd_seq_ioctl_get_client_pool(client_t * client, void __user *arg)
+static int snd_seq_ioctl_get_client_pool(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	snd_seq_client_pool_t info;
-	client_t *cptr;
+	struct snd_seq_client_pool info;
+	struct snd_seq_client *cptr;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1828,9 +1867,10 @@ static int snd_seq_ioctl_get_client_pool(client_t * client, void __user *arg)
 }
 
 /* SET_CLIENT_POOL ioctl() */
-static int snd_seq_ioctl_set_client_pool(client_t * client, void __user *arg)
+static int snd_seq_ioctl_set_client_pool(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	snd_seq_client_pool_t info;
+	struct snd_seq_client_pool info;
 	int rc;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
@@ -1872,9 +1912,10 @@ static int snd_seq_ioctl_set_client_pool(client_t * client, void __user *arg)
 
 
 /* REMOVE_EVENTS ioctl() */
-static int snd_seq_ioctl_remove_events(client_t * client, void __user *arg)
+static int snd_seq_ioctl_remove_events(struct snd_seq_client *client,
+				       void __user *arg)
 {
-	snd_seq_remove_events_t info;
+	struct snd_seq_remove_events info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -1901,13 +1942,14 @@ static int snd_seq_ioctl_remove_events(client_t * client, void __user *arg)
 /*
  * get subscription info
  */
-static int snd_seq_ioctl_get_subscription(client_t *client, void __user *arg)
+static int snd_seq_ioctl_get_subscription(struct snd_seq_client *client,
+					  void __user *arg)
 {
 	int result;
-	client_t *sender = NULL;
-	client_port_t *sport = NULL;
-	snd_seq_port_subscribe_t subs;
-	subscribers_t *p;
+	struct snd_seq_client *sender = NULL;
+	struct snd_seq_client_port *sport = NULL;
+	struct snd_seq_port_subscribe subs;
+	struct snd_seq_subscribers *p;
 
 	if (copy_from_user(&subs, arg, sizeof(subs)))
 		return -EFAULT;
@@ -1940,13 +1982,14 @@ static int snd_seq_ioctl_get_subscription(client_t *client, void __user *arg)
 /*
  * get subscription info - check only its presence
  */
-static int snd_seq_ioctl_query_subs(client_t *client, void __user *arg)
+static int snd_seq_ioctl_query_subs(struct snd_seq_client *client,
+				    void __user *arg)
 {
 	int result = -ENXIO;
-	client_t *cptr = NULL;
-	client_port_t *port = NULL;
-	snd_seq_query_subs_t subs;
-	port_subs_info_t *group;
+	struct snd_seq_client *cptr = NULL;
+	struct snd_seq_client_port *port = NULL;
+	struct snd_seq_query_subs subs;
+	struct snd_seq_port_subs_info *group;
 	struct list_head *p;
 	int i;
 
@@ -1977,12 +2020,12 @@ static int snd_seq_ioctl_query_subs(client_t *client, void __user *arg)
 	list_for_each(p, &group->list_head) {
 		if (i++ == subs.index) {
 			/* found! */
-			subscribers_t *s;
+			struct snd_seq_subscribers *s;
 			if (subs.type == SNDRV_SEQ_QUERY_SUBS_READ) {
-				s = list_entry(p, subscribers_t, src_list);
+				s = list_entry(p, struct snd_seq_subscribers, src_list);
 				subs.addr = s->info.dest;
 			} else {
-				s = list_entry(p, subscribers_t, dest_list);
+				s = list_entry(p, struct snd_seq_subscribers, dest_list);
 				subs.addr = s->info.sender;
 			}
 			subs.flags = s->info.flags;
@@ -2009,10 +2052,11 @@ static int snd_seq_ioctl_query_subs(client_t *client, void __user *arg)
 /*
  * query next client
  */
-static int snd_seq_ioctl_query_next_client(client_t *client, void __user *arg)
+static int snd_seq_ioctl_query_next_client(struct snd_seq_client *client,
+					   void __user *arg)
 {
-	client_t *cptr = NULL;
-	snd_seq_client_info_t info;
+	struct snd_seq_client *cptr = NULL;
+	struct snd_seq_client_info info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -2040,11 +2084,12 @@ static int snd_seq_ioctl_query_next_client(client_t *client, void __user *arg)
 /* 
  * query next port
  */
-static int snd_seq_ioctl_query_next_port(client_t *client, void __user *arg)
+static int snd_seq_ioctl_query_next_port(struct snd_seq_client *client,
+					 void __user *arg)
 {
-	client_t *cptr;
-	client_port_t *port = NULL;
-	snd_seq_port_info_t info;
+	struct snd_seq_client *cptr;
+	struct snd_seq_client_port *port = NULL;
+	struct snd_seq_port_info info;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
 		return -EFAULT;
@@ -2075,7 +2120,7 @@ static int snd_seq_ioctl_query_next_port(client_t *client, void __user *arg)
 
 static struct seq_ioctl_table {
 	unsigned int cmd;
-	int (*func)(client_t *client, void __user * arg);
+	int (*func)(struct snd_seq_client *client, void __user * arg);
 } ioctl_tables[] = {
 	{ SNDRV_SEQ_IOCTL_SYSTEM_INFO, snd_seq_ioctl_system_info },
 	{ SNDRV_SEQ_IOCTL_RUNNING_MODE, snd_seq_ioctl_running_mode },
@@ -2109,7 +2154,8 @@ static struct seq_ioctl_table {
 	{ 0, NULL },
 };
 
-static int snd_seq_do_ioctl(client_t *client, unsigned int cmd, void __user *arg)
+static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd,
+			    void __user *arg)
 {
 	struct seq_ioctl_table *p;
 
@@ -2136,7 +2182,7 @@ static int snd_seq_do_ioctl(client_t *client, unsigned int cmd, void __user *arg
 
 static long snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	client_t *client = (client_t *) file->private_data;
+	struct snd_seq_client *client = file->private_data;
 
 	snd_assert(client != NULL, return -ENXIO);
 		
@@ -2153,9 +2199,10 @@ static long snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg
 
 
 /* exported to kernel modules */
-int snd_seq_create_kernel_client(snd_card_t *card, int client_index, snd_seq_client_callback_t * callback)
+int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
+				 struct snd_seq_client_callback *callback)
 {
-	client_t *client;
+	struct snd_seq_client *client;
 
 	snd_assert(! in_interrupt(), return -EBUSY);
 
@@ -2199,7 +2246,7 @@ int snd_seq_create_kernel_client(snd_card_t *card, int client_index, snd_seq_cli
 /* exported to kernel modules */
 int snd_seq_delete_kernel_client(int client)
 {
-	client_t *ptr;
+	struct snd_seq_client *ptr;
 
 	snd_assert(! in_interrupt(), return -EBUSY);
 
@@ -2216,11 +2263,11 @@ int snd_seq_delete_kernel_client(int client)
 /* skeleton to enqueue event, called from snd_seq_kernel_client_enqueue
  * and snd_seq_kernel_client_enqueue_blocking
  */
-static int kernel_client_enqueue(int client, snd_seq_event_t *ev,
+static int kernel_client_enqueue(int client, struct snd_seq_event *ev,
 				 struct file *file, int blocking,
 				 int atomic, int hop)
 {
-	client_t *cptr;
+	struct snd_seq_client *cptr;
 	int result;
 
 	snd_assert(ev != NULL, return -EINVAL);
@@ -2254,7 +2301,7 @@ static int kernel_client_enqueue(int client, snd_seq_event_t *ev,
  *
  * RETURN VALUE: zero if succeed, negative if error
  */
-int snd_seq_kernel_client_enqueue(int client, snd_seq_event_t * ev,
+int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event * ev,
 				  int atomic, int hop)
 {
 	return kernel_client_enqueue(client, ev, NULL, 0, atomic, hop);
@@ -2265,7 +2312,7 @@ int snd_seq_kernel_client_enqueue(int client, snd_seq_event_t * ev,
  *
  * RETURN VALUE: zero if succeed, negative if error
  */
-int snd_seq_kernel_client_enqueue_blocking(int client, snd_seq_event_t * ev,
+int snd_seq_kernel_client_enqueue_blocking(int client, struct snd_seq_event * ev,
 					   struct file *file,
 					   int atomic, int hop)
 {
@@ -2280,10 +2327,10 @@ int snd_seq_kernel_client_enqueue_blocking(int client, snd_seq_event_t * ev,
  * RETURN VALUE: negative = delivery failed,
  *		 zero, or positive: the number of delivered events
  */
-int snd_seq_kernel_client_dispatch(int client, snd_seq_event_t * ev,
+int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event * ev,
 				   int atomic, int hop)
 {
-	client_t *cptr;
+	struct snd_seq_client *cptr;
 	int result;
 
 	snd_assert(ev != NULL, return -EINVAL);
@@ -2315,7 +2362,7 @@ int snd_seq_kernel_client_dispatch(int client, snd_seq_event_t * ev,
  */
 int snd_seq_kernel_client_ctl(int clientid, unsigned int cmd, void *arg)
 {
-	client_t *client;
+	struct snd_seq_client *client;
 	mm_segment_t fs;
 	int result;
 
@@ -2332,7 +2379,7 @@ int snd_seq_kernel_client_ctl(int clientid, unsigned int cmd, void *arg)
 /* exported (for OSS emulator) */
 int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table *wait)
 {
-	client_t *client;
+	struct snd_seq_client *client;
 
 	client = clientptr(clientid);
 	if (client == NULL)
@@ -2350,10 +2397,12 @@ int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table
 /*
  *  /proc interface
  */
-static void snd_seq_info_dump_subscribers(snd_info_buffer_t *buffer, port_subs_info_t *group, int is_src, char *msg)
+static void snd_seq_info_dump_subscribers(struct snd_info_buffer *buffer,
+					  struct snd_seq_port_subs_info *group,
+					  int is_src, char *msg)
 {
 	struct list_head *p;
-	subscribers_t *s;
+	struct snd_seq_subscribers *s;
 	int count = 0;
 
 	down_read(&group->list_mutex);
@@ -2364,9 +2413,9 @@ static void snd_seq_info_dump_subscribers(snd_info_buffer_t *buffer, port_subs_i
 	snd_iprintf(buffer, msg);
 	list_for_each(p, &group->list_head) {
 		if (is_src)
-			s = list_entry(p, subscribers_t, src_list);
+			s = list_entry(p, struct snd_seq_subscribers, src_list);
 		else
-			s = list_entry(p, subscribers_t, dest_list);
+			s = list_entry(p, struct snd_seq_subscribers, dest_list);
 		if (count++)
 			snd_iprintf(buffer, ", ");
 		snd_iprintf(buffer, "%d:%d",
@@ -2387,13 +2436,14 @@ static void snd_seq_info_dump_subscribers(snd_info_buffer_t *buffer, port_subs_i
 
 #define FLAG_PERM_DUPLEX(perm) ((perm) & SNDRV_SEQ_PORT_CAP_DUPLEX ? 'X' : '-')
 
-static void snd_seq_info_dump_ports(snd_info_buffer_t *buffer, client_t *client)
+static void snd_seq_info_dump_ports(struct snd_info_buffer *buffer,
+				    struct snd_seq_client *client)
 {
 	struct list_head *l;
 
 	down(&client->ports_mutex);
 	list_for_each(l, &client->ports_list_head) {
-		client_port_t *p = list_entry(l, client_port_t, list);
+		struct snd_seq_client_port *p = list_entry(l, struct snd_seq_client_port, list);
 		snd_iprintf(buffer, "  Port %3d : \"%s\" (%c%c%c%c)\n",
 			    p->addr.port, p->name,
 			    FLAG_PERM_RD(p->capability),
@@ -2407,13 +2457,15 @@ static void snd_seq_info_dump_ports(snd_info_buffer_t *buffer, client_t *client)
 }
 
 
+void snd_seq_info_pool(struct snd_info_buffer *buffer,
+		       struct snd_seq_pool *pool, char *space);
+
 /* exported to seq_info.c */
-void snd_seq_info_clients_read(snd_info_entry_t *entry, 
-			       snd_info_buffer_t * buffer)
+void snd_seq_info_clients_read(struct snd_info_entry *entry, 
+			       struct snd_info_buffer *buffer)
 {
-	extern void snd_seq_info_pool(snd_info_buffer_t * buffer, pool_t * pool, char *space);
 	int c;
-	client_t *client;
+	struct snd_seq_client *client;
 
 	snd_iprintf(buffer, "Client info\n");
 	snd_iprintf(buffer, "  cur  clients : %d\n", client_usage.cur);
@@ -2468,7 +2520,7 @@ static struct file_operations snd_seq_f_ops =
 	.compat_ioctl =	snd_seq_ioctl_compat,
 };
 
-static snd_minor_t snd_seq_reg =
+static struct snd_minor snd_seq_reg =
 {
 	.comment =	"sequencer",
 	.f_ops =	&snd_seq_f_ops,
diff --git a/sound/core/seq/seq_clientmgr.h b/sound/core/seq/seq_clientmgr.h
index 3715c36183d..9df562425e3 100644
--- a/sound/core/seq/seq_clientmgr.h
+++ b/sound/core/seq/seq_clientmgr.h
@@ -30,24 +30,24 @@
 
 /* client manager */
 
-struct _snd_seq_user_client {
+struct snd_seq_user_client {
 	struct file *file;	/* file struct of client */
 	/* ... */
 	
 	/* fifo */
-	fifo_t *fifo;	/* queue for incoming events */
+	struct snd_seq_fifo *fifo;	/* queue for incoming events */
 	int fifo_pool_size;
 };
 
-struct _snd_seq_kernel_client {
-	snd_card_t *card;
+struct snd_seq_kernel_client {
+	struct snd_card *card;
 	/* pointer to client functions */
 	void *private_data;			/* private data for client */
 	/* ... */
 };
 
 
-struct _snd_seq_client {
+struct snd_seq_client {
 	snd_seq_client_type_t type;
 	unsigned int accept_input: 1,
 		accept_output: 1;
@@ -65,40 +65,42 @@ struct _snd_seq_client {
 	int convert32;		/* convert 32->64bit */
 
 	/* output pool */
-	pool_t *pool;		/* memory pool for this client */
+	struct snd_seq_pool *pool;		/* memory pool for this client */
 
 	union {
-		user_client_t user;
-		kernel_client_t kernel;
+		struct snd_seq_user_client user;
+		struct snd_seq_kernel_client kernel;
 	} data;
 };
 
 /* usage statistics */
-typedef struct {
+struct snd_seq_usage {
 	int cur;
 	int peak;
-} usage_t;
+};
 
 
-extern int client_init_data(void);
-extern int snd_sequencer_device_init(void);
-extern void snd_sequencer_device_done(void);
+int client_init_data(void);
+int snd_sequencer_device_init(void);
+void snd_sequencer_device_done(void);
 
 /* get locked pointer to client */
-extern client_t *snd_seq_client_use_ptr(int clientid);
+struct snd_seq_client *snd_seq_client_use_ptr(int clientid);
 
 /* unlock pointer to client */
 #define snd_seq_client_unlock(client) snd_use_lock_free(&(client)->use_lock)
 
 /* dispatch event to client(s) */
-extern int snd_seq_dispatch_event(snd_seq_event_cell_t *cell, int atomic, int hop);
+int snd_seq_dispatch_event(struct snd_seq_event_cell *cell, int atomic, int hop);
 
 /* exported to other modules */
-extern int snd_seq_register_kernel_client(snd_seq_client_callback_t *callback, void *private_data);
-extern int snd_seq_unregister_kernel_client(int client);
-extern int snd_seq_kernel_client_enqueue(int client, snd_seq_event_t *ev, int atomic, int hop);
-int snd_seq_kernel_client_enqueue_blocking(int client, snd_seq_event_t * ev, struct file *file, int atomic, int hop);
+int snd_seq_register_kernel_client(struct snd_seq_client_callback *callback, void *private_data);
+int snd_seq_unregister_kernel_client(int client);
+int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
+int snd_seq_kernel_client_enqueue_blocking(int client, struct snd_seq_event * ev,
+					   struct file *file, int atomic, int hop);
 int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table *wait);
-int snd_seq_client_notify_subscription(int client, int port, snd_seq_port_subscribe_t *info, int evtype);
+int snd_seq_client_notify_subscription(int client, int port,
+				       struct snd_seq_port_subscribe *info, int evtype);
 
 #endif
diff --git a/sound/core/seq/seq_compat.c b/sound/core/seq/seq_compat.c
index 902ad8b0c35..9628c06e4ea 100644
--- a/sound/core/seq/seq_compat.c
+++ b/sound/core/seq/seq_compat.c
@@ -22,8 +22,8 @@
 
 #include <linux/compat.h>
 
-struct sndrv_seq_port_info32 {
-	struct sndrv_seq_addr addr;	/* client/port numbers */
+struct snd_seq_port_info32 {
+	struct snd_seq_addr addr;	/* client/port numbers */
 	char name[64];			/* port name */
 
 	u32 capability;	/* port capability bits */
@@ -41,11 +41,11 @@ struct sndrv_seq_port_info32 {
 	char reserved[59];		/* for future use */
 };
 
-static int snd_seq_call_port_info_ioctl(client_t *client, unsigned int cmd,
-					struct sndrv_seq_port_info32 __user *data32)
+static int snd_seq_call_port_info_ioctl(struct snd_seq_client *client, unsigned int cmd,
+					struct snd_seq_port_info32 __user *data32)
 {
 	int err = -EFAULT;
-	snd_seq_port_info_t *data;
+	struct snd_seq_port_info *data;
 	mm_segment_t fs;
 
 	data = kmalloc(sizeof(*data), GFP_KERNEL);
@@ -80,16 +80,16 @@ static int snd_seq_call_port_info_ioctl(client_t *client, unsigned int cmd,
  */
 
 enum {
-	SNDRV_SEQ_IOCTL_CREATE_PORT32 = _IOWR('S', 0x20, struct sndrv_seq_port_info32),
-	SNDRV_SEQ_IOCTL_DELETE_PORT32 = _IOW ('S', 0x21, struct sndrv_seq_port_info32),
-	SNDRV_SEQ_IOCTL_GET_PORT_INFO32 = _IOWR('S', 0x22, struct sndrv_seq_port_info32),
-	SNDRV_SEQ_IOCTL_SET_PORT_INFO32 = _IOW ('S', 0x23, struct sndrv_seq_port_info32),
-	SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT32 = _IOWR('S', 0x52, struct sndrv_seq_port_info32),
+	SNDRV_SEQ_IOCTL_CREATE_PORT32 = _IOWR('S', 0x20, struct snd_seq_port_info32),
+	SNDRV_SEQ_IOCTL_DELETE_PORT32 = _IOW ('S', 0x21, struct snd_seq_port_info32),
+	SNDRV_SEQ_IOCTL_GET_PORT_INFO32 = _IOWR('S', 0x22, struct snd_seq_port_info32),
+	SNDRV_SEQ_IOCTL_SET_PORT_INFO32 = _IOW ('S', 0x23, struct snd_seq_port_info32),
+	SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT32 = _IOWR('S', 0x52, struct snd_seq_port_info32),
 };
 
 static long snd_seq_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	client_t *client = (client_t *) file->private_data;
+	struct snd_seq_client *client = file->private_data;
 	void __user *argp = compat_ptr(arg);
 
 	snd_assert(client != NULL, return -ENXIO);
diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c
index 252b5273100..3f935a18b5e 100644
--- a/sound/core/seq/seq_device.c
+++ b/sound/core/seq/seq_device.c
@@ -50,11 +50,6 @@ MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>");
 MODULE_DESCRIPTION("ALSA sequencer device management");
 MODULE_LICENSE("GPL");
 
-/*
- * driver list
- */
-typedef struct ops_list ops_list_t;
-
 /* driver state */
 #define DRIVER_EMPTY		0
 #define DRIVER_LOADED		(1<<0)
@@ -68,7 +63,7 @@ struct ops_list {
 	int argsize;		/* argument size */
 
 	/* operators */
-	snd_seq_dev_ops_t ops;
+	struct snd_seq_dev_ops ops;
 
 	/* registred devices */
 	struct list_head dev_list;	/* list of devices */
@@ -83,35 +78,36 @@ struct ops_list {
 static LIST_HEAD(opslist);
 static int num_ops;
 static DECLARE_MUTEX(ops_mutex);
-static snd_info_entry_t *info_entry = NULL;
+static struct snd_info_entry *info_entry = NULL;
 
 /*
  * prototypes
  */
-static int snd_seq_device_free(snd_seq_device_t *dev);
-static int snd_seq_device_dev_free(snd_device_t *device);
-static int snd_seq_device_dev_register(snd_device_t *device);
-static int snd_seq_device_dev_disconnect(snd_device_t *device);
-static int snd_seq_device_dev_unregister(snd_device_t *device);
-
-static int init_device(snd_seq_device_t *dev, ops_list_t *ops);
-static int free_device(snd_seq_device_t *dev, ops_list_t *ops);
-static ops_list_t *find_driver(char *id, int create_if_empty);
-static ops_list_t *create_driver(char *id);
-static void unlock_driver(ops_list_t *ops);
+static int snd_seq_device_free(struct snd_seq_device *dev);
+static int snd_seq_device_dev_free(struct snd_device *device);
+static int snd_seq_device_dev_register(struct snd_device *device);
+static int snd_seq_device_dev_disconnect(struct snd_device *device);
+static int snd_seq_device_dev_unregister(struct snd_device *device);
+
+static int init_device(struct snd_seq_device *dev, struct ops_list *ops);
+static int free_device(struct snd_seq_device *dev, struct ops_list *ops);
+static struct ops_list *find_driver(char *id, int create_if_empty);
+static struct ops_list *create_driver(char *id);
+static void unlock_driver(struct ops_list *ops);
 static void remove_drivers(void);
 
 /*
  * show all drivers and their status
  */
 
-static void snd_seq_device_info(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void snd_seq_device_info(struct snd_info_entry *entry,
+				struct snd_info_buffer *buffer)
 {
 	struct list_head *head;
 
 	down(&ops_mutex);
 	list_for_each(head, &opslist) {
-		ops_list_t *ops = list_entry(head, ops_list_t, list);
+		struct ops_list *ops = list_entry(head, struct ops_list, list);
 		snd_iprintf(buffer, "snd-%s%s%s%s,%d\n",
 				ops->id,
 				ops->driver & DRIVER_LOADED ? ",loaded" : (ops->driver == DRIVER_EMPTY ? ",empty" : ""),
@@ -156,7 +152,7 @@ void snd_seq_device_load_drivers(void)
 
 	down(&ops_mutex);
 	list_for_each(head, &opslist) {
-		ops_list_t *ops = list_entry(head, ops_list_t, list);
+		struct ops_list *ops = list_entry(head, struct ops_list, list);
 		if (! (ops->driver & DRIVER_LOADED) &&
 		    ! (ops->driver & DRIVER_REQUESTED)) {
 			ops->used++;
@@ -178,13 +174,13 @@ void snd_seq_device_load_drivers(void)
  * id = id of driver
  * result = return pointer (NULL allowed if unnecessary)
  */
-int snd_seq_device_new(snd_card_t *card, int device, char *id, int argsize,
-		       snd_seq_device_t **result)
+int snd_seq_device_new(struct snd_card *card, int device, char *id, int argsize,
+		       struct snd_seq_device **result)
 {
-	snd_seq_device_t *dev;
-	ops_list_t *ops;
+	struct snd_seq_device *dev;
+	struct ops_list *ops;
 	int err;
-	static snd_device_ops_t dops = {
+	static struct snd_device_ops dops = {
 		.dev_free = snd_seq_device_dev_free,
 		.dev_register = snd_seq_device_dev_register,
 		.dev_disconnect = snd_seq_device_dev_disconnect,
@@ -235,9 +231,9 @@ int snd_seq_device_new(snd_card_t *card, int device, char *id, int argsize,
 /*
  * free the existing device
  */
-static int snd_seq_device_free(snd_seq_device_t *dev)
+static int snd_seq_device_free(struct snd_seq_device *dev)
 {
-	ops_list_t *ops;
+	struct ops_list *ops;
 
 	snd_assert(dev != NULL, return -EINVAL);
 
@@ -261,19 +257,19 @@ static int snd_seq_device_free(snd_seq_device_t *dev)
 	return 0;
 }
 
-static int snd_seq_device_dev_free(snd_device_t *device)
+static int snd_seq_device_dev_free(struct snd_device *device)
 {
-	snd_seq_device_t *dev = device->device_data;
+	struct snd_seq_device *dev = device->device_data;
 	return snd_seq_device_free(dev);
 }
 
 /*
  * register the device
  */
-static int snd_seq_device_dev_register(snd_device_t *device)
+static int snd_seq_device_dev_register(struct snd_device *device)
 {
-	snd_seq_device_t *dev = device->device_data;
-	ops_list_t *ops;
+	struct snd_seq_device *dev = device->device_data;
+	struct ops_list *ops;
 
 	ops = find_driver(dev->id, 0);
 	if (ops == NULL)
@@ -292,10 +288,10 @@ static int snd_seq_device_dev_register(snd_device_t *device)
 /*
  * disconnect the device
  */
-static int snd_seq_device_dev_disconnect(snd_device_t *device)
+static int snd_seq_device_dev_disconnect(struct snd_device *device)
 {
-	snd_seq_device_t *dev = device->device_data;
-	ops_list_t *ops;
+	struct snd_seq_device *dev = device->device_data;
+	struct ops_list *ops;
 
 	ops = find_driver(dev->id, 0);
 	if (ops == NULL)
@@ -310,9 +306,9 @@ static int snd_seq_device_dev_disconnect(snd_device_t *device)
 /*
  * unregister the existing device
  */
-static int snd_seq_device_dev_unregister(snd_device_t *device)
+static int snd_seq_device_dev_unregister(struct snd_device *device)
 {
-	snd_seq_device_t *dev = device->device_data;
+	struct snd_seq_device *dev = device->device_data;
 	return snd_seq_device_free(dev);
 }
 
@@ -321,10 +317,11 @@ static int snd_seq_device_dev_unregister(snd_device_t *device)
  * id = driver id
  * entry = driver operators - duplicated to each instance
  */
-int snd_seq_device_register_driver(char *id, snd_seq_dev_ops_t *entry, int argsize)
+int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry,
+				   int argsize)
 {
 	struct list_head *head;
-	ops_list_t *ops;
+	struct ops_list *ops;
 
 	if (id == NULL || entry == NULL ||
 	    entry->init_device == NULL || entry->free_device == NULL)
@@ -351,7 +348,7 @@ int snd_seq_device_register_driver(char *id, snd_seq_dev_ops_t *entry, int argsi
 
 	/* initialize existing devices if necessary */
 	list_for_each(head, &ops->dev_list) {
-		snd_seq_device_t *dev = list_entry(head, snd_seq_device_t, list);
+		struct snd_seq_device *dev = list_entry(head, struct snd_seq_device, list);
 		init_device(dev, ops);
 	}
 	up(&ops->reg_mutex);
@@ -366,9 +363,9 @@ int snd_seq_device_register_driver(char *id, snd_seq_dev_ops_t *entry, int argsi
 /*
  * create driver record
  */
-static ops_list_t * create_driver(char *id)
+static struct ops_list * create_driver(char *id)
 {
-	ops_list_t *ops;
+	struct ops_list *ops;
 
 	ops = kmalloc(sizeof(*ops), GFP_KERNEL);
 	if (ops == NULL)
@@ -399,14 +396,15 @@ static ops_list_t * create_driver(char *id)
 int snd_seq_device_unregister_driver(char *id)
 {
 	struct list_head *head;
-	ops_list_t *ops;
+	struct ops_list *ops;
 
 	ops = find_driver(id, 0);
 	if (ops == NULL)
 		return -ENXIO;
 	if (! (ops->driver & DRIVER_LOADED) ||
 	    (ops->driver & DRIVER_LOCKED)) {
-		snd_printk(KERN_ERR "driver_unregister: cannot unload driver '%s': status=%x\n", id, ops->driver);
+		snd_printk(KERN_ERR "driver_unregister: cannot unload driver '%s': status=%x\n",
+			   id, ops->driver);
 		unlock_driver(ops);
 		return -EBUSY;
 	}
@@ -415,13 +413,14 @@ int snd_seq_device_unregister_driver(char *id)
 	down(&ops->reg_mutex);
 	ops->driver |= DRIVER_LOCKED; /* do not remove this driver recursively */
 	list_for_each(head, &ops->dev_list) {
-		snd_seq_device_t *dev = list_entry(head, snd_seq_device_t, list);
+		struct snd_seq_device *dev = list_entry(head, struct snd_seq_device, list);
 		free_device(dev, ops);
 	}
 
 	ops->driver = 0;
 	if (ops->num_init_devices > 0)
-		snd_printk(KERN_ERR "free_driver: init_devices > 0!! (%d)\n", ops->num_init_devices);
+		snd_printk(KERN_ERR "free_driver: init_devices > 0!! (%d)\n",
+			   ops->num_init_devices);
 	up(&ops->reg_mutex);
 
 	unlock_driver(ops);
@@ -443,7 +442,7 @@ static void remove_drivers(void)
 	down(&ops_mutex);
 	head = opslist.next;
 	while (head != &opslist) {
-		ops_list_t *ops = list_entry(head, ops_list_t, list);
+		struct ops_list *ops = list_entry(head, struct ops_list, list);
 		if (! (ops->driver & DRIVER_LOADED) &&
 		    ops->used == 0 && ops->num_devices == 0) {
 			head = head->next;
@@ -459,21 +458,23 @@ static void remove_drivers(void)
 /*
  * initialize the device - call init_device operator
  */
-static int init_device(snd_seq_device_t *dev, ops_list_t *ops)
+static int init_device(struct snd_seq_device *dev, struct ops_list *ops)
 {
 	if (! (ops->driver & DRIVER_LOADED))
 		return 0; /* driver is not loaded yet */
 	if (dev->status != SNDRV_SEQ_DEVICE_FREE)
 		return 0; /* already initialized */
 	if (ops->argsize != dev->argsize) {
-		snd_printk(KERN_ERR "incompatible device '%s' for plug-in '%s' (%d %d)\n", dev->name, ops->id, ops->argsize, dev->argsize);
+		snd_printk(KERN_ERR "incompatible device '%s' for plug-in '%s' (%d %d)\n",
+			   dev->name, ops->id, ops->argsize, dev->argsize);
 		return -EINVAL;
 	}
 	if (ops->ops.init_device(dev) >= 0) {
 		dev->status = SNDRV_SEQ_DEVICE_REGISTERED;
 		ops->num_init_devices++;
 	} else {
-		snd_printk(KERN_ERR "init_device failed: %s: %s\n", dev->name, dev->id);
+		snd_printk(KERN_ERR "init_device failed: %s: %s\n",
+			   dev->name, dev->id);
 	}
 
 	return 0;
@@ -482,7 +483,7 @@ static int init_device(snd_seq_device_t *dev, ops_list_t *ops)
 /*
  * release the device - call free_device operator
  */
-static int free_device(snd_seq_device_t *dev, ops_list_t *ops)
+static int free_device(struct snd_seq_device *dev, struct ops_list *ops)
 {
 	int result;
 
@@ -491,7 +492,8 @@ static int free_device(snd_seq_device_t *dev, ops_list_t *ops)
 	if (dev->status != SNDRV_SEQ_DEVICE_REGISTERED)
 		return 0; /* not registered */
 	if (ops->argsize != dev->argsize) {
-		snd_printk(KERN_ERR "incompatible device '%s' for plug-in '%s' (%d %d)\n", dev->name, ops->id, ops->argsize, dev->argsize);
+		snd_printk(KERN_ERR "incompatible device '%s' for plug-in '%s' (%d %d)\n",
+			   dev->name, ops->id, ops->argsize, dev->argsize);
 		return -EINVAL;
 	}
 	if ((result = ops->ops.free_device(dev)) >= 0 || result == -ENXIO) {
@@ -499,7 +501,8 @@ static int free_device(snd_seq_device_t *dev, ops_list_t *ops)
 		dev->driver_data = NULL;
 		ops->num_init_devices--;
 	} else {
-		snd_printk(KERN_ERR "free_device failed: %s: %s\n", dev->name, dev->id);
+		snd_printk(KERN_ERR "free_device failed: %s: %s\n",
+			   dev->name, dev->id);
 	}
 
 	return 0;
@@ -508,13 +511,13 @@ static int free_device(snd_seq_device_t *dev, ops_list_t *ops)
 /*
  * find the matching driver with given id
  */
-static ops_list_t * find_driver(char *id, int create_if_empty)
+static struct ops_list * find_driver(char *id, int create_if_empty)
 {
 	struct list_head *head;
 
 	down(&ops_mutex);
 	list_for_each(head, &opslist) {
-		ops_list_t *ops = list_entry(head, ops_list_t, list);
+		struct ops_list *ops = list_entry(head, struct ops_list, list);
 		if (strcmp(ops->id, id) == 0) {
 			ops->used++;
 			up(&ops_mutex);
@@ -527,7 +530,7 @@ static ops_list_t * find_driver(char *id, int create_if_empty)
 	return NULL;
 }
 
-static void unlock_driver(ops_list_t *ops)
+static void unlock_driver(struct ops_list *ops)
 {
 	down(&ops_mutex);
 	ops->used--;
@@ -541,7 +544,8 @@ static void unlock_driver(ops_list_t *ops)
 
 static int __init alsa_seq_device_init(void)
 {
-	info_entry = snd_info_create_module_entry(THIS_MODULE, "drivers", snd_seq_root);
+	info_entry = snd_info_create_module_entry(THIS_MODULE, "drivers",
+						  snd_seq_root);
 	if (info_entry == NULL)
 		return -ENOMEM;
 	info_entry->content = SNDRV_INFO_CONTENT_TEXT;
diff --git a/sound/core/seq/seq_dummy.c b/sound/core/seq/seq_dummy.c
index 5dd0e6a19e5..8101a475e3e 100644
--- a/sound/core/seq/seq_dummy.c
+++ b/sound/core/seq/seq_dummy.c
@@ -73,12 +73,12 @@ MODULE_PARM_DESC(ports, "number of ports to be created");
 module_param(duplex, bool, 0444);
 MODULE_PARM_DESC(duplex, "create DUPLEX ports");
 
-typedef struct snd_seq_dummy_port {
+struct snd_seq_dummy_port {
 	int client;
 	int port;
 	int duplex;
 	int connect;
-} snd_seq_dummy_port_t;
+};
 
 static int my_client = -1;
 
@@ -88,11 +88,11 @@ static int my_client = -1;
  * Note: this callback is called only after all subscribers are removed.
  */
 static int
-dummy_unuse(void *private_data, snd_seq_port_subscribe_t *info)
+dummy_unuse(void *private_data, struct snd_seq_port_subscribe *info)
 {
-	snd_seq_dummy_port_t *p;
+	struct snd_seq_dummy_port *p;
 	int i;
-	snd_seq_event_t ev;
+	struct snd_seq_event ev;
 
 	p = private_data;
 	memset(&ev, 0, sizeof(ev));
@@ -116,10 +116,11 @@ dummy_unuse(void *private_data, snd_seq_port_subscribe_t *info)
  * event input callback - just redirect events to subscribers
  */
 static int
-dummy_input(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int hop)
+dummy_input(struct snd_seq_event *ev, int direct, void *private_data,
+	    int atomic, int hop)
 {
-	snd_seq_dummy_port_t *p;
-	snd_seq_event_t tmpev;
+	struct snd_seq_dummy_port *p;
+	struct snd_seq_event tmpev;
 
 	p = private_data;
 	if (ev->source.client == SNDRV_SEQ_CLIENT_SYSTEM ||
@@ -146,12 +147,12 @@ dummy_free(void *private_data)
 /*
  * create a port
  */
-static snd_seq_dummy_port_t __init *
+static struct snd_seq_dummy_port __init *
 create_port(int idx, int type)
 {
-	snd_seq_port_info_t pinfo;
-	snd_seq_port_callback_t pcb;
-	snd_seq_dummy_port_t *rec;
+	struct snd_seq_port_info pinfo;
+	struct snd_seq_port_callback pcb;
+	struct snd_seq_dummy_port *rec;
 
 	if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL)
 		return NULL;
@@ -192,9 +193,9 @@ create_port(int idx, int type)
 static int __init
 register_client(void)
 {
-	snd_seq_client_callback_t cb;
-	snd_seq_client_info_t cinfo;
-	snd_seq_dummy_port_t *rec1, *rec2;
+	struct snd_seq_client_callback cb;
+	struct snd_seq_client_info cinfo;
+	struct snd_seq_dummy_port *rec1, *rec2;
 	int i;
 
 	if (ports < 1) {
diff --git a/sound/core/seq/seq_fifo.c b/sound/core/seq/seq_fifo.c
index 4767cfdc361..6b055aed7a4 100644
--- a/sound/core/seq/seq_fifo.c
+++ b/sound/core/seq/seq_fifo.c
@@ -29,9 +29,9 @@
 /* FIFO */
 
 /* create new fifo */
-fifo_t *snd_seq_fifo_new(int poolsize)
+struct snd_seq_fifo *snd_seq_fifo_new(int poolsize)
 {
-	fifo_t *f;
+	struct snd_seq_fifo *f;
 
 	f = kzalloc(sizeof(*f), GFP_KERNEL);
 	if (f == NULL) {
@@ -62,9 +62,9 @@ fifo_t *snd_seq_fifo_new(int poolsize)
 	return f;
 }
 
-void snd_seq_fifo_delete(fifo_t **fifo)
+void snd_seq_fifo_delete(struct snd_seq_fifo **fifo)
 {
-	fifo_t *f;
+	struct snd_seq_fifo *f;
 
 	snd_assert(fifo != NULL, return);
 	f = *fifo;
@@ -88,12 +88,12 @@ void snd_seq_fifo_delete(fifo_t **fifo)
 	kfree(f);
 }
 
-static snd_seq_event_cell_t *fifo_cell_out(fifo_t *f);
+static struct snd_seq_event_cell *fifo_cell_out(struct snd_seq_fifo *f);
 
 /* clear queue */
-void snd_seq_fifo_clear(fifo_t *f)
+void snd_seq_fifo_clear(struct snd_seq_fifo *f)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 	unsigned long flags;
 
 	/* clear overflow flag */
@@ -110,9 +110,10 @@ void snd_seq_fifo_clear(fifo_t *f)
 
 
 /* enqueue event to fifo */
-int snd_seq_fifo_event_in(fifo_t *f, snd_seq_event_t *event)
+int snd_seq_fifo_event_in(struct snd_seq_fifo *f,
+			  struct snd_seq_event *event)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 	unsigned long flags;
 	int err;
 
@@ -148,9 +149,9 @@ int snd_seq_fifo_event_in(fifo_t *f, snd_seq_event_t *event)
 }
 
 /* dequeue cell from fifo */
-static snd_seq_event_cell_t *fifo_cell_out(fifo_t *f)
+static struct snd_seq_event_cell *fifo_cell_out(struct snd_seq_fifo *f)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 
 	if ((cell = f->head) != NULL) {
 		f->head = cell->next;
@@ -167,9 +168,10 @@ static snd_seq_event_cell_t *fifo_cell_out(fifo_t *f)
 }
 
 /* dequeue cell from fifo and copy on user space */
-int snd_seq_fifo_cell_out(fifo_t *f, snd_seq_event_cell_t **cellp, int nonblock)
+int snd_seq_fifo_cell_out(struct snd_seq_fifo *f,
+			  struct snd_seq_event_cell **cellp, int nonblock)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 	unsigned long flags;
 	wait_queue_t wait;
 
@@ -202,7 +204,8 @@ int snd_seq_fifo_cell_out(fifo_t *f, snd_seq_event_cell_t **cellp, int nonblock)
 }
 
 
-void snd_seq_fifo_cell_putback(fifo_t *f, snd_seq_event_cell_t *cell)
+void snd_seq_fifo_cell_putback(struct snd_seq_fifo *f,
+			       struct snd_seq_event_cell *cell)
 {
 	unsigned long flags;
 
@@ -217,18 +220,19 @@ void snd_seq_fifo_cell_putback(fifo_t *f, snd_seq_event_cell_t *cell)
 
 
 /* polling; return non-zero if queue is available */
-int snd_seq_fifo_poll_wait(fifo_t *f, struct file *file, poll_table *wait)
+int snd_seq_fifo_poll_wait(struct snd_seq_fifo *f, struct file *file,
+			   poll_table *wait)
 {
 	poll_wait(file, &f->input_sleep, wait);
 	return (f->cells > 0);
 }
 
 /* change the size of pool; all old events are removed */
-int snd_seq_fifo_resize(fifo_t *f, int poolsize)
+int snd_seq_fifo_resize(struct snd_seq_fifo *f, int poolsize)
 {
 	unsigned long flags;
-	pool_t *newpool, *oldpool;
-	snd_seq_event_cell_t *cell, *next, *oldhead;
+	struct snd_seq_pool *newpool, *oldpool;
+	struct snd_seq_event_cell *cell, *next, *oldhead;
 
 	snd_assert(f != NULL && f->pool != NULL, return -EINVAL);
 
diff --git a/sound/core/seq/seq_fifo.h b/sound/core/seq/seq_fifo.h
index d677c261b0a..062c446e786 100644
--- a/sound/core/seq/seq_fifo.h
+++ b/sound/core/seq/seq_fifo.h
@@ -27,46 +27,46 @@
 
 /* === FIFO === */
 
-typedef struct {
-	pool_t *pool;			/* FIFO pool */
-	snd_seq_event_cell_t* head;    	/* pointer to head of fifo */
-	snd_seq_event_cell_t* tail;    	/* pointer to tail of fifo */
+struct snd_seq_fifo {
+	struct snd_seq_pool *pool;		/* FIFO pool */
+	struct snd_seq_event_cell *head;    	/* pointer to head of fifo */
+	struct snd_seq_event_cell *tail;    	/* pointer to tail of fifo */
 	int cells;
 	spinlock_t lock;
 	snd_use_lock_t use_lock;
 	wait_queue_head_t input_sleep;
 	atomic_t overflow;
 
-} fifo_t;
+};
 
 /* create new fifo (constructor) */
-extern fifo_t *snd_seq_fifo_new(int poolsize);
+struct snd_seq_fifo *snd_seq_fifo_new(int poolsize);
 
 /* delete fifo (destructor) */
-extern void snd_seq_fifo_delete(fifo_t **f);
+void snd_seq_fifo_delete(struct snd_seq_fifo **f);
 
 
 /* enqueue event to fifo */
-extern int snd_seq_fifo_event_in(fifo_t *f, snd_seq_event_t *event);
+int snd_seq_fifo_event_in(struct snd_seq_fifo *f, struct snd_seq_event *event);
 
 /* lock fifo from release */
 #define snd_seq_fifo_lock(fifo)		snd_use_lock_use(&(fifo)->use_lock)
 #define snd_seq_fifo_unlock(fifo)	snd_use_lock_free(&(fifo)->use_lock)
 
 /* get a cell from fifo - fifo should be locked */
-int snd_seq_fifo_cell_out(fifo_t *f, snd_seq_event_cell_t **cellp, int nonblock);
+int snd_seq_fifo_cell_out(struct snd_seq_fifo *f, struct snd_seq_event_cell **cellp, int nonblock);
 
 /* free dequeued cell - fifo should be locked */
-extern void snd_seq_fifo_cell_putback(fifo_t *f, snd_seq_event_cell_t *cell);
+void snd_seq_fifo_cell_putback(struct snd_seq_fifo *f, struct snd_seq_event_cell *cell);
 
 /* clean up queue */
-extern void snd_seq_fifo_clear(fifo_t *f);
+void snd_seq_fifo_clear(struct snd_seq_fifo *f);
 
 /* polling */
-extern int snd_seq_fifo_poll_wait(fifo_t *f, struct file *file, poll_table *wait);
+int snd_seq_fifo_poll_wait(struct snd_seq_fifo *f, struct file *file, poll_table *wait);
 
 /* resize pool in fifo */
-int snd_seq_fifo_resize(fifo_t *f, int poolsize);
+int snd_seq_fifo_resize(struct snd_seq_fifo *f, int poolsize);
 
 
 #endif
diff --git a/sound/core/seq/seq_info.c b/sound/core/seq/seq_info.c
index b50b695c41c..3257cf4ec25 100644
--- a/sound/core/seq/seq_info.c
+++ b/sound/core/seq/seq_info.c
@@ -28,15 +28,16 @@
 #include "seq_timer.h"
 
 
-static snd_info_entry_t *queues_entry;
-static snd_info_entry_t *clients_entry;
-static snd_info_entry_t *timer_entry;
+static struct snd_info_entry *queues_entry;
+static struct snd_info_entry *clients_entry;
+static struct snd_info_entry *timer_entry;
 
 
-static snd_info_entry_t * __init
-create_info_entry(char *name, int size, void (*read)(snd_info_entry_t *, snd_info_buffer_t *))
+static struct snd_info_entry * __init
+create_info_entry(char *name, int size, void (*read)(struct snd_info_entry *,
+						     struct snd_info_buffer *))
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	entry = snd_info_create_module_entry(THIS_MODULE, name, snd_seq_root);
 	if (entry == NULL)
diff --git a/sound/core/seq/seq_info.h b/sound/core/seq/seq_info.h
index efd099a858e..5a91ebce43a 100644
--- a/sound/core/seq/seq_info.h
+++ b/sound/core/seq/seq_info.h
@@ -24,9 +24,9 @@
 #include <sound/info.h>
 #include <sound/seq_kernel.h>
 
-void snd_seq_info_clients_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer);
-void snd_seq_info_timer_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer);
-void snd_seq_info_queues_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer);
+void snd_seq_info_clients_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer);
+void snd_seq_info_timer_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer);
+void snd_seq_info_queues_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer);
 
 
 int snd_seq_info_init( void );
diff --git a/sound/core/seq/seq_instr.c b/sound/core/seq/seq_instr.c
index 1d525b13ebb..48745206396 100644
--- a/sound/core/seq/seq_instr.c
+++ b/sound/core/seq/seq_instr.c
@@ -31,7 +31,7 @@ MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer instrument libra
 MODULE_LICENSE("GPL");
 
 
-static void snd_instr_lock_ops(snd_seq_kinstr_list_t *list)
+static void snd_instr_lock_ops(struct snd_seq_kinstr_list *list)
 {
 	if (!(list->flags & SNDRV_SEQ_INSTR_FLG_DIRECT)) {
 		spin_lock_irqsave(&list->ops_lock, list->ops_flags);
@@ -40,7 +40,7 @@ static void snd_instr_lock_ops(snd_seq_kinstr_list_t *list)
 	}
 }
 
-static void snd_instr_unlock_ops(snd_seq_kinstr_list_t *list)
+static void snd_instr_unlock_ops(struct snd_seq_kinstr_list *list)
 {
 	if (!(list->flags & SNDRV_SEQ_INSTR_FLG_DIRECT)) {
 		spin_unlock_irqrestore(&list->ops_lock, list->ops_flags);
@@ -49,18 +49,18 @@ static void snd_instr_unlock_ops(snd_seq_kinstr_list_t *list)
 	}
 }
 
-static snd_seq_kinstr_t *snd_seq_instr_new(int add_len, int atomic)
+static struct snd_seq_kinstr *snd_seq_instr_new(int add_len, int atomic)
 {
-	snd_seq_kinstr_t *instr;
+	struct snd_seq_kinstr *instr;
 	
-	instr = kzalloc(sizeof(snd_seq_kinstr_t) + add_len, atomic ? GFP_ATOMIC : GFP_KERNEL);
+	instr = kzalloc(sizeof(struct snd_seq_kinstr) + add_len, atomic ? GFP_ATOMIC : GFP_KERNEL);
 	if (instr == NULL)
 		return NULL;
 	instr->add_len = add_len;
 	return instr;
 }
 
-static int snd_seq_instr_free(snd_seq_kinstr_t *instr, int atomic)
+static int snd_seq_instr_free(struct snd_seq_kinstr *instr, int atomic)
 {
 	int result = 0;
 
@@ -73,11 +73,11 @@ static int snd_seq_instr_free(snd_seq_kinstr_t *instr, int atomic)
 	return result;
 }
 
-snd_seq_kinstr_list_t *snd_seq_instr_list_new(void)
+struct snd_seq_kinstr_list *snd_seq_instr_list_new(void)
 {
-	snd_seq_kinstr_list_t *list;
+	struct snd_seq_kinstr_list *list;
 
-	list = kzalloc(sizeof(snd_seq_kinstr_list_t), GFP_KERNEL);
+	list = kzalloc(sizeof(struct snd_seq_kinstr_list), GFP_KERNEL);
 	if (list == NULL)
 		return NULL;
 	spin_lock_init(&list->lock);
@@ -87,11 +87,11 @@ snd_seq_kinstr_list_t *snd_seq_instr_list_new(void)
 	return list;
 }
 
-void snd_seq_instr_list_free(snd_seq_kinstr_list_t **list_ptr)
+void snd_seq_instr_list_free(struct snd_seq_kinstr_list **list_ptr)
 {
-	snd_seq_kinstr_list_t *list;
-	snd_seq_kinstr_t *instr;
-	snd_seq_kcluster_t *cluster;
+	struct snd_seq_kinstr_list *list;
+	struct snd_seq_kinstr *instr;
+	struct snd_seq_kcluster *cluster;
 	int idx;
 	unsigned long flags;
 
@@ -125,8 +125,8 @@ void snd_seq_instr_list_free(snd_seq_kinstr_list_t **list_ptr)
 	kfree(list);
 }
 
-static int instr_free_compare(snd_seq_kinstr_t *instr,
-			      snd_seq_instr_header_t *ifree,
+static int instr_free_compare(struct snd_seq_kinstr *instr,
+			      struct snd_seq_instr_header *ifree,
 			      unsigned int client)
 {
 	switch (ifree->cmd) {
@@ -160,12 +160,12 @@ static int instr_free_compare(snd_seq_kinstr_t *instr,
 	return 1;
 }
 
-int snd_seq_instr_list_free_cond(snd_seq_kinstr_list_t *list,
-			         snd_seq_instr_header_t *ifree,
+int snd_seq_instr_list_free_cond(struct snd_seq_kinstr_list *list,
+			         struct snd_seq_instr_header *ifree,
 			         int client,
 			         int atomic)
 {
-	snd_seq_kinstr_t *instr, *prev, *next, *flist;
+	struct snd_seq_kinstr *instr, *prev, *next, *flist;
 	int idx;
 	unsigned long flags;
 
@@ -209,7 +209,7 @@ int snd_seq_instr_list_free_cond(snd_seq_kinstr_list_t *list,
 	return 0;	
 }
 
-static int compute_hash_instr_key(snd_seq_instr_t *instr)
+static int compute_hash_instr_key(struct snd_seq_instr *instr)
 {
 	int result;
 	
@@ -233,7 +233,7 @@ static int compute_hash_cluster_key(snd_seq_instr_cluster_t cluster)
 }
 #endif
 
-static int compare_instr(snd_seq_instr_t *i1, snd_seq_instr_t *i2, int exact)
+static int compare_instr(struct snd_seq_instr *i1, struct snd_seq_instr *i2, int exact)
 {
 	if (exact) {
 		if (i1->cluster != i2->cluster ||
@@ -262,14 +262,14 @@ static int compare_instr(snd_seq_instr_t *i1, snd_seq_instr_t *i2, int exact)
 	}
 }
 
-snd_seq_kinstr_t *snd_seq_instr_find(snd_seq_kinstr_list_t *list,
-				     snd_seq_instr_t *instr,
-				     int exact,
-				     int follow_alias)
+struct snd_seq_kinstr *snd_seq_instr_find(struct snd_seq_kinstr_list *list,
+					  struct snd_seq_instr *instr,
+					  int exact,
+					  int follow_alias)
 {
 	unsigned long flags;
 	int depth = 0;
-	snd_seq_kinstr_t *result;
+	struct snd_seq_kinstr *result;
 
 	if (list == NULL || instr == NULL)
 		return NULL;
@@ -279,7 +279,7 @@ snd_seq_kinstr_t *snd_seq_instr_find(snd_seq_kinstr_list_t *list,
 	while (result) {
 		if (!compare_instr(&result->instr, instr, exact)) {
 			if (follow_alias && (result->type == SNDRV_SEQ_INSTR_ATYPE_ALIAS)) {
-				instr = (snd_seq_instr_t *)KINSTR_DATA(result);
+				instr = (struct snd_seq_instr *)KINSTR_DATA(result);
 				if (++depth > 10)
 					goto __not_found;
 				goto __again;
@@ -295,8 +295,8 @@ snd_seq_kinstr_t *snd_seq_instr_find(snd_seq_kinstr_list_t *list,
 	return NULL;
 }
 
-void snd_seq_instr_free_use(snd_seq_kinstr_list_t *list,
-			    snd_seq_kinstr_t *instr)
+void snd_seq_instr_free_use(struct snd_seq_kinstr_list *list,
+			    struct snd_seq_kinstr *instr)
 {
 	unsigned long flags;
 
@@ -311,7 +311,8 @@ void snd_seq_instr_free_use(snd_seq_kinstr_list_t *list,
 	spin_unlock_irqrestore(&list->lock, flags);
 }
 
-static snd_seq_kinstr_ops_t *instr_ops(snd_seq_kinstr_ops_t *ops, char *instr_type)
+static struct snd_seq_kinstr_ops *instr_ops(struct snd_seq_kinstr_ops *ops,
+					    char *instr_type)
 {
 	while (ops) {
 		if (!strcmp(ops->instr_type, instr_type))
@@ -321,11 +322,11 @@ static snd_seq_kinstr_ops_t *instr_ops(snd_seq_kinstr_ops_t *ops, char *instr_ty
 	return NULL;
 }
 
-static int instr_result(snd_seq_event_t *ev,
+static int instr_result(struct snd_seq_event *ev,
 			int type, int result,
 			int atomic)
 {
-	snd_seq_event_t sev;
+	struct snd_seq_event sev;
 	
 	memset(&sev, 0, sizeof(sev));
 	sev.type = SNDRV_SEQ_EVENT_RESULT;
@@ -345,9 +346,9 @@ static int instr_result(snd_seq_event_t *ev,
 	return snd_seq_kernel_client_dispatch(sev.source.client, &sev, atomic, 0);
 }
 
-static int instr_begin(snd_seq_kinstr_ops_t *ops,
-		       snd_seq_kinstr_list_t *list,
-		       snd_seq_event_t *ev,
+static int instr_begin(struct snd_seq_kinstr_ops *ops,
+		       struct snd_seq_kinstr_list *list,
+		       struct snd_seq_event *ev,
 		       int atomic, int hop)
 {
 	unsigned long flags;
@@ -362,9 +363,9 @@ static int instr_begin(snd_seq_kinstr_ops_t *ops,
 	return instr_result(ev, SNDRV_SEQ_EVENT_INSTR_BEGIN, 0, atomic);
 }
 
-static int instr_end(snd_seq_kinstr_ops_t *ops,
-		     snd_seq_kinstr_list_t *list,
-		     snd_seq_event_t *ev,
+static int instr_end(struct snd_seq_kinstr_ops *ops,
+		     struct snd_seq_kinstr_list *list,
+		     struct snd_seq_event *ev,
 		     int atomic, int hop)
 {
 	unsigned long flags;
@@ -380,54 +381,55 @@ static int instr_end(snd_seq_kinstr_ops_t *ops,
 	return instr_result(ev, SNDRV_SEQ_EVENT_INSTR_END, -EINVAL, atomic);
 }
 
-static int instr_info(snd_seq_kinstr_ops_t *ops,
-		      snd_seq_kinstr_list_t *list,
-		      snd_seq_event_t *ev,
+static int instr_info(struct snd_seq_kinstr_ops *ops,
+		      struct snd_seq_kinstr_list *list,
+		      struct snd_seq_event *ev,
 		      int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-static int instr_format_info(snd_seq_kinstr_ops_t *ops,
-			     snd_seq_kinstr_list_t *list,
-			     snd_seq_event_t *ev,
+static int instr_format_info(struct snd_seq_kinstr_ops *ops,
+			     struct snd_seq_kinstr_list *list,
+			     struct snd_seq_event *ev,
 			     int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-static int instr_reset(snd_seq_kinstr_ops_t *ops,
-		       snd_seq_kinstr_list_t *list,
-		       snd_seq_event_t *ev,
+static int instr_reset(struct snd_seq_kinstr_ops *ops,
+		       struct snd_seq_kinstr_list *list,
+		       struct snd_seq_event *ev,
 		       int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-static int instr_status(snd_seq_kinstr_ops_t *ops,
-			snd_seq_kinstr_list_t *list,
-			snd_seq_event_t *ev,
+static int instr_status(struct snd_seq_kinstr_ops *ops,
+			struct snd_seq_kinstr_list *list,
+			struct snd_seq_event *ev,
 			int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-static int instr_put(snd_seq_kinstr_ops_t *ops,
-		     snd_seq_kinstr_list_t *list,
-		     snd_seq_event_t *ev,
+static int instr_put(struct snd_seq_kinstr_ops *ops,
+		     struct snd_seq_kinstr_list *list,
+		     struct snd_seq_event *ev,
 		     int atomic, int hop)
 {
 	unsigned long flags;
-	snd_seq_instr_header_t put;
-	snd_seq_kinstr_t *instr;
+	struct snd_seq_instr_header put;
+	struct snd_seq_kinstr *instr;
 	int result = -EINVAL, len, key;
 
 	if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARUSR)
 		goto __return;
 
-	if (ev->data.ext.len < sizeof(snd_seq_instr_header_t))
+	if (ev->data.ext.len < sizeof(struct snd_seq_instr_header))
 		goto __return;
-	if (copy_from_user(&put, (void __user *)ev->data.ext.ptr, sizeof(snd_seq_instr_header_t))) {
+	if (copy_from_user(&put, (void __user *)ev->data.ext.ptr,
+			   sizeof(struct snd_seq_instr_header))) {
 		result = -EFAULT;
 		goto __return;
 	}
@@ -449,7 +451,7 @@ static int instr_put(snd_seq_kinstr_ops_t *ops,
 	}
 	len = ops->add_len;
 	if (put.data.type == SNDRV_SEQ_INSTR_ATYPE_ALIAS)
-		len = sizeof(snd_seq_instr_t);
+		len = sizeof(struct snd_seq_instr);
 	instr = snd_seq_instr_new(len, atomic);
 	if (instr == NULL) {
 		snd_instr_unlock_ops(list);
@@ -463,8 +465,8 @@ static int instr_put(snd_seq_kinstr_ops_t *ops,
 	if (instr->type == SNDRV_SEQ_INSTR_ATYPE_DATA) {
 		result = ops->put(ops->private_data,
 				  instr,
-				  (void __user *)ev->data.ext.ptr + sizeof(snd_seq_instr_header_t),
-				  ev->data.ext.len - sizeof(snd_seq_instr_header_t),
+				  (void __user *)ev->data.ext.ptr + sizeof(struct snd_seq_instr_header),
+				  ev->data.ext.len - sizeof(struct snd_seq_instr_header),
 				  atomic,
 				  put.cmd);
 		if (result < 0) {
@@ -486,21 +488,21 @@ static int instr_put(snd_seq_kinstr_ops_t *ops,
 	return result;
 }
 
-static int instr_get(snd_seq_kinstr_ops_t *ops,
-		     snd_seq_kinstr_list_t *list,
-		     snd_seq_event_t *ev,
+static int instr_get(struct snd_seq_kinstr_ops *ops,
+		     struct snd_seq_kinstr_list *list,
+		     struct snd_seq_event *ev,
 		     int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-static int instr_free(snd_seq_kinstr_ops_t *ops,
-		      snd_seq_kinstr_list_t *list,
-		      snd_seq_event_t *ev,
+static int instr_free(struct snd_seq_kinstr_ops *ops,
+		      struct snd_seq_kinstr_list *list,
+		      struct snd_seq_event *ev,
 		      int atomic, int hop)
 {
-	snd_seq_instr_header_t ifree;
-	snd_seq_kinstr_t *instr, *prev;
+	struct snd_seq_instr_header ifree;
+	struct snd_seq_kinstr *instr, *prev;
 	int result = -EINVAL;
 	unsigned long flags;
 	unsigned int hash;
@@ -508,9 +510,10 @@ static int instr_free(snd_seq_kinstr_ops_t *ops,
 	if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARUSR)
 		goto __return;
 
-	if (ev->data.ext.len < sizeof(snd_seq_instr_header_t))
+	if (ev->data.ext.len < sizeof(struct snd_seq_instr_header))
 		goto __return;
-	if (copy_from_user(&ifree, (void __user *)ev->data.ext.ptr, sizeof(snd_seq_instr_header_t))) {
+	if (copy_from_user(&ifree, (void __user *)ev->data.ext.ptr,
+			   sizeof(struct snd_seq_instr_header))) {
 		result = -EFAULT;
 		goto __return;
 	}
@@ -548,7 +551,8 @@ static int instr_free(snd_seq_kinstr_ops_t *ops,
 			list->hash[hash] = instr->next;
 		}
 		if (instr->ops && instr->ops->notify)
-			instr->ops->notify(instr->ops->private_data, instr, SNDRV_SEQ_INSTR_NOTIFY_REMOVE);
+			instr->ops->notify(instr->ops->private_data, instr,
+					   SNDRV_SEQ_INSTR_NOTIFY_REMOVE);
 		while (instr->use) {
 			spin_unlock_irqrestore(&list->lock, flags);
 			schedule_timeout_interruptible(1);
@@ -565,25 +569,25 @@ static int instr_free(snd_seq_kinstr_ops_t *ops,
 	return result;
 }
 
-static int instr_list(snd_seq_kinstr_ops_t *ops,
-		      snd_seq_kinstr_list_t *list,
-		      snd_seq_event_t *ev,
+static int instr_list(struct snd_seq_kinstr_ops *ops,
+		      struct snd_seq_kinstr_list *list,
+		      struct snd_seq_event *ev,
 		      int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-static int instr_cluster(snd_seq_kinstr_ops_t *ops,
-			 snd_seq_kinstr_list_t *list,
-			 snd_seq_event_t *ev,
+static int instr_cluster(struct snd_seq_kinstr_ops *ops,
+			 struct snd_seq_kinstr_list *list,
+			 struct snd_seq_event *ev,
 			 int atomic, int hop)
 {
 	return -ENXIO;
 }
 
-int snd_seq_instr_event(snd_seq_kinstr_ops_t *ops,
-			snd_seq_kinstr_list_t *list,
-			snd_seq_event_t *ev,
+int snd_seq_instr_event(struct snd_seq_kinstr_ops *ops,
+			struct snd_seq_kinstr_list *list,
+			struct snd_seq_event *ev,
 			int client,
 			int atomic,
 			int hop)
diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c
index 8416bcffa09..9ee6c177db0 100644
--- a/sound/core/seq/seq_memory.c
+++ b/sound/core/seq/seq_memory.c
@@ -36,12 +36,12 @@
 #define semaphore_of(fp)	((fp)->f_dentry->d_inode->i_sem)
 
 
-static inline int snd_seq_pool_available(pool_t *pool)
+static inline int snd_seq_pool_available(struct snd_seq_pool *pool)
 {
 	return pool->total_elements - atomic_read(&pool->counter);
 }
 
-static inline int snd_seq_output_ok(pool_t *pool)
+static inline int snd_seq_output_ok(struct snd_seq_pool *pool)
 {
 	return snd_seq_pool_available(pool) >= pool->room;
 }
@@ -72,7 +72,7 @@ static inline int snd_seq_output_ok(pool_t *pool)
  * call dump function to expand external data.
  */
 
-static int get_var_len(const snd_seq_event_t *event)
+static int get_var_len(const struct snd_seq_event *event)
 {
 	if ((event->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARIABLE)
 		return -EINVAL;
@@ -80,10 +80,11 @@ static int get_var_len(const snd_seq_event_t *event)
 	return event->data.ext.len & ~SNDRV_SEQ_EXT_MASK;
 }
 
-int snd_seq_dump_var_event(const snd_seq_event_t *event, snd_seq_dump_func_t func, void *private_data)
+int snd_seq_dump_var_event(const struct snd_seq_event *event,
+			   snd_seq_dump_func_t func, void *private_data)
 {
 	int len, err;
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 
 	if ((len = get_var_len(event)) <= 0)
 		return len;
@@ -108,9 +109,9 @@ int snd_seq_dump_var_event(const snd_seq_event_t *event, snd_seq_dump_func_t fun
 		return func(private_data, event->data.ext.ptr, len);
 	}
 
-	cell = (snd_seq_event_cell_t*)event->data.ext.ptr;
+	cell = (struct snd_seq_event_cell *)event->data.ext.ptr;
 	for (; len > 0 && cell; cell = cell->next) {
-		int size = sizeof(snd_seq_event_t);
+		int size = sizeof(struct snd_seq_event);
 		if (len < size)
 			size = len;
 		err = func(private_data, &cell->event, size);
@@ -142,7 +143,8 @@ static int seq_copy_in_user(char __user **bufptr, const void *src, int size)
 	return 0;
 }
 
-int snd_seq_expand_var_event(const snd_seq_event_t *event, int count, char *buf, int in_kernel, int size_aligned)
+int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char *buf,
+			     int in_kernel, int size_aligned)
 {
 	int len, newlen;
 	int err;
@@ -174,17 +176,18 @@ int snd_seq_expand_var_event(const snd_seq_event_t *event, int count, char *buf,
  * release this cell, free extended data if available
  */
 
-static inline void free_cell(pool_t *pool, snd_seq_event_cell_t *cell)
+static inline void free_cell(struct snd_seq_pool *pool,
+			     struct snd_seq_event_cell *cell)
 {
 	cell->next = pool->free;
 	pool->free = cell;
 	atomic_dec(&pool->counter);
 }
 
-void snd_seq_cell_free(snd_seq_event_cell_t * cell)
+void snd_seq_cell_free(struct snd_seq_event_cell * cell)
 {
 	unsigned long flags;
-	pool_t *pool;
+	struct snd_seq_pool *pool;
 
 	snd_assert(cell != NULL, return);
 	pool = cell->pool;
@@ -194,7 +197,7 @@ void snd_seq_cell_free(snd_seq_event_cell_t * cell)
 	free_cell(pool, cell);
 	if (snd_seq_ev_is_variable(&cell->event)) {
 		if (cell->event.data.ext.len & SNDRV_SEQ_EXT_CHAINED) {
-			snd_seq_event_cell_t *curp, *nextptr;
+			struct snd_seq_event_cell *curp, *nextptr;
 			curp = cell->event.data.ext.ptr;
 			for (; curp; curp = nextptr) {
 				nextptr = curp->next;
@@ -215,9 +218,11 @@ void snd_seq_cell_free(snd_seq_event_cell_t * cell)
 /*
  * allocate an event cell.
  */
-static int snd_seq_cell_alloc(pool_t *pool, snd_seq_event_cell_t **cellp, int nonblock, struct file *file)
+static int snd_seq_cell_alloc(struct snd_seq_pool *pool,
+			      struct snd_seq_event_cell **cellp,
+			      int nonblock, struct file *file)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 	unsigned long flags;
 	int err = -EAGAIN;
 	wait_queue_t wait;
@@ -280,11 +285,13 @@ __error:
  * if the event has external data, the data is decomposed to additional
  * cells.
  */
-int snd_seq_event_dup(pool_t *pool, snd_seq_event_t *event, snd_seq_event_cell_t **cellp, int nonblock, struct file *file)
+int snd_seq_event_dup(struct snd_seq_pool *pool, struct snd_seq_event *event,
+		      struct snd_seq_event_cell **cellp, int nonblock,
+		      struct file *file)
 {
 	int ncells, err;
 	unsigned int extlen;
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 
 	*cellp = NULL;
 
@@ -292,7 +299,7 @@ int snd_seq_event_dup(pool_t *pool, snd_seq_event_t *event, snd_seq_event_cell_t
 	extlen = 0;
 	if (snd_seq_ev_is_variable(event)) {
 		extlen = event->data.ext.len & ~SNDRV_SEQ_EXT_MASK;
-		ncells = (extlen + sizeof(snd_seq_event_t) - 1) / sizeof(snd_seq_event_t);
+		ncells = (extlen + sizeof(struct snd_seq_event) - 1) / sizeof(struct snd_seq_event);
 	}
 	if (ncells >= pool->total_elements)
 		return -ENOMEM;
@@ -309,18 +316,18 @@ int snd_seq_event_dup(pool_t *pool, snd_seq_event_t *event, snd_seq_event_cell_t
 		int len = extlen;
 		int is_chained = event->data.ext.len & SNDRV_SEQ_EXT_CHAINED;
 		int is_usrptr = event->data.ext.len & SNDRV_SEQ_EXT_USRPTR;
-		snd_seq_event_cell_t *src, *tmp, *tail;
+		struct snd_seq_event_cell *src, *tmp, *tail;
 		char *buf;
 
 		cell->event.data.ext.len = extlen | SNDRV_SEQ_EXT_CHAINED;
 		cell->event.data.ext.ptr = NULL;
 
-		src = (snd_seq_event_cell_t*)event->data.ext.ptr;
+		src = (struct snd_seq_event_cell *)event->data.ext.ptr;
 		buf = (char *)event->data.ext.ptr;
 		tail = NULL;
 
 		while (ncells-- > 0) {
-			int size = sizeof(snd_seq_event_t);
+			int size = sizeof(struct snd_seq_event);
 			if (len < size)
 				size = len;
 			err = snd_seq_cell_alloc(pool, &tmp, nonblock, file);
@@ -358,7 +365,8 @@ __error:
   
 
 /* poll wait */
-int snd_seq_pool_poll_wait(pool_t *pool, struct file *file, poll_table *wait)
+int snd_seq_pool_poll_wait(struct snd_seq_pool *pool, struct file *file,
+			   poll_table *wait)
 {
 	poll_wait(file, &pool->output_sleep, wait);
 	return snd_seq_output_ok(pool);
@@ -366,17 +374,17 @@ int snd_seq_pool_poll_wait(pool_t *pool, struct file *file, poll_table *wait)
 
 
 /* allocate room specified number of events */
-int snd_seq_pool_init(pool_t *pool)
+int snd_seq_pool_init(struct snd_seq_pool *pool)
 {
 	int cell;
-	snd_seq_event_cell_t *cellptr;
+	struct snd_seq_event_cell *cellptr;
 	unsigned long flags;
 
 	snd_assert(pool != NULL, return -EINVAL);
 	if (pool->ptr)			/* should be atomic? */
 		return 0;
 
-	pool->ptr = vmalloc(sizeof(snd_seq_event_cell_t) * pool->size);
+	pool->ptr = vmalloc(sizeof(struct snd_seq_event_cell) * pool->size);
 	if (pool->ptr == NULL) {
 		snd_printd("seq: malloc for sequencer events failed\n");
 		return -ENOMEM;
@@ -402,10 +410,10 @@ int snd_seq_pool_init(pool_t *pool)
 }
 
 /* remove events */
-int snd_seq_pool_done(pool_t *pool)
+int snd_seq_pool_done(struct snd_seq_pool *pool)
 {
 	unsigned long flags;
-	snd_seq_event_cell_t *ptr;
+	struct snd_seq_event_cell *ptr;
 	int max_count = 5 * HZ;
 
 	snd_assert(pool != NULL, return -EINVAL);
@@ -446,9 +454,9 @@ int snd_seq_pool_done(pool_t *pool)
 
 
 /* init new memory pool */
-pool_t *snd_seq_pool_new(int poolsize)
+struct snd_seq_pool *snd_seq_pool_new(int poolsize)
 {
-	pool_t *pool;
+	struct snd_seq_pool *pool;
 
 	/* create pool block */
 	pool = kzalloc(sizeof(*pool), GFP_KERNEL);
@@ -472,9 +480,9 @@ pool_t *snd_seq_pool_new(int poolsize)
 }
 
 /* remove memory pool */
-int snd_seq_pool_delete(pool_t **ppool)
+int snd_seq_pool_delete(struct snd_seq_pool **ppool)
 {
-	pool_t *pool = *ppool;
+	struct snd_seq_pool *pool = *ppool;
 
 	*ppool = NULL;
 	if (pool == NULL)
@@ -497,7 +505,8 @@ void __exit snd_sequencer_memory_done(void)
 
 
 /* exported to seq_clientmgr.c */
-void snd_seq_info_pool(snd_info_buffer_t * buffer, pool_t *pool, char *space)
+void snd_seq_info_pool(struct snd_info_buffer *buffer,
+		       struct snd_seq_pool *pool, char *space)
 {
 	if (pool == NULL)
 		return;
diff --git a/sound/core/seq/seq_memory.h b/sound/core/seq/seq_memory.h
index 6c4dde5d3d6..39c60d9e1ef 100644
--- a/sound/core/seq/seq_memory.h
+++ b/sound/core/seq/seq_memory.h
@@ -24,23 +24,21 @@
 #include <sound/seq_kernel.h>
 #include <linux/poll.h>
 
-typedef struct pool pool_t;
-
 /* container for sequencer event (internal use) */
-typedef struct snd_seq_event_cell_t {
-	snd_seq_event_t event;
-	pool_t *pool;				/* used pool */
-	struct snd_seq_event_cell_t *next;	/* next cell */
-} snd_seq_event_cell_t;
+struct snd_seq_event_cell {
+	struct snd_seq_event event;
+	struct snd_seq_pool *pool;				/* used pool */
+	struct snd_seq_event_cell *next;	/* next cell */
+};
 
 /* design note: the pool is a contigious block of memory, if we dynamicly
    want to add additional cells to the pool be better store this in another
    pool as we need to know the base address of the pool when releasing
    memory. */
 
-struct pool {
-	snd_seq_event_cell_t *ptr;	/* pointer to first event chunk */
-	snd_seq_event_cell_t *free;	/* pointer to the head of the free list */
+struct snd_seq_pool {
+	struct snd_seq_event_cell *ptr;	/* pointer to first event chunk */
+	struct snd_seq_event_cell *free;	/* pointer to the head of the free list */
 
 	int total_elements;	/* pool size actually allocated */
 	atomic_t counter;	/* cells free */
@@ -63,33 +61,34 @@ struct pool {
 	spinlock_t lock;
 };
 
-extern void snd_seq_cell_free(snd_seq_event_cell_t* cell);
+void snd_seq_cell_free(struct snd_seq_event_cell *cell);
 
-int snd_seq_event_dup(pool_t *pool, snd_seq_event_t *event, snd_seq_event_cell_t **cellp, int nonblock, struct file *file);
+int snd_seq_event_dup(struct snd_seq_pool *pool, struct snd_seq_event *event,
+		      struct snd_seq_event_cell **cellp, int nonblock, struct file *file);
 
 /* return number of unused (free) cells */
-static inline int snd_seq_unused_cells(pool_t *pool)
+static inline int snd_seq_unused_cells(struct snd_seq_pool *pool)
 {
 	return pool ? pool->total_elements - atomic_read(&pool->counter) : 0;
 }
 
 /* return total number of allocated cells */
-static inline int snd_seq_total_cells(pool_t *pool)
+static inline int snd_seq_total_cells(struct snd_seq_pool *pool)
 {
 	return pool ? pool->total_elements : 0;
 }
 
 /* init pool - allocate events */
-int snd_seq_pool_init(pool_t *pool);
+int snd_seq_pool_init(struct snd_seq_pool *pool);
 
 /* done pool - free events */
-int snd_seq_pool_done(pool_t *pool);
+int snd_seq_pool_done(struct snd_seq_pool *pool);
 
 /* create pool */
-pool_t *snd_seq_pool_new(int poolsize);
+struct snd_seq_pool *snd_seq_pool_new(int poolsize);
 
 /* remove pool */
-int snd_seq_pool_delete(pool_t **pool);
+int snd_seq_pool_delete(struct snd_seq_pool **pool);
 
 /* init memory */
 int snd_sequencer_memory_init(void);
@@ -98,7 +97,7 @@ int snd_sequencer_memory_init(void);
 void snd_sequencer_memory_done(void);
 
 /* polling */
-int snd_seq_pool_poll_wait(pool_t *pool, struct file *file, poll_table *wait);
+int snd_seq_pool_poll_wait(struct snd_seq_pool *pool, struct file *file, poll_table *wait);
 
 
 #endif
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
index f89f40f4487..f88d2e3ee66 100644
--- a/sound/core/seq/seq_midi.c
+++ b/sound/core/seq/seq_midi.c
@@ -51,40 +51,40 @@ module_param(input_buffer_size, int, 0644);
 MODULE_PARM_DESC(input_buffer_size, "Input buffer size in bytes.");
 
 /* data for this midi synth driver */
-typedef struct {
-	snd_card_t *card;
+struct seq_midisynth {
+	struct snd_card *card;
 	int device;
 	int subdevice;
-	snd_rawmidi_file_t input_rfile;
-	snd_rawmidi_file_t output_rfile;
+	struct snd_rawmidi_file input_rfile;
+	struct snd_rawmidi_file output_rfile;
 	int seq_client;
 	int seq_port;
-	snd_midi_event_t *parser;
-} seq_midisynth_t;
+	struct snd_midi_event *parser;
+};
 
-typedef struct {
+struct seq_midisynth_client {
 	int seq_client;
 	int num_ports;
 	int ports_per_device[SNDRV_RAWMIDI_DEVICES];
- 	seq_midisynth_t *ports[SNDRV_RAWMIDI_DEVICES];
-} seq_midisynth_client_t;
+ 	struct seq_midisynth *ports[SNDRV_RAWMIDI_DEVICES];
+};
 
-static seq_midisynth_client_t *synths[SNDRV_CARDS];
+static struct seq_midisynth_client *synths[SNDRV_CARDS];
 static DECLARE_MUTEX(register_mutex);
 
 /* handle rawmidi input event (MIDI v1.0 stream) */
-static void snd_midi_input_event(snd_rawmidi_substream_t * substream)
+static void snd_midi_input_event(struct snd_rawmidi_substream *substream)
 {
-	snd_rawmidi_runtime_t *runtime;
-	seq_midisynth_t *msynth;
-	snd_seq_event_t ev;
+	struct snd_rawmidi_runtime *runtime;
+	struct seq_midisynth *msynth;
+	struct snd_seq_event ev;
 	char buf[16], *pbuf;
 	long res, count;
 
 	if (substream == NULL)
 		return;
 	runtime = substream->runtime;
-	msynth = (seq_midisynth_t *) runtime->private_data;
+	msynth = runtime->private_data;
 	if (msynth == NULL)
 		return;
 	memset(&ev, 0, sizeof(ev));
@@ -112,9 +112,9 @@ static void snd_midi_input_event(snd_rawmidi_substream_t * substream)
 	}
 }
 
-static int dump_midi(snd_rawmidi_substream_t *substream, const char *buf, int count)
+static int dump_midi(struct snd_rawmidi_substream *substream, const char *buf, int count)
 {
-	snd_rawmidi_runtime_t *runtime;
+	struct snd_rawmidi_runtime *runtime;
 	int tmp;
 
 	snd_assert(substream != NULL || buf != NULL, return -EINVAL);
@@ -128,12 +128,12 @@ static int dump_midi(snd_rawmidi_substream_t *substream, const char *buf, int co
 	return 0;
 }
 
-static int event_process_midi(snd_seq_event_t * ev, int direct,
+static int event_process_midi(struct snd_seq_event *ev, int direct,
 			      void *private_data, int atomic, int hop)
 {
-	seq_midisynth_t *msynth = (seq_midisynth_t *) private_data;
+	struct seq_midisynth *msynth = private_data;
 	unsigned char msg[10];	/* buffer for constructing midi messages */
-	snd_rawmidi_substream_t *substream;
+	struct snd_rawmidi_substream *substream;
 	int len;
 
 	snd_assert(msynth != NULL, return -EINVAL);
@@ -161,8 +161,8 @@ static int event_process_midi(snd_seq_event_t * ev, int direct,
 }
 
 
-static int snd_seq_midisynth_new(seq_midisynth_t *msynth,
-				 snd_card_t *card,
+static int snd_seq_midisynth_new(struct seq_midisynth *msynth,
+				 struct snd_card *card,
 				 int device,
 				 int subdevice)
 {
@@ -175,12 +175,12 @@ static int snd_seq_midisynth_new(seq_midisynth_t *msynth,
 }
 
 /* open associated midi device for input */
-static int midisynth_subscribe(void *private_data, snd_seq_port_subscribe_t *info)
+static int midisynth_subscribe(void *private_data, struct snd_seq_port_subscribe *info)
 {
 	int err;
-	seq_midisynth_t *msynth = (seq_midisynth_t *)private_data;
-	snd_rawmidi_runtime_t *runtime;
-	snd_rawmidi_params_t params;
+	struct seq_midisynth *msynth = private_data;
+	struct snd_rawmidi_runtime *runtime;
+	struct snd_rawmidi_params params;
 
 	/* open midi port */
 	if ((err = snd_rawmidi_kernel_open(msynth->card->number, msynth->device, msynth->subdevice, SNDRV_RAWMIDI_LFLG_INPUT, &msynth->input_rfile)) < 0) {
@@ -203,10 +203,10 @@ static int midisynth_subscribe(void *private_data, snd_seq_port_subscribe_t *inf
 }
 
 /* close associated midi device for input */
-static int midisynth_unsubscribe(void *private_data, snd_seq_port_subscribe_t *info)
+static int midisynth_unsubscribe(void *private_data, struct snd_seq_port_subscribe *info)
 {
 	int err;
-	seq_midisynth_t *msynth = (seq_midisynth_t *)private_data;
+	struct seq_midisynth *msynth = private_data;
 
 	snd_assert(msynth->input_rfile.input != NULL, return -EINVAL);
 	err = snd_rawmidi_kernel_release(&msynth->input_rfile);
@@ -214,11 +214,11 @@ static int midisynth_unsubscribe(void *private_data, snd_seq_port_subscribe_t *i
 }
 
 /* open associated midi device for output */
-static int midisynth_use(void *private_data, snd_seq_port_subscribe_t *info)
+static int midisynth_use(void *private_data, struct snd_seq_port_subscribe *info)
 {
 	int err;
-	seq_midisynth_t *msynth = (seq_midisynth_t *)private_data;
-	snd_rawmidi_params_t params;
+	struct seq_midisynth *msynth = private_data;
+	struct snd_rawmidi_params params;
 
 	/* open midi port */
 	if ((err = snd_rawmidi_kernel_open(msynth->card->number, msynth->device, msynth->subdevice, SNDRV_RAWMIDI_LFLG_OUTPUT, &msynth->output_rfile)) < 0) {
@@ -237,9 +237,9 @@ static int midisynth_use(void *private_data, snd_seq_port_subscribe_t *info)
 }
 
 /* close associated midi device for output */
-static int midisynth_unuse(void *private_data, snd_seq_port_subscribe_t *info)
+static int midisynth_unuse(void *private_data, struct snd_seq_port_subscribe *info)
 {
-	seq_midisynth_t *msynth = (seq_midisynth_t *)private_data;
+	struct seq_midisynth *msynth = private_data;
 	unsigned char buf = 0xff; /* MIDI reset */
 
 	snd_assert(msynth->output_rfile.output != NULL, return -EINVAL);
@@ -250,7 +250,7 @@ static int midisynth_unuse(void *private_data, snd_seq_port_subscribe_t *info)
 }
 
 /* delete given midi synth port */
-static void snd_seq_midisynth_delete(seq_midisynth_t *msynth)
+static void snd_seq_midisynth_delete(struct seq_midisynth *msynth)
 {
 	if (msynth == NULL)
 		return;
@@ -265,10 +265,10 @@ static void snd_seq_midisynth_delete(seq_midisynth_t *msynth)
 }
 
 /* set our client name */
-static int set_client_name(seq_midisynth_client_t *client, snd_card_t *card,
-			   snd_rawmidi_info_t *rmidi)
+static int set_client_name(struct seq_midisynth_client *client, struct snd_card *card,
+			   struct snd_rawmidi_info *rmidi)
 {
-	snd_seq_client_info_t cinfo;
+	struct snd_seq_client_info cinfo;
 	const char *name;
 
 	memset(&cinfo, 0, sizeof(cinfo));
@@ -281,17 +281,17 @@ static int set_client_name(seq_midisynth_client_t *client, snd_card_t *card,
 
 /* register new midi synth port */
 static int
-snd_seq_midisynth_register_port(snd_seq_device_t *dev)
+snd_seq_midisynth_register_port(struct snd_seq_device *dev)
 {
-	seq_midisynth_client_t *client;
-	seq_midisynth_t *msynth, *ms;
-	snd_seq_port_info_t *port;
-	snd_rawmidi_info_t *info;
+	struct seq_midisynth_client *client;
+	struct seq_midisynth *msynth, *ms;
+	struct snd_seq_port_info *port;
+	struct snd_rawmidi_info *info;
 	int newclient = 0;
 	unsigned int p, ports;
-	snd_seq_client_callback_t callbacks;
-	snd_seq_port_callback_t pcallbacks;
-	snd_card_t *card = dev->card;
+	struct snd_seq_client_callback callbacks;
+	struct snd_seq_port_callback pcallbacks;
+	struct snd_card *card = dev->card;
 	int device = dev->device;
 	unsigned int input_count = 0, output_count = 0;
 
@@ -342,7 +342,7 @@ snd_seq_midisynth_register_port(snd_seq_device_t *dev)
 	} else if (device == 0)
 		set_client_name(client, card, info); /* use the first device's name */
 
-	msynth = kcalloc(ports, sizeof(seq_midisynth_t), GFP_KERNEL);
+	msynth = kcalloc(ports, sizeof(struct seq_midisynth), GFP_KERNEL);
 	port = kmalloc(sizeof(*port), GFP_KERNEL);
 	if (msynth == NULL || port == NULL)
 		goto __nomem;
@@ -432,11 +432,11 @@ snd_seq_midisynth_register_port(snd_seq_device_t *dev)
 
 /* release midi synth port */
 static int
-snd_seq_midisynth_unregister_port(snd_seq_device_t *dev)
+snd_seq_midisynth_unregister_port(struct snd_seq_device *dev)
 {
-	seq_midisynth_client_t *client;
-	seq_midisynth_t *msynth;
-	snd_card_t *card = dev->card;
+	struct seq_midisynth_client *client;
+	struct seq_midisynth *msynth;
+	struct snd_card *card = dev->card;
 	int device = dev->device, p, ports;
 	
 	down(&register_mutex);
@@ -465,7 +465,7 @@ snd_seq_midisynth_unregister_port(snd_seq_device_t *dev)
 
 static int __init alsa_seq_midi_init(void)
 {
-	static snd_seq_dev_ops_t ops = {
+	static struct snd_seq_dev_ops ops = {
 		snd_seq_midisynth_register_port,
 		snd_seq_midisynth_unregister_port,
 	};
diff --git a/sound/core/seq/seq_midi_emul.c b/sound/core/seq/seq_midi_emul.c
index 35fe8a7e34b..d7c4fb86b9e 100644
--- a/sound/core/seq/seq_midi_emul.c
+++ b/sound/core/seq/seq_midi_emul.c
@@ -44,17 +44,25 @@ MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer MIDI emulation."
 MODULE_LICENSE("GPL");
 
 /* Prototypes for static functions */
-static void note_off(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan, int note, int vel);
-static void do_control(snd_midi_op_t *ops, void *private,
-		       snd_midi_channel_set_t *chset, snd_midi_channel_t *chan,
+static void note_off(struct snd_midi_op *ops, void *drv,
+		     struct snd_midi_channel *chan,
+		     int note, int vel);
+static void do_control(struct snd_midi_op *ops, void *private,
+		       struct snd_midi_channel_set *chset,
+		       struct snd_midi_channel *chan,
 		       int control, int value);
-static void rpn(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset);
-static void nrpn(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset);
-static void sysex(snd_midi_op_t *ops, void *private, unsigned char *sysex, int len, snd_midi_channel_set_t *chset);
-static void all_sounds_off(snd_midi_op_t *ops, void *private, snd_midi_channel_t *chan);
-static void all_notes_off(snd_midi_op_t *ops, void *private, snd_midi_channel_t *chan);
-static void snd_midi_reset_controllers(snd_midi_channel_t *chan);
-static void reset_all_channels(snd_midi_channel_set_t *chset);
+static void rpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
+		struct snd_midi_channel_set *chset);
+static void nrpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
+		 struct snd_midi_channel_set *chset);
+static void sysex(struct snd_midi_op *ops, void *private, unsigned char *sysex,
+		  int len, struct snd_midi_channel_set *chset);
+static void all_sounds_off(struct snd_midi_op *ops, void *private,
+			   struct snd_midi_channel *chan);
+static void all_notes_off(struct snd_midi_op *ops, void *private,
+			  struct snd_midi_channel *chan);
+static void snd_midi_reset_controllers(struct snd_midi_channel *chan);
+static void reset_all_channels(struct snd_midi_channel_set *chset);
 
 
 /*
@@ -72,10 +80,11 @@ static void reset_all_channels(snd_midi_channel_set_t *chset);
  *        be interpreted.
  */
 void
-snd_midi_process_event(snd_midi_op_t *ops,
-		       snd_seq_event_t *ev, snd_midi_channel_set_t *chanset)
+snd_midi_process_event(struct snd_midi_op *ops,
+		       struct snd_seq_event *ev,
+		       struct snd_midi_channel_set *chanset)
 {
-	snd_midi_channel_t *chan;
+	struct snd_midi_channel *chan;
 	void *drv;
 	int dest_channel = 0;
 
@@ -89,7 +98,8 @@ snd_midi_process_event(snd_midi_op_t *ops,
 	if (snd_seq_ev_is_channel_type(ev)) {
 		dest_channel = ev->data.note.channel;
 		if (dest_channel >= chanset->max_channels) {
-			snd_printd("dest channel is %d, max is %d\n", dest_channel, chanset->max_channels);
+			snd_printd("dest channel is %d, max is %d\n",
+				   dest_channel, chanset->max_channels);
 			return;
 		}
 	}
@@ -239,7 +249,8 @@ snd_midi_process_event(snd_midi_op_t *ops,
  * release note
  */
 static void
-note_off(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan, int note, int vel)
+note_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
+	 int note, int vel)
 {
 	if (chan->gm_hold) {
 		/* Hold this note until pedal is turned off */
@@ -260,8 +271,8 @@ note_off(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan, int note, int
  * events that need to take place immediately to the driver.
  */
 static void
-do_control(snd_midi_op_t *ops, void *drv, snd_midi_channel_set_t *chset,
-	   snd_midi_channel_t *chan, int control, int value)
+do_control(struct snd_midi_op *ops, void *drv, struct snd_midi_channel_set *chset,
+	   struct snd_midi_channel *chan, int control, int value)
 {
 	int  i;
 
@@ -376,7 +387,7 @@ do_control(snd_midi_op_t *ops, void *drv, snd_midi_channel_set_t *chset,
  * initialize the MIDI status
  */
 void
-snd_midi_channel_set_clear(snd_midi_channel_set_t *chset)
+snd_midi_channel_set_clear(struct snd_midi_channel_set *chset)
 {
 	int i;
 
@@ -384,7 +395,7 @@ snd_midi_channel_set_clear(snd_midi_channel_set_t *chset)
 	chset->gs_master_volume = 127;
 
 	for (i = 0; i < chset->max_channels; i++) {
-		snd_midi_channel_t *chan = chset->channels + i;
+		struct snd_midi_channel *chan = chset->channels + i;
 		memset(chan->note, 0, sizeof(chan->note));
 
 		chan->midi_aftertouch = 0;
@@ -407,8 +418,8 @@ snd_midi_channel_set_clear(snd_midi_channel_set_t *chset)
  * Process a rpn message.
  */
 static void
-rpn(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan,
-    snd_midi_channel_set_t *chset)
+rpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
+    struct snd_midi_channel_set *chset)
 {
 	int type;
 	int val;
@@ -447,8 +458,8 @@ rpn(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan,
  * Process an nrpn message.
  */
 static void
-nrpn(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan,
-     snd_midi_channel_set_t *chset)
+nrpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
+     struct snd_midi_channel_set *chset)
 {
 	/* parse XG NRPNs here if possible */
 	if (ops->nrpn)
@@ -475,7 +486,8 @@ get_channel(unsigned char cmd)
  * Process a sysex message.
  */
 static void
-sysex(snd_midi_op_t *ops, void *private, unsigned char *buf, int len, snd_midi_channel_set_t *chset)
+sysex(struct snd_midi_op *ops, void *private, unsigned char *buf, int len,
+      struct snd_midi_channel_set *chset)
 {
 	/* GM on */
 	static unsigned char gm_on_macro[] = {
@@ -588,7 +600,7 @@ sysex(snd_midi_op_t *ops, void *private, unsigned char *buf, int len, snd_midi_c
  * all sound off
  */
 static void
-all_sounds_off(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan)
+all_sounds_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan)
 {
 	int n;
 
@@ -606,7 +618,7 @@ all_sounds_off(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan)
  * all notes off
  */
 static void
-all_notes_off(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan)
+all_notes_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan)
 {
 	int n;
 
@@ -621,12 +633,12 @@ all_notes_off(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan)
 /*
  * Initialise a single midi channel control block.
  */
-static void snd_midi_channel_init(snd_midi_channel_t *p, int n)
+static void snd_midi_channel_init(struct snd_midi_channel *p, int n)
 {
 	if (p == NULL)
 		return;
 
-	memset(p, 0, sizeof(snd_midi_channel_t));
+	memset(p, 0, sizeof(struct snd_midi_channel));
 	p->private = NULL;
 	p->number = n;
 
@@ -642,12 +654,12 @@ static void snd_midi_channel_init(snd_midi_channel_t *p, int n)
 /*
  * Allocate and initialise a set of midi channel control blocks.
  */
-static snd_midi_channel_t *snd_midi_channel_init_set(int n)
+static struct snd_midi_channel *snd_midi_channel_init_set(int n)
 {
-	snd_midi_channel_t *chan;
+	struct snd_midi_channel *chan;
 	int  i;
 
-	chan = kmalloc(n * sizeof(snd_midi_channel_t), GFP_KERNEL);
+	chan = kmalloc(n * sizeof(struct snd_midi_channel), GFP_KERNEL);
 	if (chan) {
 		for (i = 0; i < n; i++)
 			snd_midi_channel_init(chan+i, i);
@@ -660,11 +672,11 @@ static snd_midi_channel_t *snd_midi_channel_init_set(int n)
  * reset all midi channels
  */
 static void
-reset_all_channels(snd_midi_channel_set_t *chset)
+reset_all_channels(struct snd_midi_channel_set *chset)
 {
 	int ch;
 	for (ch = 0; ch < chset->max_channels; ch++) {
-		snd_midi_channel_t *chan = chset->channels + ch;
+		struct snd_midi_channel *chan = chset->channels + ch;
 		snd_midi_reset_controllers(chan);
 		chan->gm_rpn_pitch_bend_range = 256; /* 2 semitones */
 		chan->gm_rpn_fine_tuning = 0;
@@ -681,9 +693,9 @@ reset_all_channels(snd_midi_channel_set_t *chset)
 /*
  * Allocate and initialise a midi channel set.
  */
-snd_midi_channel_set_t *snd_midi_channel_alloc_set(int n)
+struct snd_midi_channel_set *snd_midi_channel_alloc_set(int n)
 {
-	snd_midi_channel_set_t *chset;
+	struct snd_midi_channel_set *chset;
 
 	chset = kmalloc(sizeof(*chset), GFP_KERNEL);
 	if (chset) {
@@ -697,7 +709,7 @@ snd_midi_channel_set_t *snd_midi_channel_alloc_set(int n)
 /*
  * Reset the midi controllers on a particular channel to default values.
  */
-static void snd_midi_reset_controllers(snd_midi_channel_t *chan)
+static void snd_midi_reset_controllers(struct snd_midi_channel *chan)
 {
 	memset(chan->control, 0, sizeof(chan->control));
 	chan->gm_volume = 127;
@@ -709,7 +721,7 @@ static void snd_midi_reset_controllers(snd_midi_channel_t *chan)
 /*
  * Free a midi channel set.
  */
-void snd_midi_channel_free_set(snd_midi_channel_set_t *chset)
+void snd_midi_channel_free_set(struct snd_midi_channel_set *chset)
 {
 	if (chset == NULL)
 		return;
diff --git a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c
index 2dc1aecfb42..5ff80b77690 100644
--- a/sound/core/seq/seq_midi_event.c
+++ b/sound/core/seq/seq_midi_event.c
@@ -41,33 +41,29 @@ MODULE_LICENSE("GPL");
 /* from 8 to 15 are events for 0xf0-0xf7 */
 
 
-/* status event types */
-typedef void (*event_encode_t)(snd_midi_event_t *dev, snd_seq_event_t *ev);
-typedef void (*event_decode_t)(snd_seq_event_t *ev, unsigned char *buf);
-
 /*
  * prototypes
  */
-static void note_event(snd_midi_event_t *dev, snd_seq_event_t *ev);
-static void one_param_ctrl_event(snd_midi_event_t *dev, snd_seq_event_t *ev);
-static void pitchbend_ctrl_event(snd_midi_event_t *dev, snd_seq_event_t *ev);
-static void two_param_ctrl_event(snd_midi_event_t *dev, snd_seq_event_t *ev);
-static void one_param_event(snd_midi_event_t *dev, snd_seq_event_t *ev);
-static void songpos_event(snd_midi_event_t *dev, snd_seq_event_t *ev);
-static void note_decode(snd_seq_event_t *ev, unsigned char *buf);
-static void one_param_decode(snd_seq_event_t *ev, unsigned char *buf);
-static void pitchbend_decode(snd_seq_event_t *ev, unsigned char *buf);
-static void two_param_decode(snd_seq_event_t *ev, unsigned char *buf);
-static void songpos_decode(snd_seq_event_t *ev, unsigned char *buf);
+static void note_event(struct snd_midi_event *dev, struct snd_seq_event *ev);
+static void one_param_ctrl_event(struct snd_midi_event *dev, struct snd_seq_event *ev);
+static void pitchbend_ctrl_event(struct snd_midi_event *dev, struct snd_seq_event *ev);
+static void two_param_ctrl_event(struct snd_midi_event *dev, struct snd_seq_event *ev);
+static void one_param_event(struct snd_midi_event *dev, struct snd_seq_event *ev);
+static void songpos_event(struct snd_midi_event *dev, struct snd_seq_event *ev);
+static void note_decode(struct snd_seq_event *ev, unsigned char *buf);
+static void one_param_decode(struct snd_seq_event *ev, unsigned char *buf);
+static void pitchbend_decode(struct snd_seq_event *ev, unsigned char *buf);
+static void two_param_decode(struct snd_seq_event *ev, unsigned char *buf);
+static void songpos_decode(struct snd_seq_event *ev, unsigned char *buf);
 
 /*
  * event list
  */
-static struct status_event_list_t {
+static struct status_event_list {
 	int event;
 	int qlen;
-	event_encode_t encode;
-	event_decode_t decode;
+	void (*encode)(struct snd_midi_event *dev, struct snd_seq_event *ev);
+	void (*decode)(struct snd_seq_event *ev, unsigned char *buf);
 } status_event[] = {
 	/* 0x80 - 0xf0 */
 	{SNDRV_SEQ_EVENT_NOTEOFF,	2, note_event, note_decode},
@@ -97,12 +93,15 @@ static struct status_event_list_t {
 	{SNDRV_SEQ_EVENT_RESET, 	0, NULL, NULL}, /* 0xff */
 };
 
-static int extra_decode_ctrl14(snd_midi_event_t *dev, unsigned char *buf, int len, snd_seq_event_t *ev);
-static int extra_decode_xrpn(snd_midi_event_t *dev, unsigned char *buf, int count, snd_seq_event_t *ev);
+static int extra_decode_ctrl14(struct snd_midi_event *dev, unsigned char *buf, int len,
+			       struct snd_seq_event *ev);
+static int extra_decode_xrpn(struct snd_midi_event *dev, unsigned char *buf, int count,
+			     struct snd_seq_event *ev);
 
-static struct extra_event_list_t {
+static struct extra_event_list {
 	int event;
-	int (*decode)(snd_midi_event_t *dev, unsigned char *buf, int len, snd_seq_event_t *ev);
+	int (*decode)(struct snd_midi_event *dev, unsigned char *buf, int len,
+		      struct snd_seq_event *ev);
 } extra_event[] = {
 	{SNDRV_SEQ_EVENT_CONTROL14, extra_decode_ctrl14},
 	{SNDRV_SEQ_EVENT_NONREGPARAM, extra_decode_xrpn},
@@ -113,9 +112,9 @@ static struct extra_event_list_t {
  *  new/delete record
  */
 
-int snd_midi_event_new(int bufsize, snd_midi_event_t **rdev)
+int snd_midi_event_new(int bufsize, struct snd_midi_event **rdev)
 {
-	snd_midi_event_t *dev;
+	struct snd_midi_event *dev;
 
 	*rdev = NULL;
 	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
@@ -135,7 +134,7 @@ int snd_midi_event_new(int bufsize, snd_midi_event_t **rdev)
 	return 0;
 }
 
-void snd_midi_event_free(snd_midi_event_t *dev)
+void snd_midi_event_free(struct snd_midi_event *dev)
 {
 	if (dev != NULL) {
 		kfree(dev->buf);
@@ -146,14 +145,14 @@ void snd_midi_event_free(snd_midi_event_t *dev)
 /*
  * initialize record
  */
-static inline void reset_encode(snd_midi_event_t *dev)
+static inline void reset_encode(struct snd_midi_event *dev)
 {
 	dev->read = 0;
 	dev->qlen = 0;
 	dev->type = 0;
 }
 
-void snd_midi_event_reset_encode(snd_midi_event_t *dev)
+void snd_midi_event_reset_encode(struct snd_midi_event *dev)
 {
 	unsigned long flags;
 
@@ -162,7 +161,7 @@ void snd_midi_event_reset_encode(snd_midi_event_t *dev)
 	spin_unlock_irqrestore(&dev->lock, flags);
 }
 
-void snd_midi_event_reset_decode(snd_midi_event_t *dev)
+void snd_midi_event_reset_decode(struct snd_midi_event *dev)
 {
 	unsigned long flags;
 
@@ -172,14 +171,14 @@ void snd_midi_event_reset_decode(snd_midi_event_t *dev)
 }
 
 #if 0
-void snd_midi_event_init(snd_midi_event_t *dev)
+void snd_midi_event_init(struct snd_midi_event *dev)
 {
 	snd_midi_event_reset_encode(dev);
 	snd_midi_event_reset_decode(dev);
 }
 #endif  /*  0  */
 
-void snd_midi_event_no_status(snd_midi_event_t *dev, int on)
+void snd_midi_event_no_status(struct snd_midi_event *dev, int on)
 {
 	dev->nostat = on ? 1 : 0;
 }
@@ -188,7 +187,7 @@ void snd_midi_event_no_status(snd_midi_event_t *dev, int on)
  * resize buffer
  */
 #if 0
-int snd_midi_event_resize_buffer(snd_midi_event_t *dev, int bufsize)
+int snd_midi_event_resize_buffer(struct snd_midi_event *dev, int bufsize)
 {
 	unsigned char *new_buf, *old_buf;
 	unsigned long flags;
@@ -213,7 +212,8 @@ int snd_midi_event_resize_buffer(snd_midi_event_t *dev, int bufsize)
  *  read bytes and encode to sequencer event if finished
  *  return the size of encoded bytes
  */
-long snd_midi_event_encode(snd_midi_event_t *dev, unsigned char *buf, long count, snd_seq_event_t *ev)
+long snd_midi_event_encode(struct snd_midi_event *dev, unsigned char *buf, long count,
+			   struct snd_seq_event *ev)
 {
 	long result = 0;
 	int rc;
@@ -238,7 +238,8 @@ long snd_midi_event_encode(snd_midi_event_t *dev, unsigned char *buf, long count
  *         0 data is not finished
  *         negative for error
  */
-int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev)
+int snd_midi_event_encode_byte(struct snd_midi_event *dev, int c,
+			       struct snd_seq_event *ev)
 {
 	int rc = 0;
 	unsigned long flags;
@@ -303,7 +304,7 @@ int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev
 }
 
 /* encode note event */
-static void note_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
+static void note_event(struct snd_midi_event *dev, struct snd_seq_event *ev)
 {
 	ev->data.note.channel = dev->buf[0] & 0x0f;
 	ev->data.note.note = dev->buf[1];
@@ -311,21 +312,21 @@ static void note_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
 }
 
 /* encode one parameter controls */
-static void one_param_ctrl_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
+static void one_param_ctrl_event(struct snd_midi_event *dev, struct snd_seq_event *ev)
 {
 	ev->data.control.channel = dev->buf[0] & 0x0f;
 	ev->data.control.value = dev->buf[1];
 }
 
 /* encode pitch wheel change */
-static void pitchbend_ctrl_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
+static void pitchbend_ctrl_event(struct snd_midi_event *dev, struct snd_seq_event *ev)
 {
 	ev->data.control.channel = dev->buf[0] & 0x0f;
 	ev->data.control.value = (int)dev->buf[2] * 128 + (int)dev->buf[1] - 8192;
 }
 
 /* encode midi control change */
-static void two_param_ctrl_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
+static void two_param_ctrl_event(struct snd_midi_event *dev, struct snd_seq_event *ev)
 {
 	ev->data.control.channel = dev->buf[0] & 0x0f;
 	ev->data.control.param = dev->buf[1];
@@ -333,13 +334,13 @@ static void two_param_ctrl_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
 }
 
 /* encode one parameter value*/
-static void one_param_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
+static void one_param_event(struct snd_midi_event *dev, struct snd_seq_event *ev)
 {
 	ev->data.control.value = dev->buf[1];
 }
 
 /* encode song position */
-static void songpos_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
+static void songpos_event(struct snd_midi_event *dev, struct snd_seq_event *ev)
 {
 	ev->data.control.value = (int)dev->buf[2] * 128 + (int)dev->buf[1];
 }
@@ -348,7 +349,8 @@ static void songpos_event(snd_midi_event_t *dev, snd_seq_event_t *ev)
  * decode from a sequencer event to midi bytes
  * return the size of decoded midi events
  */
-long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count, snd_seq_event_t *ev)
+long snd_midi_event_decode(struct snd_midi_event *dev, unsigned char *buf, long count,
+			   struct snd_seq_event *ev)
 {
 	unsigned int cmd, type;
 
@@ -404,20 +406,20 @@ long snd_midi_event_decode(snd_midi_event_t *dev, unsigned char *buf, long count
 
 
 /* decode note event */
-static void note_decode(snd_seq_event_t *ev, unsigned char *buf)
+static void note_decode(struct snd_seq_event *ev, unsigned char *buf)
 {
 	buf[0] = ev->data.note.note & 0x7f;
 	buf[1] = ev->data.note.velocity & 0x7f;
 }
 
 /* decode one parameter controls */
-static void one_param_decode(snd_seq_event_t *ev, unsigned char *buf)
+static void one_param_decode(struct snd_seq_event *ev, unsigned char *buf)
 {
 	buf[0] = ev->data.control.value & 0x7f;
 }
 
 /* decode pitch wheel change */
-static void pitchbend_decode(snd_seq_event_t *ev, unsigned char *buf)
+static void pitchbend_decode(struct snd_seq_event *ev, unsigned char *buf)
 {
 	int value = ev->data.control.value + 8192;
 	buf[0] = value & 0x7f;
@@ -425,21 +427,22 @@ static void pitchbend_decode(snd_seq_event_t *ev, unsigned char *buf)
 }
 
 /* decode midi control change */
-static void two_param_decode(snd_seq_event_t *ev, unsigned char *buf)
+static void two_param_decode(struct snd_seq_event *ev, unsigned char *buf)
 {
 	buf[0] = ev->data.control.param & 0x7f;
 	buf[1] = ev->data.control.value & 0x7f;
 }
 
 /* decode song position */
-static void songpos_decode(snd_seq_event_t *ev, unsigned char *buf)
+static void songpos_decode(struct snd_seq_event *ev, unsigned char *buf)
 {
 	buf[0] = ev->data.control.value & 0x7f;
 	buf[1] = (ev->data.control.value >> 7) & 0x7f;
 }
 
 /* decode 14bit control */
-static int extra_decode_ctrl14(snd_midi_event_t *dev, unsigned char *buf, int count, snd_seq_event_t *ev)
+static int extra_decode_ctrl14(struct snd_midi_event *dev, unsigned char *buf,
+			       int count, struct snd_seq_event *ev)
 {
 	unsigned char cmd;
 	int idx = 0;
@@ -476,7 +479,8 @@ static int extra_decode_ctrl14(snd_midi_event_t *dev, unsigned char *buf, int co
 }
 
 /* decode reg/nonreg param */
-static int extra_decode_xrpn(snd_midi_event_t *dev, unsigned char *buf, int count, snd_seq_event_t *ev)
+static int extra_decode_xrpn(struct snd_midi_event *dev, unsigned char *buf,
+			     int count, struct snd_seq_event *ev)
 {
 	unsigned char cmd;
 	char *cbytes;
diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c
index 57ec31df0d1..2b384fd7967 100644
--- a/sound/core/seq/seq_ports.c
+++ b/sound/core/seq/seq_ports.c
@@ -56,16 +56,17 @@ much elements are in array.
 */
 
 /* return pointer to port structure - port is locked if found */
-client_port_t *snd_seq_port_use_ptr(client_t *client, int num)
+struct snd_seq_client_port *snd_seq_port_use_ptr(struct snd_seq_client *client,
+						 int num)
 {
 	struct list_head *p;
-	client_port_t *port;
+	struct snd_seq_client_port *port;
 
 	if (client == NULL)
 		return NULL;
 	read_lock(&client->ports_lock);
 	list_for_each(p, &client->ports_list_head) {
-		port = list_entry(p, client_port_t, list);
+		port = list_entry(p, struct snd_seq_client_port, list);
 		if (port->addr.port == num) {
 			if (port->closing)
 				break; /* deleting now */
@@ -80,17 +81,18 @@ client_port_t *snd_seq_port_use_ptr(client_t *client, int num)
 
 
 /* search for the next port - port is locked if found */
-client_port_t *snd_seq_port_query_nearest(client_t *client, snd_seq_port_info_t *pinfo)
+struct snd_seq_client_port *snd_seq_port_query_nearest(struct snd_seq_client *client,
+						       struct snd_seq_port_info *pinfo)
 {
 	int num;
 	struct list_head *p;
-	client_port_t *port, *found;
+	struct snd_seq_client_port *port, *found;
 
 	num = pinfo->addr.port;
 	found = NULL;
 	read_lock(&client->ports_lock);
 	list_for_each(p, &client->ports_list_head) {
-		port = list_entry(p, client_port_t, list);
+		port = list_entry(p, struct snd_seq_client_port, list);
 		if (port->addr.port < num)
 			continue;
 		if (port->addr.port == num) {
@@ -111,8 +113,8 @@ client_port_t *snd_seq_port_query_nearest(client_t *client, snd_seq_port_info_t
 }
 
 
-/* initialize port_subs_info_t */
-static void port_subs_info_init(port_subs_info_t *grp)
+/* initialize snd_seq_port_subs_info */
+static void port_subs_info_init(struct snd_seq_port_subs_info *grp)
 {
 	INIT_LIST_HEAD(&grp->list_head);
 	grp->count = 0;
@@ -125,10 +127,11 @@ static void port_subs_info_init(port_subs_info_t *grp)
 
 
 /* create a port, port number is returned (-1 on failure) */
-client_port_t *snd_seq_create_port(client_t *client, int port)
+struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client,
+						int port)
 {
 	unsigned long flags;
-	client_port_t *new_port;
+	struct snd_seq_client_port *new_port;
 	struct list_head *l;
 	int num = -1;
 	
@@ -159,7 +162,7 @@ client_port_t *snd_seq_create_port(client_t *client, int port)
 	down(&client->ports_mutex);
 	write_lock_irqsave(&client->ports_lock, flags);
 	list_for_each(l, &client->ports_list_head) {
-		client_port_t *p = list_entry(l, client_port_t, list);
+		struct snd_seq_client_port *p = list_entry(l, struct snd_seq_client_port, list);
 		if (p->addr.port > num)
 			break;
 		if (port < 0) /* auto-probe mode */
@@ -177,17 +180,24 @@ client_port_t *snd_seq_create_port(client_t *client, int port)
 }
 
 /* */
-enum group_type_t {
+enum group_type {
 	SRC_LIST, DEST_LIST
 };
 
-static int subscribe_port(client_t *client, client_port_t *port, port_subs_info_t *grp, snd_seq_port_subscribe_t *info, int send_ack);
-static int unsubscribe_port(client_t *client, client_port_t *port, port_subs_info_t *grp, snd_seq_port_subscribe_t *info, int send_ack);
+static int subscribe_port(struct snd_seq_client *client,
+			  struct snd_seq_client_port *port,
+			  struct snd_seq_port_subs_info *grp,
+			  struct snd_seq_port_subscribe *info, int send_ack);
+static int unsubscribe_port(struct snd_seq_client *client,
+			    struct snd_seq_client_port *port,
+			    struct snd_seq_port_subs_info *grp,
+			    struct snd_seq_port_subscribe *info, int send_ack);
 
 
-static client_port_t *get_client_port(snd_seq_addr_t *addr, client_t **cp)
+static struct snd_seq_client_port *get_client_port(struct snd_seq_addr *addr,
+						   struct snd_seq_client **cp)
 {
-	client_port_t *p;
+	struct snd_seq_client_port *p;
 	*cp = snd_seq_client_use_ptr(addr->client);
 	if (*cp) {
 		p = snd_seq_port_use_ptr(*cp, addr->port);
@@ -204,22 +214,24 @@ static client_port_t *get_client_port(snd_seq_addr_t *addr, client_t **cp)
  * remove all subscribers on the list
  * this is called from port_delete, for each src and dest list.
  */
-static void clear_subscriber_list(client_t *client, client_port_t *port,
-				  port_subs_info_t *grp, int grptype)
+static void clear_subscriber_list(struct snd_seq_client *client,
+				  struct snd_seq_client_port *port,
+				  struct snd_seq_port_subs_info *grp,
+				  int grptype)
 {
 	struct list_head *p, *n;
 
 	down_write(&grp->list_mutex);
 	list_for_each_safe(p, n, &grp->list_head) {
-		subscribers_t *subs;
-		client_t *c;
-		client_port_t *aport;
+		struct snd_seq_subscribers *subs;
+		struct snd_seq_client *c;
+		struct snd_seq_client_port *aport;
 
 		if (grptype == SRC_LIST) {
-			subs = list_entry(p, subscribers_t, src_list);
+			subs = list_entry(p, struct snd_seq_subscribers, src_list);
 			aport = get_client_port(&subs->info.dest, &c);
 		} else {
-			subs = list_entry(p, subscribers_t, dest_list);
+			subs = list_entry(p, struct snd_seq_subscribers, dest_list);
 			aport = get_client_port(&subs->info.sender, &c);
 		}
 		list_del(p);
@@ -233,7 +245,7 @@ static void clear_subscriber_list(client_t *client, client_port_t *port,
 				kfree(subs);
 		} else {
 			/* ok we got the connected port */
-			port_subs_info_t *agrp;
+			struct snd_seq_port_subs_info *agrp;
 			agrp = (grptype == SRC_LIST) ? &aport->c_dest : &aport->c_src;
 			down_write(&agrp->list_mutex);
 			if (grptype == SRC_LIST)
@@ -251,7 +263,8 @@ static void clear_subscriber_list(client_t *client, client_port_t *port,
 }
 
 /* delete port data */
-static int port_delete(client_t *client, client_port_t *port)
+static int port_delete(struct snd_seq_client *client,
+		       struct snd_seq_client_port *port)
 {
 	/* set closing flag and wait for all port access are gone */
 	port->closing = 1;
@@ -273,16 +286,16 @@ static int port_delete(client_t *client, client_port_t *port)
 
 
 /* delete a port with the given port id */
-int snd_seq_delete_port(client_t *client, int port)
+int snd_seq_delete_port(struct snd_seq_client *client, int port)
 {
 	unsigned long flags;
 	struct list_head *l;
-	client_port_t *found = NULL;
+	struct snd_seq_client_port *found = NULL;
 
 	down(&client->ports_mutex);
 	write_lock_irqsave(&client->ports_lock, flags);
 	list_for_each(l, &client->ports_list_head) {
-		client_port_t *p = list_entry(l, client_port_t, list);
+		struct snd_seq_client_port *p = list_entry(l, struct snd_seq_client_port, list);
 		if (p->addr.port == port) {
 			/* ok found.  delete from the list at first */
 			list_del(l);
@@ -300,7 +313,7 @@ int snd_seq_delete_port(client_t *client, int port)
 }
 
 /* delete the all ports belonging to the given client */
-int snd_seq_delete_all_ports(client_t *client)
+int snd_seq_delete_all_ports(struct snd_seq_client *client)
 {
 	unsigned long flags;
 	struct list_head deleted_list, *p, *n;
@@ -323,7 +336,7 @@ int snd_seq_delete_all_ports(client_t *client)
 
 	/* remove each port in deleted_list */
 	list_for_each_safe(p, n, &deleted_list) {
-		client_port_t *port = list_entry(p, client_port_t, list);
+		struct snd_seq_client_port *port = list_entry(p, struct snd_seq_client_port, list);
 		list_del(p);
 		snd_seq_system_client_ev_port_exit(port->addr.client, port->addr.port);
 		port_delete(client, port);
@@ -333,7 +346,8 @@ int snd_seq_delete_all_ports(client_t *client)
 }
 
 /* set port info fields */
-int snd_seq_set_port_info(client_port_t * port, snd_seq_port_info_t * info)
+int snd_seq_set_port_info(struct snd_seq_client_port * port,
+			  struct snd_seq_port_info * info)
 {
 	snd_assert(port && info, return -EINVAL);
 
@@ -361,7 +375,8 @@ int snd_seq_set_port_info(client_port_t * port, snd_seq_port_info_t * info)
 }
 
 /* get port info fields */
-int snd_seq_get_port_info(client_port_t * port, snd_seq_port_info_t * info)
+int snd_seq_get_port_info(struct snd_seq_client_port * port,
+			  struct snd_seq_port_info * info)
 {
 	snd_assert(port && info, return -EINVAL);
 
@@ -410,8 +425,11 @@ int snd_seq_get_port_info(client_port_t * port, snd_seq_port_info_t * info)
  * at each connnection/disconnection. 
  */
 
-static int subscribe_port(client_t *client, client_port_t *port, port_subs_info_t *grp,
-			  snd_seq_port_subscribe_t *info, int send_ack)
+static int subscribe_port(struct snd_seq_client *client,
+			  struct snd_seq_client_port *port,
+			  struct snd_seq_port_subs_info *grp,
+			  struct snd_seq_port_subscribe *info,
+			  int send_ack)
 {
 	int err = 0;
 
@@ -432,9 +450,11 @@ static int subscribe_port(client_t *client, client_port_t *port, port_subs_info_
 	return err;
 }
 
-static int unsubscribe_port(client_t *client, client_port_t *port,
-			    port_subs_info_t *grp,
-			    snd_seq_port_subscribe_t *info, int send_ack)
+static int unsubscribe_port(struct snd_seq_client *client,
+			    struct snd_seq_client_port *port,
+			    struct snd_seq_port_subs_info *grp,
+			    struct snd_seq_port_subscribe *info,
+			    int send_ack)
 {
 	int err = 0;
 
@@ -453,15 +473,15 @@ static int unsubscribe_port(client_t *client, client_port_t *port,
 
 
 /* check if both addresses are identical */
-static inline int addr_match(snd_seq_addr_t *r, snd_seq_addr_t *s)
+static inline int addr_match(struct snd_seq_addr *r, struct snd_seq_addr *s)
 {
 	return (r->client == s->client) && (r->port == s->port);
 }
 
 /* check the two subscribe info match */
 /* if flags is zero, checks only sender and destination addresses */
-static int match_subs_info(snd_seq_port_subscribe_t *r,
-			   snd_seq_port_subscribe_t *s)
+static int match_subs_info(struct snd_seq_port_subscribe *r,
+			   struct snd_seq_port_subscribe *s)
 {
 	if (addr_match(&r->sender, &s->sender) &&
 	    addr_match(&r->dest, &s->dest)) {
@@ -475,14 +495,16 @@ static int match_subs_info(snd_seq_port_subscribe_t *r,
 
 
 /* connect two ports */
-int snd_seq_port_connect(client_t *connector,
-			 client_t *src_client, client_port_t *src_port,
-			 client_t *dest_client, client_port_t *dest_port,
-			 snd_seq_port_subscribe_t *info)
+int snd_seq_port_connect(struct snd_seq_client *connector,
+			 struct snd_seq_client *src_client,
+			 struct snd_seq_client_port *src_port,
+			 struct snd_seq_client *dest_client,
+			 struct snd_seq_client_port *dest_port,
+			 struct snd_seq_port_subscribe *info)
 {
-	port_subs_info_t *src = &src_port->c_src;
-	port_subs_info_t *dest = &dest_port->c_dest;
-	subscribers_t *subs;
+	struct snd_seq_port_subs_info *src = &src_port->c_src;
+	struct snd_seq_port_subs_info *dest = &dest_port->c_dest;
+	struct snd_seq_subscribers *subs;
 	struct list_head *p;
 	int err, src_called = 0;
 	unsigned long flags;
@@ -508,12 +530,12 @@ int snd_seq_port_connect(client_t *connector,
 			goto __error;
 		/* check whether already exists */
 		list_for_each(p, &src->list_head) {
-			subscribers_t *s = list_entry(p, subscribers_t, src_list);
+			struct snd_seq_subscribers *s = list_entry(p, struct snd_seq_subscribers, src_list);
 			if (match_subs_info(info, &s->info))
 				goto __error;
 		}
 		list_for_each(p, &dest->list_head) {
-			subscribers_t *s = list_entry(p, subscribers_t, dest_list);
+			struct snd_seq_subscribers *s = list_entry(p, struct snd_seq_subscribers, dest_list);
 			if (match_subs_info(info, &s->info))
 				goto __error;
 		}
@@ -554,14 +576,16 @@ int snd_seq_port_connect(client_t *connector,
 
 
 /* remove the connection */
-int snd_seq_port_disconnect(client_t *connector,
-			    client_t *src_client, client_port_t *src_port,
-			    client_t *dest_client, client_port_t *dest_port,
-			    snd_seq_port_subscribe_t *info)
+int snd_seq_port_disconnect(struct snd_seq_client *connector,
+			    struct snd_seq_client *src_client,
+			    struct snd_seq_client_port *src_port,
+			    struct snd_seq_client *dest_client,
+			    struct snd_seq_client_port *dest_port,
+			    struct snd_seq_port_subscribe *info)
 {
-	port_subs_info_t *src = &src_port->c_src;
-	port_subs_info_t *dest = &dest_port->c_dest;
-	subscribers_t *subs;
+	struct snd_seq_port_subs_info *src = &src_port->c_src;
+	struct snd_seq_port_subs_info *dest = &dest_port->c_dest;
+	struct snd_seq_subscribers *subs;
 	struct list_head *p;
 	int err = -ENOENT;
 	unsigned long flags;
@@ -571,7 +595,7 @@ int snd_seq_port_disconnect(client_t *connector,
 
 	/* look for the connection */
 	list_for_each(p, &src->list_head) {
-		subs = list_entry(p, subscribers_t, src_list);
+		subs = list_entry(p, struct snd_seq_subscribers, src_list);
 		if (match_subs_info(info, &subs->info)) {
 			write_lock_irqsave(&src->list_lock, flags);
 			// write_lock(&dest->list_lock);  // no lock yet
@@ -597,15 +621,15 @@ int snd_seq_port_disconnect(client_t *connector,
 
 
 /* get matched subscriber */
-subscribers_t *snd_seq_port_get_subscription(port_subs_info_t *src_grp,
-					     snd_seq_addr_t *dest_addr)
+struct snd_seq_subscribers *snd_seq_port_get_subscription(struct snd_seq_port_subs_info *src_grp,
+							  struct snd_seq_addr *dest_addr)
 {
 	struct list_head *p;
-	subscribers_t *s, *found = NULL;
+	struct snd_seq_subscribers *s, *found = NULL;
 
 	down_read(&src_grp->list_mutex);
 	list_for_each(p, &src_grp->list_head) {
-		s = list_entry(p, subscribers_t, src_list);
+		s = list_entry(p, struct snd_seq_subscribers, src_list);
 		if (addr_match(dest_addr, &s->info.dest)) {
 			found = s;
 			break;
@@ -623,11 +647,11 @@ subscribers_t *snd_seq_port_get_subscription(port_subs_info_t *src_grp,
  */
 /* exported */
 int snd_seq_event_port_attach(int client,
-			      snd_seq_port_callback_t *pcbp,
+			      struct snd_seq_port_callback *pcbp,
 			      int cap, int type, int midi_channels,
 			      int midi_voices, char *portname)
 {
-	snd_seq_port_info_t portinfo;
+	struct snd_seq_port_info portinfo;
 	int  ret;
 
 	/* Set up the port */
@@ -660,7 +684,7 @@ int snd_seq_event_port_attach(int client,
 /* exported */
 int snd_seq_event_port_detach(int client, int port)
 {
-	snd_seq_port_info_t portinfo;
+	struct snd_seq_port_info portinfo;
 	int  err;
 
 	memset(&portinfo, 0, sizeof(portinfo));
diff --git a/sound/core/seq/seq_ports.h b/sound/core/seq/seq_ports.h
index 89fd4416f6f..9d7117118ba 100644
--- a/sound/core/seq/seq_ports.h
+++ b/sound/core/seq/seq_ports.h
@@ -40,37 +40,38 @@
  
 */
 
-typedef struct subscribers_t {
-	snd_seq_port_subscribe_t info;	/* additional info */
+struct snd_seq_subscribers {
+	struct snd_seq_port_subscribe info;	/* additional info */
 	struct list_head src_list;	/* link of sources */
 	struct list_head dest_list;	/* link of destinations */
 	atomic_t ref_count;
-} subscribers_t;
+};
 
-typedef struct port_subs_info_t {
+struct snd_seq_port_subs_info {
 	struct list_head list_head;	/* list of subscribed ports */
 	unsigned int count;		/* count of subscribers */
 	unsigned int exclusive: 1;	/* exclusive mode */
 	struct rw_semaphore list_mutex;
 	rwlock_t list_lock;
-	snd_seq_kernel_port_open_t *open;
-	snd_seq_kernel_port_close_t *close;
-} port_subs_info_t;
+	int (*open)(void *private_data, struct snd_seq_port_subscribe *info);
+	int (*close)(void *private_data, struct snd_seq_port_subscribe *info);
+};
 
-typedef struct client_port_t {
+struct snd_seq_client_port {
 
-	snd_seq_addr_t addr;		/* client/port number */
+	struct snd_seq_addr addr;	/* client/port number */
 	struct module *owner;		/* owner of this port */
 	char name[64];			/* port name */	
 	struct list_head list;		/* port list */
 	snd_use_lock_t use_lock;
 
 	/* subscribers */
-	port_subs_info_t c_src;		/* read (sender) list */
-	port_subs_info_t c_dest;	/* write (dest) list */
+	struct snd_seq_port_subs_info c_src;	/* read (sender) list */
+	struct snd_seq_port_subs_info c_dest;	/* write (dest) list */
 
-	snd_seq_kernel_port_input_t *event_input;
-	snd_seq_kernel_port_private_free_t *private_free;
+	int (*event_input)(struct snd_seq_event *ev, int direct, void *private_data,
+			   int atomic, int hop);
+	void (*private_free)(void *private_data);
 	void *private_data;
 	unsigned int callback_all : 1;
 	unsigned int closing : 1;
@@ -87,42 +88,55 @@ typedef struct client_port_t {
 	int midi_voices;
 	int synth_voices;
 		
-} client_port_t;
+};
+
+struct snd_seq_client;
 
 /* return pointer to port structure and lock port */
-client_port_t *snd_seq_port_use_ptr(client_t *client, int num);
+struct snd_seq_client_port *snd_seq_port_use_ptr(struct snd_seq_client *client, int num);
 
 /* search for next port - port is locked if found */
-client_port_t *snd_seq_port_query_nearest(client_t *client, snd_seq_port_info_t *pinfo);
+struct snd_seq_client_port *snd_seq_port_query_nearest(struct snd_seq_client *client,
+						       struct snd_seq_port_info *pinfo);
 
 /* unlock the port */
 #define snd_seq_port_unlock(port) snd_use_lock_free(&(port)->use_lock)
 
 /* create a port, port number is returned (-1 on failure) */
-client_port_t *snd_seq_create_port(client_t *client, int port_index);
+struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client, int port_index);
 
 /* delete a port */
-int snd_seq_delete_port(client_t *client, int port);
+int snd_seq_delete_port(struct snd_seq_client *client, int port);
 
 /* delete all ports */
-int snd_seq_delete_all_ports(client_t *client);
+int snd_seq_delete_all_ports(struct snd_seq_client *client);
 
 /* set port info fields */
-int snd_seq_set_port_info(client_port_t *port, snd_seq_port_info_t *info);
+int snd_seq_set_port_info(struct snd_seq_client_port *port,
+			  struct snd_seq_port_info *info);
 
 /* get port info fields */
-int snd_seq_get_port_info(client_port_t *port, snd_seq_port_info_t *info);
+int snd_seq_get_port_info(struct snd_seq_client_port *port,
+			  struct snd_seq_port_info *info);
 
 /* add subscriber to subscription list */
-int snd_seq_port_connect(client_t *caller, client_t *s, client_port_t *sp, client_t *d, client_port_t *dp, snd_seq_port_subscribe_t *info);
+int snd_seq_port_connect(struct snd_seq_client *caller,
+			 struct snd_seq_client *s, struct snd_seq_client_port *sp,
+			 struct snd_seq_client *d, struct snd_seq_client_port *dp,
+			 struct snd_seq_port_subscribe *info);
 
 /* remove subscriber from subscription list */ 
-int snd_seq_port_disconnect(client_t *caller, client_t *s, client_port_t *sp, client_t *d, client_port_t *dp, snd_seq_port_subscribe_t *info);
+int snd_seq_port_disconnect(struct snd_seq_client *caller,
+			    struct snd_seq_client *s, struct snd_seq_client_port *sp,
+			    struct snd_seq_client *d, struct snd_seq_client_port *dp,
+			    struct snd_seq_port_subscribe *info);
 
 /* subscribe port */
-int snd_seq_port_subscribe(client_port_t *port, snd_seq_port_subscribe_t *info);
+int snd_seq_port_subscribe(struct snd_seq_client_port *port,
+			   struct snd_seq_port_subscribe *info);
 
 /* get matched subscriber */
-subscribers_t *snd_seq_port_get_subscription(port_subs_info_t *src_grp, snd_seq_addr_t *dest_addr);
+struct snd_seq_subscribers *snd_seq_port_get_subscription(struct snd_seq_port_subs_info *src_grp,
+							  struct snd_seq_addr *dest_addr);
 
 #endif
diff --git a/sound/core/seq/seq_prioq.c b/sound/core/seq/seq_prioq.c
index cd641bca994..074418617ee 100644
--- a/sound/core/seq/seq_prioq.c
+++ b/sound/core/seq/seq_prioq.c
@@ -55,9 +55,9 @@
 
 
 /* create new prioq (constructor) */
-prioq_t *snd_seq_prioq_new(void)
+struct snd_seq_prioq *snd_seq_prioq_new(void)
 {
-	prioq_t *f;
+	struct snd_seq_prioq *f;
 
 	f = kzalloc(sizeof(*f), GFP_KERNEL);
 	if (f == NULL) {
@@ -74,9 +74,9 @@ prioq_t *snd_seq_prioq_new(void)
 }
 
 /* delete prioq (destructor) */
-void snd_seq_prioq_delete(prioq_t **fifo)
+void snd_seq_prioq_delete(struct snd_seq_prioq **fifo)
 {
-	prioq_t *f = *fifo;
+	struct snd_seq_prioq *f = *fifo;
 	*fifo = NULL;
 
 	if (f == NULL) {
@@ -101,7 +101,8 @@ void snd_seq_prioq_delete(prioq_t **fifo)
 
 /* compare timestamp between events */
 /* return 1 if a >= b; 0 */
-static inline int compare_timestamp(snd_seq_event_t * a, snd_seq_event_t * b)
+static inline int compare_timestamp(struct snd_seq_event *a,
+				    struct snd_seq_event *b)
 {
 	if ((a->flags & SNDRV_SEQ_TIME_STAMP_MASK) == SNDRV_SEQ_TIME_STAMP_TICK) {
 		/* compare ticks */
@@ -117,7 +118,8 @@ static inline int compare_timestamp(snd_seq_event_t * a, snd_seq_event_t * b)
  *        zero     if a = b;
  *        positive if a > b;
  */
-static inline int compare_timestamp_rel(snd_seq_event_t *a, snd_seq_event_t *b)
+static inline int compare_timestamp_rel(struct snd_seq_event *a,
+					struct snd_seq_event *b)
 {
 	if ((a->flags & SNDRV_SEQ_TIME_STAMP_MASK) == SNDRV_SEQ_TIME_STAMP_TICK) {
 		/* compare ticks */
@@ -144,9 +146,10 @@ static inline int compare_timestamp_rel(snd_seq_event_t *a, snd_seq_event_t *b)
 }
 
 /* enqueue cell to prioq */
-int snd_seq_prioq_cell_in(prioq_t * f, snd_seq_event_cell_t * cell)
+int snd_seq_prioq_cell_in(struct snd_seq_prioq * f,
+			  struct snd_seq_event_cell * cell)
 {
-	snd_seq_event_cell_t *cur, *prev;
+	struct snd_seq_event_cell *cur, *prev;
 	unsigned long flags;
 	int count;
 	int prior;
@@ -215,9 +218,9 @@ int snd_seq_prioq_cell_in(prioq_t * f, snd_seq_event_cell_t * cell)
 }
 
 /* dequeue cell from prioq */
-snd_seq_event_cell_t *snd_seq_prioq_cell_out(prioq_t * f)
+struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f)
 {
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 	unsigned long flags;
 
 	if (f == NULL) {
@@ -243,7 +246,7 @@ snd_seq_event_cell_t *snd_seq_prioq_cell_out(prioq_t * f)
 }
 
 /* return number of events available in prioq */
-int snd_seq_prioq_avail(prioq_t * f)
+int snd_seq_prioq_avail(struct snd_seq_prioq * f)
 {
 	if (f == NULL) {
 		snd_printd("oops: snd_seq_prioq_cell_in() called with NULL prioq\n");
@@ -254,7 +257,7 @@ int snd_seq_prioq_avail(prioq_t * f)
 
 
 /* peek at cell at the head of the prioq */
-snd_seq_event_cell_t *snd_seq_prioq_cell_peek(prioq_t * f)
+struct snd_seq_event_cell *snd_seq_prioq_cell_peek(struct snd_seq_prioq * f)
 {
 	if (f == NULL) {
 		snd_printd("oops: snd_seq_prioq_cell_in() called with NULL prioq\n");
@@ -264,7 +267,8 @@ snd_seq_event_cell_t *snd_seq_prioq_cell_peek(prioq_t * f)
 }
 
 
-static inline int prioq_match(snd_seq_event_cell_t *cell, int client, int timestamp)
+static inline int prioq_match(struct snd_seq_event_cell *cell,
+			      int client, int timestamp)
 {
 	if (cell->event.source.client == client ||
 	    cell->event.dest.client == client)
@@ -286,12 +290,12 @@ static inline int prioq_match(snd_seq_event_cell_t *cell, int client, int timest
 }
 
 /* remove cells for left client */
-void snd_seq_prioq_leave(prioq_t * f, int client, int timestamp)
+void snd_seq_prioq_leave(struct snd_seq_prioq * f, int client, int timestamp)
 {
-	register snd_seq_event_cell_t *cell, *next;
+	register struct snd_seq_event_cell *cell, *next;
 	unsigned long flags;
-	snd_seq_event_cell_t *prev = NULL;
-	snd_seq_event_cell_t *freefirst = NULL, *freeprev = NULL, *freenext;
+	struct snd_seq_event_cell *prev = NULL;
+	struct snd_seq_event_cell *freefirst = NULL, *freeprev = NULL, *freenext;
 
 	/* collect all removed cells */
 	spin_lock_irqsave(&f->lock, flags);
@@ -338,8 +342,8 @@ void snd_seq_prioq_leave(prioq_t * f, int client, int timestamp)
 	}
 }
 
-static int prioq_remove_match(snd_seq_remove_events_t *info,
-	snd_seq_event_t *ev)
+static int prioq_remove_match(struct snd_seq_remove_events *info,
+			      struct snd_seq_event *ev)
 {
 	int res;
 
@@ -394,13 +398,13 @@ static int prioq_remove_match(snd_seq_remove_events_t *info,
 }
 
 /* remove cells matching remove criteria */
-void snd_seq_prioq_remove_events(prioq_t * f, int client,
-	snd_seq_remove_events_t *info)
+void snd_seq_prioq_remove_events(struct snd_seq_prioq * f, int client,
+				 struct snd_seq_remove_events *info)
 {
-	register snd_seq_event_cell_t *cell, *next;
+	struct snd_seq_event_cell *cell, *next;
 	unsigned long flags;
-	snd_seq_event_cell_t *prev = NULL;
-	snd_seq_event_cell_t *freefirst = NULL, *freeprev = NULL, *freenext;
+	struct snd_seq_event_cell *prev = NULL;
+	struct snd_seq_event_cell *freefirst = NULL, *freeprev = NULL, *freenext;
 
 	/* collect all removed cells */
 	spin_lock_irqsave(&f->lock, flags);
diff --git a/sound/core/seq/seq_prioq.h b/sound/core/seq/seq_prioq.h
index f12af79308b..d38bb78d934 100644
--- a/sound/core/seq/seq_prioq.h
+++ b/sound/core/seq/seq_prioq.h
@@ -26,37 +26,37 @@
 
 /* === PRIOQ === */
 
-typedef struct {
-	snd_seq_event_cell_t* head;      /* pointer to head of prioq */
-	snd_seq_event_cell_t* tail;      /* pointer to tail of prioq */
+struct snd_seq_prioq {
+	struct snd_seq_event_cell *head;      /* pointer to head of prioq */
+	struct snd_seq_event_cell *tail;      /* pointer to tail of prioq */
 	int cells;
 	spinlock_t lock;
-} prioq_t;
+};
 
 
 /* create new prioq (constructor) */
-extern prioq_t *snd_seq_prioq_new(void);
+struct snd_seq_prioq *snd_seq_prioq_new(void);
 
 /* delete prioq (destructor) */
-extern void snd_seq_prioq_delete(prioq_t **fifo);
+void snd_seq_prioq_delete(struct snd_seq_prioq **fifo);
 
 /* enqueue cell to prioq */
-extern int snd_seq_prioq_cell_in(prioq_t *f, snd_seq_event_cell_t *cell);
+int snd_seq_prioq_cell_in(struct snd_seq_prioq *f, struct snd_seq_event_cell *cell);
 
 /* dequeue cell from prioq */ 
-extern snd_seq_event_cell_t *snd_seq_prioq_cell_out(prioq_t *f);
+struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f);
 
 /* return number of events available in prioq */
-extern int snd_seq_prioq_avail(prioq_t *f);
+int snd_seq_prioq_avail(struct snd_seq_prioq *f);
 
 /* peek at cell at the head of the prioq */
-extern snd_seq_event_cell_t *snd_seq_prioq_cell_peek(prioq_t *f);
+struct snd_seq_event_cell *snd_seq_prioq_cell_peek(struct snd_seq_prioq *f);
 
 /* client left queue */
-extern void snd_seq_prioq_leave(prioq_t *f, int client, int timestamp);        
+void snd_seq_prioq_leave(struct snd_seq_prioq *f, int client, int timestamp);        
 
 /* Remove events */
-void snd_seq_prioq_remove_events(prioq_t * f, int client,
-	snd_seq_remove_events_t *info);
+void snd_seq_prioq_remove_events(struct snd_seq_prioq *f, int client,
+				 struct snd_seq_remove_events *info);
 
 #endif
diff --git a/sound/core/seq/seq_queue.c b/sound/core/seq/seq_queue.c
index 5f5c3cb37cb..b537a71e1e1 100644
--- a/sound/core/seq/seq_queue.c
+++ b/sound/core/seq/seq_queue.c
@@ -29,7 +29,7 @@
  *  Aug. 30, 2000	Takashi Iwai
  *     - Queues are managed in static array again, but with better way.
  *       The API itself is identical.
- *     - The queue is locked when queue_t pinter is returned via
+ *     - The queue is locked when struct snd_seq_queue pointer is returned via
  *       queueptr().  This pointer *MUST* be released afterward by
  *       queuefree(ptr).
  *     - Addition of experimental sync support.
@@ -48,7 +48,7 @@
 #include "seq_info.h"
 
 /* list of allocated queues */
-static queue_t *queue_list[SNDRV_SEQ_MAX_QUEUES];
+static struct snd_seq_queue *queue_list[SNDRV_SEQ_MAX_QUEUES];
 static DEFINE_SPINLOCK(queue_list_lock);
 /* number of queues allocated */
 static int num_queues;
@@ -61,7 +61,7 @@ int snd_seq_queue_get_cur_queues(void)
 /*----------------------------------------------------------------*/
 
 /* assign queue id and insert to list */
-static int queue_list_add(queue_t *q)
+static int queue_list_add(struct snd_seq_queue *q)
 {
 	int i;
 	unsigned long flags;
@@ -80,9 +80,9 @@ static int queue_list_add(queue_t *q)
 	return -1;
 }
 
-static queue_t *queue_list_remove(int id, int client)
+static struct snd_seq_queue *queue_list_remove(int id, int client)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 	unsigned long flags;
 
 	spin_lock_irqsave(&queue_list_lock, flags);
@@ -107,9 +107,9 @@ static queue_t *queue_list_remove(int id, int client)
 /*----------------------------------------------------------------*/
 
 /* create new queue (constructor) */
-static queue_t *queue_new(int owner, int locked)
+static struct snd_seq_queue *queue_new(int owner, int locked)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	q = kzalloc(sizeof(*q), GFP_KERNEL);
 	if (q == NULL) {
@@ -142,7 +142,7 @@ static queue_t *queue_new(int owner, int locked)
 }
 
 /* delete queue (destructor) */
-static void queue_delete(queue_t *q)
+static void queue_delete(struct snd_seq_queue *q)
 {
 	/* stop and release the timer */
 	snd_seq_timer_stop(q->timer);
@@ -187,7 +187,7 @@ void __exit snd_seq_queues_delete(void)
  */
 int snd_seq_queue_alloc(int client, int locked, unsigned int info_flags)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	q = queue_new(client, locked);
 	if (q == NULL)
@@ -204,7 +204,7 @@ int snd_seq_queue_alloc(int client, int locked, unsigned int info_flags)
 /* delete a queue - queue must be owned by the client */
 int snd_seq_queue_delete(int client, int queueid)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	if (queueid < 0 || queueid >= SNDRV_SEQ_MAX_QUEUES)
 		return -EINVAL;
@@ -218,9 +218,9 @@ int snd_seq_queue_delete(int client, int queueid)
 
 
 /* return pointer to queue structure for specified id */
-queue_t *queueptr(int queueid)
+struct snd_seq_queue *queueptr(int queueid)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 	unsigned long flags;
 
 	if (queueid < 0 || queueid >= SNDRV_SEQ_MAX_QUEUES)
@@ -234,10 +234,10 @@ queue_t *queueptr(int queueid)
 }
 
 /* return the (first) queue matching with the specified name */
-queue_t *snd_seq_queue_find_name(char *name)
+struct snd_seq_queue *snd_seq_queue_find_name(char *name)
 {
 	int i;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
 		if ((q = queueptr(i)) != NULL) {
@@ -252,10 +252,10 @@ queue_t *snd_seq_queue_find_name(char *name)
 
 /* -------------------------------------------------------- */
 
-void snd_seq_check_queue(queue_t *q, int atomic, int hop)
+void snd_seq_check_queue(struct snd_seq_queue *q, int atomic, int hop)
 {
 	unsigned long flags;
-	snd_seq_event_cell_t *cell;
+	struct snd_seq_event_cell *cell;
 
 	if (q == NULL)
 		return;
@@ -273,7 +273,8 @@ void snd_seq_check_queue(queue_t *q, int atomic, int hop)
       __again:
 	/* Process tick queue... */
 	while ((cell = snd_seq_prioq_cell_peek(q->tickq)) != NULL) {
-		if (snd_seq_compare_tick_time(&q->timer->tick.cur_tick, &cell->event.time.tick)) {
+		if (snd_seq_compare_tick_time(&q->timer->tick.cur_tick,
+					      &cell->event.time.tick)) {
 			cell = snd_seq_prioq_cell_out(q->tickq);
 			if (cell)
 				snd_seq_dispatch_event(cell, atomic, hop);
@@ -286,7 +287,8 @@ void snd_seq_check_queue(queue_t *q, int atomic, int hop)
 
 	/* Process time queue... */
 	while ((cell = snd_seq_prioq_cell_peek(q->timeq)) != NULL) {
-		if (snd_seq_compare_real_time(&q->timer->cur_time, &cell->event.time.time)) {
+		if (snd_seq_compare_real_time(&q->timer->cur_time,
+					      &cell->event.time.time)) {
 			cell = snd_seq_prioq_cell_out(q->timeq);
 			if (cell)
 				snd_seq_dispatch_event(cell, atomic, hop);
@@ -309,10 +311,10 @@ void snd_seq_check_queue(queue_t *q, int atomic, int hop)
 
 
 /* enqueue a event to singe queue */
-int snd_seq_enqueue_event(snd_seq_event_cell_t *cell, int atomic, int hop)
+int snd_seq_enqueue_event(struct snd_seq_event_cell *cell, int atomic, int hop)
 {
 	int dest, err;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	snd_assert(cell != NULL, return -EINVAL);
 	dest = cell->event.queue;	/* destination queue */
@@ -327,7 +329,8 @@ int snd_seq_enqueue_event(snd_seq_event_cell_t *cell, int atomic, int hop)
 			break;
 
 		case SNDRV_SEQ_TIME_STAMP_REAL:
-			snd_seq_inc_real_time(&cell->event.time.time, &q->timer->cur_time);
+			snd_seq_inc_real_time(&cell->event.time.time,
+					      &q->timer->cur_time);
 			break;
 		}
 		cell->event.flags &= ~SNDRV_SEQ_TIME_MODE_MASK;
@@ -361,7 +364,7 @@ int snd_seq_enqueue_event(snd_seq_event_cell_t *cell, int atomic, int hop)
 
 /*----------------------------------------------------------------*/
 
-static inline int check_access(queue_t *q, int client)
+static inline int check_access(struct snd_seq_queue *q, int client)
 {
 	return (q->owner == client) || (!q->locked && !q->klocked);
 }
@@ -369,7 +372,7 @@ static inline int check_access(queue_t *q, int client)
 /* check if the client has permission to modify queue parameters.
  * if it does, lock the queue
  */
-static int queue_access_lock(queue_t *q, int client)
+static int queue_access_lock(struct snd_seq_queue *q, int client)
 {
 	unsigned long flags;
 	int access_ok;
@@ -383,7 +386,7 @@ static int queue_access_lock(queue_t *q, int client)
 }
 
 /* unlock the queue */
-static inline void queue_access_unlock(queue_t *q)
+static inline void queue_access_unlock(struct snd_seq_queue *q)
 {
 	unsigned long flags;
 
@@ -395,7 +398,7 @@ static inline void queue_access_unlock(queue_t *q)
 /* exported - only checking permission */
 int snd_seq_queue_check_access(int queueid, int client)
 {
-	queue_t *q = queueptr(queueid);
+	struct snd_seq_queue *q = queueptr(queueid);
 	int access_ok;
 	unsigned long flags;
 
@@ -415,7 +418,7 @@ int snd_seq_queue_check_access(int queueid, int client)
  */
 int snd_seq_queue_set_owner(int queueid, int client, int locked)
 {
-	queue_t *q = queueptr(queueid);
+	struct snd_seq_queue *q = queueptr(queueid);
 
 	if (q == NULL)
 		return -EINVAL;
@@ -443,8 +446,8 @@ int snd_seq_queue_set_owner(int queueid, int client, int locked)
 int snd_seq_queue_timer_open(int queueid)
 {
 	int result = 0;
-	queue_t *queue;
-	seq_timer_t *tmr;
+	struct snd_seq_queue *queue;
+	struct snd_seq_timer *tmr;
 
 	queue = queueptr(queueid);
 	if (queue == NULL)
@@ -463,8 +466,8 @@ int snd_seq_queue_timer_open(int queueid)
  */
 int snd_seq_queue_timer_close(int queueid)
 {
-	queue_t *queue;
-	seq_timer_t *tmr;
+	struct snd_seq_queue *queue;
+	struct snd_seq_timer *tmr;
 	int result = 0;
 
 	queue = queueptr(queueid);
@@ -477,9 +480,10 @@ int snd_seq_queue_timer_close(int queueid)
 }
 
 /* change queue tempo and ppq */
-int snd_seq_queue_timer_set_tempo(int queueid, int client, snd_seq_queue_tempo_t *info)
+int snd_seq_queue_timer_set_tempo(int queueid, int client,
+				  struct snd_seq_queue_tempo *info)
 {
-	queue_t *q = queueptr(queueid);
+	struct snd_seq_queue *q = queueptr(queueid);
 	int result;
 
 	if (q == NULL)
@@ -493,7 +497,8 @@ int snd_seq_queue_timer_set_tempo(int queueid, int client, snd_seq_queue_tempo_t
 	if (result >= 0)
 		result = snd_seq_timer_set_ppq(q->timer, info->ppq);
 	if (result >= 0 && info->skew_base > 0)
-		result = snd_seq_timer_set_skew(q->timer, info->skew_value, info->skew_base);
+		result = snd_seq_timer_set_skew(q->timer, info->skew_value,
+						info->skew_base);
 	queue_access_unlock(q);
 	queuefree(q);
 	return result;
@@ -506,7 +511,7 @@ int snd_seq_queue_timer_set_tempo(int queueid, int client, snd_seq_queue_tempo_t
  */
 int snd_seq_queue_use(int queueid, int client, int use)
 {
-	queue_t *queue;
+	struct snd_seq_queue *queue;
 
 	queue = queueptr(queueid);
 	if (queue == NULL)
@@ -538,7 +543,7 @@ int snd_seq_queue_use(int queueid, int client, int use)
  */
 int snd_seq_queue_is_used(int queueid, int client)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 	int result;
 
 	q = queueptr(queueid);
@@ -559,7 +564,7 @@ void snd_seq_queue_client_termination(int client)
 {
 	unsigned long flags;
 	int i;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
 		if ((q = queueptr(i)) == NULL)
@@ -584,7 +589,7 @@ void snd_seq_queue_client_termination(int client)
 void snd_seq_queue_client_leave(int client)
 {
 	int i;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	/* delete own queues from queue list */
 	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
@@ -615,7 +620,7 @@ void snd_seq_queue_client_leave(int client)
 void snd_seq_queue_client_leave_cells(int client)
 {
 	int i;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
 		if ((q = queueptr(i)) == NULL)
@@ -627,10 +632,10 @@ void snd_seq_queue_client_leave_cells(int client)
 }
 
 /* remove cells based on flush criteria */
-void snd_seq_queue_remove_cells(int client, snd_seq_remove_events_t *info)
+void snd_seq_queue_remove_cells(int client, struct snd_seq_remove_events *info)
 {
 	int i;
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
 		if ((q = queueptr(i)) == NULL)
@@ -650,9 +655,10 @@ void snd_seq_queue_remove_cells(int client, snd_seq_remove_events_t *info)
 /*
  * send events to all subscribed ports
  */
-static void queue_broadcast_event(queue_t *q, snd_seq_event_t *ev, int atomic, int hop)
+static void queue_broadcast_event(struct snd_seq_queue *q, struct snd_seq_event *ev,
+				  int atomic, int hop)
 {
-	snd_seq_event_t sev;
+	struct snd_seq_event sev;
 
 	sev = *ev;
 	
@@ -672,7 +678,8 @@ static void queue_broadcast_event(queue_t *q, snd_seq_event_t *ev, int atomic, i
  * process a received queue-control event.
  * this function is exported for seq_sync.c.
  */
-static void snd_seq_queue_process_event(queue_t *q, snd_seq_event_t *ev,
+static void snd_seq_queue_process_event(struct snd_seq_queue *q,
+					struct snd_seq_event *ev,
 					int atomic, int hop)
 {
 	switch (ev->type) {
@@ -724,9 +731,9 @@ static void snd_seq_queue_process_event(queue_t *q, snd_seq_event_t *ev,
  * Queue control via timer control port:
  * this function is exported as a callback of timer port.
  */
-int snd_seq_control_queue(snd_seq_event_t *ev, int atomic, int hop)
+int snd_seq_control_queue(struct snd_seq_event *ev, int atomic, int hop)
 {
-	queue_t *q;
+	struct snd_seq_queue *q;
 
 	snd_assert(ev != NULL, return -EINVAL);
 	q = queueptr(ev->data.queue.queue);
@@ -750,12 +757,12 @@ int snd_seq_control_queue(snd_seq_event_t *ev, int atomic, int hop)
 /*----------------------------------------------------------------*/
 
 /* exported to seq_info.c */
-void snd_seq_info_queues_read(snd_info_entry_t *entry, 
-			      snd_info_buffer_t * buffer)
+void snd_seq_info_queues_read(struct snd_info_entry *entry, 
+			      struct snd_info_buffer *buffer)
 {
 	int i, bpm;
-	queue_t *q;
-	seq_timer_t *tmr;
+	struct snd_seq_queue *q;
+	struct snd_seq_timer *tmr;
 
 	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
 		if ((q = queueptr(i)) == NULL)
diff --git a/sound/core/seq/seq_queue.h b/sound/core/seq/seq_queue.h
index ea3c54216ea..88843859938 100644
--- a/sound/core/seq/seq_queue.h
+++ b/sound/core/seq/seq_queue.h
@@ -30,15 +30,15 @@
 
 #define SEQ_QUEUE_NO_OWNER (-1)
 
-struct _snd_seq_queue {
+struct snd_seq_queue {
 	int queue;		/* queue number */
 
 	char name[64];		/* name of this queue */
 
-	prioq_t	*tickq;		/* midi tick event queue */
-	prioq_t	*timeq;		/* real-time event queue */	
+	struct snd_seq_prioq	*tickq;		/* midi tick event queue */
+	struct snd_seq_prioq	*timeq;		/* real-time event queue */	
 	
-	seq_timer_t *timer;	/* time keeper for this queue */
+	struct snd_seq_timer *timer;	/* time keeper for this queue */
 	int	owner;		/* client that 'owns' the timer */
 	unsigned int	locked:1,	/* timer is only accesibble by owner if set */
 		klocked:1,	/* kernel lock (after START) */	
@@ -83,26 +83,26 @@ void snd_seq_queue_client_termination(int client);
 void snd_seq_queue_client_leave(int client);
 
 /* enqueue a event received from one the clients */
-int snd_seq_enqueue_event(snd_seq_event_cell_t *cell, int atomic, int hop);
+int snd_seq_enqueue_event(struct snd_seq_event_cell *cell, int atomic, int hop);
 
 /* Remove events */
 void snd_seq_queue_client_leave_cells(int client);
-void snd_seq_queue_remove_cells(int client, snd_seq_remove_events_t *info);
+void snd_seq_queue_remove_cells(int client, struct snd_seq_remove_events *info);
 
 /* return pointer to queue structure for specified id */
-queue_t *queueptr(int queueid);
+struct snd_seq_queue *queueptr(int queueid);
 /* unlock */
 #define queuefree(q) snd_use_lock_free(&(q)->use_lock)
 
 /* return the (first) queue matching with the specified name */
-queue_t *snd_seq_queue_find_name(char *name);
+struct snd_seq_queue *snd_seq_queue_find_name(char *name);
 
 /* check single queue and dispatch events */
-void snd_seq_check_queue(queue_t *q, int atomic, int hop);
+void snd_seq_check_queue(struct snd_seq_queue *q, int atomic, int hop);
 
 /* access to queue's parameters */
 int snd_seq_queue_check_access(int queueid, int client);
-int snd_seq_queue_timer_set_tempo(int queueid, int client, snd_seq_queue_tempo_t *info);
+int snd_seq_queue_timer_set_tempo(int queueid, int client, struct snd_seq_queue_tempo *info);
 int snd_seq_queue_set_owner(int queueid, int client, int locked);
 int snd_seq_queue_set_locked(int queueid, int client, int locked);
 int snd_seq_queue_timer_open(int queueid);
@@ -110,7 +110,7 @@ int snd_seq_queue_timer_close(int queueid);
 int snd_seq_queue_use(int queueid, int client, int use);
 int snd_seq_queue_is_used(int queueid, int client);
 
-int snd_seq_control_queue(snd_seq_event_t *ev, int atomic, int hop);
+int snd_seq_control_queue(struct snd_seq_event *ev, int atomic, int hop);
 
 /*
  * 64bit division - for sync stuff..
diff --git a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c
index 0d9eff85ab8..86b1cba33c0 100644
--- a/sound/core/seq/seq_system.c
+++ b/sound/core/seq/seq_system.c
@@ -66,12 +66,12 @@ static int announce_port = -1;
 
 
 /* fill standard header data, source port & channel are filled in */
-static int setheader(snd_seq_event_t * ev, int client, int port)
+static int setheader(struct snd_seq_event * ev, int client, int port)
 {
 	if (announce_port < 0)
 		return -ENODEV;
 
-	memset(ev, 0, sizeof(snd_seq_event_t));
+	memset(ev, 0, sizeof(struct snd_seq_event));
 
 	ev->flags &= ~SNDRV_SEQ_EVENT_LENGTH_MASK;
 	ev->flags |= SNDRV_SEQ_EVENT_LENGTH_FIXED;
@@ -92,7 +92,7 @@ static int setheader(snd_seq_event_t * ev, int client, int port)
 /* entry points for broadcasting system events */
 void snd_seq_system_broadcast(int client, int port, int type)
 {
-	snd_seq_event_t ev;
+	struct snd_seq_event ev;
 	
 	if (setheader(&ev, client, port) < 0)
 		return;
@@ -101,7 +101,7 @@ void snd_seq_system_broadcast(int client, int port, int type)
 }
 
 /* entry points for broadcasting system events */
-int snd_seq_system_notify(int client, int port, snd_seq_event_t *ev)
+int snd_seq_system_notify(int client, int port, struct snd_seq_event *ev)
 {
 	ev->flags = SNDRV_SEQ_EVENT_LENGTH_FIXED;
 	ev->source.client = sysclient;
@@ -112,7 +112,7 @@ int snd_seq_system_notify(int client, int port, snd_seq_event_t *ev)
 }
 
 /* call-back handler for timer events */
-static int event_input_timer(snd_seq_event_t * ev, int direct, void *private_data, int atomic, int hop)
+static int event_input_timer(struct snd_seq_event * ev, int direct, void *private_data, int atomic, int hop)
 {
 	return snd_seq_control_queue(ev, atomic, hop);
 }
@@ -121,10 +121,10 @@ static int event_input_timer(snd_seq_event_t * ev, int direct, void *private_dat
 int __init snd_seq_system_client_init(void)
 {
 
-	snd_seq_client_callback_t callbacks;
-	snd_seq_port_callback_t pcallbacks;
-	snd_seq_client_info_t *inf;
-	snd_seq_port_info_t *port;
+	struct snd_seq_client_callback callbacks;
+	struct snd_seq_port_callback pcallbacks;
+	struct snd_seq_client_info *inf;
+	struct snd_seq_port_info *port;
 
 	inf = kzalloc(sizeof(*inf), GFP_KERNEL);
 	port = kzalloc(sizeof(*port), GFP_KERNEL);
diff --git a/sound/core/seq/seq_system.h b/sound/core/seq/seq_system.h
index 900007255bb..cf2cfa23430 100644
--- a/sound/core/seq/seq_system.h
+++ b/sound/core/seq/seq_system.h
@@ -34,7 +34,7 @@ void snd_seq_system_broadcast(int client, int port, int type);
 #define snd_seq_system_client_ev_port_exit(client, port) snd_seq_system_broadcast(client, port, SNDRV_SEQ_EVENT_PORT_EXIT)
 #define snd_seq_system_client_ev_port_change(client, port) snd_seq_system_broadcast(client, port, SNDRV_SEQ_EVENT_PORT_CHANGE)
 
-int snd_seq_system_notify(int client, int port, snd_seq_event_t *ev);
+int snd_seq_system_notify(int client, int port, struct snd_seq_event *ev);
 
 /* register our internal client */
 int snd_seq_system_client_init(void);
diff --git a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c
index 65b64a7c456..a1d8bfd60ae 100644
--- a/sound/core/seq/seq_timer.c
+++ b/sound/core/seq/seq_timer.c
@@ -41,7 +41,7 @@ extern int seq_default_timer_resolution;
 
 #define SKEW_BASE	0x10000	/* 16bit shift */
 
-static void snd_seq_timer_set_tick_resolution(seq_timer_tick_t *tick,
+static void snd_seq_timer_set_tick_resolution(struct snd_seq_timer_tick *tick,
 					      int tempo, int ppq)
 {
 	if (tempo < 1000000)
@@ -60,9 +60,9 @@ static void snd_seq_timer_set_tick_resolution(seq_timer_tick_t *tick,
 }
 
 /* create new timer (constructor) */
-seq_timer_t *snd_seq_timer_new(void)
+struct snd_seq_timer *snd_seq_timer_new(void)
 {
-	seq_timer_t *tmr;
+	struct snd_seq_timer *tmr;
 	
 	tmr = kzalloc(sizeof(*tmr), GFP_KERNEL);
 	if (tmr == NULL) {
@@ -81,9 +81,9 @@ seq_timer_t *snd_seq_timer_new(void)
 }
 
 /* delete timer (destructor) */
-void snd_seq_timer_delete(seq_timer_t **tmr)
+void snd_seq_timer_delete(struct snd_seq_timer **tmr)
 {
-	seq_timer_t *t = *tmr;
+	struct snd_seq_timer *t = *tmr;
 	*tmr = NULL;
 
 	if (t == NULL) {
@@ -99,7 +99,7 @@ void snd_seq_timer_delete(seq_timer_t **tmr)
 	kfree(t);
 }
 
-void snd_seq_timer_defaults(seq_timer_t * tmr)
+void snd_seq_timer_defaults(struct snd_seq_timer * tmr)
 {
 	/* setup defaults */
 	tmr->ppq = 96;		/* 96 PPQ */
@@ -118,7 +118,7 @@ void snd_seq_timer_defaults(seq_timer_t * tmr)
 	tmr->skew = tmr->skew_base = SKEW_BASE;
 }
 
-void snd_seq_timer_reset(seq_timer_t * tmr)
+void snd_seq_timer_reset(struct snd_seq_timer * tmr)
 {
 	unsigned long flags;
 
@@ -136,13 +136,13 @@ void snd_seq_timer_reset(seq_timer_t * tmr)
 
 
 /* called by timer interrupt routine. the period time since previous invocation is passed */
-static void snd_seq_timer_interrupt(snd_timer_instance_t *timeri,
+static void snd_seq_timer_interrupt(struct snd_timer_instance *timeri,
 				    unsigned long resolution,
 				    unsigned long ticks)
 {
 	unsigned long flags;
-	queue_t *q = (queue_t *)timeri->callback_data;
-	seq_timer_t *tmr;
+	struct snd_seq_queue *q = timeri->callback_data;
+	struct snd_seq_timer *tmr;
 
 	if (q == NULL)
 		return;
@@ -177,7 +177,7 @@ static void snd_seq_timer_interrupt(snd_timer_instance_t *timeri,
 }
 
 /* set current tempo */
-int snd_seq_timer_set_tempo(seq_timer_t * tmr, int tempo)
+int snd_seq_timer_set_tempo(struct snd_seq_timer * tmr, int tempo)
 {
 	unsigned long flags;
 
@@ -194,7 +194,7 @@ int snd_seq_timer_set_tempo(seq_timer_t * tmr, int tempo)
 }
 
 /* set current ppq */
-int snd_seq_timer_set_ppq(seq_timer_t * tmr, int ppq)
+int snd_seq_timer_set_ppq(struct snd_seq_timer * tmr, int ppq)
 {
 	unsigned long flags;
 
@@ -217,7 +217,8 @@ int snd_seq_timer_set_ppq(seq_timer_t * tmr, int ppq)
 }
 
 /* set current tick position */
-int snd_seq_timer_set_position_tick(seq_timer_t *tmr, snd_seq_tick_time_t position)
+int snd_seq_timer_set_position_tick(struct snd_seq_timer *tmr,
+				    snd_seq_tick_time_t position)
 {
 	unsigned long flags;
 
@@ -231,7 +232,8 @@ int snd_seq_timer_set_position_tick(seq_timer_t *tmr, snd_seq_tick_time_t positi
 }
 
 /* set current real-time position */
-int snd_seq_timer_set_position_time(seq_timer_t *tmr, snd_seq_real_time_t position)
+int snd_seq_timer_set_position_time(struct snd_seq_timer *tmr,
+				    snd_seq_real_time_t position)
 {
 	unsigned long flags;
 
@@ -245,7 +247,8 @@ int snd_seq_timer_set_position_time(seq_timer_t *tmr, snd_seq_real_time_t positi
 }
 
 /* set timer skew */
-int snd_seq_timer_set_skew(seq_timer_t *tmr, unsigned int skew, unsigned int base)
+int snd_seq_timer_set_skew(struct snd_seq_timer *tmr, unsigned int skew,
+			   unsigned int base)
 {
 	unsigned long flags;
 
@@ -262,10 +265,10 @@ int snd_seq_timer_set_skew(seq_timer_t *tmr, unsigned int skew, unsigned int bas
 	return 0;
 }
 
-int snd_seq_timer_open(queue_t *q)
+int snd_seq_timer_open(struct snd_seq_queue *q)
 {
-	snd_timer_instance_t *t;
-	seq_timer_t *tmr;
+	struct snd_timer_instance *t;
+	struct snd_seq_timer *tmr;
 	char str[32];
 	int err;
 
@@ -282,7 +285,7 @@ int snd_seq_timer_open(queue_t *q)
 	if (err < 0 && tmr->alsa_id.dev_class != SNDRV_TIMER_CLASS_SLAVE) {
 		if (tmr->alsa_id.dev_class != SNDRV_TIMER_CLASS_GLOBAL ||
 		    tmr->alsa_id.device != SNDRV_TIMER_GLOBAL_SYSTEM) {
-			snd_timer_id_t tid;
+			struct snd_timer_id tid;
 			memset(&tid, 0, sizeof(tid));
 			tid.dev_class = SNDRV_TIMER_CLASS_GLOBAL;
 			tid.dev_sclass = SNDRV_TIMER_SCLASS_SEQUENCER;
@@ -302,9 +305,9 @@ int snd_seq_timer_open(queue_t *q)
 	return 0;
 }
 
-int snd_seq_timer_close(queue_t *q)
+int snd_seq_timer_close(struct snd_seq_queue *q)
 {
-	seq_timer_t *tmr;
+	struct snd_seq_timer *tmr;
 	
 	tmr = q->timer;
 	snd_assert(tmr != NULL, return -EINVAL);
@@ -316,7 +319,7 @@ int snd_seq_timer_close(queue_t *q)
 	return 0;
 }
 
-int snd_seq_timer_stop(seq_timer_t * tmr)
+int snd_seq_timer_stop(struct snd_seq_timer * tmr)
 {
 	if (! tmr->timeri)
 		return -EINVAL;
@@ -327,9 +330,9 @@ int snd_seq_timer_stop(seq_timer_t * tmr)
 	return 0;
 }
 
-static int initialize_timer(seq_timer_t *tmr)
+static int initialize_timer(struct snd_seq_timer *tmr)
 {
-	snd_timer_t *t;
+	struct snd_timer *t;
 	unsigned long freq;
 
 	t = tmr->timeri->timer;
@@ -358,7 +361,7 @@ static int initialize_timer(seq_timer_t *tmr)
 	return 0;
 }
 
-int snd_seq_timer_start(seq_timer_t * tmr)
+int snd_seq_timer_start(struct snd_seq_timer * tmr)
 {
 	if (! tmr->timeri)
 		return -EINVAL;
@@ -373,7 +376,7 @@ int snd_seq_timer_start(seq_timer_t * tmr)
 	return 0;
 }
 
-int snd_seq_timer_continue(seq_timer_t * tmr)
+int snd_seq_timer_continue(struct snd_seq_timer * tmr)
 {
 	if (! tmr->timeri)
 		return -EINVAL;
@@ -391,7 +394,7 @@ int snd_seq_timer_continue(seq_timer_t * tmr)
 }
 
 /* return current 'real' time. use timeofday() to get better granularity. */
-snd_seq_real_time_t snd_seq_timer_get_cur_time(seq_timer_t *tmr)
+snd_seq_real_time_t snd_seq_timer_get_cur_time(struct snd_seq_timer *tmr)
 {
 	snd_seq_real_time_t cur_time;
 
@@ -416,19 +419,20 @@ snd_seq_real_time_t snd_seq_timer_get_cur_time(seq_timer_t *tmr)
 
 /* TODO: use interpolation on tick queue (will only be useful for very
  high PPQ values) */
-snd_seq_tick_time_t snd_seq_timer_get_cur_tick(seq_timer_t *tmr)
+snd_seq_tick_time_t snd_seq_timer_get_cur_tick(struct snd_seq_timer *tmr)
 {
 	return tmr->tick.cur_tick;
 }
 
 
 /* exported to seq_info.c */
-void snd_seq_info_timer_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+void snd_seq_info_timer_read(struct snd_info_entry *entry,
+			     struct snd_info_buffer *buffer)
 {
 	int idx;
-	queue_t *q;
-	seq_timer_t *tmr;
-	snd_timer_instance_t *ti;
+	struct snd_seq_queue *q;
+	struct snd_seq_timer *tmr;
+	struct snd_timer_instance *ti;
 	unsigned long resolution;
 	
 	for (idx = 0; idx < SNDRV_SEQ_MAX_QUEUES; idx++) {
diff --git a/sound/core/seq/seq_timer.h b/sound/core/seq/seq_timer.h
index 287ed68591d..e9ee1543c92 100644
--- a/sound/core/seq/seq_timer.h
+++ b/sound/core/seq/seq_timer.h
@@ -24,13 +24,13 @@
 #include <sound/timer.h>
 #include <sound/seq_kernel.h>
 
-typedef struct {
+struct snd_seq_timer_tick {
 	snd_seq_tick_time_t	cur_tick;	/* current tick */
 	unsigned long		resolution;	/* time per tick in nsec */
 	unsigned long		fraction;	/* current time per tick in nsec */
-} seq_timer_tick_t;
+};
 
-typedef struct {
+struct snd_seq_timer {
 	/* ... tempo / offset / running state */
 
 	unsigned int		running:1,	/* running state of queue */	
@@ -40,12 +40,12 @@ typedef struct {
 	int			ppq;		/* time resolution, ticks/quarter */
 
 	snd_seq_real_time_t	cur_time;	/* current time */
-	seq_timer_tick_t	tick;		/* current tick */
+	struct snd_seq_timer_tick	tick;	/* current tick */
 	int tick_updated;
 	
 	int			type;		/* timer type */
-	snd_timer_id_t		alsa_id;	/* ALSA's timer ID */
-	snd_timer_instance_t	*timeri;	/* timer instance */
+	struct snd_timer_id	alsa_id;	/* ALSA's timer ID */
+	struct snd_timer_instance	*timeri;	/* timer instance */
 	unsigned int		ticks;
 	unsigned long		preferred_resolution; /* timer resolution, ticks/sec */
 
@@ -55,17 +55,18 @@ typedef struct {
 	struct timeval 		last_update;	 /* time of last clock update, used for interpolation */
 
 	spinlock_t lock;
-} seq_timer_t;
+};
 
 
 /* create new timer (constructor) */
-extern seq_timer_t *snd_seq_timer_new(void);
+struct snd_seq_timer *snd_seq_timer_new(void);
 
 /* delete timer (destructor) */
-extern void snd_seq_timer_delete(seq_timer_t **tmr);
+void snd_seq_timer_delete(struct snd_seq_timer **tmr);
 
 /* */
-static inline void snd_seq_timer_update_tick(seq_timer_tick_t *tick, unsigned long resolution)
+static inline void snd_seq_timer_update_tick(struct snd_seq_timer_tick *tick,
+					     unsigned long resolution)
 {
 	if (tick->resolution > 0) {
 		tick->fraction += resolution;
@@ -119,21 +120,22 @@ static inline void snd_seq_inc_time_nsec(snd_seq_real_time_t *tm, unsigned long
 }
 
 /* called by timer isr */
-int snd_seq_timer_open(queue_t *q);
-int snd_seq_timer_close(queue_t *q);
-int snd_seq_timer_midi_open(queue_t *q);
-int snd_seq_timer_midi_close(queue_t *q);
-void snd_seq_timer_defaults(seq_timer_t *tmr);
-void snd_seq_timer_reset(seq_timer_t *tmr);
-int snd_seq_timer_stop(seq_timer_t *tmr);
-int snd_seq_timer_start(seq_timer_t *tmr);
-int snd_seq_timer_continue(seq_timer_t *tmr);
-int snd_seq_timer_set_tempo(seq_timer_t *tmr, int tempo);
-int snd_seq_timer_set_ppq(seq_timer_t *tmr, int ppq);
-int snd_seq_timer_set_position_tick(seq_timer_t *tmr, snd_seq_tick_time_t position);
-int snd_seq_timer_set_position_time(seq_timer_t *tmr, snd_seq_real_time_t position);
-int snd_seq_timer_set_skew(seq_timer_t *tmr, unsigned int skew, unsigned int base);
-snd_seq_real_time_t snd_seq_timer_get_cur_time(seq_timer_t *tmr);
-snd_seq_tick_time_t snd_seq_timer_get_cur_tick(seq_timer_t *tmr);
+struct snd_seq_queue;
+int snd_seq_timer_open(struct snd_seq_queue *q);
+int snd_seq_timer_close(struct snd_seq_queue *q);
+int snd_seq_timer_midi_open(struct snd_seq_queue *q);
+int snd_seq_timer_midi_close(struct snd_seq_queue *q);
+void snd_seq_timer_defaults(struct snd_seq_timer *tmr);
+void snd_seq_timer_reset(struct snd_seq_timer *tmr);
+int snd_seq_timer_stop(struct snd_seq_timer *tmr);
+int snd_seq_timer_start(struct snd_seq_timer *tmr);
+int snd_seq_timer_continue(struct snd_seq_timer *tmr);
+int snd_seq_timer_set_tempo(struct snd_seq_timer *tmr, int tempo);
+int snd_seq_timer_set_ppq(struct snd_seq_timer *tmr, int ppq);
+int snd_seq_timer_set_position_tick(struct snd_seq_timer *tmr, snd_seq_tick_time_t position);
+int snd_seq_timer_set_position_time(struct snd_seq_timer *tmr, snd_seq_real_time_t position);
+int snd_seq_timer_set_skew(struct snd_seq_timer *tmr, unsigned int skew, unsigned int base);
+snd_seq_real_time_t snd_seq_timer_get_cur_time(struct snd_seq_timer *tmr);
+snd_seq_tick_time_t snd_seq_timer_get_cur_tick(struct snd_seq_timer *tmr);
 
 #endif
diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c
index e4f512aa742..ea2113968fe 100644
--- a/sound/core/seq/seq_virmidi.c
+++ b/sound/core/seq/seq_virmidi.c
@@ -56,7 +56,8 @@ MODULE_LICENSE("GPL");
 /*
  * initialize an event record
  */
-static void snd_virmidi_init_event(snd_virmidi_t *vmidi, snd_seq_event_t *ev)
+static void snd_virmidi_init_event(struct snd_virmidi *vmidi,
+				   struct snd_seq_event *ev)
 {
 	memset(ev, 0, sizeof(*ev));
 	ev->source.port = vmidi->port;
@@ -76,16 +77,17 @@ static void snd_virmidi_init_event(snd_virmidi_t *vmidi, snd_seq_event_t *ev)
 /*
  * decode input event and put to read buffer of each opened file
  */
-static int snd_virmidi_dev_receive_event(snd_virmidi_dev_t *rdev, snd_seq_event_t *ev)
+static int snd_virmidi_dev_receive_event(struct snd_virmidi_dev *rdev,
+					 struct snd_seq_event *ev)
 {
-	snd_virmidi_t *vmidi;
+	struct snd_virmidi *vmidi;
 	struct list_head *list;
 	unsigned char msg[4];
 	int len;
 
 	read_lock(&rdev->filelist_lock);
 	list_for_each(list, &rdev->filelist) {
-		vmidi = list_entry(list, snd_virmidi_t, list);
+		vmidi = list_entry(list, struct snd_virmidi, list);
 		if (!vmidi->trigger)
 			continue;
 		if (ev->type == SNDRV_SEQ_EVENT_SYSEX) {
@@ -111,9 +113,9 @@ static int snd_virmidi_dev_receive_event(snd_virmidi_dev_t *rdev, snd_seq_event_
  * SNDRV_VIRMIDI_SEQ_ATTACH.
  */
 #if 0
-int snd_virmidi_receive(snd_rawmidi_t *rmidi, snd_seq_event_t *ev)
+int snd_virmidi_receive(struct snd_rawmidi *rmidi, struct snd_seq_event *ev)
 {
-	snd_virmidi_dev_t *rdev;
+	struct snd_virmidi_dev *rdev;
 
 	rdev = rmidi->private_data;
 	return snd_virmidi_dev_receive_event(rdev, ev);
@@ -123,10 +125,10 @@ int snd_virmidi_receive(snd_rawmidi_t *rmidi, snd_seq_event_t *ev)
 /*
  * event handler of virmidi port
  */
-static int snd_virmidi_event_input(snd_seq_event_t *ev, int direct,
+static int snd_virmidi_event_input(struct snd_seq_event *ev, int direct,
 				   void *private_data, int atomic, int hop)
 {
-	snd_virmidi_dev_t *rdev;
+	struct snd_virmidi_dev *rdev;
 
 	rdev = private_data;
 	if (!(rdev->flags & SNDRV_VIRMIDI_USE))
@@ -137,9 +139,9 @@ static int snd_virmidi_event_input(snd_seq_event_t *ev, int direct,
 /*
  * trigger rawmidi stream for input
  */
-static void snd_virmidi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_virmidi_input_trigger(struct snd_rawmidi_substream *substream, int up)
 {
-	snd_virmidi_t *vmidi = substream->runtime->private_data;
+	struct snd_virmidi *vmidi = substream->runtime->private_data;
 
 	if (up) {
 		vmidi->trigger = 1;
@@ -151,9 +153,9 @@ static void snd_virmidi_input_trigger(snd_rawmidi_substream_t * substream, int u
 /*
  * trigger rawmidi stream for output
  */
-static void snd_virmidi_output_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_virmidi_output_trigger(struct snd_rawmidi_substream *substream, int up)
 {
-	snd_virmidi_t *vmidi = substream->runtime->private_data;
+	struct snd_virmidi *vmidi = substream->runtime->private_data;
 	int count, res;
 	unsigned char buf[32], *pbuf;
 
@@ -198,11 +200,11 @@ static void snd_virmidi_output_trigger(snd_rawmidi_substream_t * substream, int
 /*
  * open rawmidi handle for input
  */
-static int snd_virmidi_input_open(snd_rawmidi_substream_t * substream)
+static int snd_virmidi_input_open(struct snd_rawmidi_substream *substream)
 {
-	snd_virmidi_dev_t *rdev = substream->rmidi->private_data;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
-	snd_virmidi_t *vmidi;
+	struct snd_virmidi_dev *rdev = substream->rmidi->private_data;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
+	struct snd_virmidi *vmidi;
 	unsigned long flags;
 
 	vmidi = kzalloc(sizeof(*vmidi), GFP_KERNEL);
@@ -227,11 +229,11 @@ static int snd_virmidi_input_open(snd_rawmidi_substream_t * substream)
 /*
  * open rawmidi handle for output
  */
-static int snd_virmidi_output_open(snd_rawmidi_substream_t * substream)
+static int snd_virmidi_output_open(struct snd_rawmidi_substream *substream)
 {
-	snd_virmidi_dev_t *rdev = substream->rmidi->private_data;
-	snd_rawmidi_runtime_t *runtime = substream->runtime;
-	snd_virmidi_t *vmidi;
+	struct snd_virmidi_dev *rdev = substream->rmidi->private_data;
+	struct snd_rawmidi_runtime *runtime = substream->runtime;
+	struct snd_virmidi *vmidi;
 
 	vmidi = kzalloc(sizeof(*vmidi), GFP_KERNEL);
 	if (vmidi == NULL)
@@ -253,9 +255,9 @@ static int snd_virmidi_output_open(snd_rawmidi_substream_t * substream)
 /*
  * close rawmidi handle for input
  */
-static int snd_virmidi_input_close(snd_rawmidi_substream_t * substream)
+static int snd_virmidi_input_close(struct snd_rawmidi_substream *substream)
 {
-	snd_virmidi_t *vmidi = substream->runtime->private_data;
+	struct snd_virmidi *vmidi = substream->runtime->private_data;
 	snd_midi_event_free(vmidi->parser);
 	list_del(&vmidi->list);
 	substream->runtime->private_data = NULL;
@@ -266,9 +268,9 @@ static int snd_virmidi_input_close(snd_rawmidi_substream_t * substream)
 /*
  * close rawmidi handle for output
  */
-static int snd_virmidi_output_close(snd_rawmidi_substream_t * substream)
+static int snd_virmidi_output_close(struct snd_rawmidi_substream *substream)
 {
-	snd_virmidi_t *vmidi = substream->runtime->private_data;
+	struct snd_virmidi *vmidi = substream->runtime->private_data;
 	snd_midi_event_free(vmidi->parser);
 	substream->runtime->private_data = NULL;
 	kfree(vmidi);
@@ -278,9 +280,10 @@ static int snd_virmidi_output_close(snd_rawmidi_substream_t * substream)
 /*
  * subscribe callback - allow output to rawmidi device
  */
-static int snd_virmidi_subscribe(void *private_data, snd_seq_port_subscribe_t *info)
+static int snd_virmidi_subscribe(void *private_data,
+				 struct snd_seq_port_subscribe *info)
 {
-	snd_virmidi_dev_t *rdev;
+	struct snd_virmidi_dev *rdev;
 
 	rdev = private_data;
 	if (!try_module_get(rdev->card->module))
@@ -292,9 +295,10 @@ static int snd_virmidi_subscribe(void *private_data, snd_seq_port_subscribe_t *i
 /*
  * unsubscribe callback - disallow output to rawmidi device
  */
-static int snd_virmidi_unsubscribe(void *private_data, snd_seq_port_subscribe_t *info)
+static int snd_virmidi_unsubscribe(void *private_data,
+				   struct snd_seq_port_subscribe *info)
 {
-	snd_virmidi_dev_t *rdev;
+	struct snd_virmidi_dev *rdev;
 
 	rdev = private_data;
 	rdev->flags &= ~SNDRV_VIRMIDI_SUBSCRIBE;
@@ -306,9 +310,10 @@ static int snd_virmidi_unsubscribe(void *private_data, snd_seq_port_subscribe_t
 /*
  * use callback - allow input to rawmidi device
  */
-static int snd_virmidi_use(void *private_data, snd_seq_port_subscribe_t *info)
+static int snd_virmidi_use(void *private_data,
+			   struct snd_seq_port_subscribe *info)
 {
-	snd_virmidi_dev_t *rdev;
+	struct snd_virmidi_dev *rdev;
 
 	rdev = private_data;
 	if (!try_module_get(rdev->card->module))
@@ -320,9 +325,10 @@ static int snd_virmidi_use(void *private_data, snd_seq_port_subscribe_t *info)
 /*
  * unuse callback - disallow input to rawmidi device
  */
-static int snd_virmidi_unuse(void *private_data, snd_seq_port_subscribe_t *info)
+static int snd_virmidi_unuse(void *private_data,
+			     struct snd_seq_port_subscribe *info)
 {
-	snd_virmidi_dev_t *rdev;
+	struct snd_virmidi_dev *rdev;
 
 	rdev = private_data;
 	rdev->flags &= ~SNDRV_VIRMIDI_USE;
@@ -335,13 +341,13 @@ static int snd_virmidi_unuse(void *private_data, snd_seq_port_subscribe_t *info)
  *  Register functions
  */
 
-static snd_rawmidi_ops_t snd_virmidi_input_ops = {
+static struct snd_rawmidi_ops snd_virmidi_input_ops = {
 	.open = snd_virmidi_input_open,
 	.close = snd_virmidi_input_close,
 	.trigger = snd_virmidi_input_trigger,
 };
 
-static snd_rawmidi_ops_t snd_virmidi_output_ops = {
+static struct snd_rawmidi_ops snd_virmidi_output_ops = {
 	.open = snd_virmidi_output_open,
 	.close = snd_virmidi_output_close,
 	.trigger = snd_virmidi_output_trigger,
@@ -350,13 +356,13 @@ static snd_rawmidi_ops_t snd_virmidi_output_ops = {
 /*
  * create a sequencer client and a port
  */
-static int snd_virmidi_dev_attach_seq(snd_virmidi_dev_t *rdev)
+static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev)
 {
 	int client;
-	snd_seq_client_callback_t callbacks;
-	snd_seq_port_callback_t pcallbacks;
-	snd_seq_client_info_t *info;
-	snd_seq_port_info_t *pinfo;
+	struct snd_seq_client_callback callbacks;
+	struct snd_seq_port_callback pcallbacks;
+	struct snd_seq_client_info *info;
+	struct snd_seq_port_info *pinfo;
 	int err;
 
 	if (rdev->client >= 0)
@@ -426,7 +432,7 @@ static int snd_virmidi_dev_attach_seq(snd_virmidi_dev_t *rdev)
 /*
  * release the sequencer client
  */
-static void snd_virmidi_dev_detach_seq(snd_virmidi_dev_t *rdev)
+static void snd_virmidi_dev_detach_seq(struct snd_virmidi_dev *rdev)
 {
 	if (rdev->client >= 0) {
 		snd_seq_delete_kernel_client(rdev->client);
@@ -437,9 +443,9 @@ static void snd_virmidi_dev_detach_seq(snd_virmidi_dev_t *rdev)
 /*
  * register the device
  */
-static int snd_virmidi_dev_register(snd_rawmidi_t *rmidi)
+static int snd_virmidi_dev_register(struct snd_rawmidi *rmidi)
 {
-	snd_virmidi_dev_t *rdev = rmidi->private_data;
+	struct snd_virmidi_dev *rdev = rmidi->private_data;
 	int err;
 
 	switch (rdev->seq_mode) {
@@ -464,9 +470,9 @@ static int snd_virmidi_dev_register(snd_rawmidi_t *rmidi)
 /*
  * unregister the device
  */
-static int snd_virmidi_dev_unregister(snd_rawmidi_t *rmidi)
+static int snd_virmidi_dev_unregister(struct snd_rawmidi *rmidi)
 {
-	snd_virmidi_dev_t *rdev = rmidi->private_data;
+	struct snd_virmidi_dev *rdev = rmidi->private_data;
 
 	if (rdev->seq_mode == SNDRV_VIRMIDI_SEQ_DISPATCH)
 		snd_virmidi_dev_detach_seq(rdev);
@@ -476,7 +482,7 @@ static int snd_virmidi_dev_unregister(snd_rawmidi_t *rmidi)
 /*
  *
  */
-static snd_rawmidi_global_ops_t snd_virmidi_global_ops = {
+static struct snd_rawmidi_global_ops snd_virmidi_global_ops = {
 	.dev_register = snd_virmidi_dev_register,
 	.dev_unregister = snd_virmidi_dev_unregister,
 };
@@ -484,9 +490,9 @@ static snd_rawmidi_global_ops_t snd_virmidi_global_ops = {
 /*
  * free device
  */
-static void snd_virmidi_free(snd_rawmidi_t *rmidi)
+static void snd_virmidi_free(struct snd_rawmidi *rmidi)
 {
-	snd_virmidi_dev_t *rdev = rmidi->private_data;
+	struct snd_virmidi_dev *rdev = rmidi->private_data;
 	kfree(rdev);
 }
 
@@ -495,10 +501,10 @@ static void snd_virmidi_free(snd_rawmidi_t *rmidi)
  *
  */
 /* exported */
-int snd_virmidi_new(snd_card_t *card, int device, snd_rawmidi_t **rrmidi)
+int snd_virmidi_new(struct snd_card *card, int device, struct snd_rawmidi **rrmidi)
 {
-	snd_rawmidi_t *rmidi;
-	snd_virmidi_dev_t *rdev;
+	struct snd_rawmidi *rmidi;
+	struct snd_virmidi_dev *rdev;
 	int err;
 	
 	*rrmidi = NULL;
-- 
cgit v1.2.3-70-g09d2


From 19ac31e82cc7328c01bf26f824f33c7c38cb6075 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:04:44 +0100
Subject: [ALSA] Remove xxx_t typedefs: Instrument layer

Modules: Instrument layer

Remove xxx_t typedefs from the core instrument layer codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/ainstr_fm.h            |  28 ++++---
 include/sound/ainstr_gf1.h           |  46 ++++++-----
 include/sound/ainstr_iw.h            | 115 ++++++++++++++-------------
 include/sound/ainstr_simple.h        |  35 +++++----
 sound/core/seq/instr/ainstr_fm.c     |  26 +++----
 sound/core/seq/instr/ainstr_gf1.c    |  76 +++++++++---------
 sound/core/seq/instr/ainstr_iw.c     | 146 +++++++++++++++++------------------
 sound/core/seq/instr/ainstr_simple.c |  50 ++++++------
 8 files changed, 272 insertions(+), 250 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/ainstr_fm.h b/include/sound/ainstr_fm.h
index 0ec02953815..c4afb1f121f 100644
--- a/include/sound/ainstr_fm.h
+++ b/include/sound/ainstr_fm.h
@@ -39,13 +39,13 @@
  * FM operator
  */
 
-typedef struct fm_operator {
+struct fm_operator {
 	unsigned char am_vib;
 	unsigned char ksl_level;
 	unsigned char attack_decay;
 	unsigned char sustain_release;
 	unsigned char wave_select;
-} fm_operator_t;
+};
 
 /*
  *  Instrument
@@ -54,11 +54,11 @@ typedef struct fm_operator {
 #define FM_PATCH_OPL2	0x01		/* OPL2 2 operators FM instrument */
 #define FM_PATCH_OPL3	0x02		/* OPL3 4 operators FM instrument */
 
-typedef struct {
+struct fm_instrument {
 	unsigned int share_id[4];	/* share id - zero = no sharing */
 	unsigned char type;		/* instrument type */
 
-	fm_operator_t op[4];
+	struct fm_operator op[4];
 	unsigned char feedback_connection[2];
 
 	unsigned char echo_delay;
@@ -68,7 +68,7 @@ typedef struct {
 	unsigned char fix_dur;
 	unsigned char modes;
 	unsigned char fix_key;
-} fm_instrument_t;
+};
 
 /*
  *
@@ -88,25 +88,25 @@ typedef struct {
  * FM operator
  */
 
-typedef struct fm_xoperator {
+struct fm_xoperator {
 	__u8 am_vib;
 	__u8 ksl_level;
 	__u8 attack_decay;
 	__u8 sustain_release;
 	__u8 wave_select;
-} fm_xoperator_t;
+};
 
 /*
  *  Instrument
  */
 
-typedef struct fm_xinstrument {
+struct fm_xinstrument {
 	__u32 stype;			/* structure type */
 
 	__u32 share_id[4];		/* share id - zero = no sharing */
 	__u8 type;			/* instrument type */
 
-	fm_xoperator_t op[4];		/* fm operators */
+	struct fm_xoperator op[4];		/* fm operators */
 	__u8 feedback_connection[2];
 
 	__u8 echo_delay;
@@ -116,15 +116,19 @@ typedef struct fm_xinstrument {
 	__u8 fix_dur;
 	__u8 modes;
 	__u8 fix_key;
-} fm_xinstrument_t;
+};
 
 #ifdef __KERNEL__
 
 #include "seq_instr.h"
 
-int snd_seq_fm_init(snd_seq_kinstr_ops_t * ops,
-		    snd_seq_kinstr_ops_t * next);
+int snd_seq_fm_init(struct snd_seq_kinstr_ops * ops,
+		    struct snd_seq_kinstr_ops * next);
 
 #endif
 
+/* typedefs for compatibility to user-space */
+typedef struct fm_xoperator fm_xoperator_t;
+typedef struct fm_xinstrument fm_xinstrument_t;
+
 #endif	/* __SOUND_AINSTR_FM_H */
diff --git a/include/sound/ainstr_gf1.h b/include/sound/ainstr_gf1.h
index ae2ddda6397..47726fe0f46 100644
--- a/include/sound/ainstr_gf1.h
+++ b/include/sound/ainstr_gf1.h
@@ -52,7 +52,7 @@
  *  Wavetable definitions
  */
 
-typedef struct gf1_wave {
+struct gf1_wave {
 	unsigned int share_id[4];	/* share id - zero = no sharing */
 	unsigned int format;		/* wave format */
 
@@ -88,7 +88,7 @@ typedef struct gf1_wave {
 	unsigned short scale_factor;	/* 0-2048 or 0-2 */
   
 	struct gf1_wave *next;
-} gf1_wave_t;
+};
 
 /*
  *  Instrument
@@ -103,7 +103,7 @@ typedef struct gf1_wave {
 #define IWFFFF_EFFECT_CHORUS		2
 #define IWFFFF_EFFECT_ECHO		3
 
-typedef struct {
+struct gf1_instrument {
 	unsigned short exclusion;
 	unsigned short exclusion_group;	/* 0 - none, 1-65535 */
 
@@ -112,8 +112,8 @@ typedef struct {
 	unsigned char effect2;		/* effect 2 */
 	unsigned char effect2_depth;	/* 0-127 */
 
-	gf1_wave_t *wave;		/* first waveform */
-} gf1_instrument_t;
+	struct gf1_wave *wave;		/* first waveform */
+};
 
 /*
  *
@@ -135,7 +135,7 @@ typedef struct {
  *  Wavetable definitions
  */
 
-typedef struct gf1_xwave {
+struct gf1_xwave {
 	__u32 stype;			/* structure type */
 
 	__u32 share_id[4];		/* share id - zero = no sharing */
@@ -165,13 +165,13 @@ typedef struct gf1_xwave {
 	__u8 vibrato_depth;
 	__u16 scale_frequency;
 	__u16 scale_factor;		/* 0-2048 or 0-2 */  
-} gf1_xwave_t;
+};
 
 /*
  *  Instrument
  */
 
-typedef struct gf1_xinstrument {
+struct gf1_xinstrument {
 	__u32 stype;
 	
 	__u16 exclusion;
@@ -181,7 +181,7 @@ typedef struct gf1_xinstrument {
 	__u8 effect1_depth;		/* 0-127 */
 	__u8 effect2;			/* effect 2 */
 	__u8 effect2_depth;		/* 0-127 */
-} gf1_xinstrument_t;
+};
 
 /*
  *  Instrument info
@@ -191,35 +191,39 @@ typedef struct gf1_xinstrument {
 #define GF1_INFO_TREMOLO		(1<<1)
 #define GF1_INFO_VIBRATO		(1<<2)
 
-typedef struct gf1_info {
+struct gf1_info {
 	unsigned char flags;		/* supported wave flags */
 	unsigned char pad[3];
 	unsigned int features;		/* supported features */
 	unsigned int max8_len;		/* maximum 8-bit wave length */
 	unsigned int max16_len;		/* maximum 16-bit wave length */
-} gf1_info_t;
+};
 
 #ifdef __KERNEL__
 
 #include "seq_instr.h"
 
-typedef struct {
+struct snd_gf1_ops {
 	void *private_data;
-	int (*info)(void *private_data, gf1_info_t *info);
-	int (*put_sample)(void *private_data, gf1_wave_t *wave,
+	int (*info)(void *private_data, struct gf1_info *info);
+	int (*put_sample)(void *private_data, struct gf1_wave *wave,
 	                  char __user *data, long len, int atomic);
-	int (*get_sample)(void *private_data, gf1_wave_t *wave,
+	int (*get_sample)(void *private_data, struct gf1_wave *wave,
 			  char __user *data, long len, int atomic);
-	int (*remove_sample)(void *private_data, gf1_wave_t *wave,
+	int (*remove_sample)(void *private_data, struct gf1_wave *wave,
 			     int atomic);
-	void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what);
-	snd_seq_kinstr_ops_t kops;
-} snd_gf1_ops_t;
+	void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what);
+	struct snd_seq_kinstr_ops kops;
+};
 
-int snd_seq_gf1_init(snd_gf1_ops_t *ops,
+int snd_seq_gf1_init(struct snd_gf1_ops *ops,
 		     void *private_data,
-		     snd_seq_kinstr_ops_t *next);
+		     struct snd_seq_kinstr_ops *next);
 
 #endif
 
+/* typedefs for compatibility to user-space */
+typedef struct gf1_xwave gf1_xwave_t;
+typedef struct gf1_xinstrument gf1_xinstrument_t;
+
 #endif /* __SOUND_AINSTR_GF1_H */
diff --git a/include/sound/ainstr_iw.h b/include/sound/ainstr_iw.h
index 8adf744926f..251feaf1b38 100644
--- a/include/sound/ainstr_iw.h
+++ b/include/sound/ainstr_iw.h
@@ -54,7 +54,7 @@
  *  Wavetable definitions
  */
 
-typedef struct iwffff_wave {
+struct iwffff_wave {
 	unsigned int share_id[4];	/* share id - zero = no sharing */
 	unsigned int format;		/* wave format */
 
@@ -76,7 +76,7 @@ typedef struct iwffff_wave {
 	unsigned char pad;
   
 	struct iwffff_wave *next;
-} iwffff_wave_t;
+};
 
 /*
  *  Layer
@@ -85,13 +85,13 @@ typedef struct iwffff_wave {
 #define IWFFFF_LFO_SHAPE_TRIANGLE	0
 #define IWFFFF_LFO_SHAPE_POSTRIANGLE	1
 
-typedef struct iwffff_lfo {
+struct iwffff_lfo {
 	unsigned short freq;		/* (0-2047) 0.01Hz - 21.5Hz */
 	signed short depth;		/* volume +- (0-255) 0.48675dB/step */
 	signed short sweep;		/* 0 - 950 deciseconds */
 	unsigned char shape;		/* see to IWFFFF_LFO_SHAPE_XXXX */
 	unsigned char delay;		/* 0 - 255 deciseconds */
-} iwffff_lfo_t;
+};
 
 #define IWFFFF_ENV_FLAG_RETRIGGER	0x0001	/* flag - retrigger */
 
@@ -102,12 +102,12 @@ typedef struct iwffff_lfo {
 #define IWFFFF_ENV_INDEX_VELOCITY	0x0001	/* index - velocity */
 #define IWFFFF_ENV_INDEX_FREQUENCY	0x0002	/* index - frequency */
 
-typedef struct iwffff_env_point {
+struct iwffff_env_point {
 	unsigned short offset;
 	unsigned short rate;
-} iwffff_env_point_t;
+};
 
-typedef struct iwffff_env_record {
+struct iwffff_env_record {
 	unsigned short nattack;
 	unsigned short nrelease;
 	unsigned short sustain_offset;
@@ -118,15 +118,15 @@ typedef struct iwffff_env_record {
 	struct iwffff_env_record *next;
 	/* points are stored here */
 	/* count of points = nattack + nrelease */
-} iwffff_env_record_t;
+};
 
-typedef struct iwffff_env {
+struct iwffff_env {
 	unsigned char flags;
   	unsigned char mode;
   	unsigned char index;
 	unsigned char pad;
 	struct iwffff_env_record *record;
-} iwffff_env_t;
+};
 
 #define IWFFFF_LAYER_FLAG_RETRIGGER	0x0001	/* retrigger */
 
@@ -138,7 +138,7 @@ typedef struct iwffff_env {
 #define IWFFFF_LAYER_EVENT_RETRIG	0x0002	/* layer event - retrigger */
 #define IWFFFF_LAYER_EVENT_LEGATO	0x0003	/* layer event - legato */
 
-typedef struct iwffff_layer {
+struct iwffff_layer {
 	unsigned char flags;
 	unsigned char velocity_mode;
       	unsigned char layer_event;
@@ -147,17 +147,17 @@ typedef struct iwffff_layer {
 	unsigned char pan;		/* pan offset from CC1 (0 left - 127 right) */
 	unsigned char pan_freq_scale;	/* position based on frequency (0-127) */
 	unsigned char attenuation;	/* 0-127 (no corresponding midi controller) */
-	iwffff_lfo_t tremolo;		/* tremolo effect */
-	iwffff_lfo_t vibrato;		/* vibrato effect */
+	struct iwffff_lfo tremolo;		/* tremolo effect */
+	struct iwffff_lfo vibrato;		/* vibrato effect */
 	unsigned short freq_scale;	/* 0-2048, 1024 is equal to semitone scaling */
 	unsigned char freq_center;	/* center for keyboard frequency scaling */
 	unsigned char pad;
-	iwffff_env_t penv;		/* pitch envelope */
-	iwffff_env_t venv;		/* volume envelope */
+	struct iwffff_env penv;		/* pitch envelope */
+	struct iwffff_env venv;		/* volume envelope */
 
-	iwffff_wave_t *wave;
+	struct iwffff_wave *wave;
 	struct iwffff_layer *next;
-} iwffff_layer_t;
+};
 
 /*
  *  Instrument
@@ -177,7 +177,7 @@ typedef struct iwffff_layer {
 #define IWFFFF_EFFECT_CHORUS		2
 #define IWFFFF_EFFECT_ECHO		3
 
-typedef struct {
+struct iwffff_instrument {
 	unsigned short exclusion;
 	unsigned short layer_type;
 	unsigned short exclusion_group;	/* 0 - none, 1-65535 */
@@ -187,8 +187,8 @@ typedef struct {
 	unsigned char effect2;		/* effect 2 */
 	unsigned char effect2_depth;	/* 0-127 */
 
-	iwffff_layer_t *layer;		/* first layer */
-} iwffff_instrument_t;
+	struct iwffff_layer *layer;		/* first layer */
+};
 
 /*
  *
@@ -216,7 +216,7 @@ typedef struct {
  *  Wavetable definitions
  */
 
-typedef struct iwffff_xwave {
+struct iwffff_xwave {
 	__u32 stype;			/* structure type */
 
 	__u32 share_id[4];		/* share id - zero = no sharing */
@@ -234,26 +234,26 @@ typedef struct iwffff_xwave {
 	__u8 low_note;			/* lower frequency range for this waveform */
 	__u8 high_note;			/* higher frequency range for this waveform */
 	__u8 pad;
-} iwffff_xwave_t;
+};
 
 /*
  *  Layer
  */
 
-typedef struct iwffff_xlfo {
+struct iwffff_xlfo {
 	__u16 freq;			/* (0-2047) 0.01Hz - 21.5Hz */
 	__s16 depth;			/* volume +- (0-255) 0.48675dB/step */
 	__s16 sweep;			/* 0 - 950 deciseconds */
 	__u8 shape;			/* see to ULTRA_IW_LFO_SHAPE_XXXX */
 	__u8 delay;			/* 0 - 255 deciseconds */
-} iwffff_xlfo_t;
+};
 
-typedef struct iwffff_xenv_point {
+struct iwffff_xenv_point {
 	__u16 offset;
 	__u16 rate;
-} iwffff_xenv_point_t;
+};
 
-typedef struct iwffff_xenv_record {
+struct iwffff_xenv_record {
 	__u32 stype;
 	__u16 nattack;
 	__u16 nrelease;
@@ -264,16 +264,16 @@ typedef struct iwffff_xenv_record {
 	__u8 pad;
 	/* points are stored here.. */
 	/* count of points = nattack + nrelease */
-} iwffff_xenv_record_t;
+};
 
-typedef struct iwffff_xenv {
+struct iwffff_xenv {
 	__u8 flags;
   	__u8 mode;
   	__u8 index;
 	__u8 pad;
-} iwffff_xenv_t;
+};
 
-typedef struct iwffff_xlayer {
+struct iwffff_xlayer {
 	__u32 stype;
 	__u8 flags;
 	__u8 velocity_mode;
@@ -283,20 +283,20 @@ typedef struct iwffff_xlayer {
 	__u8 pan;			/* pan offset from CC1 (0 left - 127 right) */
 	__u8 pan_freq_scale;		/* position based on frequency (0-127) */
 	__u8 attenuation;		/* 0-127 (no corresponding midi controller) */
-	iwffff_xlfo_t tremolo;		/* tremolo effect */
-	iwffff_xlfo_t vibrato;		/* vibrato effect */
+	struct iwffff_xlfo tremolo;		/* tremolo effect */
+	struct iwffff_xlfo vibrato;		/* vibrato effect */
 	__u16 freq_scale;		/* 0-2048, 1024 is equal to semitone scaling */
 	__u8 freq_center;		/* center for keyboard frequency scaling */
 	__u8 pad;
-	iwffff_xenv_t penv;		/* pitch envelope */
-	iwffff_xenv_t venv;		/* volume envelope */
-} iwffff_xlayer_t;
+	struct iwffff_xenv penv;		/* pitch envelope */
+	struct iwffff_xenv venv;		/* volume envelope */
+};
 
 /*
  *  Instrument
  */
 
-typedef struct iwffff_xinstrument {
+struct iwffff_xinstrument {
 	__u32 stype;
 	
 	__u16 exclusion;
@@ -307,7 +307,7 @@ typedef struct iwffff_xinstrument {
 	__u8 effect1_depth;		/* 0-127 */
 	__u8 effect2;			/* effect 2 */
 	__u8 effect2_depth;		/* 0-127 */
-} iwffff_xinstrument_t;
+};
 
 /*
  *  ROM support
@@ -316,7 +316,7 @@ typedef struct iwffff_xinstrument {
 
 #define IWFFFF_ROM_HDR_SIZE	512
 
-typedef struct {
+struct iwffff_rom_header {
 	__u8 iwave[8];
 	__u8 revision;
 	__u8 series_number;
@@ -328,7 +328,7 @@ typedef struct {
 	__u8 copyright[128];
 	__u8 vendor_name[64];
 	__u8 description[128];
-} iwffff_rom_header_t;
+};
 
 /*
  *  Instrument info
@@ -339,35 +339,46 @@ typedef struct {
 #define IWFFFF_INFO_LFO_TREMOLO		(1<<2)
 #define IWFFFF_INFO_LFO_TREMOLO_SHAPE	(1<<3)
 
-typedef struct iwffff_info {
+struct iwffff_info {
 	unsigned int format;		/* supported format bits */
 	unsigned int effects;		/* supported effects (1 << IWFFFF_EFFECT*) */
 	unsigned int lfos;		/* LFO effects */
 	unsigned int max8_len;		/* maximum 8-bit wave length */
 	unsigned int max16_len;		/* maximum 16-bit wave length */
-} iwffff_info_t;
+};
 
 #ifdef __KERNEL__
 
 #include "seq_instr.h"
 
-typedef struct {
+struct snd_iwffff_ops {
 	void *private_data;
-	int (*info)(void *private_data, iwffff_info_t *info);
-	int (*put_sample)(void *private_data, iwffff_wave_t *wave,
+	int (*info)(void *private_data, struct iwffff_info *info);
+	int (*put_sample)(void *private_data, struct iwffff_wave *wave,
 	                  char __user *data, long len, int atomic);
-	int (*get_sample)(void *private_data, iwffff_wave_t *wave,
+	int (*get_sample)(void *private_data, struct iwffff_wave *wave,
 			  char __user *data, long len, int atomic);
-	int (*remove_sample)(void *private_data, iwffff_wave_t *wave,
+	int (*remove_sample)(void *private_data, struct iwffff_wave *wave,
 			     int atomic);
-	void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what);
-	snd_seq_kinstr_ops_t kops;
-} snd_iwffff_ops_t;
+	void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what);
+	struct snd_seq_kinstr_ops kops;
+};
 
-int snd_seq_iwffff_init(snd_iwffff_ops_t *ops,
+int snd_seq_iwffff_init(struct snd_iwffff_ops *ops,
 			void *private_data,
-                        snd_seq_kinstr_ops_t *next);
+                        struct snd_seq_kinstr_ops *next);
 
 #endif
 
+/* typedefs for compatibility to user-space */
+typedef struct iwffff_xwave iwffff_xwave_t;
+typedef struct iwffff_xlfo iwffff_xlfo_t;
+typedef struct iwffff_xenv_point iwffff_xenv_point_t;
+typedef struct iwffff_xenv_record iwffff_xenv_record_t;
+typedef struct iwffff_xenv iwffff_xenv_t;
+typedef struct iwffff_xlayer iwffff_xlayer_t;
+typedef struct iwffff_xinstrument iwffff_xinstrument_t;
+typedef struct iwffff_rom_header iwffff_rom_header_t;
+typedef struct iwffff_info iwffff_info_t;
+
 #endif /* __SOUND_AINSTR_IW_H */
diff --git a/include/sound/ainstr_simple.h b/include/sound/ainstr_simple.h
index 40824b4ab23..5eead12e58a 100644
--- a/include/sound/ainstr_simple.h
+++ b/include/sound/ainstr_simple.h
@@ -61,18 +61,18 @@
  *  instrument info
  */
 
-typedef struct simple_instrument_info {
+struct simple_instrument_info {
 	unsigned int format;		/* supported format bits */
 	unsigned int effects;		/* supported effects (1 << SIMPLE_EFFECT_*) */
 	unsigned int max8_len;		/* maximum 8-bit wave length */
 	unsigned int max16_len;		/* maximum 16-bit wave length */
-} simple_instrument_info_t;
+};
 
 /*
  *  Instrument
  */
 
-typedef struct {
+struct simple_instrument {
 	unsigned int share_id[4];	/* share id - zero = no sharing */
 	unsigned int format;		/* wave format */
 
@@ -92,7 +92,7 @@ typedef struct {
 	unsigned char effect1_depth;	/* 0-127 */
 	unsigned char effect2;		/* effect 2 */
 	unsigned char effect2_depth;	/* 0-127 */
-} simple_instrument_t;
+};
 
 /*
  *
@@ -112,7 +112,7 @@ typedef struct {
  *  Instrument
  */
 
-typedef struct simple_xinstrument {
+struct simple_xinstrument {
 	__u32 stype;
 
 	__u32 share_id[4];		/* share id - zero = no sharing */
@@ -128,29 +128,32 @@ typedef struct simple_xinstrument {
 	__u8 effect1_depth;		/* 0-127 */
 	__u8 effect2;			/* effect 2 */
 	__u8 effect2_depth;		/* 0-127 */
-} simple_xinstrument_t;
+};
 
 #ifdef __KERNEL__
 
 #include "seq_instr.h"
 
-typedef struct {
+struct snd_simple_ops {
 	void *private_data;
-	int (*info)(void *private_data, simple_instrument_info_t *info);
-	int (*put_sample)(void *private_data, simple_instrument_t *instr,
+	int (*info)(void *private_data, struct simple_instrument_info *info);
+	int (*put_sample)(void *private_data, struct simple_instrument *instr,
 	                  char __user *data, long len, int atomic);
-	int (*get_sample)(void *private_data, simple_instrument_t *instr,
+	int (*get_sample)(void *private_data, struct simple_instrument *instr,
 			  char __user *data, long len, int atomic);
-	int (*remove_sample)(void *private_data, simple_instrument_t *instr,
+	int (*remove_sample)(void *private_data, struct simple_instrument *instr,
 			     int atomic);
-	void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what);
-	snd_seq_kinstr_ops_t kops;
-} snd_simple_ops_t;
+	void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what);
+	struct snd_seq_kinstr_ops kops;
+};
 
-int snd_seq_simple_init(snd_simple_ops_t *ops,
+int snd_seq_simple_init(struct snd_simple_ops *ops,
 			void *private_data,
-			snd_seq_kinstr_ops_t *next);
+			struct snd_seq_kinstr_ops *next);
 
 #endif
 
+/* typedefs for compatibility to user-space */
+typedef struct simple_xinstrument simple_xinstrument_t;
+
 #endif /* __SOUND_AINSTR_SIMPLE_H */
diff --git a/sound/core/seq/instr/ainstr_fm.c b/sound/core/seq/instr/ainstr_fm.c
index 5c671e69884..b09babf272c 100644
--- a/sound/core/seq/instr/ainstr_fm.c
+++ b/sound/core/seq/instr/ainstr_fm.c
@@ -30,11 +30,11 @@ MODULE_AUTHOR("Uros Bizjak <uros@kss-loka.si>");
 MODULE_DESCRIPTION("Advanced Linux Sound Architecture FM Instrument support.");
 MODULE_LICENSE("GPL");
 
-static int snd_seq_fm_put(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_fm_put(void *private_data, struct snd_seq_kinstr *instr,
 			  char __user *instr_data, long len, int atomic, int cmd)
 {
-	fm_instrument_t *ip;
-	fm_xinstrument_t ix;
+	struct fm_instrument *ip;
+	struct fm_xinstrument ix;
 	int idx;
 
 	if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE)
@@ -46,7 +46,7 @@ static int snd_seq_fm_put(void *private_data, snd_seq_kinstr_t *instr,
 		return -EFAULT;
 	if (ix.stype != FM_STRU_INSTR)
 		return -EINVAL;
-	ip = (fm_instrument_t *)KINSTR_DATA(instr);
+	ip = (struct fm_instrument *)KINSTR_DATA(instr);
 	ip->share_id[0] = le32_to_cpu(ix.share_id[0]);
 	ip->share_id[1] = le32_to_cpu(ix.share_id[1]);
 	ip->share_id[2] = le32_to_cpu(ix.share_id[2]);
@@ -72,12 +72,12 @@ static int snd_seq_fm_put(void *private_data, snd_seq_kinstr_t *instr,
 	return 0;
 }
 
-static int snd_seq_fm_get(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_fm_get(void *private_data, struct snd_seq_kinstr *instr,
 			  char __user *instr_data, long len, int atomic,
 			  int cmd)
 {
-	fm_instrument_t *ip;
-	fm_xinstrument_t ix;
+	struct fm_instrument *ip;
+	struct fm_xinstrument ix;
 	int idx;
 	
 	if (cmd != SNDRV_SEQ_INSTR_GET_CMD_FULL)
@@ -85,7 +85,7 @@ static int snd_seq_fm_get(void *private_data, snd_seq_kinstr_t *instr,
 	if (len < (long)sizeof(ix))
 		return -ENOMEM;
 	memset(&ix, 0, sizeof(ix));
-	ip = (fm_instrument_t *)KINSTR_DATA(instr);
+	ip = (struct fm_instrument *)KINSTR_DATA(instr);
 	ix.stype = FM_STRU_INSTR;
 	ix.share_id[0] = cpu_to_le32(ip->share_id[0]);
 	ix.share_id[1] = cpu_to_le32(ip->share_id[1]);
@@ -114,19 +114,19 @@ static int snd_seq_fm_get(void *private_data, snd_seq_kinstr_t *instr,
 	return 0;
 }
 
-static int snd_seq_fm_get_size(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_fm_get_size(void *private_data, struct snd_seq_kinstr *instr,
 			       long *size)
 {
-	*size = sizeof(fm_xinstrument_t);
+	*size = sizeof(struct fm_xinstrument);
 	return 0;
 }
 
-int snd_seq_fm_init(snd_seq_kinstr_ops_t *ops,
-		    snd_seq_kinstr_ops_t *next)
+int snd_seq_fm_init(struct snd_seq_kinstr_ops *ops,
+		    struct snd_seq_kinstr_ops *next)
 {
 	memset(ops, 0, sizeof(*ops));
 	// ops->private_data = private_data;
-	ops->add_len = sizeof(fm_instrument_t);
+	ops->add_len = sizeof(struct fm_instrument);
 	ops->instr_type = SNDRV_SEQ_INSTR_ID_OPL2_3;
 	ops->put = snd_seq_fm_put;
 	ops->get = snd_seq_fm_get;
diff --git a/sound/core/seq/instr/ainstr_gf1.c b/sound/core/seq/instr/ainstr_gf1.c
index 0e4df8826ee..3c31038a74b 100644
--- a/sound/core/seq/instr/ainstr_gf1.c
+++ b/sound/core/seq/instr/ainstr_gf1.c
@@ -42,14 +42,14 @@ static unsigned int snd_seq_gf1_size(unsigned int size, unsigned int format)
 	return format;
 }
 
-static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops,
-					     gf1_instrument_t *ip,
+static int snd_seq_gf1_copy_wave_from_stream(struct snd_gf1_ops *ops,
+					     struct gf1_instrument *ip,
 					     char __user **data,
 					     long *len,
 					     int atomic)
 {
-	gf1_wave_t *wp, *prev;
-	gf1_xwave_t xp;
+	struct gf1_wave *wp, *prev;
+	struct gf1_xwave xp;
 	int err;
 	gfp_t gfp_mask;
 	unsigned int real_size;
@@ -116,8 +116,8 @@ static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops,
 	return 0;
 }
 
-static void snd_seq_gf1_wave_free(snd_gf1_ops_t *ops,
-				  gf1_wave_t *wave,
+static void snd_seq_gf1_wave_free(struct snd_gf1_ops *ops,
+				  struct gf1_wave *wave,
 				  int atomic)
 {
 	if (ops->remove_sample)
@@ -125,11 +125,11 @@ static void snd_seq_gf1_wave_free(snd_gf1_ops_t *ops,
 	kfree(wave);
 }
 
-static void snd_seq_gf1_instr_free(snd_gf1_ops_t *ops,
-				   gf1_instrument_t *ip,
+static void snd_seq_gf1_instr_free(struct snd_gf1_ops *ops,
+				   struct gf1_instrument *ip,
 				   int atomic)
 {
-	gf1_wave_t *wave;
+	struct gf1_wave *wave;
 	
 	while ((wave = ip->wave) != NULL) {
 		ip->wave = wave->next;
@@ -137,13 +137,13 @@ static void snd_seq_gf1_instr_free(snd_gf1_ops_t *ops,
 	}
 }
 
-static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_gf1_put(void *private_data, struct snd_seq_kinstr *instr,
 			   char __user *instr_data, long len, int atomic,
 			   int cmd)
 {
-	snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data;
-	gf1_instrument_t *ip;
-	gf1_xinstrument_t ix;
+	struct snd_gf1_ops *ops = private_data;
+	struct gf1_instrument *ip;
+	struct gf1_xinstrument ix;
 	int err;
 	gfp_t gfp_mask;
 
@@ -159,7 +159,7 @@ static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr,
 		return -EINVAL;
 	instr_data += sizeof(ix);
 	len -= sizeof(ix);
-	ip = (gf1_instrument_t *)KINSTR_DATA(instr);
+	ip = (struct gf1_instrument *)KINSTR_DATA(instr);
 	ip->exclusion = le16_to_cpu(ix.exclusion);
 	ip->exclusion_group = le16_to_cpu(ix.exclusion_group);
 	ip->effect1 = ix.effect1;
@@ -189,14 +189,14 @@ static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr,
 	return 0;
 }
 
-static int snd_seq_gf1_copy_wave_to_stream(snd_gf1_ops_t *ops,
-					   gf1_instrument_t *ip,
+static int snd_seq_gf1_copy_wave_to_stream(struct snd_gf1_ops *ops,
+					   struct gf1_instrument *ip,
 					   char __user **data,
 					   long *len,
 					   int atomic)
 {
-	gf1_wave_t *wp;
-	gf1_xwave_t xp;
+	struct gf1_wave *wp;
+	struct gf1_xwave xp;
 	int err;
 	unsigned int real_size;
 	
@@ -251,20 +251,20 @@ static int snd_seq_gf1_copy_wave_to_stream(snd_gf1_ops_t *ops,
 	return 0;
 }
 
-static int snd_seq_gf1_get(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_gf1_get(void *private_data, struct snd_seq_kinstr *instr,
 			   char __user *instr_data, long len, int atomic,
 			   int cmd)
 {
-	snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data;
-	gf1_instrument_t *ip;
-	gf1_xinstrument_t ix;
+	struct snd_gf1_ops *ops = private_data;
+	struct gf1_instrument *ip;
+	struct gf1_xinstrument ix;
 	
 	if (cmd != SNDRV_SEQ_INSTR_GET_CMD_FULL)
 		return -EINVAL;
 	if (len < (long)sizeof(ix))
 		return -ENOMEM;
 	memset(&ix, 0, sizeof(ix));
-	ip = (gf1_instrument_t *)KINSTR_DATA(instr);
+	ip = (struct gf1_instrument *)KINSTR_DATA(instr);
 	ix.stype = GF1_STRU_INSTR;
 	ix.exclusion = cpu_to_le16(ip->exclusion);
 	ix.exclusion_group = cpu_to_le16(ip->exclusion_group);
@@ -283,18 +283,18 @@ static int snd_seq_gf1_get(void *private_data, snd_seq_kinstr_t *instr,
 					       atomic);
 }
 
-static int snd_seq_gf1_get_size(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_gf1_get_size(void *private_data, struct snd_seq_kinstr *instr,
 				long *size)
 {
 	long result;
-	gf1_instrument_t *ip;
-	gf1_wave_t *wp;
+	struct gf1_instrument *ip;
+	struct gf1_wave *wp;
 
 	*size = 0;
-	ip = (gf1_instrument_t *)KINSTR_DATA(instr);
-	result = sizeof(gf1_xinstrument_t);
+	ip = (struct gf1_instrument *)KINSTR_DATA(instr);
+	result = sizeof(struct gf1_xinstrument);
 	for (wp = ip->wave; wp; wp = wp->next) {
-		result += sizeof(gf1_xwave_t);
+		result += sizeof(struct gf1_xwave);
 		result += wp->size;
 	}
 	*size = result;
@@ -302,35 +302,35 @@ static int snd_seq_gf1_get_size(void *private_data, snd_seq_kinstr_t *instr,
 }
 
 static int snd_seq_gf1_remove(void *private_data,
-			      snd_seq_kinstr_t *instr,
+			      struct snd_seq_kinstr *instr,
                               int atomic)
 {
-	snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data;
-	gf1_instrument_t *ip;
+	struct snd_gf1_ops *ops = private_data;
+	struct gf1_instrument *ip;
 
-	ip = (gf1_instrument_t *)KINSTR_DATA(instr);
+	ip = (struct gf1_instrument *)KINSTR_DATA(instr);
 	snd_seq_gf1_instr_free(ops, ip, atomic);
 	return 0;
 }
 
 static void snd_seq_gf1_notify(void *private_data,
-			       snd_seq_kinstr_t *instr,
+			       struct snd_seq_kinstr *instr,
 			       int what)
 {
-	snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data;
+	struct snd_gf1_ops *ops = private_data;
 
 	if (ops->notify)
 		ops->notify(ops->private_data, instr, what);
 }
 
-int snd_seq_gf1_init(snd_gf1_ops_t *ops,
+int snd_seq_gf1_init(struct snd_gf1_ops *ops,
 		     void *private_data,
-		     snd_seq_kinstr_ops_t *next)
+		     struct snd_seq_kinstr_ops *next)
 {
 	memset(ops, 0, sizeof(*ops));
 	ops->private_data = private_data;
 	ops->kops.private_data = ops;
-	ops->kops.add_len = sizeof(gf1_instrument_t);
+	ops->kops.add_len = sizeof(struct gf1_instrument);
 	ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_GUS_PATCH;
 	ops->kops.put = snd_seq_gf1_put;
 	ops->kops.get = snd_seq_gf1_get;
diff --git a/sound/core/seq/instr/ainstr_iw.c b/sound/core/seq/instr/ainstr_iw.c
index 7c19fbbc5d0..7f8df19ba56 100644
--- a/sound/core/seq/instr/ainstr_iw.c
+++ b/sound/core/seq/instr/ainstr_iw.c
@@ -42,8 +42,8 @@ static unsigned int snd_seq_iwffff_size(unsigned int size, unsigned int format)
 	return result;
 }
 
-static void snd_seq_iwffff_copy_lfo_from_stream(iwffff_lfo_t *fp,
-						iwffff_xlfo_t *fx)
+static void snd_seq_iwffff_copy_lfo_from_stream(struct iwffff_lfo *fp,
+						struct iwffff_xlfo *fx)
 {
 	fp->freq = le16_to_cpu(fx->freq);
 	fp->depth = le16_to_cpu(fx->depth);
@@ -53,18 +53,18 @@ static void snd_seq_iwffff_copy_lfo_from_stream(iwffff_lfo_t *fp,
 }
 
 static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
-					       iwffff_layer_t *lp,
-					       iwffff_env_t *ep,
-					       iwffff_xenv_t *ex,
+					       struct iwffff_layer *lp,
+					       struct iwffff_env *ep,
+					       struct iwffff_xenv *ex,
 					       char __user **data,
 					       long *len,
 					       gfp_t gfp_mask)
 {
 	__u32 stype;
-	iwffff_env_record_t *rp, *rp_last;
-	iwffff_xenv_record_t rx;
-	iwffff_env_point_t *pp;
-	iwffff_xenv_point_t px;
+	struct iwffff_env_record *rp, *rp_last;
+	struct iwffff_xenv_record rx;
+	struct iwffff_env_point *pp;
+	struct iwffff_xenv_point px;
 	int points_size, idx;
 
 	ep->flags = ex->flags;
@@ -101,7 +101,7 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
 		rp->sustain_rate = le16_to_cpu(rx.sustain_rate);
 		rp->release_rate = le16_to_cpu(rx.release_rate);
 		rp->hirange = rx.hirange;
-		pp = (iwffff_env_point_t *)(rp + 1);
+		pp = (struct iwffff_env_point *)(rp + 1);
 		for (idx = 0; idx < rp->nattack + rp->nrelease; idx++) {
 			if (copy_from_user(&px, *data, sizeof(px)))
 				return -EFAULT;
@@ -120,14 +120,14 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
 	return 0;
 }
 
-static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops,
-						iwffff_layer_t *lp,
+static int snd_seq_iwffff_copy_wave_from_stream(struct snd_iwffff_ops *ops,
+						struct iwffff_layer *lp,
 					        char __user **data,
 					        long *len,
 					        int atomic)
 {
-	iwffff_wave_t *wp, *prev;
-	iwffff_xwave_t xp;
+	struct iwffff_wave *wp, *prev;
+	struct iwffff_xwave xp;
 	int err;
 	gfp_t gfp_mask;
 	unsigned int real_size;
@@ -186,11 +186,11 @@ static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops,
 	return 0;
 }
 
-static void snd_seq_iwffff_env_free(snd_iwffff_ops_t *ops,
-				    iwffff_env_t *env,
+static void snd_seq_iwffff_env_free(struct snd_iwffff_ops *ops,
+				    struct iwffff_env *env,
 				    int atomic)
 {
-	iwffff_env_record_t *rec;
+	struct iwffff_env_record *rec;
 	
 	while ((rec = env->record) != NULL) {
 		env->record = rec->next;
@@ -198,8 +198,8 @@ static void snd_seq_iwffff_env_free(snd_iwffff_ops_t *ops,
 	}
 }
 				    
-static void snd_seq_iwffff_wave_free(snd_iwffff_ops_t *ops,
-				     iwffff_wave_t *wave,
+static void snd_seq_iwffff_wave_free(struct snd_iwffff_ops *ops,
+				     struct iwffff_wave *wave,
 				     int atomic)
 {
 	if (ops->remove_sample)
@@ -207,12 +207,12 @@ static void snd_seq_iwffff_wave_free(snd_iwffff_ops_t *ops,
 	kfree(wave);
 }
 
-static void snd_seq_iwffff_instr_free(snd_iwffff_ops_t *ops,
-                                      iwffff_instrument_t *ip,
+static void snd_seq_iwffff_instr_free(struct snd_iwffff_ops *ops,
+                                      struct iwffff_instrument *ip,
                                       int atomic)
 {
-	iwffff_layer_t *layer;
-	iwffff_wave_t *wave;
+	struct iwffff_layer *layer;
+	struct iwffff_wave *wave;
 	
 	while ((layer = ip->layer) != NULL) {
 		ip->layer = layer->next;
@@ -226,15 +226,15 @@ static void snd_seq_iwffff_instr_free(snd_iwffff_ops_t *ops,
 	}
 }
 
-static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_iwffff_put(void *private_data, struct snd_seq_kinstr *instr,
 			      char __user *instr_data, long len, int atomic,
 			      int cmd)
 {
-	snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data;
-	iwffff_instrument_t *ip;
-	iwffff_xinstrument_t ix;
-	iwffff_layer_t *lp, *prev_lp;
-	iwffff_xlayer_t lx;
+	struct snd_iwffff_ops *ops = private_data;
+	struct iwffff_instrument *ip;
+	struct iwffff_xinstrument ix;
+	struct iwffff_layer *lp, *prev_lp;
+	struct iwffff_xlayer lx;
 	int err;
 	gfp_t gfp_mask;
 
@@ -250,7 +250,7 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
 		return -EINVAL;
 	instr_data += sizeof(ix);
 	len -= sizeof(ix);
-	ip = (iwffff_instrument_t *)KINSTR_DATA(instr);
+	ip = (struct iwffff_instrument *)KINSTR_DATA(instr);
 	ip->exclusion = le16_to_cpu(ix.exclusion);
 	ip->layer_type = le16_to_cpu(ix.layer_type);
 	ip->exclusion_group = le16_to_cpu(ix.exclusion_group);
@@ -261,7 +261,7 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
 	/* copy layers */
 	prev_lp = NULL;
 	while (len > 0) {
-		if (len < (long)sizeof(iwffff_xlayer_t)) {
+		if (len < (long)sizeof(struct iwffff_xlayer)) {
 			snd_seq_iwffff_instr_free(ops, ip, atomic);
 			return -EINVAL;
 		}
@@ -335,8 +335,8 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
 	return 0;
 }
 
-static void snd_seq_iwffff_copy_lfo_to_stream(iwffff_xlfo_t *fx,
-					      iwffff_lfo_t *fp)
+static void snd_seq_iwffff_copy_lfo_to_stream(struct iwffff_xlfo *fx,
+					      struct iwffff_lfo *fp)
 {
 	fx->freq = cpu_to_le16(fp->freq);
 	fx->depth = cpu_to_le16(fp->depth);
@@ -346,16 +346,16 @@ static void snd_seq_iwffff_copy_lfo_to_stream(iwffff_xlfo_t *fx,
 }
 
 static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype,
-					     iwffff_layer_t *lp,
-					     iwffff_xenv_t *ex,
-					     iwffff_env_t *ep,
+					     struct iwffff_layer *lp,
+					     struct iwffff_xenv *ex,
+					     struct iwffff_env *ep,
 					     char __user **data,
 					     long *len)
 {
-	iwffff_env_record_t *rp;
-	iwffff_xenv_record_t rx;
-	iwffff_env_point_t *pp;
-	iwffff_xenv_point_t px;
+	struct iwffff_env_record *rp;
+	struct iwffff_xenv_record rx;
+	struct iwffff_env_point *pp;
+	struct iwffff_xenv_point px;
 	int points_size, idx;
 
 	ex->flags = ep->flags;
@@ -379,7 +379,7 @@ static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype,
 		points_size = (rp->nattack + rp->nrelease) * 2 * sizeof(__u16);
 		if (*len < points_size)
 			return -ENOMEM;
-		pp = (iwffff_env_point_t *)(rp + 1);
+		pp = (struct iwffff_env_point *)(rp + 1);
 		for (idx = 0; idx < rp->nattack + rp->nrelease; idx++) {
 			px.offset = cpu_to_le16(pp->offset);
 			px.rate = cpu_to_le16(pp->rate);
@@ -392,14 +392,14 @@ static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype,
 	return 0;
 }
 
-static int snd_seq_iwffff_copy_wave_to_stream(snd_iwffff_ops_t *ops,
-					      iwffff_layer_t *lp,
+static int snd_seq_iwffff_copy_wave_to_stream(struct snd_iwffff_ops *ops,
+					      struct iwffff_layer *lp,
 					      char __user **data,
 					      long *len,
 					      int atomic)
 {
-	iwffff_wave_t *wp;
-	iwffff_xwave_t xp;
+	struct iwffff_wave *wp;
+	struct iwffff_xwave xp;
 	int err;
 	unsigned int real_size;
 	
@@ -447,14 +447,14 @@ static int snd_seq_iwffff_copy_wave_to_stream(snd_iwffff_ops_t *ops,
 	return 0;
 }
 
-static int snd_seq_iwffff_get(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_iwffff_get(void *private_data, struct snd_seq_kinstr *instr,
 			      char __user *instr_data, long len, int atomic, int cmd)
 {
-	snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data;
-	iwffff_instrument_t *ip;
-	iwffff_xinstrument_t ix;
-	iwffff_layer_t *lp;
-	iwffff_xlayer_t lx;
+	struct snd_iwffff_ops *ops = private_data;
+	struct iwffff_instrument *ip;
+	struct iwffff_xinstrument ix;
+	struct iwffff_layer *lp;
+	struct iwffff_xlayer lx;
 	char __user *layer_instr_data;
 	int err;
 	
@@ -463,7 +463,7 @@ static int snd_seq_iwffff_get(void *private_data, snd_seq_kinstr_t *instr,
 	if (len < (long)sizeof(ix))
 		return -ENOMEM;
 	memset(&ix, 0, sizeof(ix));
-	ip = (iwffff_instrument_t *)KINSTR_DATA(instr);
+	ip = (struct iwffff_instrument *)KINSTR_DATA(instr);
 	ix.stype = IWFFFF_STRU_INSTR;
 	ix.exclusion = cpu_to_le16(ip->exclusion);
 	ix.layer_type = cpu_to_le16(ip->layer_type);
@@ -520,43 +520,43 @@ static int snd_seq_iwffff_get(void *private_data, snd_seq_kinstr_t *instr,
 	return 0;
 }
 
-static long snd_seq_iwffff_env_size_in_stream(iwffff_env_t *ep)
+static long snd_seq_iwffff_env_size_in_stream(struct iwffff_env *ep)
 {
 	long result = 0;
-	iwffff_env_record_t *rp;
+	struct iwffff_env_record *rp;
 
 	for (rp = ep->record; rp; rp = rp->next) {
-		result += sizeof(iwffff_xenv_record_t);
+		result += sizeof(struct iwffff_xenv_record);
 		result += (rp->nattack + rp->nrelease) * 2 * sizeof(__u16);
 	}
 	return 0;
 }
 
-static long snd_seq_iwffff_wave_size_in_stream(iwffff_layer_t *lp)
+static long snd_seq_iwffff_wave_size_in_stream(struct iwffff_layer *lp)
 {
 	long result = 0;
-	iwffff_wave_t *wp;
+	struct iwffff_wave *wp;
 	
 	for (wp = lp->wave; wp; wp = wp->next) {
-		result += sizeof(iwffff_xwave_t);
+		result += sizeof(struct iwffff_xwave);
 		if (!(wp->format & IWFFFF_WAVE_ROM))
 			result += wp->size;
 	}
 	return result;
 }
 
-static int snd_seq_iwffff_get_size(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_iwffff_get_size(void *private_data, struct snd_seq_kinstr *instr,
 				   long *size)
 {
 	long result;
-	iwffff_instrument_t *ip;
-	iwffff_layer_t *lp;
+	struct iwffff_instrument *ip;
+	struct iwffff_layer *lp;
 
 	*size = 0;
-	ip = (iwffff_instrument_t *)KINSTR_DATA(instr);
-	result = sizeof(iwffff_xinstrument_t);
+	ip = (struct iwffff_instrument *)KINSTR_DATA(instr);
+	result = sizeof(struct iwffff_xinstrument);
 	for (lp = ip->layer; lp; lp = lp->next) {
-		result += sizeof(iwffff_xlayer_t);
+		result += sizeof(struct iwffff_xlayer);
 		result += snd_seq_iwffff_env_size_in_stream(&lp->penv);
 		result += snd_seq_iwffff_env_size_in_stream(&lp->venv);
 		result += snd_seq_iwffff_wave_size_in_stream(lp);
@@ -566,35 +566,35 @@ static int snd_seq_iwffff_get_size(void *private_data, snd_seq_kinstr_t *instr,
 }
 
 static int snd_seq_iwffff_remove(void *private_data,
-				 snd_seq_kinstr_t *instr,
+				 struct snd_seq_kinstr *instr,
                                  int atomic)
 {
-	snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data;
-	iwffff_instrument_t *ip;
+	struct snd_iwffff_ops *ops = private_data;
+	struct iwffff_instrument *ip;
 
-	ip = (iwffff_instrument_t *)KINSTR_DATA(instr);
+	ip = (struct iwffff_instrument *)KINSTR_DATA(instr);
 	snd_seq_iwffff_instr_free(ops, ip, atomic);
 	return 0;
 }
 
 static void snd_seq_iwffff_notify(void *private_data,
-				  snd_seq_kinstr_t *instr,
+				  struct snd_seq_kinstr *instr,
                                   int what)
 {
-	snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data;
+	struct snd_iwffff_ops *ops = private_data;
 
 	if (ops->notify)
 		ops->notify(ops->private_data, instr, what);
 }
 
-int snd_seq_iwffff_init(snd_iwffff_ops_t *ops,
+int snd_seq_iwffff_init(struct snd_iwffff_ops *ops,
 			void *private_data,
-			snd_seq_kinstr_ops_t *next)
+			struct snd_seq_kinstr_ops *next)
 {
 	memset(ops, 0, sizeof(*ops));
 	ops->private_data = private_data;
 	ops->kops.private_data = ops;
-	ops->kops.add_len = sizeof(iwffff_instrument_t);
+	ops->kops.add_len = sizeof(struct iwffff_instrument);
 	ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_INTERWAVE;
 	ops->kops.put = snd_seq_iwffff_put;
 	ops->kops.get = snd_seq_iwffff_get;
diff --git a/sound/core/seq/instr/ainstr_simple.c b/sound/core/seq/instr/ainstr_simple.c
index 17ab94e7607..6d6ffece7cb 100644
--- a/sound/core/seq/instr/ainstr_simple.c
+++ b/sound/core/seq/instr/ainstr_simple.c
@@ -42,21 +42,21 @@ static unsigned int snd_seq_simple_size(unsigned int size, unsigned int format)
 	return result;
 }
 
-static void snd_seq_simple_instr_free(snd_simple_ops_t *ops,
-				      simple_instrument_t *ip,
+static void snd_seq_simple_instr_free(struct snd_simple_ops *ops,
+				      struct simple_instrument *ip,
 				      int atomic)
 {
 	if (ops->remove_sample)
 		ops->remove_sample(ops->private_data, ip, atomic);
 }
 
-static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_simple_put(void *private_data, struct snd_seq_kinstr *instr,
 			      char __user *instr_data, long len,
 			      int atomic, int cmd)
 {
-	snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data;
-	simple_instrument_t *ip;
-	simple_xinstrument_t ix;
+	struct snd_simple_ops *ops = private_data;
+	struct simple_instrument *ip;
+	struct simple_xinstrument ix;
 	int err;
 	gfp_t gfp_mask;
 	unsigned int real_size;
@@ -73,7 +73,7 @@ static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr,
 		return -EINVAL;
 	instr_data += sizeof(ix);
 	len -= sizeof(ix);
-	ip = (simple_instrument_t *)KINSTR_DATA(instr);
+	ip = (struct simple_instrument *)KINSTR_DATA(instr);
 	ip->share_id[0] = le32_to_cpu(ix.share_id[0]);
 	ip->share_id[1] = le32_to_cpu(ix.share_id[1]);
 	ip->share_id[2] = le32_to_cpu(ix.share_id[2]);
@@ -100,13 +100,13 @@ static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr,
 	return 0;
 }
 
-static int snd_seq_simple_get(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_simple_get(void *private_data, struct snd_seq_kinstr *instr,
 			      char __user *instr_data, long len,
 			      int atomic, int cmd)
 {
-	snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data;
-	simple_instrument_t *ip;
-	simple_xinstrument_t ix;
+	struct snd_simple_ops *ops = private_data;
+	struct simple_instrument *ip;
+	struct simple_xinstrument ix;
 	int err;
 	unsigned int real_size;
 	
@@ -115,7 +115,7 @@ static int snd_seq_simple_get(void *private_data, snd_seq_kinstr_t *instr,
 	if (len < (long)sizeof(ix))
 		return -ENOMEM;
 	memset(&ix, 0, sizeof(ix));
-	ip = (simple_instrument_t *)KINSTR_DATA(instr);
+	ip = (struct simple_instrument *)KINSTR_DATA(instr);
 	ix.stype = SIMPLE_STRU_INSTR;
 	ix.share_id[0] = cpu_to_le32(ip->share_id[0]);
 	ix.share_id[1] = cpu_to_le32(ip->share_id[1]);
@@ -147,46 +147,46 @@ static int snd_seq_simple_get(void *private_data, snd_seq_kinstr_t *instr,
 	return 0;
 }
 
-static int snd_seq_simple_get_size(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_simple_get_size(void *private_data, struct snd_seq_kinstr *instr,
 				   long *size)
 {
-	simple_instrument_t *ip;
+	struct simple_instrument *ip;
 
-	ip = (simple_instrument_t *)KINSTR_DATA(instr);
-	*size = sizeof(simple_xinstrument_t) + snd_seq_simple_size(ip->size, ip->format);
+	ip = (struct simple_instrument *)KINSTR_DATA(instr);
+	*size = sizeof(struct simple_xinstrument) + snd_seq_simple_size(ip->size, ip->format);
 	return 0;
 }
 
 static int snd_seq_simple_remove(void *private_data,
-			         snd_seq_kinstr_t *instr,
+			         struct snd_seq_kinstr *instr,
                                  int atomic)
 {
-	snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data;
-	simple_instrument_t *ip;
+	struct snd_simple_ops *ops = private_data;
+	struct simple_instrument *ip;
 
-	ip = (simple_instrument_t *)KINSTR_DATA(instr);
+	ip = (struct simple_instrument *)KINSTR_DATA(instr);
 	snd_seq_simple_instr_free(ops, ip, atomic);
 	return 0;
 }
 
 static void snd_seq_simple_notify(void *private_data,
-			          snd_seq_kinstr_t *instr,
+			          struct snd_seq_kinstr *instr,
                                   int what)
 {
-	snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data;
+	struct snd_simple_ops *ops = private_data;
 
 	if (ops->notify)
 		ops->notify(ops->private_data, instr, what);
 }
 
-int snd_seq_simple_init(snd_simple_ops_t *ops,
+int snd_seq_simple_init(struct snd_simple_ops *ops,
 		        void *private_data,
-		        snd_seq_kinstr_ops_t *next)
+		        struct snd_seq_kinstr_ops *next)
 {
 	memset(ops, 0, sizeof(*ops));
 	ops->private_data = private_data;
 	ops->kops.private_data = ops;
-	ops->kops.add_len = sizeof(simple_instrument_t);
+	ops->kops.add_len = sizeof(struct simple_instrument);
 	ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_SIMPLE;
 	ops->kops.put = snd_seq_simple_put;
 	ops->kops.get = snd_seq_simple_get;
-- 
cgit v1.2.3-70-g09d2


From 080dece3460b534bedc4ef4ba3abaa57e9486331 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:05:16 +0100
Subject: [ALSA] Remove xxx_t typedefs: Sequencer OSS-emulation

Modules: ALSA<-OSS sequencer,ALSA sequencer

Remove xxx_t typedefs from the core sequencer OSS-emulation codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/seq_oss.h             | 30 +++++-------
 sound/core/seq/oss/seq_oss.c        | 24 +++++-----
 sound/core/seq/oss/seq_oss_device.h | 60 ++++++++++-------------
 sound/core/seq/oss/seq_oss_event.c  | 60 +++++++++++------------
 sound/core/seq/oss/seq_oss_event.h  | 50 +++++++++----------
 sound/core/seq/oss/seq_oss_init.c   | 52 ++++++++++----------
 sound/core/seq/oss/seq_oss_ioctl.c  | 12 ++---
 sound/core/seq/oss/seq_oss_midi.c   | 96 ++++++++++++++++++-------------------
 sound/core/seq/oss/seq_oss_midi.h   | 27 +++++------
 sound/core/seq/oss/seq_oss_readq.c  | 32 ++++++-------
 sound/core/seq/oss/seq_oss_readq.h  | 24 +++++-----
 sound/core/seq/oss/seq_oss_rw.c     | 18 +++----
 sound/core/seq/oss/seq_oss_synth.c  | 92 +++++++++++++++++------------------
 sound/core/seq/oss/seq_oss_synth.h  | 32 +++++++------
 sound/core/seq/oss/seq_oss_timer.c  | 34 ++++++-------
 sound/core/seq/oss/seq_oss_timer.h  | 22 ++++-----
 sound/core/seq/oss/seq_oss_writeq.c | 34 ++++++-------
 sound/core/seq/oss/seq_oss_writeq.h | 18 +++----
 18 files changed, 352 insertions(+), 365 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/seq_oss.h b/include/sound/seq_oss.h
index bd7e57322ab..9b060bbd6e0 100644
--- a/include/sound/seq_oss.h
+++ b/include/sound/seq_oss.h
@@ -24,23 +24,17 @@
 #include "asequencer.h"
 #include "seq_kernel.h"
 
-/*
- * type definitions
- */
-typedef struct snd_seq_oss_arg_t snd_seq_oss_arg_t;
-typedef struct snd_seq_oss_callback_t snd_seq_oss_callback_t;
-
 /*
  * argument structure for synthesizer operations
  */
-struct snd_seq_oss_arg_t {
+struct snd_seq_oss_arg {
 	/* given by OSS sequencer */
 	int app_index;	/* application unique index */
 	int file_mode;	/* file mode - see below */
 	int seq_mode;	/* sequencer mode - see below */
 
 	/* following must be initialized in open callback */
-	snd_seq_addr_t addr;	/* opened port address */
+	struct snd_seq_addr addr;	/* opened port address */
 	void *private_data;	/* private data for lowlevel drivers */
 
 	/* note-on event passing mode: initially given by OSS seq,
@@ -53,14 +47,14 @@ struct snd_seq_oss_arg_t {
 /*
  * synthesizer operation callbacks
  */
-struct snd_seq_oss_callback_t {
+struct snd_seq_oss_callback {
 	struct module *owner;
-	int (*open)(snd_seq_oss_arg_t *p, void *closure);
-	int (*close)(snd_seq_oss_arg_t *p);
-	int (*ioctl)(snd_seq_oss_arg_t *p, unsigned int cmd, unsigned long arg);
-	int (*load_patch)(snd_seq_oss_arg_t *p, int format, const char __user *buf, int offs, int count);
-	int (*reset)(snd_seq_oss_arg_t *p);
-	int (*raw_event)(snd_seq_oss_arg_t *p, unsigned char *data);
+	int (*open)(struct snd_seq_oss_arg *p, void *closure);
+	int (*close)(struct snd_seq_oss_arg *p);
+	int (*ioctl)(struct snd_seq_oss_arg *p, unsigned int cmd, unsigned long arg);
+	int (*load_patch)(struct snd_seq_oss_arg *p, int format, const char __user *buf, int offs, int count);
+	int (*reset)(struct snd_seq_oss_arg *p);
+	int (*raw_event)(struct snd_seq_oss_arg *p, unsigned char *data);
 };
 
 /* flag: file_mode */
@@ -88,13 +82,13 @@ struct snd_seq_oss_callback_t {
 /*
  * data pointer to snd_seq_register_device
  */
-typedef struct snd_seq_oss_reg {
+struct snd_seq_oss_reg {
 	int type;
 	int subtype;
 	int nvoices;
-	snd_seq_oss_callback_t oper;
+	struct snd_seq_oss_callback oper;
 	void *private_data;
-} snd_seq_oss_reg_t;
+};
 
 /* device id */
 #define SNDRV_SEQ_DEV_ID_OSS		"seq-oss"
diff --git a/sound/core/seq/oss/seq_oss.c b/sound/core/seq/oss/seq_oss.c
index 4c0558c0a8b..2371e41b13e 100644
--- a/sound/core/seq/oss/seq_oss.c
+++ b/sound/core/seq/oss/seq_oss.c
@@ -62,7 +62,7 @@ static ssize_t odev_write(struct file *file, const char __user *buf, size_t coun
 static long odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
 static unsigned int odev_poll(struct file *file, poll_table * wait);
 #ifdef CONFIG_PROC_FS
-static void info_read(snd_info_entry_t *entry, snd_info_buffer_t *buf);
+static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buf);
 #endif
 
 
@@ -73,7 +73,7 @@ static void info_read(snd_info_entry_t *entry, snd_info_buffer_t *buf);
 static int __init alsa_seq_oss_init(void)
 {
 	int rc;
-	static snd_seq_dev_ops_t ops = {
+	static struct snd_seq_dev_ops ops = {
 		snd_seq_oss_synth_register,
 		snd_seq_oss_synth_unregister,
 	};
@@ -92,7 +92,7 @@ static int __init alsa_seq_oss_init(void)
 	}
 
 	if ((rc = snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OSS, &ops,
-						 sizeof(snd_seq_oss_reg_t))) < 0) {
+						 sizeof(struct snd_seq_oss_reg))) < 0) {
 		snd_seq_oss_delete_client();
 		unregister_proc();
 		unregister_device();
@@ -144,7 +144,7 @@ odev_open(struct inode *inode, struct file *file)
 static int
 odev_release(struct inode *inode, struct file *file)
 {
-	seq_oss_devinfo_t *dp;
+	struct seq_oss_devinfo *dp;
 
 	if ((dp = file->private_data) == NULL)
 		return 0;
@@ -161,7 +161,7 @@ odev_release(struct inode *inode, struct file *file)
 static ssize_t
 odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
 {
-	seq_oss_devinfo_t *dp;
+	struct seq_oss_devinfo *dp;
 	dp = file->private_data;
 	snd_assert(dp != NULL, return -EIO);
 	return snd_seq_oss_read(dp, buf, count);
@@ -171,7 +171,7 @@ odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
 static ssize_t
 odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
 {
-	seq_oss_devinfo_t *dp;
+	struct seq_oss_devinfo *dp;
 	dp = file->private_data;
 	snd_assert(dp != NULL, return -EIO);
 	return snd_seq_oss_write(dp, buf, count, file);
@@ -180,7 +180,7 @@ odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offs
 static long
 odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	seq_oss_devinfo_t *dp;
+	struct seq_oss_devinfo *dp;
 	dp = file->private_data;
 	snd_assert(dp != NULL, return -EIO);
 	return snd_seq_oss_ioctl(dp, cmd, arg);
@@ -195,7 +195,7 @@ odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 static unsigned int
 odev_poll(struct file *file, poll_table * wait)
 {
-	seq_oss_devinfo_t *dp;
+	struct seq_oss_devinfo *dp;
 	dp = file->private_data;
 	snd_assert(dp != NULL, return 0);
 	return snd_seq_oss_poll(dp, file, wait);
@@ -217,7 +217,7 @@ static struct file_operations seq_oss_f_ops =
 	.compat_ioctl =	odev_ioctl_compat,
 };
 
-static snd_minor_t seq_oss_reg = {
+static struct snd_minor seq_oss_reg = {
 	.comment =	"sequencer",
 	.f_ops =	&seq_oss_f_ops,
 };
@@ -268,10 +268,10 @@ unregister_device(void)
 
 #ifdef CONFIG_PROC_FS
 
-static snd_info_entry_t *info_entry;
+static struct snd_info_entry *info_entry;
 
 static void
-info_read(snd_info_entry_t *entry, snd_info_buffer_t *buf)
+info_read(struct snd_info_entry *entry, struct snd_info_buffer *buf)
 {
 	down(&register_mutex);
 	snd_iprintf(buf, "OSS sequencer emulation version %s\n", SNDRV_SEQ_OSS_VERSION_STR);
@@ -287,7 +287,7 @@ static int __init
 register_proc(void)
 {
 #ifdef CONFIG_PROC_FS
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	entry = snd_info_create_module_entry(THIS_MODULE, SNDRV_SEQ_OSS_PROCNAME, snd_seq_root);
 	if (entry == NULL)
diff --git a/sound/core/seq/oss/seq_oss_device.h b/sound/core/seq/oss/seq_oss_device.h
index 973786758c5..9a8567c928e 100644
--- a/sound/core/seq/oss/seq_oss_device.h
+++ b/sound/core/seq/oss/seq_oss_device.h
@@ -55,32 +55,24 @@
  * type definitions
  */
 
-typedef struct seq_oss_devinfo_t seq_oss_devinfo_t;
-typedef struct seq_oss_writeq_t seq_oss_writeq_t;
-typedef struct seq_oss_readq_t seq_oss_readq_t;
-typedef struct seq_oss_timer_t seq_oss_timer_t;
-typedef struct seq_oss_synthinfo_t seq_oss_synthinfo_t;
-typedef struct seq_oss_synth_sysex_t seq_oss_synth_sysex_t;
-typedef struct seq_oss_chinfo_t seq_oss_chinfo_t;
 typedef unsigned int reltime_t;
 typedef unsigned int abstime_t;
-typedef union evrec_t evrec_t;
 
 
 /*
  * synthesizer channel information
  */
-struct seq_oss_chinfo_t {
+struct seq_oss_chinfo {
 	int note, vel;
 };
 
 /*
  * synthesizer information
  */
-struct seq_oss_synthinfo_t {
-	snd_seq_oss_arg_t arg;
-	seq_oss_chinfo_t *ch;
-	seq_oss_synth_sysex_t *sysex;
+struct seq_oss_synthinfo {
+	struct snd_seq_oss_arg arg;
+	struct seq_oss_chinfo *ch;
+	struct seq_oss_synth_sysex *sysex;
 	int nr_voices;
 	int opened;
 	int is_midi;
@@ -92,14 +84,14 @@ struct seq_oss_synthinfo_t {
  * sequencer client information
  */
 
-struct seq_oss_devinfo_t {
+struct seq_oss_devinfo {
 
 	int index;	/* application index */
 	int cseq;	/* sequencer client number */
 	int port;	/* sequencer port number */
 	int queue;	/* sequencer queue number */
 
-	snd_seq_addr_t addr;	/* address of this device */
+	struct snd_seq_addr addr;	/* address of this device */
 
 	int seq_mode;	/* sequencer mode */
 	int file_mode;	/* file access */
@@ -109,17 +101,17 @@ struct seq_oss_devinfo_t {
 
 	/* synth device table */
 	int max_synthdev;
-	seq_oss_synthinfo_t synths[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS];
+	struct seq_oss_synthinfo synths[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS];
 	int synth_opened;
 
 	/* output queue */
-	seq_oss_writeq_t *writeq;
+	struct seq_oss_writeq *writeq;
 
 	/* midi input queue */
-	seq_oss_readq_t *readq;
+	struct seq_oss_readq *readq;
 
 	/* timer */
-	seq_oss_timer_t *timer;
+	struct seq_oss_timer *timer;
 };
 
 
@@ -133,24 +125,24 @@ int snd_seq_oss_delete_client(void);
 
 /* device file interface */
 int snd_seq_oss_open(struct file *file, int level);
-void snd_seq_oss_release(seq_oss_devinfo_t *dp);
-int snd_seq_oss_ioctl(seq_oss_devinfo_t *dp, unsigned int cmd, unsigned long arg);
-int snd_seq_oss_read(seq_oss_devinfo_t *dev, char __user *buf, int count);
-int snd_seq_oss_write(seq_oss_devinfo_t *dp, const char __user *buf, int count, struct file *opt);
-unsigned int snd_seq_oss_poll(seq_oss_devinfo_t *dp, struct file *file, poll_table * wait);
+void snd_seq_oss_release(struct seq_oss_devinfo *dp);
+int snd_seq_oss_ioctl(struct seq_oss_devinfo *dp, unsigned int cmd, unsigned long arg);
+int snd_seq_oss_read(struct seq_oss_devinfo *dev, char __user *buf, int count);
+int snd_seq_oss_write(struct seq_oss_devinfo *dp, const char __user *buf, int count, struct file *opt);
+unsigned int snd_seq_oss_poll(struct seq_oss_devinfo *dp, struct file *file, poll_table * wait);
 
-void snd_seq_oss_reset(seq_oss_devinfo_t *dp);
-void snd_seq_oss_drain_write(seq_oss_devinfo_t *dp);
+void snd_seq_oss_reset(struct seq_oss_devinfo *dp);
+void snd_seq_oss_drain_write(struct seq_oss_devinfo *dp);
 
 /* */
-void snd_seq_oss_process_queue(seq_oss_devinfo_t *dp, abstime_t time);
+void snd_seq_oss_process_queue(struct seq_oss_devinfo *dp, abstime_t time);
 
 
 /* proc interface */
-void snd_seq_oss_system_info_read(snd_info_buffer_t *buf);
-void snd_seq_oss_midi_info_read(snd_info_buffer_t *buf);
-void snd_seq_oss_synth_info_read(snd_info_buffer_t *buf);
-void snd_seq_oss_readq_info_read(seq_oss_readq_t *q, snd_info_buffer_t *buf);
+void snd_seq_oss_system_info_read(struct snd_info_buffer *buf);
+void snd_seq_oss_midi_info_read(struct snd_info_buffer *buf);
+void snd_seq_oss_synth_info_read(struct snd_info_buffer *buf);
+void snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf);
 
 /* file mode macros */
 #define is_read_mode(mode)	((mode) & SNDRV_SEQ_OSS_FILE_READ)
@@ -159,21 +151,21 @@ void snd_seq_oss_readq_info_read(seq_oss_readq_t *q, snd_info_buffer_t *buf);
 
 /* dispatch event */
 static inline int
-snd_seq_oss_dispatch(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int atomic, int hop)
+snd_seq_oss_dispatch(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, int atomic, int hop)
 {
 	return snd_seq_kernel_client_dispatch(dp->cseq, ev, atomic, hop);
 }
 
 /* ioctl */
 static inline int
-snd_seq_oss_control(seq_oss_devinfo_t *dp, unsigned int type, void *arg)
+snd_seq_oss_control(struct seq_oss_devinfo *dp, unsigned int type, void *arg)
 {
 	return snd_seq_kernel_client_ctl(dp->cseq, type, arg);
 }
 
 /* fill the addresses in header */
 static inline void
-snd_seq_oss_fill_addr(seq_oss_devinfo_t *dp, snd_seq_event_t *ev,
+snd_seq_oss_fill_addr(struct seq_oss_devinfo *dp, struct snd_seq_event *ev,
 		     int dest_client, int dest_port)
 {
 	ev->queue = dp->queue;
diff --git a/sound/core/seq/oss/seq_oss_event.c b/sound/core/seq/oss/seq_oss_event.c
index 58e52ddd292..066f5f3e3f4 100644
--- a/sound/core/seq/oss/seq_oss_event.c
+++ b/sound/core/seq/oss/seq_oss_event.c
@@ -31,17 +31,17 @@
 /*
  * prototypes
  */
-static int extended_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev);
-static int chn_voice_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev);
-static int chn_common_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev);
-static int timing_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev);
-static int local_event(seq_oss_devinfo_t *dp, evrec_t *event_rec, snd_seq_event_t *ev);
-static int old_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev);
-static int note_on_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq_event_t *ev);
-static int note_off_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq_event_t *ev);
-static int set_note_event(seq_oss_devinfo_t *dp, int dev, int type, int ch, int note, int vel, snd_seq_event_t *ev);
-static int set_control_event(seq_oss_devinfo_t *dp, int dev, int type, int ch, int param, int val, snd_seq_event_t *ev);
-static int set_echo_event(seq_oss_devinfo_t *dp, evrec_t *rec, snd_seq_event_t *ev);
+static int extended_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev);
+static int chn_voice_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev);
+static int chn_common_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev);
+static int timing_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev);
+static int local_event(struct seq_oss_devinfo *dp, union evrec *event_rec, struct snd_seq_event *ev);
+static int old_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev);
+static int note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev);
+static int note_off_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev);
+static int set_note_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int note, int vel, struct snd_seq_event *ev);
+static int set_control_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int param, int val, struct snd_seq_event *ev);
+static int set_echo_event(struct seq_oss_devinfo *dp, union evrec *rec, struct snd_seq_event *ev);
 
 
 /*
@@ -51,7 +51,7 @@ static int set_echo_event(seq_oss_devinfo_t *dp, evrec_t *rec, snd_seq_event_t *
  */
 
 int
-snd_seq_oss_process_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
+snd_seq_oss_process_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
 {
 	switch (q->s.code) {
 	case SEQ_EXTENDED:
@@ -104,7 +104,7 @@ snd_seq_oss_process_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev
 
 /* old type events: mode1 only */
 static int
-old_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
+old_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
 {
 	switch (q->s.code) {
 	case SEQ_NOTEOFF:
@@ -130,7 +130,7 @@ old_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
 
 /* 8bytes extended event: mode1 only */
 static int
-extended_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
+extended_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
 {
 	int val;
 
@@ -184,7 +184,7 @@ extended_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
 
 /* channel voice events: mode1 and 2 */
 static int
-chn_voice_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
+chn_voice_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
 {
 	if (q->v.chn >= 32)
 		return -EINVAL;
@@ -205,7 +205,7 @@ chn_voice_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
 
 /* channel common events: mode1 and 2 */
 static int
-chn_common_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
+chn_common_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
 {
 	if (q->l.chn >= 32)
 		return -EINVAL;
@@ -232,14 +232,14 @@ chn_common_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
 
 /* timer events: mode1 and mode2 */
 static int
-timing_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
+timing_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
 {
 	switch (q->t.cmd) {
 	case TMR_ECHO:
 		if (dp->seq_mode == SNDRV_SEQ_OSS_MODE_MUSIC)
 			return set_echo_event(dp, q, ev);
 		else {
-			evrec_t tmp;
+			union evrec tmp;
 			memset(&tmp, 0, sizeof(tmp));
 			/* XXX: only for little-endian! */
 			tmp.echo = (q->t.time << 8) | SEQ_ECHO;
@@ -267,7 +267,7 @@ timing_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
 
 /* local events: mode1 and 2 */
 static int
-local_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
+local_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
 {
 	return -EINVAL;
 }
@@ -283,9 +283,9 @@ local_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev)
  *	Use key-pressure if note >= 128
  */
 static int
-note_on_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq_event_t *ev)
+note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev)
 {
-	seq_oss_synthinfo_t *info = &dp->synths[dev];
+	struct seq_oss_synthinfo *info = &dp->synths[dev];
 	switch (info->arg.event_passing) {
 	case SNDRV_SEQ_OSS_PROCESS_EVENTS:
 		if (! info->ch || ch < 0 || ch >= info->nr_voices) {
@@ -338,9 +338,9 @@ note_on_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq
  * process note-off event for OSS synth
  */
 static int
-note_off_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_seq_event_t *ev)
+note_off_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev)
 {
-	seq_oss_synthinfo_t *info = &dp->synths[dev];
+	struct seq_oss_synthinfo *info = &dp->synths[dev];
 	switch (info->arg.event_passing) {
 	case SNDRV_SEQ_OSS_PROCESS_EVENTS:
 		if (! info->ch || ch < 0 || ch >= info->nr_voices) {
@@ -369,7 +369,7 @@ note_off_event(seq_oss_devinfo_t *dp, int dev, int ch, int note, int vel, snd_se
  * create a note event
  */
 static int
-set_note_event(seq_oss_devinfo_t *dp, int dev, int type, int ch, int note, int vel, snd_seq_event_t *ev)
+set_note_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int note, int vel, struct snd_seq_event *ev)
 {
 	if (! snd_seq_oss_synth_is_valid(dp, dev))
 		return -ENXIO;
@@ -387,7 +387,7 @@ set_note_event(seq_oss_devinfo_t *dp, int dev, int type, int ch, int note, int v
  * create a control event
  */
 static int
-set_control_event(seq_oss_devinfo_t *dp, int dev, int type, int ch, int param, int val, snd_seq_event_t *ev)
+set_control_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int param, int val, struct snd_seq_event *ev)
 {
 	if (! snd_seq_oss_synth_is_valid(dp, dev))
 		return -ENXIO;
@@ -405,7 +405,7 @@ set_control_event(seq_oss_devinfo_t *dp, int dev, int type, int ch, int param, i
  * create an echo event
  */
 static int
-set_echo_event(seq_oss_devinfo_t *dp, evrec_t *rec, snd_seq_event_t *ev)
+set_echo_event(struct seq_oss_devinfo *dp, union evrec *rec, struct snd_seq_event *ev)
 {
 	ev->type = SNDRV_SEQ_EVENT_ECHO;
 	/* echo back to itself */
@@ -419,11 +419,11 @@ set_echo_event(seq_oss_devinfo_t *dp, evrec_t *rec, snd_seq_event_t *ev)
  * the echo event is processed here.
  */
 int
-snd_seq_oss_event_input(snd_seq_event_t *ev, int direct, void *private_data,
+snd_seq_oss_event_input(struct snd_seq_event *ev, int direct, void *private_data,
 			int atomic, int hop)
 {
-	seq_oss_devinfo_t *dp = (seq_oss_devinfo_t *)private_data;
-	evrec_t *rec;
+	struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private_data;
+	union evrec *rec;
 
 	if (ev->type != SNDRV_SEQ_EVENT_ECHO)
 		return snd_seq_oss_midi_input(ev, direct, private_data);
@@ -431,7 +431,7 @@ snd_seq_oss_event_input(snd_seq_event_t *ev, int direct, void *private_data,
 	if (ev->source.client != dp->cseq)
 		return 0; /* ignored */
 
-	rec = (evrec_t*)&ev->data;
+	rec = (union evrec*)&ev->data;
 	if (rec->s.code == SEQ_SYNCTIMER) {
 		/* sync echo back */
 		snd_seq_oss_writeq_wakeup(dp->writeq, rec->t.time);
diff --git a/sound/core/seq/oss/seq_oss_event.h b/sound/core/seq/oss/seq_oss_event.h
index bf1d4d3f53c..9a4d9adb7b8 100644
--- a/sound/core/seq/oss/seq_oss_event.h
+++ b/sound/core/seq/oss/seq_oss_event.h
@@ -29,74 +29,74 @@
 #define LONG_EVENT_SIZE		8
 
 /* short event (4bytes) */
-typedef struct evrec_short_t {
+struct evrec_short {
 	unsigned char code;
 	unsigned char parm1;
 	unsigned char dev;
 	unsigned char parm2;
-} evrec_short_t;
+};
 	
 /* short note events (4bytes) */
-typedef struct evrec_note_t {
+struct evrec_note {
 	unsigned char code;
 	unsigned char chn;
 	unsigned char note;
 	unsigned char vel;
-} evrec_note_t;
+};
 	
 /* long timer events (8bytes) */
-typedef struct evrec_timer_t {
+struct evrec_timer {
 	unsigned char code;
 	unsigned char cmd;
 	unsigned char dummy1, dummy2;
 	unsigned int time;
-} evrec_timer_t;
+};
 
 /* long extended events (8bytes) */
-typedef struct evrec_extended_t {
+struct evrec_extended {
 	unsigned char code;
 	unsigned char cmd;
 	unsigned char dev;
 	unsigned char chn;
 	unsigned char p1, p2, p3, p4;
-} evrec_extended_t;
+};
 
 /* long channel events (8bytes) */
-typedef struct evrec_long_t {
+struct evrec_long {
 	unsigned char code;
 	unsigned char dev;
 	unsigned char cmd;
 	unsigned char chn;
 	unsigned char p1, p2;
 	unsigned short val;
-} evrec_long_t;
+};
 	
 /* channel voice events (8bytes) */
-typedef struct evrec_voice_t {
+struct evrec_voice {
 	unsigned char code;
 	unsigned char dev;
 	unsigned char cmd;
 	unsigned char chn;
 	unsigned char note, parm;
 	unsigned short dummy;
-} evrec_voice_t;
+};
 
 /* sysex events (8bytes) */
-typedef struct evrec_sysex_t {
+struct evrec_sysex {
 	unsigned char code;
 	unsigned char dev;
 	unsigned char buf[6];
-} evrec_sysex_t;
+};
 
 /* event record */
-union evrec_t {
-	evrec_short_t s;
-	evrec_note_t n;
-	evrec_long_t l;
-	evrec_voice_t v;
-	evrec_timer_t t;
-	evrec_extended_t e;
-	evrec_sysex_t x;
+union evrec {
+	struct evrec_short s;
+	struct evrec_note n;
+	struct evrec_long l;
+	struct evrec_voice v;
+	struct evrec_timer t;
+	struct evrec_extended e;
+	struct evrec_sysex x;
 	unsigned int echo;
 	unsigned char c[LONG_EVENT_SIZE];
 };
@@ -104,9 +104,9 @@ union evrec_t {
 #define ev_is_long(ev) ((ev)->s.code >= 128)
 #define ev_length(ev) ((ev)->s.code >= 128 ? LONG_EVENT_SIZE : SHORT_EVENT_SIZE)
 
-int snd_seq_oss_process_event(seq_oss_devinfo_t *dp, evrec_t *q, snd_seq_event_t *ev);
-int snd_seq_oss_process_timer_event(seq_oss_timer_t *rec, evrec_t *q);
-int snd_seq_oss_event_input(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int hop);
+int snd_seq_oss_process_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev);
+int snd_seq_oss_process_timer_event(struct seq_oss_timer *rec, union evrec *q);
+int snd_seq_oss_event_input(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop);
 
 
 #endif /* __SEQ_OSS_EVENT_H */
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index 1ab1cf8158c..1d4473eadcf 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -41,17 +41,17 @@ static int system_client = -1; /* ALSA sequencer client number */
 static int system_port = -1;
 
 static int num_clients;
-static seq_oss_devinfo_t *client_table[SNDRV_SEQ_OSS_MAX_CLIENTS];
+static struct seq_oss_devinfo *client_table[SNDRV_SEQ_OSS_MAX_CLIENTS];
 
 
 /*
  * prototypes
  */
-static int receive_announce(snd_seq_event_t *ev, int direct, void *private, int atomic, int hop);
+static int receive_announce(struct snd_seq_event *ev, int direct, void *private, int atomic, int hop);
 static int translate_mode(struct file *file);
-static int create_port(seq_oss_devinfo_t *dp);
-static int delete_port(seq_oss_devinfo_t *dp);
-static int alloc_seq_queue(seq_oss_devinfo_t *dp);
+static int create_port(struct seq_oss_devinfo *dp);
+static int delete_port(struct seq_oss_devinfo *dp);
+static int alloc_seq_queue(struct seq_oss_devinfo *dp);
 static int delete_seq_queue(int queue);
 static void free_devinfo(void *private);
 
@@ -65,10 +65,10 @@ int __init
 snd_seq_oss_create_client(void)
 {
 	int rc;
-	snd_seq_client_callback_t callback;
-	snd_seq_client_info_t *info;
-	snd_seq_port_info_t *port;
-	snd_seq_port_callback_t port_callback;
+	struct snd_seq_client_callback callback;
+	struct snd_seq_client_info *info;
+	struct snd_seq_port_info *port;
+	struct snd_seq_port_callback port_callback;
 
 	info = kmalloc(sizeof(*info), GFP_KERNEL);
 	port = kmalloc(sizeof(*port), GFP_KERNEL);
@@ -118,7 +118,7 @@ snd_seq_oss_create_client(void)
 	
 	call_ctl(SNDRV_SEQ_IOCTL_CREATE_PORT, port);
 	if ((system_port = port->addr.port) >= 0) {
-		snd_seq_port_subscribe_t subs;
+		struct snd_seq_port_subscribe subs;
 
 		memset(&subs, 0, sizeof(subs));
 		subs.sender.client = SNDRV_SEQ_CLIENT_SYSTEM;
@@ -140,9 +140,9 @@ snd_seq_oss_create_client(void)
  * receive annoucement from system port, and check the midi device
  */
 static int
-receive_announce(snd_seq_event_t *ev, int direct, void *private, int atomic, int hop)
+receive_announce(struct snd_seq_event *ev, int direct, void *private, int atomic, int hop)
 {
-	snd_seq_port_info_t pinfo;
+	struct snd_seq_port_info pinfo;
 
 	if (atomic)
 		return 0; /* it must not happen */
@@ -191,7 +191,7 @@ int
 snd_seq_oss_open(struct file *file, int level)
 {
 	int i, rc;
-	seq_oss_devinfo_t *dp;
+	struct seq_oss_devinfo *dp;
 
 	if ((dp = kzalloc(sizeof(*dp), GFP_KERNEL)) == NULL) {
 		snd_printk(KERN_ERR "can't malloc device info\n");
@@ -323,11 +323,11 @@ translate_mode(struct file *file)
  * create sequencer port
  */
 static int
-create_port(seq_oss_devinfo_t *dp)
+create_port(struct seq_oss_devinfo *dp)
 {
 	int rc;
-	snd_seq_port_info_t port;
-	snd_seq_port_callback_t callback;
+	struct snd_seq_port_info port;
+	struct snd_seq_port_callback callback;
 
 	memset(&port, 0, sizeof(port));
 	port.addr.client = dp->cseq;
@@ -358,7 +358,7 @@ create_port(seq_oss_devinfo_t *dp)
  * delete ALSA port
  */
 static int
-delete_port(seq_oss_devinfo_t *dp)
+delete_port(struct seq_oss_devinfo *dp)
 {
 	if (dp->port < 0)
 		return 0;
@@ -371,9 +371,9 @@ delete_port(seq_oss_devinfo_t *dp)
  * allocate a queue
  */
 static int
-alloc_seq_queue(seq_oss_devinfo_t *dp)
+alloc_seq_queue(struct seq_oss_devinfo *dp)
 {
-	snd_seq_queue_info_t qinfo;
+	struct snd_seq_queue_info qinfo;
 	int rc;
 
 	memset(&qinfo, 0, sizeof(qinfo));
@@ -392,7 +392,7 @@ alloc_seq_queue(seq_oss_devinfo_t *dp)
 static int
 delete_seq_queue(int queue)
 {
-	snd_seq_queue_info_t qinfo;
+	struct snd_seq_queue_info qinfo;
 	int rc;
 
 	if (queue < 0)
@@ -412,7 +412,7 @@ delete_seq_queue(int queue)
 static void
 free_devinfo(void *private)
 {
-	seq_oss_devinfo_t *dp = (seq_oss_devinfo_t *)private;
+	struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private;
 
 	if (dp->timer)
 		snd_seq_oss_timer_delete(dp->timer);
@@ -431,7 +431,7 @@ free_devinfo(void *private)
  * close sequencer device
  */
 void
-snd_seq_oss_release(seq_oss_devinfo_t *dp)
+snd_seq_oss_release(struct seq_oss_devinfo *dp)
 {
 	int queue;
 
@@ -460,7 +460,7 @@ snd_seq_oss_release(seq_oss_devinfo_t *dp)
  * Wait until the queue is empty (if we don't have nonblock)
  */
 void
-snd_seq_oss_drain_write(seq_oss_devinfo_t *dp)
+snd_seq_oss_drain_write(struct seq_oss_devinfo *dp)
 {
 	if (! dp->timer->running)
 		return;
@@ -477,7 +477,7 @@ snd_seq_oss_drain_write(seq_oss_devinfo_t *dp)
  * reset sequencer devices
  */
 void
-snd_seq_oss_reset(seq_oss_devinfo_t *dp)
+snd_seq_oss_reset(struct seq_oss_devinfo *dp)
 {
 	int i;
 
@@ -525,10 +525,10 @@ filemode_str(int val)
  * proc interface
  */
 void
-snd_seq_oss_system_info_read(snd_info_buffer_t *buf)
+snd_seq_oss_system_info_read(struct snd_info_buffer *buf)
 {
 	int i;
-	seq_oss_devinfo_t *dp;
+	struct seq_oss_devinfo *dp;
 
 	snd_iprintf(buf, "ALSA client number %d\n", system_client);
 	snd_iprintf(buf, "ALSA receiver port %d\n", system_port);
diff --git a/sound/core/seq/oss/seq_oss_ioctl.c b/sound/core/seq/oss/seq_oss_ioctl.c
index e86f18d00f3..5ac701c903c 100644
--- a/sound/core/seq/oss/seq_oss_ioctl.c
+++ b/sound/core/seq/oss/seq_oss_ioctl.c
@@ -28,7 +28,7 @@
 #include "seq_oss_midi.h"
 #include "seq_oss_event.h"
 
-static int snd_seq_oss_synth_info_user(seq_oss_devinfo_t *dp, void __user *arg)
+static int snd_seq_oss_synth_info_user(struct seq_oss_devinfo *dp, void __user *arg)
 {
 	struct synth_info info;
 
@@ -41,7 +41,7 @@ static int snd_seq_oss_synth_info_user(seq_oss_devinfo_t *dp, void __user *arg)
 	return 0;
 }
 
-static int snd_seq_oss_midi_info_user(seq_oss_devinfo_t *dp, void __user *arg)
+static int snd_seq_oss_midi_info_user(struct seq_oss_devinfo *dp, void __user *arg)
 {
 	struct midi_info info;
 
@@ -54,24 +54,24 @@ static int snd_seq_oss_midi_info_user(seq_oss_devinfo_t *dp, void __user *arg)
 	return 0;
 }
 
-static int snd_seq_oss_oob_user(seq_oss_devinfo_t *dp, void __user *arg)
+static int snd_seq_oss_oob_user(struct seq_oss_devinfo *dp, void __user *arg)
 {
 	unsigned char ev[8];
-	snd_seq_event_t tmpev;
+	struct snd_seq_event tmpev;
 
 	if (copy_from_user(ev, arg, 8))
 		return -EFAULT;
 	memset(&tmpev, 0, sizeof(tmpev));
 	snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client);
 	tmpev.time.tick = 0;
-	if (! snd_seq_oss_process_event(dp, (evrec_t*)ev, &tmpev)) {
+	if (! snd_seq_oss_process_event(dp, (union evrec *)ev, &tmpev)) {
 		snd_seq_oss_dispatch(dp, &tmpev, 0, 0);
 	}
 	return 0;
 }
 
 int
-snd_seq_oss_ioctl(seq_oss_devinfo_t *dp, unsigned int cmd, unsigned long carg)
+snd_seq_oss_ioctl(struct seq_oss_devinfo *dp, unsigned int cmd, unsigned long carg)
 {
 	int dev, val;
 	void __user *arg = (void __user *)carg;
diff --git a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c
index f0e95c8f2ee..eb7ae990965 100644
--- a/sound/core/seq/oss/seq_oss_midi.c
+++ b/sound/core/seq/oss/seq_oss_midi.c
@@ -37,15 +37,15 @@
 /*
  * definition of midi device record
  */
-struct seq_oss_midi_t {
+struct seq_oss_midi {
 	int seq_device;		/* device number */
 	int client;		/* sequencer client number */
 	int port;		/* sequencer port number */
 	unsigned int flags;	/* port capability */
 	int opened;		/* flag for opening */
 	unsigned char name[SNDRV_SEQ_OSS_MAX_MIDI_NAME];
-	snd_midi_event_t *coder;	/* MIDI event coder */
-	seq_oss_devinfo_t *devinfo;	/* assigned OSSseq device */
+	struct snd_midi_event *coder;	/* MIDI event coder */
+	struct seq_oss_devinfo *devinfo;	/* assigned OSSseq device */
 	snd_use_lock_t use_lock;
 };
 
@@ -54,17 +54,17 @@ struct seq_oss_midi_t {
  * midi device table
  */
 static int max_midi_devs;
-static seq_oss_midi_t *midi_devs[SNDRV_SEQ_OSS_MAX_MIDI_DEVS];
+static struct seq_oss_midi *midi_devs[SNDRV_SEQ_OSS_MAX_MIDI_DEVS];
 
 static DEFINE_SPINLOCK(register_lock);
 
 /*
  * prototypes
  */
-static seq_oss_midi_t *get_mdev(int dev);
-static seq_oss_midi_t *get_mididev(seq_oss_devinfo_t *dp, int dev);
-static int send_synth_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int dev);
-static int send_midi_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, seq_oss_midi_t *mdev);
+static struct seq_oss_midi *get_mdev(int dev);
+static struct seq_oss_midi *get_mididev(struct seq_oss_devinfo *dp, int dev);
+static int send_synth_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, int dev);
+static int send_midi_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, struct seq_oss_midi *mdev);
 
 /*
  * look up the existing ports
@@ -73,8 +73,8 @@ static int send_midi_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, seq_oss_m
 int __init
 snd_seq_oss_midi_lookup_ports(int client)
 {
-	snd_seq_client_info_t *clinfo;
-	snd_seq_port_info_t *pinfo;
+	struct snd_seq_client_info *clinfo;
+	struct snd_seq_port_info *pinfo;
 
 	clinfo = kzalloc(sizeof(*clinfo), GFP_KERNEL);
 	pinfo = kzalloc(sizeof(*pinfo), GFP_KERNEL);
@@ -100,10 +100,10 @@ snd_seq_oss_midi_lookup_ports(int client)
 
 /*
  */
-static seq_oss_midi_t *
+static struct seq_oss_midi *
 get_mdev(int dev)
 {
-	seq_oss_midi_t *mdev;
+	struct seq_oss_midi *mdev;
 	unsigned long flags;
 
 	spin_lock_irqsave(&register_lock, flags);
@@ -117,11 +117,11 @@ get_mdev(int dev)
 /*
  * look for the identical slot
  */
-static seq_oss_midi_t *
+static struct seq_oss_midi *
 find_slot(int client, int port)
 {
 	int i;
-	seq_oss_midi_t *mdev;
+	struct seq_oss_midi *mdev;
 	unsigned long flags;
 
 	spin_lock_irqsave(&register_lock, flags);
@@ -145,10 +145,10 @@ find_slot(int client, int port)
  * register a new port if it doesn't exist yet
  */
 int
-snd_seq_oss_midi_check_new_port(snd_seq_port_info_t *pinfo)
+snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo)
 {
 	int i;
-	seq_oss_midi_t *mdev;
+	struct seq_oss_midi *mdev;
 	unsigned long flags;
 
 	debug_printk(("check for MIDI client %d port %d\n", pinfo->addr.client, pinfo->addr.port));
@@ -226,7 +226,7 @@ snd_seq_oss_midi_check_new_port(snd_seq_port_info_t *pinfo)
 int
 snd_seq_oss_midi_check_exit_port(int client, int port)
 {
-	seq_oss_midi_t *mdev;
+	struct seq_oss_midi *mdev;
 	unsigned long flags;
 	int index;
 
@@ -258,7 +258,7 @@ void
 snd_seq_oss_midi_clear_all(void)
 {
 	int i;
-	seq_oss_midi_t *mdev;
+	struct seq_oss_midi *mdev;
 	unsigned long flags;
 
 	spin_lock_irqsave(&register_lock, flags);
@@ -279,7 +279,7 @@ snd_seq_oss_midi_clear_all(void)
  * set up midi tables
  */
 void
-snd_seq_oss_midi_setup(seq_oss_devinfo_t *dp)
+snd_seq_oss_midi_setup(struct seq_oss_devinfo *dp)
 {
 	dp->max_mididev = max_midi_devs;
 }
@@ -288,7 +288,7 @@ snd_seq_oss_midi_setup(seq_oss_devinfo_t *dp)
  * clean up midi tables
  */
 void
-snd_seq_oss_midi_cleanup(seq_oss_devinfo_t *dp)
+snd_seq_oss_midi_cleanup(struct seq_oss_devinfo *dp)
 {
 	int i;
 	for (i = 0; i < dp->max_mididev; i++)
@@ -301,7 +301,7 @@ snd_seq_oss_midi_cleanup(seq_oss_devinfo_t *dp)
  * open all midi devices.  ignore errors.
  */
 void
-snd_seq_oss_midi_open_all(seq_oss_devinfo_t *dp, int file_mode)
+snd_seq_oss_midi_open_all(struct seq_oss_devinfo *dp, int file_mode)
 {
 	int i;
 	for (i = 0; i < dp->max_mididev; i++)
@@ -312,8 +312,8 @@ snd_seq_oss_midi_open_all(seq_oss_devinfo_t *dp, int file_mode)
 /*
  * get the midi device information
  */
-static seq_oss_midi_t *
-get_mididev(seq_oss_devinfo_t *dp, int dev)
+static struct seq_oss_midi *
+get_mididev(struct seq_oss_devinfo *dp, int dev)
 {
 	if (dev < 0 || dev >= dp->max_mididev)
 		return NULL;
@@ -325,11 +325,11 @@ get_mididev(seq_oss_devinfo_t *dp, int dev)
  * open the midi device if not opened yet
  */
 int
-snd_seq_oss_midi_open(seq_oss_devinfo_t *dp, int dev, int fmode)
+snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int fmode)
 {
 	int perm;
-	seq_oss_midi_t *mdev;
-	snd_seq_port_subscribe_t subs;
+	struct seq_oss_midi *mdev;
+	struct snd_seq_port_subscribe subs;
 
 	if ((mdev = get_mididev(dp, dev)) == NULL)
 		return -ENODEV;
@@ -392,10 +392,10 @@ snd_seq_oss_midi_open(seq_oss_devinfo_t *dp, int dev, int fmode)
  * close the midi device if already opened
  */
 int
-snd_seq_oss_midi_close(seq_oss_devinfo_t *dp, int dev)
+snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev)
 {
-	seq_oss_midi_t *mdev;
-	snd_seq_port_subscribe_t subs;
+	struct seq_oss_midi *mdev;
+	struct snd_seq_port_subscribe subs;
 
 	if ((mdev = get_mididev(dp, dev)) == NULL)
 		return -ENODEV;
@@ -430,9 +430,9 @@ snd_seq_oss_midi_close(seq_oss_devinfo_t *dp, int dev)
  * change seq capability flags to file mode flags
  */
 int
-snd_seq_oss_midi_filemode(seq_oss_devinfo_t *dp, int dev)
+snd_seq_oss_midi_filemode(struct seq_oss_devinfo *dp, int dev)
 {
-	seq_oss_midi_t *mdev;
+	struct seq_oss_midi *mdev;
 	int mode;
 
 	if ((mdev = get_mididev(dp, dev)) == NULL)
@@ -453,9 +453,9 @@ snd_seq_oss_midi_filemode(seq_oss_devinfo_t *dp, int dev)
  * so far, only close the device.
  */
 void
-snd_seq_oss_midi_reset(seq_oss_devinfo_t *dp, int dev)
+snd_seq_oss_midi_reset(struct seq_oss_devinfo *dp, int dev)
 {
-	seq_oss_midi_t *mdev;
+	struct seq_oss_midi *mdev;
 
 	if ((mdev = get_mididev(dp, dev)) == NULL)
 		return;
@@ -465,7 +465,7 @@ snd_seq_oss_midi_reset(seq_oss_devinfo_t *dp, int dev)
 	}
 
 	if (mdev->opened & PERM_WRITE) {
-		snd_seq_event_t ev;
+		struct snd_seq_event ev;
 		int c;
 
 		debug_printk(("resetting client %d port %d\n", mdev->client, mdev->port));
@@ -501,9 +501,9 @@ snd_seq_oss_midi_reset(seq_oss_devinfo_t *dp, int dev)
  * get client/port of the specified MIDI device
  */
 void
-snd_seq_oss_midi_get_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_addr_t *addr)
+snd_seq_oss_midi_get_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_addr *addr)
 {
-	seq_oss_midi_t *mdev;
+	struct seq_oss_midi *mdev;
 
 	if ((mdev = get_mididev(dp, dev)) == NULL)
 		return;
@@ -517,10 +517,10 @@ snd_seq_oss_midi_get_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_addr_t *addr)
  * input callback - this can be atomic
  */
 int
-snd_seq_oss_midi_input(snd_seq_event_t *ev, int direct, void *private_data)
+snd_seq_oss_midi_input(struct snd_seq_event *ev, int direct, void *private_data)
 {
-	seq_oss_devinfo_t *dp = (seq_oss_devinfo_t *)private_data;
-	seq_oss_midi_t *mdev;
+	struct seq_oss_devinfo *dp = (struct seq_oss_devinfo *)private_data;
+	struct seq_oss_midi *mdev;
 	int rc;
 
 	if (dp->readq == NULL)
@@ -545,9 +545,9 @@ snd_seq_oss_midi_input(snd_seq_event_t *ev, int direct, void *private_data)
  * convert ALSA sequencer event to OSS synth event
  */
 static int
-send_synth_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int dev)
+send_synth_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, int dev)
 {
-	evrec_t ossev;
+	union evrec ossev;
 
 	memset(&ossev, 0, sizeof(ossev));
 
@@ -606,7 +606,7 @@ send_synth_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, int dev)
  * decode event and send MIDI bytes to read queue
  */
 static int
-send_midi_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, seq_oss_midi_t *mdev)
+send_midi_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, struct seq_oss_midi *mdev)
 {
 	char msg[32];
 	int len;
@@ -634,9 +634,9 @@ send_midi_event(seq_oss_devinfo_t *dp, snd_seq_event_t *ev, seq_oss_midi_t *mdev
  *        non-zero : invalid - ignored
  */
 int
-snd_seq_oss_midi_putc(seq_oss_devinfo_t *dp, int dev, unsigned char c, snd_seq_event_t *ev)
+snd_seq_oss_midi_putc(struct seq_oss_devinfo *dp, int dev, unsigned char c, struct snd_seq_event *ev)
 {
-	seq_oss_midi_t *mdev;
+	struct seq_oss_midi *mdev;
 
 	if ((mdev = get_mididev(dp, dev)) == NULL)
 		return -ENODEV;
@@ -653,9 +653,9 @@ snd_seq_oss_midi_putc(seq_oss_devinfo_t *dp, int dev, unsigned char c, snd_seq_e
  * create OSS compatible midi_info record
  */
 int
-snd_seq_oss_midi_make_info(seq_oss_devinfo_t *dp, int dev, struct midi_info *inf)
+snd_seq_oss_midi_make_info(struct seq_oss_devinfo *dp, int dev, struct midi_info *inf)
 {
-	seq_oss_midi_t *mdev;
+	struct seq_oss_midi *mdev;
 
 	if ((mdev = get_mididev(dp, dev)) == NULL)
 		return -ENXIO;
@@ -686,10 +686,10 @@ capmode_str(int val)
 }
 
 void
-snd_seq_oss_midi_info_read(snd_info_buffer_t *buf)
+snd_seq_oss_midi_info_read(struct snd_info_buffer *buf)
 {
 	int i;
-	seq_oss_midi_t *mdev;
+	struct seq_oss_midi *mdev;
 
 	snd_iprintf(buf, "\nNumber of MIDI devices: %d\n", max_midi_devs);
 	for (i = 0; i < max_midi_devs; i++) {
diff --git a/sound/core/seq/oss/seq_oss_midi.h b/sound/core/seq/oss/seq_oss_midi.h
index 462484b2b6f..84eb866ba58 100644
--- a/sound/core/seq/oss/seq_oss_midi.h
+++ b/sound/core/seq/oss/seq_oss_midi.h
@@ -26,24 +26,23 @@
 #include "seq_oss_device.h"
 #include <sound/seq_oss_legacy.h>
 
-typedef struct seq_oss_midi_t seq_oss_midi_t;
-
 int snd_seq_oss_midi_lookup_ports(int client);
-int snd_seq_oss_midi_check_new_port(snd_seq_port_info_t *pinfo);
+int snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo);
 int snd_seq_oss_midi_check_exit_port(int client, int port);
 void snd_seq_oss_midi_clear_all(void);
 
-void snd_seq_oss_midi_setup(seq_oss_devinfo_t *dp);
-void snd_seq_oss_midi_cleanup(seq_oss_devinfo_t *dp);
+void snd_seq_oss_midi_setup(struct seq_oss_devinfo *dp);
+void snd_seq_oss_midi_cleanup(struct seq_oss_devinfo *dp);
 
-int snd_seq_oss_midi_open(seq_oss_devinfo_t *dp, int dev, int file_mode);
-void snd_seq_oss_midi_open_all(seq_oss_devinfo_t *dp, int file_mode);
-int snd_seq_oss_midi_close(seq_oss_devinfo_t *dp, int dev);
-void snd_seq_oss_midi_reset(seq_oss_devinfo_t *dp, int dev);
-int snd_seq_oss_midi_putc(seq_oss_devinfo_t *dp, int dev, unsigned char c, snd_seq_event_t *ev);
-int snd_seq_oss_midi_input(snd_seq_event_t *ev, int direct, void *private);
-int snd_seq_oss_midi_filemode(seq_oss_devinfo_t *dp, int dev);
-int snd_seq_oss_midi_make_info(seq_oss_devinfo_t *dp, int dev, struct midi_info *inf);
-void snd_seq_oss_midi_get_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_addr_t *addr);
+int snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int file_mode);
+void snd_seq_oss_midi_open_all(struct seq_oss_devinfo *dp, int file_mode);
+int snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev);
+void snd_seq_oss_midi_reset(struct seq_oss_devinfo *dp, int dev);
+int snd_seq_oss_midi_putc(struct seq_oss_devinfo *dp, int dev, unsigned char c,
+			  struct snd_seq_event *ev);
+int snd_seq_oss_midi_input(struct snd_seq_event *ev, int direct, void *private);
+int snd_seq_oss_midi_filemode(struct seq_oss_devinfo *dp, int dev);
+int snd_seq_oss_midi_make_info(struct seq_oss_devinfo *dp, int dev, struct midi_info *inf);
+void snd_seq_oss_midi_get_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_addr *addr);
 
 #endif
diff --git a/sound/core/seq/oss/seq_oss_readq.c b/sound/core/seq/oss/seq_oss_readq.c
index 55571e15cd3..abc70078add 100644
--- a/sound/core/seq/oss/seq_oss_readq.c
+++ b/sound/core/seq/oss/seq_oss_readq.c
@@ -41,17 +41,17 @@
 /*
  * create a read queue
  */
-seq_oss_readq_t *
-snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen)
+struct seq_oss_readq *
+snd_seq_oss_readq_new(struct seq_oss_devinfo *dp, int maxlen)
 {
-	seq_oss_readq_t *q;
+	struct seq_oss_readq *q;
 
 	if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) {
 		snd_printk(KERN_ERR "can't malloc read queue\n");
 		return NULL;
 	}
 
-	if ((q->q = kcalloc(maxlen, sizeof(evrec_t), GFP_KERNEL)) == NULL) {
+	if ((q->q = kcalloc(maxlen, sizeof(union evrec), GFP_KERNEL)) == NULL) {
 		snd_printk(KERN_ERR "can't malloc read queue buffer\n");
 		kfree(q);
 		return NULL;
@@ -72,7 +72,7 @@ snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen)
  * delete the read queue
  */
 void
-snd_seq_oss_readq_delete(seq_oss_readq_t *q)
+snd_seq_oss_readq_delete(struct seq_oss_readq *q)
 {
 	if (q) {
 		kfree(q->q);
@@ -84,7 +84,7 @@ snd_seq_oss_readq_delete(seq_oss_readq_t *q)
  * reset the read queue
  */
 void
-snd_seq_oss_readq_clear(seq_oss_readq_t *q)
+snd_seq_oss_readq_clear(struct seq_oss_readq *q)
 {
 	if (q->qlen) {
 		q->qlen = 0;
@@ -100,9 +100,9 @@ snd_seq_oss_readq_clear(seq_oss_readq_t *q)
  * put a midi byte
  */
 int
-snd_seq_oss_readq_puts(seq_oss_readq_t *q, int dev, unsigned char *data, int len)
+snd_seq_oss_readq_puts(struct seq_oss_readq *q, int dev, unsigned char *data, int len)
 {
-	evrec_t rec;
+	union evrec rec;
 	int result;
 
 	memset(&rec, 0, sizeof(rec));
@@ -123,7 +123,7 @@ snd_seq_oss_readq_puts(seq_oss_readq_t *q, int dev, unsigned char *data, int len
  * return zero if enqueued
  */
 int
-snd_seq_oss_readq_put_event(seq_oss_readq_t *q, evrec_t *ev)
+snd_seq_oss_readq_put_event(struct seq_oss_readq *q, union evrec *ev)
 {
 	unsigned long flags;
 
@@ -152,7 +152,7 @@ snd_seq_oss_readq_put_event(seq_oss_readq_t *q, evrec_t *ev)
  * caller must hold lock
  */
 int
-snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec)
+snd_seq_oss_readq_pick(struct seq_oss_readq *q, union evrec *rec)
 {
 	if (q->qlen == 0)
 		return -EAGAIN;
@@ -164,7 +164,7 @@ snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec)
  * sleep until ready
  */
 void
-snd_seq_oss_readq_wait(seq_oss_readq_t *q)
+snd_seq_oss_readq_wait(struct seq_oss_readq *q)
 {
 	wait_event_interruptible_timeout(q->midi_sleep,
 					 (q->qlen > 0 || q->head == q->tail),
@@ -176,7 +176,7 @@ snd_seq_oss_readq_wait(seq_oss_readq_t *q)
  * caller must hold lock
  */
 void
-snd_seq_oss_readq_free(seq_oss_readq_t *q)
+snd_seq_oss_readq_free(struct seq_oss_readq *q)
 {
 	if (q->qlen > 0) {
 		q->head = (q->head + 1) % q->maxlen;
@@ -189,7 +189,7 @@ snd_seq_oss_readq_free(seq_oss_readq_t *q)
  * return non-zero if readq is not empty.
  */
 unsigned int
-snd_seq_oss_readq_poll(seq_oss_readq_t *q, struct file *file, poll_table *wait)
+snd_seq_oss_readq_poll(struct seq_oss_readq *q, struct file *file, poll_table *wait)
 {
 	poll_wait(file, &q->midi_sleep, wait);
 	return q->qlen;
@@ -199,10 +199,10 @@ snd_seq_oss_readq_poll(seq_oss_readq_t *q, struct file *file, poll_table *wait)
  * put a timestamp
  */
 int
-snd_seq_oss_readq_put_timestamp(seq_oss_readq_t *q, unsigned long curt, int seq_mode)
+snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *q, unsigned long curt, int seq_mode)
 {
 	if (curt != q->input_time) {
-		evrec_t rec;
+		union evrec rec;
 		memset(&rec, 0, sizeof(rec));
 		switch (seq_mode) {
 		case SNDRV_SEQ_OSS_MODE_SYNTH:
@@ -226,7 +226,7 @@ snd_seq_oss_readq_put_timestamp(seq_oss_readq_t *q, unsigned long curt, int seq_
  * proc interface
  */
 void
-snd_seq_oss_readq_info_read(seq_oss_readq_t *q, snd_info_buffer_t *buf)
+snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf)
 {
 	snd_iprintf(buf, "  read queue [%s] length = %d : tick = %ld\n",
 		    (waitqueue_active(&q->midi_sleep) ? "sleeping":"running"),
diff --git a/sound/core/seq/oss/seq_oss_readq.h b/sound/core/seq/oss/seq_oss_readq.h
index 303b9298f20..f1463f1f449 100644
--- a/sound/core/seq/oss/seq_oss_readq.h
+++ b/sound/core/seq/oss/seq_oss_readq.h
@@ -28,8 +28,8 @@
 /*
  * definition of read queue
  */
-struct seq_oss_readq_t {
-	evrec_t *q;
+struct seq_oss_readq {
+	union evrec *q;
 	int qlen;
 	int maxlen;
 	int head, tail;
@@ -39,16 +39,16 @@ struct seq_oss_readq_t {
 	spinlock_t lock;
 };
 
-seq_oss_readq_t *snd_seq_oss_readq_new(seq_oss_devinfo_t *dp, int maxlen);
-void snd_seq_oss_readq_delete(seq_oss_readq_t *q);
-void snd_seq_oss_readq_clear(seq_oss_readq_t *readq);
-unsigned int snd_seq_oss_readq_poll(seq_oss_readq_t *readq, struct file *file, poll_table *wait);
-int snd_seq_oss_readq_puts(seq_oss_readq_t *readq, int dev, unsigned char *data, int len);
-int snd_seq_oss_readq_put_event(seq_oss_readq_t *readq, evrec_t *ev);
-int snd_seq_oss_readq_put_timestamp(seq_oss_readq_t *readq, unsigned long curt, int seq_mode);
-int snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec);
-void snd_seq_oss_readq_wait(seq_oss_readq_t *q);
-void snd_seq_oss_readq_free(seq_oss_readq_t *q);
+struct seq_oss_readq *snd_seq_oss_readq_new(struct seq_oss_devinfo *dp, int maxlen);
+void snd_seq_oss_readq_delete(struct seq_oss_readq *q);
+void snd_seq_oss_readq_clear(struct seq_oss_readq *readq);
+unsigned int snd_seq_oss_readq_poll(struct seq_oss_readq *readq, struct file *file, poll_table *wait);
+int snd_seq_oss_readq_puts(struct seq_oss_readq *readq, int dev, unsigned char *data, int len);
+int snd_seq_oss_readq_put_event(struct seq_oss_readq *readq, union evrec *ev);
+int snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *readq, unsigned long curt, int seq_mode);
+int snd_seq_oss_readq_pick(struct seq_oss_readq *q, union evrec *rec);
+void snd_seq_oss_readq_wait(struct seq_oss_readq *q);
+void snd_seq_oss_readq_free(struct seq_oss_readq *q);
 
 #define snd_seq_oss_readq_lock(q, flags) spin_lock_irqsave(&(q)->lock, flags)
 #define snd_seq_oss_readq_unlock(q, flags) spin_unlock_irqrestore(&(q)->lock, flags)
diff --git a/sound/core/seq/oss/seq_oss_rw.c b/sound/core/seq/oss/seq_oss_rw.c
index 1d8fbd22e3e..6a7b6aceeca 100644
--- a/sound/core/seq/oss/seq_oss_rw.c
+++ b/sound/core/seq/oss/seq_oss_rw.c
@@ -33,7 +33,7 @@
 /*
  * protoypes
  */
-static int insert_queue(seq_oss_devinfo_t *dp, evrec_t *rec, struct file *opt);
+static int insert_queue(struct seq_oss_devinfo *dp, union evrec *rec, struct file *opt);
 
 
 /*
@@ -41,12 +41,12 @@ static int insert_queue(seq_oss_devinfo_t *dp, evrec_t *rec, struct file *opt);
  */
 
 int
-snd_seq_oss_read(seq_oss_devinfo_t *dp, char __user *buf, int count)
+snd_seq_oss_read(struct seq_oss_devinfo *dp, char __user *buf, int count)
 {
-	seq_oss_readq_t *readq = dp->readq;
+	struct seq_oss_readq *readq = dp->readq;
 	int result = 0, err = 0;
 	int ev_len;
-	evrec_t rec;
+	union evrec rec;
 	unsigned long flags;
 
 	if (readq == NULL || ! is_read_mode(dp->file_mode))
@@ -93,11 +93,11 @@ snd_seq_oss_read(seq_oss_devinfo_t *dp, char __user *buf, int count)
  */
 
 int
-snd_seq_oss_write(seq_oss_devinfo_t *dp, const char __user *buf, int count, struct file *opt)
+snd_seq_oss_write(struct seq_oss_devinfo *dp, const char __user *buf, int count, struct file *opt)
 {
 	int result = 0, err = 0;
 	int ev_size, fmt;
-	evrec_t rec;
+	union evrec rec;
 
 	if (! is_write_mode(dp->file_mode) || dp->writeq == NULL)
 		return -ENXIO;
@@ -161,10 +161,10 @@ snd_seq_oss_write(seq_oss_devinfo_t *dp, const char __user *buf, int count, stru
  * return: 0 = OK, non-zero = NG
  */
 static int
-insert_queue(seq_oss_devinfo_t *dp, evrec_t *rec, struct file *opt)
+insert_queue(struct seq_oss_devinfo *dp, union evrec *rec, struct file *opt)
 {
 	int rc = 0;
-	snd_seq_event_t event;
+	struct snd_seq_event event;
 
 	/* if this is a timing event, process the current time */
 	if (snd_seq_oss_process_timer_event(dp->timer, rec))
@@ -197,7 +197,7 @@ insert_queue(seq_oss_devinfo_t *dp, evrec_t *rec, struct file *opt)
  */
   
 unsigned int
-snd_seq_oss_poll(seq_oss_devinfo_t *dp, struct file *file, poll_table * wait)
+snd_seq_oss_poll(struct seq_oss_devinfo *dp, struct file *file, poll_table * wait)
 {
 	unsigned int mask = 0;
 
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
index 8257fce2ca1..0b6025c92b9 100644
--- a/sound/core/seq/oss/seq_oss_synth.c
+++ b/sound/core/seq/oss/seq_oss_synth.c
@@ -37,14 +37,14 @@
  */
 
 /* sysex buffer */
-struct seq_oss_synth_sysex_t {
+struct seq_oss_synth_sysex {
 	int len;
 	int skip;
 	unsigned char buf[MAX_SYSEX_BUFLEN];
 };
 
 /* synth info */
-struct seq_oss_synth_t {
+struct seq_oss_synth {
 	int seq_device;
 
 	/* for synth_info */
@@ -53,7 +53,7 @@ struct seq_oss_synth_t {
 	int nr_voices;
 
 	char name[SNDRV_SEQ_OSS_MAX_SYNTH_NAME];
-	snd_seq_oss_callback_t oper;
+	struct snd_seq_oss_callback oper;
 
 	int opened;
 
@@ -66,8 +66,8 @@ struct seq_oss_synth_t {
  * device table
  */
 static int max_synth_devs;
-static seq_oss_synth_t *synth_devs[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS];
-static seq_oss_synth_t midi_synth_dev = {
+static struct seq_oss_synth *synth_devs[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS];
+static struct seq_oss_synth midi_synth_dev = {
 	-1, /* seq_device */
 	SYNTH_TYPE_MIDI, /* synth_type */
 	0, /* synth_subtype */
@@ -80,8 +80,8 @@ static DEFINE_SPINLOCK(register_lock);
 /*
  * prototypes
  */
-static seq_oss_synth_t *get_synthdev(seq_oss_devinfo_t *dp, int dev);
-static void reset_channels(seq_oss_synthinfo_t *info);
+static struct seq_oss_synth *get_synthdev(struct seq_oss_devinfo *dp, int dev);
+static void reset_channels(struct seq_oss_synthinfo *info);
 
 /*
  * global initialization
@@ -96,11 +96,11 @@ snd_seq_oss_synth_init(void)
  * registration of the synth device
  */
 int
-snd_seq_oss_synth_register(snd_seq_device_t *dev)
+snd_seq_oss_synth_register(struct snd_seq_device *dev)
 {
 	int i;
-	seq_oss_synth_t *rec;
-	snd_seq_oss_reg_t *reg = SNDRV_SEQ_DEVICE_ARGPTR(dev);
+	struct seq_oss_synth *rec;
+	struct snd_seq_oss_reg *reg = SNDRV_SEQ_DEVICE_ARGPTR(dev);
 	unsigned long flags;
 
 	if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL) {
@@ -148,10 +148,10 @@ snd_seq_oss_synth_register(snd_seq_device_t *dev)
 
 
 int
-snd_seq_oss_synth_unregister(snd_seq_device_t *dev)
+snd_seq_oss_synth_unregister(struct snd_seq_device *dev)
 {
 	int index;
-	seq_oss_synth_t *rec = dev->driver_data;
+	struct seq_oss_synth *rec = dev->driver_data;
 	unsigned long flags;
 
 	spin_lock_irqsave(&register_lock, flags);
@@ -187,10 +187,10 @@ snd_seq_oss_synth_unregister(snd_seq_device_t *dev)
 
 /*
  */
-static seq_oss_synth_t *
+static struct seq_oss_synth *
 get_sdev(int dev)
 {
-	seq_oss_synth_t *rec;
+	struct seq_oss_synth *rec;
 	unsigned long flags;
 
 	spin_lock_irqsave(&register_lock, flags);
@@ -207,11 +207,11 @@ get_sdev(int dev)
  */
 
 void
-snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp)
+snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp)
 {
 	int i;
-	seq_oss_synth_t *rec;
-	seq_oss_synthinfo_t *info;
+	struct seq_oss_synth *rec;
+	struct seq_oss_synthinfo *info;
 
 	dp->max_synthdev = max_synth_devs;
 	dp->synth_opened = 0;
@@ -244,7 +244,7 @@ snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp)
 		}
 		info->nr_voices = rec->nr_voices;
 		if (info->nr_voices > 0) {
-			info->ch = kcalloc(info->nr_voices, sizeof(seq_oss_chinfo_t), GFP_KERNEL);
+			info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL);
 			if (!info->ch)
 				BUG();
 			reset_channels(info);
@@ -263,7 +263,7 @@ snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp)
  */
 
 void
-snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp)
+snd_seq_oss_synth_setup_midi(struct seq_oss_devinfo *dp)
 {
 	int i;
 
@@ -271,7 +271,7 @@ snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp)
 		return;
 
 	for (i = 0; i < dp->max_mididev; i++) {
-		seq_oss_synthinfo_t *info;
+		struct seq_oss_synthinfo *info;
 		info = &dp->synths[dp->max_synthdev];
 		if (snd_seq_oss_midi_open(dp, i, dp->file_mode) < 0)
 			continue;
@@ -297,11 +297,11 @@ snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp)
  */
 
 void
-snd_seq_oss_synth_cleanup(seq_oss_devinfo_t *dp)
+snd_seq_oss_synth_cleanup(struct seq_oss_devinfo *dp)
 {
 	int i;
-	seq_oss_synth_t *rec;
-	seq_oss_synthinfo_t *info;
+	struct seq_oss_synth *rec;
+	struct seq_oss_synthinfo *info;
 
 	snd_assert(dp->max_synthdev <= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS, return);
 	for (i = 0; i < dp->max_synthdev; i++) {
@@ -338,7 +338,7 @@ snd_seq_oss_synth_cleanup(seq_oss_devinfo_t *dp)
  * check if the specified device is MIDI mapped device
  */
 static int
-is_midi_dev(seq_oss_devinfo_t *dp, int dev)
+is_midi_dev(struct seq_oss_devinfo *dp, int dev)
 {
 	if (dev < 0 || dev >= dp->max_synthdev)
 		return 0;
@@ -350,10 +350,10 @@ is_midi_dev(seq_oss_devinfo_t *dp, int dev)
 /*
  * return synth device information pointer
  */
-static seq_oss_synth_t *
-get_synthdev(seq_oss_devinfo_t *dp, int dev)
+static struct seq_oss_synth *
+get_synthdev(struct seq_oss_devinfo *dp, int dev)
 {
-	seq_oss_synth_t *rec;
+	struct seq_oss_synth *rec;
 	if (dev < 0 || dev >= dp->max_synthdev)
 		return NULL;
 	if (! dp->synths[dev].opened)
@@ -374,7 +374,7 @@ get_synthdev(seq_oss_devinfo_t *dp, int dev)
  * reset note and velocity on each channel.
  */
 static void
-reset_channels(seq_oss_synthinfo_t *info)
+reset_channels(struct seq_oss_synthinfo *info)
 {
 	int i;
 	if (info->ch == NULL || ! info->nr_voices)
@@ -392,10 +392,10 @@ reset_channels(seq_oss_synthinfo_t *info)
  * event to the corresponding port.
  */
 void
-snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev)
+snd_seq_oss_synth_reset(struct seq_oss_devinfo *dp, int dev)
 {
-	seq_oss_synth_t *rec;
-	seq_oss_synthinfo_t *info;
+	struct seq_oss_synth *rec;
+	struct seq_oss_synthinfo *info;
 
 	snd_assert(dev >= 0 && dev < dp->max_synthdev, return);
 	info = &dp->synths[dev];
@@ -428,7 +428,7 @@ snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev)
 	if (rec->oper.reset) {
 		rec->oper.reset(&info->arg);
 	} else {
-		snd_seq_event_t ev;
+		struct snd_seq_event ev;
 		memset(&ev, 0, sizeof(ev));
 		snd_seq_oss_fill_addr(dp, &ev, info->arg.addr.client,
 				      info->arg.addr.port);
@@ -444,10 +444,10 @@ snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev)
  * call load_patch callback function
  */
 int
-snd_seq_oss_synth_load_patch(seq_oss_devinfo_t *dp, int dev, int fmt,
+snd_seq_oss_synth_load_patch(struct seq_oss_devinfo *dp, int dev, int fmt,
 			    const char __user *buf, int p, int c)
 {
-	seq_oss_synth_t *rec;
+	struct seq_oss_synth *rec;
 	int rc;
 
 	if (dev < 0 || dev >= dp->max_synthdev)
@@ -470,9 +470,9 @@ snd_seq_oss_synth_load_patch(seq_oss_devinfo_t *dp, int dev, int fmt,
  * check if the device is valid synth device
  */
 int
-snd_seq_oss_synth_is_valid(seq_oss_devinfo_t *dp, int dev)
+snd_seq_oss_synth_is_valid(struct seq_oss_devinfo *dp, int dev)
 {
-	seq_oss_synth_t *rec;
+	struct seq_oss_synth *rec;
 	rec = get_synthdev(dp, dev);
 	if (rec) {
 		snd_use_lock_free(&rec->use_lock);
@@ -488,11 +488,11 @@ snd_seq_oss_synth_is_valid(seq_oss_devinfo_t *dp, int dev)
  * (0xff).
  */
 int
-snd_seq_oss_synth_sysex(seq_oss_devinfo_t *dp, int dev, unsigned char *buf, snd_seq_event_t *ev)
+snd_seq_oss_synth_sysex(struct seq_oss_devinfo *dp, int dev, unsigned char *buf, struct snd_seq_event *ev)
 {
 	int i, send;
 	unsigned char *dest;
-	seq_oss_synth_sysex_t *sysex;
+	struct seq_oss_synth_sysex *sysex;
 
 	if (! snd_seq_oss_synth_is_valid(dp, dev))
 		return -ENXIO;
@@ -545,7 +545,7 @@ snd_seq_oss_synth_sysex(seq_oss_devinfo_t *dp, int dev, unsigned char *buf, snd_
  * fill the event source/destination addresses
  */
 int
-snd_seq_oss_synth_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_event_t *ev)
+snd_seq_oss_synth_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_event *ev)
 {
 	if (! snd_seq_oss_synth_is_valid(dp, dev))
 		return -EINVAL;
@@ -559,9 +559,9 @@ snd_seq_oss_synth_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_event_t *ev)
  * OSS compatible ioctl
  */
 int
-snd_seq_oss_synth_ioctl(seq_oss_devinfo_t *dp, int dev, unsigned int cmd, unsigned long addr)
+snd_seq_oss_synth_ioctl(struct seq_oss_devinfo *dp, int dev, unsigned int cmd, unsigned long addr)
 {
-	seq_oss_synth_t *rec;
+	struct seq_oss_synth *rec;
 	int rc;
 
 	if (is_midi_dev(dp, dev))
@@ -581,7 +581,7 @@ snd_seq_oss_synth_ioctl(seq_oss_devinfo_t *dp, int dev, unsigned int cmd, unsign
  * send OSS raw events - SEQ_PRIVATE and SEQ_VOLUME
  */
 int
-snd_seq_oss_synth_raw_event(seq_oss_devinfo_t *dp, int dev, unsigned char *data, snd_seq_event_t *ev)
+snd_seq_oss_synth_raw_event(struct seq_oss_devinfo *dp, int dev, unsigned char *data, struct snd_seq_event *ev)
 {
 	if (! snd_seq_oss_synth_is_valid(dp, dev) || is_midi_dev(dp, dev))
 		return -ENXIO;
@@ -595,9 +595,9 @@ snd_seq_oss_synth_raw_event(seq_oss_devinfo_t *dp, int dev, unsigned char *data,
  * create OSS compatible synth_info record
  */
 int
-snd_seq_oss_synth_make_info(seq_oss_devinfo_t *dp, int dev, struct synth_info *inf)
+snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_info *inf)
 {
-	seq_oss_synth_t *rec;
+	struct seq_oss_synth *rec;
 
 	if (dp->synths[dev].is_midi) {
 		struct midi_info minf;
@@ -625,10 +625,10 @@ snd_seq_oss_synth_make_info(seq_oss_devinfo_t *dp, int dev, struct synth_info *i
  * proc interface
  */
 void
-snd_seq_oss_synth_info_read(snd_info_buffer_t *buf)
+snd_seq_oss_synth_info_read(struct snd_info_buffer *buf)
 {
 	int i;
-	seq_oss_synth_t *rec;
+	struct seq_oss_synth *rec;
 
 	snd_iprintf(buf, "\nNumber of synth devices: %d\n", max_synth_devs);
 	for (i = 0; i < max_synth_devs; i++) {
diff --git a/sound/core/seq/oss/seq_oss_synth.h b/sound/core/seq/oss/seq_oss_synth.h
index 07bc0e2cfb8..dbdfcbb80ea 100644
--- a/sound/core/seq/oss/seq_oss_synth.h
+++ b/sound/core/seq/oss/seq_oss_synth.h
@@ -27,23 +27,25 @@
 #include <sound/seq_oss_legacy.h>
 #include <sound/seq_device.h>
 
-typedef struct seq_oss_synth_t seq_oss_synth_t;
-
 void snd_seq_oss_synth_init(void);
-int snd_seq_oss_synth_register(snd_seq_device_t *dev);
-int snd_seq_oss_synth_unregister(snd_seq_device_t *dev);
-void snd_seq_oss_synth_setup(seq_oss_devinfo_t *dp);
-void snd_seq_oss_synth_setup_midi(seq_oss_devinfo_t *dp);
-void snd_seq_oss_synth_cleanup(seq_oss_devinfo_t *dp);
+int snd_seq_oss_synth_register(struct snd_seq_device *dev);
+int snd_seq_oss_synth_unregister(struct snd_seq_device *dev);
+void snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp);
+void snd_seq_oss_synth_setup_midi(struct seq_oss_devinfo *dp);
+void snd_seq_oss_synth_cleanup(struct seq_oss_devinfo *dp);
 
-void snd_seq_oss_synth_reset(seq_oss_devinfo_t *dp, int dev);
-int snd_seq_oss_synth_load_patch(seq_oss_devinfo_t *dp, int dev, int fmt, const char __user *buf, int p, int c);
-int snd_seq_oss_synth_is_valid(seq_oss_devinfo_t *dp, int dev);
-int snd_seq_oss_synth_sysex(seq_oss_devinfo_t *dp, int dev, unsigned char *buf, snd_seq_event_t *ev);
-int snd_seq_oss_synth_addr(seq_oss_devinfo_t *dp, int dev, snd_seq_event_t *ev);
-int snd_seq_oss_synth_ioctl(seq_oss_devinfo_t *dp, int dev, unsigned int cmd, unsigned long addr);
-int snd_seq_oss_synth_raw_event(seq_oss_devinfo_t *dp, int dev, unsigned char *data, snd_seq_event_t *ev);
+void snd_seq_oss_synth_reset(struct seq_oss_devinfo *dp, int dev);
+int snd_seq_oss_synth_load_patch(struct seq_oss_devinfo *dp, int dev, int fmt,
+				 const char __user *buf, int p, int c);
+int snd_seq_oss_synth_is_valid(struct seq_oss_devinfo *dp, int dev);
+int snd_seq_oss_synth_sysex(struct seq_oss_devinfo *dp, int dev, unsigned char *buf,
+			    struct snd_seq_event *ev);
+int snd_seq_oss_synth_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_event *ev);
+int snd_seq_oss_synth_ioctl(struct seq_oss_devinfo *dp, int dev, unsigned int cmd,
+			    unsigned long addr);
+int snd_seq_oss_synth_raw_event(struct seq_oss_devinfo *dp, int dev,
+				unsigned char *data, struct snd_seq_event *ev);
 
-int snd_seq_oss_synth_make_info(seq_oss_devinfo_t *dp, int dev, struct synth_info *inf);
+int snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_info *inf);
 
 #endif
diff --git a/sound/core/seq/oss/seq_oss_timer.c b/sound/core/seq/oss/seq_oss_timer.c
index 64d594b3170..c440fdacec9 100644
--- a/sound/core/seq/oss/seq_oss_timer.c
+++ b/sound/core/seq/oss/seq_oss_timer.c
@@ -33,18 +33,18 @@
 
 /*
  */
-static void calc_alsa_tempo(seq_oss_timer_t *timer);
-static int send_timer_event(seq_oss_devinfo_t *dp, int type, int value);
+static void calc_alsa_tempo(struct seq_oss_timer *timer);
+static int send_timer_event(struct seq_oss_devinfo *dp, int type, int value);
 
 
 /*
  * create and register a new timer.
  * if queue is not started yet, start it.
  */
-seq_oss_timer_t *
-snd_seq_oss_timer_new(seq_oss_devinfo_t *dp)
+struct seq_oss_timer *
+snd_seq_oss_timer_new(struct seq_oss_devinfo *dp)
 {
-	seq_oss_timer_t *rec;
+	struct seq_oss_timer *rec;
 
 	rec = kzalloc(sizeof(*rec), GFP_KERNEL);
 	if (rec == NULL)
@@ -67,7 +67,7 @@ snd_seq_oss_timer_new(seq_oss_devinfo_t *dp)
  * if no more timer exists, stop the queue.
  */
 void
-snd_seq_oss_timer_delete(seq_oss_timer_t *rec)
+snd_seq_oss_timer_delete(struct seq_oss_timer *rec)
 {
 	if (rec) {
 		snd_seq_oss_timer_stop(rec);
@@ -82,7 +82,7 @@ snd_seq_oss_timer_delete(seq_oss_timer_t *rec)
  *        0 : not a timer event -- enqueue this event
  */
 int
-snd_seq_oss_process_timer_event(seq_oss_timer_t *rec, evrec_t *ev)
+snd_seq_oss_process_timer_event(struct seq_oss_timer *rec, union evrec *ev)
 {
 	abstime_t parm = ev->t.time;
 
@@ -125,7 +125,7 @@ snd_seq_oss_process_timer_event(seq_oss_timer_t *rec, evrec_t *ev)
  * convert tempo units
  */
 static void
-calc_alsa_tempo(seq_oss_timer_t *timer)
+calc_alsa_tempo(struct seq_oss_timer *timer)
 {
 	timer->tempo = (60 * 1000000) / timer->oss_tempo;
 	timer->ppq = timer->oss_timebase;
@@ -136,9 +136,9 @@ calc_alsa_tempo(seq_oss_timer_t *timer)
  * dispatch a timer event
  */
 static int
-send_timer_event(seq_oss_devinfo_t *dp, int type, int value)
+send_timer_event(struct seq_oss_devinfo *dp, int type, int value)
 {
-	snd_seq_event_t ev;
+	struct snd_seq_event ev;
 
 	memset(&ev, 0, sizeof(ev));
 	ev.type = type;
@@ -156,10 +156,10 @@ send_timer_event(seq_oss_devinfo_t *dp, int type, int value)
  * set queue tempo and start queue
  */
 int
-snd_seq_oss_timer_start(seq_oss_timer_t *timer)
+snd_seq_oss_timer_start(struct seq_oss_timer *timer)
 {
-	seq_oss_devinfo_t *dp = timer->dp;
-	snd_seq_queue_tempo_t tmprec;
+	struct seq_oss_devinfo *dp = timer->dp;
+	struct snd_seq_queue_tempo tmprec;
 
 	if (timer->running)
 		snd_seq_oss_timer_stop(timer);
@@ -181,7 +181,7 @@ snd_seq_oss_timer_start(seq_oss_timer_t *timer)
  * stop queue
  */
 int
-snd_seq_oss_timer_stop(seq_oss_timer_t *timer)
+snd_seq_oss_timer_stop(struct seq_oss_timer *timer)
 {
 	if (! timer->running)
 		return 0;
@@ -195,7 +195,7 @@ snd_seq_oss_timer_stop(seq_oss_timer_t *timer)
  * continue queue
  */
 int
-snd_seq_oss_timer_continue(seq_oss_timer_t *timer)
+snd_seq_oss_timer_continue(struct seq_oss_timer *timer)
 {
 	if (timer->running)
 		return 0;
@@ -209,7 +209,7 @@ snd_seq_oss_timer_continue(seq_oss_timer_t *timer)
  * change queue tempo
  */
 int
-snd_seq_oss_timer_tempo(seq_oss_timer_t *timer, int value)
+snd_seq_oss_timer_tempo(struct seq_oss_timer *timer, int value)
 {
 	if (value < MIN_OSS_TEMPO)
 		value = MIN_OSS_TEMPO;
@@ -227,7 +227,7 @@ snd_seq_oss_timer_tempo(seq_oss_timer_t *timer, int value)
  * ioctls
  */
 int
-snd_seq_oss_timer_ioctl(seq_oss_timer_t *timer, unsigned int cmd, int __user *arg)
+snd_seq_oss_timer_ioctl(struct seq_oss_timer *timer, unsigned int cmd, int __user *arg)
 {
 	int value;
 
diff --git a/sound/core/seq/oss/seq_oss_timer.h b/sound/core/seq/oss/seq_oss_timer.h
index 6e4dbd8504c..b995bd68ad1 100644
--- a/sound/core/seq/oss/seq_oss_timer.h
+++ b/sound/core/seq/oss/seq_oss_timer.h
@@ -27,8 +27,8 @@
 /*
  * timer information definition
  */
-struct seq_oss_timer_t {
-	seq_oss_devinfo_t *dp;
+struct seq_oss_timer {
+	struct seq_oss_devinfo *dp;
 	reltime_t cur_tick;
 	int realtime;
 	int running;
@@ -37,22 +37,22 @@ struct seq_oss_timer_t {
 };	
 
 
-seq_oss_timer_t *snd_seq_oss_timer_new(seq_oss_devinfo_t *dp);
-void snd_seq_oss_timer_delete(seq_oss_timer_t *dp);
+struct seq_oss_timer *snd_seq_oss_timer_new(struct seq_oss_devinfo *dp);
+void snd_seq_oss_timer_delete(struct seq_oss_timer *dp);
 
-int snd_seq_oss_timer_start(seq_oss_timer_t *timer);
-int snd_seq_oss_timer_stop(seq_oss_timer_t *timer);
-int snd_seq_oss_timer_continue(seq_oss_timer_t *timer);
-int snd_seq_oss_timer_tempo(seq_oss_timer_t *timer, int value);
+int snd_seq_oss_timer_start(struct seq_oss_timer *timer);
+int snd_seq_oss_timer_stop(struct seq_oss_timer *timer);
+int snd_seq_oss_timer_continue(struct seq_oss_timer *timer);
+int snd_seq_oss_timer_tempo(struct seq_oss_timer *timer, int value);
 #define snd_seq_oss_timer_reset  snd_seq_oss_timer_start
 
-int snd_seq_oss_timer_ioctl(seq_oss_timer_t *timer, unsigned int cmd, int __user *arg);
+int snd_seq_oss_timer_ioctl(struct seq_oss_timer *timer, unsigned int cmd, int __user *arg);
 
 /*
  * get current processed time
  */
 static inline abstime_t
-snd_seq_oss_timer_cur_tick(seq_oss_timer_t *timer)
+snd_seq_oss_timer_cur_tick(struct seq_oss_timer *timer)
 {
 	return timer->cur_tick;
 }
@@ -62,7 +62,7 @@ snd_seq_oss_timer_cur_tick(seq_oss_timer_t *timer)
  * is realtime event?
  */
 static inline int
-snd_seq_oss_timer_is_realtime(seq_oss_timer_t *timer)
+snd_seq_oss_timer_is_realtime(struct seq_oss_timer *timer)
 {
 	return timer->realtime;
 }
diff --git a/sound/core/seq/oss/seq_oss_writeq.c b/sound/core/seq/oss/seq_oss_writeq.c
index b2037802454..5c8495601a3 100644
--- a/sound/core/seq/oss/seq_oss_writeq.c
+++ b/sound/core/seq/oss/seq_oss_writeq.c
@@ -32,11 +32,11 @@
 /*
  * create a write queue record
  */
-seq_oss_writeq_t *
-snd_seq_oss_writeq_new(seq_oss_devinfo_t *dp, int maxlen)
+struct seq_oss_writeq *
+snd_seq_oss_writeq_new(struct seq_oss_devinfo *dp, int maxlen)
 {
-	seq_oss_writeq_t *q;
-	snd_seq_client_pool_t pool;
+	struct seq_oss_writeq *q;
+	struct snd_seq_client_pool pool;
 
 	if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL)
 		return NULL;
@@ -61,7 +61,7 @@ snd_seq_oss_writeq_new(seq_oss_devinfo_t *dp, int maxlen)
  * delete the write queue
  */
 void
-snd_seq_oss_writeq_delete(seq_oss_writeq_t *q)
+snd_seq_oss_writeq_delete(struct seq_oss_writeq *q)
 {
 	snd_seq_oss_writeq_clear(q);	/* to be sure */
 	kfree(q);
@@ -72,9 +72,9 @@ snd_seq_oss_writeq_delete(seq_oss_writeq_t *q)
  * reset the write queue
  */
 void
-snd_seq_oss_writeq_clear(seq_oss_writeq_t *q)
+snd_seq_oss_writeq_clear(struct seq_oss_writeq *q)
 {
-	snd_seq_remove_events_t reset;
+	struct snd_seq_remove_events reset;
 
 	memset(&reset, 0, sizeof(reset));
 	reset.remove_mode = SNDRV_SEQ_REMOVE_OUTPUT; /* remove all */
@@ -88,9 +88,9 @@ snd_seq_oss_writeq_clear(seq_oss_writeq_t *q)
  * wait until the write buffer has enough room
  */
 int
-snd_seq_oss_writeq_sync(seq_oss_writeq_t *q)
+snd_seq_oss_writeq_sync(struct seq_oss_writeq *q)
 {
-	seq_oss_devinfo_t *dp = q->dp;
+	struct seq_oss_devinfo *dp = q->dp;
 	abstime_t time;
 
 	time = snd_seq_oss_timer_cur_tick(dp->timer);
@@ -98,8 +98,8 @@ snd_seq_oss_writeq_sync(seq_oss_writeq_t *q)
 		return 0; /* already finished */
 
 	if (! q->sync_event_put) {
-		snd_seq_event_t ev;
-		evrec_t *rec;
+		struct snd_seq_event ev;
+		union evrec *rec;
 
 		/* put echoback event */
 		memset(&ev, 0, sizeof(ev));
@@ -108,7 +108,7 @@ snd_seq_oss_writeq_sync(seq_oss_writeq_t *q)
 		ev.time.tick = time;
 		/* echo back to itself */
 		snd_seq_oss_fill_addr(dp, &ev, dp->addr.client, dp->addr.port);
-		rec = (evrec_t*)&ev.data;
+		rec = (union evrec *)&ev.data;
 		rec->t.code = SEQ_SYNCTIMER;
 		rec->t.time = time;
 		q->sync_event_put = 1;
@@ -128,7 +128,7 @@ snd_seq_oss_writeq_sync(seq_oss_writeq_t *q)
  * wake up sync - echo event was catched
  */
 void
-snd_seq_oss_writeq_wakeup(seq_oss_writeq_t *q, abstime_t time)
+snd_seq_oss_writeq_wakeup(struct seq_oss_writeq *q, abstime_t time)
 {
 	unsigned long flags;
 
@@ -146,9 +146,9 @@ snd_seq_oss_writeq_wakeup(seq_oss_writeq_t *q, abstime_t time)
  * return the unused pool size
  */
 int
-snd_seq_oss_writeq_get_free_size(seq_oss_writeq_t *q)
+snd_seq_oss_writeq_get_free_size(struct seq_oss_writeq *q)
 {
-	snd_seq_client_pool_t pool;
+	struct snd_seq_client_pool pool;
 	pool.client = q->dp->cseq;
 	snd_seq_oss_control(q->dp, SNDRV_SEQ_IOCTL_GET_CLIENT_POOL, &pool);
 	return pool.output_free;
@@ -159,9 +159,9 @@ snd_seq_oss_writeq_get_free_size(seq_oss_writeq_t *q)
  * set output threshold size from ioctl
  */
 void
-snd_seq_oss_writeq_set_output(seq_oss_writeq_t *q, int val)
+snd_seq_oss_writeq_set_output(struct seq_oss_writeq *q, int val)
 {
-	snd_seq_client_pool_t pool;
+	struct snd_seq_client_pool pool;
 	pool.client = q->dp->cseq;
 	snd_seq_oss_control(q->dp, SNDRV_SEQ_IOCTL_GET_CLIENT_POOL, &pool);
 	pool.output_room = val;
diff --git a/sound/core/seq/oss/seq_oss_writeq.h b/sound/core/seq/oss/seq_oss_writeq.h
index 6a13c85e239..c469d296756 100644
--- a/sound/core/seq/oss/seq_oss_writeq.h
+++ b/sound/core/seq/oss/seq_oss_writeq.h
@@ -25,8 +25,8 @@
 #include "seq_oss_device.h"
 
 
-struct seq_oss_writeq_t {
-	seq_oss_devinfo_t *dp;
+struct seq_oss_writeq {
+	struct seq_oss_devinfo *dp;
 	int maxlen;
 	abstime_t sync_time;
 	int sync_event_put;
@@ -38,13 +38,13 @@ struct seq_oss_writeq_t {
 /*
  * seq_oss_writeq.c
  */
-seq_oss_writeq_t *snd_seq_oss_writeq_new(seq_oss_devinfo_t *dp, int maxlen);
-void snd_seq_oss_writeq_delete(seq_oss_writeq_t *q);
-void snd_seq_oss_writeq_clear(seq_oss_writeq_t *q);
-int snd_seq_oss_writeq_sync(seq_oss_writeq_t *q);
-void snd_seq_oss_writeq_wakeup(seq_oss_writeq_t *q, abstime_t time);
-int snd_seq_oss_writeq_get_free_size(seq_oss_writeq_t *q);
-void snd_seq_oss_writeq_set_output(seq_oss_writeq_t *q, int size);
+struct seq_oss_writeq *snd_seq_oss_writeq_new(struct seq_oss_devinfo *dp, int maxlen);
+void snd_seq_oss_writeq_delete(struct seq_oss_writeq *q);
+void snd_seq_oss_writeq_clear(struct seq_oss_writeq *q);
+int snd_seq_oss_writeq_sync(struct seq_oss_writeq *q);
+void snd_seq_oss_writeq_wakeup(struct seq_oss_writeq *q, abstime_t time);
+int snd_seq_oss_writeq_get_free_size(struct seq_oss_writeq *q);
+void snd_seq_oss_writeq_set_output(struct seq_oss_writeq *q, int size);
 
 
 #endif
-- 
cgit v1.2.3-70-g09d2


From 87e1f0e2b206eaf8265997a8d0cb7126ea11c844 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:08:02 +0100
Subject: [ALSA] Backward-compatibility typedefs

Modules: ALSA Core

Backward-compatibility typedefs are stored in the new header, typedefs.h,
for out-of-tree drivers.  This will be removed in future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/typedefs.h | 173 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 173 insertions(+)
 create mode 100644 include/sound/typedefs.h

(limited to 'include/sound')

diff --git a/include/sound/typedefs.h b/include/sound/typedefs.h
new file mode 100644
index 00000000000..f454b0206b9
--- /dev/null
+++ b/include/sound/typedefs.h
@@ -0,0 +1,173 @@
+/*
+ * Typedef's for backward compatibility (for out-of-kernel drivers)
+ *
+ * This file will be removed soon in future
+ */
+
+/* core stuff */
+typedef struct snd_card snd_card_t;
+typedef struct snd_device snd_device_t;
+typedef struct snd_device_ops snd_device_ops_t;
+typedef enum snd_card_type snd_card_type_t;
+typedef struct snd_minor snd_minor_t;
+
+/* info */
+typedef struct snd_info_entry snd_info_entry_t;
+typedef struct snd_info_buffer snd_info_buffer_t;
+
+/* control */
+typedef struct snd_ctl_file snd_ctl_file_t;
+typedef struct snd_kcontrol snd_kcontrol_t;
+typedef struct snd_kcontrol_new snd_kcontrol_new_t;
+typedef struct snd_kcontrol_volatile snd_kcontrol_volatile_t;
+typedef struct snd_kctl_event snd_kctl_event_t;
+typedef struct snd_aes_iec958 snd_aes_iec958_t;
+typedef struct snd_ctl_card_info snd_ctl_card_info_t;
+typedef struct snd_ctl_elem_id snd_ctl_elem_id_t;
+typedef struct snd_ctl_elem_list snd_ctl_elem_list_t;
+typedef struct snd_ctl_elem_info snd_ctl_elem_info_t;
+typedef struct snd_ctl_elem_value snd_ctl_elem_value_t;
+typedef struct snd_ctl_event snd_ctl_event_t;
+#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
+typedef struct snd_mixer_oss snd_mixer_oss_t;
+#endif
+
+/* timer */
+typedef struct snd_timer snd_timer_t;
+typedef struct snd_timer_instance snd_timer_instance_t;
+typedef struct snd_timer_id snd_timer_id_t;
+typedef struct snd_timer_ginfo snd_timer_ginfo_t;
+typedef struct snd_timer_gparams snd_timer_gparams_t;
+typedef struct snd_timer_gstatus snd_timer_gstatus_t;
+typedef struct snd_timer_select snd_timer_select_t;
+typedef struct snd_timer_info snd_timer_info_t;
+typedef struct snd_timer_params snd_timer_params_t;
+typedef struct snd_timer_status snd_timer_status_t;
+typedef struct snd_timer_read snd_timer_read_t;
+typedef struct snd_timer_tread snd_timer_tread_t;
+
+/* PCM */
+typedef struct snd_pcm snd_pcm_t;
+typedef struct snd_pcm_str snd_pcm_str_t;
+typedef struct snd_pcm_substream snd_pcm_substream_t;
+typedef struct snd_pcm_info snd_pcm_info_t;
+typedef struct snd_pcm_hw_params snd_pcm_hw_params_t;
+typedef struct snd_pcm_sw_params snd_pcm_sw_params_t;
+typedef struct snd_pcm_channel_info snd_pcm_channel_info_t;
+typedef struct snd_pcm_status snd_pcm_status_t;
+typedef struct snd_pcm_mmap_status snd_pcm_mmap_status_t;
+typedef struct snd_pcm_mmap_control snd_pcm_mmap_control_t;
+typedef struct snd_mask snd_mask_t;
+typedef struct snd_sg_buf snd_pcm_sgbuf_t;
+
+typedef struct snd_interval snd_interval_t;
+typedef struct snd_xferi snd_xferi_t;
+typedef struct snd_xfern snd_xfern_t;
+typedef struct snd_xferv snd_xferv_t;
+
+typedef struct snd_pcm_file snd_pcm_file_t;
+typedef struct snd_pcm_runtime snd_pcm_runtime_t;
+typedef struct snd_pcm_hardware snd_pcm_hardware_t;
+typedef struct snd_pcm_ops snd_pcm_ops_t;
+typedef struct snd_pcm_hw_rule snd_pcm_hw_rule_t;
+typedef struct snd_pcm_hw_constraints snd_pcm_hw_constraints_t;
+typedef struct snd_ratnum ratnum_t;
+typedef struct snd_ratden ratden_t;
+typedef struct snd_pcm_hw_constraint_ratnums snd_pcm_hw_constraint_ratnums_t;
+typedef struct snd_pcm_hw_constraint_ratdens snd_pcm_hw_constraint_ratdens_t;
+typedef struct snd_pcm_hw_constraint_list snd_pcm_hw_constraint_list_t;
+typedef struct snd_pcm_group snd_pcm_group_t;
+typedef struct snd_pcm_notify snd_pcm_notify_t;
+
+/* rawmidi */
+typedef struct snd_rawmidi snd_rawmidi_t;
+typedef struct snd_rawmidi_info snd_rawmidi_info_t;
+typedef struct snd_rawmidi_params snd_rawmidi_params_t;
+typedef struct snd_rawmidi_status snd_rawmidi_status_t;
+typedef struct snd_rawmidi_runtime snd_rawmidi_runtime_t;
+typedef struct snd_rawmidi_substream snd_rawmidi_substream_t;
+typedef struct snd_rawmidi_str snd_rawmidi_str_t;
+typedef struct snd_rawmidi_ops snd_rawmidi_ops_t;
+typedef struct snd_rawmidi_global_ops snd_rawmidi_global_ops_t;
+typedef struct snd_rawmidi_file snd_rawmidi_file_t;
+
+/* hwdep */
+typedef struct snd_hwdep snd_hwdep_t;
+typedef struct snd_hwdep_info snd_hwdep_info_t;
+typedef struct snd_hwdep_dsp_status snd_hwdep_dsp_status_t;
+typedef struct snd_hwdep_dsp_image snd_hwdep_dsp_image_t;
+typedef struct snd_hwdep_ops snd_hwdep_ops_t;
+
+/* sequencer */
+typedef struct snd_seq_port_info snd_seq_port_info_t;
+typedef struct snd_seq_port_subscribe snd_seq_port_subscribe_t;
+typedef struct snd_seq_event snd_seq_event_t;
+typedef struct snd_seq_addr snd_seq_addr_t;
+typedef struct snd_seq_ev_volume snd_seq_ev_volume_t;
+typedef struct snd_seq_ev_loop snd_seq_ev_loop_t;
+typedef struct snd_seq_remove_events snd_seq_remove_events_t;
+typedef struct snd_seq_query_subs snd_seq_query_subs_t;
+typedef struct snd_seq_system_info snd_seq_system_info_t;
+typedef struct snd_seq_client_info snd_seq_client_info_t;
+typedef struct snd_seq_queue_info snd_seq_queue_info_t;
+typedef struct snd_seq_queue_status snd_seq_queue_status_t;
+typedef struct snd_seq_queue_tempo snd_seq_queue_tempo_t;
+typedef struct snd_seq_queue_owner snd_seq_queue_owner_t;
+typedef struct snd_seq_queue_timer snd_seq_queue_timer_t;
+typedef struct snd_seq_queue_client snd_seq_queue_client_t;
+typedef struct snd_seq_client_pool snd_seq_client_pool_t;
+typedef struct snd_seq_instr snd_seq_instr_t;
+typedef struct snd_seq_instr_data snd_seq_instr_data_t;
+typedef struct snd_seq_instr_header snd_seq_instr_header_t;
+
+typedef struct snd_seq_user_client user_client_t;
+typedef struct snd_seq_kernel_client kernel_client_t;
+typedef struct snd_seq_client client_t;
+typedef struct snd_seq_queue queue_t;
+
+/* seq_device */
+typedef struct snd_seq_device snd_seq_device_t;
+typedef struct snd_seq_dev_ops snd_seq_dev_ops_t;
+
+/* seq_midi */
+typedef struct snd_midi_event snd_midi_event_t;
+
+/* seq_midi_emul */
+typedef struct snd_midi_channel snd_midi_channel_t;
+typedef struct snd_midi_channel_set snd_midi_channel_set_t;
+typedef struct snd_midi_op snd_midi_op_t;
+
+/* seq_oss */
+typedef struct snd_seq_oss_arg snd_seq_oss_arg_t;
+typedef struct snd_seq_oss_callback snd_seq_oss_callback_t;
+typedef struct snd_seq_oss_reg snd_seq_oss_reg_t;
+
+/* virmidi */
+typedef struct snd_virmidi_dev snd_virmidi_dev_t;
+typedef struct snd_virmidi snd_virmidi_t;
+
+/* seq_instr */
+typedef struct snd_seq_kcluster snd_seq_kcluster_t;
+typedef struct snd_seq_kinstr_ops snd_seq_kinstr_ops_t;
+typedef struct snd_seq_kinstr snd_seq_kinstr_t;
+typedef struct snd_seq_kinstr_list snd_seq_kinstr_list_t;
+
+/* ac97 */
+typedef struct snd_ac97_bus ac97_bus_t;
+typedef struct snd_ac97_bus_ops ac97_bus_ops_t;
+typedef struct snd_ac97_template ac97_template_t;
+typedef struct snd_ac97 ac97_t;
+
+/* opl3/4 */
+typedef struct snd_opl3 opl3_t;
+typedef struct snd_opl4 opl4_t;
+
+/* mpu401 */
+typedef struct snd_mpu401 mpu401_t;
+
+/* i2c */
+typedef struct snd_i2c_device snd_i2c_device_t;
+typedef struct snd_i2c_bus snd_i2c_bus_t;
+
+typedef struct snd_ak4531 ak4531_t;
+
-- 
cgit v1.2.3-70-g09d2


From e1fad17bb4084dc7c435360185417aed55656ec8 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:12:45 +0100
Subject: [ALSA] Remove xxx_t typedefs: MPU401

Modules: MPU401 UART

Remove xxx_t typedefs from the MPU401-UART and MPU401 drivers

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/mpu401.h             | 26 +++++++-------
 sound/drivers/mpu401/mpu401.c      | 10 +++---
 sound/drivers/mpu401/mpu401_uart.c | 72 +++++++++++++++++++-------------------
 3 files changed, 53 insertions(+), 55 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/mpu401.h b/include/sound/mpu401.h
index ae39e38bf99..8e97ace78f1 100644
--- a/include/sound/mpu401.h
+++ b/include/sound/mpu401.h
@@ -58,10 +58,8 @@
 #define MPU401_MODE_INPUT_TIMER		(1<<0)
 #define MPU401_MODE_OUTPUT_TIMER	(1<<1)
 
-typedef struct _snd_mpu401 mpu401_t;
-
-struct _snd_mpu401 {
-	snd_rawmidi_t *rmidi;
+struct snd_mpu401 {
+	struct snd_rawmidi *rmidi;
 
 	unsigned short hardware;	/* MPU401_HW_XXXX */
 	unsigned long port;		/* base port of MPU-401 chip */
@@ -73,14 +71,14 @@ struct _snd_mpu401 {
 	unsigned long mode;		/* MPU401_MODE_XXXX */
 	int timer_invoked;
 
-	int (*open_input) (mpu401_t * mpu);
-	void (*close_input) (mpu401_t * mpu);
-	int (*open_output) (mpu401_t * mpu);
-	void (*close_output) (mpu401_t * mpu);
+	int (*open_input) (struct snd_mpu401 * mpu);
+	void (*close_input) (struct snd_mpu401 * mpu);
+	int (*open_output) (struct snd_mpu401 * mpu);
+	void (*close_output) (struct snd_mpu401 * mpu);
 	void *private_data;
 
-	snd_rawmidi_substream_t *substream_input;
-	snd_rawmidi_substream_t *substream_output;
+	struct snd_rawmidi_substream *substream_input;
+	struct snd_rawmidi_substream *substream_output;
 
 	spinlock_t input_lock;
 	spinlock_t output_lock;
@@ -88,8 +86,8 @@ struct _snd_mpu401 {
 	
 	struct timer_list timer;
 
-	void (*write) (mpu401_t * mpu, unsigned char data, unsigned long addr);
-	unsigned char (*read) (mpu401_t * mpu, unsigned long addr);
+	void (*write) (struct snd_mpu401 * mpu, unsigned char data, unsigned long addr);
+	unsigned char (*read) (struct snd_mpu401 *mpu, unsigned long addr);
 };
 
 /* I/O ports */
@@ -103,13 +101,13 @@ struct _snd_mpu401 {
 
 irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
-int snd_mpu401_uart_new(snd_card_t * card,
+int snd_mpu401_uart_new(struct snd_card *card,
 			int device,
 			unsigned short hardware,
 			unsigned long port,
 			int integrated,
 			int irq,
 			int irq_flags,
-			snd_rawmidi_t ** rrawmidi);
+			struct snd_rawmidi ** rrawmidi);
 
 #endif /* __SOUND_MPU401_H */
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c
index 54e2ff9b5ca..b1242ee937d 100644
--- a/sound/drivers/mpu401/mpu401.c
+++ b/sound/drivers/mpu401/mpu401.c
@@ -56,12 +56,12 @@ MODULE_PARM_DESC(port, "Port # for MPU-401 device.");
 module_param_array(irq, int, NULL, 0444);
 MODULE_PARM_DESC(irq, "IRQ # for MPU-401 device.");
 
-static snd_card_t *snd_mpu401_legacy_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_mpu401_legacy_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 static int pnp_registered = 0;
 
-static int snd_mpu401_create(int dev, snd_card_t **rcard)
+static int snd_mpu401_create(int dev, struct snd_card **rcard)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	int err;
 
 	*rcard = NULL;
@@ -152,7 +152,7 @@ static int __devinit snd_mpu401_pnp_probe(struct pnp_dev *pnp_dev,
 					  const struct pnp_device_id *id)
 {
 	static int dev;
-	snd_card_t *card;
+	struct snd_card *card;
 	int err;
 
 	for ( ; dev < SNDRV_CARDS; ++dev) {
@@ -174,7 +174,7 @@ static int __devinit snd_mpu401_pnp_probe(struct pnp_dev *pnp_dev,
 
 static void __devexit snd_mpu401_pnp_remove(struct pnp_dev *dev)
 {
-	snd_card_t *card = (snd_card_t *) pnp_get_drvdata(dev);
+	struct snd_card *card = (struct snd_card *) pnp_get_drvdata(dev);
 
 	snd_card_disconnect(card);
 	snd_card_free_in_thread(card);
diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c
index bdeb2c00dac..16e87f31788 100644
--- a/sound/drivers/mpu401/mpu401_uart.c
+++ b/sound/drivers/mpu401/mpu401_uart.c
@@ -43,8 +43,8 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("Routines for control of MPU-401 in UART mode");
 MODULE_LICENSE("GPL");
 
-static void snd_mpu401_uart_input_read(mpu401_t * mpu);
-static void snd_mpu401_uart_output_write(mpu401_t * mpu);
+static void snd_mpu401_uart_input_read(struct snd_mpu401 * mpu);
+static void snd_mpu401_uart_output_write(struct snd_mpu401 * mpu);
 
 /*
 
@@ -58,28 +58,28 @@ static void snd_mpu401_uart_output_write(mpu401_t * mpu);
 #define MPU401_ACK		0xfe
 
 /* Build in lowlevel io */
-static void mpu401_write_port(mpu401_t *mpu, unsigned char data, unsigned long addr)
+static void mpu401_write_port(struct snd_mpu401 *mpu, unsigned char data, unsigned long addr)
 {
 	outb(data, addr);
 }
 
-static unsigned char mpu401_read_port(mpu401_t *mpu, unsigned long addr)
+static unsigned char mpu401_read_port(struct snd_mpu401 *mpu, unsigned long addr)
 {
 	return inb(addr);
 }
 
-static void mpu401_write_mmio(mpu401_t *mpu, unsigned char data, unsigned long addr)
+static void mpu401_write_mmio(struct snd_mpu401 *mpu, unsigned char data, unsigned long addr)
 {
 	writeb(data, (void __iomem *)addr);
 }
 
-static unsigned char mpu401_read_mmio(mpu401_t *mpu, unsigned long addr)
+static unsigned char mpu401_read_mmio(struct snd_mpu401 *mpu, unsigned long addr)
 {
 	return readb((void __iomem *)addr);
 }
 /*  */
 
-static void snd_mpu401_uart_clear_rx(mpu401_t *mpu)
+static void snd_mpu401_uart_clear_rx(struct snd_mpu401 *mpu)
 {
 	int timeout = 100000;
 	for (; timeout > 0 && snd_mpu401_input_avail(mpu); timeout--)
@@ -90,7 +90,7 @@ static void snd_mpu401_uart_clear_rx(mpu401_t *mpu)
 #endif
 }
 
-static void _snd_mpu401_uart_interrupt(mpu401_t *mpu)
+static void _snd_mpu401_uart_interrupt(struct snd_mpu401 *mpu)
 {
 	spin_lock(&mpu->input_lock);
 	if (test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) {
@@ -118,7 +118,7 @@ static void _snd_mpu401_uart_interrupt(mpu401_t *mpu)
  */
 irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	mpu401_t *mpu = dev_id;
+	struct snd_mpu401 *mpu = dev_id;
 	
 	if (mpu == NULL)
 		return IRQ_NONE;
@@ -132,7 +132,7 @@ irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, struct pt_regs *reg
  */
 static void snd_mpu401_uart_timer(unsigned long data)
 {
-	mpu401_t *mpu = (mpu401_t *)data;
+	struct snd_mpu401 *mpu = (struct snd_mpu401 *)data;
 
 	spin_lock(&mpu->timer_lock);
 	/*mpu->mode |= MPU401_MODE_TIMER;*/
@@ -146,7 +146,7 @@ static void snd_mpu401_uart_timer(unsigned long data)
 /*
  * initialize the timer callback if not programmed yet
  */
-static void snd_mpu401_uart_add_timer (mpu401_t *mpu, int input)
+static void snd_mpu401_uart_add_timer (struct snd_mpu401 *mpu, int input)
 {
 	unsigned long flags;
 
@@ -165,7 +165,7 @@ static void snd_mpu401_uart_add_timer (mpu401_t *mpu, int input)
 /*
  * remove the timer callback if still active
  */
-static void snd_mpu401_uart_remove_timer (mpu401_t *mpu, int input)
+static void snd_mpu401_uart_remove_timer (struct snd_mpu401 *mpu, int input)
 {
 	unsigned long flags;
 
@@ -182,7 +182,7 @@ static void snd_mpu401_uart_remove_timer (mpu401_t *mpu, int input)
 
  */
 
-static void snd_mpu401_uart_cmd(mpu401_t * mpu, unsigned char cmd, int ack)
+static void snd_mpu401_uart_cmd(struct snd_mpu401 * mpu, unsigned char cmd, int ack)
 {
 	unsigned long flags;
 	int timeout, ok;
@@ -225,9 +225,9 @@ static void snd_mpu401_uart_cmd(mpu401_t * mpu, unsigned char cmd, int ack)
 /*
  * input/output open/close - protected by open_mutex in rawmidi.c
  */
-static int snd_mpu401_uart_input_open(snd_rawmidi_substream_t * substream)
+static int snd_mpu401_uart_input_open(struct snd_rawmidi_substream *substream)
 {
-	mpu401_t *mpu;
+	struct snd_mpu401 *mpu;
 	int err;
 
 	mpu = substream->rmidi->private_data;
@@ -242,9 +242,9 @@ static int snd_mpu401_uart_input_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_mpu401_uart_output_open(snd_rawmidi_substream_t * substream)
+static int snd_mpu401_uart_output_open(struct snd_rawmidi_substream *substream)
 {
-	mpu401_t *mpu;
+	struct snd_mpu401 *mpu;
 	int err;
 
 	mpu = substream->rmidi->private_data;
@@ -259,9 +259,9 @@ static int snd_mpu401_uart_output_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_mpu401_uart_input_close(snd_rawmidi_substream_t * substream)
+static int snd_mpu401_uart_input_close(struct snd_rawmidi_substream *substream)
 {
-	mpu401_t *mpu;
+	struct snd_mpu401 *mpu;
 
 	mpu = substream->rmidi->private_data;
 	clear_bit(MPU401_MODE_BIT_INPUT, &mpu->mode);
@@ -273,9 +273,9 @@ static int snd_mpu401_uart_input_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_mpu401_uart_output_close(snd_rawmidi_substream_t * substream)
+static int snd_mpu401_uart_output_close(struct snd_rawmidi_substream *substream)
 {
-	mpu401_t *mpu;
+	struct snd_mpu401 *mpu;
 
 	mpu = substream->rmidi->private_data;
 	clear_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode);
@@ -290,10 +290,10 @@ static int snd_mpu401_uart_output_close(snd_rawmidi_substream_t * substream)
 /*
  * trigger input callback
  */
-static void snd_mpu401_uart_input_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_mpu401_uart_input_trigger(struct snd_rawmidi_substream *substream, int up)
 {
 	unsigned long flags;
-	mpu401_t *mpu;
+	struct snd_mpu401 *mpu;
 	int max = 64;
 
 	mpu = substream->rmidi->private_data;
@@ -321,7 +321,7 @@ static void snd_mpu401_uart_input_trigger(snd_rawmidi_substream_t * substream, i
  * transfer input pending data
  * call with input_lock spinlock held
  */
-static void snd_mpu401_uart_input_read(mpu401_t * mpu)
+static void snd_mpu401_uart_input_read(struct snd_mpu401 * mpu)
 {
 	int max = 128;
 	unsigned char byte;
@@ -349,7 +349,7 @@ static void snd_mpu401_uart_input_read(mpu401_t * mpu)
  * write output pending bytes
  * call with output_lock spinlock held
  */
-static void snd_mpu401_uart_output_write(mpu401_t * mpu)
+static void snd_mpu401_uart_output_write(struct snd_mpu401 * mpu)
 {
 	unsigned char byte;
 	int max = 256, timeout;
@@ -375,10 +375,10 @@ static void snd_mpu401_uart_output_write(mpu401_t * mpu)
 /*
  * output trigger callback
  */
-static void snd_mpu401_uart_output_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_mpu401_uart_output_trigger(struct snd_rawmidi_substream *substream, int up)
 {
 	unsigned long flags;
-	mpu401_t *mpu;
+	struct snd_mpu401 *mpu;
 
 	mpu = substream->rmidi->private_data;
 	if (up) {
@@ -404,23 +404,23 @@ static void snd_mpu401_uart_output_trigger(snd_rawmidi_substream_t * substream,
 
  */
 
-static snd_rawmidi_ops_t snd_mpu401_uart_output =
+static struct snd_rawmidi_ops snd_mpu401_uart_output =
 {
 	.open =		snd_mpu401_uart_output_open,
 	.close =	snd_mpu401_uart_output_close,
 	.trigger =	snd_mpu401_uart_output_trigger,
 };
 
-static snd_rawmidi_ops_t snd_mpu401_uart_input =
+static struct snd_rawmidi_ops snd_mpu401_uart_input =
 {
 	.open =		snd_mpu401_uart_input_open,
 	.close =	snd_mpu401_uart_input_close,
 	.trigger =	snd_mpu401_uart_input_trigger,
 };
 
-static void snd_mpu401_uart_free(snd_rawmidi_t *rmidi)
+static void snd_mpu401_uart_free(struct snd_rawmidi *rmidi)
 {
-	mpu401_t *mpu = rmidi->private_data;
+	struct snd_mpu401 *mpu = rmidi->private_data;
 	if (mpu->irq_flags && mpu->irq >= 0)
 		free_irq(mpu->irq, (void *) mpu);
 	release_and_free_resource(mpu->res);
@@ -442,18 +442,18 @@ static void snd_mpu401_uart_free(snd_rawmidi_t *rmidi)
  *
  * Note that the rawmidi instance is returned on the rrawmidi argument,
  * not the mpu401 instance itself.  To access to the mpu401 instance,
- * cast from rawmidi->private_data (with mpu401_t magic-cast).
+ * cast from rawmidi->private_data (with struct snd_mpu401 magic-cast).
  *
  * Returns zero if successful, or a negative error code.
  */
-int snd_mpu401_uart_new(snd_card_t * card, int device,
+int snd_mpu401_uart_new(struct snd_card *card, int device,
 			unsigned short hardware,
 			unsigned long port, int integrated,
 			int irq, int irq_flags,
-			snd_rawmidi_t ** rrawmidi)
+			struct snd_rawmidi ** rrawmidi)
 {
-	mpu401_t *mpu;
-	snd_rawmidi_t *rmidi;
+	struct snd_mpu401 *mpu;
+	struct snd_rawmidi *rmidi;
 	int err;
 
 	if (rrawmidi)
-- 
cgit v1.2.3-70-g09d2


From 5b1646a8eceff0a4ff06f309abb6e7f43f99a498 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:13:14 +0100
Subject: [ALSA] Remove xxx_t typedefs: OPL3

Modules: OPL3,Raw OPL FM

Remove xxx_t typedefs from the OPL3 driver

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/asound_fm.h       | 24 ++++++-------
 include/sound/opl3.h            | 57 ++++++++++++++---------------
 sound/drivers/opl3/opl3_drums.c | 45 ++++++++++++-----------
 sound/drivers/opl3/opl3_lib.c   | 80 ++++++++++++++++++++---------------------
 sound/drivers/opl3/opl3_midi.c  | 70 ++++++++++++++++++------------------
 sound/drivers/opl3/opl3_oss.c   | 68 +++++++++++++++++------------------
 sound/drivers/opl3/opl3_seq.c   | 48 ++++++++++++-------------
 sound/drivers/opl3/opl3_synth.c | 50 +++++++++++++-------------
 sound/drivers/opl3/opl3_voice.h | 24 ++++++-------
 9 files changed, 235 insertions(+), 231 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/asound_fm.h b/include/sound/asound_fm.h
index b0da677f8f7..956fdc23c59 100644
--- a/include/sound/asound_fm.h
+++ b/include/sound/asound_fm.h
@@ -29,16 +29,16 @@
 #define SNDRV_DM_FM_MODE_OPL2	0x00
 #define SNDRV_DM_FM_MODE_OPL3	0x01
 
-typedef struct snd_dm_fm_info {
+struct snd_dm_fm_info {
 	unsigned char fm_mode;		/* OPL mode, see SNDRV_DM_FM_MODE_XXX */
 	unsigned char rhythm;		/* percussion mode flag */
-} snd_dm_fm_info_t;
+};
 
 /*
  *  Data structure composing an FM "note" or sound event.
  */
 
-typedef struct snd_dm_fm_voice {
+struct snd_dm_fm_voice {
 	unsigned char op;		/* operator cell (0 or 1) */
 	unsigned char voice;		/* FM voice (0 to 17) */
 
@@ -60,25 +60,25 @@ typedef struct snd_dm_fm_voice {
 	unsigned char left;		/* stereo left */
 	unsigned char right;		/* stereo right */
 	unsigned char waveform;		/* 3 bits: waveform shape */
-} snd_dm_fm_voice_t;
+};
 
 /*
  *  This describes an FM note by its voice, octave, frequency number (10bit)
  *  and key on/off.
  */
 
-typedef struct snd_dm_fm_note {
+struct snd_dm_fm_note {
 	unsigned char voice;	/* 0-17 voice channel */
 	unsigned char octave;	/* 3 bits: what octave to play */
 	unsigned int fnum;	/* 10 bits: frequency number */
 	unsigned char key_on;	/* set for active, clear for silent */
-} snd_dm_fm_note_t;
+};
 
 /*
  *  FM parameters that apply globally to all voices, and thus are not "notes"
  */
 
-typedef struct snd_dm_fm_params {
+struct snd_dm_fm_params {
 	unsigned char am_depth;		/* amplitude modulation depth (1=hi) */
 	unsigned char vib_depth;	/* vibrato depth (1=hi) */
 	unsigned char kbd_split;	/* keyboard split */
@@ -90,17 +90,17 @@ typedef struct snd_dm_fm_params {
 	unsigned char tomtom;
 	unsigned char cymbal;
 	unsigned char hihat;
-} snd_dm_fm_params_t;
+};
 
 /*
  *  FM mode ioctl settings
  */
 
-#define SNDRV_DM_FM_IOCTL_INFO		_IOR('H', 0x20, snd_dm_fm_info_t)
+#define SNDRV_DM_FM_IOCTL_INFO		_IOR('H', 0x20, struct snd_dm_fm_info)
 #define SNDRV_DM_FM_IOCTL_RESET		_IO ('H', 0x21)
-#define SNDRV_DM_FM_IOCTL_PLAY_NOTE	_IOW('H', 0x22, snd_dm_fm_note_t)
-#define SNDRV_DM_FM_IOCTL_SET_VOICE	_IOW('H', 0x23, snd_dm_fm_voice_t)
-#define SNDRV_DM_FM_IOCTL_SET_PARAMS	_IOW('H', 0x24, snd_dm_fm_params_t)
+#define SNDRV_DM_FM_IOCTL_PLAY_NOTE	_IOW('H', 0x22, struct snd_dm_fm_note)
+#define SNDRV_DM_FM_IOCTL_SET_VOICE	_IOW('H', 0x23, struct snd_dm_fm_voice)
+#define SNDRV_DM_FM_IOCTL_SET_PARAMS	_IOW('H', 0x24, struct snd_dm_fm_params)
 #define SNDRV_DM_FM_IOCTL_SET_MODE	_IOW('H', 0x25, int)
 /* for OPL3 only */
 #define SNDRV_DM_FM_IOCTL_SET_CONNECTION	_IOW('H', 0x26, int)
diff --git a/include/sound/opl3.h b/include/sound/opl3.h
index 19f657d4fc0..83392641cb4 100644
--- a/include/sound/opl3.h
+++ b/include/sound/opl3.h
@@ -237,12 +237,12 @@
 #define MAX_OPL2_VOICES		9
 #define MAX_OPL3_VOICES		18
 
-typedef struct snd_opl3 opl3_t;
+struct snd_opl3;
 
 /*
  * A structure to keep track of each hardware voice
  */
-typedef struct snd_opl3_voice {
+struct snd_opl3_voice {
 	int  state;		/* status */
 #define SNDRV_OPL3_ST_OFF		0	/* Not playing */
 #define SNDRV_OPL3_ST_ON_2OP	1	/* 2op voice is allocated */
@@ -257,8 +257,8 @@ typedef struct snd_opl3_voice {
 
 	unsigned char keyon_reg;	/* KON register shadow */
 
-	snd_midi_channel_t *chan;	/* Midi channel for this note */
-} snd_opl3_voice_t;
+	struct snd_midi_channel *chan;	/* Midi channel for this note */
+};
 
 struct snd_opl3 {
 	unsigned long l_port;
@@ -267,18 +267,18 @@ struct snd_opl3 {
 	struct resource *res_r_port;
 	unsigned short hardware;
 	/* hardware access */
-	void (*command) (opl3_t * opl3, unsigned short cmd, unsigned char val);
+	void (*command) (struct snd_opl3 * opl3, unsigned short cmd, unsigned char val);
 	unsigned short timer_enable;
 	int seq_dev_num;	/* sequencer device number */
-	snd_timer_t *timer1;
-	snd_timer_t *timer2;
+	struct snd_timer *timer1;
+	struct snd_timer *timer2;
 	spinlock_t timer_lock;
 
 	void *private_data;
-	void (*private_free)(opl3_t *);
+	void (*private_free)(struct snd_opl3 *);
 
 	spinlock_t reg_lock;
-	snd_card_t *card;		/* The card that this belongs to */
+	struct snd_card *card;		/* The card that this belongs to */
 	int used;			/* usage flag - exclusive */
 	unsigned char fm_mode;		/* OPL mode, see SNDRV_DM_FM_MODE_XXX */
 	unsigned char rhythm;		/* percussion mode flag */
@@ -289,18 +289,18 @@ struct snd_opl3 {
 	int synth_mode;			/* synth mode */
 	int seq_client;
 
-	snd_seq_device_t *seq_dev;	/* sequencer device */
-	snd_midi_channel_set_t * chset;
+	struct snd_seq_device *seq_dev;	/* sequencer device */
+	struct snd_midi_channel_set * chset;
 
 #ifdef CONFIG_SND_SEQUENCER_OSS
-	snd_seq_device_t *oss_seq_dev;	/* OSS sequencer device */
-	snd_midi_channel_set_t * oss_chset;
+	struct snd_seq_device *oss_seq_dev;	/* OSS sequencer device */
+	struct snd_midi_channel_set * oss_chset;
 #endif
  
-	snd_seq_kinstr_ops_t fm_ops;
-	snd_seq_kinstr_list_t *ilist;
+	struct snd_seq_kinstr_ops fm_ops;
+	struct snd_seq_kinstr_list *ilist;
 
-	snd_opl3_voice_t voices[MAX_OPL3_VOICES]; /* Voices (OPL3 'channel') */
+	struct snd_opl3_voice voices[MAX_OPL3_VOICES]; /* Voices (OPL3 'channel') */
 	int use_time;			/* allocation counter */
 
 	unsigned short connection_reg;	/* connection reg shadow */
@@ -316,24 +316,25 @@ struct snd_opl3 {
 };
 
 /* opl3.c */
-void snd_opl3_interrupt(snd_hwdep_t * hw);
-int snd_opl3_new(snd_card_t *card, unsigned short hardware, opl3_t **ropl3);
-int snd_opl3_init(opl3_t *opl3);
-int snd_opl3_create(snd_card_t * card,
+void snd_opl3_interrupt(struct snd_hwdep * hw);
+int snd_opl3_new(struct snd_card *card, unsigned short hardware,
+		 struct snd_opl3 **ropl3);
+int snd_opl3_init(struct snd_opl3 *opl3);
+int snd_opl3_create(struct snd_card *card,
 		    unsigned long l_port, unsigned long r_port,
 		    unsigned short hardware,
 		    int integrated,
-		    opl3_t ** opl3);
-int snd_opl3_timer_new(opl3_t * opl3, int timer1_dev, int timer2_dev);
-int snd_opl3_hwdep_new(opl3_t * opl3, int device, int seq_device,
-		       snd_hwdep_t ** rhwdep);
+		    struct snd_opl3 ** opl3);
+int snd_opl3_timer_new(struct snd_opl3 * opl3, int timer1_dev, int timer2_dev);
+int snd_opl3_hwdep_new(struct snd_opl3 * opl3, int device, int seq_device,
+		       struct snd_hwdep ** rhwdep);
 
 /* opl3_synth */
-int snd_opl3_open(snd_hwdep_t * hw, struct file *file);
-int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
+int snd_opl3_open(struct snd_hwdep * hw, struct file *file);
+int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file,
 		   unsigned int cmd, unsigned long arg);
-int snd_opl3_release(snd_hwdep_t * hw, struct file *file);
+int snd_opl3_release(struct snd_hwdep * hw, struct file *file);
 
-void snd_opl3_reset(opl3_t * opl3);
+void snd_opl3_reset(struct snd_opl3 * opl3);
 
 #endif /* __SOUND_OPL3_H */
diff --git a/sound/drivers/opl3/opl3_drums.c b/sound/drivers/opl3/opl3_drums.c
index f26332680c1..73694380734 100644
--- a/sound/drivers/opl3/opl3_drums.c
+++ b/sound/drivers/opl3/opl3_drums.c
@@ -45,7 +45,7 @@ static char snd_opl3_drum_table[47] =
 	OPL3_CYMBAL_ON,    OPL3_CYMBAL_ON			/* 80 - 81 */
 };
 
-typedef struct snd_opl3_drum_voice {
+struct snd_opl3_drum_voice {
 	int voice;
 	int op;
 	unsigned char am_vib;
@@ -54,33 +54,34 @@ typedef struct snd_opl3_drum_voice {
 	unsigned char sustain_release;
 	unsigned char feedback_connection;
 	unsigned char wave_select;
-} snd_opl3_drum_voice_t;
+};
 
-typedef struct snd_opl3_drum_note {
+struct snd_opl3_drum_note {
 	int voice;
 	unsigned char fnum;
 	unsigned char octave_f;
 	unsigned char feedback_connection;
-} snd_opl3_drum_note_t;
+};
 
-static snd_opl3_drum_voice_t bass_op0 = {6, 0, 0x00, 0x32, 0xf8, 0x66, 0x30, 0x00};
-static snd_opl3_drum_voice_t bass_op1 = {6, 1, 0x00, 0x03, 0xf6, 0x57, 0x30, 0x00};
-static snd_opl3_drum_note_t bass_note = {6, 0x90, 0x09};
+static struct snd_opl3_drum_voice bass_op0 = {6, 0, 0x00, 0x32, 0xf8, 0x66, 0x30, 0x00};
+static struct snd_opl3_drum_voice bass_op1 = {6, 1, 0x00, 0x03, 0xf6, 0x57, 0x30, 0x00};
+static struct snd_opl3_drum_note bass_note = {6, 0x90, 0x09};
 
-static snd_opl3_drum_voice_t hihat = {7, 0, 0x00, 0x03, 0xf0, 0x06, 0x20, 0x00};
+static struct snd_opl3_drum_voice hihat = {7, 0, 0x00, 0x03, 0xf0, 0x06, 0x20, 0x00};
 
-static snd_opl3_drum_voice_t snare = {7, 1, 0x00, 0x03, 0xf0, 0x07, 0x20, 0x02};
-static snd_opl3_drum_note_t snare_note = {7, 0xf4, 0x0d};
+static struct snd_opl3_drum_voice snare = {7, 1, 0x00, 0x03, 0xf0, 0x07, 0x20, 0x02};
+static struct snd_opl3_drum_note snare_note = {7, 0xf4, 0x0d};
 
-static snd_opl3_drum_voice_t tomtom = {8, 0, 0x02, 0x03, 0xf0, 0x06, 0x10, 0x00};
-static snd_opl3_drum_note_t tomtom_note = {8, 0xf4, 0x09};
+static struct snd_opl3_drum_voice tomtom = {8, 0, 0x02, 0x03, 0xf0, 0x06, 0x10, 0x00};
+static struct snd_opl3_drum_note tomtom_note = {8, 0xf4, 0x09};
 
-static snd_opl3_drum_voice_t cymbal = {8, 1, 0x04, 0x03, 0xf0, 0x06, 0x10, 0x00};
+static struct snd_opl3_drum_voice cymbal = {8, 1, 0x04, 0x03, 0xf0, 0x06, 0x10, 0x00};
 
 /*
  * set drum voice characteristics
  */
-static void snd_opl3_drum_voice_set(opl3_t *opl3, snd_opl3_drum_voice_t *data)
+static void snd_opl3_drum_voice_set(struct snd_opl3 *opl3,
+				    struct snd_opl3_drum_voice *data)
 {
 	unsigned char op_offset = snd_opl3_regmap[data->voice][data->op];
 	unsigned char voice_offset = data->voice;
@@ -114,7 +115,8 @@ static void snd_opl3_drum_voice_set(opl3_t *opl3, snd_opl3_drum_voice_t *data)
 /*
  * Set drum voice pitch
  */
-static void snd_opl3_drum_note_set(opl3_t *opl3, snd_opl3_drum_note_t *data)
+static void snd_opl3_drum_note_set(struct snd_opl3 *opl3,
+				   struct snd_opl3_drum_note *data)
 {
 	unsigned char voice_offset = data->voice;
 	unsigned short opl3_reg;
@@ -131,8 +133,9 @@ static void snd_opl3_drum_note_set(opl3_t *opl3, snd_opl3_drum_note_t *data)
 /*
  * Set drum voice volume and position
  */
-static void snd_opl3_drum_vol_set(opl3_t *opl3, snd_opl3_drum_voice_t *data,
-				  int vel, snd_midi_channel_t *chan)
+static void snd_opl3_drum_vol_set(struct snd_opl3 *opl3,
+				  struct snd_opl3_drum_voice *data,
+				  int vel, struct snd_midi_channel *chan)
 {
 	unsigned char op_offset = snd_opl3_regmap[data->voice][data->op];
 	unsigned char voice_offset = data->voice;
@@ -159,7 +162,7 @@ static void snd_opl3_drum_vol_set(opl3_t *opl3, snd_opl3_drum_voice_t *data,
 /*
  * Loads drum voices at init time
  */
-void snd_opl3_load_drums(opl3_t *opl3)
+void snd_opl3_load_drums(struct snd_opl3 *opl3)
 {
 	snd_opl3_drum_voice_set(opl3, &bass_op0);
 	snd_opl3_drum_voice_set(opl3, &bass_op1);
@@ -179,11 +182,11 @@ void snd_opl3_load_drums(opl3_t *opl3)
 /*
  * Switch drum voice on or off
  */
-void snd_opl3_drum_switch(opl3_t *opl3, int note, int vel, int on_off,
-			  snd_midi_channel_t *chan)
+void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int vel, int on_off,
+			  struct snd_midi_channel *chan)
 {
 	unsigned char drum_mask;
-	snd_opl3_drum_voice_t *drum_voice;
+	struct snd_opl3_drum_voice *drum_voice;
 
 	if (!(opl3->drum_reg & OPL3_PERCUSSION_ENABLE))
 		return;
diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c
index 06246503083..cbd37e91960 100644
--- a/sound/drivers/opl3/opl3_lib.c
+++ b/sound/drivers/opl3/opl3_lib.c
@@ -37,7 +37,7 @@ MODULE_LICENSE("GPL");
 
 extern char snd_opl3_regmap[MAX_OPL2_VOICES][4];
 
-static void snd_opl2_command(opl3_t * opl3, unsigned short cmd, unsigned char val)
+static void snd_opl2_command(struct snd_opl3 * opl3, unsigned short cmd, unsigned char val)
 {
 	unsigned long flags;
 	unsigned long port;
@@ -60,7 +60,7 @@ static void snd_opl2_command(opl3_t * opl3, unsigned short cmd, unsigned char va
 	spin_unlock_irqrestore(&opl3->reg_lock, flags);
 }
 
-static void snd_opl3_command(opl3_t * opl3, unsigned short cmd, unsigned char val)
+static void snd_opl3_command(struct snd_opl3 * opl3, unsigned short cmd, unsigned char val)
 {
 	unsigned long flags;
 	unsigned long port;
@@ -85,7 +85,7 @@ static void snd_opl3_command(opl3_t * opl3, unsigned short cmd, unsigned char va
 	spin_unlock_irqrestore(&opl3->reg_lock, flags);
 }
 
-static int snd_opl3_detect(opl3_t * opl3)
+static int snd_opl3_detect(struct snd_opl3 * opl3)
 {
 	/*
 	 * This function returns 1 if the FM chip is present at the given I/O port
@@ -153,12 +153,12 @@ static int snd_opl3_detect(opl3_t * opl3)
  *  Timer 1 - 80us
  */
 
-static int snd_opl3_timer1_start(snd_timer_t * timer)
+static int snd_opl3_timer1_start(struct snd_timer * timer)
 {
 	unsigned long flags;
 	unsigned char tmp;
 	unsigned int ticks;
-	opl3_t *opl3;
+	struct snd_opl3 *opl3;
 
 	opl3 = snd_timer_chip(timer);
 	spin_lock_irqsave(&opl3->timer_lock, flags);
@@ -171,11 +171,11 @@ static int snd_opl3_timer1_start(snd_timer_t * timer)
 	return 0;
 }
 
-static int snd_opl3_timer1_stop(snd_timer_t * timer)
+static int snd_opl3_timer1_stop(struct snd_timer * timer)
 {
 	unsigned long flags;
 	unsigned char tmp;
-	opl3_t *opl3;
+	struct snd_opl3 *opl3;
 
 	opl3 = snd_timer_chip(timer);
 	spin_lock_irqsave(&opl3->timer_lock, flags);
@@ -190,12 +190,12 @@ static int snd_opl3_timer1_stop(snd_timer_t * timer)
  *  Timer 2 - 320us
  */
 
-static int snd_opl3_timer2_start(snd_timer_t * timer)
+static int snd_opl3_timer2_start(struct snd_timer * timer)
 {
 	unsigned long flags;
 	unsigned char tmp;
 	unsigned int ticks;
-	opl3_t *opl3;
+	struct snd_opl3 *opl3;
 
 	opl3 = snd_timer_chip(timer);
 	spin_lock_irqsave(&opl3->timer_lock, flags);
@@ -208,11 +208,11 @@ static int snd_opl3_timer2_start(snd_timer_t * timer)
 	return 0;
 }
 
-static int snd_opl3_timer2_stop(snd_timer_t * timer)
+static int snd_opl3_timer2_stop(struct snd_timer * timer)
 {
 	unsigned long flags;
 	unsigned char tmp;
-	opl3_t *opl3;
+	struct snd_opl3 *opl3;
 
 	opl3 = snd_timer_chip(timer);
 	spin_lock_irqsave(&opl3->timer_lock, flags);
@@ -227,7 +227,7 @@ static int snd_opl3_timer2_stop(snd_timer_t * timer)
 
  */
 
-static struct _snd_timer_hardware snd_opl3_timer1 =
+static struct snd_timer_hardware snd_opl3_timer1 =
 {
 	.flags =	SNDRV_TIMER_HW_STOP,
 	.resolution =	80000,
@@ -236,7 +236,7 @@ static struct _snd_timer_hardware snd_opl3_timer1 =
 	.stop =		snd_opl3_timer1_stop,
 };
 
-static struct _snd_timer_hardware snd_opl3_timer2 =
+static struct snd_timer_hardware snd_opl3_timer2 =
 {
 	.flags =	SNDRV_TIMER_HW_STOP,
 	.resolution =	320000,
@@ -245,10 +245,10 @@ static struct _snd_timer_hardware snd_opl3_timer2 =
 	.stop =		snd_opl3_timer2_stop,
 };
 
-static int snd_opl3_timer1_init(opl3_t * opl3, int timer_no)
+static int snd_opl3_timer1_init(struct snd_opl3 * opl3, int timer_no)
 {
-	snd_timer_t *timer = NULL;
-	snd_timer_id_t tid;
+	struct snd_timer *timer = NULL;
+	struct snd_timer_id tid;
 	int err;
 
 	tid.dev_class = SNDRV_TIMER_CLASS_CARD;
@@ -265,10 +265,10 @@ static int snd_opl3_timer1_init(opl3_t * opl3, int timer_no)
 	return err;
 }
 
-static int snd_opl3_timer2_init(opl3_t * opl3, int timer_no)
+static int snd_opl3_timer2_init(struct snd_opl3 * opl3, int timer_no)
 {
-	snd_timer_t *timer = NULL;
-	snd_timer_id_t tid;
+	struct snd_timer *timer = NULL;
+	struct snd_timer_id tid;
 	int err;
 
 	tid.dev_class = SNDRV_TIMER_CLASS_CARD;
@@ -289,11 +289,11 @@ static int snd_opl3_timer2_init(opl3_t * opl3, int timer_no)
 
  */
 
-void snd_opl3_interrupt(snd_hwdep_t * hw)
+void snd_opl3_interrupt(struct snd_hwdep * hw)
 {
 	unsigned char status;
-	opl3_t *opl3;
-	snd_timer_t *timer;
+	struct snd_opl3 *opl3;
+	struct snd_timer *timer;
 
 	if (hw == NULL)
 		return;
@@ -320,7 +320,7 @@ void snd_opl3_interrupt(snd_hwdep_t * hw)
 
  */
 
-static int snd_opl3_free(opl3_t *opl3)
+static int snd_opl3_free(struct snd_opl3 *opl3)
 {
 	snd_assert(opl3 != NULL, return -ENXIO);
 	if (opl3->private_free)
@@ -331,20 +331,20 @@ static int snd_opl3_free(opl3_t *opl3)
 	return 0;
 }
 
-static int snd_opl3_dev_free(snd_device_t *device)
+static int snd_opl3_dev_free(struct snd_device *device)
 {
-	opl3_t *opl3 = device->device_data;
+	struct snd_opl3 *opl3 = device->device_data;
 	return snd_opl3_free(opl3);
 }
 
-int snd_opl3_new(snd_card_t *card,
+int snd_opl3_new(struct snd_card *card,
 		 unsigned short hardware,
-		 opl3_t **ropl3)
+		 struct snd_opl3 **ropl3)
 {
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free = snd_opl3_dev_free,
 	};
-	opl3_t *opl3;
+	struct snd_opl3 *opl3;
 	int err;
 
 	*ropl3 = NULL;
@@ -367,7 +367,7 @@ int snd_opl3_new(snd_card_t *card,
 	return 0;
 }
 
-int snd_opl3_init(opl3_t *opl3)
+int snd_opl3_init(struct snd_opl3 *opl3)
 {
 	if (! opl3->command) {
 		printk(KERN_ERR "snd_opl3_init: command not defined!\n");
@@ -391,14 +391,14 @@ int snd_opl3_init(opl3_t *opl3)
 	return 0;
 }
 
-int snd_opl3_create(snd_card_t * card,
+int snd_opl3_create(struct snd_card *card,
 		    unsigned long l_port,
 		    unsigned long r_port,
 		    unsigned short hardware,
 		    int integrated,
-		    opl3_t ** ropl3)
+		    struct snd_opl3 ** ropl3)
 {
-	opl3_t *opl3;
+	struct snd_opl3 *opl3;
 	int err;
 
 	*ropl3 = NULL;
@@ -449,7 +449,7 @@ int snd_opl3_create(snd_card_t * card,
 	return 0;
 }
 
-int snd_opl3_timer_new(opl3_t * opl3, int timer1_dev, int timer2_dev)
+int snd_opl3_timer_new(struct snd_opl3 * opl3, int timer1_dev, int timer2_dev)
 {
 	int err;
 
@@ -466,12 +466,12 @@ int snd_opl3_timer_new(opl3_t * opl3, int timer1_dev, int timer2_dev)
 	return 0;
 }
 
-int snd_opl3_hwdep_new(opl3_t * opl3,
+int snd_opl3_hwdep_new(struct snd_opl3 * opl3,
 		       int device, int seq_device,
-		       snd_hwdep_t ** rhwdep)
+		       struct snd_hwdep ** rhwdep)
 {
-	snd_hwdep_t *hw;
-	snd_card_t *card = opl3->card;
+	struct snd_hwdep *hw;
+	struct snd_card *card = opl3->card;
 	int err;
 
 	if (rhwdep)
@@ -514,9 +514,9 @@ int snd_opl3_hwdep_new(opl3_t * opl3,
 	opl3->seq_dev_num = seq_device;
 #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
 	if (snd_seq_device_new(card, seq_device, SNDRV_SEQ_DEV_ID_OPL3,
-			       sizeof(opl3_t*), &opl3->seq_dev) >= 0) {
+			       sizeof(struct snd_opl3 *), &opl3->seq_dev) >= 0) {
 		strcpy(opl3->seq_dev->name, hw->name);
-		*(opl3_t**)SNDRV_SEQ_DEVICE_ARGPTR(opl3->seq_dev) = opl3;
+		*(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(opl3->seq_dev) = opl3;
 	}
 #endif
 	if (rhwdep)
diff --git a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c
index 93d674070b7..48c480e050c 100644
--- a/sound/drivers/opl3/opl3_midi.c
+++ b/sound/drivers/opl3/opl3_midi.c
@@ -60,7 +60,7 @@ static char opl3_volume_table[128] =
 };
 
 void snd_opl3_calc_volume(unsigned char *volbyte, int vel,
-			  snd_midi_channel_t *chan)
+			  struct snd_midi_channel *chan)
 {
 	int oldvol, newvol, n;
 	int volume;
@@ -93,7 +93,7 @@ static short opl3_note_table[16] =
 };
 
 static void snd_opl3_calc_pitch(unsigned char *fnum, unsigned char *blocknum,
-				int note, snd_midi_channel_t *chan)
+				int note, struct snd_midi_channel *chan)
 {
 	int block = ((note / 12) & 0x07) - 1;
 	int idx = (note % 12) + 2;
@@ -121,7 +121,7 @@ static void snd_opl3_calc_pitch(unsigned char *fnum, unsigned char *blocknum,
 
 
 #ifdef DEBUG_ALLOC
-static void debug_alloc(opl3_t *opl3, char *s, int voice) {
+static void debug_alloc(struct snd_opl3 *opl3, char *s, int voice) {
 	int i;
 	char *str = "x.24";
 
@@ -135,12 +135,12 @@ static void debug_alloc(opl3_t *opl3, char *s, int voice) {
 /*
  * Get a FM voice (channel) to play a note on.
  */
-static int opl3_get_voice(opl3_t *opl3, int instr_4op,
-			  snd_midi_channel_t *chan) {
+static int opl3_get_voice(struct snd_opl3 *opl3, int instr_4op,
+			  struct snd_midi_channel *chan) {
 	int chan_4op_1;		/* first voice for 4op instrument */
 	int chan_4op_2;		/* second voice for 4op instrument */
 
-	snd_opl3_voice_t *vp, *vp2;
+	struct snd_opl3_voice *vp, *vp2;
 	unsigned int voice_time;
 	int i;
 
@@ -237,13 +237,13 @@ static int opl3_get_voice(opl3_t *opl3, int instr_4op,
 void snd_opl3_timer_func(unsigned long data)
 {
 
-	opl3_t *opl3 = (opl3_t *)data;
+	struct snd_opl3 *opl3 = (struct snd_opl3 *)data;
 	int again = 0;
 	int i;
 
 	spin_lock(&opl3->sys_timer_lock);
 	for (i = 0; i < opl3->max_voices; i++) {
-		snd_opl3_voice_t *vp = &opl3->voices[i];
+		struct snd_opl3_voice *vp = &opl3->voices[i];
 		if (vp->state > 0 && vp->note_off_check) {
 			if (vp->note_off == jiffies)
 				snd_opl3_note_off(opl3, vp->note, 0, vp->chan);
@@ -263,7 +263,7 @@ void snd_opl3_timer_func(unsigned long data)
 /*
  * Start system timer
  */
-static void snd_opl3_start_timer(opl3_t *opl3)
+static void snd_opl3_start_timer(struct snd_opl3 *opl3)
 {
 	unsigned long flags;
 	spin_lock_irqsave(&opl3->sys_timer_lock, flags);
@@ -285,15 +285,15 @@ static int snd_opl3_oss_map[MAX_OPL3_VOICES] = {
 /*
  * Start a note.
  */
-void snd_opl3_note_on(void *p, int note, int vel, snd_midi_channel_t *chan)
+void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
 {
-	opl3_t *opl3;
-	snd_seq_instr_t wanted;
-	snd_seq_kinstr_t *kinstr;
+	struct snd_opl3 *opl3;
+	struct snd_seq_instr wanted;
+	struct snd_seq_kinstr *kinstr;
 	int instr_4op;
 
 	int voice;
-	snd_opl3_voice_t *vp, *vp2;
+	struct snd_opl3_voice *vp, *vp2;
 	unsigned short connect_mask;
 	unsigned char connection;
 	unsigned char vol_op[4];
@@ -310,7 +310,7 @@ void snd_opl3_note_on(void *p, int note, int vel, snd_midi_channel_t *chan)
 	unsigned char fnum, blocknum;
 	int i;
 
-	fm_instrument_t *fm;
+	struct fm_instrument *fm;
 	unsigned long flags;
 
 	opl3 = p;
@@ -615,13 +615,13 @@ void snd_opl3_note_on(void *p, int note, int vel, snd_midi_channel_t *chan)
 	spin_unlock_irqrestore(&opl3->voice_lock, flags);
 }
 
-static void snd_opl3_kill_voice(opl3_t *opl3, int voice)
+static void snd_opl3_kill_voice(struct snd_opl3 *opl3, int voice)
 {
 	unsigned short reg_side;
 	unsigned char voice_offset;
 	unsigned short opl3_reg;
 
-	snd_opl3_voice_t *vp, *vp2;
+	struct snd_opl3_voice *vp, *vp2;
 
 	snd_assert(voice < MAX_OPL3_VOICES, return);
 
@@ -663,12 +663,12 @@ static void snd_opl3_kill_voice(opl3_t *opl3, int voice)
 /*
  * Release a note in response to a midi note off.
  */
-void snd_opl3_note_off(void *p, int note, int vel, snd_midi_channel_t *chan)
+void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan)
 {
-  	opl3_t *opl3;
+  	struct snd_opl3 *opl3;
 
 	int voice;
-	snd_opl3_voice_t *vp;
+	struct snd_opl3_voice *vp;
 
 	unsigned long flags;
 
@@ -708,9 +708,9 @@ void snd_opl3_note_off(void *p, int note, int vel, snd_midi_channel_t *chan)
 /*
  * key pressure change
  */
-void snd_opl3_key_press(void *p, int note, int vel, snd_midi_channel_t *chan)
+void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan)
 {
-  	opl3_t *opl3;
+  	struct snd_opl3 *opl3;
 
 	opl3 = p;
 #ifdef DEBUG_MIDI
@@ -722,9 +722,9 @@ void snd_opl3_key_press(void *p, int note, int vel, snd_midi_channel_t *chan)
 /*
  * terminate note
  */
-void snd_opl3_terminate_note(void *p, int note, snd_midi_channel_t *chan)
+void snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan)
 {
-  	opl3_t *opl3;
+  	struct snd_opl3 *opl3;
 
 	opl3 = p;
 #ifdef DEBUG_MIDI
@@ -733,7 +733,7 @@ void snd_opl3_terminate_note(void *p, int note, snd_midi_channel_t *chan)
 #endif
 }
 
-static void snd_opl3_update_pitch(opl3_t *opl3, int voice)
+static void snd_opl3_update_pitch(struct snd_opl3 *opl3, int voice)
 {
 	unsigned short reg_side;
 	unsigned char voice_offset;
@@ -741,7 +741,7 @@ static void snd_opl3_update_pitch(opl3_t *opl3, int voice)
 
 	unsigned char fnum, blocknum;
 
-	snd_opl3_voice_t *vp;
+	struct snd_opl3_voice *vp;
 
 	snd_assert(voice < MAX_OPL3_VOICES, return);
 
@@ -780,10 +780,10 @@ static void snd_opl3_update_pitch(opl3_t *opl3, int voice)
 /*
  * Update voice pitch controller
  */
-static void snd_opl3_pitch_ctrl(opl3_t *opl3, snd_midi_channel_t *chan)
+static void snd_opl3_pitch_ctrl(struct snd_opl3 *opl3, struct snd_midi_channel *chan)
 {
 	int voice;
-	snd_opl3_voice_t *vp;
+	struct snd_opl3_voice *vp;
 
 	unsigned long flags;
 
@@ -810,9 +810,9 @@ static void snd_opl3_pitch_ctrl(opl3_t *opl3, snd_midi_channel_t *chan)
  * Deal with a controler type event.  This includes all types of
  * control events, not just the midi controllers
  */
-void snd_opl3_control(void *p, int type, snd_midi_channel_t *chan)
+void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan)
 {
-  	opl3_t *opl3;
+  	struct snd_opl3 *opl3;
 
 	opl3 = p;
 #ifdef DEBUG_MIDI
@@ -846,10 +846,10 @@ void snd_opl3_control(void *p, int type, snd_midi_channel_t *chan)
 /*
  * NRPN events
  */
-void snd_opl3_nrpn(void *p, snd_midi_channel_t *chan,
-		   snd_midi_channel_set_t *chset)
+void snd_opl3_nrpn(void *p, struct snd_midi_channel *chan,
+		   struct snd_midi_channel_set *chset)
 {
-  	opl3_t *opl3;
+  	struct snd_opl3 *opl3;
 
 	opl3 = p;
 #ifdef DEBUG_MIDI
@@ -862,9 +862,9 @@ void snd_opl3_nrpn(void *p, snd_midi_channel_t *chan,
  * receive sysex
  */
 void snd_opl3_sysex(void *p, unsigned char *buf, int len,
-		    int parsed, snd_midi_channel_set_t *chset)
+		    int parsed, struct snd_midi_channel_set *chset)
 {
-  	opl3_t *opl3;
+  	struct snd_opl3 *opl3;
 
 	opl3 = p;
 #ifdef DEBUG_MIDI
diff --git a/sound/drivers/opl3/opl3_oss.c b/sound/drivers/opl3/opl3_oss.c
index 21a2b409d6d..31f1f2e25aa 100644
--- a/sound/drivers/opl3/opl3_oss.c
+++ b/sound/drivers/opl3/opl3_oss.c
@@ -21,11 +21,11 @@
 #include "opl3_voice.h"
 #include <linux/slab.h>
 
-static int snd_opl3_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure);
-static int snd_opl3_close_seq_oss(snd_seq_oss_arg_t *arg);
-static int snd_opl3_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd, unsigned long ioarg);
-static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format, const char __user *buf, int offs, int count);
-static int snd_opl3_reset_seq_oss(snd_seq_oss_arg_t *arg);
+static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure);
+static int snd_opl3_close_seq_oss(struct snd_seq_oss_arg *arg);
+static int snd_opl3_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd, unsigned long ioarg);
+static int snd_opl3_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format, const char __user *buf, int offs, int count);
+static int snd_opl3_reset_seq_oss(struct snd_seq_oss_arg *arg);
 
 /* */
 
@@ -43,9 +43,9 @@ static inline void snd_leave_user(mm_segment_t fs)
 
 /* operators */
 
-extern snd_midi_op_t opl3_ops;
+extern struct snd_midi_op opl3_ops;
 
-static snd_seq_oss_callback_t oss_callback = {
+static struct snd_seq_oss_callback oss_callback = {
 	.owner = 	THIS_MODULE,
 	.open =		snd_opl3_open_seq_oss,
 	.close =	snd_opl3_close_seq_oss,
@@ -54,10 +54,10 @@ static snd_seq_oss_callback_t oss_callback = {
 	.reset =	snd_opl3_reset_seq_oss,
 };
 
-static int snd_opl3_oss_event_input(snd_seq_event_t *ev, int direct,
+static int snd_opl3_oss_event_input(struct snd_seq_event *ev, int direct,
 				    void *private_data, int atomic, int hop)
 {
-	opl3_t *opl3 = private_data;
+	struct snd_opl3 *opl3 = private_data;
 
 	if (ev->type != SNDRV_SEQ_EVENT_OSS)
 		snd_midi_process_event(&opl3_ops, ev, opl3->oss_chset);
@@ -68,14 +68,14 @@ static int snd_opl3_oss_event_input(snd_seq_event_t *ev, int direct,
 
 static void snd_opl3_oss_free_port(void *private_data)
 {
-	opl3_t *opl3 = private_data;
+	struct snd_opl3 *opl3 = private_data;
 
 	snd_midi_channel_free_set(opl3->oss_chset);
 }
 
-static int snd_opl3_oss_create_port(opl3_t * opl3)
+static int snd_opl3_oss_create_port(struct snd_opl3 * opl3)
 {
-	snd_seq_port_callback_t callbacks;
+	struct snd_seq_port_callback callbacks;
 	char name[32];
 	int voices, opl_ver;
 
@@ -113,13 +113,13 @@ static int snd_opl3_oss_create_port(opl3_t * opl3)
 /* ------------------------------ */
 
 /* register OSS synth */
-void snd_opl3_init_seq_oss(opl3_t *opl3, char *name)
+void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name)
 {
-	snd_seq_oss_reg_t *arg;
-	snd_seq_device_t *dev;
+	struct snd_seq_oss_reg *arg;
+	struct snd_seq_device *dev;
 
 	if (snd_seq_device_new(opl3->card, 0, SNDRV_SEQ_DEV_ID_OSS,
-			       sizeof(snd_seq_oss_reg_t), &dev) < 0)
+			       sizeof(struct snd_seq_oss_reg), &dev) < 0)
 		return;
 
 	opl3->oss_seq_dev = dev;
@@ -143,7 +143,7 @@ void snd_opl3_init_seq_oss(opl3_t *opl3, char *name)
 }
 
 /* unregister */
-void snd_opl3_free_seq_oss(opl3_t *opl3)
+void snd_opl3_free_seq_oss(struct snd_opl3 *opl3)
 {
 	if (opl3->oss_seq_dev) {
 		snd_device_free(opl3->card, opl3->oss_seq_dev);
@@ -154,9 +154,9 @@ void snd_opl3_free_seq_oss(opl3_t *opl3)
 /* ------------------------------ */
 
 /* open OSS sequencer */
-static int snd_opl3_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure)
+static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)
 {
-	opl3_t *opl3 = closure;
+	struct snd_opl3 *opl3 = closure;
 	int err;
 
 	snd_assert(arg != NULL, return -ENXIO);
@@ -177,9 +177,9 @@ static int snd_opl3_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure)
 }
 
 /* close OSS sequencer */
-static int snd_opl3_close_seq_oss(snd_seq_oss_arg_t *arg)
+static int snd_opl3_close_seq_oss(struct snd_seq_oss_arg *arg)
 {
-	opl3_t *opl3;
+	struct snd_opl3 *opl3;
 
 	snd_assert(arg != NULL, return -ENXIO);
 	opl3 = arg->private_data;
@@ -206,10 +206,10 @@ static int snd_opl3_close_seq_oss(snd_seq_oss_arg_t *arg)
 /* from sound_config.h */
 #define SBFM_MAXINSTR	256
 
-static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
+static int snd_opl3_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format,
 				       const char __user *buf, int offs, int count)
 {
-	opl3_t *opl3;
+	struct snd_opl3 *opl3;
 	int err = -EINVAL;
 
 	snd_assert(arg != NULL, return -ENXIO);
@@ -219,11 +219,11 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
 		struct sbi_instrument sbi;
 
 		size_t size;
-		snd_seq_instr_header_t *put;
-		snd_seq_instr_data_t *data;
-		fm_xinstrument_t *xinstr;
+		struct snd_seq_instr_header *put;
+		struct snd_seq_instr_data *data;
+		struct fm_xinstrument *xinstr;
 
-		snd_seq_event_t ev;
+		struct snd_seq_event ev;
 		int i;
 
 		mm_segment_t fs;
@@ -240,7 +240,7 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
 			return -EINVAL;
 		}
 
-		size = sizeof(*put) + sizeof(fm_xinstrument_t);
+		size = sizeof(*put) + sizeof(struct fm_xinstrument);
 		put = kzalloc(size, GFP_KERNEL);
 		if (put == NULL)
 			return -ENOMEM;
@@ -249,7 +249,7 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
 		data->type = SNDRV_SEQ_INSTR_ATYPE_DATA;
 		strcpy(data->data.format, SNDRV_SEQ_INSTR_ID_OPL2_3);
 		/* build data section */
-		xinstr = (fm_xinstrument_t *)(data + 1);
+		xinstr = (struct fm_xinstrument *)(data + 1);
 		xinstr->stype = FM_STRU_INSTR;
         
 		for (i = 0; i < 2; i++) {
@@ -296,7 +296,7 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
 		err = snd_seq_instr_event(&opl3->fm_ops, opl3->ilist, &ev,
 				    opl3->seq_client, 0, 0);
 		if (err == -EBUSY) {
-			snd_seq_instr_header_t remove;
+			struct snd_seq_instr_header remove;
 
 			memset (&remove, 0, sizeof(remove));
 			remove.cmd = SNDRV_SEQ_INSTR_FREE_CMD_SINGLE;
@@ -319,10 +319,10 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
 }
 
 /* ioctl */
-static int snd_opl3_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd,
+static int snd_opl3_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd,
 				  unsigned long ioarg)
 {
-	opl3_t *opl3;
+	struct snd_opl3 *opl3;
 
 	snd_assert(arg != NULL, return -ENXIO);
 	opl3 = arg->private_data;
@@ -345,9 +345,9 @@ static int snd_opl3_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd,
 }
 
 /* reset device */
-static int snd_opl3_reset_seq_oss(snd_seq_oss_arg_t *arg)
+static int snd_opl3_reset_seq_oss(struct snd_seq_oss_arg *arg)
 {
-	opl3_t *opl3;
+	struct snd_opl3 *opl3;
 
 	snd_assert(arg != NULL, return -ENXIO);
 	opl3 = arg->private_data;
diff --git a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c
index 136964b844d..1886b2958e7 100644
--- a/sound/drivers/opl3/opl3_seq.c
+++ b/sound/drivers/opl3/opl3_seq.c
@@ -35,7 +35,7 @@ int use_internal_drums = 0;
 module_param(use_internal_drums, bool, 0444);
 MODULE_PARM_DESC(use_internal_drums, "Enable internal OPL2/3 drums.");
 
-int snd_opl3_synth_use_inc(opl3_t * opl3)
+int snd_opl3_synth_use_inc(struct snd_opl3 * opl3)
 {
 	if (!try_module_get(opl3->card->module))
 		return -EFAULT;
@@ -43,12 +43,12 @@ int snd_opl3_synth_use_inc(opl3_t * opl3)
 
 }
 
-void snd_opl3_synth_use_dec(opl3_t * opl3)
+void snd_opl3_synth_use_dec(struct snd_opl3 * opl3)
 {
 	module_put(opl3->card->module);
 }
 
-int snd_opl3_synth_setup(opl3_t * opl3)
+int snd_opl3_synth_setup(struct snd_opl3 * opl3)
 {
 	int idx;
 
@@ -78,7 +78,7 @@ int snd_opl3_synth_setup(opl3_t * opl3)
 	return 0;
 }
 
-void snd_opl3_synth_cleanup(opl3_t * opl3)
+void snd_opl3_synth_cleanup(struct snd_opl3 * opl3)
 {
 	unsigned long flags;
 
@@ -96,9 +96,9 @@ void snd_opl3_synth_cleanup(opl3_t * opl3)
 	up(&opl3->access_mutex);
 }
 
-static int snd_opl3_synth_use(void *private_data, snd_seq_port_subscribe_t * info)
+static int snd_opl3_synth_use(void *private_data, struct snd_seq_port_subscribe * info)
 {
-	opl3_t *opl3 = private_data;
+	struct snd_opl3 *opl3 = private_data;
 	int err;
 
 	if ((err = snd_opl3_synth_setup(opl3)) < 0)
@@ -123,9 +123,9 @@ static int snd_opl3_synth_use(void *private_data, snd_seq_port_subscribe_t * inf
 	return 0;
 }
 
-static int snd_opl3_synth_unuse(void *private_data, snd_seq_port_subscribe_t * info)
+static int snd_opl3_synth_unuse(void *private_data, struct snd_seq_port_subscribe * info)
 {
-	opl3_t *opl3 = private_data;
+	struct snd_opl3 *opl3 = private_data;
 
 	snd_opl3_synth_cleanup(opl3);
 
@@ -137,7 +137,7 @@ static int snd_opl3_synth_unuse(void *private_data, snd_seq_port_subscribe_t * i
 /*
  * MIDI emulation operators
  */
-snd_midi_op_t opl3_ops = {
+struct snd_midi_op opl3_ops = {
 	.note_on =		snd_opl3_note_on,
 	.note_off =		snd_opl3_note_off,
 	.key_press =		snd_opl3_key_press,
@@ -147,10 +147,10 @@ snd_midi_op_t opl3_ops = {
 	.sysex =		snd_opl3_sysex,
 };
 
-static int snd_opl3_synth_event_input(snd_seq_event_t * ev, int direct,
+static int snd_opl3_synth_event_input(struct snd_seq_event * ev, int direct,
 				      void *private_data, int atomic, int hop)
 {
-	opl3_t *opl3 = private_data;
+	struct snd_opl3 *opl3 = private_data;
 
 	if (ev->type >= SNDRV_SEQ_EVENT_INSTR_BEGIN &&
 	    ev->type <= SNDRV_SEQ_EVENT_INSTR_CHANGE) {
@@ -168,14 +168,14 @@ static int snd_opl3_synth_event_input(snd_seq_event_t * ev, int direct,
 
 static void snd_opl3_synth_free_port(void *private_data)
 {
-	opl3_t *opl3 = private_data;
+	struct snd_opl3 *opl3 = private_data;
 
 	snd_midi_channel_free_set(opl3->chset);
 }
 
-static int snd_opl3_synth_create_port(opl3_t * opl3)
+static int snd_opl3_synth_create_port(struct snd_opl3 * opl3)
 {
-	snd_seq_port_callback_t callbacks;
+	struct snd_seq_port_callback callbacks;
 	char name[32];
 	int voices, opl_ver;
 
@@ -215,15 +215,15 @@ static int snd_opl3_synth_create_port(opl3_t * opl3)
 
 /* ------------------------------ */
 
-static int snd_opl3_seq_new_device(snd_seq_device_t *dev)
+static int snd_opl3_seq_new_device(struct snd_seq_device *dev)
 {
-	opl3_t *opl3;
+	struct snd_opl3 *opl3;
 	int client;
-	snd_seq_client_callback_t callbacks;
-	snd_seq_client_info_t cinfo;
+	struct snd_seq_client_callback callbacks;
+	struct snd_seq_client_info cinfo;
 	int opl_ver;
 
-	opl3 = *(opl3_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
+	opl3 = *(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
 	if (opl3 == NULL)
 		return -EINVAL;
 
@@ -273,11 +273,11 @@ static int snd_opl3_seq_new_device(snd_seq_device_t *dev)
 	return 0;
 }
 
-static int snd_opl3_seq_delete_device(snd_seq_device_t *dev)
+static int snd_opl3_seq_delete_device(struct snd_seq_device *dev)
 {
-	opl3_t *opl3;
+	struct snd_opl3 *opl3;
 
-	opl3 = *(opl3_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
+	opl3 = *(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
 	if (opl3 == NULL)
 		return -EINVAL;
 
@@ -295,14 +295,14 @@ static int snd_opl3_seq_delete_device(snd_seq_device_t *dev)
 
 static int __init alsa_opl3_seq_init(void)
 {
-	static snd_seq_dev_ops_t ops =
+	static struct snd_seq_dev_ops ops =
 	{
 		snd_opl3_seq_new_device,
 		snd_opl3_seq_delete_device
 	};
 
 	return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OPL3, &ops,
-					      sizeof(opl3_t*));
+					      sizeof(struct snd_opl3 *));
 }
 
 static void __exit alsa_opl3_seq_exit(void)
diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c
index 04f9f955e5b..3534a0e3342 100644
--- a/sound/drivers/opl3/opl3_synth.c
+++ b/sound/drivers/opl3/opl3_synth.c
@@ -61,20 +61,20 @@ char snd_opl3_regmap[MAX_OPL2_VOICES][4] =
 /*
  * prototypes
  */
-static int snd_opl3_play_note(opl3_t * opl3, snd_dm_fm_note_t * note);
-static int snd_opl3_set_voice(opl3_t * opl3, snd_dm_fm_voice_t * voice);
-static int snd_opl3_set_params(opl3_t * opl3, snd_dm_fm_params_t * params);
-static int snd_opl3_set_mode(opl3_t * opl3, int mode);
-static int snd_opl3_set_connection(opl3_t * opl3, int connection);
+static int snd_opl3_play_note(struct snd_opl3 * opl3, struct snd_dm_fm_note * note);
+static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice);
+static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params);
+static int snd_opl3_set_mode(struct snd_opl3 * opl3, int mode);
+static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection);
 
 /* ------------------------------ */
 
 /*
  * open the device exclusively
  */
-int snd_opl3_open(snd_hwdep_t * hw, struct file *file)
+int snd_opl3_open(struct snd_hwdep * hw, struct file *file)
 {
-	opl3_t *opl3 = hw->private_data;
+	struct snd_opl3 *opl3 = hw->private_data;
 
 	down(&opl3->access_mutex);
 	if (opl3->used) {
@@ -90,10 +90,10 @@ int snd_opl3_open(snd_hwdep_t * hw, struct file *file)
 /*
  * ioctl for hwdep device:
  */
-int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
+int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file,
 		   unsigned int cmd, unsigned long arg)
 {
-	opl3_t *opl3 = hw->private_data;
+	struct snd_opl3 *opl3 = hw->private_data;
 	void __user *argp = (void __user *)arg;
 
 	snd_assert(opl3 != NULL, return -EINVAL);
@@ -102,11 +102,11 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
 		/* get information */
 	case SNDRV_DM_FM_IOCTL_INFO:
 		{
-			snd_dm_fm_info_t info;
+			struct snd_dm_fm_info info;
 
 			info.fm_mode = opl3->fm_mode;
 			info.rhythm = opl3->rhythm;
-			if (copy_to_user(argp, &info, sizeof(snd_dm_fm_info_t)))
+			if (copy_to_user(argp, &info, sizeof(struct snd_dm_fm_info)))
 				return -EFAULT;
 			return 0;
 		}
@@ -123,8 +123,8 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
 	case SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE:
 #endif
 		{
-			snd_dm_fm_note_t note;
-			if (copy_from_user(&note, argp, sizeof(snd_dm_fm_note_t)))
+			struct snd_dm_fm_note note;
+			if (copy_from_user(&note, argp, sizeof(struct snd_dm_fm_note)))
 				return -EFAULT;
 			return snd_opl3_play_note(opl3, &note);
 		}
@@ -134,8 +134,8 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
 	case SNDRV_DM_FM_OSS_IOCTL_SET_VOICE:
 #endif
 		{
-			snd_dm_fm_voice_t voice;
-			if (copy_from_user(&voice, argp, sizeof(snd_dm_fm_voice_t)))
+			struct snd_dm_fm_voice voice;
+			if (copy_from_user(&voice, argp, sizeof(struct snd_dm_fm_voice)))
 				return -EFAULT;
 			return snd_opl3_set_voice(opl3, &voice);
 		}
@@ -145,8 +145,8 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
 	case SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS:
 #endif
 		{
-			snd_dm_fm_params_t params;
-			if (copy_from_user(&params, argp, sizeof(snd_dm_fm_params_t)))
+			struct snd_dm_fm_params params;
+			if (copy_from_user(&params, argp, sizeof(struct snd_dm_fm_params)))
 				return -EFAULT;
 			return snd_opl3_set_params(opl3, &params);
 		}
@@ -174,9 +174,9 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
 /*
  * close the device
  */
-int snd_opl3_release(snd_hwdep_t * hw, struct file *file)
+int snd_opl3_release(struct snd_hwdep * hw, struct file *file)
 {
-	opl3_t *opl3 = hw->private_data;
+	struct snd_opl3 *opl3 = hw->private_data;
 
 	snd_opl3_reset(opl3);
 	down(&opl3->access_mutex);
@@ -188,7 +188,7 @@ int snd_opl3_release(snd_hwdep_t * hw, struct file *file)
 
 /* ------------------------------ */
 
-void snd_opl3_reset(opl3_t * opl3)
+void snd_opl3_reset(struct snd_opl3 * opl3)
 {
 	unsigned short opl3_reg;
 
@@ -229,7 +229,7 @@ void snd_opl3_reset(opl3_t * opl3)
 }
 
 
-static int snd_opl3_play_note(opl3_t * opl3, snd_dm_fm_note_t * note)
+static int snd_opl3_play_note(struct snd_opl3 * opl3, struct snd_dm_fm_note * note)
 {
 	unsigned short reg_side;
 	unsigned char voice_offset;
@@ -276,7 +276,7 @@ static int snd_opl3_play_note(opl3_t * opl3, snd_dm_fm_note_t * note)
 }
 
 
-static int snd_opl3_set_voice(opl3_t * opl3, snd_dm_fm_voice_t * voice)
+static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice)
 {
 	unsigned short reg_side;
 	unsigned char op_offset;
@@ -378,7 +378,7 @@ static int snd_opl3_set_voice(opl3_t * opl3, snd_dm_fm_voice_t * voice)
 	return 0;
 }
 
-static int snd_opl3_set_params(opl3_t * opl3, snd_dm_fm_params_t * params)
+static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params)
 {
 	unsigned char reg_val;
 
@@ -418,7 +418,7 @@ static int snd_opl3_set_params(opl3_t * opl3, snd_dm_fm_params_t * params)
 	return 0;
 }
 
-static int snd_opl3_set_mode(opl3_t * opl3, int mode)
+static int snd_opl3_set_mode(struct snd_opl3 * opl3, int mode)
 {
 	if ((mode == SNDRV_DM_FM_MODE_OPL3) && (opl3->hardware < OPL3_HW_OPL3))
 		return -EINVAL;
@@ -430,7 +430,7 @@ static int snd_opl3_set_mode(opl3_t * opl3, int mode)
 	return 0;
 }
 
-static int snd_opl3_set_connection(opl3_t * opl3, int connection)
+static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection)
 {
 	unsigned char reg_val;
 
diff --git a/sound/drivers/opl3/opl3_voice.h b/sound/drivers/opl3/opl3_voice.h
index 63346a5c349..a371c075ac8 100644
--- a/sound/drivers/opl3/opl3_voice.h
+++ b/sound/drivers/opl3/opl3_voice.h
@@ -22,31 +22,31 @@
 #include <sound/opl3.h>
 
 /* Prototypes for opl3_seq.c */
-int snd_opl3_synth_use_inc(opl3_t * opl3);
-void snd_opl3_synth_use_dec(opl3_t * opl3);
-int snd_opl3_synth_setup(opl3_t * opl3);
-void snd_opl3_synth_cleanup(opl3_t * opl3);
+int snd_opl3_synth_use_inc(struct snd_opl3 * opl3);
+void snd_opl3_synth_use_dec(struct snd_opl3 * opl3);
+int snd_opl3_synth_setup(struct snd_opl3 * opl3);
+void snd_opl3_synth_cleanup(struct snd_opl3 * opl3);
 
 /* Prototypes for opl3_midi.c */
 void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
 void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
 void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan);
-void snd_opl3_terminate_note(void *p, int note, snd_midi_channel_t *chan);
+void snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan);
 void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan);
-void snd_opl3_nrpn(void *p, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset);
-void snd_opl3_sysex(void *p, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset);
+void snd_opl3_nrpn(void *p, struct snd_midi_channel *chan, struct snd_midi_channel_set *chset);
+void snd_opl3_sysex(void *p, unsigned char *buf, int len, int parsed, struct snd_midi_channel_set *chset);
 
-void snd_opl3_calc_volume(unsigned char *reg, int vel, snd_midi_channel_t *chan);
+void snd_opl3_calc_volume(unsigned char *reg, int vel, struct snd_midi_channel *chan);
 void snd_opl3_timer_func(unsigned long data);
 
 /* Prototypes for opl3_drums.c */
-void snd_opl3_load_drums(opl3_t *opl3);
-void snd_opl3_drum_switch(opl3_t *opl3, int note, int on_off, int vel, snd_midi_channel_t *chan);
+void snd_opl3_load_drums(struct snd_opl3 *opl3);
+void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int on_off, int vel, struct snd_midi_channel *chan);
 
 /* Prototypes for opl3_oss.c */
 #ifdef CONFIG_SND_SEQUENCER_OSS
-void snd_opl3_init_seq_oss(opl3_t *opl3, char *name);
-void snd_opl3_free_seq_oss(opl3_t *opl3);
+void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name);
+void snd_opl3_free_seq_oss(struct snd_opl3 *opl3);
 #endif
 
 #endif
-- 
cgit v1.2.3-70-g09d2


From a42dd420bea7a5cd130162183d95f640c299a337 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:13:47 +0100
Subject: [ALSA] Remove xxx_t typedefs: OPL4

Modules: OPL4

Remove xxx_t typedefs from the OPL4 driver

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/opl4.h            |   6 +-
 sound/drivers/opl4/opl4_lib.c   |  40 +++---
 sound/drivers/opl4/opl4_local.h |  68 +++++------
 sound/drivers/opl4/opl4_mixer.c |  16 +--
 sound/drivers/opl4/opl4_proc.c  |  24 ++--
 sound/drivers/opl4/opl4_seq.c   |  42 +++----
 sound/drivers/opl4/opl4_synth.c |  76 ++++++------
 sound/drivers/opl4/yrw801.c     | 262 ++++++++++++++++++++--------------------
 8 files changed, 269 insertions(+), 265 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/opl4.h b/include/sound/opl4.h
index 20c04428b13..60ae8454b3c 100644
--- a/include/sound/opl4.h
+++ b/include/sound/opl4.h
@@ -22,11 +22,11 @@
 
 #include <sound/opl3.h>
 
-typedef struct opl4 opl4_t;
+struct snd_opl4;
 
-extern int snd_opl4_create(snd_card_t *card,
+extern int snd_opl4_create(struct snd_card *card,
 			   unsigned long fm_port, unsigned long pcm_port,
 			   int seq_device,
-			   opl3_t **opl3, opl4_t **opl4);
+			   struct snd_opl3 **opl3, struct snd_opl4 **opl4);
 
 #endif /* __SOUND_OPL4_H */
diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c
index 4ae5dd8f011..ddfc10d04be 100644
--- a/sound/drivers/opl4/opl4_lib.c
+++ b/sound/drivers/opl4/opl4_lib.c
@@ -27,14 +27,14 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
 MODULE_DESCRIPTION("OPL4 driver");
 MODULE_LICENSE("GPL");
 
-static void inline snd_opl4_wait(opl4_t *opl4)
+static void inline snd_opl4_wait(struct snd_opl4 *opl4)
 {
 	int timeout = 10;
 	while ((inb(opl4->fm_port) & OPL4_STATUS_BUSY) && --timeout > 0)
 		;
 }
 
-void snd_opl4_write(opl4_t *opl4, u8 reg, u8 value)
+void snd_opl4_write(struct snd_opl4 *opl4, u8 reg, u8 value)
 {
 	snd_opl4_wait(opl4);
 	outb(reg, opl4->pcm_port);
@@ -43,7 +43,7 @@ void snd_opl4_write(opl4_t *opl4, u8 reg, u8 value)
 	outb(value, opl4->pcm_port + 1);
 }
 
-u8 snd_opl4_read(opl4_t *opl4, u8 reg)
+u8 snd_opl4_read(struct snd_opl4 *opl4, u8 reg)
 {
 	snd_opl4_wait(opl4);
 	outb(reg, opl4->pcm_port);
@@ -52,7 +52,7 @@ u8 snd_opl4_read(opl4_t *opl4, u8 reg)
 	return inb(opl4->pcm_port + 1);
 }
 
-void snd_opl4_read_memory(opl4_t *opl4, char *buf, int offset, int size)
+void snd_opl4_read_memory(struct snd_opl4 *opl4, char *buf, int offset, int size)
 {
 	unsigned long flags;
 	u8 memcfg;
@@ -76,7 +76,7 @@ void snd_opl4_read_memory(opl4_t *opl4, char *buf, int offset, int size)
 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
 }
 
-void snd_opl4_write_memory(opl4_t *opl4, const char *buf, int offset, int size)
+void snd_opl4_write_memory(struct snd_opl4 *opl4, const char *buf, int offset, int size)
 {
 	unsigned long flags;
 	u8 memcfg;
@@ -100,7 +100,7 @@ void snd_opl4_write_memory(opl4_t *opl4, const char *buf, int offset, int size)
 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
 }
 
-static void snd_opl4_enable_opl4(opl4_t *opl4)
+static void snd_opl4_enable_opl4(struct snd_opl4 *opl4)
 {
 	outb(OPL3_REG_MODE, opl4->fm_port + 2);
 	inb(opl4->fm_port);
@@ -110,7 +110,7 @@ static void snd_opl4_enable_opl4(opl4_t *opl4)
 	inb(opl4->fm_port);
 }
 
-static int snd_opl4_detect(opl4_t *opl4)
+static int snd_opl4_detect(struct snd_opl4 *opl4)
 {
 	u8 id1, id2;
 
@@ -144,19 +144,19 @@ static int snd_opl4_detect(opl4_t *opl4)
 }
 
 #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
-static void snd_opl4_seq_dev_free(snd_seq_device_t *seq_dev)
+static void snd_opl4_seq_dev_free(struct snd_seq_device *seq_dev)
 {
-	opl4_t *opl4 = seq_dev->private_data;
+	struct snd_opl4 *opl4 = seq_dev->private_data;
 	opl4->seq_dev = NULL;
 }
 
-static int snd_opl4_create_seq_dev(opl4_t *opl4, int seq_device)
+static int snd_opl4_create_seq_dev(struct snd_opl4 *opl4, int seq_device)
 {
 	opl4->seq_dev_num = seq_device;
 	if (snd_seq_device_new(opl4->card, seq_device, SNDRV_SEQ_DEV_ID_OPL4,
-			       sizeof(opl4_t *), &opl4->seq_dev) >= 0) {
+			       sizeof(struct snd_opl4 *), &opl4->seq_dev) >= 0) {
 		strcpy(opl4->seq_dev->name, "OPL4 Wavetable");
-		*(opl4_t **)SNDRV_SEQ_DEVICE_ARGPTR(opl4->seq_dev) = opl4;
+		*(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(opl4->seq_dev) = opl4;
 		opl4->seq_dev->private_data = opl4;
 		opl4->seq_dev->private_free = snd_opl4_seq_dev_free;
 	}
@@ -164,7 +164,7 @@ static int snd_opl4_create_seq_dev(opl4_t *opl4, int seq_device)
 }
 #endif
 
-static void snd_opl4_free(opl4_t *opl4)
+static void snd_opl4_free(struct snd_opl4 *opl4)
 {
 #ifdef CONFIG_PROC_FS
 	snd_opl4_free_proc(opl4);
@@ -174,22 +174,22 @@ static void snd_opl4_free(opl4_t *opl4)
 	kfree(opl4);
 }
 
-static int snd_opl4_dev_free(snd_device_t *device)
+static int snd_opl4_dev_free(struct snd_device *device)
 {
-	opl4_t *opl4 = device->device_data;
+	struct snd_opl4 *opl4 = device->device_data;
 	snd_opl4_free(opl4);
 	return 0;
 }
 
-int snd_opl4_create(snd_card_t *card,
+int snd_opl4_create(struct snd_card *card,
 		    unsigned long fm_port, unsigned long pcm_port,
 		    int seq_device,
-		    opl3_t **ropl3, opl4_t **ropl4)
+		    struct snd_opl3 **ropl3, struct snd_opl4 **ropl4)
 {
-	opl4_t *opl4;
-	opl3_t *opl3;
+	struct snd_opl4 *opl4;
+	struct snd_opl3 *opl3;
 	int err;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free = snd_opl4_dev_free
 	};
 
diff --git a/sound/drivers/opl4/opl4_local.h b/sound/drivers/opl4/opl4_local.h
index c455680843f..7e088a4a2f4 100644
--- a/sound/drivers/opl4/opl4_local.h
+++ b/sound/drivers/opl4/opl4_local.h
@@ -131,7 +131,7 @@
 #define SNDRV_SEQ_DEV_ID_OPL4 "opl4-synth"
 
 
-typedef struct opl4_sound {
+struct opl4_sound {
 	u16 tone;
 	s16 pitch_offset;
 	u8 key_scaling;
@@ -144,42 +144,42 @@ typedef struct opl4_sound {
 	u8 reg_level_decay2;
 	u8 reg_release_correction;
 	u8 reg_tremolo;
-} opl4_sound_t;
+};
 
-typedef struct opl4_region {
+struct opl4_region {
 	u8 key_min, key_max;
-	opl4_sound_t sound;
-} opl4_region_t;
+	struct opl4_sound sound;
+};
 
-typedef struct opl4_region_ptr {
+struct opl4_region_ptr {
 	int count;
-	const opl4_region_t *regions;
-} opl4_region_ptr_t;
+	const struct opl4_region *regions;
+};
 
-typedef struct opl4_voice {
+struct opl4_voice {
 	struct list_head list;
 	int number;
-	snd_midi_channel_t *chan;
+	struct snd_midi_channel *chan;
 	int note;
 	int velocity;
-	const opl4_sound_t *sound;
+	const struct opl4_sound *sound;
 	u8 level_direct;
 	u8 reg_f_number;
 	u8 reg_misc;
 	u8 reg_lfo_vibrato;
-} opl4_voice_t;
+};
 
-struct opl4 {
+struct snd_opl4 {
 	unsigned long fm_port;
 	unsigned long pcm_port;
 	struct resource *res_fm_port;
 	struct resource *res_pcm_port;
 	unsigned short hardware;
 	spinlock_t reg_lock;
-	snd_card_t *card;
+	struct snd_card *card;
 
 #ifdef CONFIG_PROC_FS
-	snd_info_entry_t *proc_entry;
+	struct snd_info_entry *proc_entry;
 	int memory_access;
 #endif
 	struct semaphore access_mutex;
@@ -189,44 +189,44 @@ struct opl4 {
 
 	int seq_dev_num;
 	int seq_client;
-	snd_seq_device_t *seq_dev;
+	struct snd_seq_device *seq_dev;
 
-	snd_midi_channel_set_t *chset;
-	opl4_voice_t voices[OPL4_MAX_VOICES];
+	struct snd_midi_channel_set *chset;
+	struct opl4_voice voices[OPL4_MAX_VOICES];
 	struct list_head off_voices;
 	struct list_head on_voices;
 #endif
 };
 
 /* opl4_lib.c */
-void snd_opl4_write(opl4_t *opl4, u8 reg, u8 value);
-u8 snd_opl4_read(opl4_t *opl4, u8 reg);
-void snd_opl4_read_memory(opl4_t *opl4, char *buf, int offset, int size);
-void snd_opl4_write_memory(opl4_t *opl4, const char *buf, int offset, int size);
+void snd_opl4_write(struct snd_opl4 *opl4, u8 reg, u8 value);
+u8 snd_opl4_read(struct snd_opl4 *opl4, u8 reg);
+void snd_opl4_read_memory(struct snd_opl4 *opl4, char *buf, int offset, int size);
+void snd_opl4_write_memory(struct snd_opl4 *opl4, const char *buf, int offset, int size);
 
 /* opl4_mixer.c */
-int snd_opl4_create_mixer(opl4_t *opl4);
+int snd_opl4_create_mixer(struct snd_opl4 *opl4);
 
 #ifdef CONFIG_PROC_FS
 /* opl4_proc.c */
-int snd_opl4_create_proc(opl4_t *opl4);
-void snd_opl4_free_proc(opl4_t *opl4);
+int snd_opl4_create_proc(struct snd_opl4 *opl4);
+void snd_opl4_free_proc(struct snd_opl4 *opl4);
 #endif
 
 /* opl4_seq.c */
 extern int volume_boost;
 
 /* opl4_synth.c */
-void snd_opl4_synth_reset(opl4_t *opl4);
-void snd_opl4_synth_shutdown(opl4_t *opl4);
-void snd_opl4_note_on(void *p, int note, int vel, snd_midi_channel_t *chan);
-void snd_opl4_note_off(void *p, int note, int vel, snd_midi_channel_t *chan);
-void snd_opl4_terminate_note(void *p, int note, snd_midi_channel_t *chan);
-void snd_opl4_control(void *p, int type, snd_midi_channel_t *chan);
-void snd_opl4_sysex(void *p, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset);
+void snd_opl4_synth_reset(struct snd_opl4 *opl4);
+void snd_opl4_synth_shutdown(struct snd_opl4 *opl4);
+void snd_opl4_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
+void snd_opl4_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
+void snd_opl4_terminate_note(void *p, int note, struct snd_midi_channel *chan);
+void snd_opl4_control(void *p, int type, struct snd_midi_channel *chan);
+void snd_opl4_sysex(void *p, unsigned char *buf, int len, int parsed, struct snd_midi_channel_set *chset);
 
 /* yrw801.c */
-int snd_yrw801_detect(opl4_t *opl4);
-extern const opl4_region_ptr_t snd_yrw801_regions[];
+int snd_yrw801_detect(struct snd_opl4 *opl4);
+extern const struct opl4_region_ptr snd_yrw801_regions[];
 
 #endif /* __OPL4_LOCAL_H */
diff --git a/sound/drivers/opl4/opl4_mixer.c b/sound/drivers/opl4/opl4_mixer.c
index ec7a228fbe7..04079de4c35 100644
--- a/sound/drivers/opl4/opl4_mixer.c
+++ b/sound/drivers/opl4/opl4_mixer.c
@@ -20,7 +20,7 @@
 #include "opl4_local.h"
 #include <sound/control.h>
 
-static int snd_opl4_ctl_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int snd_opl4_ctl_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
@@ -29,9 +29,9 @@ static int snd_opl4_ctl_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
 	return 0;
 }
 
-static int snd_opl4_ctl_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_opl4_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	opl4_t *opl4 = snd_kcontrol_chip(kcontrol);
+	struct snd_opl4 *opl4 = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	u8 reg = kcontrol->private_value;
 	u8 value;
@@ -44,9 +44,9 @@ static int snd_opl4_ctl_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
 	return 0;
 }
 
-static int snd_opl4_ctl_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_opl4_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	opl4_t *opl4 = snd_kcontrol_chip(kcontrol);
+	struct snd_opl4 *opl4 = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	u8 reg = kcontrol->private_value;
 	u8 value, old_value;
@@ -60,7 +60,7 @@ static int snd_opl4_ctl_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
 	return value != old_value;
 }
 
-static snd_kcontrol_new_t snd_opl4_controls[] = {
+static struct snd_kcontrol_new snd_opl4_controls[] = {
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "FM Playback Volume",
@@ -79,9 +79,9 @@ static snd_kcontrol_new_t snd_opl4_controls[] = {
 	}
 };
 
-int snd_opl4_create_mixer(opl4_t *opl4)
+int snd_opl4_create_mixer(struct snd_opl4 *opl4)
 {
-	snd_card_t *card = opl4->card;
+	struct snd_card *card = opl4->card;
 	int i, err;
 
 	strcat(card->mixername, ",OPL4");
diff --git a/sound/drivers/opl4/opl4_proc.c b/sound/drivers/opl4/opl4_proc.c
index 6a1486258ac..f4b4e74fcc1 100644
--- a/sound/drivers/opl4/opl4_proc.c
+++ b/sound/drivers/opl4/opl4_proc.c
@@ -23,10 +23,10 @@
 
 #ifdef CONFIG_PROC_FS
 
-static int snd_opl4_mem_proc_open(snd_info_entry_t *entry,
+static int snd_opl4_mem_proc_open(struct snd_info_entry *entry,
 				  unsigned short mode, void **file_private_data)
 {
-	opl4_t *opl4 = entry->private_data;
+	struct snd_opl4 *opl4 = entry->private_data;
 
 	down(&opl4->access_mutex);
 	if (opl4->memory_access) {
@@ -38,10 +38,10 @@ static int snd_opl4_mem_proc_open(snd_info_entry_t *entry,
 	return 0;
 }
 
-static int snd_opl4_mem_proc_release(snd_info_entry_t *entry,
+static int snd_opl4_mem_proc_release(struct snd_info_entry *entry,
 				     unsigned short mode, void *file_private_data)
 {
-	opl4_t *opl4 = entry->private_data;
+	struct snd_opl4 *opl4 = entry->private_data;
 
 	down(&opl4->access_mutex);
 	opl4->memory_access--;
@@ -49,11 +49,11 @@ static int snd_opl4_mem_proc_release(snd_info_entry_t *entry,
 	return 0;
 }
 
-static long snd_opl4_mem_proc_read(snd_info_entry_t *entry, void *file_private_data,
+static long snd_opl4_mem_proc_read(struct snd_info_entry *entry, void *file_private_data,
 				   struct file *file, char __user *_buf,
 				   unsigned long count, unsigned long pos)
 {
-	opl4_t *opl4 = entry->private_data;
+	struct snd_opl4 *opl4 = entry->private_data;
 	long size;
 	char* buf;
 
@@ -75,11 +75,11 @@ static long snd_opl4_mem_proc_read(snd_info_entry_t *entry, void *file_private_d
 	return 0;
 }
 
-static long snd_opl4_mem_proc_write(snd_info_entry_t *entry, void *file_private_data,
+static long snd_opl4_mem_proc_write(struct snd_info_entry *entry, void *file_private_data,
 				    struct file *file, const char __user *_buf,
 				    unsigned long count, unsigned long pos)
 {
-	opl4_t *opl4 = entry->private_data;
+	struct snd_opl4 *opl4 = entry->private_data;
 	long size;
 	char *buf;
 
@@ -101,7 +101,7 @@ static long snd_opl4_mem_proc_write(snd_info_entry_t *entry, void *file_private_
 	return 0;
 }
 
-static long long snd_opl4_mem_proc_llseek(snd_info_entry_t *entry, void *file_private_data,
+static long long snd_opl4_mem_proc_llseek(struct snd_info_entry *entry, void *file_private_data,
 					  struct file *file, long long offset, int orig)
 {
 	switch (orig) {
@@ -130,9 +130,9 @@ static struct snd_info_entry_ops snd_opl4_mem_proc_ops = {
 	.llseek = snd_opl4_mem_proc_llseek,
 };
 
-int snd_opl4_create_proc(opl4_t *opl4)
+int snd_opl4_create_proc(struct snd_opl4 *opl4)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	entry = snd_info_create_card_entry(opl4->card, "opl4-mem", opl4->card->proc_root);
 	if (entry) {
@@ -157,7 +157,7 @@ int snd_opl4_create_proc(opl4_t *opl4)
 	return 0;
 }
 
-void snd_opl4_free_proc(opl4_t *opl4)
+void snd_opl4_free_proc(struct snd_opl4 *opl4)
 {
 	if (opl4->proc_entry)
 		snd_info_unregister(opl4->proc_entry);
diff --git a/sound/drivers/opl4/opl4_seq.c b/sound/drivers/opl4/opl4_seq.c
index 958dfe88479..bfd68e49c91 100644
--- a/sound/drivers/opl4/opl4_seq.c
+++ b/sound/drivers/opl4/opl4_seq.c
@@ -45,21 +45,21 @@ int volume_boost = 8;
 module_param(volume_boost, int, 0644);
 MODULE_PARM_DESC(volume_boost, "Additional volume for OPL4 wavetable sounds.");
 
-static int snd_opl4_seq_use_inc(opl4_t *opl4)
+static int snd_opl4_seq_use_inc(struct snd_opl4 *opl4)
 {
 	if (!try_module_get(opl4->card->module))
 		return -EFAULT;
 	return 0;
 }
 
-static void snd_opl4_seq_use_dec(opl4_t *opl4)
+static void snd_opl4_seq_use_dec(struct snd_opl4 *opl4)
 {
 	module_put(opl4->card->module);
 }
 
-static int snd_opl4_seq_use(void *private_data, snd_seq_port_subscribe_t *info)
+static int snd_opl4_seq_use(void *private_data, struct snd_seq_port_subscribe *info)
 {
-	opl4_t *opl4 = private_data;
+	struct snd_opl4 *opl4 = private_data;
 	int err;
 
 	down(&opl4->access_mutex);
@@ -84,9 +84,9 @@ static int snd_opl4_seq_use(void *private_data, snd_seq_port_subscribe_t *info)
 	return 0;
 }
 
-static int snd_opl4_seq_unuse(void *private_data, snd_seq_port_subscribe_t *info)
+static int snd_opl4_seq_unuse(void *private_data, struct snd_seq_port_subscribe *info)
 {
-	opl4_t *opl4 = private_data;
+	struct snd_opl4 *opl4 = private_data;
 
 	snd_opl4_synth_shutdown(opl4);
 
@@ -99,7 +99,7 @@ static int snd_opl4_seq_unuse(void *private_data, snd_seq_port_subscribe_t *info
 	return 0;
 }
 
-static snd_midi_op_t opl4_ops = {
+static struct snd_midi_op opl4_ops = {
 	.note_on =		snd_opl4_note_on,
 	.note_off =		snd_opl4_note_off,
 	.note_terminate =	snd_opl4_terminate_note,
@@ -107,10 +107,10 @@ static snd_midi_op_t opl4_ops = {
 	.sysex =		snd_opl4_sysex,
 };
 
-static int snd_opl4_seq_event_input(snd_seq_event_t *ev, int direct,
+static int snd_opl4_seq_event_input(struct snd_seq_event *ev, int direct,
 				    void *private_data, int atomic, int hop)
 {
-	opl4_t *opl4 = private_data;
+	struct snd_opl4 *opl4 = private_data;
 
 	snd_midi_process_event(&opl4_ops, ev, opl4->chset);
 	return 0;
@@ -118,20 +118,20 @@ static int snd_opl4_seq_event_input(snd_seq_event_t *ev, int direct,
 
 static void snd_opl4_seq_free_port(void *private_data)
 {
-	opl4_t *opl4 = private_data;
+	struct snd_opl4 *opl4 = private_data;
 
 	snd_midi_channel_free_set(opl4->chset);
 }
 
-static int snd_opl4_seq_new_device(snd_seq_device_t *dev)
+static int snd_opl4_seq_new_device(struct snd_seq_device *dev)
 {
-	opl4_t *opl4;
+	struct snd_opl4 *opl4;
 	int client;
-	snd_seq_client_callback_t callbacks;
-	snd_seq_client_info_t cinfo;
-	snd_seq_port_callback_t pcallbacks;
+	struct snd_seq_client_callback callbacks;
+	struct snd_seq_client_info cinfo;
+	struct snd_seq_port_callback pcallbacks;
 
-	opl4 = *(opl4_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
+	opl4 = *(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
 	if (!opl4)
 		return -EINVAL;
 
@@ -188,11 +188,11 @@ static int snd_opl4_seq_new_device(snd_seq_device_t *dev)
 	return 0;
 }
 
-static int snd_opl4_seq_delete_device(snd_seq_device_t *dev)
+static int snd_opl4_seq_delete_device(struct snd_seq_device *dev)
 {
-	opl4_t *opl4;
+	struct snd_opl4 *opl4;
 
-	opl4 = *(opl4_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
+	opl4 = *(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
 	if (!opl4)
 		return -EINVAL;
 
@@ -205,13 +205,13 @@ static int snd_opl4_seq_delete_device(snd_seq_device_t *dev)
 
 static int __init alsa_opl4_synth_init(void)
 {
-	static snd_seq_dev_ops_t ops = {
+	static struct snd_seq_dev_ops ops = {
 		snd_opl4_seq_new_device,
 		snd_opl4_seq_delete_device
 	};
 
 	return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OPL4, &ops,
-					      sizeof(opl4_t*));
+					      sizeof(struct snd_opl4 *));
 }
 
 static void __exit alsa_opl4_synth_exit(void)
diff --git a/sound/drivers/opl4/opl4_synth.c b/sound/drivers/opl4/opl4_synth.c
index b146a1c995d..74f6e53eae0 100644
--- a/sound/drivers/opl4/opl4_synth.c
+++ b/sound/drivers/opl4/opl4_synth.c
@@ -270,7 +270,7 @@ static unsigned char snd_opl4_volume_table[128] = {
 /*
  * Initializes all voices.
  */
-void snd_opl4_synth_reset(opl4_t *opl4)
+void snd_opl4_synth_reset(struct snd_opl4 *opl4)
 {
 	unsigned long flags;
 	int i;
@@ -294,7 +294,7 @@ void snd_opl4_synth_reset(opl4_t *opl4)
 /*
  * Shuts down all voices.
  */
-void snd_opl4_synth_shutdown(opl4_t *opl4)
+void snd_opl4_synth_shutdown(struct snd_opl4 *opl4)
 {
 	unsigned long flags;
 	int i;
@@ -309,12 +309,12 @@ void snd_opl4_synth_shutdown(opl4_t *opl4)
 /*
  * Executes the callback for all voices playing the specified note.
  */
-static void snd_opl4_do_for_note(opl4_t *opl4, int note, snd_midi_channel_t *chan,
-				 void (*func)(opl4_t *opl4, opl4_voice_t *voice))
+static void snd_opl4_do_for_note(struct snd_opl4 *opl4, int note, struct snd_midi_channel *chan,
+				 void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice))
 {
 	int i;
 	unsigned long flags;
-	opl4_voice_t *voice;
+	struct opl4_voice *voice;
 
 	spin_lock_irqsave(&opl4->reg_lock, flags);
 	for (i = 0; i < OPL4_MAX_VOICES; i++) {
@@ -329,12 +329,13 @@ static void snd_opl4_do_for_note(opl4_t *opl4, int note, snd_midi_channel_t *cha
 /*
  * Executes the callback for all voices of to the specified channel.
  */
-static void snd_opl4_do_for_channel(opl4_t *opl4, snd_midi_channel_t *chan,
-				    void (*func)(opl4_t *opl4, opl4_voice_t *voice))
+static void snd_opl4_do_for_channel(struct snd_opl4 *opl4,
+				    struct snd_midi_channel *chan,
+				    void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice))
 {
 	int i;
 	unsigned long flags;
-	opl4_voice_t *voice;
+	struct opl4_voice *voice;
 
 	spin_lock_irqsave(&opl4->reg_lock, flags);
 	for (i = 0; i < OPL4_MAX_VOICES; i++) {
@@ -349,12 +350,12 @@ static void snd_opl4_do_for_channel(opl4_t *opl4, snd_midi_channel_t *chan,
 /*
  * Executes the callback for all active voices.
  */
-static void snd_opl4_do_for_all(opl4_t *opl4,
-				void (*func)(opl4_t *opl4, opl4_voice_t *voice))
+static void snd_opl4_do_for_all(struct snd_opl4 *opl4,
+				void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice))
 {
 	int i;
 	unsigned long flags;
-	opl4_voice_t *voice;
+	struct opl4_voice *voice;
 
 	spin_lock_irqsave(&opl4->reg_lock, flags);
 	for (i = 0; i < OPL4_MAX_VOICES; i++) {
@@ -365,7 +366,7 @@ static void snd_opl4_do_for_all(opl4_t *opl4,
 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
 }
 
-static void snd_opl4_update_volume(opl4_t *opl4, opl4_voice_t *voice)
+static void snd_opl4_update_volume(struct snd_opl4 *opl4, struct opl4_voice *voice)
 {
 	int att;
 
@@ -384,7 +385,7 @@ static void snd_opl4_update_volume(opl4_t *opl4, opl4_voice_t *voice)
 	voice->level_direct = 0;
 }
 
-static void snd_opl4_update_pan(opl4_t *opl4, opl4_voice_t *voice)
+static void snd_opl4_update_pan(struct snd_opl4 *opl4, struct opl4_voice *voice)
 {
 	int pan = voice->sound->panpot;
 
@@ -399,7 +400,8 @@ static void snd_opl4_update_pan(opl4_t *opl4, opl4_voice_t *voice)
 	snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc);
 }
 
-static void snd_opl4_update_vibrato_depth(opl4_t *opl4, opl4_voice_t *voice)
+static void snd_opl4_update_vibrato_depth(struct snd_opl4 *opl4,
+					  struct opl4_voice *voice)
 {
 	int depth;
 
@@ -414,9 +416,10 @@ static void snd_opl4_update_vibrato_depth(opl4_t *opl4, opl4_voice_t *voice)
 		       voice->reg_lfo_vibrato);
 }
 
-static void snd_opl4_update_pitch(opl4_t *opl4, opl4_voice_t *voice)
+static void snd_opl4_update_pitch(struct snd_opl4 *opl4,
+				  struct opl4_voice *voice)
 {
-	snd_midi_channel_t *chan = voice->chan;
+	struct snd_midi_channel *chan = voice->chan;
 	int note, pitch, octave;
 
 	note = chan->drum_channel ? 60 : voice->note;
@@ -444,7 +447,8 @@ static void snd_opl4_update_pitch(opl4_t *opl4, opl4_voice_t *voice)
 	snd_opl4_write(opl4, OPL4_REG_F_NUMBER + voice->number, voice->reg_f_number);
 }
 
-static void snd_opl4_update_tone_parameters(opl4_t *opl4, opl4_voice_t *voice)
+static void snd_opl4_update_tone_parameters(struct snd_opl4 *opl4,
+					    struct opl4_voice *voice)
 {
 	snd_opl4_write(opl4, OPL4_REG_ATTACK_DECAY1 + voice->number,
 		       voice->sound->reg_attack_decay1);
@@ -457,17 +461,17 @@ static void snd_opl4_update_tone_parameters(opl4_t *opl4, opl4_voice_t *voice)
 }
 
 /* allocate one voice */
-static opl4_voice_t *snd_opl4_get_voice(opl4_t *opl4)
+static struct opl4_voice *snd_opl4_get_voice(struct snd_opl4 *opl4)
 {
 	/* first, try to get the oldest key-off voice */
 	if (!list_empty(&opl4->off_voices))
-		return list_entry(opl4->off_voices.next, opl4_voice_t, list);
+		return list_entry(opl4->off_voices.next, struct opl4_voice, list);
 	/* then get the oldest key-on voice */
 	snd_assert(!list_empty(&opl4->on_voices), );
-	return list_entry(opl4->on_voices.next, opl4_voice_t, list);
+	return list_entry(opl4->on_voices.next, struct opl4_voice, list);
 }
 
-static void snd_opl4_wait_for_wave_headers(opl4_t *opl4)
+static void snd_opl4_wait_for_wave_headers(struct snd_opl4 *opl4)
 {
 	int timeout = 200;
 
@@ -475,12 +479,12 @@ static void snd_opl4_wait_for_wave_headers(opl4_t *opl4)
 		udelay(10);
 }
 
-void snd_opl4_note_on(void *private_data, int note, int vel, snd_midi_channel_t *chan)
+void snd_opl4_note_on(void *private_data, int note, int vel, struct snd_midi_channel *chan)
 {
-	opl4_t *opl4 = private_data;
-	const opl4_region_ptr_t *regions;
-	opl4_voice_t *voice[2];
-	const opl4_sound_t *sound[2];
+	struct snd_opl4 *opl4 = private_data;
+	const struct opl4_region_ptr *regions;
+	struct opl4_voice *voice[2];
+	const struct opl4_sound *sound[2];
 	int voices = 0, i;
 	unsigned long flags;
 
@@ -549,7 +553,7 @@ void snd_opl4_note_on(void *private_data, int note, int vel, snd_midi_channel_t
 	spin_unlock_irqrestore(&opl4->reg_lock, flags);
 }
 
-static void snd_opl4_voice_off(opl4_t *opl4, opl4_voice_t *voice)
+static void snd_opl4_voice_off(struct snd_opl4 *opl4, struct opl4_voice *voice)
 {
 	list_del(&voice->list);
 	list_add_tail(&voice->list, &opl4->off_voices);
@@ -558,14 +562,14 @@ static void snd_opl4_voice_off(opl4_t *opl4, opl4_voice_t *voice)
 	snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc);
 }
 
-void snd_opl4_note_off(void *private_data, int note, int vel, snd_midi_channel_t *chan)
+void snd_opl4_note_off(void *private_data, int note, int vel, struct snd_midi_channel *chan)
 {
-	opl4_t *opl4 = private_data;
+	struct snd_opl4 *opl4 = private_data;
 
 	snd_opl4_do_for_note(opl4, note, chan, snd_opl4_voice_off);
 }
 
-static void snd_opl4_terminate_voice(opl4_t *opl4, opl4_voice_t *voice)
+static void snd_opl4_terminate_voice(struct snd_opl4 *opl4, struct opl4_voice *voice)
 {
 	list_del(&voice->list);
 	list_add_tail(&voice->list, &opl4->off_voices);
@@ -574,16 +578,16 @@ static void snd_opl4_terminate_voice(opl4_t *opl4, opl4_voice_t *voice)
 	snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc);
 }
 
-void snd_opl4_terminate_note(void *private_data, int note, snd_midi_channel_t *chan)
+void snd_opl4_terminate_note(void *private_data, int note, struct snd_midi_channel *chan)
 {
-	opl4_t *opl4 = private_data;
+	struct snd_opl4 *opl4 = private_data;
 
 	snd_opl4_do_for_note(opl4, note, chan, snd_opl4_terminate_voice);
 }
 
-void snd_opl4_control(void *private_data, int type, snd_midi_channel_t *chan)
+void snd_opl4_control(void *private_data, int type, struct snd_midi_channel *chan)
 {
-	opl4_t *opl4 = private_data;
+	struct snd_opl4 *opl4 = private_data;
 
 	switch (type) {
 	case MIDI_CTL_MSB_MODWHEEL:
@@ -621,9 +625,9 @@ void snd_opl4_control(void *private_data, int type, snd_midi_channel_t *chan)
 }
 
 void snd_opl4_sysex(void *private_data, unsigned char *buf, int len,
-		    int parsed, snd_midi_channel_set_t *chset)
+		    int parsed, struct snd_midi_channel_set *chset)
 {
-	opl4_t *opl4 = private_data;
+	struct snd_opl4 *opl4 = private_data;
 
 	if (parsed == SNDRV_MIDI_SYSEX_GS_MASTER_VOLUME)
 		snd_opl4_do_for_all(opl4, snd_opl4_update_volume);
diff --git a/sound/drivers/opl4/yrw801.c b/sound/drivers/opl4/yrw801.c
index a51174dd3e5..6c335492d08 100644
--- a/sound/drivers/opl4/yrw801.c
+++ b/sound/drivers/opl4/yrw801.c
@@ -33,7 +33,7 @@
 
 #include "opl4_local.h"
 
-int snd_yrw801_detect(opl4_t *opl4)
+int snd_yrw801_detect(struct snd_opl4 *opl4)
 {
 	char buf[15];
 
@@ -54,7 +54,7 @@ int snd_yrw801_detect(opl4_t *opl4)
  * by this driver.
  */
 
-static const opl4_region_t regions_00[] = { /* Acoustic Grand Piano */
+static const struct opl4_region regions_00[] = { /* Acoustic Grand Piano */
 	{0x14, 0x27, {0x12c,7474,100, 0,0,0x00,0xc8,0x20,0xf2,0x13,0x08,0x0}},
 	{0x28, 0x2d, {0x12d,6816,100, 0,0,0x00,0xc8,0x20,0xf2,0x14,0x08,0x0}},
 	{0x2e, 0x33, {0x12e,5899,100, 0,0,0x00,0xc8,0x20,0xf2,0x14,0x08,0x0}},
@@ -66,7 +66,7 @@ static const opl4_region_t regions_00[] = { /* Acoustic Grand Piano */
 	{0x53, 0x58, {0x134,1444,100, 0,0,0x07,0xc8,0x20,0xf3,0x14,0x18,0x0}},
 	{0x59, 0x6d, {0x135,1915,100, 0,0,0x00,0xc8,0x20,0xf4,0x15,0x08,0x0}}
 };
-static const opl4_region_t regions_01[] = { /* Bright Acoustic Piano */
+static const struct opl4_region regions_01[] = { /* Bright Acoustic Piano */
 	{0x14, 0x2d, {0x12c,7474,100, 0,0,0x00,0xc8,0x20,0xf2,0x13,0x08,0x0}},
 	{0x2e, 0x33, {0x12d,6816,100, 0,0,0x00,0xc8,0x20,0xf2,0x14,0x08,0x0}},
 	{0x34, 0x39, {0x12e,5899,100, 0,0,0x00,0xc8,0x20,0xf2,0x14,0x08,0x0}},
@@ -78,7 +78,7 @@ static const opl4_region_t regions_01[] = { /* Bright Acoustic Piano */
 	{0x59, 0x5e, {0x134,1444,100, 0,0,0x0a,0xc8,0x20,0xf3,0x14,0x18,0x0}},
 	{0x5f, 0x6d, {0x135,1915,100, 0,0,0x00,0xc8,0x20,0xf4,0x15,0x08,0x0}}
 };
-static const opl4_region_t regions_02[] = { /* Electric Grand Piano */
+static const struct opl4_region regions_02[] = { /* Electric Grand Piano */
 	{0x14, 0x2d, {0x12c,7476,100, 1,0,0x00,0xae,0x20,0xf2,0x13,0x07,0x0}},
 	{0x2e, 0x33, {0x12d,6818,100, 1,0,0x00,0xae,0x20,0xf2,0x14,0x07,0x0}},
 	{0x34, 0x39, {0x12e,5901,100, 1,0,0x00,0xae,0x20,0xf2,0x14,0x07,0x0}},
@@ -91,7 +91,7 @@ static const opl4_region_t regions_02[] = { /* Electric Grand Piano */
 	{0x5f, 0x6d, {0x135,1917,100, 1,0,0x00,0xae,0x20,0xf4,0x15,0x07,0x0}},
 	{0x00, 0x7f, {0x06c,6375,100,-1,0,0x00,0xc2,0x28,0xf4,0x23,0x18,0x0}}
 };
-static const opl4_region_t regions_03[] = { /* Honky-Tonk Piano */
+static const struct opl4_region regions_03[] = { /* Honky-Tonk Piano */
 	{0x14, 0x27, {0x12c,7474,100, 0,0,0x00,0xb4,0x20,0xf2,0x13,0x08,0x0}},
 	{0x28, 0x2d, {0x12d,6816,100, 0,0,0x00,0xb4,0x20,0xf2,0x14,0x08,0x0}},
 	{0x2e, 0x33, {0x12e,5899,100, 0,0,0x00,0xb4,0x20,0xf2,0x14,0x08,0x0}},
@@ -113,11 +113,11 @@ static const opl4_region_t regions_03[] = { /* Honky-Tonk Piano */
 	{0x53, 0x58, {0x134,1457,100, 0,0,0x01,0xb4,0x20,0xf3,0x14,0x18,0x0}},
 	{0x59, 0x6d, {0x135,1903,100, 0,0,0x00,0xb4,0x20,0xf4,0x15,0x08,0x0}}
 };
-static const opl4_region_t regions_04[] = { /* Electric Piano 1 */
+static const struct opl4_region regions_04[] = { /* Electric Piano 1 */
 	{0x15, 0x6c, {0x00b,6570,100, 0,0,0x00,0x28,0x38,0xf0,0x00,0x0c,0x0}},
 	{0x00, 0x7f, {0x06c,6375,100, 0,2,0x00,0xb0,0x22,0xf4,0x23,0x19,0x0}}
 };
-static const opl4_region_t regions_05[] = { /* Electric Piano 2 */
+static const struct opl4_region regions_05[] = { /* Electric Piano 2 */
 	{0x14, 0x27, {0x12c,7476,100, 0,3,0x00,0xa2,0x1b,0xf2,0x13,0x08,0x0}},
 	{0x28, 0x2d, {0x12d,6818,100, 0,3,0x00,0xa2,0x1b,0xf2,0x14,0x08,0x0}},
 	{0x2e, 0x33, {0x12e,5901,100, 0,3,0x00,0xa2,0x1b,0xf2,0x14,0x08,0x0}},
@@ -139,103 +139,103 @@ static const opl4_region_t regions_05[] = { /* Electric Piano 2 */
 	{0x59, 0x5e, {0x134,1442,100, 0,0,0x0a,0xa2,0x18,0xf3,0x14,0x18,0x0}},
 	{0x5f, 0x6d, {0x135,1913,100, 0,0,0x00,0xa2,0x18,0xf4,0x15,0x08,0x0}}
 };
-static const opl4_region_t regions_06[] = { /* Harpsichord */
+static const struct opl4_region regions_06[] = { /* Harpsichord */
 	{0x15, 0x39, {0x080,5158,100, 0,0,0x00,0xb2,0x20,0xf5,0x24,0x19,0x0}},
 	{0x3a, 0x3f, {0x081,4408,100, 0,0,0x00,0xb2,0x20,0xf5,0x25,0x09,0x0}},
 	{0x40, 0x45, {0x082,3622,100, 0,0,0x00,0xb2,0x20,0xf5,0x25,0x09,0x0}},
 	{0x46, 0x4d, {0x083,2843,100, 0,0,0x00,0xb2,0x20,0xf5,0x25,0x19,0x0}},
 	{0x4e, 0x6c, {0x084,1307,100, 0,0,0x00,0xb2,0x20,0xf5,0x25,0x29,0x0}}
 };
-static const opl4_region_t regions_07[] = { /* Clavinet */
+static const struct opl4_region regions_07[] = { /* Clavinet */
 	{0x15, 0x51, {0x027,5009,100, 0,0,0x00,0xd2,0x28,0xf5,0x13,0x2b,0x0}},
 	{0x52, 0x6c, {0x028,3495,100, 0,0,0x00,0xd2,0x28,0xf5,0x13,0x3b,0x0}}
 };
-static const opl4_region_t regions_08[] = { /* Celesta */
+static const struct opl4_region regions_08[] = { /* Celesta */
 	{0x15, 0x6c, {0x02b,3267,100, 0,0,0x00,0xdc,0x20,0xf4,0x15,0x07,0x3}}
 };
-static const opl4_region_t regions_09[] = { /* Glockenspiel */
+static const struct opl4_region regions_09[] = { /* Glockenspiel */
 	{0x15, 0x78, {0x0f3, 285,100, 0,0,0x00,0xc2,0x28,0xf6,0x25,0x25,0x0}}
 };
-static const opl4_region_t regions_0a[] = { /* Music Box */
+static const struct opl4_region regions_0a[] = { /* Music Box */
 	{0x15, 0x6c, {0x0f3,3362,100, 0,0,0x00,0xb6,0x20,0xa6,0x25,0x25,0x0}},
 	{0x15, 0x6c, {0x101,4773,100, 0,0,0x00,0xaa,0x20,0xd4,0x14,0x16,0x0}}
 };
-static const opl4_region_t regions_0b[] = { /* Vibraphone */
+static const struct opl4_region regions_0b[] = { /* Vibraphone */
 	{0x15, 0x6c, {0x101,4778,100, 0,0,0x00,0xc0,0x28,0xf4,0x14,0x16,0x4}}
 };
-static const opl4_region_t regions_0c[] = { /* Marimba */
+static const struct opl4_region regions_0c[] = { /* Marimba */
 	{0x15, 0x3f, {0x0f4,4778,100, 0,0,0x00,0xc4,0x38,0xf7,0x47,0x08,0x0}},
 	{0x40, 0x4c, {0x0f5,3217,100, 0,0,0x00,0xc4,0x38,0xf7,0x47,0x08,0x0}},
 	{0x4d, 0x5a, {0x0f5,3217,100, 0,0,0x00,0xc4,0x38,0xf7,0x48,0x08,0x0}},
 	{0x5b, 0x7f, {0x0f5,3218,100, 0,0,0x00,0xc4,0x38,0xf7,0x48,0x18,0x0}}
 };
-static const opl4_region_t regions_0d[] = { /* Xylophone */
+static const struct opl4_region regions_0d[] = { /* Xylophone */
 	{0x00, 0x7f, {0x136,1729,100, 0,0,0x00,0xd2,0x38,0xf0,0x06,0x36,0x0}}
 };
-static const opl4_region_t regions_0e[] = { /* Tubular Bell */
+static const struct opl4_region regions_0e[] = { /* Tubular Bell */
 	{0x01, 0x7f, {0x0ff,3999,100, 0,1,0x00,0x90,0x21,0xf4,0xa3,0x25,0x1}}
 };
-static const opl4_region_t regions_0f[] = { /* Dulcimer */
+static const struct opl4_region regions_0f[] = { /* Dulcimer */
 	{0x00, 0x7f, {0x03f,4236,100, 0,1,0x00,0xbc,0x29,0xf5,0x16,0x07,0x0}},
 	{0x00, 0x7f, {0x040,4236,100, 0,2,0x0e,0x94,0x2a,0xf5,0x16,0x07,0x0}}
 };
-static const opl4_region_t regions_10[] = { /* Drawbar Organ */
+static const struct opl4_region regions_10[] = { /* Drawbar Organ */
 	{0x01, 0x7f, {0x08e,4394,100, 0,2,0x14,0xc2,0x3a,0xf0,0x00,0x0a,0x0}}
 };
-static const opl4_region_t regions_11[] = { /* Percussive Organ */
+static const struct opl4_region regions_11[] = { /* Percussive Organ */
 	{0x15, 0x3b, {0x08c,6062,100, 0,3,0x00,0xbe,0x3b,0xf0,0x00,0x09,0x0}},
 	{0x3c, 0x6c, {0x08d,2984,100, 0,3,0x00,0xbe,0x3b,0xf0,0x00,0x09,0x0}}
 };
-static const opl4_region_t regions_12[] = { /* Rock Organ */
+static const struct opl4_region regions_12[] = { /* Rock Organ */
 	{0x15, 0x30, {0x128,6574,100, 0,1,0x00,0xcc,0x39,0xf0,0x00,0x0a,0x0}},
 	{0x31, 0x3c, {0x129,5040,100, 0,1,0x00,0xcc,0x39,0xf0,0x00,0x0a,0x0}},
 	{0x3d, 0x48, {0x12a,3498,100, 0,1,0x00,0xcc,0x39,0xf0,0x00,0x0a,0x0}},
 	{0x49, 0x54, {0x12b,1957,100, 0,1,0x00,0xcc,0x39,0xf0,0x00,0x0a,0x0}},
 	{0x55, 0x6c, {0x127, 423,100, 0,1,0x00,0xcc,0x39,0xf0,0x00,0x0a,0x0}}
 };
-static const opl4_region_t regions_13[] = { /* Church Organ */
+static const struct opl4_region regions_13[] = { /* Church Organ */
 	{0x15, 0x29, {0x087,7466,100, 0,1,0x00,0xc4,0x11,0xf0,0x00,0x09,0x0}},
 	{0x2a, 0x30, {0x088,6456,100, 0,1,0x00,0xc4,0x11,0xf0,0x00,0x09,0x0}},
 	{0x31, 0x38, {0x089,5428,100, 0,1,0x00,0xc4,0x11,0xf0,0x00,0x09,0x0}},
 	{0x39, 0x41, {0x08a,4408,100, 0,1,0x00,0xc4,0x11,0xf0,0x00,0x09,0x0}},
 	{0x42, 0x6c, {0x08b,3406,100, 0,1,0x00,0xc4,0x11,0xf0,0x00,0x09,0x0}}
 };
-static const opl4_region_t regions_14[] = { /* Reed Organ */
+static const struct opl4_region regions_14[] = { /* Reed Organ */
 	{0x00, 0x53, {0x0ac,5570,100, 0,0,0x06,0xc0,0x38,0xf0,0x00,0x09,0x1}},
 	{0x54, 0x7f, {0x0ad,2497,100, 0,0,0x00,0xc0,0x38,0xf0,0x00,0x09,0x1}}
 };
-static const opl4_region_t regions_15[] = { /* Accordion */
+static const struct opl4_region regions_15[] = { /* Accordion */
 	{0x15, 0x4c, {0x006,4261,100, 0,2,0x00,0xa4,0x22,0x90,0x00,0x09,0x0}},
 	{0x4d, 0x6c, {0x007,1530,100, 0,2,0x00,0xa4,0x22,0x90,0x00,0x09,0x0}},
 	{0x15, 0x6c, {0x070,4391,100, 0,3,0x00,0x8a,0x23,0xa0,0x00,0x09,0x0}}
 };
-static const opl4_region_t regions_16[] = { /* Harmonica */
+static const struct opl4_region regions_16[] = { /* Harmonica */
 	{0x15, 0x6c, {0x070,4408,100, 0,0,0x00,0xae,0x30,0xa0,0x00,0x09,0x2}}
 };
-static const opl4_region_t regions_17[] = { /* Tango Accordion */
+static const struct opl4_region regions_17[] = { /* Tango Accordion */
 	{0x00, 0x53, {0x0ac,5573,100, 0,0,0x00,0xae,0x38,0xf0,0x00,0x09,0x0}},
 	{0x54, 0x7f, {0x0ad,2500,100, 0,0,0x00,0xae,0x38,0xf0,0x00,0x09,0x0}},
 	{0x15, 0x6c, {0x041,8479,100, 0,2,0x00,0x6a,0x3a,0x75,0x20,0x0a,0x0}}
 };
-static const opl4_region_t regions_18[] = { /* Nylon Guitar */
+static const struct opl4_region regions_18[] = { /* Nylon Guitar */
 	{0x15, 0x2f, {0x0b3,6964,100, 0,0,0x05,0xca,0x28,0xf5,0x34,0x09,0x0}},
 	{0x30, 0x36, {0x0b7,5567,100, 0,0,0x0c,0xca,0x28,0xf5,0x34,0x09,0x0}},
 	{0x37, 0x3c, {0x0b5,4653,100, 0,0,0x00,0xca,0x28,0xf6,0x34,0x09,0x0}},
 	{0x3d, 0x43, {0x0b4,3892,100, 0,0,0x00,0xca,0x28,0xf6,0x35,0x09,0x0}},
 	{0x44, 0x60, {0x0b6,2723,100, 0,0,0x00,0xca,0x28,0xf6,0x35,0x19,0x0}}
 };
-static const opl4_region_t regions_19[] = { /* Steel Guitar */
+static const struct opl4_region regions_19[] = { /* Steel Guitar */
 	{0x15, 0x31, {0x00c,6937,100, 0,0,0x00,0xbc,0x28,0xf0,0x04,0x19,0x0}},
 	{0x32, 0x38, {0x00d,5410,100, 0,0,0x00,0xbc,0x28,0xf0,0x05,0x09,0x0}},
 	{0x39, 0x47, {0x00e,4379,100, 0,0,0x00,0xbc,0x28,0xf5,0x94,0x09,0x0}},
 	{0x48, 0x6c, {0x00f,2843,100, 0,0,0x00,0xbc,0x28,0xf6,0x95,0x09,0x0}}
 };
-static const opl4_region_t regions_1a[] = { /* Jazz Guitar */
+static const struct opl4_region regions_1a[] = { /* Jazz Guitar */
 	{0x15, 0x31, {0x05a,6832,100, 0,0,0x00,0xca,0x28,0xf6,0x34,0x09,0x0}},
 	{0x32, 0x3f, {0x05b,4897,100, 0,0,0x00,0xca,0x28,0xf6,0x34,0x09,0x0}},
 	{0x40, 0x6c, {0x05c,3218,100, 0,0,0x00,0xca,0x28,0xf6,0x34,0x09,0x0}}
 };
-static const opl4_region_t regions_1b[] = { /* Clean Guitar */
+static const struct opl4_region regions_1b[] = { /* Clean Guitar */
 	{0x15, 0x2c, {0x061,7053,100, 0,1,0x00,0xb4,0x29,0xf5,0x54,0x0a,0x0}},
 	{0x2d, 0x31, {0x060,6434,100, 0,1,0x00,0xb4,0x29,0xf5,0x54,0x0a,0x0}},
 	{0x32, 0x38, {0x063,5764,100, 0,1,0x00,0xbe,0x29,0xf5,0x55,0x0a,0x0}},
@@ -245,14 +245,14 @@ static const opl4_region_t regions_1b[] = { /* Clean Guitar */
 	{0x4c, 0x54, {0x066,2462,100, 0,1,0x00,0xb4,0x29,0xf5,0x55,0x2a,0x0}},
 	{0x55, 0x6c, {0x067,1307,100, 0,1,0x00,0xb4,0x29,0xf6,0x56,0x0a,0x0}}
 };
-static const opl4_region_t regions_1c[] = { /* Muted Guitar */
+static const struct opl4_region regions_1c[] = { /* Muted Guitar */
 	{0x01, 0x7f, {0x068,4408,100, 0,0,0x00,0xcc,0x28,0xf6,0x15,0x09,0x0}}
 };
-static const opl4_region_t regions_1d[] = { /* Overdriven Guitar */
+static const struct opl4_region regions_1d[] = { /* Overdriven Guitar */
 	{0x00, 0x40, {0x0a5,6589,100, 0,1,0x00,0xc0,0x29,0xf2,0x11,0x09,0x0}},
 	{0x41, 0x7f, {0x0a6,5428,100, 0,1,0x00,0xc0,0x29,0xf2,0x11,0x09,0x0}}
 };
-static const opl4_region_t regions_1e[] = { /* Distortion Guitar */
+static const struct opl4_region regions_1e[] = { /* Distortion Guitar */
 	{0x15, 0x2a, {0x051,6928,100, 0,1,0x00,0xbc,0x21,0xa2,0x12,0x0a,0x0}},
 	{0x2b, 0x2e, {0x052,6433,100, 0,1,0x00,0xbc,0x21,0xa2,0x12,0x0a,0x0}},
 	{0x2f, 0x32, {0x053,5944,100, 0,1,0x00,0xbc,0x21,0xa2,0x12,0x0a,0x0}},
@@ -263,44 +263,44 @@ static const opl4_region_t regions_1e[] = { /* Distortion Guitar */
 	{0x43, 0x46, {0x058,3361,100, 0,1,0x00,0xbc,0x21,0xa2,0x12,0x0a,0x0}},
 	{0x47, 0x6c, {0x059,2784,100, 0,1,0x00,0xbc,0x21,0xa2,0x12,0x0a,0x0}}
 };
-static const opl4_region_t regions_1f[] = { /* Guitar Harmonics */
+static const struct opl4_region regions_1f[] = { /* Guitar Harmonics */
 	{0x15, 0x44, {0x05e,5499,100, 0,0,0x00,0xce,0x28,0xf4,0x24,0x09,0x0}},
 	{0x45, 0x49, {0x05d,4850,100, 0,0,0x00,0xe2,0x28,0xf4,0x24,0x09,0x0}},
 	{0x4a, 0x6c, {0x05f,4259,100, 0,0,0x00,0xce,0x28,0xf4,0x24,0x09,0x0}}
 };
-static const opl4_region_t regions_20[] = { /* Acoustic Bass */
+static const struct opl4_region regions_20[] = { /* Acoustic Bass */
 	{0x15, 0x30, {0x004,8053,100, 0,0,0x00,0xe2,0x18,0xf5,0x15,0x09,0x0}},
 	{0x31, 0x6c, {0x005,4754,100, 0,0,0x00,0xe2,0x18,0xf5,0x15,0x09,0x0}}
 };
-static const opl4_region_t regions_21[] = { /* Fingered Bass */
+static const struct opl4_region regions_21[] = { /* Fingered Bass */
 	{0x01, 0x20, {0x04a,8762,100, 0,0,0x00,0xde,0x18,0xf6,0x14,0x09,0x0}},
 	{0x21, 0x25, {0x04b,8114,100, 0,0,0x00,0xde,0x18,0xf6,0x14,0x09,0x0}},
 	{0x26, 0x2a, {0x04c,7475,100, 0,0,0x00,0xde,0x18,0xf6,0x14,0x09,0x0}},
 	{0x2b, 0x7f, {0x04d,6841,100, 0,0,0x00,0xde,0x18,0xf6,0x14,0x09,0x0}}
 };
-static const opl4_region_t regions_22[] = { /* Picked Bass */
+static const struct opl4_region regions_22[] = { /* Picked Bass */
 	{0x15, 0x23, {0x04f,7954,100, 0,0,0x00,0xcc,0x18,0xf3,0x90,0x0a,0x0}},
 	{0x24, 0x2a, {0x050,7318,100, 0,0,0x05,0xcc,0x18,0xf3,0x90,0x1a,0x0}},
 	{0x2b, 0x2f, {0x06b,6654,100, 0,0,0x00,0xcc,0x18,0xf3,0x90,0x2a,0x0}},
 	{0x30, 0x47, {0x069,6031,100, 0,0,0x00,0xcc,0x18,0xf5,0xb0,0x0a,0x0}},
 	{0x48, 0x6c, {0x06a,5393,100, 0,0,0x00,0xcc,0x18,0xf5,0xb0,0x0a,0x0}}
 };
-static const opl4_region_t regions_23[] = { /* Fretless Bass */
+static const struct opl4_region regions_23[] = { /* Fretless Bass */
 	{0x01, 0x7f, {0x04e,5297,100, 0,0,0x00,0xd2,0x10,0xf3,0x63,0x19,0x0}}
 };
-static const opl4_region_t regions_24[] = { /* Slap Bass 1 */
+static const struct opl4_region regions_24[] = { /* Slap Bass 1 */
 	{0x15, 0x6c, {0x0a3,7606,100, 0,1,0x00,0xde,0x19,0xf5,0x32,0x1a,0x0}}
 };
-static const opl4_region_t regions_25[] = { /* Slap Bass 2 */
+static const struct opl4_region regions_25[] = { /* Slap Bass 2 */
 	{0x01, 0x7f, {0x0a2,6694,100, 0,0,0x00,0xda,0x20,0xb0,0x02,0x09,0x0}}
 };
-static const opl4_region_t regions_26[] = { /* Synth Bass 1 */
+static const struct opl4_region regions_26[] = { /* Synth Bass 1 */
 	{0x15, 0x6c, {0x0be,7466,100, 0,1,0x00,0xb8,0x39,0xf4,0x14,0x09,0x0}}
 };
-static const opl4_region_t regions_27[] = { /* Synth Bass 2 */
+static const struct opl4_region regions_27[] = { /* Synth Bass 2 */
 	{0x00, 0x7f, {0x117,8103,100, 0,1,0x00,0xca,0x39,0xf3,0x50,0x08,0x0}}
 };
-static const opl4_region_t regions_28[] = { /* Violin */
+static const struct opl4_region regions_28[] = { /* Violin */
 	{0x15, 0x3a, {0x105,5158,100, 0,3,0x00,0xcc,0x3b,0xf3,0x20,0x09,0x0}},
 	{0x3b, 0x3f, {0x102,4754,100, 0,3,0x00,0xcc,0x3b,0xf3,0x20,0x09,0x0}},
 	{0x40, 0x41, {0x106,4132,100, 0,3,0x00,0xcc,0x3b,0xf3,0x20,0x09,0x0}},
@@ -312,7 +312,7 @@ static const opl4_region_t regions_28[] = { /* Violin */
 	{0x4f, 0x51, {0x10d,2166,100, 0,3,0x00,0xcc,0x3b,0xf3,0x20,0x09,0x0}},
 	{0x52, 0x6c, {0x109,1825,100, 0,3,0x00,0xcc,0x3b,0xf3,0x20,0x09,0x0}}
 };
-static const opl4_region_t regions_29[] = { /* Viola */
+static const struct opl4_region regions_29[] = { /* Viola */
 	{0x15, 0x32, {0x103,5780,100, 0,3,0x00,0xc4,0x3b,0xa3,0x20,0x09,0x0}},
 	{0x33, 0x35, {0x104,5534,100, 0,3,0x00,0xc4,0x3b,0xa3,0x20,0x09,0x0}},
 	{0x36, 0x38, {0x105,5158,100, 0,3,0x00,0xc4,0x3b,0xa3,0x20,0x09,0x0}},
@@ -326,76 +326,76 @@ static const opl4_region_t regions_29[] = { /* Viola */
 	{0x4d, 0x4f, {0x10d,2166,100, 0,3,0x00,0xd0,0x3b,0xa3,0x20,0x09,0x0}},
 	{0x50, 0x6c, {0x109,1825,100, 0,3,0x00,0xd0,0x3b,0xa3,0x20,0x09,0x0}}
 };
-static const opl4_region_t regions_2a[] = { /* Cello */
+static const struct opl4_region regions_2a[] = { /* Cello */
 	{0x15, 0x2d, {0x112,6545,100, 0,3,0x00,0xc0,0x33,0xa0,0x00,0x08,0x0}},
 	{0x2e, 0x37, {0x113,5764,100, 0,3,0x00,0xc0,0x33,0xa0,0x00,0x08,0x0}},
 	{0x38, 0x3e, {0x115,4378,100, 0,3,0x00,0xc0,0x33,0xa0,0x00,0x18,0x0}},
 	{0x3f, 0x44, {0x116,3998,100, 0,3,0x00,0xc0,0x33,0xa0,0x00,0x18,0x0}},
 	{0x45, 0x6c, {0x114,3218,100, 0,3,0x00,0xc0,0x33,0xa0,0x00,0x18,0x0}}
 };
-static const opl4_region_t regions_2b[] = { /* Contrabass */
+static const struct opl4_region regions_2b[] = { /* Contrabass */
 	{0x15, 0x29, {0x110,7713,100, 0,1,0x00,0xc2,0x19,0x90,0x00,0x09,0x0}},
 	{0x2a, 0x6c, {0x111,6162,100, 0,1,0x00,0xc2,0x19,0x90,0x00,0x09,0x0}}
 };
-static const opl4_region_t regions_2c[] = { /* Tremolo Strings */
+static const struct opl4_region regions_2c[] = { /* Tremolo Strings */
 	{0x15, 0x3b, {0x0b0,4810,100, 0,0,0x0a,0xde,0x38,0xf0,0x00,0x07,0x6}},
 	{0x3c, 0x41, {0x035,4035,100, 0,0,0x05,0xde,0x38,0xf0,0x00,0x07,0x6}},
 	{0x42, 0x47, {0x033,3129,100, 0,0,0x05,0xde,0x38,0xf0,0x00,0x07,0x6}},
 	{0x48, 0x52, {0x034,2625,100, 0,0,0x05,0xde,0x38,0xf0,0x00,0x07,0x6}},
 	{0x53, 0x6c, {0x0af, 936,100, 0,0,0x00,0xde,0x38,0xf0,0x00,0x07,0x6}}
 };
-static const opl4_region_t regions_2d[] = { /* Pizzicato Strings */
+static const struct opl4_region regions_2d[] = { /* Pizzicato Strings */
 	{0x15, 0x32, {0x0b8,6186,100, 0,0,0x00,0xbc,0x28,0xf0,0x00,0x05,0x0}},
 	{0x33, 0x3b, {0x0b9,5031,100, 0,0,0x00,0xbc,0x28,0xf0,0x00,0x05,0x0}},
 	{0x3c, 0x42, {0x0bb,4146,100, 0,0,0x00,0xbc,0x28,0xf0,0x00,0x05,0x0}},
 	{0x43, 0x48, {0x0ba,3245,100, 0,0,0x00,0xc2,0x28,0xf0,0x00,0x05,0x0}},
 	{0x49, 0x6c, {0x0bc,2352,100, 0,0,0x00,0xbc,0x28,0xf0,0x00,0x05,0x0}}
 };
-static const opl4_region_t regions_2e[] = { /* Harp */
+static const struct opl4_region regions_2e[] = { /* Harp */
 	{0x15, 0x46, {0x07e,3740,100, 0,1,0x00,0xd2,0x29,0xf5,0x25,0x07,0x0}},
 	{0x47, 0x6c, {0x07f,2319,100, 0,1,0x00,0xd2,0x29,0xf5,0x25,0x07,0x0}}
 };
-static const opl4_region_t regions_2f[] = { /* Timpani */
+static const struct opl4_region regions_2f[] = { /* Timpani */
 	{0x15, 0x6c, {0x100,6570,100, 0,0,0x00,0xf8,0x28,0xf0,0x05,0x16,0x0}}
 };
-static const opl4_region_t regions_30[] = { /* Strings */
+static const struct opl4_region regions_30[] = { /* Strings */
 	{0x15, 0x3b, {0x13c,4806,100, 0,0,0x00,0xc8,0x20,0x80,0x00,0x07,0x0}},
 	{0x3c, 0x41, {0x13e,4035,100, 0,0,0x00,0xc8,0x20,0x80,0x00,0x07,0x0}},
 	{0x42, 0x47, {0x13d,3122,100, 0,0,0x00,0xc8,0x20,0x80,0x00,0x07,0x0}},
 	{0x48, 0x52, {0x13f,2629,100, 0,0,0x00,0xbe,0x20,0x80,0x00,0x07,0x0}},
 	{0x53, 0x6c, {0x140, 950,100, 0,0,0x00,0xbe,0x20,0x80,0x00,0x07,0x0}}
 };
-static const opl4_region_t regions_31[] = { /* Slow Strings */
+static const struct opl4_region regions_31[] = { /* Slow Strings */
 	{0x15, 0x3b, {0x0b0,4810,100, 0,1,0x0a,0xbe,0x19,0xf0,0x00,0x07,0x0}},
 	{0x3c, 0x41, {0x035,4035,100, 0,1,0x05,0xbe,0x19,0xf0,0x00,0x07,0x0}},
 	{0x42, 0x47, {0x033,3129,100, 0,1,0x05,0xbe,0x19,0xf0,0x00,0x07,0x0}},
 	{0x48, 0x52, {0x034,2625,100, 0,1,0x05,0xbe,0x19,0xf0,0x00,0x07,0x0}},
 	{0x53, 0x6c, {0x0af, 936,100, 0,1,0x00,0xbe,0x19,0xf0,0x00,0x07,0x0}}
 };
-static const opl4_region_t regions_32[] = { /* Synth Strings 1 */
+static const struct opl4_region regions_32[] = { /* Synth Strings 1 */
 	{0x05, 0x71, {0x002,6045,100,-2,0,0x00,0xa6,0x20,0x93,0x22,0x06,0x0}},
 	{0x15, 0x6c, {0x0ae,3261,100, 2,0,0x00,0xc6,0x20,0x70,0x01,0x06,0x0}}
 };
-static const opl4_region_t regions_33[] = { /* Synth Strings 2 */
+static const struct opl4_region regions_33[] = { /* Synth Strings 2 */
 	{0x15, 0x6c, {0x002,4513,100, 5,1,0x00,0xb4,0x19,0x70,0x00,0x06,0x0}},
 	{0x15, 0x6c, {0x002,4501,100,-5,1,0x00,0xb4,0x19,0x70,0x00,0x06,0x0}}
 };
-static const opl4_region_t regions_34[] = { /* Choir Aahs */
+static const struct opl4_region regions_34[] = { /* Choir Aahs */
 	{0x15, 0x3a, {0x018,5010,100, 0,2,0x00,0xc2,0x1a,0x70,0x00,0x08,0x0}},
 	{0x3b, 0x40, {0x019,4370,100, 0,2,0x00,0xc2,0x1a,0x70,0x00,0x08,0x0}},
 	{0x41, 0x47, {0x01a,3478,100, 0,2,0x00,0xc2,0x1a,0x70,0x00,0x08,0x0}},
 	{0x48, 0x6c, {0x01b,2197,100, 0,2,0x00,0xc2,0x1a,0x70,0x00,0x08,0x0}}
 };
-static const opl4_region_t regions_35[] = { /* Voice Oohs */
+static const struct opl4_region regions_35[] = { /* Voice Oohs */
 	{0x15, 0x6c, {0x029,3596,100, 0,0,0x00,0xe6,0x20,0xf7,0x20,0x08,0x0}}
 };
-static const opl4_region_t regions_36[] = { /* Synth Voice */
+static const struct opl4_region regions_36[] = { /* Synth Voice */
 	{0x15, 0x6c, {0x02a,3482,100, 0,1,0x00,0xc2,0x19,0x85,0x21,0x07,0x0}}
 };
-static const opl4_region_t regions_37[] = { /* Orchestra Hit */
+static const struct opl4_region regions_37[] = { /* Orchestra Hit */
 	{0x15, 0x6c, {0x049,4394,100, 0,0,0x00,0xfe,0x30,0x80,0x05,0x05,0x0}}
 };
-static const opl4_region_t regions_38[] = { /* Trumpet */
+static const struct opl4_region regions_38[] = { /* Trumpet */
 	{0x15, 0x3c, {0x0f6,4706,100, 0,2,0x00,0xd6,0x32,0xf3,0x20,0x0a,0x0}},
 	{0x3d, 0x43, {0x0f8,3894,100, 0,2,0x00,0xd6,0x32,0xf3,0x20,0x0a,0x0}},
 	{0x44, 0x48, {0x0f7,3118,100, 0,2,0x00,0xd6,0x32,0xf3,0x20,0x0a,0x0}},
@@ -403,28 +403,28 @@ static const opl4_region_t regions_38[] = { /* Trumpet */
 	{0x4f, 0x55, {0x0f9,1634,100, 0,2,0x00,0xd6,0x32,0xf3,0x20,0x0a,0x0}},
 	{0x56, 0x6c, {0x0fb, 786,100, 0,2,0x00,0xd6,0x32,0xf3,0x20,0x0a,0x0}}
 };
-static const opl4_region_t regions_39[] = { /* Trombone */
+static const struct opl4_region regions_39[] = { /* Trombone */
 	{0x15, 0x3a, {0x0f0,5053,100, 0,1,0x00,0xd6,0x21,0xf0,0x00,0x09,0x0}},
 	{0x3b, 0x3f, {0x0f1,4290,100, 0,1,0x00,0xd6,0x21,0xf0,0x00,0x09,0x0}},
 	{0x40, 0x6c, {0x0f2,3580,100, 0,1,0x00,0xd6,0x21,0xf0,0x00,0x09,0x0}}
 };
-static const opl4_region_t regions_3a[] = { /* Tuba */
+static const struct opl4_region regions_3a[] = { /* Tuba */
 	{0x15, 0x2d, {0x085,7096,100, 0,1,0x00,0xde,0x21,0xf5,0x10,0x09,0x0}},
 	{0x2e, 0x6c, {0x086,6014,100, 0,1,0x00,0xde,0x21,0xf5,0x10,0x09,0x0}}
 };
-static const opl4_region_t regions_3b[] = { /* Muted Trumpet */
+static const struct opl4_region regions_3b[] = { /* Muted Trumpet */
 	{0x15, 0x45, {0x0b1,4135,100, 0,0,0x00,0xcc,0x28,0xf3,0x10,0x0a,0x1}},
 	{0x46, 0x6c, {0x0b2,2599,100, 0,0,0x00,0xcc,0x28,0x83,0x10,0x0a,0x1}}
 };
-static const opl4_region_t regions_3c[] = { /* French Horns */
+static const struct opl4_region regions_3c[] = { /* French Horns */
 	{0x15, 0x49, {0x07c,3624,100, 0,2,0x00,0xd0,0x1a,0xf0,0x00,0x09,0x0}},
 	{0x4a, 0x6c, {0x07d,2664,100, 0,2,0x00,0xd0,0x1a,0xf0,0x00,0x09,0x0}}
 };
-static const opl4_region_t regions_3d[] = { /* Brass Section */
+static const struct opl4_region regions_3d[] = { /* Brass Section */
 	{0x15, 0x42, {0x0fc,4375,100, 0,0,0x00,0xd6,0x28,0xf0,0x00,0x0a,0x0}},
 	{0x43, 0x6c, {0x0fd,2854,100, 0,0,0x00,0xd6,0x28,0xf0,0x00,0x0a,0x0}}
 };
-static const opl4_region_t regions_3e[] = { /* Synth Brass 1 */
+static const struct opl4_region regions_3e[] = { /* Synth Brass 1 */
 	{0x01, 0x27, {0x0d3,9094,100,-1,0,0x00,0xbe,0x18,0xa5,0x11,0x08,0x0}},
 	{0x28, 0x2d, {0x0da,8335,100,-1,0,0x00,0xbe,0x18,0xa5,0x11,0x08,0x0}},
 	{0x2e, 0x33, {0x0d4,7558,100,-1,0,0x00,0xbe,0x18,0xa5,0x11,0x08,0x0}},
@@ -450,7 +450,7 @@ static const opl4_region_t regions_3e[] = { /* Synth Brass 1 */
 	{0x5e, 0x64, {0x122,1421,100, 1,1,0x00,0xbe,0x19,0x85,0x23,0x08,0x0}},
 	{0x65, 0x7f, {0x123,-115,100, 1,1,0x00,0xbe,0x19,0x85,0x23,0x08,0x0}}
 };
-static const opl4_region_t regions_3f[] = { /* Synth Brass 2 */
+static const struct opl4_region regions_3f[] = { /* Synth Brass 2 */
 	{0x01, 0x27, {0x118,9113,100, 3,6,0x00,0xae,0x26,0x85,0x23,0x08,0x0}},
 	{0x28, 0x2d, {0x119,8350,100, 3,6,0x00,0xae,0x26,0x85,0x23,0x08,0x0}},
 	{0x2e, 0x33, {0x11a,7575,100, 3,6,0x00,0xae,0x26,0x85,0x23,0x08,0x0}},
@@ -465,7 +465,7 @@ static const opl4_region_t regions_3f[] = { /* Synth Brass 2 */
 	{0x65, 0x7f, {0x123,-105,100, 3,6,0x00,0xae,0x26,0x85,0x23,0x08,0x0}},
 	{0x00, 0x7f, {0x124,4034,100,-3,2,0x00,0xea,0x22,0x85,0x23,0x08,0x0}}
 };
-static const opl4_region_t regions_40[] = { /* Soprano Sax */
+static const struct opl4_region regions_40[] = { /* Soprano Sax */
 	{0x15, 0x3f, {0x0e3,4228,100, 0,1,0x00,0xc8,0x21,0xf5,0x20,0x0a,0x0}},
 	{0x40, 0x45, {0x0e4,3495,100, 0,1,0x00,0xc8,0x21,0xf5,0x20,0x0a,0x0}},
 	{0x46, 0x4b, {0x0e5,2660,100, 0,1,0x00,0xd6,0x21,0xf5,0x20,0x0a,0x0}},
@@ -473,7 +473,7 @@ static const opl4_region_t regions_40[] = { /* Soprano Sax */
 	{0x52, 0x59, {0x0e7,1186,100, 0,1,0x00,0xd6,0x21,0xf5,0x20,0x0a,0x0}},
 	{0x59, 0x6c, {0x0e8,1730,100, 0,1,0x00,0xc8,0x21,0xf5,0x20,0x0a,0x0}}
 };
-static const opl4_region_t regions_41[] = { /* Alto Sax */
+static const struct opl4_region regions_41[] = { /* Alto Sax */
 	{0x15, 0x32, {0x092,6204,100, 0,1,0x00,0xbe,0x19,0xf5,0x20,0x0b,0x0}},
 	{0x33, 0x35, {0x096,5812,100, 0,1,0x00,0xbe,0x19,0xf5,0x20,0x0b,0x0}},
 	{0x36, 0x3a, {0x099,5318,100, 0,1,0x00,0xbe,0x19,0xf5,0x20,0x0b,0x0}},
@@ -488,7 +488,7 @@ static const opl4_region_t regions_41[] = { /* Alto Sax */
 	{0x51, 0x53, {0x091,2088,100, 0,1,0x00,0xbe,0x19,0xf5,0x20,0x0b,0x0}},
 	{0x54, 0x6c, {0x095,1732,100, 0,1,0x00,0xbe,0x19,0xf5,0x20,0x0b,0x0}}
 };
-static const opl4_region_t regions_42[] = { /* Tenor Sax */
+static const struct opl4_region regions_42[] = { /* Tenor Sax */
 	{0x24, 0x30, {0x0e9,6301,100, 0,1,0x00,0xbc,0x19,0xf4,0x10,0x0b,0x0}},
 	{0x31, 0x34, {0x0ea,5781,100, 0,1,0x00,0xbc,0x19,0xf4,0x10,0x0b,0x0}},
 	{0x35, 0x3a, {0x0eb,5053,100, 0,1,0x00,0xbc,0x19,0xf4,0x10,0x0b,0x0}},
@@ -497,13 +497,13 @@ static const opl4_region_t regions_42[] = { /* Tenor Sax */
 	{0x48, 0x51, {0x0ee,2462,100, 0,1,0x00,0xbc,0x19,0xf4,0x10,0x0b,0x0}},
 	{0x52, 0x6c, {0x0ef,1421,100, 0,1,0x00,0xbc,0x19,0xf4,0x10,0x0b,0x0}}
 };
-static const opl4_region_t regions_43[] = { /* Baritone Sax */
+static const struct opl4_region regions_43[] = { /* Baritone Sax */
 	{0x15, 0x2d, {0x0df,6714,100, 0,1,0x00,0xce,0x19,0xf0,0x00,0x0a,0x0}},
 	{0x2e, 0x34, {0x0e1,5552,100, 0,1,0x00,0xce,0x19,0xf0,0x00,0x0a,0x0}},
 	{0x35, 0x39, {0x0e2,5178,100, 0,1,0x00,0xce,0x19,0xf0,0x00,0x0a,0x0}},
 	{0x3a, 0x6c, {0x0e0,4437,100, 0,1,0x00,0xce,0x19,0xf0,0x00,0x0a,0x0}}
 };
-static const opl4_region_t regions_44[] = { /* Oboe */
+static const struct opl4_region regions_44[] = { /* Oboe */
 	{0x15, 0x3c, {0x042,4493,100, 0,1,0x00,0xe6,0x39,0xf4,0x10,0x0a,0x0}},
 	{0x3d, 0x43, {0x044,3702,100, 0,1,0x00,0xdc,0x39,0xf4,0x10,0x0a,0x0}},
 	{0x44, 0x49, {0x043,2956,100, 0,1,0x00,0xdc,0x39,0xf4,0x10,0x0a,0x0}},
@@ -511,55 +511,55 @@ static const opl4_region_t regions_44[] = { /* Oboe */
 	{0x50, 0x55, {0x045,1420,100, 0,1,0x00,0xdc,0x39,0xf4,0x10,0x0a,0x0}},
 	{0x56, 0x6c, {0x047, 630,100, 0,1,0x00,0xe6,0x39,0xf4,0x10,0x0a,0x0}}
 };
-static const opl4_region_t regions_45[] = { /* English Horn */
+static const struct opl4_region regions_45[] = { /* English Horn */
 	{0x15, 0x38, {0x03c,5098,100, 0,1,0x00,0xc4,0x31,0xf0,0x00,0x09,0x0}},
 	{0x39, 0x3e, {0x03b,4291,100, 0,1,0x00,0xc4,0x31,0xf0,0x00,0x09,0x0}},
 	{0x3f, 0x6c, {0x03d,3540,100, 0,1,0x00,0xc4,0x31,0xf0,0x00,0x09,0x0}}
 };
-static const opl4_region_t regions_46[] = { /* Bassoon */
+static const struct opl4_region regions_46[] = { /* Bassoon */
 	{0x15, 0x22, {0x038,7833,100, 0,1,0x00,0xc6,0x31,0xf0,0x00,0x0b,0x0}},
 	{0x23, 0x2e, {0x03a,7070,100, 0,1,0x00,0xc6,0x31,0xf0,0x00,0x0b,0x0}},
 	{0x2f, 0x6c, {0x039,6302,100, 0,1,0x00,0xc6,0x31,0xf0,0x00,0x0b,0x0}}
 };
-static const opl4_region_t regions_47[] = { /* Clarinet */
+static const struct opl4_region regions_47[] = { /* Clarinet */
 	{0x15, 0x3b, {0x09e,5900,100, 0,1,0x00,0xc8,0x29,0xf3,0x20,0x0a,0x0}},
 	{0x3c, 0x41, {0x0a0,5158,100, 0,1,0x00,0xc8,0x29,0xf3,0x20,0x0a,0x0}},
 	{0x42, 0x4a, {0x09f,4260,100, 0,1,0x00,0xc8,0x29,0xf3,0x20,0x0a,0x0}},
 	{0x4b, 0x6c, {0x0a1,2957,100, 0,1,0x00,0xc8,0x29,0xf3,0x20,0x0a,0x0}}
 };
-static const opl4_region_t regions_48[] = { /* Piccolo */
+static const struct opl4_region regions_48[] = { /* Piccolo */
 	{0x15, 0x40, {0x071,4803,100, 0,0,0x00,0xe6,0x38,0xf0,0x00,0x0a,0x2}},
 	{0x41, 0x4d, {0x072,3314,100, 0,0,0x00,0xe6,0x38,0xf0,0x00,0x0a,0x2}},
 	{0x4e, 0x53, {0x073,1731,100, 0,0,0x00,0xe6,0x38,0xf0,0x00,0x0a,0x2}},
 	{0x54, 0x5f, {0x074,2085,100, 0,0,0x00,0xe6,0x38,0xf0,0x00,0x0a,0x2}},
 	{0x60, 0x6c, {0x075,1421,100, 0,0,0x00,0xe6,0x38,0xf0,0x00,0x0a,0x2}}
 };
-static const opl4_region_t regions_49[] = { /* Flute */
+static const struct opl4_region regions_49[] = { /* Flute */
 	{0x15, 0x40, {0x071,4803,100, 0,0,0x00,0xdc,0x38,0xf0,0x00,0x0a,0x2}},
 	{0x41, 0x4d, {0x072,3314,100, 0,0,0x00,0xdc,0x38,0xf0,0x00,0x0a,0x2}},
 	{0x4e, 0x6c, {0x073,1731,100, 0,0,0x00,0xe6,0x38,0xf0,0x00,0x0a,0x2}}
 };
-static const opl4_region_t regions_4a[] = { /* Recorder */
+static const struct opl4_region regions_4a[] = { /* Recorder */
 	{0x15, 0x6f, {0x0bd,4897,100, 0,0,0x00,0xec,0x30,0x70,0x00,0x09,0x1}}
 };
-static const opl4_region_t regions_4b[] = { /* Pan Flute */
+static const struct opl4_region regions_4b[] = { /* Pan Flute */
 	{0x15, 0x6c, {0x077,2359,100, 0,0,0x00,0xde,0x38,0xf0,0x00,0x09,0x3}}
 };
-static const opl4_region_t regions_4c[] = { /* Bottle Blow */
+static const struct opl4_region regions_4c[] = { /* Bottle Blow */
 	{0x15, 0x6c, {0x077,2359,100, 0,0,0x00,0xc8,0x38,0xf0,0x00,0x09,0x1}},
 	{0x01, 0x7f, {0x125,7372,100, 0,0,0x1e,0x80,0x00,0xf0,0x00,0x09,0x0}}
 };
-static const opl4_region_t regions_4d[] = { /* Shakuhachi */
+static const struct opl4_region regions_4d[] = { /* Shakuhachi */
 	{0x00, 0x7f, {0x0ab,4548,100, 0,0,0x00,0xd6,0x30,0xf0,0x00,0x0a,0x3}},
 	{0x15, 0x6c, {0x076,3716,100, 0,0,0x00,0xa2,0x28,0x70,0x00,0x09,0x2}}
 };
-static const opl4_region_t regions_4e[] = { /* Whistle */
+static const struct opl4_region regions_4e[] = { /* Whistle */
 	{0x00, 0x7f, {0x0aa,1731,100, 0,4,0x00,0xd2,0x2c,0x70,0x00,0x0a,0x0}}
 };
-static const opl4_region_t regions_4f[] = { /* Ocarina */
+static const struct opl4_region regions_4f[] = { /* Ocarina */
 	{0x00, 0x7f, {0x0aa,1731,100, 0,1,0x00,0xce,0x29,0x90,0x00,0x0a,0x1}}
 };
-static const opl4_region_t regions_50[] = { /* Square Lead */
+static const struct opl4_region regions_50[] = { /* Square Lead */
 	{0x01, 0x2a, {0x0cc,9853,100, 3,0,0x00,0xac,0x38,0xc6,0x21,0x09,0x0}},
 	{0x2b, 0x36, {0x0cd,6785,100, 3,0,0x00,0xac,0x38,0xc6,0x21,0x09,0x0}},
 	{0x37, 0x42, {0x0ca,5248,100, 3,0,0x00,0xac,0x38,0xc6,0x21,0x09,0x0}},
@@ -573,7 +573,7 @@ static const opl4_region_t regions_50[] = { /* Square Lead */
 	{0x4f, 0x5a, {0x0ce,2167,100,-3,0,0x00,0xac,0x08,0xc6,0x21,0x09,0x0}},
 	{0x5b, 0x7f, {0x0cb, 631,100,-3,0,0x00,0xac,0x08,0xc6,0x21,0x09,0x0}}
 };
-static const opl4_region_t regions_51[] = { /* Sawtooth Lead */
+static const struct opl4_region regions_51[] = { /* Sawtooth Lead */
 	{0x01, 0x27, {0x118,9108,100, 0,0,0x00,0xc8,0x30,0xf2,0x22,0x0a,0x0}},
 	{0x28, 0x2d, {0x119,8345,100, 0,0,0x00,0xc8,0x30,0xf2,0x22,0x0a,0x0}},
 	{0x2e, 0x33, {0x11a,7570,100, 0,0,0x00,0xc8,0x30,0xf2,0x22,0x0a,0x0}},
@@ -599,15 +599,15 @@ static const opl4_region_t regions_51[] = { /* Sawtooth Lead */
 	{0x5e, 0x66, {0x122,1416,100, 0,0,0x00,0xc8,0x30,0xf2,0x22,0x0a,0x0}},
 	{0x67, 0x7f, {0x123,-120,100, 0,0,0x00,0xc8,0x30,0xf2,0x22,0x0a,0x0}}
 };
-static const opl4_region_t regions_52[] = { /* Calliope Lead */
+static const struct opl4_region regions_52[] = { /* Calliope Lead */
 	{0x00, 0x7f, {0x0aa,1731,100, 0,0,0x00,0xc2,0x28,0x90,0x00,0x0a,0x2}},
 	{0x15, 0x6c, {0x076,3716,100, 0,0,0x00,0xb6,0x28,0xb0,0x00,0x09,0x2}}
 };
-static const opl4_region_t regions_53[] = { /* Chiffer Lead */
+static const struct opl4_region regions_53[] = { /* Chiffer Lead */
 	{0x00, 0x7f, {0x13a,3665,100, 0,2,0x00,0xcc,0x2a,0xf0,0x10,0x09,0x1}},
 	{0x01, 0x7f, {0x0fe,3660,100, 0,0,0x00,0xbe,0x28,0xf3,0x10,0x17,0x0}}
 };
-static const opl4_region_t regions_54[] = { /* Charang Lead */
+static const struct opl4_region regions_54[] = { /* Charang Lead */
 	{0x00, 0x40, {0x0a5,6594,100, 0,3,0x00,0xba,0x33,0xf2,0x11,0x09,0x0}},
 	{0x41, 0x7f, {0x0a6,5433,100, 0,3,0x00,0xba,0x33,0xf2,0x11,0x09,0x0}},
 	{0x01, 0x27, {0x118,9098,100, 0,2,0x00,0xa4,0x2a,0xf2,0x22,0x0e,0x0}},
@@ -623,11 +623,11 @@ static const opl4_region_t regions_54[] = { /* Charang Lead */
 	{0x5e, 0x66, {0x122,1416,100, 0,2,0x00,0xa4,0x2a,0xf2,0x22,0x0e,0x0}},
 	{0x67, 0x7f, {0x123,-120,100, 0,2,0x00,0xa4,0x2a,0xf2,0x22,0x0e,0x0}}
 };
-static const opl4_region_t regions_55[] = { /* Voice Lead */
+static const struct opl4_region regions_55[] = { /* Voice Lead */
 	{0x00, 0x7f, {0x0aa,1739,100, 0,6,0x00,0x8c,0x2e,0x90,0x00,0x0a,0x0}},
 	{0x15, 0x6c, {0x02a,3474,100, 0,1,0x00,0xd8,0x29,0xf0,0x05,0x0a,0x0}}
 };
-static const opl4_region_t regions_56[] = { /* 5ths Lead */
+static const struct opl4_region regions_56[] = { /* 5ths Lead */
 	{0x01, 0x27, {0x118,8468,100, 0,2,0x00,0xd0,0x32,0xf5,0x20,0x08,0x0}},
 	{0x28, 0x2d, {0x119,7705,100, 0,2,0x00,0xd0,0x32,0xf5,0x20,0x08,0x0}},
 	{0x2e, 0x33, {0x11a,6930,100, 0,2,0x00,0xd0,0x32,0xf5,0x20,0x08,0x0}},
@@ -642,7 +642,7 @@ static const opl4_region_t regions_56[] = { /* 5ths Lead */
 	{0x65, 0x7f, {0x123,-750,100, 0,2,0x00,0xd0,0x32,0xf5,0x20,0x08,0x0}},
 	{0x05, 0x71, {0x002,4503,100, 0,1,0x00,0xb8,0x31,0xb3,0x20,0x0b,0x0}}
 };
-static const opl4_region_t regions_57[] = { /* Bass & Lead */
+static const struct opl4_region regions_57[] = { /* Bass & Lead */
 	{0x00, 0x7f, {0x117,8109,100, 0,1,0x00,0xbc,0x29,0xf3,0x50,0x08,0x0}},
 	{0x01, 0x27, {0x118,9097,100, 0,2,0x00,0xbc,0x2a,0xf2,0x20,0x0a,0x0}},
 	{0x28, 0x2d, {0x119,8334,100, 0,2,0x00,0xbc,0x2a,0xf2,0x20,0x0a,0x0}},
@@ -657,15 +657,15 @@ static const opl4_region_t regions_57[] = { /* Bass & Lead */
 	{0x5e, 0x66, {0x122,1415,100, 0,2,0x00,0xbc,0x2a,0xf2,0x20,0x0a,0x0}},
 	{0x67, 0x7f, {0x123,-121,100, 0,2,0x00,0xbc,0x2a,0xf2,0x20,0x0a,0x0}}
 };
-static const opl4_region_t regions_58[] = { /* New Age Pad */
+static const struct opl4_region regions_58[] = { /* New Age Pad */
 	{0x15, 0x6c, {0x002,4501,100, 0,4,0x00,0xa4,0x24,0x80,0x01,0x05,0x0}},
 	{0x15, 0x6c, {0x0f3,4253,100, 0,3,0x00,0x8c,0x23,0xa2,0x14,0x06,0x1}}
 };
-static const opl4_region_t regions_59[] = { /* Warm Pad */
+static const struct opl4_region regions_59[] = { /* Warm Pad */
 	{0x15, 0x6c, {0x04e,5306,100, 2,2,0x00,0x92,0x2a,0x34,0x23,0x05,0x2}},
 	{0x15, 0x6c, {0x029,3575,100,-2,2,0x00,0xbe,0x22,0x31,0x23,0x06,0x0}}
 };
-static const opl4_region_t regions_5a[] = { /* Polysynth Pad */
+static const struct opl4_region regions_5a[] = { /* Polysynth Pad */
 	{0x01, 0x27, {0x118,9111,100, 0,3,0x00,0xae,0x23,0xf2,0x20,0x07,0x1}},
 	{0x28, 0x2d, {0x119,8348,100, 0,3,0x00,0xae,0x23,0xf2,0x20,0x07,0x1}},
 	{0x2e, 0x33, {0x11a,7573,100, 0,3,0x00,0xae,0x23,0xf2,0x20,0x07,0x1}},
@@ -680,29 +680,29 @@ static const opl4_region_t regions_5a[] = { /* Polysynth Pad */
 	{0x67, 0x7f, {0x123,-107,100, 0,3,0x00,0xae,0x23,0xf2,0x20,0x07,0x1}},
 	{0x00, 0x7f, {0x124,4024,100, 0,2,0x00,0xae,0x22,0xe5,0x20,0x08,0x0}}
 };
-static const opl4_region_t regions_5b[] = { /* Choir Pad */
+static const struct opl4_region regions_5b[] = { /* Choir Pad */
 	{0x15, 0x3a, {0x018,5010,100, 0,5,0x00,0xb0,0x25,0x70,0x00,0x06,0x0}},
 	{0x3b, 0x40, {0x019,4370,100, 0,5,0x00,0xb0,0x25,0x70,0x00,0x06,0x0}},
 	{0x41, 0x47, {0x01a,3478,100, 0,5,0x00,0xb0,0x25,0x70,0x00,0x06,0x0}},
 	{0x48, 0x6c, {0x01b,2197,100, 0,5,0x00,0xb0,0x25,0x70,0x00,0x06,0x0}},
 	{0x15, 0x6c, {0x02a,3482,100, 0,4,0x00,0x98,0x24,0x65,0x21,0x06,0x0}}
 };
-static const opl4_region_t regions_5c[] = { /* Bowed Pad */
+static const struct opl4_region regions_5c[] = { /* Bowed Pad */
 	{0x15, 0x6c, {0x101,4790,100,-1,1,0x00,0xbe,0x19,0x44,0x14,0x16,0x0}},
 	{0x00, 0x7f, {0x0aa,1720,100, 1,1,0x00,0x94,0x19,0x40,0x00,0x06,0x0}}
 };
-static const opl4_region_t regions_5d[] = { /* Metallic Pad */
+static const struct opl4_region regions_5d[] = { /* Metallic Pad */
 	{0x15, 0x31, {0x00c,6943,100, 0,2,0x00,0xa0,0x0a,0x60,0x03,0x06,0x0}},
 	{0x32, 0x38, {0x00d,5416,100, 0,2,0x00,0xa0,0x0a,0x60,0x03,0x06,0x0}},
 	{0x39, 0x47, {0x00e,4385,100, 0,2,0x00,0xa0,0x0a,0x60,0x03,0x06,0x0}},
 	{0x48, 0x6c, {0x00f,2849,100, 0,2,0x00,0xa0,0x0a,0x60,0x03,0x06,0x0}},
 	{0x00, 0x7f, {0x03f,4224,100, 0,1,0x00,0x9c,0x31,0x65,0x16,0x07,0x0}}
 };
-static const opl4_region_t regions_5e[] = { /* Halo Pad */
+static const struct opl4_region regions_5e[] = { /* Halo Pad */
 	{0x00, 0x7f, {0x124,4038,100, 0,2,0x00,0xa6,0x1a,0x85,0x23,0x08,0x0}},
 	{0x15, 0x6c, {0x02a,3471,100, 0,3,0x00,0xc0,0x1b,0xc0,0x05,0x06,0x0}}
 };
-static const opl4_region_t regions_5f[] = { /* Sweep Pad */
+static const struct opl4_region regions_5f[] = { /* Sweep Pad */
 	{0x01, 0x27, {0x0d3,9100,100, 0,1,0x00,0xce,0x19,0x13,0x11,0x06,0x0}},
 	{0x28, 0x2d, {0x0da,8341,100, 0,1,0x00,0xce,0x19,0x13,0x11,0x06,0x0}},
 	{0x2e, 0x33, {0x0d4,7564,100, 0,1,0x00,0xce,0x19,0x13,0x11,0x06,0x0}},
@@ -728,21 +728,21 @@ static const opl4_region_t regions_5f[] = { /* Sweep Pad */
 	{0x5e, 0x63, {0x0d8,1415,100, 0,0,0x00,0xce,0x18,0x13,0x11,0x06,0x0}},
 	{0x64, 0x7f, {0x0d9,-121,100, 0,0,0x00,0xce,0x18,0x13,0x11,0x06,0x0}}
 };
-static const opl4_region_t regions_60[] = { /* Ice Rain */
+static const struct opl4_region regions_60[] = { /* Ice Rain */
 	{0x01, 0x7f, {0x04e,9345,100, 0,2,0x00,0xcc,0x22,0xa3,0x63,0x17,0x0}},
 	{0x00, 0x7f, {0x143,5586, 20, 0,2,0x00,0x6e,0x2a,0xf0,0x05,0x05,0x0}}
 };
-static const opl4_region_t regions_61[] = { /* Soundtrack */
+static const struct opl4_region regions_61[] = { /* Soundtrack */
 	{0x15, 0x6c, {0x002,4501,100, 0,2,0x00,0xb6,0x2a,0x60,0x01,0x05,0x0}},
 	{0x15, 0x6c, {0x0f3,1160,100, 0,5,0x00,0xa8,0x2d,0x52,0x14,0x06,0x2}}
 };
-static const opl4_region_t regions_62[] = { /* Crystal */
+static const struct opl4_region regions_62[] = { /* Crystal */
 	{0x15, 0x6c, {0x0f3,1826,100, 0,3,0x00,0xb8,0x33,0xf6,0x25,0x25,0x0}},
 	{0x15, 0x2c, {0x06d,7454,100, 0,3,0x00,0xac,0x3b,0x85,0x24,0x06,0x0}},
 	{0x2d, 0x36, {0x06e,5925,100, 0,3,0x00,0xac,0x3b,0x85,0x24,0x06,0x0}},
 	{0x37, 0x6c, {0x06f,4403,100, 0,3,0x09,0xac,0x3b,0x85,0x24,0x06,0x0}}
 };
-static const opl4_region_t regions_63[] = { /* Atmosphere */
+static const struct opl4_region regions_63[] = { /* Atmosphere */
 	{0x05, 0x71, {0x002,4509,100, 0,2,0x00,0xc8,0x32,0x73,0x22,0x06,0x1}},
 	{0x15, 0x2f, {0x0b3,6964,100, 0,2,0x05,0xc2,0x32,0xf5,0x34,0x07,0x2}},
 	{0x30, 0x36, {0x0b7,5567,100, 0,2,0x0c,0xc2,0x32,0xf5,0x34,0x07,0x2}},
@@ -750,29 +750,29 @@ static const opl4_region_t regions_63[] = { /* Atmosphere */
 	{0x3d, 0x43, {0x0b4,3892,100, 0,2,0x00,0xc2,0x32,0xf6,0x35,0x07,0x2}},
 	{0x44, 0x60, {0x0b6,2723,100, 0,2,0x00,0xc2,0x32,0xf6,0x35,0x17,0x2}}
 };
-static const opl4_region_t regions_64[] = { /* Brightness */
+static const struct opl4_region regions_64[] = { /* Brightness */
 	{0x00, 0x7f, {0x137,5285,100, 0,2,0x00,0xbe,0x2a,0xa5,0x18,0x08,0x0}},
 	{0x15, 0x6c, {0x02a,3481,100, 0,1,0x00,0xc8,0x29,0x80,0x05,0x05,0x0}}
 };
-static const opl4_region_t regions_65[] = { /* Goblins */
+static const struct opl4_region regions_65[] = { /* Goblins */
 	{0x15, 0x6c, {0x002,4501,100,-1,2,0x00,0xca,0x2a,0x40,0x01,0x05,0x0}},
 	{0x15, 0x6c, {0x009,9679, 20, 1,4,0x00,0x3c,0x0c,0x22,0x11,0x06,0x0}}
 };
-static const opl4_region_t regions_66[] = { /* Echoes */
+static const struct opl4_region regions_66[] = { /* Echoes */
 	{0x15, 0x6c, {0x02a,3487,100, 0,3,0x00,0xae,0x2b,0xf5,0x21,0x06,0x0}},
 	{0x00, 0x7f, {0x124,4027,100, 0,3,0x00,0xae,0x2b,0x85,0x23,0x07,0x0}}
 };
-static const opl4_region_t regions_67[] = { /* Sci-Fi */
+static const struct opl4_region regions_67[] = { /* Sci-Fi */
 	{0x15, 0x31, {0x00c,6940,100, 0,3,0x00,0xc8,0x2b,0x90,0x05,0x06,0x3}},
 	{0x32, 0x38, {0x00d,5413,100, 0,3,0x00,0xc8,0x2b,0x90,0x05,0x06,0x3}},
 	{0x39, 0x47, {0x00e,4382,100, 0,3,0x00,0xc8,0x2b,0x90,0x05,0x06,0x3}},
 	{0x48, 0x6c, {0x00f,2846,100, 0,3,0x00,0xc8,0x2b,0x90,0x05,0x06,0x3}},
 	{0x15, 0x6c, {0x002,4498,100, 0,2,0x00,0xd4,0x22,0x80,0x01,0x05,0x0}}
 };
-static const opl4_region_t regions_68[] = { /* Sitar */
+static const struct opl4_region regions_68[] = { /* Sitar */
 	{0x00, 0x7f, {0x10f,4408,100, 0,2,0x00,0xc4,0x32,0xf4,0x15,0x16,0x1}}
 };
-static const opl4_region_t regions_69[] = { /* Banjo */
+static const struct opl4_region regions_69[] = { /* Banjo */
 	{0x15, 0x34, {0x013,5685,100, 0,0,0x00,0xdc,0x38,0xf6,0x15,0x09,0x0}},
 	{0x35, 0x38, {0x014,5009,100, 0,0,0x00,0xdc,0x38,0xf6,0x15,0x09,0x0}},
 	{0x39, 0x3c, {0x012,4520,100, 0,0,0x00,0xdc,0x38,0xf6,0x15,0x09,0x0}},
@@ -780,21 +780,21 @@ static const opl4_region_t regions_69[] = { /* Banjo */
 	{0x45, 0x4c, {0x017,2661,100, 0,0,0x00,0xdc,0x38,0xf6,0x15,0x09,0x0}},
 	{0x4d, 0x6d, {0x016,1632,100, 0,0,0x00,0xdc,0x38,0xf6,0x15,0x09,0x0}}
 };
-static const opl4_region_t regions_6a[] = { /* Shamisen */
+static const struct opl4_region regions_6a[] = { /* Shamisen */
 	{0x15, 0x6c, {0x10e,3273,100, 0,0,0x00,0xc0,0x28,0xf7,0x76,0x08,0x0}}
 };
-static const opl4_region_t regions_6b[] = { /* Koto */
+static const struct opl4_region regions_6b[] = { /* Koto */
 	{0x00, 0x7f, {0x0a9,4033,100, 0,0,0x00,0xc6,0x20,0xf0,0x06,0x07,0x0}}
 };
-static const opl4_region_t regions_6c[] = { /* Kalimba */
+static const struct opl4_region regions_6c[] = { /* Kalimba */
 	{0x00, 0x7f, {0x137,3749,100, 0,0,0x00,0xce,0x38,0xf5,0x18,0x08,0x0}}
 };
-static const opl4_region_t regions_6d[] = { /* Bagpipe */
+static const struct opl4_region regions_6d[] = { /* Bagpipe */
 	{0x15, 0x39, {0x0a4,7683,100, 0,4,0x00,0xc0,0x1c,0xf0,0x00,0x09,0x0}},
 	{0x15, 0x39, {0x0a7,7680,100, 0,1,0x00,0xaa,0x19,0xf0,0x00,0x09,0x0}},
 	{0x3a, 0x6c, {0x0a8,3697,100, 0,1,0x00,0xaa,0x19,0xf0,0x00,0x09,0x0}}
 };
-static const opl4_region_t regions_6e[] = { /* Fiddle */
+static const struct opl4_region regions_6e[] = { /* Fiddle */
 	{0x15, 0x3a, {0x105,5158,100, 0,1,0x00,0xca,0x31,0xf3,0x20,0x09,0x0}},
 	{0x3b, 0x3f, {0x102,4754,100, 0,1,0x00,0xca,0x31,0xf3,0x20,0x09,0x0}},
 	{0x40, 0x41, {0x106,4132,100, 0,1,0x00,0xca,0x31,0xf3,0x20,0x09,0x0}},
@@ -806,64 +806,64 @@ static const opl4_region_t regions_6e[] = { /* Fiddle */
 	{0x4f, 0x51, {0x10d,2166,100, 0,1,0x00,0xca,0x31,0xf3,0x20,0x09,0x0}},
 	{0x52, 0x6c, {0x109,1825,100, 0,1,0x00,0xca,0x31,0xf3,0x20,0x09,0x0}}
 };
-static const opl4_region_t regions_6f[] = { /* Shanai */
+static const struct opl4_region regions_6f[] = { /* Shanai */
 	{0x15, 0x6c, {0x041,6946,100, 0,1,0x00,0xc4,0x31,0x95,0x20,0x09,0x0}}
 };
-static const opl4_region_t regions_70[] = { /* Tinkle Bell */
+static const struct opl4_region regions_70[] = { /* Tinkle Bell */
 	{0x15, 0x73, {0x0f3,1821,100, 0,3,0x00,0xc8,0x3b,0xd6,0x25,0x25,0x0}},
 	{0x00, 0x7f, {0x137,5669,100, 0,3,0x00,0x66,0x3b,0xf5,0x18,0x08,0x0}}
 };
-static const opl4_region_t regions_71[] = { /* Agogo */
+static const struct opl4_region regions_71[] = { /* Agogo */
 	{0x15, 0x74, {0x00b,2474,100, 0,0,0x00,0xd2,0x38,0xf0,0x00,0x09,0x0}}
 };
-static const opl4_region_t regions_72[] = { /* Steel Drums */
+static const struct opl4_region regions_72[] = { /* Steel Drums */
 	{0x01, 0x7f, {0x0fe,3670,100, 0,0,0x00,0xca,0x38,0xf3,0x06,0x17,0x1}},
 	{0x15, 0x6c, {0x100,9602,100, 0,0,0x00,0x54,0x38,0xb0,0x05,0x16,0x1}}
 };
-static const opl4_region_t regions_73[] = { /* Woodblock */
+static const struct opl4_region regions_73[] = { /* Woodblock */
 	{0x15, 0x6c, {0x02c,2963, 50, 0,0,0x07,0xd4,0x00,0xf0,0x00,0x09,0x0}}
 };
-static const opl4_region_t regions_74[] = { /* Taiko Drum */
+static const struct opl4_region regions_74[] = { /* Taiko Drum */
 	{0x13, 0x6c, {0x03e,1194, 50, 0,0,0x00,0xaa,0x38,0xf0,0x04,0x04,0x0}}
 };
-static const opl4_region_t regions_75[] = { /* Melodic Tom */
+static const struct opl4_region regions_75[] = { /* Melodic Tom */
 	{0x15, 0x6c, {0x0c7,6418, 50, 0,0,0x00,0xe4,0x38,0xf0,0x05,0x01,0x0}}
 };
-static const opl4_region_t regions_76[] = { /* Synth Drum */
+static const struct opl4_region regions_76[] = { /* Synth Drum */
 	{0x15, 0x6c, {0x026,3898, 50, 0,0,0x00,0xd0,0x38,0xf0,0x04,0x04,0x0}}
 };
-static const opl4_region_t regions_77[] = { /* Reverse Cymbal */
+static const struct opl4_region regions_77[] = { /* Reverse Cymbal */
 	{0x15, 0x6c, {0x031,4138, 50, 0,0,0x00,0xfe,0x38,0x3a,0xf0,0x09,0x0}}
 };
-static const opl4_region_t regions_78[] = { /* Guitar Fret Noise */
+static const struct opl4_region regions_78[] = { /* Guitar Fret Noise */
 	{0x15, 0x6c, {0x138,5266,100, 0,0,0x00,0xa0,0x38,0xf0,0x00,0x09,0x0}}
 };
-static const opl4_region_t regions_79[] = { /* Breath Noise */
+static const struct opl4_region regions_79[] = { /* Breath Noise */
 	{0x01, 0x7f, {0x125,4269,100, 0,0,0x1e,0xd0,0x38,0xf0,0x00,0x09,0x0}}
 };
-static const opl4_region_t regions_7a[] = { /* Seashore */
+static const struct opl4_region regions_7a[] = { /* Seashore */
 	{0x15, 0x6c, {0x008,2965, 20,-2,0,0x00,0xfe,0x00,0x20,0x03,0x04,0x0}},
 	{0x01, 0x7f, {0x037,4394, 20, 2,0,0x14,0xfe,0x00,0x20,0x04,0x05,0x0}}
 };
-static const opl4_region_t regions_7b[] = { /* Bird Tweet */
+static const struct opl4_region regions_7b[] = { /* Bird Tweet */
 	{0x15, 0x6c, {0x009,8078,  5,-4,7,0x00,0xc2,0x0f,0x22,0x12,0x07,0x0}},
 	{0x15, 0x6c, {0x009,3583,  5, 4,5,0x00,0xae,0x15,0x72,0x12,0x07,0x0}}
 };
-static const opl4_region_t regions_7c[] = { /* Telephone Ring */
+static const struct opl4_region regions_7c[] = { /* Telephone Ring */
 	{0x15, 0x6c, {0x003,3602, 10, 0,0,0x00,0xce,0x00,0xf0,0x00,0x0f,0x0}}
 };
-static const opl4_region_t regions_7d[] = { /* Helicopter */
+static const struct opl4_region regions_7d[] = { /* Helicopter */
 	{0x0c, 0x7f, {0x001,2965, 10,-2,0,0x00,0xe0,0x08,0x30,0x01,0x07,0x0}},
 	{0x01, 0x7f, {0x037,4394, 10, 2,0,0x44,0x76,0x00,0x30,0x01,0x07,0x0}}
 };
-static const opl4_region_t regions_7e[] = { /* Applause */
+static const struct opl4_region regions_7e[] = { /* Applause */
 	{0x15, 0x6c, {0x036,8273, 20,-6,7,0x00,0xc4,0x0f,0x70,0x01,0x05,0x0}},
 	{0x15, 0x6c, {0x036,8115,  5, 6,7,0x00,0xc6,0x07,0x70,0x01,0x05,0x0}}
 };
-static const opl4_region_t regions_7f[] = { /* Gun Shot */
+static const struct opl4_region regions_7f[] = { /* Gun Shot */
 	{0x15, 0x6c, {0x139,2858, 20, 0,0,0x00,0xbe,0x38,0xf0,0x03,0x00,0x0}}
 };
-static const opl4_region_t regions_drums[] = {
+static const struct opl4_region regions_drums[] = {
 	{0x18, 0x18, {0x0cb,6397,100, 3,0,0x00,0xf4,0x38,0xc9,0x1c,0x0c,0x0}},
 	{0x19, 0x19, {0x0c4,3714,100, 0,0,0x00,0xe0,0x00,0x97,0x19,0x09,0x0}},
 	{0x1a, 0x1a, {0x0c4,3519,100, 0,0,0x00,0xea,0x00,0x61,0x01,0x07,0x0}},
@@ -924,7 +924,7 @@ static const opl4_region_t regions_drums[] = {
 };
 
 #define REGION(num) { ARRAY_SIZE(regions ## num), regions ## num }
-const opl4_region_ptr_t snd_yrw801_regions[0x81] = {
+const struct opl4_region_ptr snd_yrw801_regions[0x81] = {
 	REGION(_00), REGION(_01), REGION(_02), REGION(_03),
 	REGION(_04), REGION(_05), REGION(_06), REGION(_07),
 	REGION(_08), REGION(_09), REGION(_0a), REGION(_0b),
-- 
cgit v1.2.3-70-g09d2


From 97f02e05f246a2346275c1c93a3079e8933e74b2 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:17:19 +0100
Subject: [ALSA] Remove xxx_t typedefs: I2C drivers

Remove xxx_t typedefs from the i2c drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/cs8403.h          |   8 +--
 include/sound/cs8427.h          |  17 +++--
 include/sound/i2c.h             |  78 +++++++++++-----------
 include/sound/tea575x-tuner.h   |  12 ++--
 include/sound/tea6330t.h        |   5 +-
 include/sound/uda1341.h         |   4 +-
 sound/i2c/cs8427.c              | 142 ++++++++++++++++++++++------------------
 sound/i2c/i2c.c                 |  79 ++++++++++++----------
 sound/i2c/l3/uda1341.c          |  69 ++++++++++---------
 sound/i2c/other/ak4114.c        | 122 +++++++++++++++++-----------------
 sound/i2c/other/ak4117.c        | 122 +++++++++++++++++-----------------
 sound/i2c/other/ak4xxx-adda.c   |  49 ++++++++------
 sound/i2c/other/tea575x-tuner.c |   8 +--
 sound/i2c/tea6330t.c            |  84 ++++++++++++++----------
 14 files changed, 429 insertions(+), 370 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/cs8403.h b/include/sound/cs8403.h
index 0b7d216e24f..c6c3f9f0da7 100644
--- a/include/sound/cs8403.h
+++ b/include/sound/cs8403.h
@@ -36,7 +36,7 @@
 #endif
 
 
-SND_CS8403_DECL void SND_CS8403_DECODE(snd_aes_iec958_t *diga, unsigned char bits)
+SND_CS8403_DECL void SND_CS8403_DECODE(struct snd_aes_iec958 *diga, unsigned char bits)
 {
 	if (bits & 0x01) {	/* consumer */
 		if (!(bits & 0x02))
@@ -79,7 +79,7 @@ SND_CS8403_DECL void SND_CS8403_DECODE(snd_aes_iec958_t *diga, unsigned char bit
 	}
 }
 
-SND_CS8403_DECL unsigned char SND_CS8403_ENCODE(snd_aes_iec958_t *diga)
+SND_CS8403_DECL unsigned char SND_CS8403_ENCODE(struct snd_aes_iec958 *diga)
 {
 	unsigned char bits;
 
@@ -166,7 +166,7 @@ SND_CS8403_DECL unsigned char SND_CS8403_ENCODE(snd_aes_iec958_t *diga)
 #endif
 
 
-SND_CS8404_DECL void SND_CS8404_DECODE(snd_aes_iec958_t *diga, unsigned char bits)
+SND_CS8404_DECL void SND_CS8404_DECODE(struct snd_aes_iec958 *diga, unsigned char bits)
 {
 	if (bits & 0x10) {	/* consumer */
 		if (!(bits & 0x20))
@@ -205,7 +205,7 @@ SND_CS8404_DECL void SND_CS8404_DECODE(snd_aes_iec958_t *diga, unsigned char bit
 	}
 }
 
-SND_CS8404_DECL unsigned char SND_CS8404_ENCODE(snd_aes_iec958_t *diga)
+SND_CS8404_DECL unsigned char SND_CS8404_ENCODE(struct snd_aes_iec958 *diga)
 {
 	unsigned char bits;
 
diff --git a/include/sound/cs8427.h b/include/sound/cs8427.h
index e725b7049a5..97fd9acf802 100644
--- a/include/sound/cs8427.h
+++ b/include/sound/cs8427.h
@@ -186,11 +186,16 @@
 #define CS8427_VERSHIFT		0
 #define CS8427_VER8427A		0x71
 
-int snd_cs8427_create(snd_i2c_bus_t *bus, unsigned char addr,
-		      unsigned int reset_timeout, snd_i2c_device_t **r_cs8427);
-int snd_cs8427_reg_write(snd_i2c_device_t *device, unsigned char reg, unsigned char val);
-int snd_cs8427_iec958_build(snd_i2c_device_t *cs8427, snd_pcm_substream_t *playback_substream, snd_pcm_substream_t *capture_substream);
-int snd_cs8427_iec958_active(snd_i2c_device_t *cs8427, int active);
-int snd_cs8427_iec958_pcm(snd_i2c_device_t *cs8427, unsigned int rate);
+struct snd_pcm_substream;
+
+int snd_cs8427_create(struct snd_i2c_bus *bus, unsigned char addr,
+		      unsigned int reset_timeout, struct snd_i2c_device **r_cs8427);
+int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg,
+			 unsigned char val);
+int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427,
+			    struct snd_pcm_substream *playback_substream,
+			    struct snd_pcm_substream *capture_substream);
+int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active);
+int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate);
 
 #endif /* __SOUND_CS8427_H */
diff --git a/include/sound/i2c.h b/include/sound/i2c.h
index a665ddf9c14..81eb23ed761 100644
--- a/include/sound/i2c.h
+++ b/include/sound/i2c.h
@@ -21,82 +21,84 @@
  *
  */
 
-typedef struct _snd_i2c_device snd_i2c_device_t;
-typedef struct _snd_i2c_bus snd_i2c_bus_t;
-
 #define SND_I2C_DEVICE_ADDRTEN	(1<<0)	/* 10-bit I2C address */
 
-struct _snd_i2c_device {
+struct snd_i2c_device {
 	struct list_head list;
-	snd_i2c_bus_t *bus;	/* I2C bus */
+	struct snd_i2c_bus *bus;	/* I2C bus */
 	char name[32];		/* some useful device name */
 	unsigned short flags;	/* device flags */
 	unsigned short addr;	/* device address (might be 10-bit) */
 	unsigned long private_value;
 	void *private_data;
-	void (*private_free)(snd_i2c_device_t *device);
+	void (*private_free)(struct snd_i2c_device *device);
+};
+
+#define snd_i2c_device(n) list_entry(n, struct snd_i2c_device, list)
+
+struct snd_i2c_bit_ops {
+	void (*start)(struct snd_i2c_bus *bus);	/* transfer start */
+	void (*stop)(struct snd_i2c_bus *bus);	/* transfer stop */
+	void (*direction)(struct snd_i2c_bus *bus, int clock, int data);  /* set line direction (0 = write, 1 = read) */
+	void (*setlines)(struct snd_i2c_bus *bus, int clock, int data);
+	int (*getclock)(struct snd_i2c_bus *bus);
+	int (*getdata)(struct snd_i2c_bus *bus, int ack);
 };
 
-#define snd_i2c_device(n) list_entry(n, snd_i2c_device_t, list)
-
-typedef struct _snd_i2c_bit_ops {
-	void (*start)(snd_i2c_bus_t *bus);	/* transfer start */
-	void (*stop)(snd_i2c_bus_t *bus);	/* transfer stop */
-	void (*direction)(snd_i2c_bus_t *bus, int clock, int data);  /* set line direction (0 = write, 1 = read) */
-	void (*setlines)(snd_i2c_bus_t *bus, int clock, int data);
-	int (*getclock)(snd_i2c_bus_t *bus);
-	int (*getdata)(snd_i2c_bus_t *bus, int ack);
-} snd_i2c_bit_ops_t;
-
-typedef struct _snd_i2c_ops {
-	int (*sendbytes)(snd_i2c_device_t *device, unsigned char *bytes, int count);
-	int (*readbytes)(snd_i2c_device_t *device, unsigned char *bytes, int count);
-	int (*probeaddr)(snd_i2c_bus_t *bus, unsigned short addr);
-} snd_i2c_ops_t;
-
-struct _snd_i2c_bus {
-	snd_card_t *card;	/* card which I2C belongs to */
+struct snd_i2c_ops {
+	int (*sendbytes)(struct snd_i2c_device *device, unsigned char *bytes, int count);
+	int (*readbytes)(struct snd_i2c_device *device, unsigned char *bytes, int count);
+	int (*probeaddr)(struct snd_i2c_bus *bus, unsigned short addr);
+};
+
+struct snd_i2c_bus {
+	struct snd_card *card;	/* card which I2C belongs to */
 	char name[32];		/* some useful label */
 
 	struct semaphore lock_mutex;
 
-	snd_i2c_bus_t *master;	/* master bus when SCK/SCL is shared */
+	struct snd_i2c_bus *master;	/* master bus when SCK/SCL is shared */
 	struct list_head buses;	/* master: slave buses sharing SCK/SCL, slave: link list */
 
 	struct list_head devices; /* attached devices to this bus */
 
 	union {
-		snd_i2c_bit_ops_t *bit;
+		struct snd_i2c_bit_ops *bit;
 		void *ops;
 	} hw_ops;		/* lowlevel operations */
-	snd_i2c_ops_t *ops;	/* midlevel operations */
+	struct snd_i2c_ops *ops;	/* midlevel operations */
 
 	unsigned long private_value;
 	void *private_data;
-	void (*private_free)(snd_i2c_bus_t *bus);
+	void (*private_free)(struct snd_i2c_bus *bus);
 };
 
-#define snd_i2c_slave_bus(n) list_entry(n, snd_i2c_bus_t, buses)
+#define snd_i2c_slave_bus(n) list_entry(n, struct snd_i2c_bus, buses)
 
-int snd_i2c_bus_create(snd_card_t *card, const char *name, snd_i2c_bus_t *master, snd_i2c_bus_t **ri2c);
-int snd_i2c_device_create(snd_i2c_bus_t *bus, const char *name, unsigned char addr, snd_i2c_device_t **rdevice);
-int snd_i2c_device_free(snd_i2c_device_t *device);
+int snd_i2c_bus_create(struct snd_card *card, const char *name,
+		       struct snd_i2c_bus *master, struct snd_i2c_bus **ri2c);
+int snd_i2c_device_create(struct snd_i2c_bus *bus, const char *name,
+			  unsigned char addr, struct snd_i2c_device **rdevice);
+int snd_i2c_device_free(struct snd_i2c_device *device);
 
-static inline void snd_i2c_lock(snd_i2c_bus_t *bus) {
+static inline void snd_i2c_lock(struct snd_i2c_bus *bus)
+{
 	if (bus->master)
 		down(&bus->master->lock_mutex);
 	else
 		down(&bus->lock_mutex);
 }
-static inline void snd_i2c_unlock(snd_i2c_bus_t *bus) {
+
+static inline void snd_i2c_unlock(struct snd_i2c_bus *bus)
+{
 	if (bus->master)
 		up(&bus->master->lock_mutex);
 	else
 		up(&bus->lock_mutex);
 }
 
-int snd_i2c_sendbytes(snd_i2c_device_t *device, unsigned char *bytes, int count);
-int snd_i2c_readbytes(snd_i2c_device_t *device, unsigned char *bytes, int count);
-int snd_i2c_probeaddr(snd_i2c_bus_t *bus, unsigned short addr);
+int snd_i2c_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count);
+int snd_i2c_readbytes(struct snd_i2c_device *device, unsigned char *bytes, int count);
+int snd_i2c_probeaddr(struct snd_i2c_bus *bus, unsigned short addr);
 
 #endif /* __SOUND_I2C_H */
diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h
index b82e408e758..a4f55452019 100644
--- a/include/sound/tea575x-tuner.h
+++ b/include/sound/tea575x-tuner.h
@@ -24,15 +24,15 @@
 
 #include <linux/videodev.h>
 
-typedef struct snd_tea575x tea575x_t;
+struct snd_tea575x;
 
 struct snd_tea575x_ops {
-	void (*write)(tea575x_t *tea, unsigned int val);
-	unsigned int (*read)(tea575x_t *tea);
+	void (*write)(struct snd_tea575x *tea, unsigned int val);
+	unsigned int (*read)(struct snd_tea575x *tea);
 };
 
 struct snd_tea575x {
-	snd_card_t *card;
+	struct snd_card *card;
 	struct video_device vd;		/* video device */
 	struct file_operations fops;
 	int dev_nr;			/* requested device number + 1 */
@@ -45,7 +45,7 @@ struct snd_tea575x {
 	void *private_data;
 };
 
-void snd_tea575x_init(tea575x_t *tea);
-void snd_tea575x_exit(tea575x_t *tea);
+void snd_tea575x_init(struct snd_tea575x *tea);
+void snd_tea575x_exit(struct snd_tea575x *tea);
 
 #endif /* __SOUND_TEA575X_TUNER_H */
diff --git a/include/sound/tea6330t.h b/include/sound/tea6330t.h
index 1b265bf24ee..51b282b7689 100644
--- a/include/sound/tea6330t.h
+++ b/include/sound/tea6330t.h
@@ -24,7 +24,8 @@
 
 #include "i2c.h"		/* generic i2c support */
 
-int snd_tea6330t_detect(snd_i2c_bus_t *bus, int equalizer);
-int snd_tea6330t_update_mixer(snd_card_t * card, snd_i2c_bus_t * bus, int equalizer, int fader);
+int snd_tea6330t_detect(struct snd_i2c_bus *bus, int equalizer);
+int snd_tea6330t_update_mixer(struct snd_card *card, struct snd_i2c_bus *bus,
+			      int equalizer, int fader);
 
 #endif /* __SOUND_TEA6330T_H */
diff --git a/include/sound/uda1341.h b/include/sound/uda1341.h
index 54a048ac6e4..2e564bfb37f 100644
--- a/include/sound/uda1341.h
+++ b/include/sound/uda1341.h
@@ -15,7 +15,7 @@
  *                           features support
  */
 
-/* $Id: uda1341.h,v 1.7 2005/11/17 10:25:22 tiwai Exp $ */
+/* $Id: uda1341.h,v 1.8 2005/11/17 14:17:21 tiwai Exp $ */
 
 #define UDA1341_ALSA_NAME "snd-uda1341"
 
@@ -119,7 +119,7 @@ enum write_through {
 	FLUSH,
 };
 
-int __init snd_chip_uda1341_mixer_new(snd_card_t *card, struct l3_client **clnt);
+int __init snd_chip_uda1341_mixer_new(struct snd_card *card, struct l3_client **clnt);
 
 /*
  * Local variables:
diff --git a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c
index 1a05cfbdc7c..9deba80a587 100644
--- a/sound/i2c/cs8427.c
+++ b/sound/i2c/cs8427.c
@@ -30,7 +30,7 @@
 #include <sound/cs8427.h>
 #include <sound/asoundef.h>
 
-static void snd_cs8427_reset(snd_i2c_device_t *cs8427);
+static void snd_cs8427_reset(struct snd_i2c_device *cs8427);
 
 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("IEC958 (S/PDIF) receiver & transmitter by Cirrus Logic");
@@ -38,22 +38,22 @@ MODULE_LICENSE("GPL");
 
 #define CS8427_ADDR			(0x20>>1) /* fixed address */
 
-typedef struct {
-	snd_pcm_substream_t *substream;
+struct cs8427_stream {
+	struct snd_pcm_substream *substream;
 	char hw_status[24];		/* hardware status */
 	char def_status[24];		/* default status */
 	char pcm_status[24];		/* PCM private status */
 	char hw_udata[32];
-	snd_kcontrol_t *pcm_ctl;
-} cs8427_stream_t;
+	struct snd_kcontrol *pcm_ctl;
+};
 
-typedef struct {
+struct cs8427 {
 	unsigned char regmap[0x14];	/* map of first 1 + 13 registers */
 	unsigned int rate;
 	unsigned int reset_timeout;
-	cs8427_stream_t playback;
-	cs8427_stream_t capture;
-} cs8427_t;
+	struct cs8427_stream playback;
+	struct cs8427_stream capture;
+};
 
 static unsigned char swapbits(unsigned char val)
 {
@@ -67,7 +67,8 @@ static unsigned char swapbits(unsigned char val)
 	return res;
 }
 
-int snd_cs8427_reg_write(snd_i2c_device_t *device, unsigned char reg, unsigned char val)
+int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg,
+			 unsigned char val)
 {
 	int err;
 	unsigned char buf[2];
@@ -81,7 +82,7 @@ int snd_cs8427_reg_write(snd_i2c_device_t *device, unsigned char reg, unsigned c
 	return 0;
 }
 
-static int snd_cs8427_reg_read(snd_i2c_device_t *device, unsigned char reg)
+static int snd_cs8427_reg_read(struct snd_i2c_device *device, unsigned char reg)
 {
 	int err;
 	unsigned char buf;
@@ -97,28 +98,29 @@ static int snd_cs8427_reg_read(snd_i2c_device_t *device, unsigned char reg)
 	return buf;
 }
 
-static int snd_cs8427_select_corudata(snd_i2c_device_t *device, int udata)
+static int snd_cs8427_select_corudata(struct snd_i2c_device *device, int udata)
 {
-	cs8427_t *chip = device->private_data;
+	struct cs8427 *chip = device->private_data;
 	int err;
 
 	udata = udata ? CS8427_BSEL : 0;
 	if (udata != (chip->regmap[CS8427_REG_CSDATABUF] & udata)) {
 		chip->regmap[CS8427_REG_CSDATABUF] &= ~CS8427_BSEL;
 		chip->regmap[CS8427_REG_CSDATABUF] |= udata;
-		err = snd_cs8427_reg_write(device, CS8427_REG_CSDATABUF, chip->regmap[CS8427_REG_CSDATABUF]);
+		err = snd_cs8427_reg_write(device, CS8427_REG_CSDATABUF,
+					   chip->regmap[CS8427_REG_CSDATABUF]);
 		if (err < 0)
 			return err;
 	}
 	return 0;
 }
 
-static int snd_cs8427_send_corudata(snd_i2c_device_t *device,
+static int snd_cs8427_send_corudata(struct snd_i2c_device *device,
 				    int udata,
 				    unsigned char *ndata,
 				    int count)
 {
-	cs8427_t *chip = device->private_data;
+	struct cs8427 *chip = device->private_data;
 	char *hw_data = udata ? chip->playback.hw_udata : chip->playback.hw_status;
 	char data[32];
 	int err, idx;
@@ -133,7 +135,8 @@ static int snd_cs8427_send_corudata(snd_i2c_device_t *device,
 		if (memcmp(hw_data, data, count) == 0) {
 			chip->regmap[CS8427_REG_UDATABUF] &= ~CS8427_UBMMASK;
 			chip->regmap[CS8427_REG_UDATABUF] |= CS8427_UBMZEROS | CS8427_EFTUI;
-			if ((err = snd_cs8427_reg_write(device, CS8427_REG_UDATABUF, chip->regmap[CS8427_REG_UDATABUF])) < 0)
+			if ((err = snd_cs8427_reg_write(device, CS8427_REG_UDATABUF,
+							chip->regmap[CS8427_REG_UDATABUF])) < 0)
 				return err;
 			return 0;
 		}
@@ -146,15 +149,15 @@ static int snd_cs8427_send_corudata(snd_i2c_device_t *device,
 	return 1;
 }
 
-static void snd_cs8427_free(snd_i2c_device_t *device)
+static void snd_cs8427_free(struct snd_i2c_device *device)
 {
 	kfree(device->private_data);
 }
 
-int snd_cs8427_create(snd_i2c_bus_t *bus,
+int snd_cs8427_create(struct snd_i2c_bus *bus,
 		      unsigned char addr,
 		      unsigned int reset_timeout,
-		      snd_i2c_device_t **r_cs8427)
+		      struct snd_i2c_device **r_cs8427)
 {
 	static unsigned char initvals1[] = {
 	  CS8427_REG_CONTROL1 | CS8427_REG_AUTOINC,
@@ -194,11 +197,12 @@ int snd_cs8427_create(snd_i2c_bus_t *bus,
 	  CS8427_UD | CS8427_EFTUI | CS8427_DETUI,
 	};
 	int err;
-	cs8427_t *chip;
-	snd_i2c_device_t *device;
+	struct cs8427 *chip;
+	struct snd_i2c_device *device;
 	unsigned char buf[24];
 
-	if ((err = snd_i2c_device_create(bus, "CS8427", CS8427_ADDR | (addr & 7), &device)) < 0)
+	if ((err = snd_i2c_device_create(bus, "CS8427", CS8427_ADDR | (addr & 7),
+					 &device)) < 0)
 		return err;
 	chip = device->private_data = kzalloc(sizeof(*chip), GFP_KERNEL);
 	if (chip == NULL) {
@@ -208,9 +212,13 @@ int snd_cs8427_create(snd_i2c_bus_t *bus,
 	device->private_free = snd_cs8427_free;
 	
 	snd_i2c_lock(bus);
-	if ((err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER)) != CS8427_VER8427A) {
+	if ((err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER)) !=
+	    CS8427_VER8427A) {
 		snd_i2c_unlock(bus);
-		snd_printk(KERN_ERR "unable to find CS8427 signature (expected 0x%x, read 0x%x), initialization is not completed\n", CS8427_VER8427A, err);
+		snd_printk(KERN_ERR "unable to find CS8427 signature "
+			   "(expected 0x%x, read 0x%x),\n",
+			   CS8427_VER8427A, err);
+		snd_printk(KERN_ERR "   initialization is not completed\n");
 		return -EFAULT;
 	}
 	/* turn off run bit while making changes to configuration */
@@ -279,9 +287,9 @@ int snd_cs8427_create(snd_i2c_bus_t *bus,
  * put back AES3INPUT. This workaround is described in latest
  * CS8427 datasheet, otherwise TXDSERIAL will not work.
  */
-static void snd_cs8427_reset(snd_i2c_device_t *cs8427)
+static void snd_cs8427_reset(struct snd_i2c_device *cs8427)
 {
-	cs8427_t *chip;
+	struct cs8427 *chip;
 	unsigned long end_time;
 	int data;
 
@@ -289,10 +297,12 @@ static void snd_cs8427_reset(snd_i2c_device_t *cs8427)
 	chip = cs8427->private_data;
 	snd_i2c_lock(cs8427->bus);
 	chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~(CS8427_RUN | CS8427_RXDMASK);
-	snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE, chip->regmap[CS8427_REG_CLOCKSOURCE]);
+	snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE,
+			     chip->regmap[CS8427_REG_CLOCKSOURCE]);
 	udelay(200);
 	chip->regmap[CS8427_REG_CLOCKSOURCE] |= CS8427_RUN | CS8427_RXDILRCK;
-	snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE, chip->regmap[CS8427_REG_CLOCKSOURCE]);
+	snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE,
+			     chip->regmap[CS8427_REG_CLOCKSOURCE]);
 	udelay(200);
 	snd_i2c_unlock(cs8427->bus);
 	end_time = jiffies + chip->reset_timeout;
@@ -307,12 +317,13 @@ static void snd_cs8427_reset(snd_i2c_device_t *cs8427)
 	snd_i2c_lock(cs8427->bus);
 	chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~CS8427_RXDMASK;
 	chip->regmap[CS8427_REG_CLOCKSOURCE] |= CS8427_RXDAES3INPUT;
-	snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE, chip->regmap[CS8427_REG_CLOCKSOURCE]);
+	snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE,
+			     chip->regmap[CS8427_REG_CLOCKSOURCE]);
 	snd_i2c_unlock(cs8427->bus);
 }
 
-static int snd_cs8427_in_status_info(snd_kcontrol_t *kcontrol,
-				     snd_ctl_elem_info_t *uinfo)
+static int snd_cs8427_in_status_info(struct snd_kcontrol *kcontrol,
+				     struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -321,10 +332,10 @@ static int snd_cs8427_in_status_info(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_cs8427_in_status_get(snd_kcontrol_t *kcontrol,
-				    snd_ctl_elem_value_t *ucontrol)
+static int snd_cs8427_in_status_get(struct snd_kcontrol *kcontrol,
+				    struct snd_ctl_elem_value *ucontrol)
 {
-	snd_i2c_device_t *device = snd_kcontrol_chip(kcontrol);
+	struct snd_i2c_device *device = snd_kcontrol_chip(kcontrol);
 	int data;
 
 	snd_i2c_lock(device->bus);
@@ -336,18 +347,18 @@ static int snd_cs8427_in_status_get(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_cs8427_qsubcode_info(snd_kcontrol_t *kcontrol,
-				    snd_ctl_elem_info_t *uinfo)
+static int snd_cs8427_qsubcode_info(struct snd_kcontrol *kcontrol,
+				    struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
 	uinfo->count = 10;
 	return 0;
 }
 
-static int snd_cs8427_qsubcode_get(snd_kcontrol_t *kcontrol,
-				   snd_ctl_elem_value_t *ucontrol)
+static int snd_cs8427_qsubcode_get(struct snd_kcontrol *kcontrol,
+				   struct snd_ctl_elem_value *ucontrol)
 {
-	snd_i2c_device_t *device = snd_kcontrol_chip(kcontrol);
+	struct snd_i2c_device *device = snd_kcontrol_chip(kcontrol);
 	unsigned char reg = CS8427_REG_QSUBCODE;
 	int err;
 
@@ -366,18 +377,18 @@ static int snd_cs8427_qsubcode_get(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_cs8427_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_cs8427_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_cs8427_spdif_get(snd_kcontrol_t * kcontrol,
-				snd_ctl_elem_value_t * ucontrol)
+static int snd_cs8427_spdif_get(struct snd_kcontrol *kcontrol,
+				struct snd_ctl_elem_value *ucontrol)
 {
-	snd_i2c_device_t *device = snd_kcontrol_chip(kcontrol);
-	cs8427_t *chip = device->private_data;
+	struct snd_i2c_device *device = snd_kcontrol_chip(kcontrol);
+	struct cs8427 *chip = device->private_data;
 	
 	snd_i2c_lock(device->bus);
 	memcpy(ucontrol->value.iec958.status, chip->playback.def_status, 24);
@@ -385,13 +396,15 @@ static int snd_cs8427_spdif_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_cs8427_spdif_put(snd_kcontrol_t * kcontrol,
-				snd_ctl_elem_value_t * ucontrol)
+static int snd_cs8427_spdif_put(struct snd_kcontrol *kcontrol,
+				struct snd_ctl_elem_value *ucontrol)
 {
-	snd_i2c_device_t *device = snd_kcontrol_chip(kcontrol);
-	cs8427_t *chip = device->private_data;
-	unsigned char *status = kcontrol->private_value ? chip->playback.pcm_status : chip->playback.def_status;
-	snd_pcm_runtime_t *runtime = chip->playback.substream ? chip->playback.substream->runtime : NULL;
+	struct snd_i2c_device *device = snd_kcontrol_chip(kcontrol);
+	struct cs8427 *chip = device->private_data;
+	unsigned char *status = kcontrol->private_value ?
+		chip->playback.pcm_status : chip->playback.def_status;
+	struct snd_pcm_runtime *runtime = chip->playback.substream ?
+		chip->playback.substream->runtime : NULL;
 	int err, change;
 
 	snd_i2c_lock(device->bus);
@@ -406,21 +419,22 @@ static int snd_cs8427_spdif_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static int snd_cs8427_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_cs8427_spdif_mask_info(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_cs8427_spdif_mask_get(snd_kcontrol_t * kcontrol,
-				      snd_ctl_elem_value_t * ucontrol)
+static int snd_cs8427_spdif_mask_get(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_value *ucontrol)
 {
 	memset(ucontrol->value.iec958.status, 0xff, 24);
 	return 0;
 }
 
-static snd_kcontrol_new_t snd_cs8427_iec958_controls[] = {
+static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = {
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
 	.info =		snd_cs8427_in_status_info,
@@ -469,12 +483,12 @@ static snd_kcontrol_new_t snd_cs8427_iec958_controls[] = {
 	.get =		snd_cs8427_qsubcode_get
 }};
 
-int snd_cs8427_iec958_build(snd_i2c_device_t *cs8427,
-			    snd_pcm_substream_t *play_substream,
-			    snd_pcm_substream_t *cap_substream)
+int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427,
+			    struct snd_pcm_substream *play_substream,
+			    struct snd_pcm_substream *cap_substream)
 {
-	cs8427_t *chip = cs8427->private_data;
-	snd_kcontrol_t *kctl;
+	struct cs8427 *chip = cs8427->private_data;
+	struct snd_kcontrol *kctl;
 	unsigned int idx;
 	int err;
 
@@ -498,9 +512,9 @@ int snd_cs8427_iec958_build(snd_i2c_device_t *cs8427,
 	return 0;
 }
 
-int snd_cs8427_iec958_active(snd_i2c_device_t *cs8427, int active)
+int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active)
 {
-	cs8427_t *chip;
+	struct cs8427 *chip;
 
 	snd_assert(cs8427, return -ENXIO);
 	chip = cs8427->private_data;
@@ -512,9 +526,9 @@ int snd_cs8427_iec958_active(snd_i2c_device_t *cs8427, int active)
 	return 0;
 }
 
-int snd_cs8427_iec958_pcm(snd_i2c_device_t *cs8427, unsigned int rate)
+int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate)
 {
-	cs8427_t *chip;
+	struct cs8427 *chip;
 	char *status;
 	int err, reset;
 
diff --git a/sound/i2c/i2c.c b/sound/i2c/i2c.c
index e4e505b9d88..c4e1f2c23ce 100644
--- a/sound/i2c/i2c.c
+++ b/sound/i2c/i2c.c
@@ -32,20 +32,23 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("Generic i2c interface for ALSA");
 MODULE_LICENSE("GPL");
 
-static int snd_i2c_bit_sendbytes(snd_i2c_device_t *device, unsigned char *bytes, int count);
-static int snd_i2c_bit_readbytes(snd_i2c_device_t *device, unsigned char *bytes, int count);
-static int snd_i2c_bit_probeaddr(snd_i2c_bus_t *bus, unsigned short addr);
-
-static snd_i2c_ops_t snd_i2c_bit_ops = {
+static int snd_i2c_bit_sendbytes(struct snd_i2c_device *device,
+				 unsigned char *bytes, int count);
+static int snd_i2c_bit_readbytes(struct snd_i2c_device *device,
+				 unsigned char *bytes, int count);
+static int snd_i2c_bit_probeaddr(struct snd_i2c_bus *bus,
+				 unsigned short addr);
+
+static struct snd_i2c_ops snd_i2c_bit_ops = {
 	.sendbytes = snd_i2c_bit_sendbytes,
 	.readbytes = snd_i2c_bit_readbytes,
 	.probeaddr = snd_i2c_bit_probeaddr,
 };
 
-static int snd_i2c_bus_free(snd_i2c_bus_t *bus)
+static int snd_i2c_bus_free(struct snd_i2c_bus *bus)
 {
-	snd_i2c_bus_t *slave;
-	snd_i2c_device_t *device;
+	struct snd_i2c_bus *slave;
+	struct snd_i2c_device *device;
 
 	snd_assert(bus != NULL, return -EINVAL);
 	while (!list_empty(&bus->devices)) {
@@ -66,17 +69,18 @@ static int snd_i2c_bus_free(snd_i2c_bus_t *bus)
 	return 0;
 }
 
-static int snd_i2c_bus_dev_free(snd_device_t *device)
+static int snd_i2c_bus_dev_free(struct snd_device *device)
 {
-	snd_i2c_bus_t *bus = device->device_data;
+	struct snd_i2c_bus *bus = device->device_data;
 	return snd_i2c_bus_free(bus);
 }
 
-int snd_i2c_bus_create(snd_card_t *card, const char *name, snd_i2c_bus_t *master, snd_i2c_bus_t **ri2c)
+int snd_i2c_bus_create(struct snd_card *card, const char *name,
+		       struct snd_i2c_bus *master, struct snd_i2c_bus **ri2c)
 {
-	snd_i2c_bus_t *bus;
+	struct snd_i2c_bus *bus;
 	int err;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_i2c_bus_dev_free,
 	};
 
@@ -102,9 +106,10 @@ int snd_i2c_bus_create(snd_card_t *card, const char *name, snd_i2c_bus_t *master
 	return 0;
 }
 
-int snd_i2c_device_create(snd_i2c_bus_t *bus, const char *name, unsigned char addr, snd_i2c_device_t **rdevice)
+int snd_i2c_device_create(struct snd_i2c_bus *bus, const char *name,
+			  unsigned char addr, struct snd_i2c_device **rdevice)
 {
-	snd_i2c_device_t *device;
+	struct snd_i2c_device *device;
 
 	*rdevice = NULL;
 	snd_assert(bus != NULL, return -EINVAL);
@@ -119,7 +124,7 @@ int snd_i2c_device_create(snd_i2c_bus_t *bus, const char *name, unsigned char ad
 	return 0;
 }
 
-int snd_i2c_device_free(snd_i2c_device_t *device)
+int snd_i2c_device_free(struct snd_i2c_device *device)
 {
 	if (device->bus)
 		list_del(&device->list);
@@ -129,18 +134,18 @@ int snd_i2c_device_free(snd_i2c_device_t *device)
 	return 0;
 }
 
-int snd_i2c_sendbytes(snd_i2c_device_t *device, unsigned char *bytes, int count)
+int snd_i2c_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count)
 {
 	return device->bus->ops->sendbytes(device, bytes, count);
 }
 
 
-int snd_i2c_readbytes(snd_i2c_device_t *device, unsigned char *bytes, int count)
+int snd_i2c_readbytes(struct snd_i2c_device *device, unsigned char *bytes, int count)
 {
 	return device->bus->ops->readbytes(device, bytes, count);
 }
 
-int snd_i2c_probeaddr(snd_i2c_bus_t *bus, unsigned short addr)
+int snd_i2c_probeaddr(struct snd_i2c_bus *bus, unsigned short addr)
 {
 	return bus->ops->probeaddr(bus, addr);
 }
@@ -149,31 +154,31 @@ int snd_i2c_probeaddr(snd_i2c_bus_t *bus, unsigned short addr)
  *  bit-operations
  */
 
-static inline void snd_i2c_bit_hw_start(snd_i2c_bus_t *bus)
+static inline void snd_i2c_bit_hw_start(struct snd_i2c_bus *bus)
 {
 	if (bus->hw_ops.bit->start)
 		bus->hw_ops.bit->start(bus);
 }
 
-static inline void snd_i2c_bit_hw_stop(snd_i2c_bus_t *bus)
+static inline void snd_i2c_bit_hw_stop(struct snd_i2c_bus *bus)
 {
 	if (bus->hw_ops.bit->stop)
 		bus->hw_ops.bit->stop(bus);
 }
 
-static void snd_i2c_bit_direction(snd_i2c_bus_t *bus, int clock, int data)
+static void snd_i2c_bit_direction(struct snd_i2c_bus *bus, int clock, int data)
 {
 	if (bus->hw_ops.bit->direction)
 		bus->hw_ops.bit->direction(bus, clock, data);
 }
 
-static void snd_i2c_bit_set(snd_i2c_bus_t *bus, int clock, int data)
+static void snd_i2c_bit_set(struct snd_i2c_bus *bus, int clock, int data)
 {
 	bus->hw_ops.bit->setlines(bus, clock, data);
 }
 
 #if 0
-static int snd_i2c_bit_clock(snd_i2c_bus_t *bus)
+static int snd_i2c_bit_clock(struct snd_i2c_bus *bus)
 {
 	if (bus->hw_ops.bit->getclock)
 		return bus->hw_ops.bit->getclock(bus);
@@ -181,12 +186,12 @@ static int snd_i2c_bit_clock(snd_i2c_bus_t *bus)
 }
 #endif
 
-static int snd_i2c_bit_data(snd_i2c_bus_t *bus, int ack)
+static int snd_i2c_bit_data(struct snd_i2c_bus *bus, int ack)
 {
 	return bus->hw_ops.bit->getdata(bus, ack);
 }
 
-static void snd_i2c_bit_start(snd_i2c_bus_t *bus)
+static void snd_i2c_bit_start(struct snd_i2c_bus *bus)
 {
 	snd_i2c_bit_hw_start(bus);
 	snd_i2c_bit_direction(bus, 1, 1);	/* SCL - wr, SDA - wr */
@@ -195,7 +200,7 @@ static void snd_i2c_bit_start(snd_i2c_bus_t *bus)
 	snd_i2c_bit_set(bus, 0, 0);
 }
 
-static void snd_i2c_bit_stop(snd_i2c_bus_t *bus)
+static void snd_i2c_bit_stop(struct snd_i2c_bus *bus)
 {
 	snd_i2c_bit_set(bus, 0, 0);
 	snd_i2c_bit_set(bus, 1, 0);
@@ -203,14 +208,14 @@ static void snd_i2c_bit_stop(snd_i2c_bus_t *bus)
 	snd_i2c_bit_hw_stop(bus);
 }
 
-static void snd_i2c_bit_send(snd_i2c_bus_t *bus, int data)
+static void snd_i2c_bit_send(struct snd_i2c_bus *bus, int data)
 {
 	snd_i2c_bit_set(bus, 0, data);
 	snd_i2c_bit_set(bus, 1, data);
 	snd_i2c_bit_set(bus, 0, data);
 }
 
-static int snd_i2c_bit_ack(snd_i2c_bus_t *bus)
+static int snd_i2c_bit_ack(struct snd_i2c_bus *bus)
 {
 	int ack;
 
@@ -223,7 +228,7 @@ static int snd_i2c_bit_ack(snd_i2c_bus_t *bus)
 	return ack ? -EIO : 0;
 }
 
-static int snd_i2c_bit_sendbyte(snd_i2c_bus_t *bus, unsigned char data)
+static int snd_i2c_bit_sendbyte(struct snd_i2c_bus *bus, unsigned char data)
 {
 	int i, err;
 
@@ -234,7 +239,7 @@ static int snd_i2c_bit_sendbyte(snd_i2c_bus_t *bus, unsigned char data)
 	return 0;
 }
 
-static int snd_i2c_bit_readbyte(snd_i2c_bus_t *bus, int last)
+static int snd_i2c_bit_readbyte(struct snd_i2c_bus *bus, int last)
 {
 	int i;
 	unsigned char data = 0;
@@ -252,9 +257,10 @@ static int snd_i2c_bit_readbyte(snd_i2c_bus_t *bus, int last)
 	return data;
 }
 
-static int snd_i2c_bit_sendbytes(snd_i2c_device_t *device, unsigned char *bytes, int count)
+static int snd_i2c_bit_sendbytes(struct snd_i2c_device *device,
+				 unsigned char *bytes, int count)
 {
-	snd_i2c_bus_t *bus = device->bus;
+	struct snd_i2c_bus *bus = device->bus;
 	int err, res = 0;
 
 	if (device->flags & SND_I2C_DEVICE_ADDRTEN)
@@ -275,9 +281,10 @@ static int snd_i2c_bit_sendbytes(snd_i2c_device_t *device, unsigned char *bytes,
 	return res;
 }
 
-static int snd_i2c_bit_readbytes(snd_i2c_device_t *device, unsigned char *bytes, int count)
+static int snd_i2c_bit_readbytes(struct snd_i2c_device *device,
+				 unsigned char *bytes, int count)
 {
-	snd_i2c_bus_t *bus = device->bus;
+	struct snd_i2c_bus *bus = device->bus;
 	int err, res = 0;
 
 	if (device->flags & SND_I2C_DEVICE_ADDRTEN)
@@ -299,7 +306,7 @@ static int snd_i2c_bit_readbytes(snd_i2c_device_t *device, unsigned char *bytes,
 	return res;
 }
 
-static int snd_i2c_bit_probeaddr(snd_i2c_bus_t *bus, unsigned short addr)
+static int snd_i2c_bit_probeaddr(struct snd_i2c_bus *bus, unsigned short addr)
 {
 	int err;
 
diff --git a/sound/i2c/l3/uda1341.c b/sound/i2c/l3/uda1341.c
index bc7eb23e615..746500e0695 100644
--- a/sound/i2c/l3/uda1341.c
+++ b/sound/i2c/l3/uda1341.c
@@ -17,7 +17,7 @@
  * 2002-05-12   Tomas Kasparek  another code cleanup
  */
 
-/* $Id: uda1341.c,v 1.17 2005/11/17 10:25:22 tiwai Exp $ */
+/* $Id: uda1341.c,v 1.18 2005/11/17 14:17:21 tiwai Exp $ */
 
 #include <sound/driver.h>
 #include <linux/module.h>
@@ -140,15 +140,13 @@ static const char ** uda1341_enum_names[] = {
 
 typedef int uda1341_cfg[CMD_LAST];
 
-typedef struct uda1341 uda1341_t;
-
 struct uda1341 {
 	int (*write) (struct l3_client *uda1341, unsigned short reg, unsigned short val);
 	int (*read) (struct l3_client *uda1341, unsigned short reg);        
 	unsigned char regs[uda1341_reg_last];
 	int active;
 	spinlock_t reg_lock;
-	snd_card_t *card;
+	struct snd_card *card;
 	uda1341_cfg cfg;
 #ifdef CONFIG_PM
 	unsigned char suspend_regs[uda1341_reg_last];
@@ -429,8 +427,8 @@ static const char *peak_value[] = {
 	"-8.76 dB", "-7.28 dB", "-5.81 dB", "-4.34 dB", "-2.88 dB", "-1.43 dB", "0.00 dB",
 };
 
-static void snd_uda1341_proc_read(snd_info_entry_t *entry, 
-				  snd_info_buffer_t * buffer)
+static void snd_uda1341_proc_read(struct snd_info_entry *entry, 
+				  struct snd_info_buffer *buffer)
 {
 	struct l3_client *clnt = entry->private_data;
 	struct uda1341 *uda = clnt->driver_data;
@@ -494,8 +492,8 @@ static void snd_uda1341_proc_read(snd_info_entry_t *entry,
 		snd_iprintf(buffer, "Input Amp. Gain ch 2: %s dB\n",  ig_small_value[uda->cfg[CMD_IG]]);
 }
 
-static void snd_uda1341_proc_regs_read(snd_info_entry_t *entry, 
-				       snd_info_buffer_t * buffer)
+static void snd_uda1341_proc_regs_read(struct snd_info_entry *entry, 
+				       struct snd_info_buffer *buffer)
 {
 	struct l3_client *clnt = entry->private_data;
 	struct uda1341 *uda = clnt->driver_data;		
@@ -514,9 +512,9 @@ static void snd_uda1341_proc_regs_read(snd_info_entry_t *entry,
 }
 #endif /* CONFIG_PROC_FS */
 
-static void __devinit snd_uda1341_proc_init(snd_card_t *card, struct l3_client *clnt)
+static void __devinit snd_uda1341_proc_init(struct snd_card *card, struct l3_client *clnt)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	if (! snd_card_proc_new(card, "uda1341", &entry))
 		snd_info_set_text_ops(entry, clnt, 1024, snd_uda1341_proc_read);
@@ -536,7 +534,8 @@ static void __devinit snd_uda1341_proc_init(snd_card_t *card, struct l3_client *
   .private_value = where | (reg << 5) | (shift << 9) | (mask << 12) | (invert << 18) \
 }
 
-static int snd_uda1341_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_uda1341_info_single(struct snd_kcontrol *kcontrol,
+				   struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 12) & 63;
 
@@ -547,10 +546,11 @@ static int snd_uda1341_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_uda1341_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_uda1341_get_single(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_value *ucontrol)
 {
 	struct l3_client *clnt = snd_kcontrol_chip(kcontrol);
-	uda1341_t *uda = clnt->driver_data;
+	struct uda1341 *uda = clnt->driver_data;
 	int where = kcontrol->private_value & 31;        
 	int mask = (kcontrol->private_value >> 12) & 63;
 	int invert = (kcontrol->private_value >> 18) & 1;
@@ -562,10 +562,11 @@ static int snd_uda1341_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
 	return 0;
 }
 
-static int snd_uda1341_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_uda1341_put_single(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_value *ucontrol)
 {
 	struct l3_client *clnt = snd_kcontrol_chip(kcontrol);
-	uda1341_t *uda = clnt->driver_data;
+	struct uda1341 *uda = clnt->driver_data;
 	int where = kcontrol->private_value & 31;        
 	int reg = (kcontrol->private_value >> 5) & 15;
 	int shift = (kcontrol->private_value >> 9) & 7;
@@ -591,7 +592,8 @@ static int snd_uda1341_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
   .private_value = where | (reg << 5) | (shift << 9) | (mask << 12) | (invert << 18) \
 }
 
-static int snd_uda1341_info_enum(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_uda1341_info_enum(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_info *uinfo)
 {
 	int where = kcontrol->private_value & 31;
 	const char **texts;
@@ -612,20 +614,22 @@ static int snd_uda1341_info_enum(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
 	return 0;
 }
 
-static int snd_uda1341_get_enum(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_uda1341_get_enum(struct snd_kcontrol *kcontrol,
+				struct snd_ctl_elem_value *ucontrol)
 {
 	struct l3_client *clnt = snd_kcontrol_chip(kcontrol);
-	uda1341_t *uda = clnt->driver_data;
+	struct uda1341 *uda = clnt->driver_data;
 	int where = kcontrol->private_value & 31;        
         
 	ucontrol->value.enumerated.item[0] = uda->cfg[where];	
 	return 0;
 }
 
-static int snd_uda1341_put_enum(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_uda1341_put_enum(struct snd_kcontrol *kcontrol,
+				struct snd_ctl_elem_value *ucontrol)
 {
 	struct l3_client *clnt = snd_kcontrol_chip(kcontrol);
-	uda1341_t *uda = clnt->driver_data;
+	struct uda1341 *uda = clnt->driver_data;
 	int where = kcontrol->private_value & 31;        
 	int reg = (kcontrol->private_value >> 5) & 15;
 	int shift = (kcontrol->private_value >> 9) & 7;
@@ -648,7 +652,8 @@ static int snd_uda1341_put_enum(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 }
 
 
-static int snd_uda1341_info_2regs(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_uda1341_info_2regs(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_info *uinfo)
 {
 	int mask_1 = (kcontrol->private_value >> 19) & 63;
 	int mask_2 = (kcontrol->private_value >> 25) & 63;
@@ -662,10 +667,11 @@ static int snd_uda1341_info_2regs(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_uda1341_get_2regs(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_uda1341_get_2regs(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
 	struct l3_client *clnt = snd_kcontrol_chip(kcontrol);
-	uda1341_t *uda = clnt->driver_data;
+	struct uda1341 *uda = clnt->driver_data;
 	int where = kcontrol->private_value & 31;
 	int mask_1 = (kcontrol->private_value >> 19) & 63;
 	int mask_2 = (kcontrol->private_value >> 25) & 63;        
@@ -680,10 +686,11 @@ static int snd_uda1341_get_2regs(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_uda1341_put_2regs(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_uda1341_put_2regs(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
 	struct l3_client *clnt = snd_kcontrol_chip(kcontrol);
-	uda1341_t *uda = clnt->driver_data;        
+	struct uda1341 *uda = clnt->driver_data;        
 	int where = kcontrol->private_value & 31;        
 	int reg_1 = (kcontrol->private_value >> 5) & 15;
 	int reg_2 = (kcontrol->private_value >> 9) & 15;        
@@ -716,7 +723,7 @@ static int snd_uda1341_put_2regs(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 
 /* }}} */
   
-static snd_kcontrol_new_t snd_uda1341_controls[] = {
+static struct snd_kcontrol_new snd_uda1341_controls[] = {
 	UDA1341_SINGLE("Master Playback Switch", CMD_MUTE, data0_2, 2, 1, 1),
 	UDA1341_SINGLE("Master Playback Volume", CMD_VOLUME, data0_0, 0, 63, 1),
 
@@ -748,20 +755,20 @@ static snd_kcontrol_new_t snd_uda1341_controls[] = {
 
 static void uda1341_free(struct l3_client *clnt)
 {
-	l3_detach_client(clnt); // calls kfree for driver_data (uda1341_t)
+	l3_detach_client(clnt); // calls kfree for driver_data (struct uda1341)
 	kfree(clnt);
 }
 
-static int uda1341_dev_free(snd_device_t *device)
+static int uda1341_dev_free(struct snd_device *device)
 {
 	struct l3_client *clnt = device->device_data;
 	uda1341_free(clnt);
 	return 0;
 }
 
-int __init snd_chip_uda1341_mixer_new(snd_card_t *card, struct l3_client **clntp)
+int __init snd_chip_uda1341_mixer_new(struct snd_card *card, struct l3_client **clntp)
 {
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free =     uda1341_dev_free,
 	};
 	struct l3_client *clnt;
@@ -792,7 +799,7 @@ int __init snd_chip_uda1341_mixer_new(snd_card_t *card, struct l3_client **clntp
 
 	*clntp = clnt;
 	strcpy(card->mixername, "UDA1341TS Mixer");
-	((uda1341_t *)uda1341->driver_data)->card = card;
+	((struct uda1341 *)clnt->driver_data)->card = card;
         
 	snd_uda1341_proc_init(card, clnt);
         
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c
index d351b3aa191..12ffffc9e81 100644
--- a/sound/i2c/other/ak4114.c
+++ b/sound/i2c/other/ak4114.c
@@ -37,7 +37,7 @@ MODULE_LICENSE("GPL");
 
 static void ak4114_stats(void *);
 
-static void reg_write(ak4114_t *ak4114, unsigned char reg, unsigned char val)
+static void reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char val)
 {
 	ak4114->write(ak4114->private_data, reg, val);
 	if (reg <= AK4114_REG_INT1_MASK)
@@ -46,13 +46,13 @@ static void reg_write(ak4114_t *ak4114, unsigned char reg, unsigned char val)
 		ak4114->txcsb[reg-AK4114_REG_RXCSB0] = val;
 }
 
-static inline unsigned char reg_read(ak4114_t *ak4114, unsigned char reg)
+static inline unsigned char reg_read(struct ak4114 *ak4114, unsigned char reg)
 {
 	return ak4114->read(ak4114->private_data, reg);
 }
 
 #if 0
-static void reg_dump(ak4114_t *ak4114)
+static void reg_dump(struct ak4114 *ak4114)
 {
 	int i;
 
@@ -62,7 +62,7 @@ static void reg_dump(ak4114_t *ak4114)
 }
 #endif
 
-static void snd_ak4114_free(ak4114_t *chip)
+static void snd_ak4114_free(struct ak4114 *chip)
 {
 	chip->init = 1;	/* don't schedule new work */
 	mb();
@@ -73,22 +73,22 @@ static void snd_ak4114_free(ak4114_t *chip)
 	kfree(chip);
 }
 
-static int snd_ak4114_dev_free(snd_device_t *device)
+static int snd_ak4114_dev_free(struct snd_device *device)
 {
-	ak4114_t *chip = device->device_data;
+	struct ak4114 *chip = device->device_data;
 	snd_ak4114_free(chip);
 	return 0;
 }
 
-int snd_ak4114_create(snd_card_t *card,
+int snd_ak4114_create(struct snd_card *card,
 		      ak4114_read_t *read, ak4114_write_t *write,
 		      unsigned char pgm[7], unsigned char txcsb[5],
-		      void *private_data, ak4114_t **r_ak4114)
+		      void *private_data, struct ak4114 **r_ak4114)
 {
-	ak4114_t *chip;
+	struct ak4114 *chip;
 	int err = 0;
 	unsigned char reg;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free =     snd_ak4114_dev_free,
 	};
 
@@ -129,7 +129,7 @@ int snd_ak4114_create(snd_card_t *card,
 	return err < 0 ? err : -EIO;
 }
 
-void snd_ak4114_reg_write(ak4114_t *chip, unsigned char reg, unsigned char mask, unsigned char val)
+void snd_ak4114_reg_write(struct ak4114 *chip, unsigned char reg, unsigned char mask, unsigned char val)
 {
 	if (reg <= AK4114_REG_INT1_MASK)
 		reg_write(chip, reg, (chip->regmap[reg] & ~mask) | val);
@@ -137,7 +137,7 @@ void snd_ak4114_reg_write(ak4114_t *chip, unsigned char reg, unsigned char mask,
 		reg_write(chip, reg, (chip->txcsb[reg] & ~mask) | val);
 }
 
-void snd_ak4114_reinit(ak4114_t *chip)
+void snd_ak4114_reinit(struct ak4114 *chip)
 {
 	unsigned char old = chip->regmap[AK4114_REG_PWRDN], reg;
 
@@ -176,8 +176,8 @@ static unsigned int external_rate(unsigned char rcs1)
 	}
 }
 
-static int snd_ak4114_in_error_info(snd_kcontrol_t *kcontrol,
-				    snd_ctl_elem_info_t *uinfo)
+static int snd_ak4114_in_error_info(struct snd_kcontrol *kcontrol,
+				    struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -186,10 +186,10 @@ static int snd_ak4114_in_error_info(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ak4114_in_error_get(snd_kcontrol_t *kcontrol,
-				   snd_ctl_elem_value_t *ucontrol)
+static int snd_ak4114_in_error_get(struct snd_kcontrol *kcontrol,
+				   struct snd_ctl_elem_value *ucontrol)
 {
-	ak4114_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
 	long *ptr;
 
 	spin_lock_irq(&chip->lock);
@@ -200,8 +200,8 @@ static int snd_ak4114_in_error_get(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ak4114_in_bit_info(snd_kcontrol_t *kcontrol,
-				  snd_ctl_elem_info_t *uinfo)
+static int snd_ak4114_in_bit_info(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -210,10 +210,10 @@ static int snd_ak4114_in_bit_info(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ak4114_in_bit_get(snd_kcontrol_t *kcontrol,
-				 snd_ctl_elem_value_t *ucontrol)
+static int snd_ak4114_in_bit_get(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
-	ak4114_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned char reg = kcontrol->private_value & 0xff;
 	unsigned char bit = (kcontrol->private_value >> 8) & 0xff;
 	unsigned char inv = (kcontrol->private_value >> 31) & 1;
@@ -222,8 +222,8 @@ static int snd_ak4114_in_bit_get(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ak4114_rate_info(snd_kcontrol_t *kcontrol,
-				snd_ctl_elem_info_t *uinfo)
+static int snd_ak4114_rate_info(struct snd_kcontrol *kcontrol,
+				struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -232,26 +232,26 @@ static int snd_ak4114_rate_info(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ak4114_rate_get(snd_kcontrol_t *kcontrol,
-			       snd_ctl_elem_value_t *ucontrol)
+static int snd_ak4114_rate_get(struct snd_kcontrol *kcontrol,
+			       struct snd_ctl_elem_value *ucontrol)
 {
-	ak4114_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.integer.value[0] = external_rate(reg_read(chip, AK4114_REG_RCS1));
 	return 0;
 }
 
-static int snd_ak4114_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ak4114_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_ak4114_spdif_get(snd_kcontrol_t * kcontrol,
-				snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4114_spdif_get(struct snd_kcontrol *kcontrol,
+				struct snd_ctl_elem_value *ucontrol)
 {
-	ak4114_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned i;
 
 	for (i = 0; i < AK4114_REG_RXCSB_SIZE; i++)
@@ -259,10 +259,10 @@ static int snd_ak4114_spdif_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_ak4114_spdif_playback_get(snd_kcontrol_t * kcontrol,
-					 snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4114_spdif_playback_get(struct snd_kcontrol *kcontrol,
+					 struct snd_ctl_elem_value *ucontrol)
 {
-	ak4114_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned i;
 
 	for (i = 0; i < AK4114_REG_TXCSB_SIZE; i++)
@@ -270,10 +270,10 @@ static int snd_ak4114_spdif_playback_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_ak4114_spdif_playback_put(snd_kcontrol_t * kcontrol,
-					 snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4114_spdif_playback_put(struct snd_kcontrol *kcontrol,
+					 struct snd_ctl_elem_value *ucontrol)
 {
-	ak4114_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned i;
 
 	for (i = 0; i < AK4114_REG_TXCSB_SIZE; i++)
@@ -281,21 +281,21 @@ static int snd_ak4114_spdif_playback_put(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_ak4114_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ak4114_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_ak4114_spdif_mask_get(snd_kcontrol_t * kcontrol,
-				      snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4114_spdif_mask_get(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_value *ucontrol)
 {
 	memset(ucontrol->value.iec958.status, 0xff, AK4114_REG_RXCSB_SIZE);
 	return 0;
 }
 
-static int snd_ak4114_spdif_pinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ak4114_spdif_pinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->value.integer.min = 0;
@@ -304,10 +304,10 @@ static int snd_ak4114_spdif_pinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_ak4114_spdif_pget(snd_kcontrol_t * kcontrol,
-				 snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4114_spdif_pget(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
-	ak4114_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned short tmp;
 
 	ucontrol->value.integer.value[0] = 0xf8f2;
@@ -319,17 +319,17 @@ static int snd_ak4114_spdif_pget(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_ak4114_spdif_qinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ak4114_spdif_qinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
 	uinfo->count = AK4114_REG_QSUB_SIZE;
 	return 0;
 }
 
-static int snd_ak4114_spdif_qget(snd_kcontrol_t * kcontrol,
-				 snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4114_spdif_qget(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
-	ak4114_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4114 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned i;
 
 	for (i = 0; i < AK4114_REG_QSUB_SIZE; i++)
@@ -338,14 +338,14 @@ static int snd_ak4114_spdif_qget(snd_kcontrol_t * kcontrol,
 }
 
 /* Don't forget to change AK4114_CONTROLS define!!! */
-static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = {
+static struct snd_kcontrol_new snd_ak4114_iec958_controls[] = {
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
 	.name =		"IEC958 Parity Errors",
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
 	.info =		snd_ak4114_in_error_info,
 	.get =		snd_ak4114_in_error_get,
-	.private_value = offsetof(ak4114_t, parity_errors),
+	.private_value = offsetof(struct ak4114, parity_errors),
 },
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
@@ -353,7 +353,7 @@ static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
 	.info =		snd_ak4114_in_error_info,
 	.get =		snd_ak4114_in_error_get,
-	.private_value = offsetof(ak4114_t, v_bit_errors),
+	.private_value = offsetof(struct ak4114, v_bit_errors),
 },
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
@@ -361,7 +361,7 @@ static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
 	.info =		snd_ak4114_in_error_info,
 	.get =		snd_ak4114_in_error_get,
-	.private_value = offsetof(ak4114_t, ccrc_errors),
+	.private_value = offsetof(struct ak4114, ccrc_errors),
 },
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
@@ -369,7 +369,7 @@ static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
 	.info =		snd_ak4114_in_error_info,
 	.get =		snd_ak4114_in_error_get,
-	.private_value = offsetof(ak4114_t, qcrc_errors),
+	.private_value = offsetof(struct ak4114, qcrc_errors),
 },
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
@@ -447,11 +447,11 @@ static snd_kcontrol_new_t snd_ak4114_iec958_controls[] = {
 }
 };
 
-int snd_ak4114_build(ak4114_t *ak4114,
-		     snd_pcm_substream_t *ply_substream,
-		     snd_pcm_substream_t *cap_substream)
+int snd_ak4114_build(struct ak4114 *ak4114,
+		     struct snd_pcm_substream *ply_substream,
+		     struct snd_pcm_substream *cap_substream)
 {
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 	unsigned int idx;
 	int err;
 
@@ -482,7 +482,7 @@ int snd_ak4114_build(ak4114_t *ak4114,
 	return 0;
 }
 
-int snd_ak4114_external_rate(ak4114_t *ak4114)
+int snd_ak4114_external_rate(struct ak4114 *ak4114)
 {
 	unsigned char rcs1;
 
@@ -490,9 +490,9 @@ int snd_ak4114_external_rate(ak4114_t *ak4114)
 	return external_rate(rcs1);
 }
 
-int snd_ak4114_check_rate_and_errors(ak4114_t *ak4114, unsigned int flags)
+int snd_ak4114_check_rate_and_errors(struct ak4114 *ak4114, unsigned int flags)
 {
-	snd_pcm_runtime_t *runtime = ak4114->capture_substream ? ak4114->capture_substream->runtime : NULL;
+	struct snd_pcm_runtime *runtime = ak4114->capture_substream ? ak4114->capture_substream->runtime : NULL;
 	unsigned long _flags;
 	int res = 0;
 	unsigned char rcs0, rcs1;
@@ -563,7 +563,7 @@ int snd_ak4114_check_rate_and_errors(ak4114_t *ak4114, unsigned int flags)
 
 static void ak4114_stats(void *data)
 {
-	ak4114_t *chip = (ak4114_t *)data;
+	struct ak4114 *chip = (struct ak4114 *)data;
 
 	if (chip->init)
 		return;
diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c
index 35b4584483a..4e45952dd95 100644
--- a/sound/i2c/other/ak4117.c
+++ b/sound/i2c/other/ak4117.c
@@ -37,20 +37,20 @@ MODULE_LICENSE("GPL");
 
 static void snd_ak4117_timer(unsigned long data);
 
-static void reg_write(ak4117_t *ak4117, unsigned char reg, unsigned char val)
+static void reg_write(struct ak4117 *ak4117, unsigned char reg, unsigned char val)
 {
 	ak4117->write(ak4117->private_data, reg, val);
 	if (reg < sizeof(ak4117->regmap))
 		ak4117->regmap[reg] = val;
 }
 
-static inline unsigned char reg_read(ak4117_t *ak4117, unsigned char reg)
+static inline unsigned char reg_read(struct ak4117 *ak4117, unsigned char reg)
 {
 	return ak4117->read(ak4117->private_data, reg);
 }
 
 #if 0
-static void reg_dump(ak4117_t *ak4117)
+static void reg_dump(struct ak4117 *ak4117)
 {
 	int i;
 
@@ -60,26 +60,26 @@ static void reg_dump(ak4117_t *ak4117)
 }
 #endif
 
-static void snd_ak4117_free(ak4117_t *chip)
+static void snd_ak4117_free(struct ak4117 *chip)
 {
 	del_timer(&chip->timer);
 	kfree(chip);
 }
 
-static int snd_ak4117_dev_free(snd_device_t *device)
+static int snd_ak4117_dev_free(struct snd_device *device)
 {
-	ak4117_t *chip = device->device_data;
+	struct ak4117 *chip = device->device_data;
 	snd_ak4117_free(chip);
 	return 0;
 }
 
-int snd_ak4117_create(snd_card_t *card, ak4117_read_t *read, ak4117_write_t *write,
-		      unsigned char pgm[5], void *private_data, ak4117_t **r_ak4117)
+int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t *write,
+		      unsigned char pgm[5], void *private_data, struct ak4117 **r_ak4117)
 {
-	ak4117_t *chip;
+	struct ak4117 *chip;
 	int err = 0;
 	unsigned char reg;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free =     snd_ak4117_dev_free,
 	};
 
@@ -115,14 +115,14 @@ int snd_ak4117_create(snd_card_t *card, ak4117_read_t *read, ak4117_write_t *wri
 	return err < 0 ? err : -EIO;
 }
 
-void snd_ak4117_reg_write(ak4117_t *chip, unsigned char reg, unsigned char mask, unsigned char val)
+void snd_ak4117_reg_write(struct ak4117 *chip, unsigned char reg, unsigned char mask, unsigned char val)
 {
 	if (reg >= 5)
 		return;
 	reg_write(chip, reg, (chip->regmap[reg] & ~mask) | val);
 }
 
-void snd_ak4117_reinit(ak4117_t *chip)
+void snd_ak4117_reinit(struct ak4117 *chip)
 {
 	unsigned char old = chip->regmap[AK4117_REG_PWRDN], reg;
 
@@ -157,8 +157,8 @@ static unsigned int external_rate(unsigned char rcs1)
 	}
 }
 
-static int snd_ak4117_in_error_info(snd_kcontrol_t *kcontrol,
-				    snd_ctl_elem_info_t *uinfo)
+static int snd_ak4117_in_error_info(struct snd_kcontrol *kcontrol,
+				    struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -167,10 +167,10 @@ static int snd_ak4117_in_error_info(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ak4117_in_error_get(snd_kcontrol_t *kcontrol,
-				   snd_ctl_elem_value_t *ucontrol)
+static int snd_ak4117_in_error_get(struct snd_kcontrol *kcontrol,
+				   struct snd_ctl_elem_value *ucontrol)
 {
-	ak4117_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
 	long *ptr;
 
 	spin_lock_irq(&chip->lock);
@@ -181,8 +181,8 @@ static int snd_ak4117_in_error_get(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ak4117_in_bit_info(snd_kcontrol_t *kcontrol,
-				  snd_ctl_elem_info_t *uinfo)
+static int snd_ak4117_in_bit_info(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -191,10 +191,10 @@ static int snd_ak4117_in_bit_info(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ak4117_in_bit_get(snd_kcontrol_t *kcontrol,
-				 snd_ctl_elem_value_t *ucontrol)
+static int snd_ak4117_in_bit_get(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
-	ak4117_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned char reg = kcontrol->private_value & 0xff;
 	unsigned char bit = (kcontrol->private_value >> 8) & 0xff;
 	unsigned char inv = (kcontrol->private_value >> 31) & 1;
@@ -203,8 +203,8 @@ static int snd_ak4117_in_bit_get(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ak4117_rx_info(snd_kcontrol_t *kcontrol,
-			      snd_ctl_elem_info_t *uinfo)
+static int snd_ak4117_rx_info(struct snd_kcontrol *kcontrol,
+			      struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -213,19 +213,19 @@ static int snd_ak4117_rx_info(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ak4117_rx_get(snd_kcontrol_t *kcontrol,
-			     snd_ctl_elem_value_t *ucontrol)
+static int snd_ak4117_rx_get(struct snd_kcontrol *kcontrol,
+			     struct snd_ctl_elem_value *ucontrol)
 {
-	ak4117_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.integer.value[0] = (chip->regmap[AK4117_REG_IO] & AK4117_IPS) ? 1 : 0;
 	return 0;
 }
 
-static int snd_ak4117_rx_put(snd_kcontrol_t *kcontrol,
-			     snd_ctl_elem_value_t *ucontrol)
+static int snd_ak4117_rx_put(struct snd_kcontrol *kcontrol,
+			     struct snd_ctl_elem_value *ucontrol)
 {
-	ak4117_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
 	int change;
 	u8 old_val;
 	
@@ -238,8 +238,8 @@ static int snd_ak4117_rx_put(snd_kcontrol_t *kcontrol,
 	return change;
 }
 
-static int snd_ak4117_rate_info(snd_kcontrol_t *kcontrol,
-				snd_ctl_elem_info_t *uinfo)
+static int snd_ak4117_rate_info(struct snd_kcontrol *kcontrol,
+				struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -248,26 +248,26 @@ static int snd_ak4117_rate_info(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ak4117_rate_get(snd_kcontrol_t *kcontrol,
-			       snd_ctl_elem_value_t *ucontrol)
+static int snd_ak4117_rate_get(struct snd_kcontrol *kcontrol,
+			       struct snd_ctl_elem_value *ucontrol)
 {
-	ak4117_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.integer.value[0] = external_rate(reg_read(chip, AK4117_REG_RCS1));
 	return 0;
 }
 
-static int snd_ak4117_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ak4117_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_ak4117_spdif_get(snd_kcontrol_t * kcontrol,
-				snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4117_spdif_get(struct snd_kcontrol *kcontrol,
+				struct snd_ctl_elem_value *ucontrol)
 {
-	ak4117_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned i;
 
 	for (i = 0; i < AK4117_REG_RXCSB_SIZE; i++)
@@ -275,21 +275,21 @@ static int snd_ak4117_spdif_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_ak4117_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ak4117_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_ak4117_spdif_mask_get(snd_kcontrol_t * kcontrol,
-				      snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4117_spdif_mask_get(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_value *ucontrol)
 {
 	memset(ucontrol->value.iec958.status, 0xff, AK4117_REG_RXCSB_SIZE);
 	return 0;
 }
 
-static int snd_ak4117_spdif_pinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ak4117_spdif_pinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->value.integer.min = 0;
@@ -298,10 +298,10 @@ static int snd_ak4117_spdif_pinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_ak4117_spdif_pget(snd_kcontrol_t * kcontrol,
-				 snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4117_spdif_pget(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
-	ak4117_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned short tmp;
 
 	ucontrol->value.integer.value[0] = 0xf8f2;
@@ -313,17 +313,17 @@ static int snd_ak4117_spdif_pget(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_ak4117_spdif_qinfo(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ak4117_spdif_qinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
 	uinfo->count = AK4117_REG_QSUB_SIZE;
 	return 0;
 }
 
-static int snd_ak4117_spdif_qget(snd_kcontrol_t * kcontrol,
-				 snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4117_spdif_qget(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
-	ak4117_t *chip = snd_kcontrol_chip(kcontrol);
+	struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned i;
 
 	for (i = 0; i < AK4117_REG_QSUB_SIZE; i++)
@@ -332,14 +332,14 @@ static int snd_ak4117_spdif_qget(snd_kcontrol_t * kcontrol,
 }
 
 /* Don't forget to change AK4117_CONTROLS define!!! */
-static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = {
+static struct snd_kcontrol_new snd_ak4117_iec958_controls[] = {
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
 	.name =		"IEC958 Parity Errors",
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
 	.info =		snd_ak4117_in_error_info,
 	.get =		snd_ak4117_in_error_get,
-	.private_value = offsetof(ak4117_t, parity_errors),
+	.private_value = offsetof(struct ak4117, parity_errors),
 },
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
@@ -347,7 +347,7 @@ static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
 	.info =		snd_ak4117_in_error_info,
 	.get =		snd_ak4117_in_error_get,
-	.private_value = offsetof(ak4117_t, v_bit_errors),
+	.private_value = offsetof(struct ak4117, v_bit_errors),
 },
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
@@ -355,7 +355,7 @@ static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
 	.info =		snd_ak4117_in_error_info,
 	.get =		snd_ak4117_in_error_get,
-	.private_value = offsetof(ak4117_t, ccrc_errors),
+	.private_value = offsetof(struct ak4117, ccrc_errors),
 },
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
@@ -363,7 +363,7 @@ static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
 	.info =		snd_ak4117_in_error_info,
 	.get =		snd_ak4117_in_error_get,
-	.private_value = offsetof(ak4117_t, qcrc_errors),
+	.private_value = offsetof(struct ak4117, qcrc_errors),
 },
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
@@ -434,9 +434,9 @@ static snd_kcontrol_new_t snd_ak4117_iec958_controls[] = {
 }
 };
 
-int snd_ak4117_build(ak4117_t *ak4117, snd_pcm_substream_t *cap_substream)
+int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *cap_substream)
 {
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 	unsigned int idx;
 	int err;
 
@@ -456,7 +456,7 @@ int snd_ak4117_build(ak4117_t *ak4117, snd_pcm_substream_t *cap_substream)
 	return 0;
 }
 
-int snd_ak4117_external_rate(ak4117_t *ak4117)
+int snd_ak4117_external_rate(struct ak4117 *ak4117)
 {
 	unsigned char rcs1;
 
@@ -464,9 +464,9 @@ int snd_ak4117_external_rate(ak4117_t *ak4117)
 	return external_rate(rcs1);
 }
 
-int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags)
+int snd_ak4117_check_rate_and_errors(struct ak4117 *ak4117, unsigned int flags)
 {
-	snd_pcm_runtime_t *runtime = ak4117->substream ? ak4117->substream->runtime : NULL;
+	struct snd_pcm_runtime *runtime = ak4117->substream ? ak4117->substream->runtime : NULL;
 	unsigned long _flags;
 	int res = 0;
 	unsigned char rcs0, rcs1, rcs2;
@@ -542,7 +542,7 @@ int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags)
 
 static void snd_ak4117_timer(unsigned long data)
 {
-	ak4117_t *chip = (ak4117_t *)data;
+	struct ak4117 *chip = (struct ak4117 *)data;
 
 	if (chip->init)
 		return;
diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c
index db2b7274a9d..045e32a311e 100644
--- a/sound/i2c/other/ak4xxx-adda.c
+++ b/sound/i2c/other/ak4xxx-adda.c
@@ -34,7 +34,7 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>, Takashi Iwai <tiwai@suse.de>");
 MODULE_DESCRIPTION("Routines for control of AK452x / AK43xx  AD/DA converters");
 MODULE_LICENSE("GPL");
 
-void snd_akm4xxx_write(akm4xxx_t *ak, int chip, unsigned char reg, unsigned char val)
+void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val)
 {
 	ak->ops.lock(ak, chip);
 	ak->ops.write(ak, chip, reg, val);
@@ -58,7 +58,7 @@ void snd_akm4xxx_write(akm4xxx_t *ak, int chip, unsigned char reg, unsigned char
  *
  * assert the reset operation and restores the register values to the chips.
  */
-void snd_akm4xxx_reset(akm4xxx_t *ak, int state)
+void snd_akm4xxx_reset(struct snd_akm4xxx *ak, int state)
 {
 	unsigned int chip;
 	unsigned char reg;
@@ -109,7 +109,7 @@ void snd_akm4xxx_reset(akm4xxx_t *ak, int state)
 /*
  * initialize all the ak4xxx chips
  */
-void snd_akm4xxx_init(akm4xxx_t *ak)
+void snd_akm4xxx_init(struct snd_akm4xxx *ak)
 {
 	static unsigned char inits_ak4524[] = {
 		0x00, 0x07, /* 0: all power up */
@@ -247,7 +247,8 @@ void snd_akm4xxx_init(akm4xxx_t *ak)
 #define AK_COMPOSE(chip,addr,shift,mask) (((chip) << 8) | (addr) | ((shift) << 16) | ((mask) << 24))
 #define AK_INVERT 			(1<<23)
 
-static int snd_akm4xxx_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_akm4xxx_volume_info(struct snd_kcontrol *kcontrol,
+				   struct snd_ctl_elem_info *uinfo)
 {
 	unsigned int mask = AK_GET_MASK(kcontrol->private_value);
 
@@ -258,9 +259,10 @@ static int snd_akm4xxx_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_akm4xxx_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_akm4xxx_volume_get(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_value *ucontrol)
 {
-	akm4xxx_t *ak = snd_kcontrol_chip(kcontrol);
+	struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
 	int chip = AK_GET_CHIP(kcontrol->private_value);
 	int addr = AK_GET_ADDR(kcontrol->private_value);
 	int invert = AK_GET_INVERT(kcontrol->private_value);
@@ -271,9 +273,10 @@ static int snd_akm4xxx_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_akm4xxx_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_akm4xxx_volume_put(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_value *ucontrol)
 {
-	akm4xxx_t *ak = snd_kcontrol_chip(kcontrol);
+	struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
 	int chip = AK_GET_CHIP(kcontrol->private_value);
 	int addr = AK_GET_ADDR(kcontrol->private_value);
 	int invert = AK_GET_INVERT(kcontrol->private_value);
@@ -289,7 +292,8 @@ static int snd_akm4xxx_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
 	return change;
 }
 
-static int snd_akm4xxx_ipga_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_akm4xxx_ipga_gain_info(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -298,18 +302,20 @@ static int snd_akm4xxx_ipga_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf
 	return 0;
 }
 
-static int snd_akm4xxx_ipga_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_akm4xxx_ipga_gain_get(struct snd_kcontrol *kcontrol,
+				     struct snd_ctl_elem_value *ucontrol)
 {
-	akm4xxx_t *ak = snd_kcontrol_chip(kcontrol);
+	struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
 	int chip = AK_GET_CHIP(kcontrol->private_value);
 	int addr = AK_GET_ADDR(kcontrol->private_value);
 	ucontrol->value.integer.value[0] = snd_akm4xxx_get_ipga(ak, chip, addr) & 0x7f;
 	return 0;
 }
 
-static int snd_akm4xxx_ipga_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_akm4xxx_ipga_gain_put(struct snd_kcontrol *kcontrol,
+				     struct snd_ctl_elem_value *ucontrol)
 {
-	akm4xxx_t *ak = snd_kcontrol_chip(kcontrol);
+	struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
 	int chip = AK_GET_CHIP(kcontrol->private_value);
 	int addr = AK_GET_ADDR(kcontrol->private_value);
 	unsigned char nval = (ucontrol->value.integer.value[0] % 37) | 0x80;
@@ -319,7 +325,8 @@ static int snd_akm4xxx_ipga_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_valu
 	return change;
 }
 
-static int snd_akm4xxx_deemphasis_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int snd_akm4xxx_deemphasis_info(struct snd_kcontrol *kcontrol,
+				       struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[4] = {
 		"44.1kHz", "Off", "48kHz", "32kHz",
@@ -333,9 +340,10 @@ static int snd_akm4xxx_deemphasis_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_in
 	return 0;
 }
 
-static int snd_akm4xxx_deemphasis_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_akm4xxx_deemphasis_get(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_value *ucontrol)
 {
-	akm4xxx_t *ak = snd_kcontrol_chip(kcontrol);
+	struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
 	int chip = AK_GET_CHIP(kcontrol->private_value);
 	int addr = AK_GET_ADDR(kcontrol->private_value);
 	int shift = AK_GET_SHIFT(kcontrol->private_value);
@@ -343,9 +351,10 @@ static int snd_akm4xxx_deemphasis_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
 	return 0;
 }
 
-static int snd_akm4xxx_deemphasis_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_akm4xxx_deemphasis_put(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_value *ucontrol)
 {
-	akm4xxx_t *ak = snd_kcontrol_chip(kcontrol);
+	struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol);
 	int chip = AK_GET_CHIP(kcontrol->private_value);
 	int addr = AK_GET_ADDR(kcontrol->private_value);
 	int shift = AK_GET_SHIFT(kcontrol->private_value);
@@ -363,10 +372,10 @@ static int snd_akm4xxx_deemphasis_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_val
  * build AK4xxx controls
  */
 
-int snd_akm4xxx_build_controls(akm4xxx_t *ak)
+int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak)
 {
 	unsigned int idx, num_emphs;
-	snd_kcontrol_t *ctl;
+	struct snd_kcontrol *ctl;
 	int err;
 
 	ctl = kmalloc(sizeof(*ctl), GFP_KERNEL);
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c
index 0f05a2b9a37..4c2fd14c105 100644
--- a/sound/i2c/other/tea575x-tuner.c
+++ b/sound/i2c/other/tea575x-tuner.c
@@ -58,7 +58,7 @@ MODULE_LICENSE("GPL");
  * lowlevel part
  */
 
-static void snd_tea575x_set_freq(tea575x_t *tea)
+static void snd_tea575x_set_freq(struct snd_tea575x *tea)
 {
 	unsigned long freq;
 
@@ -89,7 +89,7 @@ static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
 			     unsigned int cmd, unsigned long data)
 {
 	struct video_device *dev = video_devdata(file);
-	tea575x_t *tea = video_get_drvdata(dev);
+	struct snd_tea575x *tea = video_get_drvdata(dev);
 	void __user *arg = (void __user *)data;
 	
 	switch(cmd) {
@@ -175,7 +175,7 @@ static void snd_tea575x_release(struct video_device *vfd)
 /*
  * initialize all the tea575x chips
  */
-void snd_tea575x_init(tea575x_t *tea)
+void snd_tea575x_init(struct snd_tea575x *tea)
 {
 	unsigned int val;
 
@@ -209,7 +209,7 @@ void snd_tea575x_init(tea575x_t *tea)
 	snd_tea575x_set_freq(tea);
 }
 
-void snd_tea575x_exit(tea575x_t *tea)
+void snd_tea575x_exit(struct snd_tea575x *tea)
 {
 	if (tea->vd_registered) {
 		video_unregister_device(&tea->vd);
diff --git a/sound/i2c/tea6330t.c b/sound/i2c/tea6330t.c
index 7bd4948c2a3..ae5b1e3a68c 100644
--- a/sound/i2c/tea6330t.c
+++ b/sound/i2c/tea6330t.c
@@ -44,18 +44,20 @@ MODULE_LICENSE("GPL");
 #define   TEA6330T_GMU			0x80	/* mute control, general mute */
 #define   TEA6330T_EQN			0x40	/* equalizer switchover (0=equalizer-on) */
 
-typedef struct {
-	snd_i2c_device_t *device;
-	snd_i2c_bus_t *bus;
+
+struct tea6330t {
+	struct snd_i2c_device *device;
+	struct snd_i2c_bus *bus;
 	int equalizer;
 	int fader;
 	unsigned char regs[8];
 	unsigned char mleft, mright;
 	unsigned char bass, treble;
 	unsigned char max_bass, max_treble;
-} tea6330t_t;
+};
+
 
-int snd_tea6330t_detect(snd_i2c_bus_t *bus, int equalizer)
+int snd_tea6330t_detect(struct snd_i2c_bus *bus, int equalizer)
 {
 	int res;
 
@@ -66,7 +68,7 @@ int snd_tea6330t_detect(snd_i2c_bus_t *bus, int equalizer)
 }
 
 #if 0
-static void snd_tea6330t_set(tea6330t_t *tea,
+static void snd_tea6330t_set(struct tea6330t *tea,
 			     unsigned char addr, unsigned char value)
 {
 #if 0
@@ -81,7 +83,8 @@ static void snd_tea6330t_set(tea6330t_t *tea,
   .info = snd_tea6330t_info_master_volume, \
   .get = snd_tea6330t_get_master_volume, .put = snd_tea6330t_put_master_volume }
 
-static int snd_tea6330t_info_master_volume(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_tea6330t_info_master_volume(struct snd_kcontrol *kcontrol,
+					   struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
@@ -90,9 +93,10 @@ static int snd_tea6330t_info_master_volume(snd_kcontrol_t *kcontrol, snd_ctl_ele
 	return 0;
 }
 
-static int snd_tea6330t_get_master_volume(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_tea6330t_get_master_volume(struct snd_kcontrol *kcontrol,
+					  struct snd_ctl_elem_value *ucontrol)
 {
-	tea6330t_t *tea = snd_kcontrol_chip(kcontrol);
+	struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
 	
 	snd_i2c_lock(tea->bus);
 	ucontrol->value.integer.value[0] = tea->mleft - 0x14;
@@ -101,9 +105,10 @@ static int snd_tea6330t_get_master_volume(snd_kcontrol_t * kcontrol, snd_ctl_ele
 	return 0;
 }
 
-static int snd_tea6330t_put_master_volume(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_tea6330t_put_master_volume(struct snd_kcontrol *kcontrol,
+					  struct snd_ctl_elem_value *ucontrol)
 {
-	tea6330t_t *tea = snd_kcontrol_chip(kcontrol);
+	struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
 	int change, count, err;
 	unsigned char bytes[3];
 	unsigned char val1, val2;
@@ -137,7 +142,8 @@ static int snd_tea6330t_put_master_volume(snd_kcontrol_t * kcontrol, snd_ctl_ele
   .info = snd_tea6330t_info_master_switch, \
   .get = snd_tea6330t_get_master_switch, .put = snd_tea6330t_put_master_switch }
 
-static int snd_tea6330t_info_master_switch(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_tea6330t_info_master_switch(struct snd_kcontrol *kcontrol,
+					   struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 2;
@@ -146,9 +152,10 @@ static int snd_tea6330t_info_master_switch(snd_kcontrol_t *kcontrol, snd_ctl_ele
 	return 0;
 }
 
-static int snd_tea6330t_get_master_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_tea6330t_get_master_switch(struct snd_kcontrol *kcontrol,
+					  struct snd_ctl_elem_value *ucontrol)
 {
-	tea6330t_t *tea = snd_kcontrol_chip(kcontrol);
+	struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
 	
 	snd_i2c_lock(tea->bus);
 	ucontrol->value.integer.value[0] = tea->regs[TEA6330T_SADDR_VOLUME_LEFT] == 0 ? 0 : 1;
@@ -157,9 +164,10 @@ static int snd_tea6330t_get_master_switch(snd_kcontrol_t * kcontrol, snd_ctl_ele
 	return 0;
 }
 
-static int snd_tea6330t_put_master_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_tea6330t_put_master_switch(struct snd_kcontrol *kcontrol,
+					  struct snd_ctl_elem_value *ucontrol)
 {
-	tea6330t_t *tea = snd_kcontrol_chip(kcontrol);
+	struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
 	int change, err;
 	unsigned char bytes[3];
 	unsigned char oval1, oval2, val1, val2;
@@ -186,9 +194,10 @@ static int snd_tea6330t_put_master_switch(snd_kcontrol_t * kcontrol, snd_ctl_ele
   .info = snd_tea6330t_info_bass, \
   .get = snd_tea6330t_get_bass, .put = snd_tea6330t_put_bass }
 
-static int snd_tea6330t_info_bass(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_tea6330t_info_bass(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_info *uinfo)
 {
-	tea6330t_t *tea = snd_kcontrol_chip(kcontrol);
+	struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
 
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -197,17 +206,19 @@ static int snd_tea6330t_info_bass(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_tea6330t_get_bass(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_tea6330t_get_bass(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
-	tea6330t_t *tea = snd_kcontrol_chip(kcontrol);
+	struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.integer.value[0] = tea->bass;
 	return 0;
 }
 
-static int snd_tea6330t_put_bass(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_tea6330t_put_bass(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
-	tea6330t_t *tea = snd_kcontrol_chip(kcontrol);
+	struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
 	int change, err;
 	unsigned char bytes[2];
 	unsigned char val1;
@@ -230,9 +241,10 @@ static int snd_tea6330t_put_bass(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
   .info = snd_tea6330t_info_treble, \
   .get = snd_tea6330t_get_treble, .put = snd_tea6330t_put_treble }
 
-static int snd_tea6330t_info_treble(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_tea6330t_info_treble(struct snd_kcontrol *kcontrol,
+				    struct snd_ctl_elem_info *uinfo)
 {
-	tea6330t_t *tea = snd_kcontrol_chip(kcontrol);
+	struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
 
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -241,17 +253,19 @@ static int snd_tea6330t_info_treble(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
 	return 0;
 }
 
-static int snd_tea6330t_get_treble(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_tea6330t_get_treble(struct snd_kcontrol *kcontrol,
+				   struct snd_ctl_elem_value *ucontrol)
 {
-	tea6330t_t *tea = snd_kcontrol_chip(kcontrol);
+	struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.integer.value[0] = tea->treble;
 	return 0;
 }
 
-static int snd_tea6330t_put_treble(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_tea6330t_put_treble(struct snd_kcontrol *kcontrol,
+				   struct snd_ctl_elem_value *ucontrol)
 {
-	tea6330t_t *tea = snd_kcontrol_chip(kcontrol);
+	struct tea6330t *tea = snd_kcontrol_chip(kcontrol);
 	int change, err;
 	unsigned char bytes[2];
 	unsigned char val1;
@@ -269,25 +283,25 @@ static int snd_tea6330t_put_treble(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
 	return change;
 }
 
-static snd_kcontrol_new_t snd_tea6330t_controls[] = {
+static struct snd_kcontrol_new snd_tea6330t_controls[] = {
 TEA6330T_MASTER_SWITCH("Master Playback Switch", 0),
 TEA6330T_MASTER_VOLUME("Master Playback Volume", 0),
 TEA6330T_BASS("Tone Control - Bass", 0),
 TEA6330T_TREBLE("Tone Control - Treble", 0)
 };
 
-static void snd_tea6330_free(snd_i2c_device_t *device)
+static void snd_tea6330_free(struct snd_i2c_device *device)
 {
 	kfree(device->private_data);
 }
                                         
-int snd_tea6330t_update_mixer(snd_card_t * card,
-			      snd_i2c_bus_t *bus,
+int snd_tea6330t_update_mixer(struct snd_card *card,
+			      struct snd_i2c_bus *bus,
 			      int equalizer, int fader)
 {
-	snd_i2c_device_t *device;
-	tea6330t_t *tea;
-	snd_kcontrol_new_t *knew;
+	struct snd_i2c_device *device;
+	struct tea6330t *tea;
+	struct snd_kcontrol_new *knew;
 	unsigned int idx;
 	int err = -ENOMEM;
 	u8 default_treble, default_bass;
-- 
cgit v1.2.3-70-g09d2


From dc4cafbadad1ae2322e598f2cb72720ef4095fee Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:19:28 +0100
Subject: [ALSA] Remove xxx_t typedefs: I2C drivers

Modules: AK4114 receiver,AK4117 receiver,AK4XXX AD/DA converters

[Missing files in last commit]
Remove xxx_t typedefs from the i2c drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/ak4114.h      | 30 ++++++++++++++----------------
 include/sound/ak4117.h      | 24 +++++++++++-------------
 include/sound/ak4xxx-adda.h | 22 +++++++++++-----------
 3 files changed, 36 insertions(+), 40 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/ak4114.h b/include/sound/ak4114.h
index f3f2c3e5ae5..11702aa0bea 100644
--- a/include/sound/ak4114.h
+++ b/include/sound/ak4114.h
@@ -163,10 +163,8 @@
 typedef void (ak4114_write_t)(void *private_data, unsigned char addr, unsigned char data);
 typedef unsigned char (ak4114_read_t)(void *private_data, unsigned char addr);
 
-typedef struct ak4114 ak4114_t;
-
 struct ak4114 {
-	snd_card_t * card;
+	struct snd_card *card;
 	ak4114_write_t * write;
 	ak4114_read_t * read;
 	void * private_data;
@@ -174,9 +172,9 @@ struct ak4114 {
 	spinlock_t lock;
 	unsigned char regmap[7];
 	unsigned char txcsb[5];
-	snd_kcontrol_t *kctls[AK4114_CONTROLS];
-	snd_pcm_substream_t *playback_substream;
-	snd_pcm_substream_t *capture_substream;
+	struct snd_kcontrol *kctls[AK4114_CONTROLS];
+	struct snd_pcm_substream *playback_substream;
+	struct snd_pcm_substream *capture_substream;
 	unsigned long parity_errors;
 	unsigned long v_bit_errors;
 	unsigned long qcrc_errors;
@@ -186,20 +184,20 @@ struct ak4114 {
 	struct workqueue_struct *workqueue;
 	struct work_struct work;
 	void *change_callback_private;
-	void (*change_callback)(ak4114_t *ak4114, unsigned char c0, unsigned char c1);
+	void (*change_callback)(struct ak4114 *ak4114, unsigned char c0, unsigned char c1);
 };
 
-int snd_ak4114_create(snd_card_t *card,
+int snd_ak4114_create(struct snd_card *card,
 		      ak4114_read_t *read, ak4114_write_t *write,
 		      unsigned char pgm[7], unsigned char txcsb[5],
-		      void *private_data, ak4114_t **r_ak4114);
-void snd_ak4114_reg_write(ak4114_t *ak4114, unsigned char reg, unsigned char mask, unsigned char val);
-void snd_ak4114_reinit(ak4114_t *ak4114);
-int snd_ak4114_build(ak4114_t *ak4114,
-		     snd_pcm_substream_t *playback_substream,
-                     snd_pcm_substream_t *capture_substream);
-int snd_ak4114_external_rate(ak4114_t *ak4114);
-int snd_ak4114_check_rate_and_errors(ak4114_t *ak4114, unsigned int flags);
+		      void *private_data, struct ak4114 **r_ak4114);
+void snd_ak4114_reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char mask, unsigned char val);
+void snd_ak4114_reinit(struct ak4114 *ak4114);
+int snd_ak4114_build(struct ak4114 *ak4114,
+		     struct snd_pcm_substream *playback_substream,
+                     struct snd_pcm_substream *capture_substream);
+int snd_ak4114_external_rate(struct ak4114 *ak4114);
+int snd_ak4114_check_rate_and_errors(struct ak4114 *ak4114, unsigned int flags);
 
 #endif /* __SOUND_AK4114_H */
 
diff --git a/include/sound/ak4117.h b/include/sound/ak4117.h
index 9e1dab17c33..2b96c32f06f 100644
--- a/include/sound/ak4117.h
+++ b/include/sound/ak4117.h
@@ -155,18 +155,16 @@
 typedef void (ak4117_write_t)(void *private_data, unsigned char addr, unsigned char data);
 typedef unsigned char (ak4117_read_t)(void *private_data, unsigned char addr);
 
-typedef struct ak4117 ak4117_t;
-
 struct ak4117 {
-	snd_card_t * card;
+	struct snd_card *card;
 	ak4117_write_t * write;
 	ak4117_read_t * read;
 	void * private_data;
 	unsigned int init: 1;
 	spinlock_t lock;
 	unsigned char regmap[5];
-	snd_kcontrol_t *kctls[AK4117_CONTROLS];
-	snd_pcm_substream_t *substream;
+	struct snd_kcontrol *kctls[AK4117_CONTROLS];
+	struct snd_pcm_substream *substream;
 	unsigned long parity_errors;
 	unsigned long v_bit_errors;
 	unsigned long qcrc_errors;
@@ -176,16 +174,16 @@ struct ak4117 {
 	unsigned char rcs2;
 	struct timer_list timer;	/* statistic timer */
 	void *change_callback_private;
-	void (*change_callback)(ak4117_t *ak4117, unsigned char c0, unsigned char c1);
+	void (*change_callback)(struct ak4117 *ak4117, unsigned char c0, unsigned char c1);
 };
 
-int snd_ak4117_create(snd_card_t *card, ak4117_read_t *read, ak4117_write_t *write,
-		      unsigned char pgm[5], void *private_data, ak4117_t **r_ak4117);
-void snd_ak4117_reg_write(ak4117_t *ak4117, unsigned char reg, unsigned char mask, unsigned char val);
-void snd_ak4117_reinit(ak4117_t *ak4117);
-int snd_ak4117_build(ak4117_t *ak4117, snd_pcm_substream_t *capture_substream);
-int snd_ak4117_external_rate(ak4117_t *ak4117);
-int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags);
+int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t *write,
+		      unsigned char pgm[5], void *private_data, struct ak4117 **r_ak4117);
+void snd_ak4117_reg_write(struct ak4117 *ak4117, unsigned char reg, unsigned char mask, unsigned char val);
+void snd_ak4117_reinit(struct ak4117 *ak4117);
+int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *capture_substream);
+int snd_ak4117_external_rate(struct ak4117 *ak4117);
+int snd_ak4117_check_rate_and_errors(struct ak4117 *ak4117, unsigned int flags);
 
 #endif /* __SOUND_AK4117_H */
 
diff --git a/include/sound/ak4xxx-adda.h b/include/sound/ak4xxx-adda.h
index e94ac028231..3bf5911fe82 100644
--- a/include/sound/ak4xxx-adda.h
+++ b/include/sound/ak4xxx-adda.h
@@ -27,20 +27,20 @@
 #define AK4XXX_MAX_CHIPS	4
 #endif
 
-typedef struct snd_akm4xxx akm4xxx_t;
+struct snd_akm4xxx;
 
 struct snd_ak4xxx_ops {
-	void (*lock)(akm4xxx_t *ak, int chip);
-	void (*unlock)(akm4xxx_t *ak, int chip);
-	void (*write)(akm4xxx_t *ak, int chip, unsigned char reg, unsigned char val);
-	// unsigned char (*read)(akm4xxx_t *ak, int chip, unsigned char reg);
-	void (*set_rate_val)(akm4xxx_t *ak, unsigned int rate);
+	void (*lock)(struct snd_akm4xxx *ak, int chip);
+	void (*unlock)(struct snd_akm4xxx *ak, int chip);
+	void (*write)(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val);
+	// unsigned char (*read)(struct snd_akm4xxx *ak, int chip, unsigned char reg);
+	void (*set_rate_val)(struct snd_akm4xxx *ak, unsigned int rate);
 };
 
 #define AK4XXX_IMAGE_SIZE	(AK4XXX_MAX_CHIPS * 16)	/* 64 bytes */
 
 struct snd_akm4xxx {
-	snd_card_t *card;
+	struct snd_card *card;
 	unsigned int num_adcs;				/* AK4524 or AK4528 ADCs */
 	unsigned int num_dacs;				/* AK4524 or AK4528 DACs */
 	unsigned char images[AK4XXX_IMAGE_SIZE];	/* saved register image */
@@ -56,10 +56,10 @@ struct snd_akm4xxx {
 	struct snd_ak4xxx_ops ops;
 };
 
-void snd_akm4xxx_write(akm4xxx_t *ak, int chip, unsigned char reg, unsigned char val);
-void snd_akm4xxx_reset(akm4xxx_t *ak, int state);
-void snd_akm4xxx_init(akm4xxx_t *ak);
-int snd_akm4xxx_build_controls(akm4xxx_t *ak);
+void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val);
+void snd_akm4xxx_reset(struct snd_akm4xxx *ak, int state);
+void snd_akm4xxx_init(struct snd_akm4xxx *ak);
+int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak);
 
 #define snd_akm4xxx_get(ak,chip,reg) (ak)->images[(chip) * 16 + (reg)]
 #define snd_akm4xxx_set(ak,chip,reg,val) ((ak)->images[(chip) * 16 + (reg)] = (val))
-- 
cgit v1.2.3-70-g09d2


From ee42381e71c56328db9e9d64d19a4de7a2f09a93 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:21:36 +0100
Subject: [ALSA] Remove xxx_t typedefs: AC97

Modules: AC97 Codec

Remove xxx_t typedefs from the AC97 codec support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/ac97_codec.h  | 107 ++++++------
 sound/pci/ac97/ac97_bus.c   |   2 +-
 sound/pci/ac97/ac97_codec.c | 313 ++++++++++++++++-----------------
 sound/pci/ac97/ac97_local.h |  45 ++---
 sound/pci/ac97/ac97_patch.c | 408 ++++++++++++++++++++++----------------------
 sound/pci/ac97/ac97_patch.h |  74 ++++----
 sound/pci/ac97/ac97_pcm.c   |  38 ++---
 sound/pci/ac97/ac97_proc.c  |  33 ++--
 8 files changed, 511 insertions(+), 509 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index 6f1e6ba2a19..a1814cd9549 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -391,38 +391,35 @@
  *
  */
 
-typedef struct _snd_ac97_bus ac97_bus_t;
-typedef struct _snd_ac97_bus_ops ac97_bus_ops_t;
-typedef struct _snd_ac97_template ac97_template_t;
-typedef struct _snd_ac97 ac97_t;
+struct snd_ac97;
 
 struct snd_ac97_build_ops {
-	int (*build_3d) (ac97_t *ac97);
-	int (*build_specific) (ac97_t *ac97);
-	int (*build_spdif) (ac97_t *ac97);
-	int (*build_post_spdif) (ac97_t *ac97);
+	int (*build_3d) (struct snd_ac97 *ac97);
+	int (*build_specific) (struct snd_ac97 *ac97);
+	int (*build_spdif) (struct snd_ac97 *ac97);
+	int (*build_post_spdif) (struct snd_ac97 *ac97);
 #ifdef CONFIG_PM
-	void (*suspend) (ac97_t *ac97);
-	void (*resume) (ac97_t *ac97);
+	void (*suspend) (struct snd_ac97 *ac97);
+	void (*resume) (struct snd_ac97 *ac97);
 #endif
-	void (*update_jacks) (ac97_t *ac97);	/* for jack-sharing */
+	void (*update_jacks) (struct snd_ac97 *ac97);	/* for jack-sharing */
 };
 
-struct _snd_ac97_bus_ops {
-	void (*reset) (ac97_t *ac97);
-	void (*write) (ac97_t *ac97, unsigned short reg, unsigned short val);
-	unsigned short (*read) (ac97_t *ac97, unsigned short reg);
-	void (*wait) (ac97_t *ac97);
-	void (*init) (ac97_t *ac97);
+struct snd_ac97_bus_ops {
+	void (*reset) (struct snd_ac97 *ac97);
+	void (*write) (struct snd_ac97 *ac97, unsigned short reg, unsigned short val);
+	unsigned short (*read) (struct snd_ac97 *ac97, unsigned short reg);
+	void (*wait) (struct snd_ac97 *ac97);
+	void (*init) (struct snd_ac97 *ac97);
 };
 
-struct _snd_ac97_bus {
+struct snd_ac97_bus {
 	/* -- lowlevel (hardware) driver specific -- */
-	ac97_bus_ops_t *ops;
+	struct snd_ac97_bus_ops *ops;
 	void *private_data;
-	void (*private_free) (ac97_bus_t *bus);
+	void (*private_free) (struct snd_ac97_bus *bus);
 	/* --- */
-	snd_card_t *card;
+	struct snd_card *card;
 	unsigned short num;	/* bus number */
 	unsigned short no_vra: 1, /* bridge doesn't support VRA */
 		       dra: 1,	/* bridge supports double rate */
@@ -432,13 +429,13 @@ struct _snd_ac97_bus {
 	unsigned short used_slots[2][4]; /* actually used PCM slots */
 	unsigned short pcms_count; /* count of PCMs */
 	struct ac97_pcm *pcms;
-	ac97_t *codec[4];
-	snd_info_entry_t *proc;
+	struct snd_ac97 *codec[4];
+	struct snd_info_entry *proc;
 };
 
-struct _snd_ac97_template {
+struct snd_ac97_template {
 	void *private_data;
-	void (*private_free) (ac97_t *ac97);
+	void (*private_free) (struct snd_ac97 *ac97);
 	struct pci_dev *pci;	/* assigned PCI device - used for quirks */
 	unsigned short num;	/* number of codec: 0 = primary, 1 = secondary */
 	unsigned short addr;	/* physical address of codec [0-3] */
@@ -447,16 +444,16 @@ struct _snd_ac97_template {
 	DECLARE_BITMAP(reg_accessed, 0x80); /* bit flags */
 };
 
-struct _snd_ac97 {
+struct snd_ac97 {
 	/* -- lowlevel (hardware) driver specific -- */
 	struct snd_ac97_build_ops * build_ops;
 	void *private_data;
-	void (*private_free) (ac97_t *ac97);
+	void (*private_free) (struct snd_ac97 *ac97);
 	/* --- */
-	ac97_bus_t *bus;
+	struct snd_ac97_bus *bus;
 	struct pci_dev *pci;	/* assigned PCI device - used for quirks */
-	snd_info_entry_t *proc;
-	snd_info_entry_t *proc_regs;
+	struct snd_info_entry *proc;
+	struct snd_info_entry *proc_regs;
 	unsigned short subsystem_vendor;
 	unsigned short subsystem_device;
 	struct semaphore reg_mutex;
@@ -490,43 +487,47 @@ struct _snd_ac97 {
 	struct device dev;
 };
 
-#define to_ac97_t(d) container_of(d, struct _snd_ac97, dev)
+#define to_ac97_t(d) container_of(d, struct snd_ac97, dev)
 
 /* conditions */
-static inline int ac97_is_audio(ac97_t * ac97)
+static inline int ac97_is_audio(struct snd_ac97 * ac97)
 {
 	return (ac97->scaps & AC97_SCAP_AUDIO);
 }
-static inline int ac97_is_modem(ac97_t * ac97)
+static inline int ac97_is_modem(struct snd_ac97 * ac97)
 {
 	return (ac97->scaps & AC97_SCAP_MODEM);
 }
-static inline int ac97_is_rev22(ac97_t * ac97)
+static inline int ac97_is_rev22(struct snd_ac97 * ac97)
 {
 	return (ac97->ext_id & AC97_EI_REV_MASK) >= AC97_EI_REV_22;
 }
-static inline int ac97_can_amap(ac97_t * ac97)
+static inline int ac97_can_amap(struct snd_ac97 * ac97)
 {
 	return (ac97->ext_id & AC97_EI_AMAP) != 0;
 }
-static inline int ac97_can_spdif(ac97_t * ac97)
+static inline int ac97_can_spdif(struct snd_ac97 * ac97)
 {
 	return (ac97->ext_id & AC97_EI_SPDIF) != 0;
 }
 
 /* functions */
-int snd_ac97_bus(snd_card_t *card, int num, ac97_bus_ops_t *ops, void *private_data, ac97_bus_t **rbus); /* create new AC97 bus */
-int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97);	/* create mixer controls */
-const char *snd_ac97_get_short_name(ac97_t *ac97);
-
-void snd_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short value);
-unsigned short snd_ac97_read(ac97_t *ac97, unsigned short reg);
-void snd_ac97_write_cache(ac97_t *ac97, unsigned short reg, unsigned short value);
-int snd_ac97_update(ac97_t *ac97, unsigned short reg, unsigned short value);
-int snd_ac97_update_bits(ac97_t *ac97, unsigned short reg, unsigned short mask, unsigned short value);
+/* create new AC97 bus */
+int snd_ac97_bus(struct snd_card *card, int num, struct snd_ac97_bus_ops *ops,
+		 void *private_data, struct snd_ac97_bus **rbus);
+/* create mixer controls */
+int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template,
+		   struct snd_ac97 **rac97);
+const char *snd_ac97_get_short_name(struct snd_ac97 *ac97);
+
+void snd_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short value);
+unsigned short snd_ac97_read(struct snd_ac97 *ac97, unsigned short reg);
+void snd_ac97_write_cache(struct snd_ac97 *ac97, unsigned short reg, unsigned short value);
+int snd_ac97_update(struct snd_ac97 *ac97, unsigned short reg, unsigned short value);
+int snd_ac97_update_bits(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value);
 #ifdef CONFIG_PM
-void snd_ac97_suspend(ac97_t *ac97);
-void snd_ac97_resume(ac97_t *ac97);
+void snd_ac97_suspend(struct snd_ac97 *ac97);
+void snd_ac97_resume(struct snd_ac97 *ac97);
 #endif
 
 /* quirk types */
@@ -551,8 +552,8 @@ struct ac97_quirk {
 	int type;		/* quirk type above */
 };
 
-int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk, const char *override);
-int snd_ac97_set_rate(ac97_t *ac97, int reg, unsigned int rate);
+int snd_ac97_tune_hardware(struct snd_ac97 *ac97, struct ac97_quirk *quirk, const char *override);
+int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate);
 
 /*
  * PCM allocation
@@ -568,7 +569,7 @@ enum ac97_pcm_cfg {
 };
 
 struct ac97_pcm {
-	ac97_bus_t *bus;
+	struct snd_ac97_bus *bus;
 	unsigned int stream: 1,	   	   /* stream type: 1 = capture */
 		     exclusive: 1,	   /* exclusive mode, don't override with other pcms */
 		     copy_flag: 1,	   /* lowlevel driver must fill all entries */
@@ -579,18 +580,18 @@ struct ac97_pcm {
 		unsigned short slots;	   /* driver input: requested AC97 slot numbers */
 		unsigned short rslots[4];  /* allocated slots per codecs */
 		unsigned char rate_table[4];
-		ac97_t *codec[4];	   /* allocated codecs */
+		struct snd_ac97 *codec[4];	   /* allocated codecs */
 	} r[2];				   /* 0 = standard rates, 1 = double rates */
 	unsigned long private_value;	   /* used by the hardware driver */
 };
 
-int snd_ac97_pcm_assign(ac97_bus_t *ac97,
+int snd_ac97_pcm_assign(struct snd_ac97_bus *ac97,
 			unsigned short pcms_count,
 			const struct ac97_pcm *pcms);
 int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate,
 		      enum ac97_pcm_cfg cfg, unsigned short slots);
 int snd_ac97_pcm_close(struct ac97_pcm *pcm);
-int snd_ac97_pcm_double_rate_rules(snd_pcm_runtime_t *runtime);
+int snd_ac97_pcm_double_rate_rules(struct snd_pcm_runtime *runtime);
 
 /* ad hoc AC97 device driver access */
 extern struct bus_type ac97_bus_type;
diff --git a/sound/pci/ac97/ac97_bus.c b/sound/pci/ac97/ac97_bus.c
index ec70fadde7d..66de2c2f155 100644
--- a/sound/pci/ac97/ac97_bus.c
+++ b/sound/pci/ac97/ac97_bus.c
@@ -18,7 +18,7 @@
 
 /*
  * Let drivers decide whether they want to support given codec from their
- * probe method.  Drivers have direct access to the ac97_t structure and may
+ * probe method.  Drivers have direct access to the struct snd_ac97 structure and may
  * decide based on the id field amongst other things.
  */
 static int ac97_bus_match(struct device *dev, struct device_driver *drv)
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 9bde76c4c6a..bdb6a8cc0ae 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -50,16 +50,16 @@ MODULE_PARM_DESC(enable_loopback, "Enable AC97 ADC/DAC Loopback Control");
 
  */
 
-typedef struct {
+struct ac97_codec_id {
 	unsigned int id;
 	unsigned int mask;
 	const char *name;
-	int (*patch)(ac97_t *ac97);
-	int (*mpatch)(ac97_t *ac97);
+	int (*patch)(struct snd_ac97 *ac97);
+	int (*mpatch)(struct snd_ac97 *ac97);
 	unsigned int flags;
-} ac97_codec_id_t;
+};
 
-static const ac97_codec_id_t snd_ac97_codec_id_vendors[] = {
+static const struct ac97_codec_id snd_ac97_codec_id_vendors[] = {
 { 0x414b4d00, 0xffffff00, "Asahi Kasei",	NULL,	NULL },
 { 0x41445300, 0xffffff00, "Analog Devices",	NULL,	NULL },
 { 0x414c4300, 0xffffff00, "Realtek",		NULL,	NULL },
@@ -86,7 +86,7 @@ static const ac97_codec_id_t snd_ac97_codec_id_vendors[] = {
 { 0,	      0, 	  NULL,			NULL,	NULL }
 };
 
-static const ac97_codec_id_t snd_ac97_codec_ids[] = {
+static const struct ac97_codec_id snd_ac97_codec_ids[] = {
 { 0x414b4d00, 0xffffffff, "AK4540",		NULL,		NULL },
 { 0x414b4d01, 0xffffffff, "AK4542",		NULL,		NULL },
 { 0x414b4d02, 0xffffffff, "AK4543",		NULL,		NULL },
@@ -225,7 +225,7 @@ const char *snd_ac97_stereo_enhancements[] =
  *  I/O routines
  */
 
-static int snd_ac97_valid_reg(ac97_t *ac97, unsigned short reg)
+static int snd_ac97_valid_reg(struct snd_ac97 *ac97, unsigned short reg)
 {
 	if (ac97->limited_regs && ! test_bit(reg, ac97->reg_accessed))
   		return 0;
@@ -278,7 +278,7 @@ static int snd_ac97_valid_reg(ac97_t *ac97, unsigned short reg)
  * #snd_ca97_write_cache(), so use this only when you don't want to
  * reflect the change to the suspend/resume state.
  */
-void snd_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short value)
+void snd_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short value)
 {
 	if (!snd_ac97_valid_reg(ac97, reg))
 		return;
@@ -301,7 +301,7 @@ void snd_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short value)
  *
  * Returns the read value.
  */
-unsigned short snd_ac97_read(ac97_t *ac97, unsigned short reg)
+unsigned short snd_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
 {
 	if (!snd_ac97_valid_reg(ac97, reg))
 		return 0;
@@ -309,7 +309,7 @@ unsigned short snd_ac97_read(ac97_t *ac97, unsigned short reg)
 }
 
 /* read a register - return the cached value if already read */
-static inline unsigned short snd_ac97_read_cache(ac97_t *ac97, unsigned short reg)
+static inline unsigned short snd_ac97_read_cache(struct snd_ac97 *ac97, unsigned short reg)
 {
 	if (! test_bit(reg, ac97->reg_accessed)) {
 		ac97->regs[reg] = ac97->bus->ops->read(ac97, reg);
@@ -328,7 +328,7 @@ static inline unsigned short snd_ac97_read_cache(ac97_t *ac97, unsigned short re
  * cache.  The cached values are used for the cached-read and the
  * suspend/resume.
  */
-void snd_ac97_write_cache(ac97_t *ac97, unsigned short reg, unsigned short value)
+void snd_ac97_write_cache(struct snd_ac97 *ac97, unsigned short reg, unsigned short value)
 {
 	if (!snd_ac97_valid_reg(ac97, reg))
 		return;
@@ -351,7 +351,7 @@ void snd_ac97_write_cache(ac97_t *ac97, unsigned short reg, unsigned short value
  * Returns 1 if the value is changed, 0 if no change, or a negative
  * code on failure.
  */
-int snd_ac97_update(ac97_t *ac97, unsigned short reg, unsigned short value)
+int snd_ac97_update(struct snd_ac97 *ac97, unsigned short reg, unsigned short value)
 {
 	int change;
 
@@ -381,7 +381,7 @@ int snd_ac97_update(ac97_t *ac97, unsigned short reg, unsigned short value)
  * Returns 1 if the bits are changed, 0 if no change, or a negative
  * code on failure.
  */
-int snd_ac97_update_bits(ac97_t *ac97, unsigned short reg, unsigned short mask, unsigned short value)
+int snd_ac97_update_bits(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value)
 {
 	int change;
 
@@ -394,7 +394,7 @@ int snd_ac97_update_bits(ac97_t *ac97, unsigned short reg, unsigned short mask,
 }
 
 /* no lock version - see snd_ac97_updat_bits() */
-int snd_ac97_update_bits_nolock(ac97_t *ac97, unsigned short reg,
+int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg,
 				unsigned short mask, unsigned short value)
 {
 	int change;
@@ -411,7 +411,7 @@ int snd_ac97_update_bits_nolock(ac97_t *ac97, unsigned short reg,
 	return change;
 }
 
-static int snd_ac97_ad18xx_update_pcm_bits(ac97_t *ac97, int codec, unsigned short mask, unsigned short value)
+static int snd_ac97_ad18xx_update_pcm_bits(struct snd_ac97 *ac97, int codec, unsigned short mask, unsigned short value)
 {
 	int change;
 	unsigned short old, new, cfg;
@@ -443,7 +443,7 @@ static int snd_ac97_ad18xx_update_pcm_bits(ac97_t *ac97, int codec, unsigned sho
  * Controls
  */
 
-int snd_ac97_info_enum_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+int snd_ac97_info_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value;
 	
@@ -457,9 +457,9 @@ int snd_ac97_info_enum_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * ui
 	return 0;
 }
 
-int snd_ac97_get_enum_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+int snd_ac97_get_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value;
 	unsigned short val, bitmask;
 	
@@ -473,9 +473,9 @@ int snd_ac97_get_enum_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * u
 	return 0;
 }
 
-int snd_ac97_put_enum_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+int snd_ac97_put_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value;
 	unsigned short val;
 	unsigned short mask, bitmask;
@@ -496,7 +496,7 @@ int snd_ac97_put_enum_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * u
 }
 
 /* save/restore ac97 v2.3 paging */
-static int snd_ac97_page_save(ac97_t *ac97, int reg, snd_kcontrol_t *kcontrol)
+static int snd_ac97_page_save(struct snd_ac97 *ac97, int reg, struct snd_kcontrol *kcontrol)
 {
 	int page_save = -1;
 	if ((kcontrol->private_value & (1<<25)) &&
@@ -510,7 +510,7 @@ static int snd_ac97_page_save(ac97_t *ac97, int reg, snd_kcontrol_t *kcontrol)
 	return page_save;
 }
 
-static void snd_ac97_page_restore(ac97_t *ac97, int page_save)
+static void snd_ac97_page_restore(struct snd_ac97 *ac97, int page_save)
 {
 	if (page_save >= 0) {
 		snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page_save);
@@ -519,7 +519,7 @@ static void snd_ac97_page_restore(ac97_t *ac97, int page_save)
 }
 
 /* volume and switch controls */
-int snd_ac97_info_volsw(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+int snd_ac97_info_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 16) & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0x0f;
@@ -532,9 +532,9 @@ int snd_ac97_info_volsw(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
 	return 0;
 }
 
-int snd_ac97_get_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+int snd_ac97_get_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0x0f;
 	int rshift = (kcontrol->private_value >> 12) & 0x0f;
@@ -555,9 +555,9 @@ int snd_ac97_get_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontro
 	return 0;
 }
 
-int snd_ac97_put_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+int snd_ac97_put_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0x0f;
 	int rshift = (kcontrol->private_value >> 12) & 0x0f;
@@ -584,22 +584,22 @@ int snd_ac97_put_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontro
 	return err;
 }
 
-static const snd_kcontrol_new_t snd_ac97_controls_master_mono[2] = {
+static const struct snd_kcontrol_new snd_ac97_controls_master_mono[2] = {
 AC97_SINGLE("Master Mono Playback Switch", AC97_MASTER_MONO, 15, 1, 1),
 AC97_SINGLE("Master Mono Playback Volume", AC97_MASTER_MONO, 0, 31, 1)
 };
 
-static const snd_kcontrol_new_t snd_ac97_controls_tone[2] = {
+static const struct snd_kcontrol_new snd_ac97_controls_tone[2] = {
 AC97_SINGLE("Tone Control - Bass", AC97_MASTER_TONE, 8, 15, 1),
 AC97_SINGLE("Tone Control - Treble", AC97_MASTER_TONE, 0, 15, 1)
 };
 
-static const snd_kcontrol_new_t snd_ac97_controls_pc_beep[2] = {
+static const struct snd_kcontrol_new snd_ac97_controls_pc_beep[2] = {
 AC97_SINGLE("PC Speaker Playback Switch", AC97_PC_BEEP, 15, 1, 1),
 AC97_SINGLE("PC Speaker Playback Volume", AC97_PC_BEEP, 1, 15, 1)
 };
 
-static const snd_kcontrol_new_t snd_ac97_controls_mic_boost =
+static const struct snd_kcontrol_new snd_ac97_controls_mic_boost =
 	AC97_SINGLE("Mic Boost (+20dB)", AC97_MIC, 6, 1, 0);
 
 
@@ -615,18 +615,18 @@ AC97_ENUM_SINGLE(AC97_GENERAL_PURPOSE, 9, 2, std_mix),
 AC97_ENUM_SINGLE(AC97_GENERAL_PURPOSE, 8, 2, std_mic),
 };
 
-static const snd_kcontrol_new_t snd_ac97_control_capture_src = 
+static const struct snd_kcontrol_new snd_ac97_control_capture_src = 
 AC97_ENUM("Capture Source", std_enum[0]); 
 
-static const snd_kcontrol_new_t snd_ac97_control_capture_vol =
+static const struct snd_kcontrol_new snd_ac97_control_capture_vol =
 AC97_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 15, 0);
 
-static const snd_kcontrol_new_t snd_ac97_controls_mic_capture[2] = {
+static const struct snd_kcontrol_new snd_ac97_controls_mic_capture[2] = {
 AC97_SINGLE("Mic Capture Switch", AC97_REC_GAIN_MIC, 15, 1, 1),
 AC97_SINGLE("Mic Capture Volume", AC97_REC_GAIN_MIC, 0, 15, 0)
 };
 
-typedef enum {
+enum {
 	AC97_GENERAL_PCM_OUT = 0,
 	AC97_GENERAL_STEREO_ENHANCEMENT,
 	AC97_GENERAL_3D,
@@ -634,9 +634,9 @@ typedef enum {
 	AC97_GENERAL_MONO,
 	AC97_GENERAL_MIC,
 	AC97_GENERAL_LOOPBACK
-} ac97_general_index_t;
+};
 
-static const snd_kcontrol_new_t snd_ac97_controls_general[7] = {
+static const struct snd_kcontrol_new snd_ac97_controls_general[7] = {
 AC97_ENUM("PCM Out Path & Mute", std_enum[1]),
 AC97_SINGLE("Simulated Stereo Enhancement", AC97_GENERAL_PURPOSE, 14, 1, 0),
 AC97_SINGLE("3D Control - Switch", AC97_GENERAL_PURPOSE, 13, 1, 0),
@@ -646,45 +646,45 @@ AC97_ENUM("Mic Select", std_enum[3]),
 AC97_SINGLE("ADC/DAC Loopback", AC97_GENERAL_PURPOSE, 7, 1, 0)
 };
 
-const snd_kcontrol_new_t snd_ac97_controls_3d[2] = {
+const struct snd_kcontrol_new snd_ac97_controls_3d[2] = {
 AC97_SINGLE("3D Control - Center", AC97_3D_CONTROL, 8, 15, 0),
 AC97_SINGLE("3D Control - Depth", AC97_3D_CONTROL, 0, 15, 0)
 };
 
-static const snd_kcontrol_new_t snd_ac97_controls_center[2] = {
+static const struct snd_kcontrol_new snd_ac97_controls_center[2] = {
 AC97_SINGLE("Center Playback Switch", AC97_CENTER_LFE_MASTER, 7, 1, 1),
 AC97_SINGLE("Center Playback Volume", AC97_CENTER_LFE_MASTER, 0, 31, 1)
 };
 
-static const snd_kcontrol_new_t snd_ac97_controls_lfe[2] = {
+static const struct snd_kcontrol_new snd_ac97_controls_lfe[2] = {
 AC97_SINGLE("LFE Playback Switch", AC97_CENTER_LFE_MASTER, 15, 1, 1),
 AC97_SINGLE("LFE Playback Volume", AC97_CENTER_LFE_MASTER, 8, 31, 1)
 };
 
-static const snd_kcontrol_new_t snd_ac97_control_eapd =
+static const struct snd_kcontrol_new snd_ac97_control_eapd =
 AC97_SINGLE("External Amplifier", AC97_POWERDOWN, 15, 1, 1);
 
-static const snd_kcontrol_new_t snd_ac97_controls_modem_switches[2] = {
+static const struct snd_kcontrol_new snd_ac97_controls_modem_switches[2] = {
 AC97_SINGLE("Off-hook Switch", AC97_GPIO_STATUS, 0, 1, 0),
 AC97_SINGLE("Caller ID Switch", AC97_GPIO_STATUS, 2, 1, 0)
 };
 
 /* change the existing EAPD control as inverted */
-static void set_inv_eapd(ac97_t *ac97, snd_kcontrol_t *kctl)
+static void set_inv_eapd(struct snd_ac97 *ac97, struct snd_kcontrol *kctl)
 {
 	kctl->private_value = AC97_SINGLE_VALUE(AC97_POWERDOWN, 15, 1, 0);
 	snd_ac97_update_bits(ac97, AC97_POWERDOWN, (1<<15), (1<<15)); /* EAPD up */
 	ac97->scaps |= AC97_SCAP_INV_EAPD;
 }
 
-static int snd_ac97_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ac97_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
                         
-static int snd_ac97_spdif_cmask_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_spdif_cmask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
 	ucontrol->value.iec958.status[0] = IEC958_AES0_PROFESSIONAL |
 					   IEC958_AES0_NONAUDIO |
@@ -696,7 +696,7 @@ static int snd_ac97_spdif_cmask_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value
 	return 0;
 }
                         
-static int snd_ac97_spdif_pmask_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_spdif_pmask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
 	/* FIXME: AC'97 spec doesn't say which bits are used for what */
 	ucontrol->value.iec958.status[0] = IEC958_AES0_PROFESSIONAL |
@@ -706,9 +706,9 @@ static int snd_ac97_spdif_pmask_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value
 	return 0;
 }
 
-static int snd_ac97_spdif_default_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_spdif_default_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 
 	down(&ac97->reg_mutex);
 	ucontrol->value.iec958.status[0] = ac97->spdif_status & 0xff;
@@ -719,9 +719,9 @@ static int snd_ac97_spdif_default_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_val
 	return 0;
 }
                         
-static int snd_ac97_spdif_default_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_spdif_default_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned int new = 0;
 	unsigned short val = 0;
 	int change;
@@ -787,9 +787,9 @@ static int snd_ac97_spdif_default_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_val
 	return change;
 }
 
-static int snd_ac97_put_spsa(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_ac97_put_spsa(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
 	int mask = (kcontrol->private_value >> 16) & 0xff;
@@ -817,7 +817,7 @@ static int snd_ac97_put_spsa(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
 	return change;
 }
 
-const snd_kcontrol_new_t snd_ac97_controls_spdif[5] = {
+const struct snd_kcontrol_new snd_ac97_controls_spdif[5] = {
 	{
 		.access = SNDRV_CTL_ELEM_ACCESS_READ,
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -856,9 +856,9 @@ const snd_kcontrol_new_t snd_ac97_controls_spdif[5] = {
   .get = snd_ac97_ad18xx_pcm_get_bits, .put = snd_ac97_ad18xx_pcm_put_bits, \
   .private_value = (codec) | ((lshift) << 8) | ((rshift) << 12) | ((mask) << 16) }
 
-static int snd_ac97_ad18xx_pcm_info_bits(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ac97_ad18xx_pcm_info_bits(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	int mask = (kcontrol->private_value >> 16) & 0x0f;
 	int lshift = (kcontrol->private_value >> 8) & 0x0f;
 	int rshift = (kcontrol->private_value >> 12) & 0x0f;
@@ -873,9 +873,9 @@ static int snd_ac97_ad18xx_pcm_info_bits(snd_kcontrol_t *kcontrol, snd_ctl_elem_
 	return 0;
 }
 
-static int snd_ac97_ad18xx_pcm_get_bits(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_ad18xx_pcm_get_bits(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	int codec = kcontrol->private_value & 3;
 	int lshift = (kcontrol->private_value >> 8) & 0x0f;
 	int rshift = (kcontrol->private_value >> 12) & 0x0f;
@@ -887,9 +887,9 @@ static int snd_ac97_ad18xx_pcm_get_bits(snd_kcontrol_t * kcontrol, snd_ctl_elem_
 	return 0;
 }
 
-static int snd_ac97_ad18xx_pcm_put_bits(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_ad18xx_pcm_put_bits(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	int codec = kcontrol->private_value & 3;
 	int lshift = (kcontrol->private_value >> 8) & 0x0f;
 	int rshift = (kcontrol->private_value >> 12) & 0x0f;
@@ -910,7 +910,7 @@ static int snd_ac97_ad18xx_pcm_put_bits(snd_kcontrol_t * kcontrol, snd_ctl_elem_
   .get = snd_ac97_ad18xx_pcm_get_volume, .put = snd_ac97_ad18xx_pcm_put_volume, \
   .private_value = codec }
 
-static int snd_ac97_ad18xx_pcm_info_volume(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ac97_ad18xx_pcm_info_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
@@ -919,9 +919,9 @@ static int snd_ac97_ad18xx_pcm_info_volume(snd_kcontrol_t *kcontrol, snd_ctl_ele
 	return 0;
 }
 
-static int snd_ac97_ad18xx_pcm_get_volume(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_ad18xx_pcm_get_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	int codec = kcontrol->private_value & 3;
 	
 	down(&ac97->page_mutex);
@@ -931,9 +931,9 @@ static int snd_ac97_ad18xx_pcm_get_volume(snd_kcontrol_t * kcontrol, snd_ctl_ele
 	return 0;
 }
 
-static int snd_ac97_ad18xx_pcm_put_volume(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_ad18xx_pcm_put_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	int codec = kcontrol->private_value & 3;
 	unsigned short val1, val2;
 	
@@ -942,22 +942,22 @@ static int snd_ac97_ad18xx_pcm_put_volume(snd_kcontrol_t * kcontrol, snd_ctl_ele
 	return snd_ac97_ad18xx_update_pcm_bits(ac97, codec, 0x1f1f, (val1 << 8) | val2);
 }
 
-static const snd_kcontrol_new_t snd_ac97_controls_ad18xx_pcm[2] = {
+static const struct snd_kcontrol_new snd_ac97_controls_ad18xx_pcm[2] = {
 AD18XX_PCM_BITS("PCM Playback Switch", 0, 15, 7, 1),
 AD18XX_PCM_VOLUME("PCM Playback Volume", 0)
 };
 
-static const snd_kcontrol_new_t snd_ac97_controls_ad18xx_surround[2] = {
+static const struct snd_kcontrol_new snd_ac97_controls_ad18xx_surround[2] = {
 AD18XX_PCM_BITS("Surround Playback Switch", 1, 15, 7, 1),
 AD18XX_PCM_VOLUME("Surround Playback Volume", 1)
 };
 
-static const snd_kcontrol_new_t snd_ac97_controls_ad18xx_center[2] = {
+static const struct snd_kcontrol_new snd_ac97_controls_ad18xx_center[2] = {
 AD18XX_PCM_BITS("Center Playback Switch", 2, 15, 15, 1),
 AD18XX_PCM_BITS("Center Playback Volume", 2, 8, 8, 31)
 };
 
-static const snd_kcontrol_new_t snd_ac97_controls_ad18xx_lfe[2] = {
+static const struct snd_kcontrol_new snd_ac97_controls_ad18xx_lfe[2] = {
 AD18XX_PCM_BITS("LFE Playback Switch", 2, 7, 7, 1),
 AD18XX_PCM_BITS("LFE Playback Volume", 2, 0, 0, 31)
 };
@@ -966,9 +966,9 @@ AD18XX_PCM_BITS("LFE Playback Volume", 2, 0, 0, 31)
  *
  */
 
-static void snd_ac97_powerdown(ac97_t *ac97);
+static void snd_ac97_powerdown(struct snd_ac97 *ac97);
 
-static int snd_ac97_bus_free(ac97_bus_t *bus)
+static int snd_ac97_bus_free(struct snd_ac97_bus *bus)
 {
 	if (bus) {
 		snd_ac97_bus_proc_done(bus);
@@ -980,13 +980,13 @@ static int snd_ac97_bus_free(ac97_bus_t *bus)
 	return 0;
 }
 
-static int snd_ac97_bus_dev_free(snd_device_t *device)
+static int snd_ac97_bus_dev_free(struct snd_device *device)
 {
-	ac97_bus_t *bus = device->device_data;
+	struct snd_ac97_bus *bus = device->device_data;
 	return snd_ac97_bus_free(bus);
 }
 
-static int snd_ac97_free(ac97_t *ac97)
+static int snd_ac97_free(struct snd_ac97 *ac97)
 {
 	if (ac97) {
 		snd_ac97_proc_done(ac97);
@@ -999,14 +999,14 @@ static int snd_ac97_free(ac97_t *ac97)
 	return 0;
 }
 
-static int snd_ac97_dev_free(snd_device_t *device)
+static int snd_ac97_dev_free(struct snd_device *device)
 {
-	ac97_t *ac97 = device->device_data;
+	struct snd_ac97 *ac97 = device->device_data;
 	snd_ac97_powerdown(ac97); /* for avoiding click noises during shut down */
 	return snd_ac97_free(ac97);
 }
 
-static int snd_ac97_try_volume_mix(ac97_t * ac97, int reg)
+static int snd_ac97_try_volume_mix(struct snd_ac97 * ac97, int reg)
 {
 	unsigned short val, mask = 0x8000;
 
@@ -1052,13 +1052,14 @@ static int snd_ac97_try_volume_mix(ac97_t * ac97, int reg)
 		/* try another test */
 		snd_ac97_write_cache(ac97, reg, val | mask);
 		val = snd_ac97_read(ac97, reg);
+		val = snd_ac97_read(ac97, reg);
 		if (!(val & mask))
 			return 0;	/* nothing here */
 	}
 	return 1;		/* success, useable */
 }
 
-static void check_volume_resolution(ac97_t *ac97, int reg, unsigned char *lo_max, unsigned char *hi_max)
+static void check_volume_resolution(struct snd_ac97 *ac97, int reg, unsigned char *lo_max, unsigned char *hi_max)
 {
 	unsigned short cbit[3] = { 0x20, 0x10, 0x01 };
 	unsigned char max[3] = { 63, 31, 15 };
@@ -1083,7 +1084,7 @@ static void check_volume_resolution(ac97_t *ac97, int reg, unsigned char *lo_max
 	}
 }
 
-int snd_ac97_try_bit(ac97_t * ac97, int reg, int bit)
+int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit)
 {
 	unsigned short mask, val, orig, res;
 
@@ -1097,7 +1098,7 @@ int snd_ac97_try_bit(ac97_t * ac97, int reg, int bit)
 }
 
 /* check the volume resolution of center/lfe */
-static void snd_ac97_change_volume_params2(ac97_t * ac97, int reg, int shift, unsigned char *max)
+static void snd_ac97_change_volume_params2(struct snd_ac97 * ac97, int reg, int shift, unsigned char *max)
 {
 	unsigned short val, val1;
 
@@ -1123,9 +1124,9 @@ static inline int printable(unsigned int x)
 	return x;
 }
 
-snd_kcontrol_t *snd_ac97_cnew(const snd_kcontrol_new_t *_template, ac97_t * ac97)
+struct snd_kcontrol *snd_ac97_cnew(const struct snd_kcontrol_new *_template, struct snd_ac97 * ac97)
 {
-	snd_kcontrol_new_t template;
+	struct snd_kcontrol_new template;
 	memcpy(&template, _template, sizeof(template));
 	template.index = ac97->num;
 	return snd_ctl_new1(&template, ac97);
@@ -1134,9 +1135,9 @@ snd_kcontrol_t *snd_ac97_cnew(const snd_kcontrol_new_t *_template, ac97_t * ac97
 /*
  * create mute switch(es) for normal stereo controls
  */
-static int snd_ac97_cmute_new_stereo(snd_card_t *card, char *name, int reg, int check_stereo, ac97_t *ac97)
+static int snd_ac97_cmute_new_stereo(struct snd_card *card, char *name, int reg, int check_stereo, struct snd_ac97 *ac97)
 {
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 	int err;
 	unsigned short val, val1, mute_mask;
 
@@ -1153,11 +1154,11 @@ static int snd_ac97_cmute_new_stereo(snd_card_t *card, char *name, int reg, int
 			mute_mask = 0x8080;
 	}
 	if (mute_mask == 0x8080) {
-		snd_kcontrol_new_t tmp = AC97_DOUBLE(name, reg, 15, 7, 1, 1);
+		struct snd_kcontrol_new tmp = AC97_DOUBLE(name, reg, 15, 7, 1, 1);
 		tmp.index = ac97->num;
 		kctl = snd_ctl_new1(&tmp, ac97);
 	} else {
-		snd_kcontrol_new_t tmp = AC97_SINGLE(name, reg, 15, 1, 1);
+		struct snd_kcontrol_new tmp = AC97_SINGLE(name, reg, 15, 1, 1);
 		tmp.index = ac97->num;
 		kctl = snd_ctl_new1(&tmp, ac97);
 	}
@@ -1172,22 +1173,22 @@ static int snd_ac97_cmute_new_stereo(snd_card_t *card, char *name, int reg, int
 /*
  * create a volume for normal stereo/mono controls
  */
-static int snd_ac97_cvol_new(snd_card_t *card, char *name, int reg, unsigned int lo_max,
-			     unsigned int hi_max, ac97_t *ac97)
+static int snd_ac97_cvol_new(struct snd_card *card, char *name, int reg, unsigned int lo_max,
+			     unsigned int hi_max, struct snd_ac97 *ac97)
 {
 	int err;
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 
 	if (! snd_ac97_valid_reg(ac97, reg))
 		return 0;
 	if (hi_max) {
 		/* invert */
-		snd_kcontrol_new_t tmp = AC97_DOUBLE(name, reg, 8, 0, lo_max, 1);
+		struct snd_kcontrol_new tmp = AC97_DOUBLE(name, reg, 8, 0, lo_max, 1);
 		tmp.index = ac97->num;
 		kctl = snd_ctl_new1(&tmp, ac97);
 	} else {
 		/* invert */
-		snd_kcontrol_new_t tmp = AC97_SINGLE(name, reg, 0, lo_max, 1);
+		struct snd_kcontrol_new tmp = AC97_SINGLE(name, reg, 0, lo_max, 1);
 		tmp.index = ac97->num;
 		kctl = snd_ctl_new1(&tmp, ac97);
 	}
@@ -1203,7 +1204,7 @@ static int snd_ac97_cvol_new(snd_card_t *card, char *name, int reg, unsigned int
 /*
  * create a mute-switch and a volume for normal stereo/mono controls
  */
-static int snd_ac97_cmix_new_stereo(snd_card_t *card, const char *pfx, int reg, int check_stereo, ac97_t *ac97)
+static int snd_ac97_cmix_new_stereo(struct snd_card *card, const char *pfx, int reg, int check_stereo, struct snd_ac97 *ac97)
 {
 	int err;
 	char name[44];
@@ -1229,12 +1230,12 @@ static int snd_ac97_cmix_new_stereo(snd_card_t *card, const char *pfx, int reg,
 #define snd_ac97_cmix_new(card, pfx, reg, ac97)	snd_ac97_cmix_new_stereo(card, pfx, reg, 0, ac97)
 #define snd_ac97_cmute_new(card, name, reg, ac97)	snd_ac97_cmute_new_stereo(card, name, reg, 0, ac97)
 
-static unsigned int snd_ac97_determine_spdif_rates(ac97_t *ac97);
+static unsigned int snd_ac97_determine_spdif_rates(struct snd_ac97 *ac97);
 
-static int snd_ac97_mixer_build(ac97_t * ac97)
+static int snd_ac97_mixer_build(struct snd_ac97 * ac97)
 {
-	snd_card_t *card = ac97->bus->card;
-	snd_kcontrol_t *kctl;
+	struct snd_card *card = ac97->bus->card;
+	struct snd_kcontrol *kctl;
 	int err;
 	unsigned int idx;
 	unsigned char max;
@@ -1531,7 +1532,7 @@ static int snd_ac97_mixer_build(ac97_t * ac97)
 	return 0;
 }
 
-static int snd_ac97_modem_build(snd_card_t * card, ac97_t * ac97)
+static int snd_ac97_modem_build(struct snd_card *card, struct snd_ac97 * ac97)
 {
 	int err, idx;
 
@@ -1555,7 +1556,7 @@ static int snd_ac97_modem_build(snd_card_t * card, ac97_t * ac97)
 	return 0;
 }
 
-static int snd_ac97_test_rate(ac97_t *ac97, int reg, int shadow_reg, int rate)
+static int snd_ac97_test_rate(struct snd_ac97 *ac97, int reg, int shadow_reg, int rate)
 {
 	unsigned short val;
 	unsigned int tmp;
@@ -1568,7 +1569,7 @@ static int snd_ac97_test_rate(ac97_t *ac97, int reg, int shadow_reg, int rate)
 	return val == (tmp & 0xffff);
 }
 
-static void snd_ac97_determine_rates(ac97_t *ac97, int reg, int shadow_reg, unsigned int *r_result)
+static void snd_ac97_determine_rates(struct snd_ac97 *ac97, int reg, int shadow_reg, unsigned int *r_result)
 {
 	unsigned int result = 0;
 	unsigned short saved;
@@ -1628,7 +1629,7 @@ static void snd_ac97_determine_rates(ac97_t *ac97, int reg, int shadow_reg, unsi
 }
 
 /* check AC97_SPDIF register to accept which sample rates */
-static unsigned int snd_ac97_determine_spdif_rates(ac97_t *ac97)
+static unsigned int snd_ac97_determine_spdif_rates(struct snd_ac97 *ac97)
 {
 	unsigned int result = 0;
 	int i;
@@ -1648,10 +1649,10 @@ static unsigned int snd_ac97_determine_spdif_rates(ac97_t *ac97)
 }
 
 /* look for the codec id table matching with the given id */
-static const ac97_codec_id_t *look_for_codec_id(const ac97_codec_id_t *table,
-						unsigned int id)
+static const struct ac97_codec_id *look_for_codec_id(const struct ac97_codec_id *table,
+						     unsigned int id)
 {
-	const ac97_codec_id_t *pid;
+	const struct ac97_codec_id *pid;
 
 	for (pid = table; pid->id; pid++)
 		if (pid->id == (id & pid->mask))
@@ -1659,9 +1660,9 @@ static const ac97_codec_id_t *look_for_codec_id(const ac97_codec_id_t *table,
 	return NULL;
 }
 
-void snd_ac97_get_name(ac97_t *ac97, unsigned int id, char *name, int modem)
+void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, int modem)
 {
-	const ac97_codec_id_t *pid;
+	const struct ac97_codec_id *pid;
 
 	sprintf(name, "0x%x %c%c%c", id,
 		printable(id >> 24),
@@ -1699,9 +1700,9 @@ void snd_ac97_get_name(ac97_t *ac97, unsigned int id, char *name, int modem)
  *
  * Returns the short identifying name of the codec.
  */
-const char *snd_ac97_get_short_name(ac97_t *ac97)
+const char *snd_ac97_get_short_name(struct snd_ac97 *ac97)
 {
-	const ac97_codec_id_t *pid;
+	const struct ac97_codec_id *pid;
 
 	for (pid = snd_ac97_codec_ids; pid->id; pid++)
 		if (pid->id == (ac97->id & pid->mask))
@@ -1713,7 +1714,7 @@ const char *snd_ac97_get_short_name(ac97_t *ac97)
 /* wait for a while until registers are accessible after RESET
  * return 0 if ok, negative not ready
  */
-static int ac97_reset_wait(ac97_t *ac97, int timeout, int with_modem)
+static int ac97_reset_wait(struct snd_ac97 *ac97, int timeout, int with_modem)
 {
 	unsigned long end_time;
 	unsigned short val;
@@ -1758,7 +1759,7 @@ static int ac97_reset_wait(ac97_t *ac97, int timeout, int with_modem)
  * @private_data: private data pointer for the new instance
  * @rbus: the pointer to store the new AC97 bus instance.
  *
- * Creates an AC97 bus component.  An ac97_bus_t instance is newly
+ * Creates an AC97 bus component.  An struct snd_ac97_bus instance is newly
  * allocated and initialized.
  *
  * The ops table must include valid callbacks (at least read and
@@ -1772,12 +1773,12 @@ static int ac97_reset_wait(ac97_t *ac97, int timeout, int with_modem)
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_ac97_bus(snd_card_t *card, int num, ac97_bus_ops_t *ops,
-		 void *private_data, ac97_bus_t **rbus)
+int snd_ac97_bus(struct snd_card *card, int num, struct snd_ac97_bus_ops *ops,
+		 void *private_data, struct snd_ac97_bus **rbus)
 {
 	int err;
-	ac97_bus_t *bus;
-	static snd_device_ops_t dev_ops = {
+	struct snd_ac97_bus *bus;
+	static struct snd_device_ops dev_ops = {
 		.dev_free =	snd_ac97_bus_dev_free,
 	};
 
@@ -1807,9 +1808,9 @@ static void ac97_device_release(struct device * dev)
 }
 
 /* register ac97 codec to bus */
-static int snd_ac97_dev_register(snd_device_t *device)
+static int snd_ac97_dev_register(struct snd_device *device)
 {
-	ac97_t *ac97 = device->device_data;
+	struct snd_ac97 *ac97 = device->device_data;
 	int err;
 
 	ac97->dev.bus = &ac97_bus_type;
@@ -1825,9 +1826,9 @@ static int snd_ac97_dev_register(snd_device_t *device)
 }
 
 /* unregister ac97 codec */
-static int snd_ac97_dev_unregister(snd_device_t *device)
+static int snd_ac97_dev_unregister(struct snd_device *device)
 {
-	ac97_t *ac97 = device->device_data;
+	struct snd_ac97 *ac97 = device->device_data;
 	if (ac97->dev.bus)
 		device_unregister(&ac97->dev);
 	return snd_ac97_free(ac97);
@@ -1843,7 +1844,7 @@ static struct snd_ac97_build_ops null_build_ops;
  *         the private data.
  * @rac97: the pointer to store the new ac97 instance.
  *
- * Creates an Codec97 component.  An ac97_t instance is newly
+ * Creates an Codec97 component.  An struct snd_ac97 instance is newly
  * allocated and initialized from the template.  The codec
  * is then initialized by the standard procedure.
  *
@@ -1855,16 +1856,16 @@ static struct snd_ac97_build_ops null_build_ops;
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97)
+int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template, struct snd_ac97 **rac97)
 {
 	int err;
-	ac97_t *ac97;
-	snd_card_t *card;
+	struct snd_ac97 *ac97;
+	struct snd_card *card;
 	char name[64];
 	unsigned long end_time;
 	unsigned int reg;
-	const ac97_codec_id_t *pid;
-	static snd_device_ops_t ops = {
+	const struct ac97_codec_id *pid;
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_ac97_dev_free,
 		.dev_register =	snd_ac97_dev_register,
 		.dev_unregister =	snd_ac97_dev_unregister,
@@ -2148,7 +2149,7 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97)
  * MASTER and HEADPHONE registers are muted but the register cache values
  * are not changed, so that the values can be restored in snd_ac97_resume().
  */
-static void snd_ac97_powerdown(ac97_t *ac97)
+static void snd_ac97_powerdown(struct snd_ac97 *ac97)
 {
 	unsigned short power;
 
@@ -2181,7 +2182,7 @@ static void snd_ac97_powerdown(ac97_t *ac97)
  *
  * Suspends the codec, power down the chip.
  */
-void snd_ac97_suspend(ac97_t *ac97)
+void snd_ac97_suspend(struct snd_ac97 *ac97)
 {
 	if (ac97->build_ops->suspend)
 		ac97->build_ops->suspend(ac97);
@@ -2191,7 +2192,7 @@ void snd_ac97_suspend(ac97_t *ac97)
 /*
  * restore ac97 status
  */
-void snd_ac97_restore_status(ac97_t *ac97)
+void snd_ac97_restore_status(struct snd_ac97 *ac97)
 {
 	int i;
 
@@ -2212,7 +2213,7 @@ void snd_ac97_restore_status(ac97_t *ac97)
 /*
  * restore IEC958 status
  */
-void snd_ac97_restore_iec958(ac97_t *ac97)
+void snd_ac97_restore_iec958(struct snd_ac97 *ac97)
 {
 	if (ac97->ext_id & AC97_EI_SPDIF) {
 		if (ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_SPDIF) {
@@ -2235,7 +2236,7 @@ void snd_ac97_restore_iec958(ac97_t *ac97)
  * Do the standard resume procedure, power up and restoring the
  * old register values.
  */
-void snd_ac97_resume(ac97_t *ac97)
+void snd_ac97_resume(struct snd_ac97 *ac97)
 {
 	unsigned long end_time;
 
@@ -2301,18 +2302,18 @@ static void set_ctl_name(char *dst, const char *src, const char *suffix)
 }	
 
 /* remove the control with the given name and optional suffix */
-int snd_ac97_remove_ctl(ac97_t *ac97, const char *name, const char *suffix)
+int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name, const char *suffix)
 {
-	snd_ctl_elem_id_t id;
+	struct snd_ctl_elem_id id;
 	memset(&id, 0, sizeof(id));
 	set_ctl_name(id.name, name, suffix);
 	id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
 	return snd_ctl_remove_id(ac97->bus->card, &id);
 }
 
-static snd_kcontrol_t *ctl_find(ac97_t *ac97, const char *name, const char *suffix)
+static struct snd_kcontrol *ctl_find(struct snd_ac97 *ac97, const char *name, const char *suffix)
 {
-	snd_ctl_elem_id_t sid;
+	struct snd_ctl_elem_id sid;
 	memset(&sid, 0, sizeof(sid));
 	set_ctl_name(sid.name, name, suffix);
 	sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
@@ -2320,9 +2321,9 @@ static snd_kcontrol_t *ctl_find(ac97_t *ac97, const char *name, const char *suff
 }
 
 /* rename the control with the given name and optional suffix */
-int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst, const char *suffix)
+int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src, const char *dst, const char *suffix)
 {
-	snd_kcontrol_t *kctl = ctl_find(ac97, src, suffix);
+	struct snd_kcontrol *kctl = ctl_find(ac97, src, suffix);
 	if (kctl) {
 		set_ctl_name(kctl->id.name, dst, suffix);
 		return 0;
@@ -2331,16 +2332,16 @@ int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst, const ch
 }
 
 /* rename both Volume and Switch controls - don't check the return value */
-void snd_ac97_rename_vol_ctl(ac97_t *ac97, const char *src, const char *dst)
+void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src, const char *dst)
 {
 	snd_ac97_rename_ctl(ac97, src, dst, "Switch");
 	snd_ac97_rename_ctl(ac97, src, dst, "Volume");
 }
 
 /* swap controls */
-int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2, const char *suffix)
+int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1, const char *s2, const char *suffix)
 {
-	snd_kcontrol_t *kctl1, *kctl2;
+	struct snd_kcontrol *kctl1, *kctl2;
 	kctl1 = ctl_find(ac97, s1, suffix);
 	kctl2 = ctl_find(ac97, s2, suffix);
 	if (kctl1 && kctl2) {
@@ -2353,7 +2354,7 @@ int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2, const char *
 
 #if 1
 /* bind hp and master controls instead of using only hp control */
-static int bind_hp_volsw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int bind_hp_volsw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
 	int err = snd_ac97_put_volsw(kcontrol, ucontrol);
 	if (err > 0) {
@@ -2366,10 +2367,10 @@ static int bind_hp_volsw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
 }
 
 /* ac97 tune: bind Master and Headphone controls */
-static int tune_hp_only(ac97_t *ac97)
+static int tune_hp_only(struct snd_ac97 *ac97)
 {
-	snd_kcontrol_t *msw = ctl_find(ac97, "Master Playback Switch", NULL);
-	snd_kcontrol_t *mvol = ctl_find(ac97, "Master Playback Volume", NULL);
+	struct snd_kcontrol *msw = ctl_find(ac97, "Master Playback Switch", NULL);
+	struct snd_kcontrol *mvol = ctl_find(ac97, "Master Playback Volume", NULL);
 	if (! msw || ! mvol)
 		return -ENOENT;
 	msw->put = bind_hp_volsw_put;
@@ -2381,7 +2382,7 @@ static int tune_hp_only(ac97_t *ac97)
 
 #else
 /* ac97 tune: use Headphone control as master */
-static int tune_hp_only(ac97_t *ac97)
+static int tune_hp_only(struct snd_ac97 *ac97)
 {
 	if (ctl_find(ac97, "Headphone Playback Switch", NULL) == NULL)
 		return -ENOENT;
@@ -2393,7 +2394,7 @@ static int tune_hp_only(ac97_t *ac97)
 #endif
 
 /* ac97 tune: swap Headphone and Master controls */
-static int tune_swap_hp(ac97_t *ac97)
+static int tune_swap_hp(struct snd_ac97 *ac97)
 {
 	if (ctl_find(ac97, "Headphone Playback Switch", NULL) == NULL)
 		return -ENOENT;
@@ -2403,7 +2404,7 @@ static int tune_swap_hp(ac97_t *ac97)
 }
 
 /* ac97 tune: swap Surround and Master controls */
-static int tune_swap_surround(ac97_t *ac97)
+static int tune_swap_surround(struct snd_ac97 *ac97)
 {
 	if (snd_ac97_swap_ctl(ac97, "Master Playback", "Surround Playback", "Switch") ||
 	    snd_ac97_swap_ctl(ac97, "Master Playback", "Surround Playback", "Volume"))
@@ -2412,7 +2413,7 @@ static int tune_swap_surround(ac97_t *ac97)
 }
 
 /* ac97 tune: set up mic sharing for AD codecs */
-static int tune_ad_sharing(ac97_t *ac97)
+static int tune_ad_sharing(struct snd_ac97 *ac97)
 {
 	unsigned short scfg;
 	if ((ac97->id & 0xffffff00) != 0x41445300) {
@@ -2425,11 +2426,11 @@ static int tune_ad_sharing(ac97_t *ac97)
 	return 0;
 }
 
-static const snd_kcontrol_new_t snd_ac97_alc_jack_detect = 
+static const struct snd_kcontrol_new snd_ac97_alc_jack_detect = 
 AC97_SINGLE("Jack Detect", AC97_ALC650_CLOCK, 5, 1, 0);
 
 /* ac97 tune: set up ALC jack-select */
-static int tune_alc_jack(ac97_t *ac97)
+static int tune_alc_jack(struct snd_ac97 *ac97)
 {
 	if ((ac97->id & 0xffffff00) != 0x414c4700) {
 		snd_printk(KERN_ERR "ac97_quirk ALC_JACK is only for Realtek codecs\n");
@@ -2441,20 +2442,20 @@ static int tune_alc_jack(ac97_t *ac97)
 }
 
 /* ac97 tune: inversed EAPD bit */
-static int tune_inv_eapd(ac97_t *ac97)
+static int tune_inv_eapd(struct snd_ac97 *ac97)
 {
-	snd_kcontrol_t *kctl = ctl_find(ac97, "External Amplifier", NULL);
+	struct snd_kcontrol *kctl = ctl_find(ac97, "External Amplifier", NULL);
 	if (! kctl)
 		return -ENOENT;
 	set_inv_eapd(ac97, kctl);
 	return 0;
 }
 
-static int master_mute_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int master_mute_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
 	int err = snd_ac97_put_volsw(kcontrol, ucontrol);
 	if (err > 0) {
-		ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+		struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 		int shift = (kcontrol->private_value >> 8) & 0x0f;
 		int rshift = (kcontrol->private_value >> 12) & 0x0f;
 		unsigned short mask;
@@ -2470,9 +2471,9 @@ static int master_mute_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
 }
 
 /* ac97 tune: EAPD controls mute LED bound with the master mute */
-static int tune_mute_led(ac97_t *ac97)
+static int tune_mute_led(struct snd_ac97 *ac97)
 {
-	snd_kcontrol_t *msw = ctl_find(ac97, "Master Playback Switch", NULL);
+	struct snd_kcontrol *msw = ctl_find(ac97, "Master Playback Switch", NULL);
 	if (! msw)
 		return -ENOENT;
 	msw->put = master_mute_sw_put;
@@ -2483,7 +2484,7 @@ static int tune_mute_led(ac97_t *ac97)
 
 struct quirk_table {
 	const char *name;
-	int (*func)(ac97_t *);
+	int (*func)(struct snd_ac97 *);
 };
 
 static struct quirk_table applicable_quirks[] = {
@@ -2498,7 +2499,7 @@ static struct quirk_table applicable_quirks[] = {
 };
 
 /* apply the quirk with the given type */
-static int apply_quirk(ac97_t *ac97, int type)
+static int apply_quirk(struct snd_ac97 *ac97, int type)
 {
 	if (type <= 0)
 		return 0;
@@ -2510,7 +2511,7 @@ static int apply_quirk(ac97_t *ac97, int type)
 }
 
 /* apply the quirk with the given name */
-static int apply_quirk_str(ac97_t *ac97, const char *typestr)
+static int apply_quirk_str(struct snd_ac97 *ac97, const char *typestr)
 {
 	int i;
 	struct quirk_table *q;
@@ -2539,7 +2540,7 @@ static int apply_quirk_str(ac97_t *ac97, const char *typestr)
  * Returns zero if successful, or a negative error code on failure.
  */
 
-int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk, const char *override)
+int snd_ac97_tune_hardware(struct snd_ac97 *ac97, struct ac97_quirk *quirk, const char *override)
 {
 	int result;
 
diff --git a/sound/pci/ac97/ac97_local.h b/sound/pci/ac97/ac97_local.h
index 5ff3ef2cae3..e98587e027d 100644
--- a/sound/pci/ac97/ac97_local.h
+++ b/sound/pci/ac97/ac97_local.h
@@ -37,6 +37,7 @@
   .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \
   .private_value = (reg) | ((shift_left) << 8) | ((shift_right) << 12) | ((mask) << 16) | ((invert) << 24) }
 
+/* enum control */
 struct ac97_enum {
 	unsigned char reg;
 	unsigned char shift_l;
@@ -57,33 +58,33 @@ struct ac97_enum {
 
 /* ac97_codec.c */
 extern const char *snd_ac97_stereo_enhancements[];
-extern const snd_kcontrol_new_t snd_ac97_controls_3d[];
-extern const snd_kcontrol_new_t snd_ac97_controls_spdif[];
-snd_kcontrol_t *snd_ac97_cnew(const snd_kcontrol_new_t *_template, ac97_t * ac97);
-void snd_ac97_get_name(ac97_t *ac97, unsigned int id, char *name, int modem);
-int snd_ac97_info_volsw(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo);
-int snd_ac97_get_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
-int snd_ac97_put_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
-int snd_ac97_try_bit(ac97_t * ac97, int reg, int bit);
-int snd_ac97_remove_ctl(ac97_t *ac97, const char *name, const char *suffix);
-int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst, const char *suffix);
-int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2, const char *suffix);
-void snd_ac97_rename_vol_ctl(ac97_t *ac97, const char *src, const char *dst);
-void snd_ac97_restore_status(ac97_t *ac97);
-void snd_ac97_restore_iec958(ac97_t *ac97);
-int snd_ac97_info_enum_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo);
-int snd_ac97_get_enum_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
-int snd_ac97_put_enum_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
+extern const struct snd_kcontrol_new snd_ac97_controls_3d[];
+extern const struct snd_kcontrol_new snd_ac97_controls_spdif[];
+struct snd_kcontrol *snd_ac97_cnew(const struct snd_kcontrol_new *_template, struct snd_ac97 * ac97);
+void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, int modem);
+int snd_ac97_info_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
+int snd_ac97_get_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
+int snd_ac97_put_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
+int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit);
+int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name, const char *suffix);
+int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src, const char *dst, const char *suffix);
+int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1, const char *s2, const char *suffix);
+void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src, const char *dst);
+void snd_ac97_restore_status(struct snd_ac97 *ac97);
+void snd_ac97_restore_iec958(struct snd_ac97 *ac97);
+int snd_ac97_info_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
+int snd_ac97_get_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
+int snd_ac97_put_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
 
-int snd_ac97_update_bits_nolock(ac97_t *ac97, unsigned short reg,
+int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg,
 				unsigned short mask, unsigned short value);
 
 /* ac97_proc.c */
 #ifdef CONFIG_PROC_FS
-void snd_ac97_bus_proc_init(ac97_bus_t * ac97);
-void snd_ac97_bus_proc_done(ac97_bus_t * ac97);
-void snd_ac97_proc_init(ac97_t * ac97);
-void snd_ac97_proc_done(ac97_t * ac97);
+void snd_ac97_bus_proc_init(struct snd_ac97_bus * ac97);
+void snd_ac97_bus_proc_done(struct snd_ac97_bus * ac97);
+void snd_ac97_proc_init(struct snd_ac97 * ac97);
+void snd_ac97_proc_done(struct snd_ac97 * ac97);
 #else
 #define snd_ac97_bus_proc_init(ac97_bus_t) do { } while (0)
 #define snd_ac97_bus_proc_done(ac97_bus_t) do { } while (0)
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index de1c72ad2c6..c68ee0f3e72 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -39,7 +39,7 @@
  *  Chip specific initialization
  */
 
-static int patch_build_controls(ac97_t * ac97, const snd_kcontrol_new_t *controls, int count)
+static int patch_build_controls(struct snd_ac97 * ac97, const struct snd_kcontrol_new *controls, int count)
 {
 	int idx, err;
 
@@ -50,7 +50,7 @@ static int patch_build_controls(ac97_t * ac97, const snd_kcontrol_new_t *control
 }
 
 /* set to the page, update bits and restore the page */
-static int ac97_update_bits_page(ac97_t *ac97, unsigned short reg, unsigned short mask, unsigned short value, unsigned short page)
+static int ac97_update_bits_page(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value, unsigned short page)
 {
 	unsigned short page_save;
 	int ret;
@@ -67,7 +67,7 @@ static int ac97_update_bits_page(ac97_t *ac97, unsigned short reg, unsigned shor
 /*
  * shared line-in/mic controls
  */
-static int ac97_enum_text_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo,
+static int ac97_enum_text_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo,
 			       const char **texts, unsigned int nums)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
@@ -79,23 +79,23 @@ static int ac97_enum_text_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *ui
 	return 0;
 }
 
-static int ac97_surround_jack_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int ac97_surround_jack_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static const char *texts[] = { "Shared", "Independent" };
 	return ac97_enum_text_info(kcontrol, uinfo, texts, 2);
 }
 
-static int ac97_surround_jack_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int ac97_surround_jack_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] = ac97->indep_surround;
 	return 0;
 }
 
-static int ac97_surround_jack_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int ac97_surround_jack_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned char indep = !!ucontrol->value.enumerated.item[0];
 
 	if (indep != ac97->indep_surround) {
@@ -107,7 +107,7 @@ static int ac97_surround_jack_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_va
 	return 0;
 }
 
-static int ac97_channel_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int ac97_channel_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static const char *texts[] = { "2ch", "4ch", "6ch" };
 	if (kcontrol->private_value)
@@ -115,17 +115,17 @@ static int ac97_channel_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return ac97_enum_text_info(kcontrol, uinfo, texts, 3);
 }
 
-static int ac97_channel_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int ac97_channel_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] = ac97->channel_mode;
 	return 0;
 }
 
-static int ac97_channel_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int ac97_channel_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned char mode = ucontrol->value.enumerated.item[0];
 
 	if (mode != ac97->channel_mode) {
@@ -163,22 +163,22 @@ static int ac97_channel_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
 		.private_value = 1, \
 	}
 
-static inline int is_surround_on(ac97_t *ac97)
+static inline int is_surround_on(struct snd_ac97 *ac97)
 {
 	return ac97->channel_mode >= 1;
 }
 
-static inline int is_clfe_on(ac97_t *ac97)
+static inline int is_clfe_on(struct snd_ac97 *ac97)
 {
 	return ac97->channel_mode >= 2;
 }
 
-static inline int is_shared_linein(ac97_t *ac97)
+static inline int is_shared_linein(struct snd_ac97 *ac97)
 {
 	return ! ac97->indep_surround && is_surround_on(ac97);
 }
 
-static inline int is_shared_micin(ac97_t *ac97)
+static inline int is_shared_micin(struct snd_ac97 *ac97)
 {
 	return ! ac97->indep_surround && is_clfe_on(ac97);
 }
@@ -187,7 +187,7 @@ static inline int is_shared_micin(ac97_t *ac97)
 /* The following snd_ac97_ymf753_... items added by David Shust (dshust@shustring.com) */
 
 /* It is possible to indicate to the Yamaha YMF753 the type of speakers being used. */
-static int snd_ac97_ymf753_info_speaker(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ac97_ymf753_info_speaker(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[3] = {
 		"Standard", "Small", "Smaller"
@@ -202,9 +202,9 @@ static int snd_ac97_ymf753_info_speaker(snd_kcontrol_t *kcontrol, snd_ctl_elem_i
 	return 0;
 }
 
-static int snd_ac97_ymf753_get_speaker(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_ymf753_get_speaker(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	val = ac97->regs[AC97_YMF753_3D_MODE_SEL];
@@ -215,9 +215,9 @@ static int snd_ac97_ymf753_get_speaker(snd_kcontrol_t * kcontrol, snd_ctl_elem_v
 	return 0;
 }
 
-static int snd_ac97_ymf753_put_speaker(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_ymf753_put_speaker(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	if (ucontrol->value.enumerated.item[0] > 2)
@@ -226,7 +226,7 @@ static int snd_ac97_ymf753_put_speaker(snd_kcontrol_t * kcontrol, snd_ctl_elem_v
 	return snd_ac97_update(ac97, AC97_YMF753_3D_MODE_SEL, val);
 }
 
-static const snd_kcontrol_new_t snd_ac97_ymf753_controls_speaker =
+static const struct snd_kcontrol_new snd_ac97_ymf753_controls_speaker =
 {
 	.iface  = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name   = "3D Control - Speaker",
@@ -236,7 +236,7 @@ static const snd_kcontrol_new_t snd_ac97_ymf753_controls_speaker =
 };
 
 /* It is possible to indicate to the Yamaha YMF753 the source to direct to the S/PDIF output. */
-static int snd_ac97_ymf753_spdif_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ac97_ymf753_spdif_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[2] = { "AC-Link", "A/D Converter" };
 
@@ -249,9 +249,9 @@ static int snd_ac97_ymf753_spdif_source_info(snd_kcontrol_t *kcontrol, snd_ctl_e
 	return 0;
 }
 
-static int snd_ac97_ymf753_spdif_source_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_ymf753_spdif_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	val = ac97->regs[AC97_YMF753_DIT_CTRL2];
@@ -259,9 +259,9 @@ static int snd_ac97_ymf753_spdif_source_get(snd_kcontrol_t * kcontrol, snd_ctl_e
 	return 0;
 }
 
-static int snd_ac97_ymf753_spdif_source_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_ymf753_spdif_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	if (ucontrol->value.enumerated.item[0] > 1)
@@ -274,7 +274,7 @@ static int snd_ac97_ymf753_spdif_source_put(snd_kcontrol_t * kcontrol, snd_ctl_e
    The YMF753 will output the S/PDIF signal to pin 43, 47 (EAPD), or 48.
    By default, no output pin is selected, and the S/PDIF signal is not output.
    There is also a bit to mute S/PDIF output in a vendor-specific register. */
-static int snd_ac97_ymf753_spdif_output_pin_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ac97_ymf753_spdif_output_pin_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[3] = { "Disabled", "Pin 43", "Pin 48" };
 
@@ -287,9 +287,9 @@ static int snd_ac97_ymf753_spdif_output_pin_info(snd_kcontrol_t *kcontrol, snd_c
 	return 0;
 }
 
-static int snd_ac97_ymf753_spdif_output_pin_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_ymf753_spdif_output_pin_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	val = ac97->regs[AC97_YMF753_DIT_CTRL2];
@@ -297,9 +297,9 @@ static int snd_ac97_ymf753_spdif_output_pin_get(snd_kcontrol_t * kcontrol, snd_c
 	return 0;
 }
 
-static int snd_ac97_ymf753_spdif_output_pin_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_ymf753_spdif_output_pin_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	if (ucontrol->value.enumerated.item[0] > 2)
@@ -311,7 +311,7 @@ static int snd_ac97_ymf753_spdif_output_pin_put(snd_kcontrol_t * kcontrol, snd_c
 	   snd_ac97_write_cache(ac97, 0x62, snd_ac97_read(ac97, 0x62) | 0x0008); */
 }
 
-static const snd_kcontrol_new_t snd_ac97_ymf753_controls_spdif[3] = {
+static const struct snd_kcontrol_new snd_ac97_ymf753_controls_spdif[3] = {
 	{
 		.iface	= SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name	= SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source",
@@ -329,9 +329,9 @@ static const snd_kcontrol_new_t snd_ac97_ymf753_controls_spdif[3] = {
 	AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",NONE,NONE) "Mute", AC97_YMF753_DIT_CTRL2, 2, 1, 1)
 };
 
-static int patch_yamaha_ymf753_3d(ac97_t * ac97)
+static int patch_yamaha_ymf753_3d(struct snd_ac97 * ac97)
 {
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 	int err;
 
 	if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0)
@@ -345,7 +345,7 @@ static int patch_yamaha_ymf753_3d(ac97_t * ac97)
 	return 0;
 }
 
-static int patch_yamaha_ymf753_post_spdif(ac97_t * ac97)
+static int patch_yamaha_ymf753_post_spdif(struct snd_ac97 * ac97)
 {
 	int err;
 
@@ -359,7 +359,7 @@ static struct snd_ac97_build_ops patch_yamaha_ymf753_ops = {
 	.build_post_spdif = patch_yamaha_ymf753_post_spdif
 };
 
-int patch_yamaha_ymf753(ac97_t * ac97)
+int patch_yamaha_ymf753(struct snd_ac97 * ac97)
 {
 	/* Patch for Yamaha YMF753, Copyright (c) by David Shust, dshust@shustring.com.
 	   This chip has nonstandard and extended behaviour with regard to its S/PDIF output.
@@ -380,12 +380,12 @@ int patch_yamaha_ymf753(ac97_t * ac97)
  *  added support for WM9705,WM9708,WM9709,WM9710,WM9711,WM9712 and WM9717.
  */
 
-static const snd_kcontrol_new_t wm97xx_snd_ac97_controls[] = {
+static const struct snd_kcontrol_new wm97xx_snd_ac97_controls[] = {
 AC97_DOUBLE("Front Playback Volume", AC97_WM97XX_FMIXER_VOL, 8, 0, 31, 1),
 AC97_SINGLE("Front Playback Switch", AC97_WM97XX_FMIXER_VOL, 15, 1, 1),
 };
 
-static int patch_wolfson_wm9703_specific(ac97_t * ac97)
+static int patch_wolfson_wm9703_specific(struct snd_ac97 * ac97)
 {
 	/* This is known to work for the ViewSonic ViewPad 1000
 	 * Randolph Bentson <bentson@holmsjoen.com>
@@ -405,13 +405,13 @@ static struct snd_ac97_build_ops patch_wolfson_wm9703_ops = {
 	.build_specific = patch_wolfson_wm9703_specific,
 };
 
-int patch_wolfson03(ac97_t * ac97)
+int patch_wolfson03(struct snd_ac97 * ac97)
 {
 	ac97->build_ops = &patch_wolfson_wm9703_ops;
 	return 0;
 }
 
-static const snd_kcontrol_new_t wm9704_snd_ac97_controls[] = {
+static const struct snd_kcontrol_new wm9704_snd_ac97_controls[] = {
 AC97_DOUBLE("Front Playback Volume", AC97_WM97XX_FMIXER_VOL, 8, 0, 31, 1),
 AC97_SINGLE("Front Playback Switch", AC97_WM97XX_FMIXER_VOL, 15, 1, 1),
 AC97_DOUBLE("Rear Playback Volume", AC97_WM9704_RMIXER_VOL, 8, 0, 31, 1),
@@ -420,7 +420,7 @@ AC97_DOUBLE("Rear DAC Volume", AC97_WM9704_RPCM_VOL, 8, 0, 31, 1),
 AC97_DOUBLE("Surround Volume", AC97_SURROUND_MASTER, 8, 0, 31, 1),
 };
 
-static int patch_wolfson_wm9704_specific(ac97_t * ac97)
+static int patch_wolfson_wm9704_specific(struct snd_ac97 * ac97)
 {
 	int err, i;
 	for (i = 0; i < ARRAY_SIZE(wm9704_snd_ac97_controls); i++) {
@@ -436,14 +436,14 @@ static struct snd_ac97_build_ops patch_wolfson_wm9704_ops = {
 	.build_specific = patch_wolfson_wm9704_specific,
 };
 
-int patch_wolfson04(ac97_t * ac97)
+int patch_wolfson04(struct snd_ac97 * ac97)
 {
 	/* WM9704M/9704Q */
 	ac97->build_ops = &patch_wolfson_wm9704_ops;
 	return 0;
 }
 
-static int patch_wolfson_wm9705_specific(ac97_t * ac97)
+static int patch_wolfson_wm9705_specific(struct snd_ac97 * ac97)
 {
 	int err, i;
 	for (i = 0; i < ARRAY_SIZE(wm97xx_snd_ac97_controls); i++) {
@@ -458,7 +458,7 @@ static struct snd_ac97_build_ops patch_wolfson_wm9705_ops = {
 	.build_specific = patch_wolfson_wm9705_specific,
 };
 
-int patch_wolfson05(ac97_t * ac97)
+int patch_wolfson05(struct snd_ac97 * ac97)
 {
 	/* WM9705, WM9710 */
 	ac97->build_ops = &patch_wolfson_wm9705_ops;
@@ -490,7 +490,7 @@ AC97_ENUM_DOUBLE(AC97_REC_SEL, 8, 0, 8, wm9711_rec_sel),
 AC97_ENUM_SINGLE(AC97_PCI_SVID, 5, 2, wm9711_ng_type),
 };
 
-static const snd_kcontrol_new_t wm9711_snd_ac97_controls[] = {
+static const struct snd_kcontrol_new wm9711_snd_ac97_controls[] = {
 AC97_SINGLE("ALC Target Volume", AC97_CODEC_CLASS_REV, 12, 15, 0),
 AC97_SINGLE("ALC Hold Time", AC97_CODEC_CLASS_REV, 8, 15, 0),
 AC97_SINGLE("ALC Decay Time", AC97_CODEC_CLASS_REV, 4, 15, 0),
@@ -568,7 +568,7 @@ AC97_SINGLE("Headphone ZC Switch", AC97_HEADPHONE, 7, 1, 0),
 AC97_SINGLE("Mono ZC Switch", AC97_MASTER_MONO, 7, 1, 0),
 };
 
-static int patch_wolfson_wm9711_specific(ac97_t * ac97)
+static int patch_wolfson_wm9711_specific(struct snd_ac97 * ac97)
 {
 	int err, i;
 	
@@ -589,7 +589,7 @@ static struct snd_ac97_build_ops patch_wolfson_wm9711_ops = {
 	.build_specific = patch_wolfson_wm9711_specific,
 };
 
-int patch_wolfson11(ac97_t * ac97)
+int patch_wolfson11(struct snd_ac97 * ac97)
 {
 	/* WM9711, WM9712 */
 	ac97->build_ops = &patch_wolfson_wm9711_ops;
@@ -636,7 +636,7 @@ AC97_ENUM_SINGLE(AC97_GENERAL_PURPOSE, 15, 2, wm9713_base),
 AC97_ENUM_SINGLE(AC97_PCI_SVID, 5, 2, wm9713_ng_type),
 };
 
-static const snd_kcontrol_new_t wm13_snd_ac97_controls[] = {
+static const struct snd_kcontrol_new wm13_snd_ac97_controls[] = {
 AC97_DOUBLE("Line In Volume", AC97_PC_BEEP, 8, 0, 31, 1),
 AC97_SINGLE("Line In to Headphone Switch", AC97_PC_BEEP, 15, 1, 1),
 AC97_SINGLE("Line In to Master Switch", AC97_PC_BEEP, 14, 1, 1),
@@ -728,14 +728,14 @@ AC97_SINGLE("Bass Volume", AC97_GENERAL_PURPOSE, 8, 15, 1),
 AC97_SINGLE("Tone Volume", AC97_GENERAL_PURPOSE, 0, 15, 1),
 };
 
-static const snd_kcontrol_new_t wm13_snd_ac97_controls_3d[] = {
+static const struct snd_kcontrol_new wm13_snd_ac97_controls_3d[] = {
 AC97_ENUM("Inv Input Mux", wm9713_enum[11]),
 AC97_SINGLE("3D Upper Cut-off Switch", AC97_REC_GAIN_MIC, 5, 1, 0),
 AC97_SINGLE("3D Lower Cut-off Switch", AC97_REC_GAIN_MIC, 4, 1, 0),
 AC97_SINGLE("3D Depth", AC97_REC_GAIN_MIC, 0, 15, 1),
 };
 
-static int patch_wolfson_wm9713_3d (ac97_t * ac97)
+static int patch_wolfson_wm9713_3d (struct snd_ac97 * ac97)
 {
 	int err, i;
     
@@ -746,7 +746,7 @@ static int patch_wolfson_wm9713_3d (ac97_t * ac97)
 	return 0;
 }
 
-static int patch_wolfson_wm9713_specific(ac97_t * ac97)
+static int patch_wolfson_wm9713_specific(struct snd_ac97 * ac97)
 {
 	int err, i;
 	
@@ -765,13 +765,13 @@ static int patch_wolfson_wm9713_specific(ac97_t * ac97)
 }
 
 #ifdef CONFIG_PM
-static void patch_wolfson_wm9713_suspend (ac97_t * ac97)
+static void patch_wolfson_wm9713_suspend (struct snd_ac97 * ac97)
 {
 	snd_ac97_write_cache(ac97, AC97_EXTENDED_MID, 0xfeff);
 	snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0xffff);
 }
 
-static void patch_wolfson_wm9713_resume (ac97_t * ac97)
+static void patch_wolfson_wm9713_resume (struct snd_ac97 * ac97)
 {
 	snd_ac97_write_cache(ac97, AC97_EXTENDED_MID, 0xda00);
 	snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0x3810);
@@ -788,7 +788,7 @@ static struct snd_ac97_build_ops patch_wolfson_wm9713_ops = {
 #endif
 };
 
-int patch_wolfson13(ac97_t * ac97)
+int patch_wolfson13(struct snd_ac97 * ac97)
 {
 	/* WM9713, WM9714 */
 	ac97->build_ops = &patch_wolfson_wm9713_ops;
@@ -808,7 +808,7 @@ int patch_wolfson13(ac97_t * ac97)
 /*
  * Tritech codec
  */
-int patch_tritech_tr28028(ac97_t * ac97)
+int patch_tritech_tr28028(struct snd_ac97 * ac97)
 {
 	snd_ac97_write_cache(ac97, 0x26, 0x0300);
 	snd_ac97_write_cache(ac97, 0x26, 0x0000);
@@ -820,9 +820,9 @@ int patch_tritech_tr28028(ac97_t * ac97)
 /*
  * Sigmatel STAC97xx codecs
  */
-static int patch_sigmatel_stac9700_3d(ac97_t * ac97)
+static int patch_sigmatel_stac9700_3d(struct snd_ac97 * ac97)
 {
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 	int err;
 
 	if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0)
@@ -833,9 +833,9 @@ static int patch_sigmatel_stac9700_3d(ac97_t * ac97)
 	return 0;
 }
 
-static int patch_sigmatel_stac9708_3d(ac97_t * ac97)
+static int patch_sigmatel_stac9708_3d(struct snd_ac97 * ac97)
 {
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 	int err;
 
 	if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0)
@@ -850,18 +850,18 @@ static int patch_sigmatel_stac9708_3d(ac97_t * ac97)
 	return 0;
 }
 
-static const snd_kcontrol_new_t snd_ac97_sigmatel_4speaker =
+static const struct snd_kcontrol_new snd_ac97_sigmatel_4speaker =
 AC97_SINGLE("Sigmatel 4-Speaker Stereo Playback Switch", AC97_SIGMATEL_DAC2INVERT, 2, 1, 0);
 
-static const snd_kcontrol_new_t snd_ac97_sigmatel_phaseinvert =
+static const struct snd_kcontrol_new snd_ac97_sigmatel_phaseinvert =
 AC97_SINGLE("Sigmatel Surround Phase Inversion Playback Switch", AC97_SIGMATEL_DAC2INVERT, 3, 1, 0);
 
-static const snd_kcontrol_new_t snd_ac97_sigmatel_controls[] = {
+static const struct snd_kcontrol_new snd_ac97_sigmatel_controls[] = {
 AC97_SINGLE("Sigmatel DAC 6dB Attenuate", AC97_SIGMATEL_ANALOG, 1, 1, 0),
 AC97_SINGLE("Sigmatel ADC 6dB Attenuate", AC97_SIGMATEL_ANALOG, 0, 1, 0)
 };
 
-static int patch_sigmatel_stac97xx_specific(ac97_t * ac97)
+static int patch_sigmatel_stac97xx_specific(struct snd_ac97 * ac97)
 {
 	int err;
 
@@ -886,15 +886,15 @@ static struct snd_ac97_build_ops patch_sigmatel_stac9700_ops = {
 	.build_specific	= patch_sigmatel_stac97xx_specific
 };
 
-int patch_sigmatel_stac9700(ac97_t * ac97)
+int patch_sigmatel_stac9700(struct snd_ac97 * ac97)
 {
 	ac97->build_ops = &patch_sigmatel_stac9700_ops;
 	return 0;
 }
 
-static int snd_ac97_stac9708_put_bias(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_ac97_stac9708_put_bias(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	int err;
 
 	down(&ac97->page_mutex);
@@ -906,7 +906,7 @@ static int snd_ac97_stac9708_put_bias(snd_kcontrol_t *kcontrol, snd_ctl_elem_val
 	return err;
 }
 
-static const snd_kcontrol_new_t snd_ac97_stac9708_bias_control = {
+static const struct snd_kcontrol_new snd_ac97_stac9708_bias_control = {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "Sigmatel Output Bias Switch",
 	.info = snd_ac97_info_volsw,
@@ -915,7 +915,7 @@ static const snd_kcontrol_new_t snd_ac97_stac9708_bias_control = {
 	.private_value = AC97_SINGLE_VALUE(AC97_SIGMATEL_BIAS2, 4, 1, 0),
 };
 
-static int patch_sigmatel_stac9708_specific(ac97_t *ac97)
+static int patch_sigmatel_stac9708_specific(struct snd_ac97 *ac97)
 {
 	int err;
 
@@ -930,7 +930,7 @@ static struct snd_ac97_build_ops patch_sigmatel_stac9708_ops = {
 	.build_specific	= patch_sigmatel_stac9708_specific
 };
 
-int patch_sigmatel_stac9708(ac97_t * ac97)
+int patch_sigmatel_stac9708(struct snd_ac97 * ac97)
 {
 	unsigned int codec72, codec6c;
 
@@ -956,7 +956,7 @@ int patch_sigmatel_stac9708(ac97_t * ac97)
 	return 0;
 }
 
-int patch_sigmatel_stac9721(ac97_t * ac97)
+int patch_sigmatel_stac9721(struct snd_ac97 * ac97)
 {
 	ac97->build_ops = &patch_sigmatel_stac9700_ops;
 	if (snd_ac97_read(ac97, AC97_SIGMATEL_ANALOG) == 0) {
@@ -970,7 +970,7 @@ int patch_sigmatel_stac9721(ac97_t * ac97)
 	return 0;
 }
 
-int patch_sigmatel_stac9744(ac97_t * ac97)
+int patch_sigmatel_stac9744(struct snd_ac97 * ac97)
 {
 	// patch for SigmaTel
 	ac97->build_ops = &patch_sigmatel_stac9700_ops;
@@ -982,7 +982,7 @@ int patch_sigmatel_stac9744(ac97_t * ac97)
 	return 0;
 }
 
-int patch_sigmatel_stac9756(ac97_t * ac97)
+int patch_sigmatel_stac9756(struct snd_ac97 * ac97)
 {
 	// patch for SigmaTel
 	ac97->build_ops = &patch_sigmatel_stac9700_ops;
@@ -994,7 +994,7 @@ int patch_sigmatel_stac9756(ac97_t * ac97)
 	return 0;
 }
 
-static int snd_ac97_stac9758_output_jack_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int snd_ac97_stac9758_output_jack_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[5] = { "Input/Disabled", "Front Output",
 		"Rear Output", "Center/LFE Output", "Mixer Output" };
@@ -1008,9 +1008,9 @@ static int snd_ac97_stac9758_output_jack_info(snd_kcontrol_t *kcontrol, snd_ctl_
 	return 0;
 }
 
-static int snd_ac97_stac9758_output_jack_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t* ucontrol)
+static int snd_ac97_stac9758_output_jack_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	int shift = kcontrol->private_value;
 	unsigned short val;
 
@@ -1022,9 +1022,9 @@ static int snd_ac97_stac9758_output_jack_get(snd_kcontrol_t *kcontrol, snd_ctl_e
 	return 0;
 }
 
-static int snd_ac97_stac9758_output_jack_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_ac97_stac9758_output_jack_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	int shift = kcontrol->private_value;
 	unsigned short val;
 
@@ -1038,7 +1038,7 @@ static int snd_ac97_stac9758_output_jack_put(snd_kcontrol_t *kcontrol, snd_ctl_e
 				     7 << shift, val << shift, 0);
 }
 
-static int snd_ac97_stac9758_input_jack_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int snd_ac97_stac9758_input_jack_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[7] = { "Mic2 Jack", "Mic1 Jack", "Line In Jack",
 		"Front Jack", "Rear Jack", "Center/LFE Jack", "Mute" };
@@ -1052,9 +1052,9 @@ static int snd_ac97_stac9758_input_jack_info(snd_kcontrol_t *kcontrol, snd_ctl_e
 	return 0;
 }
 
-static int snd_ac97_stac9758_input_jack_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t* ucontrol)
+static int snd_ac97_stac9758_input_jack_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	int shift = kcontrol->private_value;
 	unsigned short val;
 
@@ -1063,16 +1063,16 @@ static int snd_ac97_stac9758_input_jack_get(snd_kcontrol_t *kcontrol, snd_ctl_el
 	return 0;
 }
 
-static int snd_ac97_stac9758_input_jack_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_ac97_stac9758_input_jack_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	int shift = kcontrol->private_value;
 
 	return ac97_update_bits_page(ac97, AC97_SIGMATEL_INSEL, 7 << shift,
 				     ucontrol->value.enumerated.item[0] << shift, 0);
 }
 
-static int snd_ac97_stac9758_phonesel_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int snd_ac97_stac9758_phonesel_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[3] = { "None", "Front Jack", "Rear Jack" };
 
@@ -1085,17 +1085,17 @@ static int snd_ac97_stac9758_phonesel_info(snd_kcontrol_t *kcontrol, snd_ctl_ele
 	return 0;
 }
 
-static int snd_ac97_stac9758_phonesel_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t* ucontrol)
+static int snd_ac97_stac9758_phonesel_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] = ac97->regs[AC97_SIGMATEL_IOMISC] & 3;
 	return 0;
 }
 
-static int snd_ac97_stac9758_phonesel_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_ac97_stac9758_phonesel_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 
 	return ac97_update_bits_page(ac97, AC97_SIGMATEL_IOMISC, 3,
 				     ucontrol->value.enumerated.item[0], 0);
@@ -1113,7 +1113,7 @@ static int snd_ac97_stac9758_phonesel_put(snd_kcontrol_t *kcontrol, snd_ctl_elem
 	.get = snd_ac97_stac9758_input_jack_get, \
 	.put = snd_ac97_stac9758_input_jack_put, \
 	.private_value = shift }
-static const snd_kcontrol_new_t snd_ac97_sigmatel_stac9758_controls[] = {
+static const struct snd_kcontrol_new snd_ac97_sigmatel_stac9758_controls[] = {
 	STAC9758_OUTPUT_JACK("Mic1 Jack", 1),
 	STAC9758_OUTPUT_JACK("LineIn Jack", 4),
 	STAC9758_OUTPUT_JACK("Front Jack", 7),
@@ -1132,7 +1132,7 @@ static const snd_kcontrol_new_t snd_ac97_sigmatel_stac9758_controls[] = {
 	AC97_SINGLE("Headphone +3dB Boost", AC97_SIGMATEL_IOMISC, 8, 1, 0)
 };
 
-static int patch_sigmatel_stac9758_specific(ac97_t *ac97)
+static int patch_sigmatel_stac9758_specific(struct snd_ac97 *ac97)
 {
 	int err;
 
@@ -1159,7 +1159,7 @@ static struct snd_ac97_build_ops patch_sigmatel_stac9758_ops = {
 	.build_specific	= patch_sigmatel_stac9758_specific
 };
 
-int patch_sigmatel_stac9758(ac97_t * ac97)
+int patch_sigmatel_stac9758(struct snd_ac97 * ac97)
 {
 	static unsigned short regs[4] = {
 		AC97_SIGMATEL_OUTSEL,
@@ -1202,12 +1202,12 @@ int patch_sigmatel_stac9758(ac97_t * ac97)
 /*
  * Cirrus Logic CS42xx codecs
  */
-static const snd_kcontrol_new_t snd_ac97_cirrus_controls_spdif[2] = {
+static const struct snd_kcontrol_new snd_ac97_cirrus_controls_spdif[2] = {
 	AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH), AC97_CSR_SPDIF, 15, 1, 0),
 	AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "AC97-SPSA", AC97_CSR_ACMODE, 0, 3, 0)
 };
 
-static int patch_cirrus_build_spdif(ac97_t * ac97)
+static int patch_cirrus_build_spdif(struct snd_ac97 * ac97)
 {
 	int err;
 
@@ -1233,7 +1233,7 @@ static struct snd_ac97_build_ops patch_cirrus_ops = {
 	.build_spdif = patch_cirrus_build_spdif
 };
 
-int patch_cirrus_spdif(ac97_t * ac97)
+int patch_cirrus_spdif(struct snd_ac97 * ac97)
 {
 	/* Basically, the cs4201/cs4205/cs4297a has non-standard sp/dif registers.
 	   WHY CAN'T ANYONE FOLLOW THE BLOODY SPEC?  *sigh*
@@ -1254,7 +1254,7 @@ int patch_cirrus_spdif(ac97_t * ac97)
 	return 0;
 }
 
-int patch_cirrus_cs4299(ac97_t * ac97)
+int patch_cirrus_cs4299(struct snd_ac97 * ac97)
 {
 	/* force the detection of PC Beep */
 	ac97->flags |= AC97_HAS_PC_BEEP;
@@ -1265,11 +1265,11 @@ int patch_cirrus_cs4299(ac97_t * ac97)
 /*
  * Conexant codecs
  */
-static const snd_kcontrol_new_t snd_ac97_conexant_controls_spdif[1] = {
+static const struct snd_kcontrol_new snd_ac97_conexant_controls_spdif[1] = {
 	AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH), AC97_CXR_AUDIO_MISC, 3, 1, 0),
 };
 
-static int patch_conexant_build_spdif(ac97_t * ac97)
+static int patch_conexant_build_spdif(struct snd_ac97 * ac97)
 {
 	int err;
 
@@ -1290,7 +1290,7 @@ static struct snd_ac97_build_ops patch_conexant_ops = {
 	.build_spdif = patch_conexant_build_spdif
 };
 
-int patch_conexant(ac97_t * ac97)
+int patch_conexant(struct snd_ac97 * ac97)
 {
 	ac97->build_ops = &patch_conexant_ops;
 	ac97->flags |= AC97_CX_SPDIF;
@@ -1303,7 +1303,7 @@ int patch_conexant(ac97_t * ac97)
  * Analog Device AD18xx, AD19xx codecs
  */
 #ifdef CONFIG_PM
-static void ad18xx_resume(ac97_t *ac97)
+static void ad18xx_resume(struct snd_ac97 *ac97)
 {
 	static unsigned short setup_regs[] = {
 		AC97_AD_MISC, AC97_AD_SERIAL_CFG, AC97_AD_JACK_SPDIF,
@@ -1367,7 +1367,7 @@ static void ad18xx_resume(ac97_t *ac97)
 }
 #endif
 
-int patch_ad1819(ac97_t * ac97)
+int patch_ad1819(struct snd_ac97 * ac97)
 {
 	unsigned short scfg;
 
@@ -1377,7 +1377,7 @@ int patch_ad1819(ac97_t * ac97)
 	return 0;
 }
 
-static unsigned short patch_ad1881_unchained(ac97_t * ac97, int idx, unsigned short mask)
+static unsigned short patch_ad1881_unchained(struct snd_ac97 * ac97, int idx, unsigned short mask)
 {
 	unsigned short val;
 
@@ -1393,7 +1393,7 @@ static unsigned short patch_ad1881_unchained(ac97_t * ac97, int idx, unsigned sh
 	return mask;
 }
 
-static int patch_ad1881_chained1(ac97_t * ac97, int idx, unsigned short codec_bits)
+static int patch_ad1881_chained1(struct snd_ac97 * ac97, int idx, unsigned short codec_bits)
 {
 	static int cfg_bits[3] = { 1<<12, 1<<14, 1<<13 };
 	unsigned short val;
@@ -1411,7 +1411,7 @@ static int patch_ad1881_chained1(ac97_t * ac97, int idx, unsigned short codec_bi
 	return 1;
 }
 
-static void patch_ad1881_chained(ac97_t * ac97, int unchained_idx, int cidx1, int cidx2)
+static void patch_ad1881_chained(struct snd_ac97 * ac97, int unchained_idx, int cidx1, int cidx2)
 {
 	// already detected?
 	if (ac97->spec.ad18xx.unchained[cidx1] || ac97->spec.ad18xx.chained[cidx1])
@@ -1441,7 +1441,7 @@ static struct snd_ac97_build_ops patch_ad1881_build_ops = {
 #endif
 };
 
-int patch_ad1881(ac97_t * ac97)
+int patch_ad1881(struct snd_ac97 * ac97)
 {
 	static const char cfg_idxs[3][2] = {
 		{2, 1},
@@ -1500,7 +1500,7 @@ int patch_ad1881(ac97_t * ac97)
 	return 0;
 }
 
-static const snd_kcontrol_new_t snd_ac97_controls_ad1885[] = {
+static const struct snd_kcontrol_new snd_ac97_controls_ad1885[] = {
 	AC97_SINGLE("Digital Mono Direct", AC97_AD_MISC, 11, 1, 0),
 	/* AC97_SINGLE("Digital Audio Mode", AC97_AD_MISC, 12, 1, 0), */ /* seems problematic */
 	AC97_SINGLE("Low Power Mixer", AC97_AD_MISC, 14, 1, 0),
@@ -1509,7 +1509,7 @@ static const snd_kcontrol_new_t snd_ac97_controls_ad1885[] = {
 	AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 8, 1, 1), /* inverted */
 };
 
-static int patch_ad1885_specific(ac97_t * ac97)
+static int patch_ad1885_specific(struct snd_ac97 * ac97)
 {
 	int err;
 
@@ -1525,7 +1525,7 @@ static struct snd_ac97_build_ops patch_ad1885_build_ops = {
 #endif
 };
 
-int patch_ad1885(ac97_t * ac97)
+int patch_ad1885(struct snd_ac97 * ac97)
 {
 	patch_ad1881(ac97);
 	/* This is required to deal with the Intel D815EEAL2 */
@@ -1538,7 +1538,7 @@ int patch_ad1885(ac97_t * ac97)
 	return 0;
 }
 
-int patch_ad1886(ac97_t * ac97)
+int patch_ad1886(struct snd_ac97 * ac97)
 {
 	patch_ad1881(ac97);
 	/* Presario700 workaround */
@@ -1569,7 +1569,7 @@ int patch_ad1886(ac97_t * ac97)
 #define AC97_AD198X_DACZ	0x8000	/* DAC zero-fill mode */
 
 
-static int snd_ac97_ad198x_spdif_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ac97_ad198x_spdif_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[2] = { "AC-Link", "A/D Converter" };
 
@@ -1582,9 +1582,9 @@ static int snd_ac97_ad198x_spdif_source_info(snd_kcontrol_t *kcontrol, snd_ctl_e
 	return 0;
 }
 
-static int snd_ac97_ad198x_spdif_source_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_ad198x_spdif_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	val = ac97->regs[AC97_AD_SERIAL_CFG];
@@ -1592,9 +1592,9 @@ static int snd_ac97_ad198x_spdif_source_get(snd_kcontrol_t * kcontrol, snd_ctl_e
 	return 0;
 }
 
-static int snd_ac97_ad198x_spdif_source_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_ad198x_spdif_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	if (ucontrol->value.enumerated.item[0] > 1)
@@ -1603,7 +1603,7 @@ static int snd_ac97_ad198x_spdif_source_put(snd_kcontrol_t * kcontrol, snd_ctl_e
 	return snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x0004, val);
 }
 
-static const snd_kcontrol_new_t snd_ac97_ad198x_spdif_source = {
+static const struct snd_kcontrol_new snd_ac97_ad198x_spdif_source = {
 	.iface	= SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name	= SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source",
 	.info	= snd_ac97_ad198x_spdif_source_info,
@@ -1611,17 +1611,17 @@ static const snd_kcontrol_new_t snd_ac97_ad198x_spdif_source = {
 	.put	= snd_ac97_ad198x_spdif_source_put,
 };
 
-static int patch_ad198x_post_spdif(ac97_t * ac97)
+static int patch_ad198x_post_spdif(struct snd_ac97 * ac97)
 {
  	return patch_build_controls(ac97, &snd_ac97_ad198x_spdif_source, 1);
 }
 
-static const snd_kcontrol_new_t snd_ac97_ad1981x_jack_sense[] = {
+static const struct snd_kcontrol_new snd_ac97_ad1981x_jack_sense[] = {
 	AC97_SINGLE("Headphone Jack Sense", AC97_AD_JACK_SPDIF, 11, 1, 0),
 	AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 12, 1, 0),
 };
 
-static int patch_ad1981a_specific(ac97_t * ac97)
+static int patch_ad1981a_specific(struct snd_ac97 * ac97)
 {
 	return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
 				    ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
@@ -1635,7 +1635,7 @@ static struct snd_ac97_build_ops patch_ad1981a_build_ops = {
 #endif
 };
 
-static void check_ad1981_hp_jack_sense(ac97_t *ac97)
+static void check_ad1981_hp_jack_sense(struct snd_ac97 *ac97)
 {
 	u32 subid = ((u32)ac97->subsystem_vendor << 16) | ac97->subsystem_device;
 	switch (subid) {
@@ -1649,7 +1649,7 @@ static void check_ad1981_hp_jack_sense(ac97_t *ac97)
 	}
 }
 
-int patch_ad1981a(ac97_t *ac97)
+int patch_ad1981a(struct snd_ac97 *ac97)
 {
 	patch_ad1881(ac97);
 	ac97->build_ops = &patch_ad1981a_build_ops;
@@ -1659,10 +1659,10 @@ int patch_ad1981a(ac97_t *ac97)
 	return 0;
 }
 
-static const snd_kcontrol_new_t snd_ac97_ad198x_2cmic =
+static const struct snd_kcontrol_new snd_ac97_ad198x_2cmic =
 AC97_SINGLE("Stereo Mic", AC97_AD_MISC, 6, 1, 0);
 
-static int patch_ad1981b_specific(ac97_t *ac97)
+static int patch_ad1981b_specific(struct snd_ac97 *ac97)
 {
 	int err;
 
@@ -1680,7 +1680,7 @@ static struct snd_ac97_build_ops patch_ad1981b_build_ops = {
 #endif
 };
 
-int patch_ad1981b(ac97_t *ac97)
+int patch_ad1981b(struct snd_ac97 *ac97)
 {
 	patch_ad1881(ac97);
 	ac97->build_ops = &patch_ad1981b_build_ops;
@@ -1690,7 +1690,7 @@ int patch_ad1981b(ac97_t *ac97)
 	return 0;
 }
 
-static int snd_ac97_ad1888_lohpsel_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int snd_ac97_ad1888_lohpsel_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -1699,9 +1699,9 @@ static int snd_ac97_ad1888_lohpsel_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i
 	return 0;
 }
 
-static int snd_ac97_ad1888_lohpsel_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t* ucontrol)
+static int snd_ac97_ad1888_lohpsel_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	val = ac97->regs[AC97_AD_MISC];
@@ -1709,9 +1709,9 @@ static int snd_ac97_ad1888_lohpsel_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_va
 	return 0;
 }
 
-static int snd_ac97_ad1888_lohpsel_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_ac97_ad1888_lohpsel_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	val = !ucontrol->value.integer.value[0]
@@ -1720,7 +1720,7 @@ static int snd_ac97_ad1888_lohpsel_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_va
 				    AC97_AD198X_LOSEL | AC97_AD198X_HPSEL, val);
 }
 
-static int snd_ac97_ad1888_downmix_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int snd_ac97_ad1888_downmix_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[3] = {"Off", "6 -> 4", "6 -> 2"};
 
@@ -1733,9 +1733,9 @@ static int snd_ac97_ad1888_downmix_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i
 	return 0;
 }
 
-static int snd_ac97_ad1888_downmix_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t* ucontrol)
+static int snd_ac97_ad1888_downmix_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	val = ac97->regs[AC97_AD_MISC];
@@ -1746,9 +1746,9 @@ static int snd_ac97_ad1888_downmix_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_va
 	return 0;
 }
 
-static int snd_ac97_ad1888_downmix_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_ac97_ad1888_downmix_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	if (ucontrol->value.enumerated.item[0] > 2)
@@ -1762,7 +1762,7 @@ static int snd_ac97_ad1888_downmix_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_va
 				    AC97_AD198X_DMIX0 | AC97_AD198X_DMIX1, val);
 }
 
-static void ad1888_update_jacks(ac97_t *ac97)
+static void ad1888_update_jacks(struct snd_ac97 *ac97)
 {
 	unsigned short val = 0;
 	if (! is_shared_linein(ac97))
@@ -1773,7 +1773,7 @@ static void ad1888_update_jacks(ac97_t *ac97)
 	snd_ac97_update_bits(ac97, AC97_AD_MISC, (1 << 11) | (1 << 12), val);
 }
 
-static const snd_kcontrol_new_t snd_ac97_ad1888_controls[] = {
+static const struct snd_kcontrol_new snd_ac97_ad1888_controls[] = {
 	{
 		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name = "Exchange Front/Surround",
@@ -1796,7 +1796,7 @@ static const snd_kcontrol_new_t snd_ac97_ad1888_controls[] = {
 	AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 12, 1, 0),
 };
 
-static int patch_ad1888_specific(ac97_t *ac97)
+static int patch_ad1888_specific(struct snd_ac97 *ac97)
 {
 	/* rename 0x04 as "Master" and 0x02 as "Master Surround" */
 	snd_ac97_rename_vol_ctl(ac97, "Master Playback", "Master Surround Playback");
@@ -1813,7 +1813,7 @@ static struct snd_ac97_build_ops patch_ad1888_build_ops = {
 	.update_jacks = ad1888_update_jacks,
 };
 
-int patch_ad1888(ac97_t * ac97)
+int patch_ad1888(struct snd_ac97 * ac97)
 {
 	unsigned short misc;
 	
@@ -1833,7 +1833,7 @@ int patch_ad1888(ac97_t * ac97)
 	return 0;
 }
 
-static int patch_ad1980_specific(ac97_t *ac97)
+static int patch_ad1980_specific(struct snd_ac97 *ac97)
 {
 	int err;
 
@@ -1851,25 +1851,25 @@ static struct snd_ac97_build_ops patch_ad1980_build_ops = {
 	.update_jacks = ad1888_update_jacks,
 };
 
-int patch_ad1980(ac97_t * ac97)
+int patch_ad1980(struct snd_ac97 * ac97)
 {
 	patch_ad1888(ac97);
 	ac97->build_ops = &patch_ad1980_build_ops;
 	return 0;
 }
 
-static const snd_kcontrol_new_t snd_ac97_ad1985_controls[] = {
+static const struct snd_kcontrol_new snd_ac97_ad1985_controls[] = {
 	AC97_SINGLE("Exchange Center/LFE", AC97_AD_SERIAL_CFG, 3, 1, 0)
 };
 
-static void ad1985_update_jacks(ac97_t *ac97)
+static void ad1985_update_jacks(struct snd_ac97 *ac97)
 {
 	ad1888_update_jacks(ac97);
 	snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 1 << 9,
 			     is_shared_micin(ac97) ? 0 : 1 << 9);
 }
 
-static int patch_ad1985_specific(ac97_t *ac97)
+static int patch_ad1985_specific(struct snd_ac97 *ac97)
 {
 	int err;
 
@@ -1887,7 +1887,7 @@ static struct snd_ac97_build_ops patch_ad1985_build_ops = {
 	.update_jacks = ad1985_update_jacks,
 };
 
-int patch_ad1985(ac97_t * ac97)
+int patch_ad1985(struct snd_ac97 * ac97)
 {
 	unsigned short misc;
 	
@@ -1916,7 +1916,7 @@ int patch_ad1985(ac97_t * ac97)
 /*
  * realtek ALC65x/850 codecs
  */
-static void alc650_update_jacks(ac97_t *ac97)
+static void alc650_update_jacks(struct snd_ac97 *ac97)
 {
 	int shared;
 	
@@ -1937,7 +1937,7 @@ static void alc650_update_jacks(ac97_t *ac97)
 			     shared ? 0 : 0x100);
 }
 
-static const snd_kcontrol_new_t snd_ac97_controls_alc650[] = {
+static const struct snd_kcontrol_new snd_ac97_controls_alc650[] = {
 	AC97_SINGLE("Duplicate Front", AC97_ALC650_MULTICH, 0, 1, 0),
 	AC97_SINGLE("Surround Down Mix", AC97_ALC650_MULTICH, 1, 1, 0),
 	AC97_SINGLE("Center/LFE Down Mix", AC97_ALC650_MULTICH, 2, 1, 0),
@@ -1963,14 +1963,14 @@ static const snd_kcontrol_new_t snd_ac97_controls_alc650[] = {
 	AC97_CHANNEL_MODE_CTL,
 };
 
-static const snd_kcontrol_new_t snd_ac97_spdif_controls_alc650[] = {
+static const struct snd_kcontrol_new snd_ac97_spdif_controls_alc650[] = {
         AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), AC97_ALC650_MULTICH, 11, 1, 0),
         AC97_SINGLE("Analog to IEC958 Output", AC97_ALC650_MULTICH, 12, 1, 0),
 	/* disable this controls since it doesn't work as expected */
 	/* AC97_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 13, 1, 0), */
 };
 
-static int patch_alc650_specific(ac97_t * ac97)
+static int patch_alc650_specific(struct snd_ac97 * ac97)
 {
 	int err;
 
@@ -1988,7 +1988,7 @@ static struct snd_ac97_build_ops patch_alc650_ops = {
 	.update_jacks = alc650_update_jacks
 };
 
-int patch_alc650(ac97_t * ac97)
+int patch_alc650(struct snd_ac97 * ac97)
 {
 	unsigned short val;
 
@@ -2043,7 +2043,7 @@ int patch_alc650(ac97_t * ac97)
 	return 0;
 }
 
-static void alc655_update_jacks(ac97_t *ac97)
+static void alc655_update_jacks(struct snd_ac97 *ac97)
 {
 	int shared;
 	
@@ -2060,17 +2060,17 @@ static void alc655_update_jacks(ac97_t *ac97)
 			      shared ? (1 << 10) : 0, 0);
 }
 
-static const snd_kcontrol_new_t snd_ac97_controls_alc655[] = {
+static const struct snd_kcontrol_new snd_ac97_controls_alc655[] = {
 	AC97_PAGE_SINGLE("Duplicate Front", AC97_ALC650_MULTICH, 0, 1, 0, 0),
 	AC97_SURROUND_JACK_MODE_CTL,
 	AC97_CHANNEL_MODE_CTL,
 };
 
-static int alc655_iec958_route_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int alc655_iec958_route_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts_655[3] = { "PCM", "Analog In", "IEC958 In" };
 	static char *texts_658[4] = { "PCM", "Analog1 In", "Analog2 In", "IEC958 In" };
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
 	uinfo->count = 1;
@@ -2084,9 +2084,9 @@ static int alc655_iec958_route_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
 	return 0;
 }
 
-static int alc655_iec958_route_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int alc655_iec958_route_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	val = ac97->regs[AC97_ALC650_MULTICH];
@@ -2097,16 +2097,16 @@ static int alc655_iec958_route_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_
 	return 0;
 }
 
-static int alc655_iec958_route_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int alc655_iec958_route_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 
 	return ac97_update_bits_page(ac97, AC97_ALC650_MULTICH, 3 << 12,
 				     (unsigned short)ucontrol->value.enumerated.item[0] << 12,
 				     0);
 }
 
-static const snd_kcontrol_new_t snd_ac97_spdif_controls_alc655[] = {
+static const struct snd_kcontrol_new snd_ac97_spdif_controls_alc655[] = {
         AC97_PAGE_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), AC97_ALC650_MULTICH, 11, 1, 0, 0),
 	/* disable this controls since it doesn't work as expected */
         /* AC97_PAGE_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 14, 1, 0, 0), */
@@ -2119,7 +2119,7 @@ static const snd_kcontrol_new_t snd_ac97_spdif_controls_alc655[] = {
 	},
 };
 
-static int patch_alc655_specific(ac97_t * ac97)
+static int patch_alc655_specific(struct snd_ac97 * ac97)
 {
 	int err;
 
@@ -2137,7 +2137,7 @@ static struct snd_ac97_build_ops patch_alc655_ops = {
 	.update_jacks = alc655_update_jacks
 };
 
-int patch_alc655(ac97_t * ac97)
+int patch_alc655(struct snd_ac97 * ac97)
 {
 	unsigned int val;
 
@@ -2189,7 +2189,7 @@ int patch_alc655(ac97_t * ac97)
 #define AC97_ALC850_JACK_SELECT	0x76
 #define AC97_ALC850_MISC1	0x7a
 
-static void alc850_update_jacks(ac97_t *ac97)
+static void alc850_update_jacks(struct snd_ac97 *ac97)
 {
 	int shared;
 	
@@ -2211,14 +2211,14 @@ static void alc850_update_jacks(ac97_t *ac97)
 			     shared ? (2<<4) : (1<<4));
 }
 
-static const snd_kcontrol_new_t snd_ac97_controls_alc850[] = {
+static const struct snd_kcontrol_new snd_ac97_controls_alc850[] = {
 	AC97_PAGE_SINGLE("Duplicate Front", AC97_ALC650_MULTICH, 0, 1, 0, 0),
 	AC97_SINGLE("Mic Front Input Switch", AC97_ALC850_JACK_SELECT, 15, 1, 1),
 	AC97_SURROUND_JACK_MODE_CTL,
 	AC97_CHANNEL_MODE_CTL,
 };
 
-static int patch_alc850_specific(ac97_t *ac97)
+static int patch_alc850_specific(struct snd_ac97 *ac97)
 {
 	int err;
 
@@ -2236,7 +2236,7 @@ static struct snd_ac97_build_ops patch_alc850_ops = {
 	.update_jacks = alc850_update_jacks
 };
 
-int patch_alc850(ac97_t *ac97)
+int patch_alc850(struct snd_ac97 *ac97)
 {
 	ac97->build_ops = &patch_alc850_ops;
 
@@ -2273,20 +2273,20 @@ int patch_alc850(ac97_t *ac97)
 /*
  * C-Media CM97xx codecs
  */
-static void cm9738_update_jacks(ac97_t *ac97)
+static void cm9738_update_jacks(struct snd_ac97 *ac97)
 {
 	/* shared Line-In */
 	snd_ac97_update_bits(ac97, AC97_CM9738_VENDOR_CTRL, 1 << 10,
 			     is_shared_linein(ac97) ? (1 << 10) : 0);
 }
 
-static const snd_kcontrol_new_t snd_ac97_cm9738_controls[] = {
+static const struct snd_kcontrol_new snd_ac97_cm9738_controls[] = {
 	AC97_SINGLE("Duplicate Front", AC97_CM9738_VENDOR_CTRL, 13, 1, 0),
 	AC97_SURROUND_JACK_MODE_CTL,
 	AC97_CHANNEL_MODE_4CH_CTL,
 };
 
-static int patch_cm9738_specific(ac97_t * ac97)
+static int patch_cm9738_specific(struct snd_ac97 * ac97)
 {
 	return patch_build_controls(ac97, snd_ac97_cm9738_controls, ARRAY_SIZE(snd_ac97_cm9738_controls));
 }
@@ -2296,7 +2296,7 @@ static struct snd_ac97_build_ops patch_cm9738_ops = {
 	.update_jacks = cm9738_update_jacks
 };
 
-int patch_cm9738(ac97_t * ac97)
+int patch_cm9738(struct snd_ac97 * ac97)
 {
 	ac97->build_ops = &patch_cm9738_ops;
 	/* FIXME: can anyone confirm below? */
@@ -2307,7 +2307,7 @@ int patch_cm9738(ac97_t * ac97)
 	return 0;
 }
 
-static int snd_ac97_cmedia_spdif_playback_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ac97_cmedia_spdif_playback_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = { "Analog", "Digital" };
 
@@ -2320,9 +2320,9 @@ static int snd_ac97_cmedia_spdif_playback_source_info(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ac97_cmedia_spdif_playback_source_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_cmedia_spdif_playback_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 
 	val = ac97->regs[AC97_CM9739_SPDIF_CTRL];
@@ -2330,16 +2330,16 @@ static int snd_ac97_cmedia_spdif_playback_source_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_ac97_cmedia_spdif_playback_source_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ac97_cmedia_spdif_playback_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 
 	return snd_ac97_update_bits(ac97, AC97_CM9739_SPDIF_CTRL,
 				    0x01 << 1, 
 				    (ucontrol->value.enumerated.item[0] & 0x01) << 1);
 }
 
-static const snd_kcontrol_new_t snd_ac97_cm9739_controls_spdif[] = {
+static const struct snd_kcontrol_new snd_ac97_cm9739_controls_spdif[] = {
 	/* BIT 0: SPDI_EN - always true */
 	{ /* BIT 1: SPDIFS */
 		.iface	= SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -2357,7 +2357,7 @@ static const snd_kcontrol_new_t snd_ac97_cm9739_controls_spdif[] = {
 	/* BIT 8: SPD32 - 32bit SPDIF - not supported yet */
 };
 
-static void cm9739_update_jacks(ac97_t *ac97)
+static void cm9739_update_jacks(struct snd_ac97 *ac97)
 {
 	/* shared Line-In */
 	snd_ac97_update_bits(ac97, AC97_CM9739_MULTI_CHAN, 1 << 10,
@@ -2367,17 +2367,17 @@ static void cm9739_update_jacks(ac97_t *ac97)
 			     is_shared_micin(ac97) ? 0x1000 : 0x2000);
 }
 
-static const snd_kcontrol_new_t snd_ac97_cm9739_controls[] = {
+static const struct snd_kcontrol_new snd_ac97_cm9739_controls[] = {
 	AC97_SURROUND_JACK_MODE_CTL,
 	AC97_CHANNEL_MODE_CTL,
 };
 
-static int patch_cm9739_specific(ac97_t * ac97)
+static int patch_cm9739_specific(struct snd_ac97 * ac97)
 {
 	return patch_build_controls(ac97, snd_ac97_cm9739_controls, ARRAY_SIZE(snd_ac97_cm9739_controls));
 }
 
-static int patch_cm9739_post_spdif(ac97_t * ac97)
+static int patch_cm9739_post_spdif(struct snd_ac97 * ac97)
 {
 	return patch_build_controls(ac97, snd_ac97_cm9739_controls_spdif, ARRAY_SIZE(snd_ac97_cm9739_controls_spdif));
 }
@@ -2388,7 +2388,7 @@ static struct snd_ac97_build_ops patch_cm9739_ops = {
 	.update_jacks = cm9739_update_jacks
 };
 
-int patch_cm9739(ac97_t * ac97)
+int patch_cm9739(struct snd_ac97 * ac97)
 {
 	unsigned short val;
 
@@ -2447,7 +2447,7 @@ int patch_cm9739(ac97_t * ac97)
 #define AC97_CM9761_FUNC	0x66
 #define AC97_CM9761_SPDIF_CTRL	0x6c
 
-static void cm9761_update_jacks(ac97_t *ac97)
+static void cm9761_update_jacks(struct snd_ac97 *ac97)
 {
 	/* FIXME: check the bits for each model
 	 *        model 83 is confirmed to work
@@ -2482,12 +2482,12 @@ static void cm9761_update_jacks(ac97_t *ac97)
 	snd_ac97_update_bits(ac97, AC97_CM9761_MULTI_CHAN, 0x3c88, val);
 }
 
-static const snd_kcontrol_new_t snd_ac97_cm9761_controls[] = {
+static const struct snd_kcontrol_new snd_ac97_cm9761_controls[] = {
 	AC97_SURROUND_JACK_MODE_CTL,
 	AC97_CHANNEL_MODE_CTL,
 };
 
-static int cm9761_spdif_out_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int cm9761_spdif_out_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = { "AC-Link", "ADC", "SPDIF-In" };
 
@@ -2500,9 +2500,9 @@ static int cm9761_spdif_out_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i
 	return 0;
 }
 
-static int cm9761_spdif_out_source_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int cm9761_spdif_out_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 
 	if (ac97->regs[AC97_CM9761_FUNC] & 0x1)
 		ucontrol->value.enumerated.item[0] = 2; /* SPDIF-loopback */
@@ -2513,9 +2513,9 @@ static int cm9761_spdif_out_source_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_va
 	return 0;
 }
 
-static int cm9761_spdif_out_source_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int cm9761_spdif_out_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ac97_t *ac97 = snd_kcontrol_chip(kcontrol);
+	struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
 
 	if (ucontrol->value.enumerated.item[0] == 2)
 		return snd_ac97_update_bits(ac97, AC97_CM9761_FUNC, 0x1, 0x1);
@@ -2528,7 +2528,7 @@ static const char *cm9761_dac_clock[] = { "AC-Link", "SPDIF-In", "Both" };
 static const struct ac97_enum cm9761_dac_clock_enum =
 	AC97_ENUM_SINGLE(AC97_CM9761_SPDIF_CTRL, 9, 3, cm9761_dac_clock);
 
-static const snd_kcontrol_new_t snd_ac97_cm9761_controls_spdif[] = {
+static const struct snd_kcontrol_new snd_ac97_cm9761_controls_spdif[] = {
 	{ /* BIT 1: SPDIFS */
 		.iface	= SNDRV_CTL_ELEM_IFACE_MIXER,
 		.name	= SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source",
@@ -2546,12 +2546,12 @@ static const snd_kcontrol_new_t snd_ac97_cm9761_controls_spdif[] = {
 	AC97_ENUM("DAC Clock Source", cm9761_dac_clock_enum),
 };
 
-static int patch_cm9761_post_spdif(ac97_t * ac97)
+static int patch_cm9761_post_spdif(struct snd_ac97 * ac97)
 {
 	return patch_build_controls(ac97, snd_ac97_cm9761_controls_spdif, ARRAY_SIZE(snd_ac97_cm9761_controls_spdif));
 }
 
-static int patch_cm9761_specific(ac97_t * ac97)
+static int patch_cm9761_specific(struct snd_ac97 * ac97)
 {
 	return patch_build_controls(ac97, snd_ac97_cm9761_controls, ARRAY_SIZE(snd_ac97_cm9761_controls));
 }
@@ -2562,7 +2562,7 @@ static struct snd_ac97_build_ops patch_cm9761_ops = {
 	.update_jacks = cm9761_update_jacks
 };
 
-int patch_cm9761(ac97_t *ac97)
+int patch_cm9761(struct snd_ac97 *ac97)
 {
 	unsigned short val;
 
@@ -2641,13 +2641,13 @@ int patch_cm9761(ac97_t *ac97)
 static const char *cm9780_ch_select[] = { "Front", "Side", "Center/LFE", "Rear" };
 static const struct ac97_enum cm9780_ch_select_enum =
 	AC97_ENUM_SINGLE(AC97_CM9780_MULTI_CHAN, 6, 4, cm9780_ch_select);
-static const snd_kcontrol_new_t cm9780_controls[] = {
+static const struct snd_kcontrol_new cm9780_controls[] = {
 	AC97_DOUBLE("Side Playback Switch", AC97_CM9780_SIDE, 15, 7, 1, 1),
 	AC97_DOUBLE("Side Playback Volume", AC97_CM9780_SIDE, 8, 0, 31, 0),
 	AC97_ENUM("Side Playback Route", cm9780_ch_select_enum),
 };
 
-static int patch_cm9780_specific(ac97_t *ac97)
+static int patch_cm9780_specific(struct snd_ac97 *ac97)
 {
 	return patch_build_controls(ac97, cm9780_controls, ARRAY_SIZE(cm9780_controls));
 }
@@ -2657,7 +2657,7 @@ static struct snd_ac97_build_ops patch_cm9780_ops = {
 	.build_post_spdif = patch_cm9761_post_spdif	/* identical with CM9761 */
 };
 
-int patch_cm9780(ac97_t *ac97)
+int patch_cm9780(struct snd_ac97 *ac97)
 {
 	unsigned short val;
 
@@ -2677,14 +2677,14 @@ int patch_cm9780(ac97_t *ac97)
 /*
  * VIA VT1616 codec
  */
-static const snd_kcontrol_new_t snd_ac97_controls_vt1616[] = {
+static const struct snd_kcontrol_new snd_ac97_controls_vt1616[] = {
 AC97_SINGLE("DC Offset removal", 0x5a, 10, 1, 0),
 AC97_SINGLE("Alternate Level to Surround Out", 0x5a, 15, 1, 0),
 AC97_SINGLE("Downmix LFE and Center to Front", 0x5a, 12, 1, 0),
 AC97_SINGLE("Downmix Surround to Front", 0x5a, 11, 1, 0),
 };
 
-static int patch_vt1616_specific(ac97_t * ac97)
+static int patch_vt1616_specific(struct snd_ac97 * ac97)
 {
 	int err;
 
@@ -2700,7 +2700,7 @@ static struct snd_ac97_build_ops patch_vt1616_ops = {
 	.build_specific	= patch_vt1616_specific
 };
 
-int patch_vt1616(ac97_t * ac97)
+int patch_vt1616(struct snd_ac97 * ac97)
 {
 	ac97->build_ops = &patch_vt1616_ops;
 	return 0;
@@ -2709,7 +2709,7 @@ int patch_vt1616(ac97_t * ac97)
 /*
  * VT1617A codec
  */
-int patch_vt1617a(ac97_t * ac97)
+int patch_vt1617a(struct snd_ac97 * ac97)
 {
 	ac97->ext_id |= AC97_EI_SPDIF;	/* force the detection of spdif */
 	ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000;
@@ -2718,7 +2718,7 @@ int patch_vt1617a(ac97_t * ac97)
 
 /*
  */
-static void it2646_update_jacks(ac97_t *ac97)
+static void it2646_update_jacks(struct snd_ac97 *ac97)
 {
 	/* shared Line-In */
 	snd_ac97_update_bits(ac97, 0x76, 1 << 9,
@@ -2728,18 +2728,18 @@ static void it2646_update_jacks(ac97_t *ac97)
 			     is_shared_micin(ac97) ? (1<<10) : 0);
 }
 
-static const snd_kcontrol_new_t snd_ac97_controls_it2646[] = {
+static const struct snd_kcontrol_new snd_ac97_controls_it2646[] = {
 	AC97_SURROUND_JACK_MODE_CTL,
 	AC97_CHANNEL_MODE_CTL,
 };
 
-static const snd_kcontrol_new_t snd_ac97_spdif_controls_it2646[] = {
+static const struct snd_kcontrol_new snd_ac97_spdif_controls_it2646[] = {
 	AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), 0x76, 11, 1, 0),
 	AC97_SINGLE("Analog to IEC958 Output", 0x76, 12, 1, 0),
 	AC97_SINGLE("IEC958 Input Monitor", 0x76, 13, 1, 0),
 };
 
-static int patch_it2646_specific(ac97_t * ac97)
+static int patch_it2646_specific(struct snd_ac97 * ac97)
 {
 	int err;
 	if ((err = patch_build_controls(ac97, snd_ac97_controls_it2646, ARRAY_SIZE(snd_ac97_controls_it2646))) < 0)
@@ -2754,7 +2754,7 @@ static struct snd_ac97_build_ops patch_it2646_ops = {
 	.update_jacks = it2646_update_jacks
 };
 
-int patch_it2646(ac97_t * ac97)
+int patch_it2646(struct snd_ac97 * ac97)
 {
 	ac97->build_ops = &patch_it2646_ops;
 	/* full DAC volume */
@@ -2770,11 +2770,11 @@ int patch_it2646(ac97_t * ac97)
 #define AC97_SI3036_CHIP_ID     0x5a
 #define AC97_SI3036_LINE_CFG    0x5c
 
-static const snd_kcontrol_new_t snd_ac97_controls_si3036[] = {
+static const struct snd_kcontrol_new snd_ac97_controls_si3036[] = {
 AC97_DOUBLE("Modem Speaker Volume", 0x5c, 14, 12, 3, 1)
 };
 
-static int patch_si3036_specific(ac97_t * ac97)
+static int patch_si3036_specific(struct snd_ac97 * ac97)
 {
 	int idx, err;
 	for (idx = 0; idx < ARRAY_SIZE(snd_ac97_controls_si3036); idx++)
@@ -2787,7 +2787,7 @@ static struct snd_ac97_build_ops patch_si3036_ops = {
 	.build_specific	= patch_si3036_specific,
 };
 
-int mpatch_si3036(ac97_t * ac97)
+int mpatch_si3036(struct snd_ac97 * ac97)
 {
 	ac97->build_ops = &patch_si3036_ops;
 	snd_ac97_write_cache(ac97, 0x5c, 0xf210 );
diff --git a/sound/pci/ac97/ac97_patch.h b/sound/pci/ac97/ac97_patch.h
index ec181132010..5060cb6f2ec 100644
--- a/sound/pci/ac97/ac97_patch.h
+++ b/sound/pci/ac97/ac97_patch.h
@@ -22,40 +22,40 @@
  *
  */
 
-int patch_yamaha_ymf753(ac97_t * ac97);
-int patch_wolfson00(ac97_t * ac97);
-int patch_wolfson03(ac97_t * ac97);
-int patch_wolfson04(ac97_t * ac97);
-int patch_wolfson05(ac97_t * ac97);
-int patch_wolfson11(ac97_t * ac97);
-int patch_wolfson13(ac97_t * ac97);
-int patch_tritech_tr28028(ac97_t * ac97);
-int patch_sigmatel_stac9700(ac97_t * ac97);
-int patch_sigmatel_stac9708(ac97_t * ac97);
-int patch_sigmatel_stac9721(ac97_t * ac97);
-int patch_sigmatel_stac9744(ac97_t * ac97);
-int patch_sigmatel_stac9756(ac97_t * ac97);
-int patch_sigmatel_stac9758(ac97_t * ac97);
-int patch_cirrus_cs4299(ac97_t * ac97);
-int patch_cirrus_spdif(ac97_t * ac97);
-int patch_conexant(ac97_t * ac97);
-int patch_ad1819(ac97_t * ac97);
-int patch_ad1881(ac97_t * ac97);
-int patch_ad1885(ac97_t * ac97);
-int patch_ad1886(ac97_t * ac97);
-int patch_ad1888(ac97_t * ac97);
-int patch_ad1980(ac97_t * ac97);
-int patch_ad1981a(ac97_t * ac97);
-int patch_ad1981b(ac97_t * ac97);
-int patch_ad1985(ac97_t * ac97);
-int patch_alc650(ac97_t * ac97);
-int patch_alc655(ac97_t * ac97);
-int patch_alc850(ac97_t * ac97);
-int patch_cm9738(ac97_t * ac97);
-int patch_cm9739(ac97_t * ac97);
-int patch_cm9761(ac97_t * ac97);
-int patch_cm9780(ac97_t * ac97);
-int patch_vt1616(ac97_t * ac97);
-int patch_vt1617a(ac97_t * ac97);
-int patch_it2646(ac97_t * ac97);
-int mpatch_si3036(ac97_t * ac97);
+int patch_yamaha_ymf753(struct snd_ac97 * ac97);
+int patch_wolfson00(struct snd_ac97 * ac97);
+int patch_wolfson03(struct snd_ac97 * ac97);
+int patch_wolfson04(struct snd_ac97 * ac97);
+int patch_wolfson05(struct snd_ac97 * ac97);
+int patch_wolfson11(struct snd_ac97 * ac97);
+int patch_wolfson13(struct snd_ac97 * ac97);
+int patch_tritech_tr28028(struct snd_ac97 * ac97);
+int patch_sigmatel_stac9700(struct snd_ac97 * ac97);
+int patch_sigmatel_stac9708(struct snd_ac97 * ac97);
+int patch_sigmatel_stac9721(struct snd_ac97 * ac97);
+int patch_sigmatel_stac9744(struct snd_ac97 * ac97);
+int patch_sigmatel_stac9756(struct snd_ac97 * ac97);
+int patch_sigmatel_stac9758(struct snd_ac97 * ac97);
+int patch_cirrus_cs4299(struct snd_ac97 * ac97);
+int patch_cirrus_spdif(struct snd_ac97 * ac97);
+int patch_conexant(struct snd_ac97 * ac97);
+int patch_ad1819(struct snd_ac97 * ac97);
+int patch_ad1881(struct snd_ac97 * ac97);
+int patch_ad1885(struct snd_ac97 * ac97);
+int patch_ad1886(struct snd_ac97 * ac97);
+int patch_ad1888(struct snd_ac97 * ac97);
+int patch_ad1980(struct snd_ac97 * ac97);
+int patch_ad1981a(struct snd_ac97 * ac97);
+int patch_ad1981b(struct snd_ac97 * ac97);
+int patch_ad1985(struct snd_ac97 * ac97);
+int patch_alc650(struct snd_ac97 * ac97);
+int patch_alc655(struct snd_ac97 * ac97);
+int patch_alc850(struct snd_ac97 * ac97);
+int patch_cm9738(struct snd_ac97 * ac97);
+int patch_cm9739(struct snd_ac97 * ac97);
+int patch_cm9761(struct snd_ac97 * ac97);
+int patch_cm9780(struct snd_ac97 * ac97);
+int patch_vt1616(struct snd_ac97 * ac97);
+int patch_vt1617a(struct snd_ac97 * ac97);
+int patch_it2646(struct snd_ac97 * ac97);
+int mpatch_si3036(struct snd_ac97 * ac97);
diff --git a/sound/pci/ac97/ac97_pcm.c b/sound/pci/ac97/ac97_pcm.c
index ded13165d63..c3e590bf7a0 100644
--- a/sound/pci/ac97/ac97_pcm.c
+++ b/sound/pci/ac97/ac97_pcm.c
@@ -170,7 +170,7 @@ static unsigned char get_slot_reg(struct ac97_pcm *pcm, unsigned short cidx,
 		return rate_cregs[slot - 3];
 }
 
-static int set_spdif_rate(ac97_t *ac97, unsigned short rate)
+static int set_spdif_rate(struct snd_ac97 *ac97, unsigned short rate)
 {
 	unsigned short old, bits, reg, mask;
 	unsigned int sbits;
@@ -254,7 +254,7 @@ static int set_spdif_rate(ac97_t *ac97, unsigned short rate)
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_ac97_set_rate(ac97_t *ac97, int reg, unsigned int rate)
+int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate)
 {
 	int dbl;
 	unsigned int tmp;
@@ -315,7 +315,7 @@ int snd_ac97_set_rate(ac97_t *ac97, int reg, unsigned int rate)
 	return 0;
 }
 
-static unsigned short get_pslots(ac97_t *ac97, unsigned char *rate_table, unsigned short *spdif_slots)
+static unsigned short get_pslots(struct snd_ac97 *ac97, unsigned char *rate_table, unsigned short *spdif_slots)
 {
 	if (!ac97_is_audio(ac97))
 		return 0;
@@ -390,7 +390,7 @@ static unsigned short get_pslots(ac97_t *ac97, unsigned char *rate_table, unsign
 	}
 }
 
-static unsigned short get_cslots(ac97_t *ac97)
+static unsigned short get_cslots(struct snd_ac97 *ac97)
 {
 	unsigned short slots;
 
@@ -437,7 +437,7 @@ static unsigned int get_rates(struct ac97_pcm *pcm, unsigned int cidx, unsigned
  * some slots are available, pcm->xxx.slots and pcm->xxx.rslots[] members
  * are reduced and might be zero.
  */
-int snd_ac97_pcm_assign(ac97_bus_t *bus,
+int snd_ac97_pcm_assign(struct snd_ac97_bus *bus,
 			unsigned short pcms_count,
 			const struct ac97_pcm *pcms)
 {
@@ -449,7 +449,7 @@ int snd_ac97_pcm_assign(ac97_bus_t *bus,
 	unsigned short tmp, slots;
 	unsigned short spdif_slots[4];
 	unsigned int rates;
-	ac97_t *codec;
+	struct snd_ac97 *codec;
 
 	rpcms = kcalloc(pcms_count, sizeof(struct ac97_pcm), GFP_KERNEL);
 	if (rpcms == NULL)
@@ -560,7 +560,7 @@ int snd_ac97_pcm_assign(ac97_bus_t *bus,
 int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate,
 		      enum ac97_pcm_cfg cfg, unsigned short slots)
 {
-	ac97_bus_t *bus;
+	struct snd_ac97_bus *bus;
 	int i, cidx, r, ok_flag;
 	unsigned int reg_ok[4] = {0,0,0,0};
 	unsigned char reg;
@@ -639,7 +639,7 @@ int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate,
  */
 int snd_ac97_pcm_close(struct ac97_pcm *pcm)
 {
-	ac97_bus_t *bus;
+	struct snd_ac97_bus *bus;
 	unsigned short slots = pcm->aslots;
 	int i, cidx;
 
@@ -656,31 +656,31 @@ int snd_ac97_pcm_close(struct ac97_pcm *pcm)
 	return 0;
 }
 
-static int double_rate_hw_constraint_rate(snd_pcm_hw_params_t *params,
-					  snd_pcm_hw_rule_t *rule)
+static int double_rate_hw_constraint_rate(struct snd_pcm_hw_params *params,
+					  struct snd_pcm_hw_rule *rule)
 {
-	snd_interval_t *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
+	struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
 	if (channels->min > 2) {
-		static const snd_interval_t single_rates = {
+		static const struct snd_interval single_rates = {
 			.min = 1,
 			.max = 48000,
 		};
-		snd_interval_t *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
+		struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
 		return snd_interval_refine(rate, &single_rates);
 	}
 	return 0;
 }
 
-static int double_rate_hw_constraint_channels(snd_pcm_hw_params_t *params,
-					      snd_pcm_hw_rule_t *rule)
+static int double_rate_hw_constraint_channels(struct snd_pcm_hw_params *params,
+					      struct snd_pcm_hw_rule *rule)
 {
-	snd_interval_t *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
+	struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
 	if (rate->min > 48000) {
-		static const snd_interval_t double_rate_channels = {
+		static const struct snd_interval double_rate_channels = {
 			.min = 2,
 			.max = 2,
 		};
-		snd_interval_t *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
+		struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
 		return snd_interval_refine(channels, &double_rate_channels);
 	}
 	return 0;
@@ -693,7 +693,7 @@ static int double_rate_hw_constraint_channels(snd_pcm_hw_params_t *params,
  * Installs the hardware constraint rules to prevent using double rates and
  * more than two channels at the same time.
  */
-int snd_ac97_pcm_double_rate_rules(snd_pcm_runtime_t *runtime)
+int snd_ac97_pcm_double_rate_rules(struct snd_pcm_runtime *runtime)
 {
 	int err;
 
diff --git a/sound/pci/ac97/ac97_proc.c b/sound/pci/ac97/ac97_proc.c
index f4333b867bd..26607320129 100644
--- a/sound/pci/ac97/ac97_proc.c
+++ b/sound/pci/ac97/ac97_proc.c
@@ -34,7 +34,7 @@
  * proc interface
  */
 
-static void snd_ac97_proc_read_functions(ac97_t *ac97, snd_info_buffer_t *buffer)
+static void snd_ac97_proc_read_functions(struct snd_ac97 *ac97, struct snd_info_buffer *buffer)
 {
 	int header = 0, function;
 	unsigned short info, sense_info;
@@ -68,7 +68,7 @@ static void snd_ac97_proc_read_functions(ac97_t *ac97, snd_info_buffer_t *buffer
 	}
 }
 
-static void snd_ac97_proc_read_main(ac97_t *ac97, snd_info_buffer_t * buffer, int subidx)
+static void snd_ac97_proc_read_main(struct snd_ac97 *ac97, struct snd_info_buffer *buffer, int subidx)
 {
 	char name[64];
 	unsigned short val, tmp, ext, mext;
@@ -80,7 +80,6 @@ static void snd_ac97_proc_read_main(ac97_t *ac97, snd_info_buffer_t * buffer, in
 	snd_ac97_get_name(NULL, ac97->id, name, 0);
 	snd_iprintf(buffer, "%d-%d/%d: %s\n\n", ac97->addr, ac97->num, subidx, name);
 
-
 	if ((ac97->scaps & AC97_SCAP_AUDIO) == 0)
 		goto __modem;
 
@@ -299,9 +298,9 @@ static void snd_ac97_proc_read_main(ac97_t *ac97, snd_info_buffer_t * buffer, in
 	}
 }
 
-static void snd_ac97_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void snd_ac97_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
 {
-	ac97_t *ac97 = entry->private_data;
+	struct snd_ac97 *ac97 = entry->private_data;
 	
 	down(&ac97->page_mutex);
 	if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) {	// Analog Devices AD1881/85/86
@@ -334,9 +333,9 @@ static void snd_ac97_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buff
 
 #ifdef CONFIG_SND_DEBUG
 /* direct register write for debugging */
-static void snd_ac97_proc_regs_write(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
+static void snd_ac97_proc_regs_write(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
 {
-	ac97_t *ac97 = entry->private_data;
+	struct snd_ac97 *ac97 = entry->private_data;
 	char line[64];
 	unsigned int reg, val;
 	down(&ac97->page_mutex);
@@ -351,7 +350,7 @@ static void snd_ac97_proc_regs_write(snd_info_entry_t *entry, snd_info_buffer_t
 }
 #endif
 
-static void snd_ac97_proc_regs_read_main(ac97_t *ac97, snd_info_buffer_t * buffer, int subidx)
+static void snd_ac97_proc_regs_read_main(struct snd_ac97 *ac97, struct snd_info_buffer *buffer, int subidx)
 {
 	int reg, val;
 
@@ -361,10 +360,10 @@ static void snd_ac97_proc_regs_read_main(ac97_t *ac97, snd_info_buffer_t * buffe
 	}
 }
 
-static void snd_ac97_proc_regs_read(snd_info_entry_t *entry, 
-				    snd_info_buffer_t * buffer)
+static void snd_ac97_proc_regs_read(struct snd_info_entry *entry, 
+				    struct snd_info_buffer *buffer)
 {
-	ac97_t *ac97 = entry->private_data;
+	struct snd_ac97 *ac97 = entry->private_data;
 
 	down(&ac97->page_mutex);
 	if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) {	// Analog Devices AD1881/85/86
@@ -385,9 +384,9 @@ static void snd_ac97_proc_regs_read(snd_info_entry_t *entry,
 	up(&ac97->page_mutex);
 }
 
-void snd_ac97_proc_init(ac97_t * ac97)
+void snd_ac97_proc_init(struct snd_ac97 * ac97)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 	char name[32];
 	const char *prefix;
 
@@ -419,7 +418,7 @@ void snd_ac97_proc_init(ac97_t * ac97)
 	ac97->proc_regs = entry;
 }
 
-void snd_ac97_proc_done(ac97_t * ac97)
+void snd_ac97_proc_done(struct snd_ac97 * ac97)
 {
 	if (ac97->proc_regs) {
 		snd_info_unregister(ac97->proc_regs);
@@ -431,9 +430,9 @@ void snd_ac97_proc_done(ac97_t * ac97)
 	}
 }
 
-void snd_ac97_bus_proc_init(ac97_bus_t * bus)
+void snd_ac97_bus_proc_init(struct snd_ac97_bus * bus)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 	char name[32];
 
 	sprintf(name, "codec97#%d", bus->num);
@@ -447,7 +446,7 @@ void snd_ac97_bus_proc_init(ac97_bus_t * bus)
 	bus->proc = entry;
 }
 
-void snd_ac97_bus_proc_done(ac97_bus_t * bus)
+void snd_ac97_bus_proc_done(struct snd_ac97_bus * bus)
 {
 	if (bus->proc) {
 		snd_info_unregister(bus->proc);
-- 
cgit v1.2.3-70-g09d2


From 03da312ac080b4f5c9359c233b8812cc93a035fe Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:24:47 +0100
Subject: [ALSA] Remove xxx_t typedefs: Emu-X synth

Modules: Common EMU synth,SoundFont,Synth

Remove xxx_t typedefs from the Emu-X synth support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/emux_synth.h     | 105 ++++++++---------
 include/sound/sfnt_info.h      |  36 +++---
 include/sound/soundfont.h      |  75 ++++++-------
 include/sound/util_mem.h       |  32 +++---
 sound/synth/emux/emux.c        |  29 ++---
 sound/synth/emux/emux_effect.c |  44 ++++----
 sound/synth/emux/emux_hwdep.c  |  23 ++--
 sound/synth/emux/emux_nrpn.c   |  30 ++---
 sound/synth/emux/emux_oss.c    |  90 ++++++++-------
 sound/synth/emux/emux_proc.c   |  14 +--
 sound/synth/emux/emux_seq.c    |  74 ++++++------
 sound/synth/emux/emux_synth.c  | 139 ++++++++++++-----------
 sound/synth/emux/emux_voice.h  |  67 ++++++-----
 sound/synth/emux/soundfont.c   | 248 +++++++++++++++++++++++------------------
 sound/synth/util_mem.c         |  39 +++----
 15 files changed, 550 insertions(+), 495 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/emux_synth.h b/include/sound/emux_synth.h
index c6970aac9bd..b2d6b2acc7c 100644
--- a/include/sound/emux_synth.h
+++ b/include/sound/emux_synth.h
@@ -36,39 +36,40 @@
  */
 #define SNDRV_EMUX_USE_RAW_EFFECT
 
-
-/*
- * typedefs
- */
-typedef struct snd_emux_effect_table snd_emux_effect_table_t;
-typedef struct snd_emux_port snd_emux_port_t;
-typedef struct snd_emux_voice snd_emux_voice_t;
-typedef struct snd_emux snd_emux_t;
-
+struct snd_emux;
+struct snd_emux_port;
+struct snd_emux_voice;
+struct snd_emux_effect_table;
 
 /*
  * operators
  */
-typedef struct snd_emux_operators {
+struct snd_emux_operators {
 	struct module *owner;
-	snd_emux_voice_t *(*get_voice)(snd_emux_t *emu, snd_emux_port_t *port);
-	int (*prepare)(snd_emux_voice_t *vp);
-	void (*trigger)(snd_emux_voice_t *vp);
-	void (*release)(snd_emux_voice_t *vp);
-	void (*update)(snd_emux_voice_t *vp, int update);
-	void (*terminate)(snd_emux_voice_t *vp);
-	void (*free_voice)(snd_emux_voice_t *vp);
-	void (*reset)(snd_emux_t *emu, int ch);
-	/* the first parameters are snd_emux_t */
-	int (*sample_new)(snd_emux_t *emu, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void __user *data, long count);
-	int (*sample_free)(snd_emux_t *emu, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr);
-	void (*sample_reset)(snd_emux_t *emu);
-	int (*load_fx)(snd_emux_t *emu, int type, int arg, const void __user *data, long count);
-	void (*sysex)(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset);
+	struct snd_emux_voice *(*get_voice)(struct snd_emux *emu,
+					    struct snd_emux_port *port);
+	int (*prepare)(struct snd_emux_voice *vp);
+	void (*trigger)(struct snd_emux_voice *vp);
+	void (*release)(struct snd_emux_voice *vp);
+	void (*update)(struct snd_emux_voice *vp, int update);
+	void (*terminate)(struct snd_emux_voice *vp);
+	void (*free_voice)(struct snd_emux_voice *vp);
+	void (*reset)(struct snd_emux *emu, int ch);
+	/* the first parameters are struct snd_emux */
+	int (*sample_new)(struct snd_emux *emu, struct snd_sf_sample *sp,
+			  struct snd_util_memhdr *hdr,
+			  const void __user *data, long count);
+	int (*sample_free)(struct snd_emux *emu, struct snd_sf_sample *sp,
+			   struct snd_util_memhdr *hdr);
+	void (*sample_reset)(struct snd_emux *emu);
+	int (*load_fx)(struct snd_emux *emu, int type, int arg,
+		       const void __user *data, long count);
+	void (*sysex)(struct snd_emux *emu, char *buf, int len, int parsed,
+		      struct snd_midi_channel_set *chset);
 #ifdef CONFIG_SND_SEQUENCER_OSS
-	int (*oss_ioctl)(snd_emux_t *emu, int cmd, int p1, int p2);
+	int (*oss_ioctl)(struct snd_emux *emu, int cmd, int p1, int p2);
 #endif
-} snd_emux_operators_t;
+};
 
 
 /*
@@ -90,46 +91,46 @@ typedef struct snd_emux_operators {
  */
 struct snd_emux {
 
-	snd_card_t *card;	/* assigned card */
+	struct snd_card *card;	/* assigned card */
 
 	/* following should be initialized before registration */
 	int max_voices;		/* Number of voices */
 	int mem_size;		/* memory size (in byte) */
 	int num_ports;		/* number of ports to be created */
 	int pitch_shift;	/* pitch shift value (for Emu10k1) */
-	snd_emux_operators_t ops;	/* operators */
+	struct snd_emux_operators ops;	/* operators */
 	void *hw;		/* hardware */
 	unsigned long flags;	/* other conditions */
 	int midi_ports;		/* number of virtual midi devices */
 	int midi_devidx;	/* device offset of virtual midi */
 	unsigned int linear_panning: 1; /* panning is linear (sbawe = 1, emu10k1 = 0) */
 	int hwdep_idx;		/* hwdep device index */
-	snd_hwdep_t *hwdep;	/* hwdep device */
+	struct snd_hwdep *hwdep;	/* hwdep device */
 
 	/* private */
 	int num_voices;		/* current number of voices */
-	snd_sf_list_t *sflist;	/* root of SoundFont list */
-	snd_emux_voice_t *voices;	/* Voices (EMU 'channel') */
+	struct snd_sf_list *sflist;	/* root of SoundFont list */
+	struct snd_emux_voice *voices;	/* Voices (EMU 'channel') */
 	int use_time;	/* allocation counter */
 	spinlock_t voice_lock;	/* Lock for voice access */
 	struct semaphore register_mutex;
 	int client;		/* For the sequencer client */
 	int ports[SNDRV_EMUX_MAX_PORTS];	/* The ports for this device */
-	snd_emux_port_t *portptrs[SNDRV_EMUX_MAX_PORTS];
+	struct snd_emux_port *portptrs[SNDRV_EMUX_MAX_PORTS];
 	int used;	/* use counter */
 	char *name;	/* name of the device (internal) */
-	snd_rawmidi_t **vmidi;
+	struct snd_rawmidi **vmidi;
 	struct timer_list tlist;	/* for pending note-offs */
 	int timer_active;
 
-	snd_util_memhdr_t *memhdr;	/* memory chunk information */
+	struct snd_util_memhdr *memhdr;	/* memory chunk information */
 
 #ifdef CONFIG_PROC_FS
-	snd_info_entry_t *proc;
+	struct snd_info_entry *proc;
 #endif
 
 #ifdef CONFIG_SND_SEQUENCER_OSS
-	snd_seq_device_t *oss_synth;
+	struct snd_seq_device *oss_synth;
 #endif
 };
 
@@ -139,18 +140,18 @@ struct snd_emux {
  */
 struct snd_emux_port {
 
-	snd_midi_channel_set_t chset;
-	snd_emux_t *emu;
+	struct snd_midi_channel_set chset;
+	struct snd_emux *emu;
 
 	char port_mode;			/* operation mode */
 	int volume_atten;		/* emuX raw attenuation */
 	unsigned long drum_flags;	/* drum bitmaps */
 	int ctrls[EMUX_MD_END];		/* control parameters */
 #ifdef SNDRV_EMUX_USE_RAW_EFFECT
-	snd_emux_effect_table_t *effect;
+	struct snd_emux_effect_table *effect;
 #endif
 #ifdef CONFIG_SND_SEQUENCER_OSS
-	snd_seq_oss_arg_t *oss_arg;
+	struct snd_seq_oss_arg *oss_arg;
 #endif
 };
 
@@ -179,16 +180,16 @@ struct snd_emux_voice {
 	unsigned char key;
 	unsigned char velocity;	/* Velocity of current note */
 
-	snd_sf_zone_t *zone;	/* Zone assigned to this note */
+	struct snd_sf_zone *zone;	/* Zone assigned to this note */
 	void *block;		/* sample block pointer (optional) */
-	snd_midi_channel_t *chan;	/* Midi channel for this note */
-	snd_emux_port_t *port;	/* associated port */
-	snd_emux_t *emu;	/* assigned root info */
-	void *hw;		/* hardware pointer (emu8000_t or emu10k1_t) */
+	struct snd_midi_channel *chan;	/* Midi channel for this note */
+	struct snd_emux_port *port;	/* associated port */
+	struct snd_emux *emu;	/* assigned root info */
+	void *hw;		/* hardware pointer (emu8000 or emu10k1) */
 	unsigned long ontime;	/* jiffies at note triggered */
 	
 	/* Emu8k/Emu10k1 registers */
-	soundfont_voice_info_t reg;
+	struct soundfont_voice_info reg;
 
 	/* additional registers */
 	int avol;		/* volume attenuation */
@@ -229,15 +230,15 @@ struct snd_emux_effect_table {
 /*
  * prototypes - interface to Emu10k1 and Emu8k routines
  */
-int snd_emux_new(snd_emux_t **remu);
-int snd_emux_register(snd_emux_t *emu, snd_card_t *card, int index, char *name);
-int snd_emux_free(snd_emux_t *emu);
+int snd_emux_new(struct snd_emux **remu);
+int snd_emux_register(struct snd_emux *emu, struct snd_card *card, int index, char *name);
+int snd_emux_free(struct snd_emux *emu);
 
 /*
  * exported functions
  */
-void snd_emux_terminate_all(snd_emux_t *emu);
-void snd_emux_lock_voice(snd_emux_t *emu, int voice);
-void snd_emux_unlock_voice(snd_emux_t *emu, int voice);
+void snd_emux_terminate_all(struct snd_emux *emu);
+void snd_emux_lock_voice(struct snd_emux *emu, int voice);
+void snd_emux_unlock_voice(struct snd_emux *emu, int voice);
 
 #endif /* __SOUND_EMUX_SYNTH_H */
diff --git a/include/sound/sfnt_info.h b/include/sound/sfnt_info.h
index 674585f88a3..5d1ab9c4950 100644
--- a/include/sound/sfnt_info.h
+++ b/include/sound/sfnt_info.h
@@ -35,7 +35,7 @@
 #endif
 
 /* patch interface header: 16 bytes */
-typedef struct soundfont_patch_info_t {
+struct soundfont_patch_info {
 	unsigned short key;		/* use the key below */
 #define SNDRV_OSS_SOUNDFONT_PATCH		SNDRV_OSS_PATCHKEY(0x07)
 
@@ -59,7 +59,7 @@ typedef struct soundfont_patch_info_t {
 	short reserved;			/* word alignment data */
 
 	/* the actual patch data begins after this */
-} soundfont_patch_info_t;
+};
 
 
 /*
@@ -68,7 +68,7 @@ typedef struct soundfont_patch_info_t {
 
 #define SNDRV_SFNT_PATCH_NAME_LEN	32
 
-typedef struct soundfont_open_parm_t {
+struct soundfont_open_parm {
 	unsigned short type;		/* sample type */
 #define SNDRV_SFNT_PAT_TYPE_MISC	0
 #define SNDRV_SFNT_PAT_TYPE_GUS	6
@@ -78,7 +78,7 @@ typedef struct soundfont_open_parm_t {
 
 	short reserved;
 	char name[SNDRV_SFNT_PATCH_NAME_LEN];
-} soundfont_open_parm_t;
+};
 
 
 /*
@@ -86,7 +86,7 @@ typedef struct soundfont_open_parm_t {
  */
 
 /* wave table envelope & effect parameters to control EMU8000 */
-typedef struct soundfont_voice_parm_t {
+struct soundfont_voice_parm {
 	unsigned short moddelay;	/* modulation delay (0x8000) */
 	unsigned short modatkhld;	/* modulation attack & hold time (0x7f7f) */
 	unsigned short moddcysus;	/* modulation decay & sustain (0x7f7f) */
@@ -108,11 +108,11 @@ typedef struct soundfont_voice_parm_t {
 	unsigned char chorus;		/* chorus send (0x00) */
 	unsigned char reverb;		/* reverb send (0x00) */
 	unsigned short reserved[4];	/* not used */
-} soundfont_voice_parm_t;
+};
 
 
 /* wave table parameters: 92 bytes */
-typedef struct soundfont_voice_info_t {
+struct soundfont_voice_info {
 	unsigned short sf_id;		/* file id (should be zero) */
 	unsigned short sample;		/* sample id */
 	int start, end;			/* sample offset correction */
@@ -135,13 +135,13 @@ typedef struct soundfont_voice_info_t {
 	unsigned char amplitude;	/* sample volume (127 max) */
 	unsigned char attenuation;	/* attenuation (0.375dB) */
 	short scaleTuning;		/* pitch scale tuning(%), normally 100 */
-	soundfont_voice_parm_t parm;	/* voice envelope parameters */
+	struct soundfont_voice_parm parm;	/* voice envelope parameters */
 	unsigned short sample_mode;	/* sample mode_flag (set by driver) */
-} soundfont_voice_info_t;
+};
 
 
 /* instrument info header: 4 bytes */
-typedef struct soundfont_voice_rec_hdr_t {
+struct soundfont_voice_rec_hdr {
 	unsigned char bank;		/* midi bank number */
 	unsigned char instr;		/* midi preset number */
 	char nvoices;			/* number of voices */
@@ -149,7 +149,7 @@ typedef struct soundfont_voice_rec_hdr_t {
 #define SNDRV_SFNT_WR_APPEND		0	/* append anyway */
 #define SNDRV_SFNT_WR_EXCLUSIVE		1	/* skip if already exists */
 #define SNDRV_SFNT_WR_REPLACE		2	/* replace if already exists */
-} soundfont_voice_rec_hdr_t;
+};
 
 
 /*
@@ -157,7 +157,7 @@ typedef struct soundfont_voice_rec_hdr_t {
  */
 
 /* wave table sample header: 32 bytes */
-typedef struct soundfont_sample_info_t {
+struct soundfont_sample_info {
 	unsigned short sf_id;		/* file id (should be zero) */
 	unsigned short sample;		/* sample id */
 	int start, end;			/* start & end offset */
@@ -174,17 +174,17 @@ typedef struct soundfont_sample_info_t {
 #define SNDRV_SFNT_SAMPLE_STEREO_RIGHT	64	/* stereo right sound */
 #define SNDRV_SFNT_SAMPLE_REVERSE_LOOP	128	/* reverse looping */
 	unsigned int truesize;		/* used memory size (set by driver) */
-} soundfont_sample_info_t;
+};
 
 
 /*
  * voice preset mapping (aliasing)
  */
 
-typedef struct soundfont_voice_map_t {
+struct soundfont_voice_map {
 	int map_bank, map_instr, map_key;	/* key = -1 means all keys */
 	int src_bank, src_instr, src_key;
-} soundfont_voice_map_t;
+};
 
 
 /*
@@ -195,7 +195,7 @@ typedef struct soundfont_voice_map_t {
 
 #define SNDRV_EMUX_VERSION	((1 << 16) | (0 << 8) | 0)	/* 1.0.0 */
 
-struct sndrv_emux_misc_mode {
+struct snd_emux_misc_mode {
 	int port;	/* -1 = all */
 	int mode;
 	int value;
@@ -204,11 +204,11 @@ struct sndrv_emux_misc_mode {
 
 enum {
 	SNDRV_EMUX_IOCTL_VERSION = _IOR('H', 0x80, unsigned int),
-	SNDRV_EMUX_IOCTL_LOAD_PATCH = _IOWR('H', 0x81, soundfont_patch_info_t),
+	SNDRV_EMUX_IOCTL_LOAD_PATCH = _IOWR('H', 0x81, struct soundfont_patch_info),
 	SNDRV_EMUX_IOCTL_RESET_SAMPLES = _IO('H', 0x82),
 	SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES = _IO('H', 0x83),
 	SNDRV_EMUX_IOCTL_MEM_AVAIL = _IOW('H', 0x84, int),
-	SNDRV_EMUX_IOCTL_MISC_MODE = _IOWR('H', 0x84, struct sndrv_emux_misc_mode),
+	SNDRV_EMUX_IOCTL_MISC_MODE = _IOWR('H', 0x84, struct snd_emux_misc_mode),
 };
 
 #endif /* __SOUND_SFNT_INFO_H */
diff --git a/include/sound/soundfont.h b/include/sound/soundfont.h
index c992958f5e3..61a010c65d0 100644
--- a/include/sound/soundfont.h
+++ b/include/sound/soundfont.h
@@ -29,94 +29,93 @@
 #define SF_MAX_PRESETS  256	/* drums are mapped from 128 to 256 */
 #define SF_IS_DRUM_BANK(z) ((z) == 128)
 
-typedef struct snd_sf_zone {
+struct snd_sf_zone {
 	struct snd_sf_zone *next;	/* Link to next */
 	unsigned char bank;		/* Midi bank for this zone */
 	unsigned char instr;		/* Midi program for this zone */
 	unsigned char mapped;		/* True if mapped to something else */
 
-	soundfont_voice_info_t v;	/* All the soundfont parameters */
+	struct soundfont_voice_info v;	/* All the soundfont parameters */
 	int counter;
 	struct snd_sf_sample *sample;	/* Link to sample */
 
 	/* The following deals with preset numbers (programs) */
 	struct snd_sf_zone *next_instr;	/* Next zone of this instrument */
 	struct snd_sf_zone *next_zone;	/* Next zone in play list */
-} snd_sf_zone_t;
+};
 
-typedef struct snd_sf_sample {
-	soundfont_sample_info_t v;
+struct snd_sf_sample {
+	struct soundfont_sample_info v;
 	int counter;
-	snd_util_memblk_t *block;	/* allocated data block */
+	struct snd_util_memblk *block;	/* allocated data block */
 	struct snd_sf_sample *next;
-} snd_sf_sample_t;
+};
 
 /*
  * This represents all the information relating to a soundfont.
  */
-typedef struct snd_soundfont {
+struct snd_soundfont {
 	struct snd_soundfont *next;	/* Link to next */
 	/*struct snd_soundfont *prev;*/	/* Link to previous */
 	short  id;		/* file id */
 	short  type;		/* font type */
 	unsigned char name[SNDRV_SFNT_PATCH_NAME_LEN];	/* identifier */
-	snd_sf_zone_t *zones; /* Font information */
-	snd_sf_sample_t *samples; /* The sample headers */
-} snd_soundfont_t;
+	struct snd_sf_zone *zones; /* Font information */
+	struct snd_sf_sample *samples; /* The sample headers */
+};
 
 /*
  * Type of the sample access callback
  */
-typedef int (*snd_sf_sample_new_t)(void *private_data, snd_sf_sample_t *sp,
-				   snd_util_memhdr_t *hdr, const void __user *buf, long count);
-typedef int (*snd_sf_sample_free_t)(void *private_data, snd_sf_sample_t *sp,
-				    snd_util_memhdr_t *hdr);
-typedef void (*snd_sf_sample_reset_t)(void *private);
-
-typedef struct snd_sf_callback {
+struct snd_sf_callback {
 	void *private_data;
-	snd_sf_sample_new_t sample_new;
-	snd_sf_sample_free_t sample_free;
-	snd_sf_sample_reset_t sample_reset;
-} snd_sf_callback_t;
+	int (*sample_new)(void *private_data, struct snd_sf_sample *sp,
+			  struct snd_util_memhdr *hdr,
+			  const void __user *buf, long count);
+	int (*sample_free)(void *private_data, struct snd_sf_sample *sp,
+			   struct snd_util_memhdr *hdr);
+	void (*sample_reset)(void *private);
+};
 
 /*
  * List of soundfonts.
  */
-typedef struct snd_sf_list {
-	snd_soundfont_t *currsf; /* The currently open soundfont */
+struct snd_sf_list {
+	struct snd_soundfont *currsf; /* The currently open soundfont */
 	int open_client;	/* client pointer for lock */
 	int mem_used;		/* used memory size */
-	snd_sf_zone_t *presets[SF_MAX_PRESETS];
-	snd_soundfont_t *fonts; /* The list of soundfonts */
+	struct snd_sf_zone *presets[SF_MAX_PRESETS];
+	struct snd_soundfont *fonts; /* The list of soundfonts */
 	int fonts_size;	/* number of fonts allocated */
 	int zone_counter;	/* last allocated time for zone */
 	int sample_counter;	/* last allocated time for sample */
 	int zone_locked;	/* locked time for zone */
 	int sample_locked;	/* locked time for sample */
-	snd_sf_callback_t callback;	/* callback functions */
+	struct snd_sf_callback callback;	/* callback functions */
 	int presets_locked;
 	struct semaphore presets_mutex;
 	spinlock_t lock;
-	snd_util_memhdr_t *memhdr;
-} snd_sf_list_t;
+	struct snd_util_memhdr *memhdr;
+};
 
 /* Prototypes for soundfont.c */
-int snd_soundfont_load(snd_sf_list_t *sflist, const void __user *data, long count, int client);
-int snd_soundfont_load_guspatch(snd_sf_list_t *sflist, const char __user *data,
+int snd_soundfont_load(struct snd_sf_list *sflist, const void __user *data,
+		       long count, int client);
+int snd_soundfont_load_guspatch(struct snd_sf_list *sflist, const char __user *data,
 				long count, int client);
-int snd_soundfont_close_check(snd_sf_list_t *sflist, int client);
+int snd_soundfont_close_check(struct snd_sf_list *sflist, int client);
 
-snd_sf_list_t *snd_sf_new(snd_sf_callback_t *callback, snd_util_memhdr_t *hdr);
-void snd_sf_free(snd_sf_list_t *sflist);
+struct snd_sf_list *snd_sf_new(struct snd_sf_callback *callback,
+			       struct snd_util_memhdr *hdr);
+void snd_sf_free(struct snd_sf_list *sflist);
 
-int snd_soundfont_remove_samples(snd_sf_list_t *sflist);
-int snd_soundfont_remove_unlocked(snd_sf_list_t *sflist);
+int snd_soundfont_remove_samples(struct snd_sf_list *sflist);
+int snd_soundfont_remove_unlocked(struct snd_sf_list *sflist);
 
-int snd_soundfont_search_zone(snd_sf_list_t *sflist, int *notep, int vel,
+int snd_soundfont_search_zone(struct snd_sf_list *sflist, int *notep, int vel,
 			      int preset, int bank,
 			      int def_preset, int def_bank,
-			      snd_sf_zone_t **table, int max_layers);
+			      struct snd_sf_zone **table, int max_layers);
 
 /* Parameter conversions */
 int snd_sf_calc_parm_hold(int msec);
diff --git a/include/sound/util_mem.h b/include/sound/util_mem.h
index 9d2cdfa0c42..69944bbb544 100644
--- a/include/sound/util_mem.h
+++ b/include/sound/util_mem.h
@@ -20,29 +20,25 @@
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-typedef struct snd_util_memblk snd_util_memblk_t;
-typedef struct snd_util_memhdr snd_util_memhdr_t;
-typedef unsigned int snd_util_unit_t;
-
 /*
  * memory block
  */
 struct snd_util_memblk {
-	snd_util_unit_t size;		/* size of this block */
-	snd_util_unit_t offset;		/* zero-offset of this block */
+	unsigned int size;		/* size of this block */
+	unsigned int offset;		/* zero-offset of this block */
 	struct list_head list;		/* link */
 };
 
-#define snd_util_memblk_argptr(blk)	(void*)((char*)(blk) + sizeof(snd_util_memblk_t))
+#define snd_util_memblk_argptr(blk)	(void*)((char*)(blk) + sizeof(struct snd_util_memblk))
 
 /*
  * memory management information
  */
 struct snd_util_memhdr {
-	snd_util_unit_t size;		/* size of whole data */
+	unsigned int size;		/* size of whole data */
 	struct list_head block;		/* block linked-list header */
 	int nblocks;			/* # of allocated blocks */
-	snd_util_unit_t used;		/* used memory size */
+	unsigned int used;		/* used memory size */
 	int block_extra_size;		/* extra data size of chunk */
 	struct semaphore block_mutex;	/* lock */
 };
@@ -50,15 +46,17 @@ struct snd_util_memhdr {
 /*
  * prototypes
  */
-snd_util_memhdr_t *snd_util_memhdr_new(int memsize);
-void snd_util_memhdr_free(snd_util_memhdr_t *hdr);
-snd_util_memblk_t *snd_util_mem_alloc(snd_util_memhdr_t *hdr, int size);
-int snd_util_mem_free(snd_util_memhdr_t *hdr, snd_util_memblk_t *blk);
-int snd_util_mem_avail(snd_util_memhdr_t *hdr);
+struct snd_util_memhdr *snd_util_memhdr_new(int memsize);
+void snd_util_memhdr_free(struct snd_util_memhdr *hdr);
+struct snd_util_memblk *snd_util_mem_alloc(struct snd_util_memhdr *hdr, int size);
+int snd_util_mem_free(struct snd_util_memhdr *hdr, struct snd_util_memblk *blk);
+int snd_util_mem_avail(struct snd_util_memhdr *hdr);
 
 /* functions without mutex */
-snd_util_memblk_t *__snd_util_mem_alloc(snd_util_memhdr_t *hdr, int size);
-void __snd_util_mem_free(snd_util_memhdr_t *hdr, snd_util_memblk_t *blk);
-snd_util_memblk_t *__snd_util_memblk_new(snd_util_memhdr_t *hdr, snd_util_unit_t units, struct list_head *prev);
+struct snd_util_memblk *__snd_util_mem_alloc(struct snd_util_memhdr *hdr, int size);
+void __snd_util_mem_free(struct snd_util_memhdr *hdr, struct snd_util_memblk *blk);
+struct snd_util_memblk *__snd_util_memblk_new(struct snd_util_memhdr *hdr,
+					      unsigned int units,
+					      struct list_head *prev);
 
 #endif /* __SOUND_UTIL_MEM_H */
diff --git a/sound/synth/emux/emux.c b/sound/synth/emux/emux.c
index 2aacd8a884e..7c8e328fae6 100644
--- a/sound/synth/emux/emux.c
+++ b/sound/synth/emux/emux.c
@@ -35,9 +35,9 @@ MODULE_LICENSE("GPL");
 /*
  * create a new hardware dependent device for Emu8000/Emu10k1
  */
-int snd_emux_new(snd_emux_t **remu)
+int snd_emux_new(struct snd_emux **remu)
 {
-	snd_emux_t *emu;
+	struct snd_emux *emu;
 
 	*remu = NULL;
 	emu = kzalloc(sizeof(*emu), GFP_KERNEL);
@@ -66,33 +66,33 @@ int snd_emux_new(snd_emux_t **remu)
 
 /*
  */
-static int sf_sample_new(void *private_data, snd_sf_sample_t *sp,
-			 snd_util_memhdr_t *hdr,
-			 const void __user *buf, long count)
+static int sf_sample_new(void *private_data, struct snd_sf_sample *sp,
+				  struct snd_util_memhdr *hdr,
+				  const void __user *buf, long count)
 {
-	snd_emux_t *emu = private_data;
+	struct snd_emux *emu = private_data;
 	return emu->ops.sample_new(emu, sp, hdr, buf, count);
 	
 }
 
-static int sf_sample_free(void *private_data, snd_sf_sample_t *sp,
-			  snd_util_memhdr_t *hdr)
+static int sf_sample_free(void *private_data, struct snd_sf_sample *sp,
+				   struct snd_util_memhdr *hdr)
 {
-	snd_emux_t *emu = private_data;
+	struct snd_emux *emu = private_data;
 	return emu->ops.sample_free(emu, sp, hdr);
 	
 }
 
 static void sf_sample_reset(void *private_data)
 {
-	snd_emux_t *emu = private_data;
+	struct snd_emux *emu = private_data;
 	emu->ops.sample_reset(emu);
 }
 
-int snd_emux_register(snd_emux_t *emu, snd_card_t *card, int index, char *name)
+int snd_emux_register(struct snd_emux *emu, struct snd_card *card, int index, char *name)
 {
 	int err;
-	snd_sf_callback_t sf_cb;
+	struct snd_sf_callback sf_cb;
 
 	snd_assert(emu->hw != NULL, return -EINVAL);
 	snd_assert(emu->max_voices > 0, return -EINVAL);
@@ -101,7 +101,8 @@ int snd_emux_register(snd_emux_t *emu, snd_card_t *card, int index, char *name)
 
 	emu->card = card;
 	emu->name = kstrdup(name, GFP_KERNEL);
-	emu->voices = kcalloc(emu->max_voices, sizeof(snd_emux_voice_t), GFP_KERNEL);
+	emu->voices = kcalloc(emu->max_voices, sizeof(struct snd_emux_voice),
+			      GFP_KERNEL);
 	if (emu->voices == NULL)
 		return -ENOMEM;
 
@@ -138,7 +139,7 @@ int snd_emux_register(snd_emux_t *emu, snd_card_t *card, int index, char *name)
 
 /*
  */
-int snd_emux_free(snd_emux_t *emu)
+int snd_emux_free(struct snd_emux *emu)
 {
 	unsigned long flags;
 
diff --git a/sound/synth/emux/emux_effect.c b/sound/synth/emux/emux_effect.c
index 4764940f11a..a447218b616 100644
--- a/sound/synth/emux/emux_effect.c
+++ b/sound/synth/emux/emux_effect.c
@@ -32,7 +32,7 @@
 
 #define xoffsetof(type,tag)	((long)(&((type)NULL)->tag) - (long)(NULL))
 
-#define parm_offset(tag)	xoffsetof(soundfont_voice_parm_t*, tag)
+#define parm_offset(tag)	xoffsetof(struct soundfont_voice_parm *, tag)
 
 #define PARM_IS_BYTE		(1 << 0)
 #define PARM_IS_WORD		(1 << 1)
@@ -97,10 +97,10 @@ static struct emux_parm_defs {
 
 /* set byte effect value */
 static void
-effect_set_byte(unsigned char *valp, snd_midi_channel_t *chan, int type)
+effect_set_byte(unsigned char *valp, struct snd_midi_channel *chan, int type)
 {
 	short effect;
-	snd_emux_effect_table_t *fx = chan->private;
+	struct snd_emux_effect_table *fx = chan->private;
 
 	effect = fx->val[type];
 	if (fx->flag[type] == EMUX_FX_FLAG_ADD) {
@@ -118,10 +118,10 @@ effect_set_byte(unsigned char *valp, snd_midi_channel_t *chan, int type)
 
 /* set word effect value */
 static void
-effect_set_word(unsigned short *valp, snd_midi_channel_t *chan, int type)
+effect_set_word(unsigned short *valp, struct snd_midi_channel *chan, int type)
 {
 	int effect;
-	snd_emux_effect_table_t *fx = chan->private;
+	struct snd_emux_effect_table *fx = chan->private;
 
 	effect = *(unsigned short*)&fx->val[type];
 	if (fx->flag[type] == EMUX_FX_FLAG_ADD)
@@ -135,10 +135,10 @@ effect_set_word(unsigned short *valp, snd_midi_channel_t *chan, int type)
 
 /* address offset */
 static int
-effect_get_offset(snd_midi_channel_t *chan, int lo, int hi, int mode)
+effect_get_offset(struct snd_midi_channel *chan, int lo, int hi, int mode)
 {
 	int addr = 0;
-	snd_emux_effect_table_t *fx = chan->private;
+	struct snd_emux_effect_table *fx = chan->private;
 
 	if (fx->flag[hi])
 		addr = (short)fx->val[hi];
@@ -153,7 +153,8 @@ effect_get_offset(snd_midi_channel_t *chan, int lo, int hi, int mode)
 #ifdef CONFIG_SND_SEQUENCER_OSS
 /* change effects - for OSS sequencer compatibility */
 void
-snd_emux_send_effect_oss(snd_emux_port_t *port, snd_midi_channel_t *chan, int type, int val)
+snd_emux_send_effect_oss(struct snd_emux_port *port,
+			 struct snd_midi_channel *chan, int type, int val)
 {
 	int mode;
 
@@ -173,13 +174,14 @@ snd_emux_send_effect_oss(snd_emux_port_t *port, snd_midi_channel_t *chan, int ty
  * if update is necessary, call emu8000_control
  */
 void
-snd_emux_send_effect(snd_emux_port_t *port, snd_midi_channel_t *chan, int type, int val, int mode)
+snd_emux_send_effect(struct snd_emux_port *port, struct snd_midi_channel *chan,
+		     int type, int val, int mode)
 {
 	int i;
 	int offset;
 	unsigned char *srcp, *origp;
-	snd_emux_t *emu;
-	snd_emux_effect_table_t *fx;
+	struct snd_emux *emu;
+	struct snd_emux_effect_table *fx;
 	unsigned long flags;
 
 	emu = port->emu;
@@ -206,7 +208,7 @@ snd_emux_send_effect(snd_emux_port_t *port, snd_midi_channel_t *chan, int type,
 	/* modify the register values */
 	spin_lock_irqsave(&emu->voice_lock, flags);
 	for (i = 0; i < emu->max_voices; i++) {
-		snd_emux_voice_t *vp = &emu->voices[i];
+		struct snd_emux_voice *vp = &emu->voices[i];
 		if (!STATE_IS_PLAYING(vp->state) || vp->chan != chan)
 			continue;
 		srcp = (unsigned char*)&vp->reg.parm + offset;
@@ -228,10 +230,10 @@ snd_emux_send_effect(snd_emux_port_t *port, snd_midi_channel_t *chan, int type,
 
 /* copy wavetable registers to voice table */
 void
-snd_emux_setup_effect(snd_emux_voice_t *vp)
+snd_emux_setup_effect(struct snd_emux_voice *vp)
 {
-	snd_midi_channel_t *chan = vp->chan;
-	snd_emux_effect_table_t *fx;
+	struct snd_midi_channel *chan = vp->chan;
+	struct snd_emux_effect_table *fx;
 	unsigned char *srcp;
 	int i;
 
@@ -275,10 +277,11 @@ snd_emux_setup_effect(snd_emux_voice_t *vp)
  * effect table
  */
 void
-snd_emux_create_effect(snd_emux_port_t *p)
+snd_emux_create_effect(struct snd_emux_port *p)
 {
 	int i;
-	p->effect = kcalloc(p->chset.max_channels, sizeof(snd_emux_effect_table_t), GFP_KERNEL);
+	p->effect = kcalloc(p->chset.max_channels,
+			    sizeof(struct snd_emux_effect_table), GFP_KERNEL);
 	if (p->effect) {
 		for (i = 0; i < p->chset.max_channels; i++)
 			p->chset.channels[i].private = p->effect + i;
@@ -289,17 +292,18 @@ snd_emux_create_effect(snd_emux_port_t *p)
 }
 
 void
-snd_emux_delete_effect(snd_emux_port_t *p)
+snd_emux_delete_effect(struct snd_emux_port *p)
 {
 	kfree(p->effect);
 	p->effect = NULL;
 }
 
 void
-snd_emux_clear_effect(snd_emux_port_t *p)
+snd_emux_clear_effect(struct snd_emux_port *p)
 {
 	if (p->effect) {
-		memset(p->effect, 0, sizeof(snd_emux_effect_table_t) * p->chset.max_channels);
+		memset(p->effect, 0, sizeof(struct snd_emux_effect_table) *
+		       p->chset.max_channels);
 	}
 }
 
diff --git a/sound/synth/emux/emux_hwdep.c b/sound/synth/emux/emux_hwdep.c
index 4182b44eb47..9b63814c3f6 100644
--- a/sound/synth/emux/emux_hwdep.c
+++ b/sound/synth/emux/emux_hwdep.c
@@ -29,7 +29,7 @@
  * open the hwdep device
  */
 static int
-snd_emux_hwdep_open(snd_hwdep_t *hw, struct file *file)
+snd_emux_hwdep_open(struct snd_hwdep *hw, struct file *file)
 {
 	return 0;
 }
@@ -39,7 +39,7 @@ snd_emux_hwdep_open(snd_hwdep_t *hw, struct file *file)
  * close the device
  */
 static int
-snd_emux_hwdep_release(snd_hwdep_t *hw, struct file *file)
+snd_emux_hwdep_release(struct snd_hwdep *hw, struct file *file)
 {
 	return 0;
 }
@@ -51,10 +51,10 @@ snd_emux_hwdep_release(snd_hwdep_t *hw, struct file *file)
  * load patch
  */
 static int
-snd_emux_hwdep_load_patch(snd_emux_t *emu, void __user *arg)
+snd_emux_hwdep_load_patch(struct snd_emux *emu, void __user *arg)
 {
 	int err;
-	soundfont_patch_info_t patch;
+	struct soundfont_patch_info patch;
 
 	if (copy_from_user(&patch, arg, sizeof(patch)))
 		return -EFAULT;
@@ -77,9 +77,9 @@ snd_emux_hwdep_load_patch(snd_emux_t *emu, void __user *arg)
  * set misc mode
  */
 static int
-snd_emux_hwdep_misc_mode(snd_emux_t *emu, void __user *arg)
+snd_emux_hwdep_misc_mode(struct snd_emux *emu, void __user *arg)
 {
-	struct sndrv_emux_misc_mode info;
+	struct snd_emux_misc_mode info;
 	int i;
 
 	if (copy_from_user(&info, arg, sizeof(info)))
@@ -102,9 +102,10 @@ snd_emux_hwdep_misc_mode(snd_emux_t *emu, void __user *arg)
  * ioctl
  */
 static int
-snd_emux_hwdep_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg)
+snd_emux_hwdep_ioctl(struct snd_hwdep * hw, struct file *file,
+		     unsigned int cmd, unsigned long arg)
 {
-	snd_emux_t *emu = hw->private_data;
+	struct snd_emux *emu = hw->private_data;
 
 	switch (cmd) {
 	case SNDRV_EMUX_IOCTL_VERSION:
@@ -136,9 +137,9 @@ snd_emux_hwdep_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsi
  */
 
 int
-snd_emux_init_hwdep(snd_emux_t *emu)
+snd_emux_init_hwdep(struct snd_emux *emu)
 {
-	snd_hwdep_t *hw;
+	struct snd_hwdep *hw;
 	int err;
 
 	if ((err = snd_hwdep_new(emu->card, SNDRV_EMUX_HWDEP_NAME, emu->hwdep_idx, &hw)) < 0)
@@ -162,7 +163,7 @@ snd_emux_init_hwdep(snd_emux_t *emu)
  * unregister
  */
 void
-snd_emux_delete_hwdep(snd_emux_t *emu)
+snd_emux_delete_hwdep(struct snd_emux *emu)
 {
 	if (emu->hwdep) {
 		snd_device_free(emu->card, emu->hwdep);
diff --git a/sound/synth/emux/emux_nrpn.c b/sound/synth/emux/emux_nrpn.c
index 25edff9e1fc..c6917ba2c93 100644
--- a/sound/synth/emux/emux_nrpn.c
+++ b/sound/synth/emux/emux_nrpn.c
@@ -27,11 +27,11 @@
  */
 
 /* NRPN / CC -> Emu8000 parameter converter */
-typedef struct {
+struct nrpn_conv_table {
 	int control;
 	int effect;
 	int (*convert)(int val);
-} nrpn_conv_table;
+};
 
 /* effect sensitivity */
 
@@ -48,8 +48,9 @@ typedef struct {
  * convert NRPN/control values
  */
 
-static int send_converted_effect(nrpn_conv_table *table, int num_tables,
-				 snd_emux_port_t *port, snd_midi_channel_t *chan,
+static int send_converted_effect(struct nrpn_conv_table *table, int num_tables,
+				 struct snd_emux_port *port,
+				 struct snd_midi_channel *chan,
 				 int type, int val, int mode)
 {
 	int i, cval;
@@ -178,7 +179,7 @@ static int fx_conv_Q(int val)
 }
 
 
-static nrpn_conv_table awe_effects[] =
+static struct nrpn_conv_table awe_effects[] =
 {
 	{ 0, EMUX_FX_LFO1_DELAY,	fx_lfo1_delay},
 	{ 1, EMUX_FX_LFO1_FREQ,	fx_lfo1_freq},
@@ -265,7 +266,7 @@ static int gs_vib_delay(int val)
 	return -(val - 64) * gs_sense[FX_VIBDELAY] / 50;
 }
 
-static nrpn_conv_table gs_effects[] =
+static struct nrpn_conv_table gs_effects[] =
 {
 	{32, EMUX_FX_CUTOFF,	gs_cutoff},
 	{33, EMUX_FX_FILTERQ,	gs_filterQ},
@@ -282,9 +283,10 @@ static nrpn_conv_table gs_effects[] =
  * NRPN events
  */
 void
-snd_emux_nrpn(void *p, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset)
+snd_emux_nrpn(void *p, struct snd_midi_channel *chan,
+	      struct snd_midi_channel_set *chset)
 {
-	snd_emux_port_t *port;
+	struct snd_emux_port *port;
 
 	port = p;
 	snd_assert(port != NULL, return);
@@ -348,7 +350,7 @@ static int xg_release(int val)
 	return -(val - 64) * xg_sense[FX_RELEASE] / 64;
 }
 
-static nrpn_conv_table xg_effects[] =
+static struct nrpn_conv_table xg_effects[] =
 {
 	{71, EMUX_FX_CUTOFF,	xg_cutoff},
 	{74, EMUX_FX_FILTERQ,	xg_filterQ},
@@ -357,7 +359,8 @@ static nrpn_conv_table xg_effects[] =
 };
 
 int
-snd_emux_xg_control(snd_emux_port_t *port, snd_midi_channel_t *chan, int param)
+snd_emux_xg_control(struct snd_emux_port *port, struct snd_midi_channel *chan,
+		    int param)
 {
 	return send_converted_effect(xg_effects, ARRAY_SIZE(xg_effects),
 				     port, chan, param,
@@ -369,10 +372,11 @@ snd_emux_xg_control(snd_emux_port_t *port, snd_midi_channel_t *chan, int param)
  * receive sysex
  */
 void
-snd_emux_sysex(void *p, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset)
+snd_emux_sysex(void *p, unsigned char *buf, int len, int parsed,
+	       struct snd_midi_channel_set *chset)
 {
-	snd_emux_port_t *port;
-	snd_emux_t *emu;
+	struct snd_emux_port *port;
+	struct snd_emux *emu;
 
 	port = p;
 	snd_assert(port != NULL, return);
diff --git a/sound/synth/emux/emux_oss.c b/sound/synth/emux/emux_oss.c
index 5272f4ac8af..dfbfcfbe5dd 100644
--- a/sound/synth/emux/emux_oss.c
+++ b/sound/synth/emux/emux_oss.c
@@ -31,19 +31,25 @@
 #include "emux_voice.h"
 #include <sound/asoundef.h>
 
-static int snd_emux_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure);
-static int snd_emux_close_seq_oss(snd_seq_oss_arg_t *arg);
-static int snd_emux_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd, unsigned long ioarg);
-static int snd_emux_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format, const char __user *buf, int offs, int count);
-static int snd_emux_reset_seq_oss(snd_seq_oss_arg_t *arg);
-static int snd_emux_event_oss_input(snd_seq_event_t *ev, int direct, void *private, int atomic, int hop);
-static void reset_port_mode(snd_emux_port_t *port, int midi_mode);
-static void emuspec_control(snd_emux_t *emu, snd_emux_port_t *port, int cmd, unsigned char *event, int atomic, int hop);
-static void gusspec_control(snd_emux_t *emu, snd_emux_port_t *port, int cmd, unsigned char *event, int atomic, int hop);
-static void fake_event(snd_emux_t *emu, snd_emux_port_t *port, int ch, int param, int val, int atomic, int hop);
+static int snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure);
+static int snd_emux_close_seq_oss(struct snd_seq_oss_arg *arg);
+static int snd_emux_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd,
+				  unsigned long ioarg);
+static int snd_emux_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format,
+				       const char __user *buf, int offs, int count);
+static int snd_emux_reset_seq_oss(struct snd_seq_oss_arg *arg);
+static int snd_emux_event_oss_input(struct snd_seq_event *ev, int direct,
+				    void *private, int atomic, int hop);
+static void reset_port_mode(struct snd_emux_port *port, int midi_mode);
+static void emuspec_control(struct snd_emux *emu, struct snd_emux_port *port,
+			    int cmd, unsigned char *event, int atomic, int hop);
+static void gusspec_control(struct snd_emux *emu, struct snd_emux_port *port,
+			    int cmd, unsigned char *event, int atomic, int hop);
+static void fake_event(struct snd_emux *emu, struct snd_emux_port *port,
+		       int ch, int param, int val, int atomic, int hop);
 
 /* operators */
-static snd_seq_oss_callback_t oss_callback = {
+static struct snd_seq_oss_callback oss_callback = {
 	.owner = THIS_MODULE,
 	.open = snd_emux_open_seq_oss,
 	.close = snd_emux_close_seq_oss,
@@ -58,13 +64,13 @@ static snd_seq_oss_callback_t oss_callback = {
  */
 
 void
-snd_emux_init_seq_oss(snd_emux_t *emu)
+snd_emux_init_seq_oss(struct snd_emux *emu)
 {
-	snd_seq_oss_reg_t *arg;
-	snd_seq_device_t *dev;
+	struct snd_seq_oss_reg *arg;
+	struct snd_seq_device *dev;
 
 	if (snd_seq_device_new(emu->card, 0, SNDRV_SEQ_DEV_ID_OSS,
-			       sizeof(snd_seq_oss_reg_t), &dev) < 0)
+			       sizeof(struct snd_seq_oss_reg), &dev) < 0)
 		return;
 
 	emu->oss_synth = dev;
@@ -85,7 +91,7 @@ snd_emux_init_seq_oss(snd_emux_t *emu)
  * unregister
  */
 void
-snd_emux_detach_seq_oss(snd_emux_t *emu)
+snd_emux_detach_seq_oss(struct snd_emux *emu)
 {
 	if (emu->oss_synth) {
 		snd_device_free(emu->card, emu->oss_synth);
@@ -101,11 +107,11 @@ snd_emux_detach_seq_oss(snd_emux_t *emu)
  * open port for OSS sequencer
  */
 static int
-snd_emux_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure)
+snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)
 {
-	snd_emux_t *emu;
-	snd_emux_port_t *p;
-	snd_seq_port_callback_t callback;
+	struct snd_emux *emu;
+	struct snd_emux_port *p;
+	struct snd_seq_port_callback callback;
 	char tmpname[64];
 
 	emu = closure;
@@ -153,7 +159,7 @@ snd_emux_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure)
  * reset port mode
  */
 static void
-reset_port_mode(snd_emux_port_t *port, int midi_mode)
+reset_port_mode(struct snd_emux_port *port, int midi_mode)
 {
 	if (midi_mode) {
 		port->port_mode = SNDRV_EMUX_PORT_MODE_OSS_MIDI;
@@ -173,10 +179,10 @@ reset_port_mode(snd_emux_port_t *port, int midi_mode)
  * close port
  */
 static int
-snd_emux_close_seq_oss(snd_seq_oss_arg_t *arg)
+snd_emux_close_seq_oss(struct snd_seq_oss_arg *arg)
 {
-	snd_emux_t *emu;
-	snd_emux_port_t *p;
+	struct snd_emux *emu;
+	struct snd_emux_port *p;
 
 	snd_assert(arg != NULL, return -ENXIO);
 	p = arg->private_data;
@@ -200,11 +206,11 @@ snd_emux_close_seq_oss(snd_seq_oss_arg_t *arg)
  * load patch
  */
 static int
-snd_emux_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
+snd_emux_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format,
 			    const char __user *buf, int offs, int count)
 {
-	snd_emux_t *emu;
-	snd_emux_port_t *p;
+	struct snd_emux *emu;
+	struct snd_emux_port *p;
 	int rc;
 
 	snd_assert(arg != NULL, return -ENXIO);
@@ -218,7 +224,7 @@ snd_emux_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
 		rc = snd_soundfont_load_guspatch(emu->sflist, buf, count,
 						 SF_CLIENT_NO(p->chset.port));
 	else if (format == SNDRV_OSS_SOUNDFONT_PATCH) {
-		soundfont_patch_info_t patch;
+		struct soundfont_patch_info patch;
 		if (count < (int)sizeof(patch))
 			rc = -EINVAL;
 		if (copy_from_user(&patch, buf, sizeof(patch)))
@@ -242,10 +248,10 @@ snd_emux_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
  * ioctl
  */
 static int
-snd_emux_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd, unsigned long ioarg)
+snd_emux_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd, unsigned long ioarg)
 {
-	snd_emux_port_t *p;
-	snd_emux_t *emu;
+	struct snd_emux_port *p;
+	struct snd_emux *emu;
 
 	snd_assert(arg != NULL, return -ENXIO);
 	p = arg->private_data;
@@ -273,9 +279,9 @@ snd_emux_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd, unsigned long i
  * reset device
  */
 static int
-snd_emux_reset_seq_oss(snd_seq_oss_arg_t *arg)
+snd_emux_reset_seq_oss(struct snd_seq_oss_arg *arg)
 {
-	snd_emux_port_t *p;
+	struct snd_emux_port *p;
 
 	snd_assert(arg != NULL, return -ENXIO);
 	p = arg->private_data;
@@ -289,11 +295,11 @@ snd_emux_reset_seq_oss(snd_seq_oss_arg_t *arg)
  * receive raw events: only SEQ_PRIVATE is accepted.
  */
 static int
-snd_emux_event_oss_input(snd_seq_event_t *ev, int direct, void *private_data,
+snd_emux_event_oss_input(struct snd_seq_event *ev, int direct, void *private_data,
 			 int atomic, int hop)
 {
-	snd_emux_t *emu;
-	snd_emux_port_t *p;
+	struct snd_emux *emu;
+	struct snd_emux_port *p;
 	unsigned char cmd, *data;
 
 	p = private_data;
@@ -320,14 +326,14 @@ snd_emux_event_oss_input(snd_seq_event_t *ev, int direct, void *private_data,
  * OSS/AWE driver specific h/w controls
  */
 static void
-emuspec_control(snd_emux_t *emu, snd_emux_port_t *port, int cmd,
+emuspec_control(struct snd_emux *emu, struct snd_emux_port *port, int cmd,
 		unsigned char *event, int atomic, int hop)
 {
 	int voice;
 	unsigned short p1;
 	short p2;
 	int i;
-	snd_midi_channel_t *chan;
+	struct snd_midi_channel *chan;
 
 	voice = event[3];
 	if (voice < 0 || voice >= port->chset.max_channels)
@@ -415,14 +421,14 @@ emuspec_control(snd_emux_t *emu, snd_emux_port_t *port, int cmd,
 #include <linux/ultrasound.h>
 
 static void
-gusspec_control(snd_emux_t *emu, snd_emux_port_t *port, int cmd,
+gusspec_control(struct snd_emux *emu, struct snd_emux_port *port, int cmd,
 		unsigned char *event, int atomic, int hop)
 {
 	int voice;
 	unsigned short p1;
 	short p2;
 	int plong;
-	snd_midi_channel_t *chan;
+	struct snd_midi_channel *chan;
 
 	if (port->port_mode != SNDRV_EMUX_PORT_MODE_OSS_SYNTH)
 		return;
@@ -483,9 +489,9 @@ gusspec_control(snd_emux_t *emu, snd_emux_port_t *port, int cmd,
  * send an event to midi emulation
  */
 static void
-fake_event(snd_emux_t *emu, snd_emux_port_t *port, int ch, int param, int val, int atomic, int hop)
+fake_event(struct snd_emux *emu, struct snd_emux_port *port, int ch, int param, int val, int atomic, int hop)
 {
-	snd_seq_event_t ev;
+	struct snd_seq_event ev;
 	memset(&ev, 0, sizeof(ev));
 	ev.type = SNDRV_SEQ_EVENT_CONTROLLER;
 	ev.data.control.channel = ch;
diff --git a/sound/synth/emux/emux_proc.c b/sound/synth/emux/emux_proc.c
index 0f155d68de0..a70a179f694 100644
--- a/sound/synth/emux/emux_proc.c
+++ b/sound/synth/emux/emux_proc.c
@@ -30,10 +30,10 @@
 #ifdef CONFIG_PROC_FS
 
 static void
-snd_emux_proc_info_read(snd_info_entry_t *entry, 
-			snd_info_buffer_t *buf)
+snd_emux_proc_info_read(struct snd_info_entry *entry, 
+			struct snd_info_buffer *buf)
 {
-	snd_emux_t *emu;
+	struct snd_emux *emu;
 	int i;
 
 	emu = entry->private_data;
@@ -66,7 +66,7 @@ snd_emux_proc_info_read(snd_info_entry_t *entry,
 	}
 #if 0  /* debug */
 	if (emu->voices[0].state != SNDRV_EMUX_ST_OFF && emu->voices[0].ch >= 0) {
-		snd_emux_voice_t *vp = &emu->voices[0];
+		struct snd_emux_voice *vp = &emu->voices[0];
 		snd_iprintf(buf, "voice 0: on\n");
 		snd_iprintf(buf, "mod delay=%x, atkhld=%x, dcysus=%x, rel=%x\n",
 			    vp->reg.parm.moddelay,
@@ -107,9 +107,9 @@ snd_emux_proc_info_read(snd_info_entry_t *entry,
 }
 
 
-void snd_emux_proc_init(snd_emux_t *emu, snd_card_t *card, int device)
+void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 	char name[64];
 
 	sprintf(name, "wavetableD%d", device);
@@ -127,7 +127,7 @@ void snd_emux_proc_init(snd_emux_t *emu, snd_card_t *card, int device)
 		emu->proc = entry;
 }
 
-void snd_emux_proc_free(snd_emux_t *emu)
+void snd_emux_proc_free(struct snd_emux *emu)
 {
 	if (emu->proc) {
 		snd_info_unregister(emu->proc);
diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c
index 8ccd33f4aa5..f5a832ff362 100644
--- a/sound/synth/emux/emux_seq.c
+++ b/sound/synth/emux/emux_seq.c
@@ -25,15 +25,15 @@
 
 /* Prototypes for static functions */
 static void free_port(void *private);
-static void snd_emux_init_port(snd_emux_port_t *p);
-static int snd_emux_use(void *private_data, snd_seq_port_subscribe_t *info);
-static int snd_emux_unuse(void *private_data, snd_seq_port_subscribe_t *info);
-static int get_client(snd_card_t *card, int index, char *name);
+static void snd_emux_init_port(struct snd_emux_port *p);
+static int snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info);
+static int snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info);
+static int get_client(struct snd_card *card, int index, char *name);
 
 /*
  * MIDI emulation operators
  */
-static snd_midi_op_t emux_ops = {
+static struct snd_midi_op emux_ops = {
 	snd_emux_note_on,
 	snd_emux_note_off,
 	snd_emux_key_press,
@@ -65,10 +65,10 @@ static snd_midi_op_t emux_ops = {
  * can connect to these ports to play midi data.
  */
 int
-snd_emux_init_seq(snd_emux_t *emu, snd_card_t *card, int index)
+snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index)
 {
 	int  i;
-	snd_seq_port_callback_t pinfo;
+	struct snd_seq_port_callback pinfo;
 	char tmpname[64];
 
 	sprintf(tmpname, "%s WaveTable", emu->name);
@@ -94,7 +94,7 @@ snd_emux_init_seq(snd_emux_t *emu, snd_card_t *card, int index)
 	pinfo.event_input = snd_emux_event_input;
 
 	for (i = 0; i < emu->num_ports; i++) {
-		snd_emux_port_t *p;
+		struct snd_emux_port *p;
 
 		sprintf(tmpname, "%s Port %d", emu->name, i);
 		p = snd_emux_create_port(emu, tmpname, MIDI_CHANNELS,
@@ -119,7 +119,7 @@ snd_emux_init_seq(snd_emux_t *emu, snd_card_t *card, int index)
  * destroy the kernel client.
  */
 void
-snd_emux_detach_seq(snd_emux_t *emu)
+snd_emux_detach_seq(struct snd_emux *emu)
 {
 	if (emu->voices)
 		snd_emux_terminate_all(emu);
@@ -137,12 +137,12 @@ snd_emux_detach_seq(snd_emux_t *emu)
  * create a sequencer port and channel_set
  */
 
-snd_emux_port_t *
-snd_emux_create_port(snd_emux_t *emu, char *name,
-			int max_channels, int oss_port,
-			snd_seq_port_callback_t *callback)
+struct snd_emux_port *
+snd_emux_create_port(struct snd_emux *emu, char *name,
+		     int max_channels, int oss_port,
+		     struct snd_seq_port_callback *callback)
 {
-	snd_emux_port_t *p;
+	struct snd_emux_port *p;
 	int i, type, cap;
 
 	/* Allocate structures for this channel */
@@ -150,7 +150,7 @@ snd_emux_create_port(snd_emux_t *emu, char *name,
 		snd_printk("no memory\n");
 		return NULL;
 	}
-	p->chset.channels = kcalloc(max_channels, sizeof(snd_midi_channel_t), GFP_KERNEL);
+	p->chset.channels = kcalloc(max_channels, sizeof(struct snd_midi_channel), GFP_KERNEL);
 	if (p->chset.channels == NULL) {
 		snd_printk("no memory\n");
 		kfree(p);
@@ -190,7 +190,7 @@ snd_emux_create_port(snd_emux_t *emu, char *name,
 static void
 free_port(void *private_data)
 {
-	snd_emux_port_t *p;
+	struct snd_emux_port *p;
 
 	p = private_data;
 	if (p) {
@@ -209,7 +209,7 @@ free_port(void *private_data)
  * initialize the port specific parameters
  */
 static void
-snd_emux_init_port(snd_emux_port_t *p)
+snd_emux_init_port(struct snd_emux_port *p)
 {
 	p->drum_flags = DEFAULT_DRUM_FLAGS;
 	p->volume_atten = 0;
@@ -222,7 +222,7 @@ snd_emux_init_port(snd_emux_port_t *p)
  * reset port
  */
 void
-snd_emux_reset_port(snd_emux_port_t *port)
+snd_emux_reset_port(struct snd_emux_port *port)
 {
 	int i;
 
@@ -241,7 +241,7 @@ snd_emux_reset_port(snd_emux_port_t *port)
 	port->ctrls[EMUX_MD_REALTIME_PAN] = 1;
 
 	for (i = 0; i < port->chset.max_channels; i++) {
-		snd_midi_channel_t *chan = port->chset.channels + i;
+		struct snd_midi_channel *chan = port->chset.channels + i;
 		chan->drum_channel = ((port->drum_flags >> i) & 1) ? 1 : 0;
 	}
 }
@@ -251,10 +251,10 @@ snd_emux_reset_port(snd_emux_port_t *port)
  * input sequencer event
  */
 int
-snd_emux_event_input(snd_seq_event_t *ev, int direct, void *private_data,
+snd_emux_event_input(struct snd_seq_event *ev, int direct, void *private_data,
 		     int atomic, int hop)
 {
-	snd_emux_port_t *port;
+	struct snd_emux_port *port;
 
 	port = private_data;
 	snd_assert(port != NULL && ev != NULL, return -EINVAL);
@@ -269,7 +269,7 @@ snd_emux_event_input(snd_seq_event_t *ev, int direct, void *private_data,
  * increment usage count
  */
 int
-snd_emux_inc_count(snd_emux_t *emu)
+snd_emux_inc_count(struct snd_emux *emu)
 {
 	emu->used++;
 	if (!try_module_get(emu->ops.owner))
@@ -288,7 +288,7 @@ snd_emux_inc_count(snd_emux_t *emu)
  * decrease usage count
  */
 void
-snd_emux_dec_count(snd_emux_t *emu)
+snd_emux_dec_count(struct snd_emux *emu)
 {
 	module_put(emu->card->module);
 	emu->used--;
@@ -302,10 +302,10 @@ snd_emux_dec_count(snd_emux_t *emu)
  * Routine that is called upon a first use of a particular port
  */
 static int
-snd_emux_use(void *private_data, snd_seq_port_subscribe_t *info)
+snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info)
 {
-	snd_emux_port_t *p;
-	snd_emux_t *emu;
+	struct snd_emux_port *p;
+	struct snd_emux *emu;
 
 	p = private_data;
 	snd_assert(p != NULL, return -EINVAL);
@@ -323,10 +323,10 @@ snd_emux_use(void *private_data, snd_seq_port_subscribe_t *info)
  * Routine that is called upon the last unuse() of a particular port.
  */
 static int
-snd_emux_unuse(void *private_data, snd_seq_port_subscribe_t *info)
+snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info)
 {
-	snd_emux_port_t *p;
-	snd_emux_t *emu;
+	struct snd_emux_port *p;
+	struct snd_emux *emu;
 
 	p = private_data;
 	snd_assert(p != NULL, return -EINVAL);
@@ -345,10 +345,10 @@ snd_emux_unuse(void *private_data, snd_seq_port_subscribe_t *info)
  * Create a sequencer client
  */
 static int
-get_client(snd_card_t *card, int index, char *name)
+get_client(struct snd_card *card, int index, char *name)
 {
-	snd_seq_client_callback_t callbacks;
-	snd_seq_client_info_t cinfo;
+	struct snd_seq_client_callback callbacks;
+	struct snd_seq_client_info cinfo;
 	int client;
 
 	memset(&callbacks, 0, sizeof(callbacks));
@@ -374,7 +374,7 @@ get_client(snd_card_t *card, int index, char *name)
 /*
  * attach virtual rawmidi devices
  */
-int snd_emux_init_virmidi(snd_emux_t *emu, snd_card_t *card)
+int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card)
 {
 	int i;
 
@@ -382,13 +382,13 @@ int snd_emux_init_virmidi(snd_emux_t *emu, snd_card_t *card)
 	if (emu->midi_ports <= 0)
 		return 0;
 
-	emu->vmidi = kcalloc(emu->midi_ports, sizeof(snd_rawmidi_t*), GFP_KERNEL);
+	emu->vmidi = kcalloc(emu->midi_ports, sizeof(struct snd_rawmidi *), GFP_KERNEL);
 	if (emu->vmidi == NULL)
 		return -ENOMEM;
 
 	for (i = 0; i < emu->midi_ports; i++) {
-		snd_rawmidi_t *rmidi;
-		snd_virmidi_dev_t *rdev;
+		struct snd_rawmidi *rmidi;
+		struct snd_virmidi_dev *rdev;
 		if (snd_virmidi_new(card, emu->midi_devidx + i, &rmidi) < 0)
 			goto __error;
 		rdev = rmidi->private_data;
@@ -411,7 +411,7 @@ __error:
 	return -ENOMEM;
 }
 
-int snd_emux_delete_virmidi(snd_emux_t *emu)
+int snd_emux_delete_virmidi(struct snd_emux *emu)
 {
 	int i;
 
diff --git a/sound/synth/emux/emux_synth.c b/sound/synth/emux/emux_synth.c
index bd71b73be65..c387a83a655 100644
--- a/sound/synth/emux/emux_synth.c
+++ b/sound/synth/emux/emux_synth.c
@@ -36,30 +36,34 @@
 #define LIMITVALUE(x, a, b) do { if ((x) < (a)) (x) = (a); else if ((x) > (b)) (x) = (b); } while (0)
 #define LIMITMAX(x, a) do {if ((x) > (a)) (x) = (a); } while (0)
 
-static int get_zone(snd_emux_t *emu, snd_emux_port_t *port, int *notep, int vel, snd_midi_channel_t *chan, snd_sf_zone_t **table);
-static int get_bank(snd_emux_port_t *port, snd_midi_channel_t *chan);
-static void terminate_note1(snd_emux_t *emu, int note, snd_midi_channel_t *chan, int free);
-static void exclusive_note_off(snd_emux_t *emu, snd_emux_port_t *port, int exclass);
-static void terminate_voice(snd_emux_t *emu, snd_emux_voice_t *vp, int free);
-static void update_voice(snd_emux_t *emu, snd_emux_voice_t *vp, int update);
-static void setup_voice(snd_emux_voice_t *vp);
-static int calc_pan(snd_emux_voice_t *vp);
-static int calc_volume(snd_emux_voice_t *vp);
-static int calc_pitch(snd_emux_voice_t *vp);
+static int get_zone(struct snd_emux *emu, struct snd_emux_port *port,
+		    int *notep, int vel, struct snd_midi_channel *chan,
+		    struct snd_sf_zone **table);
+static int get_bank(struct snd_emux_port *port, struct snd_midi_channel *chan);
+static void terminate_note1(struct snd_emux *emu, int note,
+			    struct snd_midi_channel *chan, int free);
+static void exclusive_note_off(struct snd_emux *emu, struct snd_emux_port *port,
+			       int exclass);
+static void terminate_voice(struct snd_emux *emu, struct snd_emux_voice *vp, int free);
+static void update_voice(struct snd_emux *emu, struct snd_emux_voice *vp, int update);
+static void setup_voice(struct snd_emux_voice *vp);
+static int calc_pan(struct snd_emux_voice *vp);
+static int calc_volume(struct snd_emux_voice *vp);
+static int calc_pitch(struct snd_emux_voice *vp);
 
 
 /*
  * Start a note.
  */
 void
-snd_emux_note_on(void *p, int note, int vel, snd_midi_channel_t *chan)
+snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
 {
-	snd_emux_t *emu;
+	struct snd_emux *emu;
 	int i, key, nvoices;
-	snd_emux_voice_t *vp;
-	snd_sf_zone_t *table[SNDRV_EMUX_MAX_MULTI_VOICES];
+	struct snd_emux_voice *vp;
+	struct snd_sf_zone *table[SNDRV_EMUX_MAX_MULTI_VOICES];
 	unsigned long flags;
-	snd_emux_port_t *port;
+	struct snd_emux_port *port;
 
 	port = p;
 	snd_assert(port != NULL && chan != NULL, return);
@@ -76,7 +80,7 @@ snd_emux_note_on(void *p, int note, int vel, snd_midi_channel_t *chan)
 
 	/* exclusive note off */
 	for (i = 0; i < nvoices; i++) {
-		snd_sf_zone_t *zp = table[i];
+		struct snd_sf_zone *zp = table[i];
 		if (zp && zp->v.exclusiveClass)
 			exclusive_note_off(emu, port, zp->v.exclusiveClass);
 	}
@@ -138,7 +142,7 @@ snd_emux_note_on(void *p, int note, int vel, snd_midi_channel_t *chan)
 #ifdef SNDRV_EMUX_USE_RAW_EFFECT
 	if (port->port_mode == SNDRV_EMUX_PORT_MODE_OSS_SYNTH) {
 		/* clear voice position for the next note on this channel */
-		snd_emux_effect_table_t *fx = chan->private;
+		struct snd_emux_effect_table *fx = chan->private;
 		if (fx) {
 			fx->flag[EMUX_FX_SAMPLE_START] = 0;
 			fx->flag[EMUX_FX_COARSE_SAMPLE_START] = 0;
@@ -151,13 +155,13 @@ snd_emux_note_on(void *p, int note, int vel, snd_midi_channel_t *chan)
  * Release a note in response to a midi note off.
  */
 void
-snd_emux_note_off(void *p, int note, int vel, snd_midi_channel_t *chan)
+snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan)
 {
 	int ch;
-	snd_emux_t *emu;
-	snd_emux_voice_t *vp;
+	struct snd_emux *emu;
+	struct snd_emux_voice *vp;
 	unsigned long flags;
-	snd_emux_port_t *port;
+	struct snd_emux_port *port;
 
 	port = p;
 	snd_assert(port != NULL && chan != NULL, return);
@@ -199,8 +203,8 @@ snd_emux_note_off(void *p, int note, int vel, snd_midi_channel_t *chan)
  */
 void snd_emux_timer_callback(unsigned long data)
 {
-	snd_emux_t *emu = (snd_emux_t*) data;
-	snd_emux_voice_t *vp;
+	struct snd_emux *emu = (struct snd_emux *) data;
+	struct snd_emux_voice *vp;
 	int ch, do_again = 0;
 
 	spin_lock(&emu->voice_lock);
@@ -228,13 +232,13 @@ void snd_emux_timer_callback(unsigned long data)
  * key pressure change
  */
 void
-snd_emux_key_press(void *p, int note, int vel, snd_midi_channel_t *chan)
+snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan)
 {
 	int ch;
-	snd_emux_t *emu;
-	snd_emux_voice_t *vp;
+	struct snd_emux *emu;
+	struct snd_emux_voice *vp;
 	unsigned long flags;
-	snd_emux_port_t *port;
+	struct snd_emux_port *port;
 
 	port = p;
 	snd_assert(port != NULL && chan != NULL, return);
@@ -260,10 +264,10 @@ snd_emux_key_press(void *p, int note, int vel, snd_midi_channel_t *chan)
  * Modulate the voices which belong to the channel
  */
 void
-snd_emux_update_channel(snd_emux_port_t *port, snd_midi_channel_t *chan, int update)
+snd_emux_update_channel(struct snd_emux_port *port, struct snd_midi_channel *chan, int update)
 {
-	snd_emux_t *emu;
-	snd_emux_voice_t *vp;
+	struct snd_emux *emu;
+	struct snd_emux_voice *vp;
 	int i;
 	unsigned long flags;
 
@@ -287,10 +291,10 @@ snd_emux_update_channel(snd_emux_port_t *port, snd_midi_channel_t *chan, int upd
  * Modulate all the voices which belong to the port.
  */
 void
-snd_emux_update_port(snd_emux_port_t *port, int update)
+snd_emux_update_port(struct snd_emux_port *port, int update)
 {
-	snd_emux_t *emu; 
-	snd_emux_voice_t *vp;
+	struct snd_emux *emu; 
+	struct snd_emux_voice *vp;
 	int i;
 	unsigned long flags;
 
@@ -316,9 +320,9 @@ snd_emux_update_port(snd_emux_port_t *port, int update)
  * control events, not just the midi controllers
  */
 void
-snd_emux_control(void *p, int type, snd_midi_channel_t *chan)
+snd_emux_control(void *p, int type, struct snd_midi_channel *chan)
 {
-	snd_emux_port_t *port;
+	struct snd_emux_port *port;
 
 	port = p;
 	snd_assert(port != NULL && chan != NULL, return);
@@ -364,10 +368,10 @@ snd_emux_control(void *p, int type, snd_midi_channel_t *chan)
  * terminate note - if free flag is true, free the terminated voice
  */
 static void
-terminate_note1(snd_emux_t *emu, int note, snd_midi_channel_t *chan, int free)
+terminate_note1(struct snd_emux *emu, int note, struct snd_midi_channel *chan, int free)
 {
 	int  i;
-	snd_emux_voice_t *vp;
+	struct snd_emux_voice *vp;
 	unsigned long flags;
 
 	spin_lock_irqsave(&emu->voice_lock, flags);
@@ -385,10 +389,10 @@ terminate_note1(snd_emux_t *emu, int note, snd_midi_channel_t *chan, int free)
  * terminate note - exported for midi emulation
  */
 void
-snd_emux_terminate_note(void *p, int note, snd_midi_channel_t *chan)
+snd_emux_terminate_note(void *p, int note, struct snd_midi_channel *chan)
 {
-	snd_emux_t *emu;
-	snd_emux_port_t *port;
+	struct snd_emux *emu;
+	struct snd_emux_port *port;
 
 	port = p;
 	snd_assert(port != NULL && chan != NULL, return);
@@ -405,10 +409,10 @@ snd_emux_terminate_note(void *p, int note, snd_midi_channel_t *chan)
  * Terminate all the notes
  */
 void
-snd_emux_terminate_all(snd_emux_t *emu)
+snd_emux_terminate_all(struct snd_emux *emu)
 {
 	int i;
-	snd_emux_voice_t *vp;
+	struct snd_emux_voice *vp;
 	unsigned long flags;
 
 	spin_lock_irqsave(&emu->voice_lock, flags);
@@ -434,11 +438,11 @@ snd_emux_terminate_all(snd_emux_t *emu)
  * Terminate all voices associated with the given port
  */
 void
-snd_emux_sounds_off_all(snd_emux_port_t *port)
+snd_emux_sounds_off_all(struct snd_emux_port *port)
 {
 	int i;
-	snd_emux_t *emu;
-	snd_emux_voice_t *vp;
+	struct snd_emux *emu;
+	struct snd_emux_voice *vp;
 	unsigned long flags;
 
 	snd_assert(port != NULL, return);
@@ -468,9 +472,9 @@ snd_emux_sounds_off_all(snd_emux_port_t *port)
  * is mainly for drums.
  */
 static void
-exclusive_note_off(snd_emux_t *emu, snd_emux_port_t *port, int exclass)
+exclusive_note_off(struct snd_emux *emu, struct snd_emux_port *port, int exclass)
 {
-	snd_emux_voice_t *vp;
+	struct snd_emux_voice *vp;
 	int  i;
 	unsigned long flags;
 
@@ -490,7 +494,7 @@ exclusive_note_off(snd_emux_t *emu, snd_emux_port_t *port, int exclass)
  * if free flag is true, call free_voice after termination
  */
 static void
-terminate_voice(snd_emux_t *emu, snd_emux_voice_t *vp, int free)
+terminate_voice(struct snd_emux *emu, struct snd_emux_voice *vp, int free)
 {
 	emu->ops.terminate(vp);
 	vp->time = emu->use_time++;
@@ -508,7 +512,7 @@ terminate_voice(snd_emux_t *emu, snd_emux_voice_t *vp, int free)
  * Modulate the voice
  */
 static void
-update_voice(snd_emux_t *emu, snd_emux_voice_t *vp, int update)
+update_voice(struct snd_emux *emu, struct snd_emux_voice *vp, int update)
 {
 	if (!STATE_IS_PLAYING(vp->state))
 		return;
@@ -543,9 +547,9 @@ static unsigned short voltarget[16] = {
  * will be needed later.
  */
 static void
-setup_voice(snd_emux_voice_t *vp)
+setup_voice(struct snd_emux_voice *vp)
 {
-	soundfont_voice_parm_t *parm;
+	struct soundfont_voice_parm *parm;
 	int pitch;
 
 	/* copy the original register values */
@@ -636,9 +640,9 @@ static unsigned char pan_volumes[256] = {
 };
 
 static int
-calc_pan(snd_emux_voice_t *vp)
+calc_pan(struct snd_emux_voice *vp)
 {
-	snd_midi_channel_t *chan = vp->chan;
+	struct snd_midi_channel *chan = vp->chan;
 	int pan;
 
 	/* pan & loop start (pan 8bit, MSB, 0:right, 0xff:left) */
@@ -737,12 +741,12 @@ static unsigned char expressiontab[128] = {
  * voice and channels parameters.
  */
 static int
-calc_volume(snd_emux_voice_t *vp)
+calc_volume(struct snd_emux_voice *vp)
 {
 	int vol;
 	int main_vol, expression_vol, master_vol;
-	snd_midi_channel_t *chan = vp->chan;
-	snd_emux_port_t *port = vp->port;
+	struct snd_midi_channel *chan = vp->chan;
+	struct snd_emux_port *port = vp->port;
 
 	expression_vol = chan->control[MIDI_CTL_MSB_EXPRESSION];
 	LIMITMAX(vp->velocity, 127);
@@ -775,7 +779,7 @@ calc_volume(snd_emux_voice_t *vp)
 
 #ifdef SNDRV_EMUX_USE_RAW_EFFECT
 	if (chan->private) {
-		snd_emux_effect_table_t *fx = chan->private;
+		struct snd_emux_effect_table *fx = chan->private;
 		vol += fx->val[EMUX_FX_ATTEN];
 	}
 #endif
@@ -808,9 +812,9 @@ calc_volume(snd_emux_voice_t *vp)
  */
 
 static int
-calc_pitch(snd_emux_voice_t *vp)
+calc_pitch(struct snd_emux_voice *vp)
 {
-	snd_midi_channel_t *chan = vp->chan;
+	struct snd_midi_channel *chan = vp->chan;
 	int offset;
 
 	/* calculate offset */
@@ -837,7 +841,7 @@ calc_pitch(snd_emux_voice_t *vp)
 #ifdef SNDRV_EMUX_USE_RAW_EFFECT
 	/* add initial pitch correction */
 	if (chan->private) {
-		snd_emux_effect_table_t *fx = chan->private;
+		struct snd_emux_effect_table *fx = chan->private;
 		if (fx->flag[EMUX_FX_INIT_PITCH])
 			offset += fx->val[EMUX_FX_INIT_PITCH];
 	}
@@ -857,7 +861,7 @@ calc_pitch(snd_emux_voice_t *vp)
  * Get the bank number assigned to the channel
  */
 static int
-get_bank(snd_emux_port_t *port, snd_midi_channel_t *chan)
+get_bank(struct snd_emux_port *port, struct snd_midi_channel *chan)
 {
 	int val;
 
@@ -886,8 +890,9 @@ get_bank(snd_emux_port_t *port, snd_midi_channel_t *chan)
  * The resultant zones are stored on table.
  */
 static int
-get_zone(snd_emux_t *emu, snd_emux_port_t *port,
-	 int *notep, int vel, snd_midi_channel_t *chan, snd_sf_zone_t **table)
+get_zone(struct snd_emux *emu, struct snd_emux_port *port,
+	 int *notep, int vel, struct snd_midi_channel *chan,
+	 struct snd_sf_zone **table)
 {
 	int preset, bank, def_preset, def_bank;
 
@@ -910,9 +915,9 @@ get_zone(snd_emux_t *emu, snd_emux_port_t *port,
 /*
  */
 void
-snd_emux_init_voices(snd_emux_t *emu)
+snd_emux_init_voices(struct snd_emux *emu)
 {
-	snd_emux_voice_t *vp;
+	struct snd_emux_voice *vp;
 	int i;
 	unsigned long flags;
 
@@ -932,7 +937,7 @@ snd_emux_init_voices(snd_emux_t *emu)
 
 /*
  */
-void snd_emux_lock_voice(snd_emux_t *emu, int voice)
+void snd_emux_lock_voice(struct snd_emux *emu, int voice)
 {
 	unsigned long flags;
 
@@ -947,7 +952,7 @@ void snd_emux_lock_voice(snd_emux_t *emu, int voice)
 
 /*
  */
-void snd_emux_unlock_voice(snd_emux_t *emu, int voice)
+void snd_emux_unlock_voice(struct snd_emux *emu, int voice)
 {
 	unsigned long flags;
 
diff --git a/sound/synth/emux/emux_voice.h b/sound/synth/emux/emux_voice.h
index 67eb55348cd..0a56ca18b16 100644
--- a/sound/synth/emux/emux_voice.h
+++ b/sound/synth/emux/emux_voice.h
@@ -29,60 +29,69 @@
 #include <sound/emux_synth.h>
 
 /* Prototypes for emux_seq.c */
-int snd_emux_init_seq(snd_emux_t *emu, snd_card_t *card, int index);
-void snd_emux_detach_seq(snd_emux_t *emu);
-snd_emux_port_t *snd_emux_create_port(snd_emux_t *emu, char *name, int max_channels, int type, snd_seq_port_callback_t *callback);
-void snd_emux_reset_port(snd_emux_port_t *port);
-int snd_emux_event_input(snd_seq_event_t *ev, int direct, void *private, int atomic, int hop);
-int snd_emux_inc_count(snd_emux_t *emu);
-void snd_emux_dec_count(snd_emux_t *emu);
-int snd_emux_init_virmidi(snd_emux_t *emu, snd_card_t *card);
-int snd_emux_delete_virmidi(snd_emux_t *emu);
+int snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index);
+void snd_emux_detach_seq(struct snd_emux *emu);
+struct snd_emux_port *snd_emux_create_port(struct snd_emux *emu, char *name,
+					   int max_channels, int type,
+					   struct snd_seq_port_callback *callback);
+void snd_emux_reset_port(struct snd_emux_port *port);
+int snd_emux_event_input(struct snd_seq_event *ev, int direct, void *private,
+			 int atomic, int hop);
+int snd_emux_inc_count(struct snd_emux *emu);
+void snd_emux_dec_count(struct snd_emux *emu);
+int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card);
+int snd_emux_delete_virmidi(struct snd_emux *emu);
 
 /* Prototypes for emux_synth.c */
-void snd_emux_init_voices(snd_emux_t *emu);
+void snd_emux_init_voices(struct snd_emux *emu);
 
 void snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
 void snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
 void snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan);
-void snd_emux_terminate_note(void *p, int note, snd_midi_channel_t *chan);
+void snd_emux_terminate_note(void *p, int note, struct snd_midi_channel *chan);
 void snd_emux_control(void *p, int type, struct snd_midi_channel *chan);
 
-void snd_emux_sounds_off_all(snd_emux_port_t *port);
-void snd_emux_update_channel(snd_emux_port_t *port, snd_midi_channel_t *chan, int update);
-void snd_emux_update_port(snd_emux_port_t *port, int update);
+void snd_emux_sounds_off_all(struct snd_emux_port *port);
+void snd_emux_update_channel(struct snd_emux_port *port,
+			     struct snd_midi_channel *chan, int update);
+void snd_emux_update_port(struct snd_emux_port *port, int update);
 
 void snd_emux_timer_callback(unsigned long data);
 
 /* emux_effect.c */
 #ifdef SNDRV_EMUX_USE_RAW_EFFECT
-void snd_emux_create_effect(snd_emux_port_t *p);
-void snd_emux_delete_effect(snd_emux_port_t *p);
-void snd_emux_clear_effect(snd_emux_port_t *p);
-void snd_emux_setup_effect(snd_emux_voice_t *vp);
-void snd_emux_send_effect_oss(snd_emux_port_t *port, snd_midi_channel_t *chan, int type, int val);
-void snd_emux_send_effect(snd_emux_port_t *port, snd_midi_channel_t *chan, int type, int val, int mode);
+void snd_emux_create_effect(struct snd_emux_port *p);
+void snd_emux_delete_effect(struct snd_emux_port *p);
+void snd_emux_clear_effect(struct snd_emux_port *p);
+void snd_emux_setup_effect(struct snd_emux_voice *vp);
+void snd_emux_send_effect_oss(struct snd_emux_port *port,
+			      struct snd_midi_channel *chan, int type, int val);
+void snd_emux_send_effect(struct snd_emux_port *port,
+			  struct snd_midi_channel *chan, int type, int val, int mode);
 #endif
 
 /* emux_nrpn.c */
-void snd_emux_sysex(void *private_data, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset);
-int snd_emux_xg_control(snd_emux_port_t *port, snd_midi_channel_t *chan, int param);
-void snd_emux_nrpn(void *private_data, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset);
+void snd_emux_sysex(void *private_data, unsigned char *buf, int len,
+		    int parsed, struct snd_midi_channel_set *chset);
+int snd_emux_xg_control(struct snd_emux_port *port,
+			struct snd_midi_channel *chan, int param);
+void snd_emux_nrpn(void *private_data, struct snd_midi_channel *chan,
+		   struct snd_midi_channel_set *chset);
 
 /* emux_oss.c */
-void snd_emux_init_seq_oss(snd_emux_t *emu);
-void snd_emux_detach_seq_oss(snd_emux_t *emu);
+void snd_emux_init_seq_oss(struct snd_emux *emu);
+void snd_emux_detach_seq_oss(struct snd_emux *emu);
 
 /* emux_proc.c */
 #ifdef CONFIG_PROC_FS
-void snd_emux_proc_init(snd_emux_t *emu, snd_card_t *card, int device);
-void snd_emux_proc_free(snd_emux_t *emu);
+void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device);
+void snd_emux_proc_free(struct snd_emux *emu);
 #endif
 
 #define STATE_IS_PLAYING(s) ((s) & SNDRV_EMUX_ST_ON)
 
 /* emux_hwdep.c */
-int snd_emux_init_hwdep(snd_emux_t *emu);
-void snd_emux_delete_hwdep(snd_emux_t *emu);
+int snd_emux_init_hwdep(struct snd_emux *emu);
+void snd_emux_delete_hwdep(struct snd_emux *emu);
 
 #endif
diff --git a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c
index d0925ea5083..4c5754d4a2e 100644
--- a/sound/synth/emux/soundfont.c
+++ b/sound/synth/emux/soundfont.c
@@ -34,38 +34,49 @@
 
 /* Prototypes for static functions */
 
-static int open_patch(snd_sf_list_t *sflist, const char __user *data, int count, int client);
-static snd_soundfont_t *newsf(snd_sf_list_t *sflist, int type, char *name);
-static int is_identical_font(snd_soundfont_t *sf, int type, unsigned char *name);
-static int close_patch(snd_sf_list_t *sflist);
-static int probe_data(snd_sf_list_t *sflist, int sample_id);
-static void set_zone_counter(snd_sf_list_t *sflist, snd_soundfont_t *sf, snd_sf_zone_t *zp);
-static snd_sf_zone_t *sf_zone_new(snd_sf_list_t *sflist, snd_soundfont_t *sf);
-static void set_sample_counter(snd_sf_list_t *sflist, snd_soundfont_t *sf, snd_sf_sample_t *sp);
-static snd_sf_sample_t *sf_sample_new(snd_sf_list_t *sflist, snd_soundfont_t *sf);
-static void sf_sample_delete(snd_sf_list_t *sflist, snd_soundfont_t *sf, snd_sf_sample_t *sp);
-static int load_map(snd_sf_list_t *sflist, const void __user *data, int count);
-static int load_info(snd_sf_list_t *sflist, const void __user *data, long count);
-static int remove_info(snd_sf_list_t *sflist, snd_soundfont_t *sf, int bank, int instr);
-static void init_voice_info(soundfont_voice_info_t *avp);
-static void init_voice_parm(soundfont_voice_parm_t *pp);
-static snd_sf_sample_t *set_sample(snd_soundfont_t *sf, soundfont_voice_info_t *avp);
-static snd_sf_sample_t *find_sample(snd_soundfont_t *sf, int sample_id);
-static int load_data(snd_sf_list_t *sflist, const void __user *data, long count);
-static void rebuild_presets(snd_sf_list_t *sflist);
-static void add_preset(snd_sf_list_t *sflist, snd_sf_zone_t *cur);
-static void delete_preset(snd_sf_list_t *sflist, snd_sf_zone_t *zp);
-static snd_sf_zone_t *search_first_zone(snd_sf_list_t *sflist, int bank, int preset, int key);
-static int search_zones(snd_sf_list_t *sflist, int *notep, int vel, int preset, int bank, snd_sf_zone_t **table, int max_layers, int level);
+static int open_patch(struct snd_sf_list *sflist, const char __user *data,
+		      int count, int client);
+static struct snd_soundfont *newsf(struct snd_sf_list *sflist, int type, char *name);
+static int is_identical_font(struct snd_soundfont *sf, int type, unsigned char *name);
+static int close_patch(struct snd_sf_list *sflist);
+static int probe_data(struct snd_sf_list *sflist, int sample_id);
+static void set_zone_counter(struct snd_sf_list *sflist,
+			     struct snd_soundfont *sf, struct snd_sf_zone *zp);
+static struct snd_sf_zone *sf_zone_new(struct snd_sf_list *sflist,
+				       struct snd_soundfont *sf);
+static void set_sample_counter(struct snd_sf_list *sflist,
+			       struct snd_soundfont *sf, struct snd_sf_sample *sp);
+static struct snd_sf_sample *sf_sample_new(struct snd_sf_list *sflist,
+					   struct snd_soundfont *sf);
+static void sf_sample_delete(struct snd_sf_list *sflist,
+			     struct snd_soundfont *sf, struct snd_sf_sample *sp);
+static int load_map(struct snd_sf_list *sflist, const void __user *data, int count);
+static int load_info(struct snd_sf_list *sflist, const void __user *data, long count);
+static int remove_info(struct snd_sf_list *sflist, struct snd_soundfont *sf,
+		       int bank, int instr);
+static void init_voice_info(struct soundfont_voice_info *avp);
+static void init_voice_parm(struct soundfont_voice_parm *pp);
+static struct snd_sf_sample *set_sample(struct snd_soundfont *sf,
+					struct soundfont_voice_info *avp);
+static struct snd_sf_sample *find_sample(struct snd_soundfont *sf, int sample_id);
+static int load_data(struct snd_sf_list *sflist, const void __user *data, long count);
+static void rebuild_presets(struct snd_sf_list *sflist);
+static void add_preset(struct snd_sf_list *sflist, struct snd_sf_zone *cur);
+static void delete_preset(struct snd_sf_list *sflist, struct snd_sf_zone *zp);
+static struct snd_sf_zone *search_first_zone(struct snd_sf_list *sflist,
+					     int bank, int preset, int key);
+static int search_zones(struct snd_sf_list *sflist, int *notep, int vel,
+			int preset, int bank, struct snd_sf_zone **table,
+			int max_layers, int level);
 static int get_index(int bank, int instr, int key);
-static void snd_sf_init(snd_sf_list_t *sflist);
-static void snd_sf_clear(snd_sf_list_t *sflist);
+static void snd_sf_init(struct snd_sf_list *sflist);
+static void snd_sf_clear(struct snd_sf_list *sflist);
 
 /*
  * lock access to sflist
  */
 static void
-lock_preset(snd_sf_list_t *sflist)
+lock_preset(struct snd_sf_list *sflist)
 {
 	unsigned long flags;
 	down(&sflist->presets_mutex);
@@ -79,7 +90,7 @@ lock_preset(snd_sf_list_t *sflist)
  * remove lock
  */
 static void
-unlock_preset(snd_sf_list_t *sflist)
+unlock_preset(struct snd_sf_list *sflist)
 {
 	unsigned long flags;
 	spin_lock_irqsave(&sflist->lock, flags);
@@ -93,7 +104,7 @@ unlock_preset(snd_sf_list_t *sflist)
  * close the patch if the patch was opened by this client.
  */
 int
-snd_soundfont_close_check(snd_sf_list_t *sflist, int client)
+snd_soundfont_close_check(struct snd_sf_list *sflist, int client)
 {
 	unsigned long flags;
 	spin_lock_irqsave(&sflist->lock, flags);
@@ -115,9 +126,10 @@ snd_soundfont_close_check(snd_sf_list_t *sflist, int client)
  * it wants to do with it.
  */
 int
-snd_soundfont_load(snd_sf_list_t *sflist, const void __user *data, long count, int client)
+snd_soundfont_load(struct snd_sf_list *sflist, const void __user *data,
+		   long count, int client)
 {
-	soundfont_patch_info_t patch;
+	struct soundfont_patch_info patch;
 	unsigned long flags;
 	int  rc;
 
@@ -215,10 +227,11 @@ is_special_type(int type)
 
 /* open patch; create sf list */
 static int
-open_patch(snd_sf_list_t *sflist, const char __user *data, int count, int client)
+open_patch(struct snd_sf_list *sflist, const char __user *data,
+	   int count, int client)
 {
-	soundfont_open_parm_t parm;
-	snd_soundfont_t *sf;
+	struct soundfont_open_parm parm;
+	struct snd_soundfont *sf;
 	unsigned long flags;
 
 	spin_lock_irqsave(&sflist->lock, flags);
@@ -251,10 +264,10 @@ open_patch(snd_sf_list_t *sflist, const char __user *data, int count, int client
 /*
  * Allocate a new soundfont structure.
  */
-static snd_soundfont_t *
-newsf(snd_sf_list_t *sflist, int type, char *name)
+static struct snd_soundfont *
+newsf(struct snd_sf_list *sflist, int type, char *name)
 {
-	snd_soundfont_t *sf;
+	struct snd_soundfont *sf;
 
 	/* check the shared fonts */
 	if (type & SNDRV_SFNT_PAT_SHARED) {
@@ -287,7 +300,7 @@ newsf(snd_sf_list_t *sflist, int type, char *name)
 
 /* check if the given name matches to the existing list */
 static int
-is_identical_font(snd_soundfont_t *sf, int type, unsigned char *name)
+is_identical_font(struct snd_soundfont *sf, int type, unsigned char *name)
 {
 	return ((sf->type & SNDRV_SFNT_PAT_SHARED) &&
 		(sf->type & 0x0f) == (type & 0x0f) &&
@@ -299,7 +312,7 @@ is_identical_font(snd_soundfont_t *sf, int type, unsigned char *name)
  * Close the current patch.
  */
 static int
-close_patch(snd_sf_list_t *sflist)
+close_patch(struct snd_sf_list *sflist)
 {
 	unsigned long flags;
 
@@ -316,7 +329,7 @@ close_patch(snd_sf_list_t *sflist)
 
 /* probe sample in the current list -- nothing to be loaded */
 static int
-probe_data(snd_sf_list_t *sflist, int sample_id)
+probe_data(struct snd_sf_list *sflist, int sample_id)
 {
 	/* patch must be opened */
 	if (sflist->currsf) {
@@ -331,7 +344,8 @@ probe_data(snd_sf_list_t *sflist, int sample_id)
  * increment zone counter
  */
 static void
-set_zone_counter(snd_sf_list_t *sflist, snd_soundfont_t *sf, snd_sf_zone_t *zp)
+set_zone_counter(struct snd_sf_list *sflist, struct snd_soundfont *sf,
+		 struct snd_sf_zone *zp)
 {
 	zp->counter = sflist->zone_counter++;
 	if (sf->type & SNDRV_SFNT_PAT_LOCKED)
@@ -341,10 +355,10 @@ set_zone_counter(snd_sf_list_t *sflist, snd_soundfont_t *sf, snd_sf_zone_t *zp)
 /*
  * allocate a new zone record
  */
-static snd_sf_zone_t *
-sf_zone_new(snd_sf_list_t *sflist, snd_soundfont_t *sf)
+static struct snd_sf_zone *
+sf_zone_new(struct snd_sf_list *sflist, struct snd_soundfont *sf)
 {
-	snd_sf_zone_t *zp;
+	struct snd_sf_zone *zp;
 
 	if ((zp = kzalloc(sizeof(*zp), GFP_KERNEL)) == NULL)
 		return NULL;
@@ -362,7 +376,8 @@ sf_zone_new(snd_sf_list_t *sflist, snd_soundfont_t *sf)
  * increment sample couter
  */
 static void
-set_sample_counter(snd_sf_list_t *sflist, snd_soundfont_t *sf, snd_sf_sample_t *sp)
+set_sample_counter(struct snd_sf_list *sflist, struct snd_soundfont *sf,
+		   struct snd_sf_sample *sp)
 {
 	sp->counter = sflist->sample_counter++;
 	if (sf->type & SNDRV_SFNT_PAT_LOCKED)
@@ -372,10 +387,10 @@ set_sample_counter(snd_sf_list_t *sflist, snd_soundfont_t *sf, snd_sf_sample_t *
 /*
  * allocate a new sample list record
  */
-static snd_sf_sample_t *
-sf_sample_new(snd_sf_list_t *sflist, snd_soundfont_t *sf)
+static struct snd_sf_sample *
+sf_sample_new(struct snd_sf_list *sflist, struct snd_soundfont *sf)
 {
-	snd_sf_sample_t *sp;
+	struct snd_sf_sample *sp;
 
 	if ((sp = kzalloc(sizeof(*sp), GFP_KERNEL)) == NULL)
 		return NULL;
@@ -392,7 +407,8 @@ sf_sample_new(snd_sf_list_t *sflist, snd_soundfont_t *sf)
  * only the last allocated sample can be deleted.
  */
 static void
-sf_sample_delete(snd_sf_list_t *sflist, snd_soundfont_t *sf, snd_sf_sample_t *sp)
+sf_sample_delete(struct snd_sf_list *sflist, struct snd_soundfont *sf,
+		 struct snd_sf_sample *sp)
 {
 	/* only last sample is accepted */
 	if (sp == sf->samples) {
@@ -404,11 +420,11 @@ sf_sample_delete(snd_sf_list_t *sflist, snd_soundfont_t *sf, snd_sf_sample_t *sp
 
 /* load voice map */
 static int
-load_map(snd_sf_list_t *sflist, const void __user *data, int count)
+load_map(struct snd_sf_list *sflist, const void __user *data, int count)
 {
-	snd_sf_zone_t *zp, *prevp;
-	snd_soundfont_t *sf;
-	soundfont_voice_map_t map;
+	struct snd_sf_zone *zp, *prevp;
+	struct snd_soundfont *sf;
+	struct soundfont_voice_map map;
 
 	/* get the link info */
 	if (count < (int)sizeof(map))
@@ -469,9 +485,10 @@ load_map(snd_sf_list_t *sflist, const void __user *data, int count)
 
 /* remove the present instrument layers */
 static int
-remove_info(snd_sf_list_t *sflist, snd_soundfont_t *sf, int bank, int instr)
+remove_info(struct snd_sf_list *sflist, struct snd_soundfont *sf,
+	    int bank, int instr)
 {
-	snd_sf_zone_t *prev, *next, *p;
+	struct snd_sf_zone *prev, *next, *p;
 	int removed = 0;
 
 	prev = NULL;
@@ -500,11 +517,11 @@ remove_info(snd_sf_list_t *sflist, snd_soundfont_t *sf, int bank, int instr)
  * open soundfont.
  */
 static int
-load_info(snd_sf_list_t *sflist, const void __user *data, long count)
+load_info(struct snd_sf_list *sflist, const void __user *data, long count)
 {
-	snd_soundfont_t *sf;
-	snd_sf_zone_t *zone;
-	soundfont_voice_rec_hdr_t hdr;
+	struct snd_soundfont *sf;
+	struct snd_sf_zone *zone;
+	struct soundfont_voice_rec_hdr hdr;
 	int i;
 
 	/* patch must be opened */
@@ -529,7 +546,7 @@ load_info(snd_sf_list_t *sflist, const void __user *data, long count)
 		return -EINVAL;
 	}
 
-	if (count < (long)sizeof(soundfont_voice_info_t)*hdr.nvoices) {
+	if (count < (long)sizeof(struct soundfont_voice_info) * hdr.nvoices) {
 		printk("Soundfont Error: patch length(%ld) is smaller than nvoices(%d)\n",
 		       count, hdr.nvoices);
 		return -EINVAL;
@@ -553,7 +570,7 @@ load_info(snd_sf_list_t *sflist, const void __user *data, long count)
 	}
 
 	for (i = 0; i < hdr.nvoices; i++) {
-		snd_sf_zone_t tmpzone;
+		struct snd_sf_zone tmpzone;
 
 		/* copy awe_voice_info parameters */
 		if (copy_from_user(&tmpzone.v, data, sizeof(tmpzone.v))) {
@@ -590,7 +607,7 @@ load_info(snd_sf_list_t *sflist, const void __user *data, long count)
 
 /* initialize voice_info record */
 static void
-init_voice_info(soundfont_voice_info_t *avp)
+init_voice_info(struct soundfont_voice_info *avp)
 {
 	memset(avp, 0, sizeof(*avp));
 
@@ -614,7 +631,7 @@ init_voice_info(soundfont_voice_info_t *avp)
  * Chorus and Reverb effects are zero.
  */
 static void
-init_voice_parm(soundfont_voice_parm_t *pp)
+init_voice_parm(struct soundfont_voice_parm *pp)
 {
 	memset(pp, 0, sizeof(*pp));
 
@@ -635,10 +652,10 @@ init_voice_parm(soundfont_voice_parm_t *pp)
 }	
 
 /* search the specified sample */
-static snd_sf_sample_t *
-set_sample(snd_soundfont_t *sf, soundfont_voice_info_t *avp)
+static struct snd_sf_sample *
+set_sample(struct snd_soundfont *sf, struct soundfont_voice_info *avp)
 {
-	snd_sf_sample_t *sample;
+	struct snd_sf_sample *sample;
 
 	sample = find_sample(sf, avp->sample);
 	if (sample == NULL)
@@ -661,10 +678,10 @@ set_sample(snd_soundfont_t *sf, soundfont_voice_info_t *avp)
 }
 
 /* find the sample pointer with the given id in the soundfont */
-static snd_sf_sample_t *
-find_sample(snd_soundfont_t *sf, int sample_id)
+static struct snd_sf_sample *
+find_sample(struct snd_soundfont *sf, int sample_id)
 {
-	snd_sf_sample_t *p;
+	struct snd_sf_sample *p;
 
 	if (sf == NULL)
 		return NULL;
@@ -684,11 +701,11 @@ find_sample(snd_soundfont_t *sf, int sample_id)
  * routine.
  */
 static int
-load_data(snd_sf_list_t *sflist, const void __user *data, long count)
+load_data(struct snd_sf_list *sflist, const void __user *data, long count)
 {
-	snd_soundfont_t *sf;
-	soundfont_sample_info_t sample_info;
-	snd_sf_sample_t *sp;
+	struct snd_soundfont *sf;
+	struct soundfont_sample_info sample_info;
+	struct snd_sf_sample *sp;
 	long off;
 
 	/* patch must be opened */
@@ -922,12 +939,13 @@ int snd_sf_vol_table[128] = {
 
 /* load GUS patch */
 static int
-load_guspatch(snd_sf_list_t *sflist, const char __user *data, long count, int client)
+load_guspatch(struct snd_sf_list *sflist, const char __user *data,
+	      long count, int client)
 {
 	struct patch_info patch;
-	snd_soundfont_t *sf;
-	snd_sf_zone_t *zone;
-	snd_sf_sample_t *smp;
+	struct snd_soundfont *sf;
+	struct snd_sf_zone *zone;
+	struct snd_sf_sample *smp;
 	int note, sample_id;
 	int rc;
 
@@ -992,7 +1010,8 @@ load_guspatch(snd_sf_list_t *sflist, const char __user *data, long count, int cl
 	 */
 	if (sflist->callback.sample_new) {
 		rc = sflist->callback.sample_new
-			(sflist->callback.private_data, smp, sflist->memhdr, data, count);
+			(sflist->callback.private_data, smp, sflist->memhdr,
+			 data, count);
 		if (rc < 0) {
 			sf_sample_delete(sflist, sf, smp);
 			return rc;
@@ -1095,7 +1114,7 @@ load_guspatch(snd_sf_list_t *sflist, const char __user *data, long count, int cl
 
 /* load GUS patch */
 int
-snd_soundfont_load_guspatch(snd_sf_list_t *sflist, const char __user *data,
+snd_soundfont_load_guspatch(struct snd_sf_list *sflist, const char __user *data,
 			    long count, int client)
 {
 	int rc;
@@ -1114,10 +1133,10 @@ snd_soundfont_load_guspatch(snd_sf_list_t *sflist, const char __user *data,
  * bank/key combination).
  */
 static void
-rebuild_presets(snd_sf_list_t *sflist)
+rebuild_presets(struct snd_sf_list *sflist)
 {
-	snd_soundfont_t *sf;
-	snd_sf_zone_t *cur;
+	struct snd_soundfont *sf;
+	struct snd_sf_zone *cur;
 
 	/* clear preset table */
 	memset(sflist->presets, 0, sizeof(sflist->presets));
@@ -1142,15 +1161,15 @@ rebuild_presets(snd_sf_list_t *sflist)
  * add the given zone to preset table
  */
 static void
-add_preset(snd_sf_list_t *sflist, snd_sf_zone_t *cur)
+add_preset(struct snd_sf_list *sflist, struct snd_sf_zone *cur)
 {
-	snd_sf_zone_t *zone;
+	struct snd_sf_zone *zone;
 	int index;
 
 	zone = search_first_zone(sflist, cur->bank, cur->instr, cur->v.low);
 	if (zone && zone->v.sf_id != cur->v.sf_id) {
 		/* different instrument was already defined */
-		snd_sf_zone_t *p;
+		struct snd_sf_zone *p;
 		/* compare the allocated time */
 		for (p = zone; p; p = p->next_zone) {
 			if (p->counter > cur->counter)
@@ -1174,10 +1193,10 @@ add_preset(snd_sf_list_t *sflist, snd_sf_zone_t *cur)
  * delete the given zones from preset_table
  */
 static void
-delete_preset(snd_sf_list_t *sflist, snd_sf_zone_t *zp)
+delete_preset(struct snd_sf_list *sflist, struct snd_sf_zone *zp)
 {
 	int index;
-	snd_sf_zone_t *p;
+	struct snd_sf_zone *p;
 
 	if ((index = get_index(zp->bank, zp->instr, zp->v.low)) < 0)
 		return;
@@ -1200,10 +1219,10 @@ delete_preset(snd_sf_list_t *sflist, snd_sf_zone_t *zp)
  * This function returns the number of found zones.  0 if not found.
  */
 int
-snd_soundfont_search_zone(snd_sf_list_t *sflist, int *notep, int vel,
+snd_soundfont_search_zone(struct snd_sf_list *sflist, int *notep, int vel,
 			  int preset, int bank,
 			  int def_preset, int def_bank,
-			  snd_sf_zone_t **table, int max_layers)
+			  struct snd_sf_zone **table, int max_layers)
 {
 	int nvoices;
 	unsigned long flags;
@@ -1217,10 +1236,13 @@ snd_soundfont_search_zone(snd_sf_list_t *sflist, int *notep, int vel,
 		spin_unlock_irqrestore(&sflist->lock, flags);
 		return 0;
 	}
-	nvoices = search_zones(sflist, notep, vel, preset, bank, table, max_layers, 0);
+	nvoices = search_zones(sflist, notep, vel, preset, bank,
+			       table, max_layers, 0);
 	if (! nvoices) {
 		if (preset != def_preset || bank != def_bank)
-			nvoices = search_zones(sflist, notep, vel, def_preset, def_bank, table, max_layers, 0);
+			nvoices = search_zones(sflist, notep, vel,
+					       def_preset, def_bank,
+					       table, max_layers, 0);
 	}
 	spin_unlock_irqrestore(&sflist->lock, flags);
 	return nvoices;
@@ -1230,11 +1252,11 @@ snd_soundfont_search_zone(snd_sf_list_t *sflist, int *notep, int vel,
 /*
  * search the first matching zone
  */
-static snd_sf_zone_t *
-search_first_zone(snd_sf_list_t *sflist, int bank, int preset, int key)
+static struct snd_sf_zone *
+search_first_zone(struct snd_sf_list *sflist, int bank, int preset, int key)
 {
 	int index;
-	snd_sf_zone_t *zp;
+	struct snd_sf_zone *zp;
 
 	if ((index = get_index(bank, preset, key)) < 0)
 		return NULL;
@@ -1250,9 +1272,11 @@ search_first_zone(snd_sf_list_t *sflist, int bank, int preset, int key)
  * search matching zones from sflist.  can be called recursively.
  */
 static int
-search_zones(snd_sf_list_t *sflist, int *notep, int vel, int preset, int bank, snd_sf_zone_t **table, int max_layers, int level)
+search_zones(struct snd_sf_list *sflist, int *notep, int vel,
+	     int preset, int bank, struct snd_sf_zone **table,
+	     int max_layers, int level)
 {
-	snd_sf_zone_t *zp;
+	struct snd_sf_zone *zp;
 	int nvoices;
 
 	zp = search_first_zone(sflist, bank, preset, *notep);
@@ -1310,7 +1334,7 @@ get_index(int bank, int instr, int key)
  * Initialise the sflist structure.
  */
 static void
-snd_sf_init(snd_sf_list_t *sflist)
+snd_sf_init(struct snd_sf_list *sflist)
 {
 	memset(sflist->presets, 0, sizeof(sflist->presets));
 
@@ -1329,11 +1353,11 @@ snd_sf_init(snd_sf_list_t *sflist)
  * Release all list records
  */
 static void
-snd_sf_clear(snd_sf_list_t *sflist)
+snd_sf_clear(struct snd_sf_list *sflist)
 {
-	snd_soundfont_t *sf, *nextsf;
-	snd_sf_zone_t *zp, *nextzp;
-	snd_sf_sample_t *sp, *nextsp;
+	struct snd_soundfont *sf, *nextsf;
+	struct snd_sf_zone *zp, *nextzp;
+	struct snd_sf_sample *sp, *nextsp;
 
 	for (sf = sflist->fonts; sf; sf = nextsf) {
 		nextsf = sf->next;
@@ -1344,7 +1368,8 @@ snd_sf_clear(snd_sf_list_t *sflist)
 		for (sp = sf->samples; sp; sp = nextsp) {
 			nextsp = sp->next;
 			if (sflist->callback.sample_free)
-				sflist->callback.sample_free(sflist->callback.private_data, sp, sflist->memhdr);
+				sflist->callback.sample_free(sflist->callback.private_data,
+							     sp, sflist->memhdr);
 			kfree(sp);
 		}
 		kfree(sf);
@@ -1357,10 +1382,10 @@ snd_sf_clear(snd_sf_list_t *sflist)
 /*
  * Create a new sflist structure
  */
-snd_sf_list_t *
-snd_sf_new(snd_sf_callback_t *callback, snd_util_memhdr_t *hdr)
+struct snd_sf_list *
+snd_sf_new(struct snd_sf_callback *callback, struct snd_util_memhdr *hdr)
 {
-	snd_sf_list_t *sflist;
+	struct snd_sf_list *sflist;
 
 	if ((sflist = kzalloc(sizeof(*sflist), GFP_KERNEL)) == NULL)
 		return NULL;
@@ -1381,7 +1406,7 @@ snd_sf_new(snd_sf_callback_t *callback, snd_util_memhdr_t *hdr)
  * Free everything allocated off the sflist structure.
  */
 void
-snd_sf_free(snd_sf_list_t *sflist)
+snd_sf_free(struct snd_sf_list *sflist)
 {
 	if (sflist == NULL)
 		return;
@@ -1400,7 +1425,7 @@ snd_sf_free(snd_sf_list_t *sflist)
  * The soundcard should be silet before calling this function.
  */
 int
-snd_soundfont_remove_samples(snd_sf_list_t *sflist)
+snd_soundfont_remove_samples(struct snd_sf_list *sflist)
 {
 	lock_preset(sflist);
 	if (sflist->callback.sample_reset)
@@ -1416,11 +1441,11 @@ snd_soundfont_remove_samples(snd_sf_list_t *sflist)
  * The soundcard should be silent before calling this function.
  */
 int
-snd_soundfont_remove_unlocked(snd_sf_list_t *sflist)
+snd_soundfont_remove_unlocked(struct snd_sf_list *sflist)
 {
-	snd_soundfont_t *sf;
-	snd_sf_zone_t *zp, *nextzp;
-	snd_sf_sample_t *sp, *nextsp;
+	struct snd_soundfont *sf;
+	struct snd_sf_zone *zp, *nextzp;
+	struct snd_sf_sample *sp, *nextsp;
 
 	lock_preset(sflist);
 
@@ -1446,7 +1471,8 @@ snd_soundfont_remove_unlocked(snd_sf_list_t *sflist)
 			sf->samples = nextsp;
 			sflist->mem_used -= sp->v.truesize;
 			if (sflist->callback.sample_free)
-				sflist->callback.sample_free(sflist->callback.private_data, sp, sflist->memhdr);
+				sflist->callback.sample_free(sflist->callback.private_data,
+							     sp, sflist->memhdr);
 			kfree(sp);
 		}
 	}
diff --git a/sound/synth/util_mem.c b/sound/synth/util_mem.c
index 5f75bf31bc3..217e8e552a4 100644
--- a/sound/synth/util_mem.c
+++ b/sound/synth/util_mem.c
@@ -28,15 +28,15 @@ MODULE_AUTHOR("Takashi Iwai");
 MODULE_DESCRIPTION("Generic memory management routines for soundcard memory allocation");
 MODULE_LICENSE("GPL");
 
-#define get_memblk(p)	list_entry(p, snd_util_memblk_t, list)
+#define get_memblk(p)	list_entry(p, struct snd_util_memblk, list)
 
 /*
  * create a new memory manager
  */
-snd_util_memhdr_t *
+struct snd_util_memhdr *
 snd_util_memhdr_new(int memsize)
 {
-	snd_util_memhdr_t *hdr;
+	struct snd_util_memhdr *hdr;
 
 	hdr = kzalloc(sizeof(*hdr), GFP_KERNEL);
 	if (hdr == NULL)
@@ -51,7 +51,7 @@ snd_util_memhdr_new(int memsize)
 /*
  * free a memory manager
  */
-void snd_util_memhdr_free(snd_util_memhdr_t *hdr)
+void snd_util_memhdr_free(struct snd_util_memhdr *hdr)
 {
 	struct list_head *p;
 
@@ -67,11 +67,11 @@ void snd_util_memhdr_free(snd_util_memhdr_t *hdr)
 /*
  * allocate a memory block (without mutex)
  */
-snd_util_memblk_t *
-__snd_util_mem_alloc(snd_util_memhdr_t *hdr, int size)
+struct snd_util_memblk *
+__snd_util_mem_alloc(struct snd_util_memhdr *hdr, int size)
 {
-	snd_util_memblk_t *blk;
-	snd_util_unit_t units, prev_offset;
+	struct snd_util_memblk *blk;
+	unsigned int units, prev_offset;
 	struct list_head *p;
 
 	snd_assert(hdr != NULL, return NULL);
@@ -104,20 +104,21 @@ __found:
  * create a new memory block with the given size
  * the block is linked next to prev
  */
-snd_util_memblk_t *
-__snd_util_memblk_new(snd_util_memhdr_t *hdr, snd_util_unit_t units,
+struct snd_util_memblk *
+__snd_util_memblk_new(struct snd_util_memhdr *hdr, unsigned int units,
 		      struct list_head *prev)
 {
-	snd_util_memblk_t *blk;
+	struct snd_util_memblk *blk;
 
-	blk = kmalloc(sizeof(snd_util_memblk_t) + hdr->block_extra_size, GFP_KERNEL);
+	blk = kmalloc(sizeof(struct snd_util_memblk) + hdr->block_extra_size,
+		      GFP_KERNEL);
 	if (blk == NULL)
 		return NULL;
 
 	if (! prev || prev == &hdr->block)
 		blk->offset = 0;
 	else {
-		snd_util_memblk_t *p = get_memblk(prev);
+		struct snd_util_memblk *p = get_memblk(prev);
 		blk->offset = p->offset + p->size;
 	}
 	blk->size = units;
@@ -131,10 +132,10 @@ __snd_util_memblk_new(snd_util_memhdr_t *hdr, snd_util_unit_t units,
 /*
  * allocate a memory block (with mutex)
  */
-snd_util_memblk_t *
-snd_util_mem_alloc(snd_util_memhdr_t *hdr, int size)
+struct snd_util_memblk *
+snd_util_mem_alloc(struct snd_util_memhdr *hdr, int size)
 {
-	snd_util_memblk_t *blk;
+	struct snd_util_memblk *blk;
 	down(&hdr->block_mutex);
 	blk = __snd_util_mem_alloc(hdr, size);
 	up(&hdr->block_mutex);
@@ -147,7 +148,7 @@ snd_util_mem_alloc(snd_util_memhdr_t *hdr, int size)
  * (without mutex)
  */
 void
-__snd_util_mem_free(snd_util_memhdr_t *hdr, snd_util_memblk_t *blk)
+__snd_util_mem_free(struct snd_util_memhdr *hdr, struct snd_util_memblk *blk)
 {
 	list_del(&blk->list);
 	hdr->nblocks--;
@@ -158,7 +159,7 @@ __snd_util_mem_free(snd_util_memhdr_t *hdr, snd_util_memblk_t *blk)
 /*
  * free a memory block (with mutex)
  */
-int snd_util_mem_free(snd_util_memhdr_t *hdr, snd_util_memblk_t *blk)
+int snd_util_mem_free(struct snd_util_memhdr *hdr, struct snd_util_memblk *blk)
 {
 	snd_assert(hdr && blk, return -EINVAL);
 
@@ -171,7 +172,7 @@ int snd_util_mem_free(snd_util_memhdr_t *hdr, snd_util_memblk_t *blk)
 /*
  * return available memory size
  */
-int snd_util_mem_avail(snd_util_memhdr_t *hdr)
+int snd_util_mem_avail(struct snd_util_memhdr *hdr)
 {
 	unsigned int size;
 	down(&hdr->block_mutex);
-- 
cgit v1.2.3-70-g09d2


From cbdd0dd15f06a989c519089bb24023a5bfa66eaf Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:28:35 +0100
Subject: [ALSA] Remove xxx_t typedefs: ISA AD1816A

Modules: AD1816A driver

Remove xxx_t typedefs from the ISA AD1816A driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/ad1816a.h         |  22 +++--
 sound/isa/ad1816a/ad1816a.c     |   8 +-
 sound/isa/ad1816a/ad1816a_lib.c | 176 ++++++++++++++++++++--------------------
 3 files changed, 102 insertions(+), 104 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/ad1816a.h b/include/sound/ad1816a.h
index ca2e0e4fa93..b3aa62ee3c8 100644
--- a/include/sound/ad1816a.h
+++ b/include/sound/ad1816a.h
@@ -123,9 +123,7 @@
 #define AD1816A_CAPTURE_NOT_EQUAL	0x1000
 #define AD1816A_WSS_ENABLE		0x8000
 
-typedef struct _snd_ad1816a ad1816a_t;
-
-struct _snd_ad1816a {
+struct snd_ad1816a {
 	unsigned long port;
 	struct resource *res_port;
 	int irq;
@@ -140,15 +138,15 @@ struct _snd_ad1816a {
 	unsigned short mode;
 	unsigned int clock_freq;
 
-	snd_card_t *card;
-	snd_pcm_t *pcm;
+	struct snd_card *card;
+	struct snd_pcm *pcm;
 
-	snd_pcm_substream_t *playback_substream;
-	snd_pcm_substream_t *capture_substream;
+	struct snd_pcm_substream *playback_substream;
+	struct snd_pcm_substream *capture_substream;
 	unsigned int p_dma_size;
 	unsigned int c_dma_size;
 
-	snd_timer_t *timer;
+	struct snd_timer *timer;
 };
 
 
@@ -165,11 +163,11 @@ struct _snd_ad1816a {
 				AD1816A_MODE_TIMER)
 
 
-extern int snd_ad1816a_create(snd_card_t *card, unsigned long port,
+extern int snd_ad1816a_create(struct snd_card *card, unsigned long port,
 			      int irq, int dma1, int dma2,
-			      ad1816a_t **chip);
+			      struct snd_ad1816a **chip);
 
-extern int snd_ad1816a_pcm(ad1816a_t *chip, int device, snd_pcm_t **rpcm);
-extern int snd_ad1816a_mixer(ad1816a_t *chip);
+extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm);
+extern int snd_ad1816a_mixer(struct snd_ad1816a *chip);
 
 #endif	/* __SOUND_AD1816A_H */
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
index 0eb442ca23d..543a4e284a4 100644
--- a/sound/isa/ad1816a/ad1816a.c
+++ b/sound/isa/ad1816a/ad1816a.c
@@ -188,10 +188,10 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard
 					    const struct pnp_card_device_id *pid)
 {
 	int error;
-	snd_card_t *card;
+	struct snd_card *card;
 	struct snd_card_ad1816a *acard;
-	ad1816a_t *chip;
-	opl3_t *opl3;
+	struct snd_ad1816a *chip;
+	struct snd_opl3 *opl3;
 
 	if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 				 sizeof(struct snd_card_ad1816a))) == NULL)
@@ -282,7 +282,7 @@ static int __devinit snd_ad1816a_pnp_detect(struct pnp_card_link *card,
 
 static void __devexit snd_ad1816a_pnp_remove(struct pnp_card_link * pcard)
 {
-	snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard);
+	struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
 
 	snd_card_disconnect(card);
 	snd_card_free_in_thread(card);
diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c
index 170409e26d0..89d11af3334 100644
--- a/sound/isa/ad1816a/ad1816a_lib.c
+++ b/sound/isa/ad1816a/ad1816a_lib.c
@@ -34,7 +34,7 @@ MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>");
 MODULE_DESCRIPTION("lowlevel code for Analog Devices AD1816A chip");
 MODULE_LICENSE("GPL");
 
-static inline int snd_ad1816a_busy_wait(ad1816a_t *chip)
+static inline int snd_ad1816a_busy_wait(struct snd_ad1816a *chip)
 {
 	int timeout;
 
@@ -46,34 +46,34 @@ static inline int snd_ad1816a_busy_wait(ad1816a_t *chip)
 	return -EBUSY;
 }
 
-static inline unsigned char snd_ad1816a_in(ad1816a_t *chip, unsigned char reg)
+static inline unsigned char snd_ad1816a_in(struct snd_ad1816a *chip, unsigned char reg)
 {
 	snd_ad1816a_busy_wait(chip);
 	return inb(AD1816A_REG(reg));
 }
 
-static inline void snd_ad1816a_out(ad1816a_t *chip, unsigned char reg,
+static inline void snd_ad1816a_out(struct snd_ad1816a *chip, unsigned char reg,
 			    unsigned char value)
 {
 	snd_ad1816a_busy_wait(chip);
 	outb(value, AD1816A_REG(reg));
 }
 
-static inline void snd_ad1816a_out_mask(ad1816a_t *chip, unsigned char reg,
+static inline void snd_ad1816a_out_mask(struct snd_ad1816a *chip, unsigned char reg,
 				 unsigned char mask, unsigned char value)
 {
 	snd_ad1816a_out(chip, reg,
 		(value & mask) | (snd_ad1816a_in(chip, reg) & ~mask));
 }
 
-static unsigned short snd_ad1816a_read(ad1816a_t *chip, unsigned char reg)
+static unsigned short snd_ad1816a_read(struct snd_ad1816a *chip, unsigned char reg)
 {
 	snd_ad1816a_out(chip, AD1816A_INDIR_ADDR, reg & 0x3f);
 	return snd_ad1816a_in(chip, AD1816A_INDIR_DATA_LOW) |
 		(snd_ad1816a_in(chip, AD1816A_INDIR_DATA_HIGH) << 8);
 }
 
-static void snd_ad1816a_write(ad1816a_t *chip, unsigned char reg,
+static void snd_ad1816a_write(struct snd_ad1816a *chip, unsigned char reg,
 			      unsigned short value)
 {
 	snd_ad1816a_out(chip, AD1816A_INDIR_ADDR, reg & 0x3f);
@@ -81,7 +81,7 @@ static void snd_ad1816a_write(ad1816a_t *chip, unsigned char reg,
 	snd_ad1816a_out(chip, AD1816A_INDIR_DATA_HIGH, (value >> 8) & 0xff);
 }
 
-static void snd_ad1816a_write_mask(ad1816a_t *chip, unsigned char reg,
+static void snd_ad1816a_write_mask(struct snd_ad1816a *chip, unsigned char reg,
 				   unsigned short mask, unsigned short value)
 {
 	snd_ad1816a_write(chip, reg,
@@ -89,7 +89,7 @@ static void snd_ad1816a_write_mask(ad1816a_t *chip, unsigned char reg,
 }
 
 
-static unsigned char snd_ad1816a_get_format(ad1816a_t *chip,
+static unsigned char snd_ad1816a_get_format(struct snd_ad1816a *chip,
 					    unsigned int format, int channels)
 {
 	unsigned char retval = AD1816A_FMT_LINEAR_8;
@@ -110,7 +110,7 @@ static unsigned char snd_ad1816a_get_format(ad1816a_t *chip,
 	return (channels > 1) ? (retval | AD1816A_FMT_STEREO) : retval;
 }
 
-static int snd_ad1816a_open(ad1816a_t *chip, unsigned int mode)
+static int snd_ad1816a_open(struct snd_ad1816a *chip, unsigned int mode)
 {
 	unsigned long flags;
 
@@ -146,7 +146,7 @@ static int snd_ad1816a_open(ad1816a_t *chip, unsigned int mode)
 	return 0;
 }
 
-static void snd_ad1816a_close(ad1816a_t *chip, unsigned int mode)
+static void snd_ad1816a_close(struct snd_ad1816a *chip, unsigned int mode)
 {
 	unsigned long flags;
 
@@ -178,7 +178,7 @@ static void snd_ad1816a_close(ad1816a_t *chip, unsigned int mode)
 }
 
 
-static int snd_ad1816a_trigger(ad1816a_t *chip, unsigned char what,
+static int snd_ad1816a_trigger(struct snd_ad1816a *chip, unsigned char what,
 			       int channel, int cmd)
 {
 	int error = 0;
@@ -204,36 +204,36 @@ static int snd_ad1816a_trigger(ad1816a_t *chip, unsigned char what,
 	return error;
 }
 
-static int snd_ad1816a_playback_trigger(snd_pcm_substream_t *substream, int cmd)
+static int snd_ad1816a_playback_trigger(struct snd_pcm_substream *substream, int cmd)
 {
-	ad1816a_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
 	return snd_ad1816a_trigger(chip, AD1816A_PLAYBACK_ENABLE,
 		SNDRV_PCM_STREAM_PLAYBACK, cmd);
 }
 
-static int snd_ad1816a_capture_trigger(snd_pcm_substream_t *substream, int cmd)
+static int snd_ad1816a_capture_trigger(struct snd_pcm_substream *substream, int cmd)
 {
-	ad1816a_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
 	return snd_ad1816a_trigger(chip, AD1816A_CAPTURE_ENABLE,
 		SNDRV_PCM_STREAM_CAPTURE, cmd);
 }
 
-static int snd_ad1816a_hw_params(snd_pcm_substream_t * substream,
-				 snd_pcm_hw_params_t * hw_params)
+static int snd_ad1816a_hw_params(struct snd_pcm_substream *substream,
+				 struct snd_pcm_hw_params *hw_params)
 {
 	return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
 }
 
-static int snd_ad1816a_hw_free(snd_pcm_substream_t * substream)
+static int snd_ad1816a_hw_free(struct snd_pcm_substream *substream)
 {
 	return snd_pcm_lib_free_pages(substream);
 }
 
-static int snd_ad1816a_playback_prepare(snd_pcm_substream_t *substream)
+static int snd_ad1816a_playback_prepare(struct snd_pcm_substream *substream)
 {
-	ad1816a_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
 	unsigned long flags;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned int size, rate;
 
 	spin_lock_irqsave(&chip->lock, flags);
@@ -261,11 +261,11 @@ static int snd_ad1816a_playback_prepare(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-static int snd_ad1816a_capture_prepare(snd_pcm_substream_t *substream)
+static int snd_ad1816a_capture_prepare(struct snd_pcm_substream *substream)
 {
-	ad1816a_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
 	unsigned long flags;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned int size, rate;
 
 	spin_lock_irqsave(&chip->lock, flags);
@@ -294,9 +294,9 @@ static int snd_ad1816a_capture_prepare(snd_pcm_substream_t *substream)
 }
 
 
-static snd_pcm_uframes_t snd_ad1816a_playback_pointer(snd_pcm_substream_t *substream)
+static snd_pcm_uframes_t snd_ad1816a_playback_pointer(struct snd_pcm_substream *substream)
 {
-	ad1816a_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
 	size_t ptr;
 	if (!(chip->mode & AD1816A_MODE_PLAYBACK))
 		return 0;
@@ -304,9 +304,9 @@ static snd_pcm_uframes_t snd_ad1816a_playback_pointer(snd_pcm_substream_t *subst
 	return bytes_to_frames(substream->runtime, ptr);
 }
 
-static snd_pcm_uframes_t snd_ad1816a_capture_pointer(snd_pcm_substream_t *substream)
+static snd_pcm_uframes_t snd_ad1816a_capture_pointer(struct snd_pcm_substream *substream)
 {
-	ad1816a_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
 	size_t ptr;
 	if (!(chip->mode & AD1816A_MODE_CAPTURE))
 		return 0;
@@ -317,7 +317,7 @@ static snd_pcm_uframes_t snd_ad1816a_capture_pointer(snd_pcm_substream_t *substr
 
 static irqreturn_t snd_ad1816a_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	ad1816a_t *chip = dev_id;
+	struct snd_ad1816a *chip = dev_id;
 	unsigned char status;
 
 	spin_lock(&chip->lock);
@@ -340,7 +340,7 @@ static irqreturn_t snd_ad1816a_interrupt(int irq, void *dev_id, struct pt_regs *
 }
 
 
-static snd_pcm_hardware_t snd_ad1816a_playback = {
+static struct snd_pcm_hardware snd_ad1816a_playback = {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
 	.formats =		(SNDRV_PCM_FMTBIT_MU_LAW | SNDRV_PCM_FMTBIT_A_LAW |
@@ -359,7 +359,7 @@ static snd_pcm_hardware_t snd_ad1816a_playback = {
 	.fifo_size =		0,
 };
 
-static snd_pcm_hardware_t snd_ad1816a_capture = {
+static struct snd_pcm_hardware snd_ad1816a_capture = {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
 	.formats =		(SNDRV_PCM_FMTBIT_MU_LAW | SNDRV_PCM_FMTBIT_A_LAW |
@@ -379,32 +379,32 @@ static snd_pcm_hardware_t snd_ad1816a_capture = {
 };
 
 #if 0 /* not used now */
-static int snd_ad1816a_timer_close(snd_timer_t *timer)
+static int snd_ad1816a_timer_close(struct snd_timer *timer)
 {
-	ad1816a_t *chip = snd_timer_chip(timer);
+	struct snd_ad1816a *chip = snd_timer_chip(timer);
 	snd_ad1816a_close(chip, AD1816A_MODE_TIMER);
 	return 0;
 }
 
-static int snd_ad1816a_timer_open(snd_timer_t *timer)
+static int snd_ad1816a_timer_open(struct snd_timer *timer)
 {
-	ad1816a_t *chip = snd_timer_chip(timer);
+	struct snd_ad1816a *chip = snd_timer_chip(timer);
 	snd_ad1816a_open(chip, AD1816A_MODE_TIMER);
 	return 0;
 }
 
-static unsigned long snd_ad1816a_timer_resolution(snd_timer_t *timer)
+static unsigned long snd_ad1816a_timer_resolution(struct snd_timer *timer)
 {
 	snd_assert(timer != NULL, return 0);
 
 	return 10000;
 }
 
-static int snd_ad1816a_timer_start(snd_timer_t *timer)
+static int snd_ad1816a_timer_start(struct snd_timer *timer)
 {
 	unsigned short bits;
 	unsigned long flags;
-	ad1816a_t *chip = snd_timer_chip(timer);
+	struct snd_ad1816a *chip = snd_timer_chip(timer);
 	spin_lock_irqsave(&chip->lock, flags);
 	bits = snd_ad1816a_read(chip, AD1816A_INTERRUPT_ENABLE);
 
@@ -419,10 +419,10 @@ static int snd_ad1816a_timer_start(snd_timer_t *timer)
 	return 0;
 }
 
-static int snd_ad1816a_timer_stop(snd_timer_t *timer)
+static int snd_ad1816a_timer_stop(struct snd_timer *timer)
 {
 	unsigned long flags;
-	ad1816a_t *chip = snd_timer_chip(timer);
+	struct snd_ad1816a *chip = snd_timer_chip(timer);
 	spin_lock_irqsave(&chip->lock, flags);
 
 	snd_ad1816a_write_mask(chip, AD1816A_INTERRUPT_ENABLE,
@@ -432,7 +432,7 @@ static int snd_ad1816a_timer_stop(snd_timer_t *timer)
 	return 0;
 }
 
-static struct _snd_timer_hardware snd_ad1816a_timer_table = {
+static struct snd_timer_hardware snd_ad1816a_timer_table = {
 	.flags =	SNDRV_TIMER_HW_AUTO,
 	.resolution =	10000,
 	.ticks =	65535,
@@ -445,10 +445,10 @@ static struct _snd_timer_hardware snd_ad1816a_timer_table = {
 #endif /* not used now */
 
 
-static int snd_ad1816a_playback_open(snd_pcm_substream_t *substream)
+static int snd_ad1816a_playback_open(struct snd_pcm_substream *substream)
 {
-	ad1816a_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int error;
 
 	if ((error = snd_ad1816a_open(chip, AD1816A_MODE_PLAYBACK)) < 0)
@@ -461,10 +461,10 @@ static int snd_ad1816a_playback_open(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-static int snd_ad1816a_capture_open(snd_pcm_substream_t *substream)
+static int snd_ad1816a_capture_open(struct snd_pcm_substream *substream)
 {
-	ad1816a_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int error;
 
 	if ((error = snd_ad1816a_open(chip, AD1816A_MODE_CAPTURE)) < 0)
@@ -477,18 +477,18 @@ static int snd_ad1816a_capture_open(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-static int snd_ad1816a_playback_close(snd_pcm_substream_t *substream)
+static int snd_ad1816a_playback_close(struct snd_pcm_substream *substream)
 {
-	ad1816a_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
 
 	chip->playback_substream = NULL;
 	snd_ad1816a_close(chip, AD1816A_MODE_PLAYBACK);
 	return 0;
 }
 
-static int snd_ad1816a_capture_close(snd_pcm_substream_t *substream)
+static int snd_ad1816a_capture_close(struct snd_pcm_substream *substream)
 {
-	ad1816a_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
 
 	chip->capture_substream = NULL;
 	snd_ad1816a_close(chip, AD1816A_MODE_CAPTURE);
@@ -496,7 +496,7 @@ static int snd_ad1816a_capture_close(snd_pcm_substream_t *substream)
 }
 
 
-static void snd_ad1816a_init(ad1816a_t *chip)
+static void snd_ad1816a_init(struct snd_ad1816a *chip)
 {
 	unsigned long flags;
 
@@ -516,7 +516,7 @@ static void snd_ad1816a_init(ad1816a_t *chip)
 	spin_unlock_irqrestore(&chip->lock, flags);
 }
 
-static int snd_ad1816a_probe(ad1816a_t *chip)
+static int snd_ad1816a_probe(struct snd_ad1816a *chip)
 {
 	unsigned long flags;
 
@@ -540,7 +540,7 @@ static int snd_ad1816a_probe(ad1816a_t *chip)
 	return 0;
 }
 
-static int snd_ad1816a_free(ad1816a_t *chip)
+static int snd_ad1816a_free(struct snd_ad1816a *chip)
 {
 	release_and_free_resource(chip->res_port);
 	if (chip->irq >= 0)
@@ -557,13 +557,13 @@ static int snd_ad1816a_free(ad1816a_t *chip)
 	return 0;
 }
 
-static int snd_ad1816a_dev_free(snd_device_t *device)
+static int snd_ad1816a_dev_free(struct snd_device *device)
 {
-	ad1816a_t *chip = device->device_data;
+	struct snd_ad1816a *chip = device->device_data;
 	return snd_ad1816a_free(chip);
 }
 
-static const char *snd_ad1816a_chip_id(ad1816a_t *chip)
+static const char *snd_ad1816a_chip_id(struct snd_ad1816a *chip)
 {
 	switch (chip->hardware) {
 	case AD1816A_HW_AD1816A: return "AD1816A";
@@ -576,15 +576,15 @@ static const char *snd_ad1816a_chip_id(ad1816a_t *chip)
 	}
 }
 
-int snd_ad1816a_create(snd_card_t *card,
+int snd_ad1816a_create(struct snd_card *card,
 		       unsigned long port, int irq, int dma1, int dma2,
-		       ad1816a_t **rchip)
+		       struct snd_ad1816a **rchip)
 {
-        static snd_device_ops_t ops = {
+        static struct snd_device_ops ops = {
 		.dev_free =	snd_ad1816a_dev_free,
 	};
 	int error;
-	ad1816a_t *chip;
+	struct snd_ad1816a *chip;
 
 	*rchip = NULL;
 
@@ -640,7 +640,7 @@ int snd_ad1816a_create(snd_card_t *card,
 	return 0;
 }
 
-static snd_pcm_ops_t snd_ad1816a_playback_ops = {
+static struct snd_pcm_ops snd_ad1816a_playback_ops = {
 	.open =		snd_ad1816a_playback_open,
 	.close =	snd_ad1816a_playback_close,
 	.ioctl =	snd_pcm_lib_ioctl,
@@ -651,7 +651,7 @@ static snd_pcm_ops_t snd_ad1816a_playback_ops = {
 	.pointer =	snd_ad1816a_playback_pointer,
 };
 
-static snd_pcm_ops_t snd_ad1816a_capture_ops = {
+static struct snd_pcm_ops snd_ad1816a_capture_ops = {
 	.open =		snd_ad1816a_capture_open,
 	.close =	snd_ad1816a_capture_close,
 	.ioctl =	snd_pcm_lib_ioctl,
@@ -662,10 +662,10 @@ static snd_pcm_ops_t snd_ad1816a_capture_ops = {
 	.pointer =	snd_ad1816a_capture_pointer,
 };
 
-int snd_ad1816a_pcm(ad1816a_t *chip, int device, snd_pcm_t **rpcm)
+int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm)
 {
 	int error;
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 
 	if ((error = snd_pcm_new(chip->card, "AD1816A", device, 1, 1, &pcm)))
 		return error;
@@ -690,16 +690,16 @@ int snd_ad1816a_pcm(ad1816a_t *chip, int device, snd_pcm_t **rpcm)
 }
 
 #if 0 /* not used now */
-static void snd_ad1816a_timer_free(snd_timer_t *timer)
+static void snd_ad1816a_timer_free(struct snd_timer *timer)
 {
-	ad1816a_t *chip = timer->private_data;
+	struct snd_ad1816a *chip = timer->private_data;
 	chip->timer = NULL;
 }
 
-int snd_ad1816a_timer(ad1816a_t *chip, int device, snd_timer_t **rtimer)
+int snd_ad1816a_timer(struct snd_ad1816a *chip, int device, struct snd_timer **rtimer)
 {
-	snd_timer_t *timer;
-	snd_timer_id_t tid;
+	struct snd_timer *timer;
+	struct snd_timer_id tid;
 	int error;
 
 	tid.dev_class = SNDRV_TIMER_CLASS_CARD;
@@ -724,7 +724,7 @@ int snd_ad1816a_timer(ad1816a_t *chip, int device, snd_timer_t **rtimer)
  *
  */
 
-static int snd_ad1816a_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ad1816a_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[8] = {
 		"Line", "Mix", "CD", "Synth", "Video",
@@ -740,9 +740,9 @@ static int snd_ad1816a_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
 	return 0;
 }
 
-static int snd_ad1816a_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1816a_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ad1816a_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ad1816a *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	unsigned short val;
 	
@@ -754,9 +754,9 @@ static int snd_ad1816a_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
 	return 0;
 }
 
-static int snd_ad1816a_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1816a_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ad1816a_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ad1816a *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	unsigned short val;
 	int change;
@@ -778,7 +778,7 @@ static int snd_ad1816a_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
   .get = snd_ad1816a_get_single, .put = snd_ad1816a_put_single, \
   .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }
 
-static int snd_ad1816a_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ad1816a_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 16) & 0xff;
 
@@ -789,9 +789,9 @@ static int snd_ad1816a_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_ad1816a_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1816a_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ad1816a_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ad1816a *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -806,9 +806,9 @@ static int snd_ad1816a_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
 	return 0;
 }
 
-static int snd_ad1816a_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1816a_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ad1816a_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ad1816a *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -835,7 +835,7 @@ static int snd_ad1816a_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
   .get = snd_ad1816a_get_double, .put = snd_ad1816a_put_double, \
   .private_value = reg | (shift_left << 8) | (shift_right << 12) | (mask << 16) | (invert << 24) }
 
-static int snd_ad1816a_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ad1816a_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 16) & 0xff;
 
@@ -846,9 +846,9 @@ static int snd_ad1816a_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_ad1816a_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1816a_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ad1816a_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ad1816a *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift_left = (kcontrol->private_value >> 8) & 0x0f;
@@ -869,9 +869,9 @@ static int snd_ad1816a_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
 	return 0;
 }
 
-static int snd_ad1816a_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1816a_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ad1816a_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ad1816a *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift_left = (kcontrol->private_value >> 8) & 0x0f;
@@ -898,7 +898,7 @@ static int snd_ad1816a_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
 	return change;
 }
 
-static snd_kcontrol_new_t snd_ad1816a_controls[] = {
+static struct snd_kcontrol_new snd_ad1816a_controls[] = {
 AD1816A_DOUBLE("Master Playback Switch", AD1816A_MASTER_ATT, 15, 7, 1, 1),
 AD1816A_DOUBLE("Master Playback Volume", AD1816A_MASTER_ATT, 8, 0, 31, 1),
 AD1816A_DOUBLE("PCM Playback Switch", AD1816A_VOICE_ATT, 15, 7, 1, 1),
@@ -933,9 +933,9 @@ AD1816A_SINGLE("3D Control - Switch", AD1816A_3D_PHAT_CTRL, 15, 1, 1),
 AD1816A_SINGLE("3D Control - Level", AD1816A_3D_PHAT_CTRL, 0, 15, 0),
 };
                                         
-int snd_ad1816a_mixer(ad1816a_t *chip)
+int snd_ad1816a_mixer(struct snd_ad1816a *chip)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	unsigned int idx;
 	int err;
 
-- 
cgit v1.2.3-70-g09d2


From c8ff6647bb8a1865608b2d0c8565ca0ac47fb9b7 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:29:37 +0100
Subject: [ALSA] Remove xxx_t typedefs: ISA AD1848

Modules: AD1848 driver

Remove xxx_t typedefs from the ISA AD1848 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/ad1848.h        |  28 ++++---
 sound/isa/ad1848/ad1848.c     |   8 +-
 sound/isa/ad1848/ad1848_lib.c | 176 +++++++++++++++++++++---------------------
 3 files changed, 105 insertions(+), 107 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/ad1848.h b/include/sound/ad1848.h
index 7e33b11037f..a03807088b1 100644
--- a/include/sound/ad1848.h
+++ b/include/sound/ad1848.h
@@ -127,7 +127,7 @@
 #define AD1848_THINKPAD_CTL_PORT2		0x15e9
 #define AD1848_THINKPAD_CS4248_ENABLE_BIT	0x02
 
-struct _snd_ad1848 {
+struct snd_ad1848 {
 	unsigned long port;		/* i/o port */
 	struct resource *res_port;
 	int irq;			/* IRQ line */
@@ -137,10 +137,10 @@ struct _snd_ad1848 {
 	unsigned short hardware;	/* see to AD1848_HW_XXXX */
 	unsigned short single_dma:1;	/* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */
 
-	snd_pcm_t *pcm;
-	snd_pcm_substream_t *playback_substream;
-	snd_pcm_substream_t *capture_substream;
-	snd_card_t *card;
+	struct snd_pcm *pcm;
+	struct snd_pcm_substream *playback_substream;
+	struct snd_pcm_substream *capture_substream;
+	struct snd_card *card;
 
 	unsigned char image[32];	/* SGalaxy needs an access to extended registers */
 	int mce_bit;
@@ -152,21 +152,19 @@ struct _snd_ad1848 {
 	struct semaphore open_mutex;
 };
 
-typedef struct _snd_ad1848 ad1848_t;
-
 /* exported functions */
 
-void snd_ad1848_out(ad1848_t *chip, unsigned char reg, unsigned char value);
+void snd_ad1848_out(struct snd_ad1848 *chip, unsigned char reg, unsigned char value);
 
-int snd_ad1848_create(snd_card_t * card,
+int snd_ad1848_create(struct snd_card *card,
 		      unsigned long port,
 		      int irq, int dma,
 		      unsigned short hardware,
-		      ad1848_t ** chip);
+		      struct snd_ad1848 ** chip);
 
-int snd_ad1848_pcm(ad1848_t * chip, int device, snd_pcm_t **rpcm);
-const snd_pcm_ops_t *snd_ad1848_get_pcm_ops(int direction);
-int snd_ad1848_mixer(ad1848_t * chip);
+int snd_ad1848_pcm(struct snd_ad1848 * chip, int device, struct snd_pcm **rpcm);
+const struct snd_pcm_ops *snd_ad1848_get_pcm_ops(int direction);
+int snd_ad1848_mixer(struct snd_ad1848 * chip);
 
 /* exported mixer stuffs */
 enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE };
@@ -176,7 +174,7 @@ enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE };
 #define AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) \
 	((left_reg) | ((right_reg) << 8) | ((shift_left) << 16) | ((shift_right) << 19) | ((mask) << 24) | ((invert) << 22))
 
-int snd_ad1848_add_ctl(ad1848_t *chip, const char *name, int index, int type, unsigned long value);
+int snd_ad1848_add_ctl(struct snd_ad1848 *chip, const char *name, int index, int type, unsigned long value);
 
 /* for ease of use */
 struct ad1848_mix_elem {
@@ -198,7 +196,7 @@ struct ad1848_mix_elem {
   .type = AD1848_MIX_DOUBLE, \
   .private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) }
 
-static inline int snd_ad1848_add_ctl_elem(ad1848_t *chip, const struct ad1848_mix_elem *c)
+static inline int snd_ad1848_add_ctl_elem(struct snd_ad1848 *chip, const struct ad1848_mix_elem *c)
 {
 	return snd_ad1848_add_ctl(chip, c->name, c->index, c->type, c->private_value);
 }
diff --git a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c
index 3ebcc482b07..ffc373b37a9 100644
--- a/sound/isa/ad1848/ad1848.c
+++ b/sound/isa/ad1848/ad1848.c
@@ -60,14 +60,14 @@ MODULE_PARM_DESC(dma1, "DMA1 # for AD1848 driver.");
 module_param_array(thinkpad, bool, NULL, 0444);
 MODULE_PARM_DESC(thinkpad, "Enable only for the onboard CS4248 of IBM Thinkpad 360/750/755 series.");
 
-static snd_card_t *snd_ad1848_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_ad1848_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
 
 static int __init snd_card_ad1848_probe(int dev)
 {
-	snd_card_t *card;
-	ad1848_t *chip;
-	snd_pcm_t *pcm;
+	struct snd_card *card;
+	struct snd_ad1848 *chip;
+	struct snd_pcm *pcm;
 	int err;
 
 	if (port[dev] == SNDRV_AUTO_PORT) {
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c
index 84a3c559655..55ba32d4a22 100644
--- a/sound/isa/ad1848/ad1848_lib.c
+++ b/sound/isa/ad1848/ad1848_lib.c
@@ -69,7 +69,7 @@ static unsigned int rates[14] = {
 	27042, 32000, 33075, 37800, 44100, 48000
 };
 
-static snd_pcm_hw_constraint_list_t hw_constraints_rates = {
+static struct snd_pcm_hw_constraint_list hw_constraints_rates = {
 	.count = 14,
 	.list = rates,
 	.mask = 0,
@@ -99,7 +99,7 @@ static unsigned char snd_ad1848_original_image[16] =
  *  Basic I/O functions
  */
 
-void snd_ad1848_out(ad1848_t *chip,
+void snd_ad1848_out(struct snd_ad1848 *chip,
 			   unsigned char reg,
 			   unsigned char value)
 {
@@ -119,7 +119,7 @@ void snd_ad1848_out(ad1848_t *chip,
 #endif
 }
 
-static void snd_ad1848_dout(ad1848_t *chip,
+static void snd_ad1848_dout(struct snd_ad1848 *chip,
 			    unsigned char reg, unsigned char value)
 {
 	int timeout;
@@ -131,7 +131,7 @@ static void snd_ad1848_dout(ad1848_t *chip,
 	mb();
 }
 
-static unsigned char snd_ad1848_in(ad1848_t *chip, unsigned char reg)
+static unsigned char snd_ad1848_in(struct snd_ad1848 *chip, unsigned char reg)
 {
 	int timeout;
 
@@ -148,7 +148,7 @@ static unsigned char snd_ad1848_in(ad1848_t *chip, unsigned char reg)
 
 #if 0
 
-static void snd_ad1848_debug(ad1848_t *chip)
+static void snd_ad1848_debug(struct snd_ad1848 *chip)
 {
 	printk("AD1848 REGS:      INDEX = 0x%02x  ", inb(AD1848P(chip, REGSEL)));
 	printk("                 STATUS = 0x%02x\n", inb(AD1848P(chip, STATUS)));
@@ -176,7 +176,7 @@ static void snd_ad1848_debug(ad1848_t *chip)
  *  AD1848 detection / MCE routines
  */
 
-static void snd_ad1848_mce_up(ad1848_t *chip)
+static void snd_ad1848_mce_up(struct snd_ad1848 *chip)
 {
 	unsigned long flags;
 	int timeout;
@@ -197,7 +197,7 @@ static void snd_ad1848_mce_up(ad1848_t *chip)
 	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
-static void snd_ad1848_mce_down(ad1848_t *chip)
+static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
 {
 	unsigned long flags;
 	int timeout;
@@ -279,7 +279,7 @@ static unsigned int snd_ad1848_get_count(unsigned char format,
 	return size;
 }
 
-static int snd_ad1848_trigger(ad1848_t *chip, unsigned char what,
+static int snd_ad1848_trigger(struct snd_ad1848 *chip, unsigned char what,
 			      int channel, int cmd)
 {
 	int result = 0;
@@ -324,7 +324,7 @@ static unsigned char snd_ad1848_get_rate(unsigned int rate)
 	return freq_bits[13];
 }
 
-static int snd_ad1848_ioctl(snd_pcm_substream_t * substream,
+static int snd_ad1848_ioctl(struct snd_pcm_substream *substream,
 			    unsigned int cmd, void *arg)
 {
 	return snd_pcm_lib_ioctl(substream, cmd, arg);
@@ -348,7 +348,7 @@ static unsigned char snd_ad1848_get_format(int format, int channels)
 	return rformat;
 }
 
-static void snd_ad1848_calibrate_mute(ad1848_t *chip, int mute)
+static void snd_ad1848_calibrate_mute(struct snd_ad1848 *chip, int mute)
 {
 	unsigned long flags;
 	
@@ -372,7 +372,7 @@ static void snd_ad1848_calibrate_mute(ad1848_t *chip, int mute)
 	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
-static void snd_ad1848_set_data_format(ad1848_t *chip, snd_pcm_hw_params_t *hw_params)
+static void snd_ad1848_set_data_format(struct snd_ad1848 *chip, struct snd_pcm_hw_params *hw_params)
 {
 	if (hw_params == NULL) {
 		chip->image[AD1848_DATA_FORMAT] = 0x20;
@@ -384,7 +384,7 @@ static void snd_ad1848_set_data_format(ad1848_t *chip, snd_pcm_hw_params_t *hw_p
 	// snd_printk(">>> pmode = 0x%x, dfr = 0x%x\n", pstr->mode, chip->image[AD1848_DATA_FORMAT]);
 }
 
-static int snd_ad1848_open(ad1848_t *chip, unsigned int mode)
+static int snd_ad1848_open(struct snd_ad1848 *chip, unsigned int mode)
 {
 	unsigned long flags;
 
@@ -438,7 +438,7 @@ static int snd_ad1848_open(ad1848_t *chip, unsigned int mode)
 	return 0;
 }
 
-static void snd_ad1848_close(ad1848_t *chip)
+static void snd_ad1848_close(struct snd_ad1848 *chip)
 {
 	unsigned long flags;
 
@@ -479,24 +479,24 @@ static void snd_ad1848_close(ad1848_t *chip)
  *  ok.. exported functions..
  */
 
-static int snd_ad1848_playback_trigger(snd_pcm_substream_t * substream,
+static int snd_ad1848_playback_trigger(struct snd_pcm_substream *substream,
 				       int cmd)
 {
-	ad1848_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
 	return snd_ad1848_trigger(chip, AD1848_PLAYBACK_ENABLE, SNDRV_PCM_STREAM_PLAYBACK, cmd);
 }
 
-static int snd_ad1848_capture_trigger(snd_pcm_substream_t * substream,
+static int snd_ad1848_capture_trigger(struct snd_pcm_substream *substream,
 				      int cmd)
 {
-	ad1848_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
 	return snd_ad1848_trigger(chip, AD1848_CAPTURE_ENABLE, SNDRV_PCM_STREAM_CAPTURE, cmd);
 }
 
-static int snd_ad1848_playback_hw_params(snd_pcm_substream_t * substream,
-					 snd_pcm_hw_params_t * hw_params)
+static int snd_ad1848_playback_hw_params(struct snd_pcm_substream *substream,
+					 struct snd_pcm_hw_params *hw_params)
 {
-	ad1848_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
 	unsigned long flags;
 	int err;
 
@@ -513,15 +513,15 @@ static int snd_ad1848_playback_hw_params(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_ad1848_playback_hw_free(snd_pcm_substream_t * substream)
+static int snd_ad1848_playback_hw_free(struct snd_pcm_substream *substream)
 {
 	return snd_pcm_lib_free_pages(substream);
 }
 
-static int snd_ad1848_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_ad1848_playback_prepare(struct snd_pcm_substream *substream)
 {
-	ad1848_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned long flags;
 	unsigned int size = snd_pcm_lib_buffer_bytes(substream);
 	unsigned int count = snd_pcm_lib_period_bytes(substream);
@@ -537,10 +537,10 @@ static int snd_ad1848_playback_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_ad1848_capture_hw_params(snd_pcm_substream_t * substream,
-					snd_pcm_hw_params_t * hw_params)
+static int snd_ad1848_capture_hw_params(struct snd_pcm_substream *substream,
+					struct snd_pcm_hw_params *hw_params)
 {
-	ad1848_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
 	unsigned long flags;
 	int err;
 
@@ -557,15 +557,15 @@ static int snd_ad1848_capture_hw_params(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_ad1848_capture_hw_free(snd_pcm_substream_t * substream)
+static int snd_ad1848_capture_hw_free(struct snd_pcm_substream *substream)
 {
 	return snd_pcm_lib_free_pages(substream);
 }
 
-static int snd_ad1848_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_ad1848_capture_prepare(struct snd_pcm_substream *substream)
 {
-	ad1848_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned long flags;
 	unsigned int size = snd_pcm_lib_buffer_bytes(substream);
 	unsigned int count = snd_pcm_lib_period_bytes(substream);
@@ -583,7 +583,7 @@ static int snd_ad1848_capture_prepare(snd_pcm_substream_t * substream)
 
 static irqreturn_t snd_ad1848_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	ad1848_t *chip = dev_id;
+	struct snd_ad1848 *chip = dev_id;
 
 	if ((chip->mode & AD1848_MODE_PLAY) && chip->playback_substream &&
 	    (chip->mode & AD1848_MODE_RUNNING))
@@ -595,9 +595,9 @@ static irqreturn_t snd_ad1848_interrupt(int irq, void *dev_id, struct pt_regs *r
 	return IRQ_HANDLED;
 }
 
-static snd_pcm_uframes_t snd_ad1848_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_ad1848_playback_pointer(struct snd_pcm_substream *substream)
 {
-	ad1848_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
 	size_t ptr;
 	
 	if (!(chip->image[AD1848_IFACE_CTRL] & AD1848_PLAYBACK_ENABLE))
@@ -606,9 +606,9 @@ static snd_pcm_uframes_t snd_ad1848_playback_pointer(snd_pcm_substream_t * subst
 	return bytes_to_frames(substream->runtime, ptr);
 }
 
-static snd_pcm_uframes_t snd_ad1848_capture_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_ad1848_capture_pointer(struct snd_pcm_substream *substream)
 {
-	ad1848_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
 	size_t ptr;
 
 	if (!(chip->image[AD1848_IFACE_CTRL] & AD1848_CAPTURE_ENABLE))
@@ -621,7 +621,7 @@ static snd_pcm_uframes_t snd_ad1848_capture_pointer(snd_pcm_substream_t * substr
 
  */
 
-static void snd_ad1848_thinkpad_twiddle(ad1848_t *chip, int on) {
+static void snd_ad1848_thinkpad_twiddle(struct snd_ad1848 *chip, int on) {
 
 	int tmp;
 
@@ -642,9 +642,9 @@ static void snd_ad1848_thinkpad_twiddle(ad1848_t *chip, int on) {
 }
 
 #ifdef CONFIG_PM
-static int snd_ad1848_suspend(snd_card_t *card, pm_message_t state)
+static int snd_ad1848_suspend(struct snd_card *card, pm_message_t state)
 {
-	ad1848_t *chip = card->pm_private_data;
+	struct snd_ad1848 *chip = card->pm_private_data;
 
 	snd_pcm_suspend_all(chip->pcm);
 	/* FIXME: save registers? */
@@ -655,9 +655,9 @@ static int snd_ad1848_suspend(snd_card_t *card, pm_message_t state)
 	return 0;
 }
 
-static int snd_ad1848_resume(snd_card_t *card)
+static int snd_ad1848_resume(struct snd_card *card)
 {
-	ad1848_t *chip = card->pm_private_data;
+	struct snd_ad1848 *chip = card->pm_private_data;
 
 	if (chip->thinkpad_flag)
 		snd_ad1848_thinkpad_twiddle(chip, 1);
@@ -668,7 +668,7 @@ static int snd_ad1848_resume(snd_card_t *card)
 }
 #endif /* CONFIG_PM */
 
-static int snd_ad1848_probe(ad1848_t * chip)
+static int snd_ad1848_probe(struct snd_ad1848 * chip)
 {
 	unsigned long flags;
 	int i, id, rev, ad1847;
@@ -748,7 +748,7 @@ static int snd_ad1848_probe(ad1848_t * chip)
 
  */
 
-static snd_pcm_hardware_t snd_ad1848_playback =
+static struct snd_pcm_hardware snd_ad1848_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
@@ -767,7 +767,7 @@ static snd_pcm_hardware_t snd_ad1848_playback =
 	.fifo_size =		0,
 };
 
-static snd_pcm_hardware_t snd_ad1848_capture =
+static struct snd_pcm_hardware snd_ad1848_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
@@ -790,10 +790,10 @@ static snd_pcm_hardware_t snd_ad1848_capture =
 
  */
 
-static int snd_ad1848_playback_open(snd_pcm_substream_t * substream)
+static int snd_ad1848_playback_open(struct snd_pcm_substream *substream)
 {
-	ad1848_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 
 	if ((err = snd_ad1848_open(chip, AD1848_MODE_PLAY)) < 0)
@@ -806,10 +806,10 @@ static int snd_ad1848_playback_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_ad1848_capture_open(snd_pcm_substream_t * substream)
+static int snd_ad1848_capture_open(struct snd_pcm_substream *substream)
 {
-	ad1848_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 
 	if ((err = snd_ad1848_open(chip, AD1848_MODE_CAPTURE)) < 0)
@@ -822,9 +822,9 @@ static int snd_ad1848_capture_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_ad1848_playback_close(snd_pcm_substream_t * substream)
+static int snd_ad1848_playback_close(struct snd_pcm_substream *substream)
 {
-	ad1848_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
 
 	chip->mode &= ~AD1848_MODE_PLAY;
 	chip->playback_substream = NULL;
@@ -832,9 +832,9 @@ static int snd_ad1848_playback_close(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_ad1848_capture_close(snd_pcm_substream_t * substream)
+static int snd_ad1848_capture_close(struct snd_pcm_substream *substream)
 {
-	ad1848_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ad1848 *chip = snd_pcm_substream_chip(substream);
 
 	chip->mode &= ~AD1848_MODE_CAPTURE;
 	chip->capture_substream = NULL;
@@ -842,7 +842,7 @@ static int snd_ad1848_capture_close(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_ad1848_free(ad1848_t *chip)
+static int snd_ad1848_free(struct snd_ad1848 *chip)
 {
 	release_and_free_resource(chip->res_port);
 	if (chip->irq >= 0)
@@ -855,13 +855,13 @@ static int snd_ad1848_free(ad1848_t *chip)
 	return 0;
 }
 
-static int snd_ad1848_dev_free(snd_device_t *device)
+static int snd_ad1848_dev_free(struct snd_device *device)
 {
-	ad1848_t *chip = device->device_data;
+	struct snd_ad1848 *chip = device->device_data;
 	return snd_ad1848_free(chip);
 }
 
-static const char *snd_ad1848_chip_id(ad1848_t *chip)
+static const char *snd_ad1848_chip_id(struct snd_ad1848 *chip)
 {
 	switch (chip->hardware) {
 	case AD1848_HW_AD1847:	return "AD1847";
@@ -872,16 +872,16 @@ static const char *snd_ad1848_chip_id(ad1848_t *chip)
 	}
 }
 
-int snd_ad1848_create(snd_card_t * card,
+int snd_ad1848_create(struct snd_card *card,
 		      unsigned long port,
 		      int irq, int dma,
 		      unsigned short hardware,
-		      ad1848_t ** rchip)
+		      struct snd_ad1848 ** rchip)
 {
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_ad1848_dev_free,
 	};
-	ad1848_t *chip;
+	struct snd_ad1848 *chip;
 	int err;
 
 	*rchip = NULL;
@@ -937,7 +937,7 @@ int snd_ad1848_create(snd_card_t * card,
 	return 0;
 }
 
-static snd_pcm_ops_t snd_ad1848_playback_ops = {
+static struct snd_pcm_ops snd_ad1848_playback_ops = {
 	.open =		snd_ad1848_playback_open,
 	.close =	snd_ad1848_playback_close,
 	.ioctl =	snd_ad1848_ioctl,
@@ -948,7 +948,7 @@ static snd_pcm_ops_t snd_ad1848_playback_ops = {
 	.pointer =	snd_ad1848_playback_pointer,
 };
 
-static snd_pcm_ops_t snd_ad1848_capture_ops = {
+static struct snd_pcm_ops snd_ad1848_capture_ops = {
 	.open =		snd_ad1848_capture_open,
 	.close =	snd_ad1848_capture_close,
 	.ioctl =	snd_ad1848_ioctl,
@@ -959,9 +959,9 @@ static snd_pcm_ops_t snd_ad1848_capture_ops = {
 	.pointer =	snd_ad1848_capture_pointer,
 };
 
-int snd_ad1848_pcm(ad1848_t *chip, int device, snd_pcm_t **rpcm)
+int snd_ad1848_pcm(struct snd_ad1848 *chip, int device, struct snd_pcm **rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if ((err = snd_pcm_new(chip->card, "AD1848", device, 1, 1, &pcm)) < 0)
@@ -984,7 +984,7 @@ int snd_ad1848_pcm(ad1848_t *chip, int device, snd_pcm_t **rpcm)
 	return 0;
 }
 
-const snd_pcm_ops_t *snd_ad1848_get_pcm_ops(int direction)
+const struct snd_pcm_ops *snd_ad1848_get_pcm_ops(int direction)
 {
 	return direction == SNDRV_PCM_STREAM_PLAYBACK ?
 		&snd_ad1848_playback_ops : &snd_ad1848_capture_ops;
@@ -994,7 +994,7 @@ const snd_pcm_ops_t *snd_ad1848_get_pcm_ops(int direction)
  *  MIXER part
  */
 
-static int snd_ad1848_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ad1848_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[4] = {
 		"Line", "Aux", "Mic", "Mix"
@@ -1009,9 +1009,9 @@ static int snd_ad1848_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
 	return 0;
 }
 
-static int snd_ad1848_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1848_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ad1848_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ad1848 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	
 	spin_lock_irqsave(&chip->reg_lock, flags);
@@ -1021,9 +1021,9 @@ static int snd_ad1848_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
 	return 0;
 }
 
-static int snd_ad1848_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1848_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ad1848_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ad1848 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	unsigned short left, right;
 	int change;
@@ -1044,7 +1044,7 @@ static int snd_ad1848_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
 	return change;
 }
 
-static int snd_ad1848_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ad1848_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 16) & 0xff;
 
@@ -1055,9 +1055,9 @@ static int snd_ad1848_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_ad1848_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1848_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ad1848_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ad1848 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -1072,9 +1072,9 @@ static int snd_ad1848_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_ad1848_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1848_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ad1848_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ad1848 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -1095,7 +1095,7 @@ static int snd_ad1848_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return change;
 }
 
-static int snd_ad1848_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ad1848_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 24) & 0xff;
 
@@ -1106,9 +1106,9 @@ static int snd_ad1848_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_ad1848_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1848_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ad1848_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ad1848 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -1128,9 +1128,9 @@ static int snd_ad1848_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_ad1848_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ad1848_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ad1848_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ad1848 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -1167,9 +1167,9 @@ static int snd_ad1848_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 
 /*
  */
-int snd_ad1848_add_ctl(ad1848_t *chip, const char *name, int index, int type, unsigned long value)
+int snd_ad1848_add_ctl(struct snd_ad1848 *chip, const char *name, int index, int type, unsigned long value)
 {
-	static snd_kcontrol_new_t newctls[] = {
+	static struct snd_kcontrol_new newctls[] = {
 		[AD1848_MIX_SINGLE] = {
 			.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 			.info = snd_ad1848_info_single,
@@ -1189,7 +1189,7 @@ int snd_ad1848_add_ctl(ad1848_t *chip, const char *name, int index, int type, un
 			.put = snd_ad1848_put_mux,
 		},
 	};
-	snd_kcontrol_t *ctl;
+	struct snd_kcontrol *ctl;
 	int err;
 
 	ctl = snd_ctl_new1(&newctls[type], chip);
@@ -1222,10 +1222,10 @@ AD1848_SINGLE("Loopback Capture Switch", 0, AD1848_LOOPBACK, 0, 1, 0),
 AD1848_SINGLE("Loopback Capture Volume", 0, AD1848_LOOPBACK, 1, 63, 0)
 };
                                         
-int snd_ad1848_mixer(ad1848_t *chip)
+int snd_ad1848_mixer(struct snd_ad1848 *chip)
 {
-	snd_card_t *card;
-	snd_pcm_t *pcm;
+	struct snd_card *card;
+	struct snd_pcm *pcm;
 	unsigned int idx;
 	int err;
 
-- 
cgit v1.2.3-70-g09d2


From ba2375a45c528fd902676ea01014ea0f8931464b Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:30:42 +0100
Subject: [ALSA] Remove xxx_t typedefs: ISA CS423x

Modules: CS4231 driver,CS4236+ driver

Remove xxx_t typedefs from the ISA CS423x drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/cs4231.h        |  74 +++++++-------
 sound/isa/cs423x/cs4231.c     |   8 +-
 sound/isa/cs423x/cs4231_lib.c | 230 +++++++++++++++++++++---------------------
 sound/isa/cs423x/cs4236.c     |  14 +--
 sound/isa/cs423x/cs4236_lib.c | 106 +++++++++----------
 5 files changed, 215 insertions(+), 217 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/cs4231.h b/include/sound/cs4231.h
index d956de947e7..ac6a5d88208 100644
--- a/include/sound/cs4231.h
+++ b/include/sound/cs4231.h
@@ -217,9 +217,7 @@
 #define CS4231_HWSHARE_DMA1	(1<<1)
 #define CS4231_HWSHARE_DMA2	(1<<2)
 
-typedef struct _snd_cs4231 cs4231_t;
-
-struct _snd_cs4231 {
+struct snd_cs4231 {
 	unsigned long port;		/* base i/o port */
 	struct resource *res_port;
 	unsigned long cport;		/* control base i/o port (CS4236) */
@@ -234,11 +232,11 @@ struct _snd_cs4231 {
 	unsigned short single_dma:1,	/* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */
 		       ebus_flag:1;	/* SPARC: EBUS present */
 
-	snd_card_t *card;
-	snd_pcm_t *pcm;
-	snd_pcm_substream_t *playback_substream;
-	snd_pcm_substream_t *capture_substream;
-	snd_timer_t *timer;
+	struct snd_card *card;
+	struct snd_pcm *pcm;
+	struct snd_pcm_substream *playback_substream;
+	struct snd_pcm_substream *capture_substream;
+	struct snd_timer *timer;
 
 	unsigned char image[32];	/* registers image */
 	unsigned char eimage[32];	/* extended registers image */
@@ -253,52 +251,52 @@ struct _snd_cs4231 {
 	struct semaphore mce_mutex;
 	struct semaphore open_mutex;
 
-	int (*rate_constraint) (snd_pcm_runtime_t *runtime);
-	void (*set_playback_format) (cs4231_t *chip, snd_pcm_hw_params_t *hw_params, unsigned char pdfr);
-	void (*set_capture_format) (cs4231_t *chip, snd_pcm_hw_params_t *hw_params, unsigned char cdfr);
-	void (*trigger) (cs4231_t *chip, unsigned int what, int start);
+	int (*rate_constraint) (struct snd_pcm_runtime *runtime);
+	void (*set_playback_format) (struct snd_cs4231 *chip, struct snd_pcm_hw_params *hw_params, unsigned char pdfr);
+	void (*set_capture_format) (struct snd_cs4231 *chip, struct snd_pcm_hw_params *hw_params, unsigned char cdfr);
+	void (*trigger) (struct snd_cs4231 *chip, unsigned int what, int start);
 #ifdef CONFIG_PM
-	void (*suspend) (cs4231_t *chip);
-	void (*resume) (cs4231_t *chip);
+	void (*suspend) (struct snd_cs4231 *chip);
+	void (*resume) (struct snd_cs4231 *chip);
 #endif
 	void *dma_private_data;
-	int (*claim_dma) (cs4231_t *chip, void *dma_private_data, int dma);
-	int (*release_dma) (cs4231_t *chip, void *dma_private_data, int dma);
+	int (*claim_dma) (struct snd_cs4231 *chip, void *dma_private_data, int dma);
+	int (*release_dma) (struct snd_cs4231 *chip, void *dma_private_data, int dma);
 };
 
 /* exported functions */
 
-void snd_cs4231_out(cs4231_t *chip, unsigned char reg, unsigned char val);
-unsigned char snd_cs4231_in(cs4231_t *chip, unsigned char reg);
-void snd_cs4236_ext_out(cs4231_t *chip, unsigned char reg, unsigned char val);
-unsigned char snd_cs4236_ext_in(cs4231_t *chip, unsigned char reg);
-void snd_cs4231_mce_up(cs4231_t *chip);
-void snd_cs4231_mce_down(cs4231_t *chip);
+void snd_cs4231_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val);
+unsigned char snd_cs4231_in(struct snd_cs4231 *chip, unsigned char reg);
+void snd_cs4236_ext_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val);
+unsigned char snd_cs4236_ext_in(struct snd_cs4231 *chip, unsigned char reg);
+void snd_cs4231_mce_up(struct snd_cs4231 *chip);
+void snd_cs4231_mce_down(struct snd_cs4231 *chip);
 
 irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
-const char *snd_cs4231_chip_id(cs4231_t *chip);
+const char *snd_cs4231_chip_id(struct snd_cs4231 *chip);
 
-int snd_cs4231_create(snd_card_t * card,
+int snd_cs4231_create(struct snd_card *card,
 		      unsigned long port,
 		      unsigned long cport,
 		      int irq, int dma1, int dma2,
 		      unsigned short hardware,
 		      unsigned short hwshare,
-		      cs4231_t ** rchip);
-int snd_cs4231_pcm(cs4231_t * chip, int device, snd_pcm_t **rpcm);
-int snd_cs4231_timer(cs4231_t * chip, int device, snd_timer_t **rtimer);
-int snd_cs4231_mixer(cs4231_t * chip);
+		      struct snd_cs4231 ** rchip);
+int snd_cs4231_pcm(struct snd_cs4231 * chip, int device, struct snd_pcm **rpcm);
+int snd_cs4231_timer(struct snd_cs4231 * chip, int device, struct snd_timer **rtimer);
+int snd_cs4231_mixer(struct snd_cs4231 * chip);
 
-int snd_cs4236_create(snd_card_t * card,
+int snd_cs4236_create(struct snd_card *card,
 		      unsigned long port,
 		      unsigned long cport,
 		      int irq, int dma1, int dma2,
 		      unsigned short hardware,
 		      unsigned short hwshare,
-		      cs4231_t ** rchip);
-int snd_cs4236_pcm(cs4231_t * chip, int device, snd_pcm_t **rpcm);
-int snd_cs4236_mixer(cs4231_t * chip);
+		      struct snd_cs4231 ** rchip);
+int snd_cs4236_pcm(struct snd_cs4231 * chip, int device, struct snd_pcm **rpcm);
+int snd_cs4236_mixer(struct snd_cs4231 * chip);
 
 /*
  *  mixer library
@@ -310,9 +308,9 @@ int snd_cs4236_mixer(cs4231_t * chip);
   .get = snd_cs4231_get_single, .put = snd_cs4231_put_single, \
   .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }
 
-int snd_cs4231_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo);
-int snd_cs4231_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
-int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
+int snd_cs4231_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
+int snd_cs4231_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
+int snd_cs4231_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
 
 #define CS4231_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert) \
 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \
@@ -320,8 +318,8 @@ int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucon
   .get = snd_cs4231_get_double, .put = snd_cs4231_put_double, \
   .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) }
 
-int snd_cs4231_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo);
-int snd_cs4231_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
-int snd_cs4231_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
+int snd_cs4231_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
+int snd_cs4231_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
+int snd_cs4231_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
 
 #endif /* __SOUND_CS4231_H */
diff --git a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c
index 9be5416bcb9..a8da87903d9 100644
--- a/sound/isa/cs423x/cs4231.c
+++ b/sound/isa/cs423x/cs4231.c
@@ -64,15 +64,15 @@ MODULE_PARM_DESC(dma1, "DMA1 # for CS4231 driver.");
 module_param_array(dma2, int, NULL, 0444);
 MODULE_PARM_DESC(dma2, "DMA2 # for CS4231 driver.");
 
-static snd_card_t *snd_cs4231_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_cs4231_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
 
 static int __init snd_card_cs4231_probe(int dev)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	struct snd_card_cs4231 *acard;
-	snd_pcm_t *pcm = NULL;
-	cs4231_t *chip;
+	struct snd_pcm *pcm = NULL;
+	struct snd_cs4231 *chip;
 	int err;
 
 	if (port[dev] == SNDRV_AUTO_PORT) {
diff --git a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c
index 94e07a7c8b3..ab9075f5123 100644
--- a/sound/isa/cs423x/cs4231_lib.c
+++ b/sound/isa/cs423x/cs4231_lib.c
@@ -73,13 +73,13 @@ static unsigned int rates[14] = {
 	27042, 32000, 33075, 37800, 44100, 48000
 };
 
-static snd_pcm_hw_constraint_list_t hw_constraints_rates = {
+static struct snd_pcm_hw_constraint_list hw_constraints_rates = {
 	.count = 14,
 	.list = rates,
 	.mask = 0,
 };
 
-static int snd_cs4231_xrate(snd_pcm_runtime_t *runtime)
+static int snd_cs4231_xrate(struct snd_pcm_runtime *runtime)
 {
 	return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates);
 }
@@ -124,17 +124,17 @@ static unsigned char snd_cs4231_original_image[32] =
  *  Basic I/O functions
  */
 
-static inline void cs4231_outb(cs4231_t *chip, u8 offset, u8 val)
+static inline void cs4231_outb(struct snd_cs4231 *chip, u8 offset, u8 val)
 {
 	outb(val, chip->port + offset);
 }
 
-static inline u8 cs4231_inb(cs4231_t *chip, u8 offset)
+static inline u8 cs4231_inb(struct snd_cs4231 *chip, u8 offset)
 {
 	return inb(chip->port + offset);
 }
 
-static void snd_cs4231_outm(cs4231_t *chip, unsigned char reg,
+static void snd_cs4231_outm(struct snd_cs4231 *chip, unsigned char reg,
 			    unsigned char mask, unsigned char value)
 {
 	int timeout;
@@ -161,7 +161,7 @@ static void snd_cs4231_outm(cs4231_t *chip, unsigned char reg,
 	}
 }
 
-static void snd_cs4231_dout(cs4231_t *chip, unsigned char reg, unsigned char value)
+static void snd_cs4231_dout(struct snd_cs4231 *chip, unsigned char reg, unsigned char value)
 {
 	int timeout;
 
@@ -174,7 +174,7 @@ static void snd_cs4231_dout(cs4231_t *chip, unsigned char reg, unsigned char val
 	mb();
 }
 
-void snd_cs4231_out(cs4231_t *chip, unsigned char reg, unsigned char value)
+void snd_cs4231_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char value)
 {
 	int timeout;
 
@@ -195,7 +195,7 @@ void snd_cs4231_out(cs4231_t *chip, unsigned char reg, unsigned char value)
 #endif
 }
 
-unsigned char snd_cs4231_in(cs4231_t *chip, unsigned char reg)
+unsigned char snd_cs4231_in(struct snd_cs4231 *chip, unsigned char reg)
 {
 	int timeout;
 
@@ -212,7 +212,7 @@ unsigned char snd_cs4231_in(cs4231_t *chip, unsigned char reg)
 	return cs4231_inb(chip, CS4231P(REG));
 }
 
-void snd_cs4236_ext_out(cs4231_t *chip, unsigned char reg, unsigned char val)
+void snd_cs4236_ext_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val)
 {
 	cs4231_outb(chip, CS4231P(REGSEL), chip->mce_bit | 0x17);
 	cs4231_outb(chip, CS4231P(REG), reg | (chip->image[CS4236_EXT_REG] & 0x01));
@@ -223,7 +223,7 @@ void snd_cs4236_ext_out(cs4231_t *chip, unsigned char reg, unsigned char val)
 #endif
 }
 
-unsigned char snd_cs4236_ext_in(cs4231_t *chip, unsigned char reg)
+unsigned char snd_cs4236_ext_in(struct snd_cs4231 *chip, unsigned char reg)
 {
 	cs4231_outb(chip, CS4231P(REGSEL), chip->mce_bit | 0x17);
 	cs4231_outb(chip, CS4231P(REG), reg | (chip->image[CS4236_EXT_REG] & 0x01));
@@ -241,7 +241,7 @@ unsigned char snd_cs4236_ext_in(cs4231_t *chip, unsigned char reg)
 
 #if 0
 
-static void snd_cs4231_debug(cs4231_t *chip)
+static void snd_cs4231_debug(struct snd_cs4231 *chip)
 {
 	printk("CS4231 REGS:      INDEX = 0x%02x  ", cs4231_inb(chip, CS4231P(REGSEL)));
 	printk("                 STATUS = 0x%02x\n", cs4231_inb(chip, CS4231P(STATUS)));
@@ -285,7 +285,7 @@ static void snd_cs4231_debug(cs4231_t *chip)
  *  CS4231 detection / MCE routines
  */
 
-static void snd_cs4231_busy_wait(cs4231_t *chip)
+static void snd_cs4231_busy_wait(struct snd_cs4231 *chip)
 {
 	int timeout;
 
@@ -299,7 +299,7 @@ static void snd_cs4231_busy_wait(cs4231_t *chip)
 	     	udelay(10);
 }
 
-void snd_cs4231_mce_up(cs4231_t *chip)
+void snd_cs4231_mce_up(struct snd_cs4231 *chip)
 {
 	unsigned long flags;
 	int timeout;
@@ -320,7 +320,7 @@ void snd_cs4231_mce_up(cs4231_t *chip)
 	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
-void snd_cs4231_mce_down(cs4231_t *chip)
+void snd_cs4231_mce_down(struct snd_cs4231 *chip)
 {
 	unsigned long flags;
 	int timeout;
@@ -399,14 +399,14 @@ static unsigned int snd_cs4231_get_count(unsigned char format, unsigned int size
 	return size;
 }
 
-static int snd_cs4231_trigger(snd_pcm_substream_t *substream,
+static int snd_cs4231_trigger(struct snd_pcm_substream *substream,
 			      int cmd)
 {
-	cs4231_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs4231 *chip = snd_pcm_substream_chip(substream);
 	int result = 0;
 	unsigned int what;
 	struct list_head *pos;
-	snd_pcm_substream_t *s;
+	struct snd_pcm_substream *s;
 	int do_start;
 
 #if 0
@@ -468,7 +468,7 @@ static unsigned char snd_cs4231_get_rate(unsigned int rate)
 	return freq_bits[13];
 }
 
-static unsigned char snd_cs4231_get_format(cs4231_t *chip,
+static unsigned char snd_cs4231_get_format(struct snd_cs4231 *chip,
 				           int format,
                                            int channels)
 {
@@ -490,7 +490,7 @@ static unsigned char snd_cs4231_get_format(cs4231_t *chip,
 	return rformat;
 }
 
-static void snd_cs4231_calibrate_mute(cs4231_t *chip, int mute)
+static void snd_cs4231_calibrate_mute(struct snd_cs4231 *chip, int mute)
 {
 	unsigned long flags;
 
@@ -524,8 +524,8 @@ static void snd_cs4231_calibrate_mute(cs4231_t *chip, int mute)
 	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
-static void snd_cs4231_playback_format(cs4231_t *chip,
-				       snd_pcm_hw_params_t *params,
+static void snd_cs4231_playback_format(struct snd_cs4231 *chip,
+				       struct snd_pcm_hw_params *params,
 				       unsigned char pdfr)
 {
 	unsigned long flags;
@@ -563,8 +563,8 @@ static void snd_cs4231_playback_format(cs4231_t *chip,
 	up(&chip->mce_mutex);
 }
 
-static void snd_cs4231_capture_format(cs4231_t *chip,
-				      snd_pcm_hw_params_t *params,
+static void snd_cs4231_capture_format(struct snd_cs4231 *chip,
+				      struct snd_pcm_hw_params *params,
                                       unsigned char cdfr)
 {
 	unsigned long flags;
@@ -610,20 +610,20 @@ static void snd_cs4231_capture_format(cs4231_t *chip,
  *  Timer interface
  */
 
-static unsigned long snd_cs4231_timer_resolution(snd_timer_t * timer)
+static unsigned long snd_cs4231_timer_resolution(struct snd_timer * timer)
 {
-	cs4231_t *chip = snd_timer_chip(timer);
+	struct snd_cs4231 *chip = snd_timer_chip(timer);
 	if (chip->hardware & CS4231_HW_CS4236B_MASK)
 		return 14467;
 	else
 		return chip->image[CS4231_PLAYBK_FORMAT] & 1 ? 9969 : 9920;
 }
 
-static int snd_cs4231_timer_start(snd_timer_t * timer)
+static int snd_cs4231_timer_start(struct snd_timer * timer)
 {
 	unsigned long flags;
 	unsigned int ticks;
-	cs4231_t *chip = snd_timer_chip(timer);
+	struct snd_cs4231 *chip = snd_timer_chip(timer);
 	spin_lock_irqsave(&chip->reg_lock, flags);
 	ticks = timer->sticks;
 	if ((chip->image[CS4231_ALT_FEATURE_1] & CS4231_TIMER_ENABLE) == 0 ||
@@ -637,17 +637,17 @@ static int snd_cs4231_timer_start(snd_timer_t * timer)
 	return 0;
 }
 
-static int snd_cs4231_timer_stop(snd_timer_t * timer)
+static int snd_cs4231_timer_stop(struct snd_timer * timer)
 {
 	unsigned long flags;
-	cs4231_t *chip = snd_timer_chip(timer);
+	struct snd_cs4231 *chip = snd_timer_chip(timer);
 	spin_lock_irqsave(&chip->reg_lock, flags);
 	snd_cs4231_out(chip, CS4231_ALT_FEATURE_1, chip->image[CS4231_ALT_FEATURE_1] &= ~CS4231_TIMER_ENABLE);
 	spin_unlock_irqrestore(&chip->reg_lock, flags);
 	return 0;
 }
 
-static void snd_cs4231_init(cs4231_t *chip)
+static void snd_cs4231_init(struct snd_cs4231 *chip)
 {
 	unsigned long flags;
 
@@ -705,7 +705,7 @@ static void snd_cs4231_init(cs4231_t *chip)
 #endif
 }
 
-static int snd_cs4231_open(cs4231_t *chip, unsigned int mode)
+static int snd_cs4231_open(struct snd_cs4231 *chip, unsigned int mode)
 {
 	unsigned long flags;
 
@@ -741,7 +741,7 @@ static int snd_cs4231_open(cs4231_t *chip, unsigned int mode)
 	return 0;
 }
 
-static void snd_cs4231_close(cs4231_t *chip, unsigned int mode)
+static void snd_cs4231_close(struct snd_cs4231 *chip, unsigned int mode)
 {
 	unsigned long flags;
 
@@ -792,21 +792,21 @@ static void snd_cs4231_close(cs4231_t *chip, unsigned int mode)
  *  timer open/close
  */
 
-static int snd_cs4231_timer_open(snd_timer_t * timer)
+static int snd_cs4231_timer_open(struct snd_timer * timer)
 {
-	cs4231_t *chip = snd_timer_chip(timer);
+	struct snd_cs4231 *chip = snd_timer_chip(timer);
 	snd_cs4231_open(chip, CS4231_MODE_TIMER);
 	return 0;
 }
 
-static int snd_cs4231_timer_close(snd_timer_t * timer)
+static int snd_cs4231_timer_close(struct snd_timer * timer)
 {
-	cs4231_t *chip = snd_timer_chip(timer);
+	struct snd_cs4231 *chip = snd_timer_chip(timer);
 	snd_cs4231_close(chip, CS4231_MODE_TIMER);
 	return 0;
 }
 
-static struct _snd_timer_hardware snd_cs4231_timer_table =
+static struct snd_timer_hardware snd_cs4231_timer_table =
 {
 	.flags =	SNDRV_TIMER_HW_AUTO,
 	.resolution =	9945,
@@ -822,10 +822,10 @@ static struct _snd_timer_hardware snd_cs4231_timer_table =
  *  ok.. exported functions..
  */
 
-static int snd_cs4231_playback_hw_params(snd_pcm_substream_t * substream,
-					 snd_pcm_hw_params_t * hw_params)
+static int snd_cs4231_playback_hw_params(struct snd_pcm_substream *substream,
+					 struct snd_pcm_hw_params *hw_params)
 {
-	cs4231_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs4231 *chip = snd_pcm_substream_chip(substream);
 	unsigned char new_pdfr;
 	int err;
 
@@ -837,15 +837,15 @@ static int snd_cs4231_playback_hw_params(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_cs4231_playback_hw_free(snd_pcm_substream_t * substream)
+static int snd_cs4231_playback_hw_free(struct snd_pcm_substream *substream)
 {
 	return snd_pcm_lib_free_pages(substream);
 }
 
-static int snd_cs4231_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_cs4231_playback_prepare(struct snd_pcm_substream *substream)
 {
-	cs4231_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_cs4231 *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned long flags;
 	unsigned int size = snd_pcm_lib_buffer_bytes(substream);
 	unsigned int count = snd_pcm_lib_period_bytes(substream);
@@ -864,10 +864,10 @@ static int snd_cs4231_playback_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_cs4231_capture_hw_params(snd_pcm_substream_t * substream,
-					snd_pcm_hw_params_t * hw_params)
+static int snd_cs4231_capture_hw_params(struct snd_pcm_substream *substream,
+					struct snd_pcm_hw_params *hw_params)
 {
-	cs4231_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs4231 *chip = snd_pcm_substream_chip(substream);
 	unsigned char new_cdfr;
 	int err;
 
@@ -879,15 +879,15 @@ static int snd_cs4231_capture_hw_params(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_cs4231_capture_hw_free(snd_pcm_substream_t * substream)
+static int snd_cs4231_capture_hw_free(struct snd_pcm_substream *substream)
 {
 	return snd_pcm_lib_free_pages(substream);
 }
 
-static int snd_cs4231_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_cs4231_capture_prepare(struct snd_pcm_substream *substream)
 {
-	cs4231_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_cs4231 *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned long flags;
 	unsigned int size = snd_pcm_lib_buffer_bytes(substream);
 	unsigned int count = snd_pcm_lib_period_bytes(substream);
@@ -908,7 +908,7 @@ static int snd_cs4231_capture_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static void snd_cs4231_overrange(cs4231_t *chip)
+static void snd_cs4231_overrange(struct snd_cs4231 *chip)
 {
 	unsigned long flags;
 	unsigned char res;
@@ -922,7 +922,7 @@ static void snd_cs4231_overrange(cs4231_t *chip)
 
 irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	cs4231_t *chip = dev_id;
+	struct snd_cs4231 *chip = dev_id;
 	unsigned char status;
 
 	status = snd_cs4231_in(chip, CS4231_IRQ_STATUS);
@@ -962,9 +962,9 @@ irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 	return IRQ_HANDLED;
 }
 
-static snd_pcm_uframes_t snd_cs4231_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_cs4231_playback_pointer(struct snd_pcm_substream *substream)
 {
-	cs4231_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs4231 *chip = snd_pcm_substream_chip(substream);
 	size_t ptr;
 
 	if (!(chip->image[CS4231_IFACE_CTRL] & CS4231_PLAYBACK_ENABLE))
@@ -973,9 +973,9 @@ static snd_pcm_uframes_t snd_cs4231_playback_pointer(snd_pcm_substream_t * subst
 	return bytes_to_frames(substream->runtime, ptr);
 }
 
-static snd_pcm_uframes_t snd_cs4231_capture_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_cs4231_capture_pointer(struct snd_pcm_substream *substream)
 {
-	cs4231_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs4231 *chip = snd_pcm_substream_chip(substream);
 	size_t ptr;
 	
 	if (!(chip->image[CS4231_IFACE_CTRL] & CS4231_RECORD_ENABLE))
@@ -988,7 +988,7 @@ static snd_pcm_uframes_t snd_cs4231_capture_pointer(snd_pcm_substream_t * substr
 
  */
 
-static int snd_cs4231_probe(cs4231_t *chip)
+static int snd_cs4231_probe(struct snd_cs4231 *chip)
 {
 	unsigned long flags;
 	int i, id, rev;
@@ -1152,7 +1152,7 @@ static int snd_cs4231_probe(cs4231_t *chip)
 
  */
 
-static snd_pcm_hardware_t snd_cs4231_playback =
+static struct snd_pcm_hardware snd_cs4231_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID |
@@ -1173,7 +1173,7 @@ static snd_pcm_hardware_t snd_cs4231_playback =
 	.fifo_size =		0,
 };
 
-static snd_pcm_hardware_t snd_cs4231_capture =
+static struct snd_pcm_hardware snd_cs4231_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID |
@@ -1198,10 +1198,10 @@ static snd_pcm_hardware_t snd_cs4231_capture =
 
  */
 
-static int snd_cs4231_playback_open(snd_pcm_substream_t * substream)
+static int snd_cs4231_playback_open(struct snd_pcm_substream *substream)
 {
-	cs4231_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_cs4231 *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 
 	runtime->hw = snd_cs4231_playback;
@@ -1235,10 +1235,10 @@ static int snd_cs4231_playback_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_cs4231_capture_open(snd_pcm_substream_t * substream)
+static int snd_cs4231_capture_open(struct snd_pcm_substream *substream)
 {
-	cs4231_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_cs4231 *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 
 	runtime->hw = snd_cs4231_capture;
@@ -1268,18 +1268,18 @@ static int snd_cs4231_capture_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_cs4231_playback_close(snd_pcm_substream_t * substream)
+static int snd_cs4231_playback_close(struct snd_pcm_substream *substream)
 {
-	cs4231_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs4231 *chip = snd_pcm_substream_chip(substream);
 
 	chip->playback_substream = NULL;
 	snd_cs4231_close(chip, CS4231_MODE_PLAY);
 	return 0;
 }
 
-static int snd_cs4231_capture_close(snd_pcm_substream_t * substream)
+static int snd_cs4231_capture_close(struct snd_pcm_substream *substream)
 {
-	cs4231_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs4231 *chip = snd_pcm_substream_chip(substream);
 
 	chip->capture_substream = NULL;
 	snd_cs4231_close(chip, CS4231_MODE_RECORD);
@@ -1289,7 +1289,7 @@ static int snd_cs4231_capture_close(snd_pcm_substream_t * substream)
 #ifdef CONFIG_PM
 
 /* lowlevel suspend callback for CS4231 */
-static void snd_cs4231_suspend(cs4231_t *chip)
+static void snd_cs4231_suspend(struct snd_cs4231 *chip)
 {
 	int reg;
 	unsigned long flags;
@@ -1303,7 +1303,7 @@ static void snd_cs4231_suspend(cs4231_t *chip)
 }
 
 /* lowlevel resume callback for CS4231 */
-static void snd_cs4231_resume(cs4231_t *chip)
+static void snd_cs4231_resume(struct snd_cs4231 *chip)
 {
 	int reg;
 	unsigned long flags;
@@ -1344,24 +1344,24 @@ static void snd_cs4231_resume(cs4231_t *chip)
 #endif
 }
 
-static int snd_cs4231_pm_suspend(snd_card_t *card, pm_message_t state)
+static int snd_cs4231_pm_suspend(struct snd_card *card, pm_message_t state)
 {
-	cs4231_t *chip = card->pm_private_data;
+	struct snd_cs4231 *chip = card->pm_private_data;
 	if (chip->suspend)
 		chip->suspend(chip);
 	return 0;
 }
 
-static int snd_cs4231_pm_resume(snd_card_t *card)
+static int snd_cs4231_pm_resume(struct snd_card *card)
 {
-	cs4231_t *chip = card->pm_private_data;
+	struct snd_cs4231 *chip = card->pm_private_data;
 	if (chip->resume)
 		chip->resume(chip);
 	return 0;
 }
 #endif /* CONFIG_PM */
 
-static int snd_cs4231_free(cs4231_t *chip)
+static int snd_cs4231_free(struct snd_cs4231 *chip)
 {
 	release_and_free_resource(chip->res_port);
 	release_and_free_resource(chip->res_cport);
@@ -1384,13 +1384,13 @@ static int snd_cs4231_free(cs4231_t *chip)
 	return 0;
 }
 
-static int snd_cs4231_dev_free(snd_device_t *device)
+static int snd_cs4231_dev_free(struct snd_device *device)
 {
-	cs4231_t *chip = device->device_data;
+	struct snd_cs4231 *chip = device->device_data;
 	return snd_cs4231_free(chip);	
 }
 
-const char *snd_cs4231_chip_id(cs4231_t *chip)
+const char *snd_cs4231_chip_id(struct snd_cs4231 *chip)
 {
 	switch (chip->hardware) {
 	case CS4231_HW_CS4231:	return "CS4231";
@@ -1410,12 +1410,12 @@ const char *snd_cs4231_chip_id(cs4231_t *chip)
 	}
 }
 
-static int snd_cs4231_new(snd_card_t * card,
+static int snd_cs4231_new(struct snd_card *card,
 			  unsigned short hardware,
 			  unsigned short hwshare,
-			  cs4231_t ** rchip)
+			  struct snd_cs4231 ** rchip)
 {
-	cs4231_t *chip;
+	struct snd_cs4231 *chip;
 
 	*rchip = NULL;
 	chip = kzalloc(sizeof(*chip), GFP_KERNEL);
@@ -1437,18 +1437,18 @@ static int snd_cs4231_new(snd_card_t * card,
         return 0;
 }
 
-int snd_cs4231_create(snd_card_t * card,
+int snd_cs4231_create(struct snd_card *card,
 	              unsigned long port,
 	              unsigned long cport,
 		      int irq, int dma1, int dma2,
 		      unsigned short hardware,
 		      unsigned short hwshare,
-		      cs4231_t ** rchip)
+		      struct snd_cs4231 ** rchip)
 {
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_cs4231_dev_free,
 	};
-	cs4231_t *chip;
+	struct snd_cs4231 *chip;
 	int err;
 
 	err = snd_cs4231_new(card, hardware, hwshare, &chip);
@@ -1523,7 +1523,7 @@ int snd_cs4231_create(snd_card_t * card,
 	return 0;
 }
 
-static snd_pcm_ops_t snd_cs4231_playback_ops = {
+static struct snd_pcm_ops snd_cs4231_playback_ops = {
 	.open =		snd_cs4231_playback_open,
 	.close =	snd_cs4231_playback_close,
 	.ioctl =	snd_pcm_lib_ioctl,
@@ -1534,7 +1534,7 @@ static snd_pcm_ops_t snd_cs4231_playback_ops = {
 	.pointer =	snd_cs4231_playback_pointer,
 };
 
-static snd_pcm_ops_t snd_cs4231_capture_ops = {
+static struct snd_pcm_ops snd_cs4231_capture_ops = {
 	.open =		snd_cs4231_capture_open,
 	.close =	snd_cs4231_capture_close,
 	.ioctl =	snd_pcm_lib_ioctl,
@@ -1545,9 +1545,9 @@ static snd_pcm_ops_t snd_cs4231_capture_ops = {
 	.pointer =	snd_cs4231_capture_pointer,
 };
 
-int snd_cs4231_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm)
+int snd_cs4231_pcm(struct snd_cs4231 *chip, int device, struct snd_pcm **rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if ((err = snd_pcm_new(chip->card, "CS4231", device, 1, 1, &pcm)) < 0)
@@ -1579,16 +1579,16 @@ int snd_cs4231_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm)
 	return 0;
 }
 
-static void snd_cs4231_timer_free(snd_timer_t *timer)
+static void snd_cs4231_timer_free(struct snd_timer *timer)
 {
-	cs4231_t *chip = timer->private_data;
+	struct snd_cs4231 *chip = timer->private_data;
 	chip->timer = NULL;
 }
 
-int snd_cs4231_timer(cs4231_t *chip, int device, snd_timer_t **rtimer)
+int snd_cs4231_timer(struct snd_cs4231 *chip, int device, struct snd_timer **rtimer)
 {
-	snd_timer_t *timer;
-	snd_timer_id_t tid;
+	struct snd_timer *timer;
+	struct snd_timer_id tid;
 	int err;
 
 	/* Timer initialization */
@@ -1613,7 +1613,7 @@ int snd_cs4231_timer(cs4231_t *chip, int device, snd_timer_t **rtimer)
  *  MIXER part
  */
 
-static int snd_cs4231_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_cs4231_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[4] = {
 		"Line", "Aux", "Mic", "Mix"
@@ -1625,7 +1625,7 @@ static int snd_cs4231_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
 		"Line", "Synth", "Mic", "Mix"
 	};
 	char **ptexts = texts;
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 
 	snd_assert(chip->card != NULL, return -EINVAL);
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
@@ -1643,9 +1643,9 @@ static int snd_cs4231_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
 	return 0;
 }
 
-static int snd_cs4231_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4231_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	
 	spin_lock_irqsave(&chip->reg_lock, flags);
@@ -1655,9 +1655,9 @@ static int snd_cs4231_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
 	return 0;
 }
 
-static int snd_cs4231_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4231_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	unsigned short left, right;
 	int change;
@@ -1678,7 +1678,7 @@ static int snd_cs4231_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
 	return change;
 }
 
-int snd_cs4231_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+int snd_cs4231_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 16) & 0xff;
 
@@ -1689,9 +1689,9 @@ int snd_cs4231_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo
 	return 0;
 }
 
-int snd_cs4231_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+int snd_cs4231_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -1706,9 +1706,9 @@ int snd_cs4231_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucon
 	return 0;
 }
 
-int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+int snd_cs4231_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -1729,7 +1729,7 @@ int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucon
 	return change;
 }
 
-int snd_cs4231_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+int snd_cs4231_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 24) & 0xff;
 
@@ -1740,9 +1740,9 @@ int snd_cs4231_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo
 	return 0;
 }
 
-int snd_cs4231_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+int snd_cs4231_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -1762,9 +1762,9 @@ int snd_cs4231_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucon
 	return 0;
 }
 
-int snd_cs4231_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+int snd_cs4231_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -1793,7 +1793,7 @@ int snd_cs4231_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucon
 	return change;
 }
 
-static snd_kcontrol_new_t snd_cs4231_controls[] = {
+static struct snd_kcontrol_new snd_cs4231_controls[] = {
 CS4231_DOUBLE("PCM Playback Switch", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 7, 7, 1, 1),
 CS4231_DOUBLE("PCM Playback Volume", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 0, 0, 63, 1),
 CS4231_DOUBLE("Line Playback Switch", 0, CS4231_LEFT_LINE_IN, CS4231_RIGHT_LINE_IN, 7, 7, 1, 1),
@@ -1819,9 +1819,9 @@ CS4231_SINGLE("Loopback Capture Switch", 0, CS4231_LOOPBACK, 0, 1, 0),
 CS4231_SINGLE("Loopback Capture Volume", 0, CS4231_LOOPBACK, 2, 63, 1)
 };
                                         
-int snd_cs4231_mixer(cs4231_t *chip)
+int snd_cs4231_mixer(struct snd_cs4231 *chip)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	unsigned int idx;
 	int err;
 
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index d60a55e6a0b..a28f24c4f02 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -131,7 +131,7 @@ struct snd_card_cs4236 {
 #endif
 };
 
-static snd_card_t *snd_cs4236_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_cs4236_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
 #ifdef CONFIG_PNP
 
@@ -375,7 +375,7 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard,
 }
 #endif /* CONFIG_PNP */
 
-static void snd_card_cs4236_free(snd_card_t *card)
+static void snd_card_cs4236_free(struct snd_card *card)
 {
 	struct snd_card_cs4236 *acard = (struct snd_card_cs4236 *)card->private_data;
 
@@ -392,11 +392,11 @@ static void snd_card_cs4236_free(snd_card_t *card)
 static int __devinit snd_card_cs423x_probe(int dev, struct pnp_card_link *pcard,
 					   const struct pnp_card_device_id *pid)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	struct snd_card_cs4236 *acard;
-	snd_pcm_t *pcm = NULL;
-	cs4231_t *chip;
-	opl3_t *opl3;
+	struct snd_pcm *pcm = NULL;
+	struct snd_cs4231 *chip;
+	struct snd_opl3 *opl3;
 	int err;
 
 	if (! is_isapnp_selected(dev)) {
@@ -538,7 +538,7 @@ static int __devinit snd_cs423x_pnp_detect(struct pnp_card_link *card,
 
 static void __devexit snd_cs423x_pnp_remove(struct pnp_card_link * pcard)
 {
-	snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard);
+	struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
         
 	snd_card_disconnect(card);
 	snd_card_free_in_thread(card);
diff --git a/sound/isa/cs423x/cs4236_lib.c b/sound/isa/cs423x/cs4236_lib.c
index 1adb88d5f8f..e36981d64ec 100644
--- a/sound/isa/cs423x/cs4236_lib.c
+++ b/sound/isa/cs423x/cs4236_lib.c
@@ -122,13 +122,13 @@ static unsigned char snd_cs4236_ext_map[18] = {
  *
  */
 
-static void snd_cs4236_ctrl_out(cs4231_t *chip, unsigned char reg, unsigned char val)
+static void snd_cs4236_ctrl_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val)
 {
 	outb(reg, chip->cport + 3);
 	outb(chip->cimage[reg] = val, chip->cport + 4);
 }
 
-static unsigned char snd_cs4236_ctrl_in(cs4231_t *chip, unsigned char reg)
+static unsigned char snd_cs4236_ctrl_in(struct snd_cs4231 *chip, unsigned char reg)
 {
 	outb(reg, chip->cport + 3);
 	return inb(chip->cport + 4);
@@ -140,7 +140,7 @@ static unsigned char snd_cs4236_ctrl_in(cs4231_t *chip, unsigned char reg)
 
 #define CLOCKS 8
 
-static ratnum_t clocks[CLOCKS] = {
+static struct snd_ratnum clocks[CLOCKS] = {
 	{ .num = 16934400, .den_min = 353, .den_max = 353, .den_step = 1 },
 	{ .num = 16934400, .den_min = 529, .den_max = 529, .den_step = 1 },
 	{ .num = 16934400, .den_min = 617, .den_max = 617, .den_step = 1 },
@@ -151,12 +151,12 @@ static ratnum_t clocks[CLOCKS] = {
 	{ .num = 16934400/16, .den_min = 21, .den_max = 192, .den_step = 1 }
 };
 
-static snd_pcm_hw_constraint_ratnums_t hw_constraints_clocks = {
+static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = {
 	.nrats = CLOCKS,
 	.rats = clocks,
 };
 
-static int snd_cs4236_xrate(snd_pcm_runtime_t *runtime)
+static int snd_cs4236_xrate(struct snd_pcm_runtime *runtime)
 {
 	return snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
 					     &hw_constraints_clocks);
@@ -181,7 +181,7 @@ static unsigned char divisor_to_rate_register(unsigned int divisor)
 	}
 }
 
-static void snd_cs4236_playback_format(cs4231_t *chip, snd_pcm_hw_params_t *params, unsigned char pdfr)
+static void snd_cs4236_playback_format(struct snd_cs4231 *chip, struct snd_pcm_hw_params *params, unsigned char pdfr)
 {
 	unsigned long flags;
 	unsigned char rate = divisor_to_rate_register(params->rate_den);
@@ -195,7 +195,7 @@ static void snd_cs4236_playback_format(cs4231_t *chip, snd_pcm_hw_params_t *para
 	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
-static void snd_cs4236_capture_format(cs4231_t *chip, snd_pcm_hw_params_t *params, unsigned char cdfr)
+static void snd_cs4236_capture_format(struct snd_cs4231 *chip, struct snd_pcm_hw_params *params, unsigned char cdfr)
 {
 	unsigned long flags;
 	unsigned char rate = divisor_to_rate_register(params->rate_den);
@@ -211,7 +211,7 @@ static void snd_cs4236_capture_format(cs4231_t *chip, snd_pcm_hw_params_t *param
 
 #ifdef CONFIG_PM
 
-static void snd_cs4236_suspend(cs4231_t *chip)
+static void snd_cs4236_suspend(struct snd_cs4231 *chip)
 {
 	int reg;
 	unsigned long flags;
@@ -226,7 +226,7 @@ static void snd_cs4236_suspend(cs4231_t *chip)
 	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
-static void snd_cs4236_resume(cs4231_t *chip)
+static void snd_cs4236_resume(struct snd_cs4231 *chip)
 {
 	int reg;
 	unsigned long flags;
@@ -261,15 +261,15 @@ static void snd_cs4236_resume(cs4231_t *chip)
 
 #endif /* CONFIG_PM */
 
-int snd_cs4236_create(snd_card_t * card,
+int snd_cs4236_create(struct snd_card *card,
 		      unsigned long port,
 		      unsigned long cport,
 		      int irq, int dma1, int dma2,
 		      unsigned short hardware,
 		      unsigned short hwshare,
-		      cs4231_t ** rchip)
+		      struct snd_cs4231 ** rchip)
 {
-	cs4231_t *chip;
+	struct snd_cs4231 *chip;
 	unsigned char ver1, ver2;
 	unsigned int reg;
 	int err;
@@ -352,9 +352,9 @@ int snd_cs4236_create(snd_card_t * card,
 	return 0;
 }
 
-int snd_cs4236_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm)
+int snd_cs4236_pcm(struct snd_cs4231 *chip, int device, struct snd_pcm **rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 	
 	if ((err = snd_cs4231_pcm(chip, device, &pcm)) < 0)
@@ -375,7 +375,7 @@ int snd_cs4236_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm)
   .get = snd_cs4236_get_single, .put = snd_cs4236_put_single, \
   .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }
 
-static int snd_cs4236_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_cs4236_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 16) & 0xff;
 
@@ -386,9 +386,9 @@ static int snd_cs4236_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_cs4236_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4236_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -403,9 +403,9 @@ static int snd_cs4236_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_cs4236_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4236_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -432,9 +432,9 @@ static int snd_cs4236_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
   .get = snd_cs4236_get_singlec, .put = snd_cs4236_put_singlec, \
   .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }
 
-static int snd_cs4236_get_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4236_get_singlec(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -449,9 +449,9 @@ static int snd_cs4236_get_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
 	return 0;
 }
 
-static int snd_cs4236_put_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4236_put_singlec(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -478,7 +478,7 @@ static int snd_cs4236_put_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
   .get = snd_cs4236_get_double, .put = snd_cs4236_put_double, \
   .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) }
 
-static int snd_cs4236_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_cs4236_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 24) & 0xff;
 
@@ -489,9 +489,9 @@ static int snd_cs4236_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_cs4236_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4236_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -511,9 +511,9 @@ static int snd_cs4236_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_cs4236_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4236_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -554,9 +554,9 @@ static int snd_cs4236_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
   .get = snd_cs4236_get_double1, .put = snd_cs4236_put_double1, \
   .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) }
 
-static int snd_cs4236_get_double1(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4236_get_double1(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -576,9 +576,9 @@ static int snd_cs4236_get_double1(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
 	return 0;
 }
 
-static int snd_cs4236_put_double1(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4236_put_double1(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -618,9 +618,9 @@ static inline int snd_cs4236_mixer_master_digital_invert_volume(int vol)
 	return (vol < 64) ? 63 - vol : 64 + (71 - vol);
 }        
 
-static int snd_cs4236_get_master_digital(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4236_get_master_digital(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	
 	spin_lock_irqsave(&chip->reg_lock, flags);
@@ -630,9 +630,9 @@ static int snd_cs4236_get_master_digital(snd_kcontrol_t * kcontrol, snd_ctl_elem
 	return 0;
 }
 
-static int snd_cs4236_put_master_digital(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4236_put_master_digital(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int change;
 	unsigned short val1, val2;
@@ -677,9 +677,9 @@ static inline int snd_cs4235_mixer_output_accu_set_volume(int vol)
 	return 1 << 5;
 }
 
-static int snd_cs4235_get_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4235_get_output_accu(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	
 	spin_lock_irqsave(&chip->reg_lock, flags);
@@ -689,9 +689,9 @@ static int snd_cs4235_get_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
 	return 0;
 }
 
-static int snd_cs4235_put_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4235_put_output_accu(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int change;
 	unsigned short val1, val2;
@@ -708,7 +708,7 @@ static int snd_cs4235_put_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
 	return change;
 }
 
-static snd_kcontrol_new_t snd_cs4236_controls[] = {
+static struct snd_kcontrol_new snd_cs4236_controls[] = {
 
 CS4236_DOUBLE("Master Digital Playback Switch", 0, CS4236_LEFT_MASTER, CS4236_RIGHT_MASTER, 7, 7, 1, 1),
 CS4236_DOUBLE("Master Digital Capture Switch", 0, CS4236_DAC_MUTE, CS4236_DAC_MUTE, 7, 6, 1, 1),
@@ -759,7 +759,7 @@ CS4231_SINGLE("Digital Loopback Playback Switch", 0, CS4231_LOOPBACK, 0, 1, 0),
 CS4236_DOUBLE1("Digital Loopback Playback Volume", 0, CS4231_LOOPBACK, CS4236_RIGHT_LOOPBACK, 2, 0, 63, 1)
 };
 
-static snd_kcontrol_new_t snd_cs4235_controls[] = {
+static struct snd_kcontrol_new snd_cs4235_controls[] = {
 
 CS4231_DOUBLE("Master Switch", 0, CS4235_LEFT_MASTER, CS4235_RIGHT_MASTER, 7, 7, 1, 1),
 CS4231_DOUBLE("Master Volume", 0, CS4235_LEFT_MASTER, CS4235_RIGHT_MASTER, 0, 0, 31, 1),
@@ -812,9 +812,9 @@ CS4231_DOUBLE("Analog Loopback Switch", 0, CS4231_LEFT_INPUT, CS4231_RIGHT_INPUT
   .get = snd_cs4236_get_iec958_switch, .put = snd_cs4236_put_iec958_switch, \
   .private_value = 1 << 16 }
 
-static int snd_cs4236_get_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4236_get_iec958_switch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	
 	spin_lock_irqsave(&chip->reg_lock, flags);
@@ -832,9 +832,9 @@ static int snd_cs4236_get_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_
 	return 0;
 }
 
-static int snd_cs4236_put_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs4236_put_iec958_switch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs4231_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int change;
 	unsigned short enable, val;
@@ -868,7 +868,7 @@ static int snd_cs4236_put_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_
 	return change;
 }
 
-static snd_kcontrol_new_t snd_cs4236_iec958_controls[] = {
+static struct snd_kcontrol_new snd_cs4236_iec958_controls[] = {
 CS4236_IEC958_ENABLE("IEC958 Output Enable", 0),
 CS4236_SINGLEC("IEC958 Output Validity", 0, 4, 4, 1, 0),
 CS4236_SINGLEC("IEC958 Output User", 0, 4, 5, 1, 0),
@@ -877,12 +877,12 @@ CS4236_SINGLEC("IEC958 Output Channel Status Low", 0, 5, 1, 127, 0),
 CS4236_SINGLEC("IEC958 Output Channel Status High", 0, 6, 0, 255, 0)
 };
 
-static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4235[] = {
+static struct snd_kcontrol_new snd_cs4236_3d_controls_cs4235[] = {
 CS4236_SINGLEC("3D Control - Switch", 0, 3, 4, 1, 0),
 CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1)
 };
 
-static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4237[] = {
+static struct snd_kcontrol_new snd_cs4236_3d_controls_cs4237[] = {
 CS4236_SINGLEC("3D Control - Switch", 0, 3, 7, 1, 0),
 CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1),
 CS4236_SINGLEC("3D Control - Center", 0, 2, 0, 15, 1),
@@ -890,19 +890,19 @@ CS4236_SINGLEC("3D Control - Mono", 0, 3, 6, 1, 0),
 CS4236_SINGLEC("3D Control - IEC958", 0, 3, 5, 1, 0)
 };
 
-static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4238[] = {
+static struct snd_kcontrol_new snd_cs4236_3d_controls_cs4238[] = {
 CS4236_SINGLEC("3D Control - Switch", 0, 3, 4, 1, 0),
 CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1),
 CS4236_SINGLEC("3D Control - Volume", 0, 2, 0, 15, 1),
 CS4236_SINGLEC("3D Control - IEC958", 0, 3, 5, 1, 0)
 };
 
-int snd_cs4236_mixer(cs4231_t *chip)
+int snd_cs4236_mixer(struct snd_cs4231 *chip)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	unsigned int idx, count;
 	int err;
-	snd_kcontrol_new_t *kcontrol;
+	struct snd_kcontrol_new *kcontrol;
 
 	snd_assert(chip != NULL && chip->card != NULL, return -EINVAL);
 	card = chip->card;
-- 
cgit v1.2.3-70-g09d2


From d3a7e476740dc23588ea65fa0df1aacdf8e70003 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:31:42 +0100
Subject: [ALSA] Remove xxx_t typedefs: ISA ES1688

Modules: ES1688 driver

Remove xxx_t typedefs from the ISA ES1688 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/es1688.h        |  22 +++----
 sound/isa/es1688/es1688.c     |  10 +--
 sound/isa/es1688/es1688_lib.c | 150 +++++++++++++++++++++---------------------
 3 files changed, 90 insertions(+), 92 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/es1688.h b/include/sound/es1688.h
index 604f495bc8b..fc1c47dae3d 100644
--- a/include/sound/es1688.h
+++ b/include/sound/es1688.h
@@ -30,7 +30,7 @@
 #define ES1688_HW_688		0x0001
 #define ES1688_HW_1688		0x0002
 
-struct _snd_es1688 {
+struct snd_es1688 {
 	unsigned long port;		/* port of ESS chip */
 	struct resource *res_port;
 	unsigned long mpu_port;		/* MPU-401 port of ESS chip */
@@ -44,17 +44,15 @@ struct _snd_es1688 {
 	unsigned char pad;
 	unsigned int dma_size;
 
-	snd_card_t *card;
-	snd_pcm_t *pcm;
-	snd_pcm_substream_t *playback_substream;
-	snd_pcm_substream_t *capture_substream;
+	struct snd_card *card;
+	struct snd_pcm *pcm;
+	struct snd_pcm_substream *playback_substream;
+	struct snd_pcm_substream *capture_substream;
 
 	spinlock_t reg_lock;
 	spinlock_t mixer_lock;
 };
 
-typedef struct _snd_es1688 es1688_t;
-
 /* I/O ports */
 
 #define ES1688P(codec, x) ((codec)->port + e_s_s_ESS1688##x)
@@ -107,17 +105,17 @@ typedef struct _snd_es1688 es1688_t;
 
  */
 
-void snd_es1688_mixer_write(es1688_t *chip, unsigned char reg, unsigned char data);
+void snd_es1688_mixer_write(struct snd_es1688 *chip, unsigned char reg, unsigned char data);
 
-int snd_es1688_create(snd_card_t * card,
+int snd_es1688_create(struct snd_card *card,
 		      unsigned long port,
 		      unsigned long mpu_port,
 		      int irq,
 		      int mpu_irq,
 		      int dma8,
 		      unsigned short hardware,
-		      es1688_t ** rchip);
-int snd_es1688_pcm(es1688_t *chip, int device, snd_pcm_t ** rpcm);
-int snd_es1688_mixer(es1688_t *chip);
+		      struct snd_es1688 ** rchip);
+int snd_es1688_pcm(struct snd_es1688 *chip, int device, struct snd_pcm ** rpcm);
+int snd_es1688_mixer(struct snd_es1688 *chip);
 
 #endif /* __SOUND_ES1688_H */
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index 26a7d335ed8..278511bd095 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -68,7 +68,7 @@ MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for ESx688 driver.");
 module_param_array(dma8, int, NULL, 0444);
 MODULE_PARM_DESC(dma8, "8-bit DMA # for ESx688 driver.");
 
-static snd_card_t *snd_audiodrive_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_audiodrive_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
 #define PFX	"es1688: "
 
@@ -77,10 +77,10 @@ static int __init snd_audiodrive_probe(int dev)
 	static int possible_irqs[] = {5, 9, 10, 7, -1};
 	static int possible_dmas[] = {1, 3, 0, -1};
 	int xirq, xdma, xmpu_irq;
-	snd_card_t *card;
-	es1688_t *chip;
-	opl3_t *opl3;
-	snd_pcm_t *pcm;
+	struct snd_card *card;
+	struct snd_es1688 *chip;
+	struct snd_opl3 *opl3;
+	struct snd_pcm *pcm;
 	int err;
 
 	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c
index 841e9ac8c66..702ad51ee9d 100644
--- a/sound/isa/es1688/es1688_lib.c
+++ b/sound/isa/es1688/es1688_lib.c
@@ -36,7 +36,7 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("ESS ESx688 lowlevel module");
 MODULE_LICENSE("GPL");
 
-static int snd_es1688_dsp_command(es1688_t *chip, unsigned char val)
+static int snd_es1688_dsp_command(struct snd_es1688 *chip, unsigned char val)
 {
 	int i;
 
@@ -51,7 +51,7 @@ static int snd_es1688_dsp_command(es1688_t *chip, unsigned char val)
 	return 0;
 }
 
-static int snd_es1688_dsp_get_byte(es1688_t *chip)
+static int snd_es1688_dsp_get_byte(struct snd_es1688 *chip)
 {
 	int i;
 
@@ -62,7 +62,7 @@ static int snd_es1688_dsp_get_byte(es1688_t *chip)
 	return -ENODEV;
 }
 
-static int snd_es1688_write(es1688_t *chip,
+static int snd_es1688_write(struct snd_es1688 *chip,
 			    unsigned char reg, unsigned char data)
 {
 	if (!snd_es1688_dsp_command(chip, reg))
@@ -70,7 +70,7 @@ static int snd_es1688_write(es1688_t *chip,
 	return snd_es1688_dsp_command(chip, data);
 }
 
-static int snd_es1688_read(es1688_t *chip, unsigned char reg)
+static int snd_es1688_read(struct snd_es1688 *chip, unsigned char reg)
 {
 	/* Read a byte from an extended mode register of ES1688 */
 	if (!snd_es1688_dsp_command(chip, 0xc0))
@@ -80,7 +80,7 @@ static int snd_es1688_read(es1688_t *chip, unsigned char reg)
 	return snd_es1688_dsp_get_byte(chip);
 }
 
-void snd_es1688_mixer_write(es1688_t *chip,
+void snd_es1688_mixer_write(struct snd_es1688 *chip,
 			    unsigned char reg, unsigned char data)
 {
 	outb(reg, ES1688P(chip, MIXER_ADDR));
@@ -89,7 +89,7 @@ void snd_es1688_mixer_write(es1688_t *chip,
 	udelay(10);
 }
 
-static unsigned char snd_es1688_mixer_read(es1688_t *chip, unsigned char reg)
+static unsigned char snd_es1688_mixer_read(struct snd_es1688 *chip, unsigned char reg)
 {
 	unsigned char result;
 
@@ -100,7 +100,7 @@ static unsigned char snd_es1688_mixer_read(es1688_t *chip, unsigned char reg)
 	return result;
 }
 
-static int snd_es1688_reset(es1688_t *chip)
+static int snd_es1688_reset(struct snd_es1688 *chip)
 {
 	int i;
 
@@ -117,7 +117,7 @@ static int snd_es1688_reset(es1688_t *chip)
 	return 0;
 }
 
-static int snd_es1688_probe(es1688_t *chip)
+static int snd_es1688_probe(struct snd_es1688 *chip)
 {
 	unsigned long flags;
 	unsigned short major, minor, hw;
@@ -191,7 +191,7 @@ static int snd_es1688_probe(es1688_t *chip)
 	return 0;
 }
 
-static int snd_es1688_init(es1688_t * chip, int enable)
+static int snd_es1688_init(struct snd_es1688 * chip, int enable)
 {
 	static int irqs[16] = {-1, -1, 0, -1, -1, 1, -1, 2, -1, 0, 3, -1, -1, -1, -1, -1};
 	unsigned long flags;
@@ -283,7 +283,7 @@ static int snd_es1688_init(es1688_t * chip, int enable)
 
  */
 
-static ratnum_t clocks[2] = {
+static struct snd_ratnum clocks[2] = {
 	{
 		.num = 795444,
 		.den_min = 1,
@@ -298,14 +298,14 @@ static ratnum_t clocks[2] = {
 	}
 };
 
-static snd_pcm_hw_constraint_ratnums_t hw_constraints_clocks  = {
+static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks  = {
 	.nrats = 2,
 	.rats = clocks,
 };
 
-static void snd_es1688_set_rate(es1688_t *chip, snd_pcm_substream_t *substream)
+static void snd_es1688_set_rate(struct snd_es1688 *chip, struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned int bits, divider;
 
 	if (runtime->rate_num == clocks[0].num)
@@ -319,13 +319,13 @@ static void snd_es1688_set_rate(es1688_t *chip, snd_pcm_substream_t *substream)
 	snd_es1688_write(chip, 0xa2, divider);
 }
 
-static int snd_es1688_ioctl(snd_pcm_substream_t * substream,
+static int snd_es1688_ioctl(struct snd_pcm_substream *substream,
 			    unsigned int cmd, void *arg)
 {
 	return snd_pcm_lib_ioctl(substream, cmd, arg);
 }
 
-static int snd_es1688_trigger(es1688_t *chip, int cmd, unsigned char value)
+static int snd_es1688_trigger(struct snd_es1688 *chip, int cmd, unsigned char value)
 {
 	int val;
 
@@ -350,22 +350,22 @@ static int snd_es1688_trigger(es1688_t *chip, int cmd, unsigned char value)
 	return 0;
 }
 
-static int snd_es1688_hw_params(snd_pcm_substream_t * substream,
-				snd_pcm_hw_params_t * hw_params)
+static int snd_es1688_hw_params(struct snd_pcm_substream *substream,
+				struct snd_pcm_hw_params *hw_params)
 {
 	return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
 }
 
-static int snd_es1688_hw_free(snd_pcm_substream_t * substream)
+static int snd_es1688_hw_free(struct snd_pcm_substream *substream)
 {
 	return snd_pcm_lib_free_pages(substream);
 }
 
-static int snd_es1688_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_es1688_playback_prepare(struct snd_pcm_substream *substream)
 {
 	unsigned long flags;
-	es1688_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_es1688 *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned int size = snd_pcm_lib_buffer_bytes(substream);
 	unsigned int count = snd_pcm_lib_period_bytes(substream);
 
@@ -415,18 +415,18 @@ static int snd_es1688_playback_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_es1688_playback_trigger(snd_pcm_substream_t * substream,
+static int snd_es1688_playback_trigger(struct snd_pcm_substream *substream,
 				       int cmd)
 {
-	es1688_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_es1688 *chip = snd_pcm_substream_chip(substream);
 	return snd_es1688_trigger(chip, cmd, 0x05);
 }
 
-static int snd_es1688_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_es1688_capture_prepare(struct snd_pcm_substream *substream)
 {
 	unsigned long flags;
-	es1688_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_es1688 *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned int size = snd_pcm_lib_buffer_bytes(substream);
 	unsigned int count = snd_pcm_lib_period_bytes(substream);
 
@@ -472,16 +472,16 @@ static int snd_es1688_capture_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_es1688_capture_trigger(snd_pcm_substream_t * substream,
+static int snd_es1688_capture_trigger(struct snd_pcm_substream *substream,
 				      int cmd)
 {
-	es1688_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_es1688 *chip = snd_pcm_substream_chip(substream);
 	return snd_es1688_trigger(chip, cmd, 0x0f);
 }
 
 static irqreturn_t snd_es1688_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	es1688_t *chip = dev_id;
+	struct snd_es1688 *chip = dev_id;
 
 	if (chip->trigger_value == 0x05)	/* ok.. playback is active */
 		snd_pcm_period_elapsed(chip->playback_substream);
@@ -492,9 +492,9 @@ static irqreturn_t snd_es1688_interrupt(int irq, void *dev_id, struct pt_regs *r
 	return IRQ_HANDLED;
 }
 
-static snd_pcm_uframes_t snd_es1688_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_es1688_playback_pointer(struct snd_pcm_substream *substream)
 {
-	es1688_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_es1688 *chip = snd_pcm_substream_chip(substream);
 	size_t ptr;
 	
 	if (chip->trigger_value != 0x05)
@@ -503,9 +503,9 @@ static snd_pcm_uframes_t snd_es1688_playback_pointer(snd_pcm_substream_t * subst
 	return bytes_to_frames(substream->runtime, ptr);
 }
 
-static snd_pcm_uframes_t snd_es1688_capture_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_es1688_capture_pointer(struct snd_pcm_substream *substream)
 {
-	es1688_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_es1688 *chip = snd_pcm_substream_chip(substream);
 	size_t ptr;
 	
 	if (chip->trigger_value != 0x0f)
@@ -518,7 +518,7 @@ static snd_pcm_uframes_t snd_es1688_capture_pointer(snd_pcm_substream_t * substr
 
  */
 
-static snd_pcm_hardware_t snd_es1688_playback =
+static struct snd_pcm_hardware snd_es1688_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
@@ -536,7 +536,7 @@ static snd_pcm_hardware_t snd_es1688_playback =
 	.fifo_size =		0,
 };
 
-static snd_pcm_hardware_t snd_es1688_capture =
+static struct snd_pcm_hardware snd_es1688_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
@@ -558,10 +558,10 @@ static snd_pcm_hardware_t snd_es1688_capture =
 
  */
 
-static int snd_es1688_playback_open(snd_pcm_substream_t * substream)
+static int snd_es1688_playback_open(struct snd_pcm_substream *substream)
 {
-	es1688_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_es1688 *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	if (chip->capture_substream != NULL)
 		return -EAGAIN;
@@ -572,10 +572,10 @@ static int snd_es1688_playback_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_es1688_capture_open(snd_pcm_substream_t * substream)
+static int snd_es1688_capture_open(struct snd_pcm_substream *substream)
 {
-	es1688_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_es1688 *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	if (chip->playback_substream != NULL)
 		return -EAGAIN;
@@ -586,23 +586,23 @@ static int snd_es1688_capture_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_es1688_playback_close(snd_pcm_substream_t * substream)
+static int snd_es1688_playback_close(struct snd_pcm_substream *substream)
 {
-	es1688_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_es1688 *chip = snd_pcm_substream_chip(substream);
 
 	chip->playback_substream = NULL;
 	return 0;
 }
 
-static int snd_es1688_capture_close(snd_pcm_substream_t * substream)
+static int snd_es1688_capture_close(struct snd_pcm_substream *substream)
 {
-	es1688_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_es1688 *chip = snd_pcm_substream_chip(substream);
 
 	chip->capture_substream = NULL;
 	return 0;
 }
 
-static int snd_es1688_free(es1688_t *chip)
+static int snd_es1688_free(struct snd_es1688 *chip)
 {
 	if (chip->res_port) {
 		snd_es1688_init(chip, 0);
@@ -618,33 +618,33 @@ static int snd_es1688_free(es1688_t *chip)
 	return 0;
 }
 
-static int snd_es1688_dev_free(snd_device_t *device)
+static int snd_es1688_dev_free(struct snd_device *device)
 {
-	es1688_t *chip = device->device_data;
+	struct snd_es1688 *chip = device->device_data;
 	return snd_es1688_free(chip);
 }
 
-static const char *snd_es1688_chip_id(es1688_t *chip)
+static const char *snd_es1688_chip_id(struct snd_es1688 *chip)
 {
 	static char tmp[16];
 	sprintf(tmp, "ES%s688 rev %i", chip->hardware == ES1688_HW_688 ? "" : "1", chip->version & 0x0f);
 	return tmp;
 }
 
-int snd_es1688_create(snd_card_t * card,
+int snd_es1688_create(struct snd_card *card,
 		      unsigned long port,
 		      unsigned long mpu_port,
 		      int irq,
 		      int mpu_irq,
 		      int dma8,
 		      unsigned short hardware,
-		      es1688_t **rchip)
+		      struct snd_es1688 **rchip)
 {
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_es1688_dev_free,
 	};
                                 
-	es1688_t *chip;
+	struct snd_es1688 *chip;
 	int err;
 
 	*rchip = NULL;
@@ -702,7 +702,7 @@ int snd_es1688_create(snd_card_t * card,
 	return 0;
 }
 
-static snd_pcm_ops_t snd_es1688_playback_ops = {
+static struct snd_pcm_ops snd_es1688_playback_ops = {
 	.open =			snd_es1688_playback_open,
 	.close =		snd_es1688_playback_close,
 	.ioctl =		snd_es1688_ioctl,
@@ -713,7 +713,7 @@ static snd_pcm_ops_t snd_es1688_playback_ops = {
 	.pointer =		snd_es1688_playback_pointer,
 };
 
-static snd_pcm_ops_t snd_es1688_capture_ops = {
+static struct snd_pcm_ops snd_es1688_capture_ops = {
 	.open =			snd_es1688_capture_open,
 	.close =		snd_es1688_capture_close,
 	.ioctl =		snd_es1688_ioctl,
@@ -724,9 +724,9 @@ static snd_pcm_ops_t snd_es1688_capture_ops = {
 	.pointer =		snd_es1688_capture_pointer,
 };
 
-int snd_es1688_pcm(es1688_t * chip, int device, snd_pcm_t ** rpcm)
+int snd_es1688_pcm(struct snd_es1688 * chip, int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if ((err = snd_pcm_new(chip->card, "ESx688", device, 1, 1, &pcm)) < 0)
@@ -753,7 +753,7 @@ int snd_es1688_pcm(es1688_t * chip, int device, snd_pcm_t ** rpcm)
  *  MIXER part
  */
 
-static int snd_es1688_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_es1688_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[9] = {
 		"Mic", "Mic Master", "CD", "AOUT",
@@ -769,16 +769,16 @@ static int snd_es1688_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
 	return 0;
 }
 
-static int snd_es1688_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_es1688_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	es1688_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol);
 	ucontrol->value.enumerated.item[0] = snd_es1688_mixer_read(chip, ES1688_REC_DEV) & 7;
 	return 0;
 }
 
-static int snd_es1688_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_es1688_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	es1688_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	unsigned char oval, nval;
 	int change;
@@ -801,7 +801,7 @@ static int snd_es1688_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
   .get = snd_es1688_get_single, .put = snd_es1688_put_single, \
   .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }
 
-static int snd_es1688_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_es1688_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 16) & 0xff;
 
@@ -812,9 +812,9 @@ static int snd_es1688_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_es1688_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_es1688_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	es1688_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -829,9 +829,9 @@ static int snd_es1688_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_es1688_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_es1688_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	es1688_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -860,7 +860,7 @@ static int snd_es1688_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
   .get = snd_es1688_get_double, .put = snd_es1688_put_double, \
   .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) }
 
-static int snd_es1688_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_es1688_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 24) & 0xff;
 
@@ -871,9 +871,9 @@ static int snd_es1688_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_es1688_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_es1688_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	es1688_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -905,9 +905,9 @@ static int snd_es1688_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_es1688_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_es1688_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	es1688_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -968,7 +968,7 @@ static int snd_es1688_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return change;
 }
 
-static snd_kcontrol_new_t snd_es1688_controls[] = {
+static struct snd_kcontrol_new snd_es1688_controls[] = {
 ES1688_DOUBLE("Master Playback Volume", 0, ES1688_MASTER_DEV, ES1688_MASTER_DEV, 4, 0, 15, 0),
 ES1688_DOUBLE("PCM Playback Volume", 0, ES1688_PCM_DEV, ES1688_PCM_DEV, 4, 0, 15, 0),
 ES1688_DOUBLE("Line Playback Volume", 0, ES1688_LINE_DEV, ES1688_LINE_DEV, 4, 0, 15, 0),
@@ -1003,9 +1003,9 @@ static unsigned char snd_es1688_init_table[][2] = {
 	{ ES1688_REC_DEV, 0x17 }
 };
                                         
-int snd_es1688_mixer(es1688_t *chip)
+int snd_es1688_mixer(struct snd_es1688 *chip)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	unsigned int idx;
 	int err;
 	unsigned char reg, val;
-- 
cgit v1.2.3-70-g09d2


From 029d64b0cfa30abc10f722e2f67d282abe09c9da Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:34:36 +0100
Subject: [ALSA] Remove xxx_t typedefs: ISA SB8/SB16/SBAWE

Remove xxx_t typedefs from the ISA SB8/SB16/SBAWE drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/emu8000.h         |  39 ++++-----
 include/sound/sb.h              |  66 ++++++++-------
 include/sound/sb16_csp.h        |  52 ++++++------
 sound/isa/sb/emu8000.c          | 121 ++++++++++++++--------------
 sound/isa/sb/emu8000_callback.c | 107 ++++++++++++------------
 sound/isa/sb/emu8000_local.h    |  13 +--
 sound/isa/sb/emu8000_patch.c    |  20 ++---
 sound/isa/sb/emu8000_pcm.c      | 104 ++++++++++++------------
 sound/isa/sb/emu8000_synth.c    |  17 ++--
 sound/isa/sb/es968.c            |   8 +-
 sound/isa/sb/sb16.c             |  16 ++--
 sound/isa/sb/sb16_csp.c         | 174 ++++++++++++++++++++--------------------
 sound/isa/sb/sb16_main.c        | 120 +++++++++++++--------------
 sound/isa/sb/sb8.c              |  12 +--
 sound/isa/sb/sb8_main.c         |  88 ++++++++++----------
 sound/isa/sb/sb8_midi.c         |  44 +++++-----
 sound/isa/sb/sb_common.c        |  24 +++---
 sound/isa/sb/sb_mixer.c         |  68 ++++++++--------
 18 files changed, 551 insertions(+), 542 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/emu8000.h b/include/sound/emu8000.h
index 4362c54e09d..c8f66bde6d9 100644
--- a/include/sound/emu8000.h
+++ b/include/sound/emu8000.h
@@ -56,9 +56,9 @@ enum {
  * some of the channels may be used for other things so max_channels is
  * the number in use for wave voices.
  */
-typedef struct snd_emu8000 {
+struct snd_emu8000 {
 
-	snd_emux_t *emu;
+	struct snd_emux *emu;
 
 	int index;		/* sequencer client index */
 	int seq_ports;		/* number of sequencer ports */
@@ -77,44 +77,45 @@ typedef struct snd_emu8000 {
 
 	int dram_checked;
 
-	snd_card_t *card;		/* The card that this belongs to */
+	struct snd_card *card;		/* The card that this belongs to */
 
 	int chorus_mode;
 	int reverb_mode;
 	int bass_level;
 	int treble_level;
 
-	snd_util_memhdr_t *memhdr;
+	struct snd_util_memhdr *memhdr;
 
 	spinlock_t control_lock;
-	snd_kcontrol_t *controls[EMU8000_NUM_CONTROLS];
+	struct snd_kcontrol *controls[EMU8000_NUM_CONTROLS];
 
-	snd_pcm_t *pcm; /* pcm on emu8000 wavetable */
+	struct snd_pcm *pcm; /* pcm on emu8000 wavetable */
 
-} emu8000_t;
+};
 
 /* sequencer device id */
 #define SNDRV_SEQ_DEV_ID_EMU8000	"emu8000-synth"
 
 
 /* exported functions */
-int snd_emu8000_new(snd_card_t *card, int device, long port, int seq_ports, snd_seq_device_t **ret);
-void snd_emu8000_poke(emu8000_t *emu, unsigned int port, unsigned int reg,
+int snd_emu8000_new(struct snd_card *card, int device, long port, int seq_ports,
+		    struct snd_seq_device **ret);
+void snd_emu8000_poke(struct snd_emu8000 *emu, unsigned int port, unsigned int reg,
 		      unsigned int val);
-unsigned short snd_emu8000_peek(emu8000_t *emu, unsigned int port,
+unsigned short snd_emu8000_peek(struct snd_emu8000 *emu, unsigned int port,
 				unsigned int reg);
-void snd_emu8000_poke_dw(emu8000_t *emu, unsigned int port, unsigned int reg,
+void snd_emu8000_poke_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg,
 			 unsigned int val);
-unsigned int snd_emu8000_peek_dw(emu8000_t *emu, unsigned int port,
+unsigned int snd_emu8000_peek_dw(struct snd_emu8000 *emu, unsigned int port,
 				 unsigned int reg);
-void snd_emu8000_dma_chan(emu8000_t *emu, int ch, int mode);
+void snd_emu8000_dma_chan(struct snd_emu8000 *emu, int ch, int mode);
 
-void snd_emu8000_init_fm(emu8000_t *emu);
+void snd_emu8000_init_fm(struct snd_emu8000 *emu);
 
-void snd_emu8000_update_chorus_mode(emu8000_t *emu);
-void snd_emu8000_update_reverb_mode(emu8000_t *emu);
-void snd_emu8000_update_equalizer(emu8000_t *emu);
-int snd_emu8000_load_chorus_fx(emu8000_t *emu, int mode, const void __user *buf, long len);
-int snd_emu8000_load_reverb_fx(emu8000_t *emu, int mode, const void __user *buf, long len);
+void snd_emu8000_update_chorus_mode(struct snd_emu8000 *emu);
+void snd_emu8000_update_reverb_mode(struct snd_emu8000 *emu);
+void snd_emu8000_update_equalizer(struct snd_emu8000 *emu);
+int snd_emu8000_load_chorus_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len);
+int snd_emu8000_load_reverb_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len);
 
 #endif /* __SOUND_EMU8000_H */
diff --git a/include/sound/sb.h b/include/sound/sb.h
index 7960452445e..8e82460c4d3 100644
--- a/include/sound/sb.h
+++ b/include/sound/sb.h
@@ -60,7 +60,7 @@ enum sb_hw_type {
 
 #define SB_MPU_INPUT		1
 
-struct _snd_sb {
+struct snd_sb {
 	unsigned long port;		/* base port of DSP chip */
 	struct resource *res_port;
 	unsigned long mpu_port;		/* MPU port for SB DSP 4.0+ */
@@ -92,25 +92,23 @@ struct _snd_sb {
 
 	void *csp; /* used only when CONFIG_SND_SB16_CSP is set */
 
-	snd_card_t *card;
-	snd_pcm_t *pcm;
-	snd_pcm_substream_t *playback_substream;
-	snd_pcm_substream_t *capture_substream;
+	struct snd_card *card;
+	struct snd_pcm *pcm;
+	struct snd_pcm_substream *playback_substream;
+	struct snd_pcm_substream *capture_substream;
 
-	snd_rawmidi_t *rmidi;
-	snd_rawmidi_substream_t *midi_substream_input;
-	snd_rawmidi_substream_t *midi_substream_output;
+	struct snd_rawmidi *rmidi;
+	struct snd_rawmidi_substream *midi_substream_input;
+	struct snd_rawmidi_substream *midi_substream_output;
 	irqreturn_t (*rmidi_callback)(int irq, void *dev_id, struct pt_regs *regs);
 
 	spinlock_t reg_lock;
 	spinlock_t open_lock;
 	spinlock_t midi_input_lock;
 
-	snd_info_entry_t *proc_entry;
+	struct snd_info_entry *proc_entry;
 };
 
-typedef struct _snd_sb sb_t;
-
 /* I/O ports */
 
 #define SBP(chip, x)		((chip)->port + s_b_SB_##x)
@@ -267,48 +265,48 @@ typedef struct _snd_sb sb_t;
  *
  */
 
-static inline void snd_sb_ack_8bit(sb_t *chip)
+static inline void snd_sb_ack_8bit(struct snd_sb *chip)
 {
 	inb(SBP(chip, DATA_AVAIL));
 }
 
-static inline void snd_sb_ack_16bit(sb_t *chip)
+static inline void snd_sb_ack_16bit(struct snd_sb *chip)
 {
 	inb(SBP(chip, DATA_AVAIL_16));
 }
 
 /* sb_common.c */
-int snd_sbdsp_command(sb_t *chip, unsigned char val);
-int snd_sbdsp_get_byte(sb_t *chip);
-int snd_sbdsp_reset(sb_t *chip);
-int snd_sbdsp_create(snd_card_t *card,
+int snd_sbdsp_command(struct snd_sb *chip, unsigned char val);
+int snd_sbdsp_get_byte(struct snd_sb *chip);
+int snd_sbdsp_reset(struct snd_sb *chip);
+int snd_sbdsp_create(struct snd_card *card,
 		     unsigned long port,
 		     int irq,
 		     irqreturn_t (*irq_handler)(int, void *, struct pt_regs *),
 		     int dma8, int dma16,
 		     unsigned short hardware,
-		     sb_t **r_chip);
+		     struct snd_sb **r_chip);
 /* sb_mixer.c */
-void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data);
-unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg);
-int snd_sbmixer_new(sb_t *chip);
+void snd_sbmixer_write(struct snd_sb *chip, unsigned char reg, unsigned char data);
+unsigned char snd_sbmixer_read(struct snd_sb *chip, unsigned char reg);
+int snd_sbmixer_new(struct snd_sb *chip);
 
 /* sb8_init.c */
-int snd_sb8dsp_pcm(sb_t *chip, int device, snd_pcm_t ** rpcm);
+int snd_sb8dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm);
 /* sb8.c */
-irqreturn_t snd_sb8dsp_interrupt(sb_t *chip);
-int snd_sb8_playback_open(snd_pcm_substream_t *substream);
-int snd_sb8_capture_open(snd_pcm_substream_t *substream);
-int snd_sb8_playback_close(snd_pcm_substream_t *substream);
-int snd_sb8_capture_close(snd_pcm_substream_t *substream);
+irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip);
+int snd_sb8_playback_open(struct snd_pcm_substream *substream);
+int snd_sb8_capture_open(struct snd_pcm_substream *substream);
+int snd_sb8_playback_close(struct snd_pcm_substream *substream);
+int snd_sb8_capture_close(struct snd_pcm_substream *substream);
 /* midi8.c */
-irqreturn_t snd_sb8dsp_midi_interrupt(sb_t *chip);
-int snd_sb8dsp_midi(sb_t *chip, int device, snd_rawmidi_t ** rrawmidi);
+irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb *chip);
+int snd_sb8dsp_midi(struct snd_sb *chip, int device, struct snd_rawmidi ** rrawmidi);
 
 /* sb16_init.c */
-int snd_sb16dsp_pcm(sb_t *chip, int device, snd_pcm_t ** rpcm);
-const snd_pcm_ops_t *snd_sb16dsp_get_pcm_ops(int direction);
-int snd_sb16dsp_configure(sb_t *chip);
+int snd_sb16dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm);
+const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction);
+int snd_sb16dsp_configure(struct snd_sb *chip);
 /* sb16.c */
 irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
@@ -328,7 +326,7 @@ enum {
 #define SB_MIXVAL_INPUT_SW(reg1, reg2, left_shift, right_shift) \
   ((reg1) | ((reg2) << 8) | ((left_shift) << 16) | ((right_shift) << 24))
 
-int snd_sbmixer_add_ctl(sb_t *chip, const char *name, int index, int type, unsigned long value);
+int snd_sbmixer_add_ctl(struct snd_sb *chip, const char *name, int index, int type, unsigned long value);
 
 /* for ease of use */
 struct sbmix_elem {
@@ -352,7 +350,7 @@ struct sbmix_elem {
   .type = SB_MIX_INPUT_SW, \
   .private_value = SB_MIXVAL_INPUT_SW(reg1, reg2, left_shift, right_shift) }
 
-static inline int snd_sbmixer_add_ctl_elem(sb_t *chip, const struct sbmix_elem *c)
+static inline int snd_sbmixer_add_ctl_elem(struct snd_sb *chip, const struct sbmix_elem *c)
 {
 	return snd_sbmixer_add_ctl(chip, c->name, 0, c->type, c->private_value);
 }
diff --git a/include/sound/sb16_csp.h b/include/sound/sb16_csp.h
index eb8368b56b1..3b44d4b370f 100644
--- a/include/sound/sb16_csp.h
+++ b/include/sound/sb16_csp.h
@@ -63,25 +63,25 @@
 #define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE	0x3000
 
 /* microcode header */
-typedef struct snd_sb_csp_mc_header {
+struct snd_sb_csp_mc_header {
 	char codec_name[16];		/* id name of codec */
 	unsigned short func_req;	/* requested function */
-} snd_sb_csp_mc_header_t;
+};
 
 /* microcode to be loaded */
-typedef struct snd_sb_csp_microcode {
-	snd_sb_csp_mc_header_t info;
+struct snd_sb_csp_microcode {
+	struct snd_sb_csp_mc_header info;
 	unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE];
-} snd_sb_csp_microcode_t;
+};
 
 /* start CSP with sample_width in mono/stereo */
-typedef struct snd_sb_csp_start {
+struct snd_sb_csp_start {
 	int sample_width;	/* sample width, look above */
 	int channels;		/* channels, look above */
-} snd_sb_csp_start_t;
+};
 
 /* CSP information */
-typedef struct snd_sb_csp_info {
+struct snd_sb_csp_info {
 	char codec_name[16];		/* id name of codec */
 	unsigned short func_nr;		/* function number */
 	unsigned int acc_format;	/* accepted PCM formats */
@@ -93,17 +93,17 @@ typedef struct snd_sb_csp_info {
 	unsigned short run_width;	/* current sample width */
 	unsigned short version;		/* version id: 0x10 - 0x1f */
 	unsigned short state;		/* state bits */
-} snd_sb_csp_info_t;
+};
 
 /* HWDEP controls */
 /* get CSP information */
-#define SNDRV_SB_CSP_IOCTL_INFO		_IOR('H', 0x10, snd_sb_csp_info_t)
+#define SNDRV_SB_CSP_IOCTL_INFO		_IOR('H', 0x10, struct snd_sb_csp_info)
 /* load microcode to CSP */
-#define SNDRV_SB_CSP_IOCTL_LOAD_CODE	_IOW('H', 0x11, snd_sb_csp_microcode_t)
+#define SNDRV_SB_CSP_IOCTL_LOAD_CODE	_IOW('H', 0x11, struct snd_sb_csp_microcode)
 /* unload microcode from CSP */
 #define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE	_IO('H', 0x12)
 /* start CSP */
-#define SNDRV_SB_CSP_IOCTL_START		_IOW('H', 0x13, snd_sb_csp_start_t)
+#define SNDRV_SB_CSP_IOCTL_START		_IOW('H', 0x13, struct snd_sb_csp_start)
 /* stop CSP */
 #define SNDRV_SB_CSP_IOCTL_STOP		_IO('H', 0x14)
 /* pause CSP and DMA transfer */
@@ -115,25 +115,25 @@ typedef struct snd_sb_csp_info {
 #include "sb.h"
 #include "hwdep.h"
 
-typedef struct snd_sb_csp snd_sb_csp_t;
+struct snd_sb_csp;
 
 /*
  * CSP operators
  */
-typedef struct {
-	int (*csp_use) (snd_sb_csp_t * p);
-	int (*csp_unuse) (snd_sb_csp_t * p);
-	int (*csp_autoload) (snd_sb_csp_t * p, int pcm_sfmt, int play_rec_mode);
-	int (*csp_start) (snd_sb_csp_t * p, int sample_width, int channels);
-	int (*csp_stop) (snd_sb_csp_t * p);
-	int (*csp_qsound_transfer) (snd_sb_csp_t * p);
-} snd_sb_csp_ops_t;
+struct snd_sb_csp_ops {
+	int (*csp_use) (struct snd_sb_csp * p);
+	int (*csp_unuse) (struct snd_sb_csp * p);
+	int (*csp_autoload) (struct snd_sb_csp * p, int pcm_sfmt, int play_rec_mode);
+	int (*csp_start) (struct snd_sb_csp * p, int sample_width, int channels);
+	int (*csp_stop) (struct snd_sb_csp * p);
+	int (*csp_qsound_transfer) (struct snd_sb_csp * p);
+};
 
 /*
  * CSP private data
  */
 struct snd_sb_csp {
-	sb_t *chip;		/* SB16 DSP */
+	struct snd_sb *chip;		/* SB16 DSP */
 	int used;		/* usage flag - exclusive */
 	char codec_name[16];	/* name of codec */
 	unsigned short func_nr;	/* function number */
@@ -147,7 +147,7 @@ struct snd_sb_csp {
 	int version;		/* CSP version (0x10 - 0x1f) */
 	int running;		/* running state */
 
-	snd_sb_csp_ops_t ops;	/* operators */
+	struct snd_sb_csp_ops ops;	/* operators */
 
 	spinlock_t q_lock;	/* locking */
 	int q_enabled;		/* enabled flag */
@@ -155,13 +155,13 @@ struct snd_sb_csp {
 	int qpos_right;		/* right position */
 	int qpos_changed;	/* position changed flag */
 
-	snd_kcontrol_t *qsound_switch;
-	snd_kcontrol_t *qsound_space;
+	struct snd_kcontrol *qsound_switch;
+	struct snd_kcontrol *qsound_space;
 
 	struct semaphore access_mutex;	/* locking */
 };
 
-int snd_sb_csp_new(sb_t *chip, int device, snd_hwdep_t ** rhwdep);
+int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep);
 #endif
 
 #endif /* __SOUND_SB16_CSP */
diff --git a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c
index b09c6575e01..c0b8d61b75e 100644
--- a/sound/isa/sb/emu8000.c
+++ b/sound/isa/sb/emu8000.c
@@ -45,7 +45,7 @@
  * directly.  The macros handle the port number and command word.
  */
 /* Write a word */
-void snd_emu8000_poke(emu8000_t *emu, unsigned int port, unsigned int reg, unsigned int val)
+void snd_emu8000_poke(struct snd_emu8000 *emu, unsigned int port, unsigned int reg, unsigned int val)
 {
 	unsigned long flags;
 	spin_lock_irqsave(&emu->reg_lock, flags);
@@ -58,7 +58,7 @@ void snd_emu8000_poke(emu8000_t *emu, unsigned int port, unsigned int reg, unsig
 }
 
 /* Read a word */
-unsigned short snd_emu8000_peek(emu8000_t *emu, unsigned int port, unsigned int reg)
+unsigned short snd_emu8000_peek(struct snd_emu8000 *emu, unsigned int port, unsigned int reg)
 {
 	unsigned short res;
 	unsigned long flags;
@@ -73,7 +73,7 @@ unsigned short snd_emu8000_peek(emu8000_t *emu, unsigned int port, unsigned int
 }
 
 /* Write a double word */
-void snd_emu8000_poke_dw(emu8000_t *emu, unsigned int port, unsigned int reg, unsigned int val)
+void snd_emu8000_poke_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg, unsigned int val)
 {
 	unsigned long flags;
 	spin_lock_irqsave(&emu->reg_lock, flags);
@@ -87,7 +87,7 @@ void snd_emu8000_poke_dw(emu8000_t *emu, unsigned int port, unsigned int reg, un
 }
 
 /* Read a double word */
-unsigned int snd_emu8000_peek_dw(emu8000_t *emu, unsigned int port, unsigned int reg)
+unsigned int snd_emu8000_peek_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg)
 {
 	unsigned short low;
 	unsigned int res;
@@ -107,7 +107,7 @@ unsigned int snd_emu8000_peek_dw(emu8000_t *emu, unsigned int port, unsigned int
  * Set up / close a channel to be used for DMA.
  */
 /*exported*/ void
-snd_emu8000_dma_chan(emu8000_t *emu, int ch, int mode)
+snd_emu8000_dma_chan(struct snd_emu8000 *emu, int ch, int mode)
 {
 	unsigned right_bit = (mode & EMU8000_RAM_RIGHT) ? 0x01000000 : 0;
 	mode &= EMU8000_RAM_MODE_MASK;
@@ -132,7 +132,7 @@ snd_emu8000_dma_chan(emu8000_t *emu, int ch, int mode)
 /*
  */
 static void __init
-snd_emu8000_read_wait(emu8000_t *emu)
+snd_emu8000_read_wait(struct snd_emu8000 *emu)
 {
 	while ((EMU8000_SMALR_READ(emu) & 0x80000000) != 0) {
 		schedule_timeout_interruptible(1);
@@ -144,7 +144,7 @@ snd_emu8000_read_wait(emu8000_t *emu)
 /*
  */
 static void __init
-snd_emu8000_write_wait(emu8000_t *emu)
+snd_emu8000_write_wait(struct snd_emu8000 *emu)
 {
 	while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
 		schedule_timeout_interruptible(1);
@@ -157,7 +157,7 @@ snd_emu8000_write_wait(emu8000_t *emu)
  * detect a card at the given port
  */
 static int __init
-snd_emu8000_detect(emu8000_t *emu)
+snd_emu8000_detect(struct snd_emu8000 *emu)
 {
 	/* Initialise */
 	EMU8000_HWCF1_WRITE(emu, 0x0059);
@@ -183,7 +183,7 @@ snd_emu8000_detect(emu8000_t *emu)
  * intiailize audio channels
  */
 static void __init
-init_audio(emu8000_t *emu)
+init_audio(struct snd_emu8000 *emu)
 {
 	int ch;
 
@@ -224,7 +224,7 @@ init_audio(emu8000_t *emu)
  * initialize DMA address
  */
 static void __init
-init_dma(emu8000_t *emu)
+init_dma(struct snd_emu8000 *emu)
 {
 	EMU8000_SMALR_WRITE(emu, 0);
 	EMU8000_SMARR_WRITE(emu, 0);
@@ -328,7 +328,7 @@ static unsigned short init4[128] /*__devinitdata*/ = {
  * is meant to work
  */
 static void __init
-send_array(emu8000_t *emu, unsigned short *data, int size)
+send_array(struct snd_emu8000 *emu, unsigned short *data, int size)
 {
 	int i;
 	unsigned short *p;
@@ -350,7 +350,7 @@ send_array(emu8000_t *emu, unsigned short *data, int size)
  * initialisation sequence in the adip.
  */
 static void __init
-init_arrays(emu8000_t *emu)
+init_arrays(struct snd_emu8000 *emu)
 {
 	send_array(emu, init1, ARRAY_SIZE(init1)/4);
 
@@ -376,7 +376,7 @@ init_arrays(emu8000_t *emu)
  * reallocating between read and write.
  */
 static void __init
-size_dram(emu8000_t *emu)
+size_dram(struct snd_emu8000 *emu)
 {
 	int i, size;
 
@@ -455,7 +455,7 @@ size_dram(emu8000_t *emu)
  * and therefore lose 2 voices.
  */
 /*exported*/ void
-snd_emu8000_init_fm(emu8000_t *emu)
+snd_emu8000_init_fm(struct snd_emu8000 *emu)
 {
 	unsigned long flags;
 
@@ -501,7 +501,7 @@ snd_emu8000_init_fm(emu8000_t *emu)
  * The main initialization routine.
  */
 static void __init
-snd_emu8000_init_hw(emu8000_t *emu)
+snd_emu8000_init_hw(struct snd_emu8000 *emu)
 {
 	int i;
 
@@ -585,7 +585,7 @@ static unsigned short treble_parm[12][9] = {
  * set Emu8000 digital equalizer; from 0 to 11 [-12dB - 12dB]
  */
 /*exported*/ void
-snd_emu8000_update_equalizer(emu8000_t *emu)
+snd_emu8000_update_equalizer(struct snd_emu8000 *emu)
 {
 	unsigned short w;
 	int bass = emu->bass_level;
@@ -628,17 +628,17 @@ snd_emu8000_update_equalizer(emu8000_t *emu)
 /* user can define chorus modes up to 32 */
 #define SNDRV_EMU8000_CHORUS_NUMBERS	32
 
-typedef struct soundfont_chorus_fx_t {
+struct soundfont_chorus_fx {
 	unsigned short feedback;	/* feedback level (0xE600-0xE6FF) */
 	unsigned short delay_offset;	/* delay (0-0x0DA3) [1/44100 sec] */
 	unsigned short lfo_depth;	/* LFO depth (0xBC00-0xBCFF) */
 	unsigned int delay;	/* right delay (0-0xFFFFFFFF) [1/256/44100 sec] */
 	unsigned int lfo_freq;		/* LFO freq LFO freq (0-0xFFFFFFFF) */
-} soundfont_chorus_fx_t;
+};
 
 /* 5 parameters for each chorus mode; 3 x 16bit, 2 x 32bit */
 static char chorus_defined[SNDRV_EMU8000_CHORUS_NUMBERS];
-static soundfont_chorus_fx_t chorus_parm[SNDRV_EMU8000_CHORUS_NUMBERS] = {
+static struct soundfont_chorus_fx chorus_parm[SNDRV_EMU8000_CHORUS_NUMBERS] = {
 	{0xE600, 0x03F6, 0xBC2C ,0x00000000, 0x0000006D}, /* chorus 1 */
 	{0xE608, 0x031A, 0xBC6E, 0x00000000, 0x0000017C}, /* chorus 2 */
 	{0xE610, 0x031A, 0xBC84, 0x00000000, 0x00000083}, /* chorus 3 */
@@ -650,9 +650,9 @@ static soundfont_chorus_fx_t chorus_parm[SNDRV_EMU8000_CHORUS_NUMBERS] = {
 };
 
 /*exported*/ int
-snd_emu8000_load_chorus_fx(emu8000_t *emu, int mode, const void __user *buf, long len)
+snd_emu8000_load_chorus_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len)
 {
-	soundfont_chorus_fx_t rec;
+	struct soundfont_chorus_fx rec;
 	if (mode < SNDRV_EMU8000_CHORUS_PREDEFINED || mode >= SNDRV_EMU8000_CHORUS_NUMBERS) {
 		snd_printk(KERN_WARNING "invalid chorus mode %d for uploading\n", mode);
 		return -EINVAL;
@@ -665,7 +665,7 @@ snd_emu8000_load_chorus_fx(emu8000_t *emu, int mode, const void __user *buf, lon
 }
 
 /*exported*/ void
-snd_emu8000_update_chorus_mode(emu8000_t *emu)
+snd_emu8000_update_chorus_mode(struct snd_emu8000 *emu)
 {
 	int effect = emu->chorus_mode;
 	if (effect < 0 || effect >= SNDRV_EMU8000_CHORUS_NUMBERS ||
@@ -699,15 +699,15 @@ snd_emu8000_update_chorus_mode(emu8000_t *emu)
 /* user can define reverb modes up to 32 */
 #define SNDRV_EMU8000_REVERB_NUMBERS	32
 
-typedef struct soundfont_reverb_fx_t {
+struct soundfont_reverb_fx {
 	unsigned short parms[28];
-} soundfont_reverb_fx_t;
+};
 
 /* reverb mode settings; write the following 28 data of 16 bit length
  *   on the corresponding ports in the reverb_cmds array
  */
 static char reverb_defined[SNDRV_EMU8000_CHORUS_NUMBERS];
-static soundfont_reverb_fx_t reverb_parm[SNDRV_EMU8000_REVERB_NUMBERS] = {
+static struct soundfont_reverb_fx reverb_parm[SNDRV_EMU8000_REVERB_NUMBERS] = {
 {{  /* room 1 */
 	0xB488, 0xA450, 0x9550, 0x84B5, 0x383A, 0x3EB5, 0x72F4,
 	0x72A4, 0x7254, 0x7204, 0x7204, 0x7204, 0x4416, 0x4516,
@@ -777,9 +777,9 @@ static struct reverb_cmd_pair {
 };
 
 /*exported*/ int
-snd_emu8000_load_reverb_fx(emu8000_t *emu, int mode, const void __user *buf, long len)
+snd_emu8000_load_reverb_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len)
 {
-	soundfont_reverb_fx_t rec;
+	struct soundfont_reverb_fx rec;
 
 	if (mode < SNDRV_EMU8000_REVERB_PREDEFINED || mode >= SNDRV_EMU8000_REVERB_NUMBERS) {
 		snd_printk(KERN_WARNING "invalid reverb mode %d for uploading\n", mode);
@@ -793,7 +793,7 @@ snd_emu8000_load_reverb_fx(emu8000_t *emu, int mode, const void __user *buf, lon
 }
 
 /*exported*/ void
-snd_emu8000_update_reverb_mode(emu8000_t *emu)
+snd_emu8000_update_reverb_mode(struct snd_emu8000 *emu)
 {
 	int effect = emu->reverb_mode;
 	int i;
@@ -819,7 +819,7 @@ snd_emu8000_update_reverb_mode(emu8000_t *emu)
 /*
  * bass/treble
  */
-static int mixer_bass_treble_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int mixer_bass_treble_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -828,17 +828,17 @@ static int mixer_bass_treble_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int mixer_bass_treble_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int mixer_bass_treble_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	emu8000_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->treble_level : emu->bass_level;
 	return 0;
 }
 
-static int mixer_bass_treble_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int mixer_bass_treble_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	emu8000_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int change;
 	unsigned short val1;
@@ -857,7 +857,7 @@ static int mixer_bass_treble_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return change;
 }
 
-static snd_kcontrol_new_t mixer_bass_control =
+static struct snd_kcontrol_new mixer_bass_control =
 {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "Synth Tone Control - Bass",
@@ -867,7 +867,7 @@ static snd_kcontrol_new_t mixer_bass_control =
 	.private_value = 0,
 };
 
-static snd_kcontrol_new_t mixer_treble_control =
+static struct snd_kcontrol_new mixer_treble_control =
 {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "Synth Tone Control - Treble",
@@ -880,7 +880,7 @@ static snd_kcontrol_new_t mixer_treble_control =
 /*
  * chorus/reverb mode
  */
-static int mixer_chorus_reverb_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int mixer_chorus_reverb_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -889,17 +889,17 @@ static int mixer_chorus_reverb_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
 	return 0;
 }
 
-static int mixer_chorus_reverb_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int mixer_chorus_reverb_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	emu8000_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->chorus_mode : emu->reverb_mode;
 	return 0;
 }
 
-static int mixer_chorus_reverb_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int mixer_chorus_reverb_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	emu8000_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int change;
 	unsigned short val1;
@@ -924,7 +924,7 @@ static int mixer_chorus_reverb_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
 	return change;
 }
 
-static snd_kcontrol_new_t mixer_chorus_mode_control =
+static struct snd_kcontrol_new mixer_chorus_mode_control =
 {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "Chorus Mode",
@@ -934,7 +934,7 @@ static snd_kcontrol_new_t mixer_chorus_mode_control =
 	.private_value = 1,
 };
 
-static snd_kcontrol_new_t mixer_reverb_mode_control =
+static struct snd_kcontrol_new mixer_reverb_mode_control =
 {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "Reverb Mode",
@@ -947,7 +947,7 @@ static snd_kcontrol_new_t mixer_reverb_mode_control =
 /*
  * FM OPL3 chorus/reverb depth
  */
-static int mixer_fm_depth_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int mixer_fm_depth_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -956,17 +956,17 @@ static int mixer_fm_depth_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
 	return 0;
 }
 
-static int mixer_fm_depth_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int mixer_fm_depth_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	emu8000_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.integer.value[0] = kcontrol->private_value ? emu->fm_chorus_depth : emu->fm_reverb_depth;
 	return 0;
 }
 
-static int mixer_fm_depth_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int mixer_fm_depth_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	emu8000_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu8000 *emu = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int change;
 	unsigned short val1;
@@ -986,7 +986,7 @@ static int mixer_fm_depth_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
 	return change;
 }
 
-static snd_kcontrol_new_t mixer_fm_chorus_depth_control =
+static struct snd_kcontrol_new mixer_fm_chorus_depth_control =
 {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "FM Chorus Depth",
@@ -996,7 +996,7 @@ static snd_kcontrol_new_t mixer_fm_chorus_depth_control =
 	.private_value = 1,
 };
 
-static snd_kcontrol_new_t mixer_fm_reverb_depth_control =
+static struct snd_kcontrol_new mixer_fm_reverb_depth_control =
 {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "FM Reverb Depth",
@@ -1007,7 +1007,7 @@ static snd_kcontrol_new_t mixer_fm_reverb_depth_control =
 };
 
 
-static snd_kcontrol_new_t *mixer_defs[EMU8000_NUM_CONTROLS] = {
+static struct snd_kcontrol_new *mixer_defs[EMU8000_NUM_CONTROLS] = {
 	&mixer_bass_control,
 	&mixer_treble_control,
 	&mixer_chorus_mode_control,
@@ -1020,7 +1020,7 @@ static snd_kcontrol_new_t *mixer_defs[EMU8000_NUM_CONTROLS] = {
  * create and attach mixer elements for WaveTable treble/bass controls
  */
 static int __init
-snd_emu8000_create_mixer(snd_card_t *card, emu8000_t *emu)
+snd_emu8000_create_mixer(struct snd_card *card, struct snd_emu8000 *emu)
 {
 	int i, err = 0;
 
@@ -1049,7 +1049,7 @@ __error:
 /*
  * free resources
  */
-static int snd_emu8000_free(emu8000_t *hw)
+static int snd_emu8000_free(struct snd_emu8000 *hw)
 {
 	release_and_free_resource(hw->res_port1);
 	release_and_free_resource(hw->res_port2);
@@ -1060,9 +1060,9 @@ static int snd_emu8000_free(emu8000_t *hw)
 
 /*
  */
-static int snd_emu8000_dev_free(snd_device_t *device)
+static int snd_emu8000_dev_free(struct snd_device *device)
 {
-	emu8000_t *hw = device->device_data;
+	struct snd_emu8000 *hw = device->device_data;
 	return snd_emu8000_free(hw);
 }
 
@@ -1070,12 +1070,13 @@ static int snd_emu8000_dev_free(snd_device_t *device)
  * initialize and register emu8000 synth device.
  */
 int __init
-snd_emu8000_new(snd_card_t *card, int index, long port, int seq_ports, snd_seq_device_t **awe_ret)
+snd_emu8000_new(struct snd_card *card, int index, long port, int seq_ports,
+		struct snd_seq_device **awe_ret)
 {
-	snd_seq_device_t *awe;
-	emu8000_t *hw;
+	struct snd_seq_device *awe;
+	struct snd_emu8000 *hw;
 	int err;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free = snd_emu8000_dev_free,
 	};
 
@@ -1127,9 +1128,9 @@ snd_emu8000_new(snd_card_t *card, int index, long port, int seq_ports, snd_seq_d
 	}
 #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
 	if (snd_seq_device_new(card, index, SNDRV_SEQ_DEV_ID_EMU8000,
-			       sizeof(emu8000_t*), &awe) >= 0) {
+			       sizeof(struct snd_emu8000*), &awe) >= 0) {
 		strcpy(awe->name, "EMU-8000");
-		*(emu8000_t**)SNDRV_SEQ_DEVICE_ARGPTR(awe) = hw;
+		*(struct snd_emu8000 **)SNDRV_SEQ_DEVICE_ARGPTR(awe) = hw;
 	}
 #else
 	awe = NULL;
diff --git a/sound/isa/sb/emu8000_callback.c b/sound/isa/sb/emu8000_callback.c
index 1cc4101a17a..9a3c71cc2e0 100644
--- a/sound/isa/sb/emu8000_callback.c
+++ b/sound/isa/sb/emu8000_callback.c
@@ -25,27 +25,30 @@
 /*
  * prototypes
  */
-static snd_emux_voice_t *get_voice(snd_emux_t *emu, snd_emux_port_t *port);
-static int start_voice(snd_emux_voice_t *vp);
-static void trigger_voice(snd_emux_voice_t *vp);
-static void release_voice(snd_emux_voice_t *vp);
-static void update_voice(snd_emux_voice_t *vp, int update);
-static void reset_voice(snd_emux_t *emu, int ch);
-static void terminate_voice(snd_emux_voice_t *vp);
-static void sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset);
+static struct snd_emux_voice *get_voice(struct snd_emux *emu,
+					struct snd_emux_port *port);
+static int start_voice(struct snd_emux_voice *vp);
+static void trigger_voice(struct snd_emux_voice *vp);
+static void release_voice(struct snd_emux_voice *vp);
+static void update_voice(struct snd_emux_voice *vp, int update);
+static void reset_voice(struct snd_emux *emu, int ch);
+static void terminate_voice(struct snd_emux_voice *vp);
+static void sysex(struct snd_emux *emu, char *buf, int len, int parsed,
+		  struct snd_midi_channel_set *chset);
 #ifdef CONFIG_SND_SEQUENCER_OSS
-static int oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2);
+static int oss_ioctl(struct snd_emux *emu, int cmd, int p1, int p2);
 #endif
-static int load_fx(snd_emux_t *emu, int type, int mode, const void __user *buf, long len);
-
-static void set_pitch(emu8000_t *hw, snd_emux_voice_t *vp);
-static void set_volume(emu8000_t *hw, snd_emux_voice_t *vp);
-static void set_pan(emu8000_t *hw, snd_emux_voice_t *vp);
-static void set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp);
-static void set_tremfreq(emu8000_t *hw, snd_emux_voice_t *vp);
-static void set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp);
-static void set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp);
-static void snd_emu8000_tweak_voice(emu8000_t *emu, int ch);
+static int load_fx(struct snd_emux *emu, int type, int mode,
+		   const void __user *buf, long len);
+
+static void set_pitch(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
+static void set_volume(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
+static void set_pan(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
+static void set_fmmod(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
+static void set_tremfreq(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
+static void set_fm2frq2(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
+static void set_filterQ(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
+static void snd_emu8000_tweak_voice(struct snd_emu8000 *emu, int ch);
 
 /*
  * Ensure a value is between two points
@@ -58,7 +61,7 @@ static void snd_emu8000_tweak_voice(emu8000_t *emu, int ch);
 /*
  * set up operators
  */
-static snd_emux_operators_t emu8000_ops = {
+static struct snd_emux_operators emu8000_ops = {
 	.owner =	THIS_MODULE,
 	.get_voice =	get_voice,
 	.prepare =	start_voice,
@@ -78,7 +81,7 @@ static snd_emux_operators_t emu8000_ops = {
 };
 
 void
-snd_emu8000_ops_setup(emu8000_t *hw)
+snd_emu8000_ops_setup(struct snd_emu8000 *hw)
 {
 	hw->emu->ops = emu8000_ops;
 }
@@ -89,10 +92,10 @@ snd_emu8000_ops_setup(emu8000_t *hw)
  * Terminate a voice
  */
 static void
-release_voice(snd_emux_voice_t *vp)
+release_voice(struct snd_emux_voice *vp)
 {
 	int dcysusv;
-	emu8000_t *hw;
+	struct snd_emu8000 *hw;
 
 	hw = vp->hw;
 	dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease;
@@ -105,9 +108,9 @@ release_voice(snd_emux_voice_t *vp)
 /*
  */
 static void
-terminate_voice(snd_emux_voice_t *vp)
+terminate_voice(struct snd_emux_voice *vp)
 {
-	emu8000_t *hw; 
+	struct snd_emu8000 *hw; 
 
 	hw = vp->hw;
 	EMU8000_DCYSUSV_WRITE(hw, vp->ch, 0x807F);
@@ -117,9 +120,9 @@ terminate_voice(snd_emux_voice_t *vp)
 /*
  */
 static void
-update_voice(snd_emux_voice_t *vp, int update)
+update_voice(struct snd_emux_voice *vp, int update)
 {
-	emu8000_t *hw;
+	struct snd_emu8000 *hw;
 
 	hw = vp->hw;
 	if (update & SNDRV_EMUX_UPDATE_VOLUME)
@@ -149,12 +152,12 @@ update_voice(snd_emux_voice_t *vp, int update)
  * The channel index (vp->ch) must be initialized in this routine.
  * In Emu8k, it is identical with the array index.
  */
-static snd_emux_voice_t *
-get_voice(snd_emux_t *emu, snd_emux_port_t *port)
+static struct snd_emux_voice *
+get_voice(struct snd_emux *emu, struct snd_emux_port *port)
 {
 	int  i;
-	snd_emux_voice_t *vp;
-	emu8000_t *hw;
+	struct snd_emux_voice *vp;
+	struct snd_emu8000 *hw;
 
 	/* what we are looking for, in order of preference */
 	enum {
@@ -227,13 +230,13 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port)
 /*
  */
 static int
-start_voice(snd_emux_voice_t *vp)
+start_voice(struct snd_emux_voice *vp)
 {
 	unsigned int temp;
 	int ch;
 	int addr;
-	snd_midi_channel_t *chan;
-	emu8000_t *hw;
+	struct snd_midi_channel *chan;
+	struct snd_emu8000 *hw;
 
 	hw = vp->hw;
 	ch = vp->ch;
@@ -307,11 +310,11 @@ start_voice(snd_emux_voice_t *vp)
  * Start envelope
  */
 static void
-trigger_voice(snd_emux_voice_t *vp)
+trigger_voice(struct snd_emux_voice *vp)
 {
 	int ch = vp->ch;
 	unsigned int temp;
-	emu8000_t *hw;
+	struct snd_emu8000 *hw;
 
 	hw = vp->hw;
 
@@ -329,9 +332,9 @@ trigger_voice(snd_emux_voice_t *vp)
  * reset voice parameters
  */
 static void
-reset_voice(snd_emux_t *emu, int ch)
+reset_voice(struct snd_emux *emu, int ch)
 {
-	emu8000_t *hw;
+	struct snd_emu8000 *hw;
 
 	hw = emu->hw;
 	EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F);
@@ -342,7 +345,7 @@ reset_voice(snd_emux_t *emu, int ch)
  * Set the pitch of a possibly playing note.
  */
 static void
-set_pitch(emu8000_t *hw, snd_emux_voice_t *vp)
+set_pitch(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
 {
 	EMU8000_IP_WRITE(hw, vp->ch, vp->apitch);
 }
@@ -351,7 +354,7 @@ set_pitch(emu8000_t *hw, snd_emux_voice_t *vp)
  * Set the volume of a possibly already playing note
  */
 static void
-set_volume(emu8000_t *hw, snd_emux_voice_t *vp)
+set_volume(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
 {
 	int  ifatn;
 
@@ -365,7 +368,7 @@ set_volume(emu8000_t *hw, snd_emux_voice_t *vp)
  * Set pan and loop start address.
  */
 static void
-set_pan(emu8000_t *hw, snd_emux_voice_t *vp)
+set_pan(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
 {
 	unsigned int temp;
 
@@ -376,7 +379,7 @@ set_pan(emu8000_t *hw, snd_emux_voice_t *vp)
 #define MOD_SENSE 18
 
 static void
-set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp)
+set_fmmod(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
 {
 	unsigned short fmmod;
 	short pitch;
@@ -394,14 +397,14 @@ set_fmmod(emu8000_t *hw, snd_emux_voice_t *vp)
 
 /* set tremolo (lfo1) volume & frequency */
 static void
-set_tremfreq(emu8000_t *hw, snd_emux_voice_t *vp)
+set_tremfreq(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
 {
 	EMU8000_TREMFRQ_WRITE(hw, vp->ch, vp->reg.parm.tremfrq);
 }
 
 /* set lfo2 pitch & frequency */
 static void
-set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp)
+set_fm2frq2(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
 {
 	unsigned short fm2frq2;
 	short pitch;
@@ -419,7 +422,7 @@ set_fm2frq2(emu8000_t *hw, snd_emux_voice_t *vp)
 
 /* set filterQ */
 static void
-set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp)
+set_filterQ(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
 {
 	unsigned int addr;
 	addr = EMU8000_CCCA_READ(hw, vp->ch) & 0xffffff;
@@ -431,7 +434,7 @@ set_filterQ(emu8000_t *hw, snd_emux_voice_t *vp)
  * set the envelope & LFO parameters to the default values
  */
 static void
-snd_emu8000_tweak_voice(emu8000_t *emu, int i)
+snd_emu8000_tweak_voice(struct snd_emu8000 *emu, int i)
 {
 	/* set all mod/vol envelope shape to minimum */
 	EMU8000_ENVVOL_WRITE(emu, i, 0x8000);
@@ -453,9 +456,9 @@ snd_emu8000_tweak_voice(emu8000_t *emu, int i)
  * sysex callback
  */
 static void
-sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset)
+sysex(struct snd_emux *emu, char *buf, int len, int parsed, struct snd_midi_channel_set *chset)
 {
-	emu8000_t *hw;
+	struct snd_emu8000 *hw;
 
 	hw = emu->hw;
 
@@ -478,9 +481,9 @@ sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *c
  * OSS ioctl callback
  */
 static int
-oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2)
+oss_ioctl(struct snd_emux *emu, int cmd, int p1, int p2)
 {
-	emu8000_t *hw;
+	struct snd_emu8000 *hw;
 
 	hw = emu->hw;
 
@@ -523,9 +526,9 @@ oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2)
  */
 
 static int
-load_fx(snd_emux_t *emu, int type, int mode, const void __user *buf, long len)
+load_fx(struct snd_emux *emu, int type, int mode, const void __user *buf, long len)
 {
-	emu8000_t *hw;
+	struct snd_emu8000 *hw;
 	hw = emu->hw;
 
 	/* skip header */
diff --git a/sound/isa/sb/emu8000_local.h b/sound/isa/sb/emu8000_local.h
index ea4996a895f..2ac77f10bb4 100644
--- a/sound/isa/sb/emu8000_local.h
+++ b/sound/isa/sb/emu8000_local.h
@@ -30,14 +30,17 @@
 #include <sound/emu8000_reg.h>
 
 /* emu8000_patch.c */
-int snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void __user *data, long count);
-int snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr);
-void snd_emu8000_sample_reset(snd_emux_t *rec);
+int snd_emu8000_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
+			   struct snd_util_memhdr *hdr,
+			   const void __user *data, long count);
+int snd_emu8000_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp,
+			    struct snd_util_memhdr *hdr);
+void snd_emu8000_sample_reset(struct snd_emux *rec);
 
 /* emu8000_callback.c */
-void snd_emu8000_ops_setup(emu8000_t *emu);
+void snd_emu8000_ops_setup(struct snd_emu8000 *emu);
 
 /* emu8000_pcm.c */
-int snd_emu8000_pcm_new(snd_card_t *card, emu8000_t *emu, int index);
+int snd_emu8000_pcm_new(struct snd_card *card, struct snd_emu8000 *emu, int index);
 
 #endif	/* __EMU8000_LOCAL_H */
diff --git a/sound/isa/sb/emu8000_patch.c b/sound/isa/sb/emu8000_patch.c
index 2fea67e71c7..80b1cf84a1a 100644
--- a/sound/isa/sb/emu8000_patch.c
+++ b/sound/isa/sb/emu8000_patch.c
@@ -32,7 +32,7 @@ MODULE_PARM_DESC(emu8000_reset_addr, "reset write address at each time (makes sl
  * Open up channels.
  */
 static int
-snd_emu8000_open_dma(emu8000_t *emu, int write)
+snd_emu8000_open_dma(struct snd_emu8000 *emu, int write)
 {
 	int i;
 
@@ -59,7 +59,7 @@ snd_emu8000_open_dma(emu8000_t *emu, int write)
  * Close all dram channels.
  */
 static void
-snd_emu8000_close_dma(emu8000_t *emu)
+snd_emu8000_close_dma(struct snd_emu8000 *emu)
 {
 	int i;
 
@@ -106,7 +106,7 @@ read_word(const void __user *buf, int offset, int mode)
 /*
  */
 static void
-snd_emu8000_write_wait(emu8000_t *emu)
+snd_emu8000_write_wait(struct snd_emu8000 *emu)
 {
 	while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
 		schedule_timeout_interruptible(1);
@@ -128,7 +128,7 @@ snd_emu8000_write_wait(emu8000_t *emu)
  * working.
  */
 static inline void
-write_word(emu8000_t *emu, int *offset, unsigned short data)
+write_word(struct snd_emu8000 *emu, int *offset, unsigned short data)
 {
 	if (emu8000_reset_addr) {
 		if (emu8000_reset_addr > 1)
@@ -144,15 +144,16 @@ write_word(emu8000_t *emu, int *offset, unsigned short data)
  * the generic soundfont routines as a callback.
  */
 int
-snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp,
-		       snd_util_memhdr_t *hdr, const void __user *data, long count)
+snd_emu8000_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
+		       struct snd_util_memhdr *hdr,
+		       const void __user *data, long count)
 {
 	int  i;
 	int  rc;
 	int  offset;
 	int  truesize;
 	int  dram_offset, dram_start;
-	emu8000_t *emu;
+	struct snd_emu8000 *emu;
 
 	emu = rec->hw;
 	snd_assert(sp != NULL, return -EINVAL);
@@ -282,7 +283,8 @@ snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp,
  * free a sample block
  */
 int
-snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr)
+snd_emu8000_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp,
+			struct snd_util_memhdr *hdr)
 {
 	if (sp->block) {
 		snd_util_mem_free(hdr, sp->block);
@@ -296,7 +298,7 @@ snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t
  * sample_reset callback - terminate voices
  */
 void
-snd_emu8000_sample_reset(snd_emux_t *rec)
+snd_emu8000_sample_reset(struct snd_emux *rec)
 {
 	snd_emux_terminate_all(rec);
 }
diff --git a/sound/isa/sb/emu8000_pcm.c b/sound/isa/sb/emu8000_pcm.c
index b323beeeda1..91dc3d83e2c 100644
--- a/sound/isa/sb/emu8000_pcm.c
+++ b/sound/isa/sb/emu8000_pcm.c
@@ -46,14 +46,12 @@
  */
 
 
-typedef struct snd_emu8k_pcm emu8k_pcm_t;
-
 struct snd_emu8k_pcm {
-	emu8000_t *emu;
-	snd_pcm_substream_t *substream;
+	struct snd_emu8000 *emu;
+	struct snd_pcm_substream *substream;
 
 	unsigned int allocated_bytes;
-	snd_util_memblk_t *block;
+	struct snd_util_memblk *block;
 	unsigned int offset;
 	unsigned int buf_size;
 	unsigned int period_size;
@@ -77,7 +75,7 @@ struct snd_emu8k_pcm {
  * open up channels for the simultaneous data transfer and playback
  */
 static int
-emu8k_open_dram_for_pcm(emu8000_t *emu, int channels)
+emu8k_open_dram_for_pcm(struct snd_emu8000 *emu, int channels)
 {
 	int i;
 
@@ -113,7 +111,7 @@ emu8k_open_dram_for_pcm(emu8000_t *emu, int channels)
 /*
  */
 static void
-snd_emu8000_write_wait(emu8000_t *emu, int can_schedule)
+snd_emu8000_write_wait(struct snd_emu8000 *emu, int can_schedule)
 {
 	while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
 		if (can_schedule) {
@@ -128,7 +126,7 @@ snd_emu8000_write_wait(emu8000_t *emu, int can_schedule)
  * close all channels
  */
 static void
-emu8k_close_dram(emu8000_t *emu)
+emu8k_close_dram(struct snd_emu8000 *emu)
 {
 	int i;
 
@@ -156,7 +154,7 @@ static int calc_rate_offset(int hz)
 /*
  */
 
-static snd_pcm_hardware_t emu8k_pcm_hw = {
+static struct snd_pcm_hardware emu8k_pcm_hw = {
 #ifdef USE_NONINTERLEAVE
 	.info =			SNDRV_PCM_INFO_NONINTERLEAVED,
 #else
@@ -180,7 +178,7 @@ static snd_pcm_hardware_t emu8k_pcm_hw = {
 /*
  * get the current position at the given channel from CCCA register
  */
-static inline int emu8k_get_curpos(emu8k_pcm_t *rec, int ch)
+static inline int emu8k_get_curpos(struct snd_emu8k_pcm *rec, int ch)
 {
 	int val = EMU8000_CCCA_READ(rec->emu, ch) & 0xfffffff;
 	val -= rec->loop_start[ch] - 1;
@@ -194,7 +192,7 @@ static inline int emu8k_get_curpos(emu8k_pcm_t *rec, int ch)
  */
 static void emu8k_pcm_timer_func(unsigned long data)
 {
-	emu8k_pcm_t *rec = (emu8k_pcm_t *)data;
+	struct snd_emu8k_pcm *rec = (struct snd_emu8k_pcm *)data;
 	int ptr, delta;
 
 	spin_lock(&rec->timer_lock);
@@ -226,11 +224,11 @@ static void emu8k_pcm_timer_func(unsigned long data)
  * open pcm
  * creating an instance here
  */
-static int emu8k_pcm_open(snd_pcm_substream_t *subs)
+static int emu8k_pcm_open(struct snd_pcm_substream *subs)
 {
-	emu8000_t *emu = snd_pcm_substream_chip(subs);
-	emu8k_pcm_t *rec;
-	snd_pcm_runtime_t *runtime = subs->runtime;
+	struct snd_emu8000 *emu = snd_pcm_substream_chip(subs);
+	struct snd_emu8k_pcm *rec;
+	struct snd_pcm_runtime *runtime = subs->runtime;
 
 	rec = kzalloc(sizeof(*rec), GFP_KERNEL);
 	if (! rec)
@@ -256,9 +254,9 @@ static int emu8k_pcm_open(snd_pcm_substream_t *subs)
 	return 0;
 }
 
-static int emu8k_pcm_close(snd_pcm_substream_t *subs)
+static int emu8k_pcm_close(struct snd_pcm_substream *subs)
 {
-	emu8k_pcm_t *rec = subs->runtime->private_data;
+	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
 	kfree(rec);
 	subs->runtime->private_data = NULL;
 	return 0;
@@ -281,9 +279,9 @@ static int calc_pitch_target(int pitch)
 /*
  * set up the voice
  */
-static void setup_voice(emu8k_pcm_t *rec, int ch)
+static void setup_voice(struct snd_emu8k_pcm *rec, int ch)
 {
-	emu8000_t *hw = rec->emu;
+	struct snd_emu8000 *hw = rec->emu;
 	unsigned int temp;
 
 	/* channel to be silent and idle */
@@ -334,10 +332,10 @@ static void setup_voice(emu8k_pcm_t *rec, int ch)
 /*
  * trigger the voice
  */
-static void start_voice(emu8k_pcm_t *rec, int ch)
+static void start_voice(struct snd_emu8k_pcm *rec, int ch)
 {
 	unsigned long flags;
-	emu8000_t *hw = rec->emu;
+	struct snd_emu8000 *hw = rec->emu;
 	unsigned int temp, aux;
 	int pt = calc_pitch_target(rec->pitch);
 
@@ -370,10 +368,10 @@ static void start_voice(emu8k_pcm_t *rec, int ch)
 /*
  * stop the voice immediately
  */
-static void stop_voice(emu8k_pcm_t *rec, int ch)
+static void stop_voice(struct snd_emu8k_pcm *rec, int ch)
 {
 	unsigned long flags;
-	emu8000_t *hw = rec->emu;
+	struct snd_emu8000 *hw = rec->emu;
 
 	EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F);
 
@@ -386,9 +384,9 @@ static void stop_voice(emu8k_pcm_t *rec, int ch)
 	spin_unlock_irqrestore(&rec->timer_lock, flags);
 }
 
-static int emu8k_pcm_trigger(snd_pcm_substream_t *subs, int cmd)
+static int emu8k_pcm_trigger(struct snd_pcm_substream *subs, int cmd)
 {
-	emu8k_pcm_t *rec = subs->runtime->private_data;
+	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
 	int ch;
 
 	switch (cmd) {
@@ -428,7 +426,7 @@ do { \
 
 #ifdef USE_NONINTERLEAVE
 /* copy one channel block */
-static int emu8k_transfer_block(emu8000_t *emu, int offset, unsigned short *buf, int count)
+static int emu8k_transfer_block(struct snd_emu8000 *emu, int offset, unsigned short *buf, int count)
 {
 	EMU8000_SMALW_WRITE(emu, offset);
 	while (count > 0) {
@@ -442,14 +440,14 @@ static int emu8k_transfer_block(emu8000_t *emu, int offset, unsigned short *buf,
 	return 0;
 }
 
-static int emu8k_pcm_copy(snd_pcm_substream_t *subs,
+static int emu8k_pcm_copy(struct snd_pcm_substream *subs,
 			  int voice,
 			  snd_pcm_uframes_t pos,
 			  void *src,
 			  snd_pcm_uframes_t count)
 {
-	emu8k_pcm_t *rec = subs->runtime->private_data;
-	emu8000_t *emu = rec->emu;
+	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
+	struct snd_emu8000 *emu = rec->emu;
 
 	snd_emu8000_write_wait(emu, 1);
 	if (voice == -1) {
@@ -469,7 +467,7 @@ static int emu8k_pcm_copy(snd_pcm_substream_t *subs,
 }
 
 /* make a channel block silence */
-static int emu8k_silence_block(emu8000_t *emu, int offset, int count)
+static int emu8k_silence_block(struct snd_emu8000 *emu, int offset, int count)
 {
 	EMU8000_SMALW_WRITE(emu, offset);
 	while (count > 0) {
@@ -480,13 +478,13 @@ static int emu8k_silence_block(emu8000_t *emu, int offset, int count)
 	return 0;
 }
 
-static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
+static int emu8k_pcm_silence(struct snd_pcm_substream *subs,
 			     int voice,
 			     snd_pcm_uframes_t pos,
 			     snd_pcm_uframes_t count)
 {
-	emu8k_pcm_t *rec = subs->runtime->private_data;
-	emu8000_t *emu = rec->emu;
+	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
+	struct snd_emu8000 *emu = rec->emu;
 
 	snd_emu8000_write_wait(emu, 1);
 	if (voice == -1 && rec->voices == 1)
@@ -508,14 +506,14 @@ static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
  * copy the interleaved data can be done easily by using
  * DMA "left" and "right" channels on emu8k engine.
  */
-static int emu8k_pcm_copy(snd_pcm_substream_t *subs,
+static int emu8k_pcm_copy(struct snd_pcm_substream *subs,
 			  int voice,
 			  snd_pcm_uframes_t pos,
 			  void __user *src,
 			  snd_pcm_uframes_t count)
 {
-	emu8k_pcm_t *rec = subs->runtime->private_data;
-	emu8000_t *emu = rec->emu;
+	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
+	struct snd_emu8000 *emu = rec->emu;
 	unsigned short __user *buf = src;
 
 	snd_emu8000_write_wait(emu, 1);
@@ -539,13 +537,13 @@ static int emu8k_pcm_copy(snd_pcm_substream_t *subs,
 	return 0;
 }
 
-static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
+static int emu8k_pcm_silence(struct snd_pcm_substream *subs,
 			     int voice,
 			     snd_pcm_uframes_t pos,
 			     snd_pcm_uframes_t count)
 {
-	emu8k_pcm_t *rec = subs->runtime->private_data;
-	emu8000_t *emu = rec->emu;
+	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
+	struct snd_emu8000 *emu = rec->emu;
 
 	snd_emu8000_write_wait(emu, 1);
 	EMU8000_SMALW_WRITE(emu, rec->loop_start[0] + pos);
@@ -567,10 +565,10 @@ static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
 /*
  * allocate a memory block
  */
-static int emu8k_pcm_hw_params(snd_pcm_substream_t *subs,
-			       snd_pcm_hw_params_t *hw_params)
+static int emu8k_pcm_hw_params(struct snd_pcm_substream *subs,
+			       struct snd_pcm_hw_params *hw_params)
 {
-	emu8k_pcm_t *rec = subs->runtime->private_data;
+	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
 
 	if (rec->block) {
 		/* reallocation - release the old block */
@@ -592,9 +590,9 @@ static int emu8k_pcm_hw_params(snd_pcm_substream_t *subs,
 /*
  * free the memory block
  */
-static int emu8k_pcm_hw_free(snd_pcm_substream_t *subs)
+static int emu8k_pcm_hw_free(struct snd_pcm_substream *subs)
 {
-	emu8k_pcm_t *rec = subs->runtime->private_data;
+	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
 
 	if (rec->block) {
 		int ch;
@@ -610,9 +608,9 @@ static int emu8k_pcm_hw_free(snd_pcm_substream_t *subs)
 
 /*
  */
-static int emu8k_pcm_prepare(snd_pcm_substream_t *subs)
+static int emu8k_pcm_prepare(struct snd_pcm_substream *subs)
 {
-	emu8k_pcm_t *rec = subs->runtime->private_data;
+	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
 
 	rec->pitch = 0xe000 + calc_rate_offset(subs->runtime->rate);
 	rec->last_ptr = 0;
@@ -656,16 +654,16 @@ static int emu8k_pcm_prepare(snd_pcm_substream_t *subs)
 	return 0;
 }
 
-static snd_pcm_uframes_t emu8k_pcm_pointer(snd_pcm_substream_t *subs)
+static snd_pcm_uframes_t emu8k_pcm_pointer(struct snd_pcm_substream *subs)
 {
-	emu8k_pcm_t *rec = subs->runtime->private_data;
+	struct snd_emu8k_pcm *rec = subs->runtime->private_data;
 	if (rec->running)
 		return emu8k_get_curpos(rec, 0);
 	return 0;
 }
 
 
-static snd_pcm_ops_t emu8k_pcm_ops = {
+static struct snd_pcm_ops emu8k_pcm_ops = {
 	.open =		emu8k_pcm_open,
 	.close =	emu8k_pcm_close,
 	.ioctl =	snd_pcm_lib_ioctl,
@@ -679,15 +677,15 @@ static snd_pcm_ops_t emu8k_pcm_ops = {
 };
 
 
-static void snd_emu8000_pcm_free(snd_pcm_t *pcm)
+static void snd_emu8000_pcm_free(struct snd_pcm *pcm)
 {
-	emu8000_t *emu = pcm->private_data;
+	struct snd_emu8000 *emu = pcm->private_data;
 	emu->pcm = NULL;
 }
 
-int snd_emu8000_pcm_new(snd_card_t *card, emu8000_t *emu, int index)
+int snd_emu8000_pcm_new(struct snd_card *card, struct snd_emu8000 *emu, int index)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if ((err = snd_pcm_new(card, "Emu8000 PCM", index, 1, 0, &pcm)) < 0)
diff --git a/sound/isa/sb/emu8000_synth.c b/sound/isa/sb/emu8000_synth.c
index f68e217416a..3d72742b342 100644
--- a/sound/isa/sb/emu8000_synth.c
+++ b/sound/isa/sb/emu8000_synth.c
@@ -33,12 +33,12 @@ MODULE_LICENSE("GPL");
 /*
  * create a new hardware dependent device for Emu8000
  */
-static int snd_emu8000_new_device(snd_seq_device_t *dev)
+static int snd_emu8000_new_device(struct snd_seq_device *dev)
 {
-	emu8000_t *hw;
-	snd_emux_t *emu;
+	struct snd_emu8000 *hw;
+	struct snd_emux *emu;
 
-	hw = *(emu8000_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev);
+	hw = *(struct snd_emu8000**)SNDRV_SEQ_DEVICE_ARGPTR(dev);
 	if (hw == NULL)
 		return -EINVAL;
 
@@ -92,9 +92,9 @@ static int snd_emu8000_new_device(snd_seq_device_t *dev)
 /*
  * free all resources
  */
-static int snd_emu8000_delete_device(snd_seq_device_t *dev)
+static int snd_emu8000_delete_device(struct snd_seq_device *dev)
 {
-	emu8000_t *hw;
+	struct snd_emu8000 *hw;
 
 	if (dev->driver_data == NULL)
 		return 0; /* no synth was allocated actually */
@@ -118,11 +118,12 @@ static int snd_emu8000_delete_device(snd_seq_device_t *dev)
 static int __init alsa_emu8000_init(void)
 {
 	
-	static snd_seq_dev_ops_t ops = {
+	static struct snd_seq_dev_ops ops = {
 		snd_emu8000_new_device,
 		snd_emu8000_delete_device,
 	};
-	return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU8000, &ops, sizeof(emu8000_t*));
+	return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU8000, &ops,
+					      sizeof(struct snd_emu8000*));
 }
 
 static void __exit alsa_emu8000_exit(void)
diff --git a/sound/isa/sb/es968.c b/sound/isa/sb/es968.c
index c859917c14d..f7d1afe83df 100644
--- a/sound/isa/sb/es968.c
+++ b/sound/isa/sb/es968.c
@@ -72,7 +72,7 @@ MODULE_DEVICE_TABLE(pnp_card, snd_es968_pnpids);
 static irqreturn_t snd_card_es968_interrupt(int irq, void *dev_id,
 					    struct pt_regs *regs)
 {
-	sb_t *chip = dev_id;
+	struct snd_sb *chip = dev_id;
 
 	if (chip->open & SB_OPEN_PCM) {
 		return snd_sb8dsp_interrupt(chip);
@@ -128,8 +128,8 @@ static int __init snd_card_es968_probe(int dev,
 					const struct pnp_card_device_id *pid)
 {
 	int error;
-	sb_t *chip;
-	snd_card_t *card;
+	struct snd_sb *chip;
+	struct snd_card *card;
 	struct snd_card_es968 *acard;
 
 	if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
@@ -200,7 +200,7 @@ static int __devinit snd_es968_pnp_detect(struct pnp_card_link *card,
 
 static void __devexit snd_es968_pnp_remove(struct pnp_card_link * pcard)
 {
-	snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard);
+	struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
 
 	snd_card_disconnect(card);
 	snd_card_free_in_thread(card);
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index c2fa451bc8f..96e40133343 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -138,7 +138,7 @@ struct snd_card_sb16 {
 #endif
 };
 
-static snd_card_t *snd_sb16_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_sb16_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
 #ifdef CONFIG_PNP
 
@@ -339,7 +339,7 @@ __wt_error:
 
 #endif /* CONFIG_PNP */
 
-static void snd_sb16_free(snd_card_t *card)
+static void snd_sb16_free(struct snd_card *card)
 {
 	struct snd_card_sb16 *acard = (struct snd_card_sb16 *)card->private_data;
         
@@ -362,13 +362,13 @@ static int __init snd_sb16_probe(int dev,
 	static int possible_dmas8[] = {1, 3, 0, -1};
 	static int possible_dmas16[] = {5, 6, 7, -1};
 	int xirq, xdma8, xdma16;
-	sb_t *chip;
-	snd_card_t *card;
+	struct snd_sb *chip;
+	struct snd_card *card;
 	struct snd_card_sb16 *acard;
-	opl3_t *opl3;
-	snd_hwdep_t *synth = NULL;
+	struct snd_opl3 *opl3;
+	struct snd_hwdep *synth = NULL;
 #ifdef CONFIG_SND_SB16_CSP
-	snd_hwdep_t *xcsp = NULL;
+	struct snd_hwdep *xcsp = NULL;
 #endif
 	unsigned long flags;
 	int err;
@@ -583,7 +583,7 @@ static int __devinit snd_sb16_pnp_detect(struct pnp_card_link *card,
 
 static void __devexit snd_sb16_pnp_remove(struct pnp_card_link * pcard)
 {
-	snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard);
+	struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
 
 	snd_card_disconnect(card);
 	snd_card_free_in_thread(card);
diff --git a/sound/isa/sb/sb16_csp.c b/sound/isa/sb/sb16_csp.c
index 7192d4c758e..9c2b5efbacb 100644
--- a/sound/isa/sb/sb16_csp.c
+++ b/sound/isa/sb/sb16_csp.c
@@ -72,46 +72,47 @@ struct desc_header {
 /*
  * prototypes
  */
-static void snd_sb_csp_free(snd_hwdep_t *hw);
-static int snd_sb_csp_open(snd_hwdep_t * hw, struct file *file);
-static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg);
-static int snd_sb_csp_release(snd_hwdep_t * hw, struct file *file);
-
-static int csp_detect(sb_t *chip, int *version);
-static int set_codec_parameter(sb_t *chip, unsigned char par, unsigned char val);
-static int set_register(sb_t *chip, unsigned char reg, unsigned char val);
-static int read_register(sb_t *chip, unsigned char reg);
-static int set_mode_register(sb_t *chip, unsigned char mode);
-static int get_version(sb_t *chip);
-
-static int snd_sb_csp_riff_load(snd_sb_csp_t * p, snd_sb_csp_microcode_t __user * code);
-static int snd_sb_csp_unload(snd_sb_csp_t * p);
-static int snd_sb_csp_load_user(snd_sb_csp_t * p, const unsigned char __user *buf, int size, int load_flags);
-static int snd_sb_csp_autoload(snd_sb_csp_t * p, int pcm_sfmt, int play_rec_mode);
-static int snd_sb_csp_check_version(snd_sb_csp_t * p);
-
-static int snd_sb_csp_use(snd_sb_csp_t * p);
-static int snd_sb_csp_unuse(snd_sb_csp_t * p);
-static int snd_sb_csp_start(snd_sb_csp_t * p, int sample_width, int channels);
-static int snd_sb_csp_stop(snd_sb_csp_t * p);
-static int snd_sb_csp_pause(snd_sb_csp_t * p);
-static int snd_sb_csp_restart(snd_sb_csp_t * p);
-
-static int snd_sb_qsound_build(snd_sb_csp_t * p);
-static void snd_sb_qsound_destroy(snd_sb_csp_t * p);
-static int snd_sb_csp_qsound_transfer(snd_sb_csp_t * p);
-
-static int init_proc_entry(snd_sb_csp_t * p, int device);
-static void info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer);
+static void snd_sb_csp_free(struct snd_hwdep *hw);
+static int snd_sb_csp_open(struct snd_hwdep * hw, struct file *file);
+static int snd_sb_csp_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg);
+static int snd_sb_csp_release(struct snd_hwdep * hw, struct file *file);
+
+static int csp_detect(struct snd_sb *chip, int *version);
+static int set_codec_parameter(struct snd_sb *chip, unsigned char par, unsigned char val);
+static int set_register(struct snd_sb *chip, unsigned char reg, unsigned char val);
+static int read_register(struct snd_sb *chip, unsigned char reg);
+static int set_mode_register(struct snd_sb *chip, unsigned char mode);
+static int get_version(struct snd_sb *chip);
+
+static int snd_sb_csp_riff_load(struct snd_sb_csp * p,
+				struct snd_sb_csp_microcode __user * code);
+static int snd_sb_csp_unload(struct snd_sb_csp * p);
+static int snd_sb_csp_load_user(struct snd_sb_csp * p, const unsigned char __user *buf, int size, int load_flags);
+static int snd_sb_csp_autoload(struct snd_sb_csp * p, int pcm_sfmt, int play_rec_mode);
+static int snd_sb_csp_check_version(struct snd_sb_csp * p);
+
+static int snd_sb_csp_use(struct snd_sb_csp * p);
+static int snd_sb_csp_unuse(struct snd_sb_csp * p);
+static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channels);
+static int snd_sb_csp_stop(struct snd_sb_csp * p);
+static int snd_sb_csp_pause(struct snd_sb_csp * p);
+static int snd_sb_csp_restart(struct snd_sb_csp * p);
+
+static int snd_sb_qsound_build(struct snd_sb_csp * p);
+static void snd_sb_qsound_destroy(struct snd_sb_csp * p);
+static int snd_sb_csp_qsound_transfer(struct snd_sb_csp * p);
+
+static int init_proc_entry(struct snd_sb_csp * p, int device);
+static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer);
 
 /*
  * Detect CSP chip and create a new instance
  */
-int snd_sb_csp_new(sb_t *chip, int device, snd_hwdep_t ** rhwdep)
+int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep)
 {
-	snd_sb_csp_t *p;
+	struct snd_sb_csp *p;
 	int version, err;
-	snd_hwdep_t *hw;
+	struct snd_hwdep *hw;
 
 	if (rhwdep)
 		*rhwdep = NULL;
@@ -158,9 +159,9 @@ int snd_sb_csp_new(sb_t *chip, int device, snd_hwdep_t ** rhwdep)
 /*
  * free_private for hwdep instance
  */
-static void snd_sb_csp_free(snd_hwdep_t *hwdep)
+static void snd_sb_csp_free(struct snd_hwdep *hwdep)
 {
-	snd_sb_csp_t *p = hwdep->private_data;
+	struct snd_sb_csp *p = hwdep->private_data;
 	if (p) {
 		if (p->running & SNDRV_SB_CSP_ST_RUNNING)
 			snd_sb_csp_stop(p);
@@ -173,20 +174,20 @@ static void snd_sb_csp_free(snd_hwdep_t *hwdep)
 /*
  * open the device exclusively
  */
-static int snd_sb_csp_open(snd_hwdep_t * hw, struct file *file)
+static int snd_sb_csp_open(struct snd_hwdep * hw, struct file *file)
 {
-	snd_sb_csp_t *p = hw->private_data;
+	struct snd_sb_csp *p = hw->private_data;
 	return (snd_sb_csp_use(p));
 }
 
 /*
  * ioctl for hwdep device:
  */
-static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg)
+static int snd_sb_csp_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg)
 {
-	snd_sb_csp_t *p = hw->private_data;
-	snd_sb_csp_info_t info;
-	snd_sb_csp_start_t start_info;
+	struct snd_sb_csp *p = hw->private_data;
+	struct snd_sb_csp_info info;
+	struct snd_sb_csp_start start_info;
 	int err;
 
 	snd_assert(p != NULL, return -EINVAL);
@@ -217,7 +218,7 @@ static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cm
 		/* load CSP microcode */
 	case SNDRV_SB_CSP_IOCTL_LOAD_CODE:
 		err = (p->running & SNDRV_SB_CSP_ST_RUNNING ?
-		       -EBUSY : snd_sb_csp_riff_load(p, (snd_sb_csp_microcode_t __user *) arg));
+		       -EBUSY : snd_sb_csp_riff_load(p, (struct snd_sb_csp_microcode __user *) arg));
 		break;
 	case SNDRV_SB_CSP_IOCTL_UNLOAD_CODE:
 		err = (p->running & SNDRV_SB_CSP_ST_RUNNING ?
@@ -251,9 +252,9 @@ static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cm
 /*
  * close the device
  */
-static int snd_sb_csp_release(snd_hwdep_t * hw, struct file *file)
+static int snd_sb_csp_release(struct snd_hwdep * hw, struct file *file)
 {
-	snd_sb_csp_t *p = hw->private_data;
+	struct snd_sb_csp *p = hw->private_data;
 	return (snd_sb_csp_unuse(p));
 }
 
@@ -262,7 +263,7 @@ static int snd_sb_csp_release(snd_hwdep_t * hw, struct file *file)
 /*
  * acquire device
  */
-static int snd_sb_csp_use(snd_sb_csp_t * p)
+static int snd_sb_csp_use(struct snd_sb_csp * p)
 {
 	down(&p->access_mutex);
 	if (p->used) {
@@ -279,7 +280,7 @@ static int snd_sb_csp_use(snd_sb_csp_t * p)
 /*
  * release device
  */
-static int snd_sb_csp_unuse(snd_sb_csp_t * p)
+static int snd_sb_csp_unuse(struct snd_sb_csp * p)
 {
 	down(&p->access_mutex);
 	p->used--;
@@ -292,9 +293,10 @@ static int snd_sb_csp_unuse(snd_sb_csp_t * p)
  * load microcode via ioctl: 
  * code is user-space pointer
  */
-static int snd_sb_csp_riff_load(snd_sb_csp_t * p, snd_sb_csp_microcode_t __user * mcode)
+static int snd_sb_csp_riff_load(struct snd_sb_csp * p,
+				struct snd_sb_csp_microcode __user * mcode)
 {
-	snd_sb_csp_mc_header_t info;
+	struct snd_sb_csp_mc_header info;
 
 	unsigned char __user *data_ptr;
 	unsigned char __user *data_end;
@@ -449,7 +451,7 @@ static int snd_sb_csp_riff_load(snd_sb_csp_t * p, snd_sb_csp_microcode_t __user
 /*
  * unload CSP microcode
  */
-static int snd_sb_csp_unload(snd_sb_csp_t * p)
+static int snd_sb_csp_unload(struct snd_sb_csp * p)
 {
 	if (p->running & SNDRV_SB_CSP_ST_RUNNING)
 		return -EBUSY;
@@ -472,7 +474,7 @@ static int snd_sb_csp_unload(snd_sb_csp_t * p)
 /*
  * send command sequence to DSP
  */
-static inline int command_seq(sb_t *chip, const unsigned char *seq, int size)
+static inline int command_seq(struct snd_sb *chip, const unsigned char *seq, int size)
 {
 	int i;
 	for (i = 0; i < size; i++) {
@@ -485,7 +487,7 @@ static inline int command_seq(sb_t *chip, const unsigned char *seq, int size)
 /*
  * set CSP codec parameter
  */
-static int set_codec_parameter(sb_t *chip, unsigned char par, unsigned char val)
+static int set_codec_parameter(struct snd_sb *chip, unsigned char par, unsigned char val)
 {
 	unsigned char dsp_cmd[3];
 
@@ -502,7 +504,7 @@ static int set_codec_parameter(sb_t *chip, unsigned char par, unsigned char val)
 /*
  * set CSP register
  */
-static int set_register(sb_t *chip, unsigned char reg, unsigned char val)
+static int set_register(struct snd_sb *chip, unsigned char reg, unsigned char val)
 {
 	unsigned char dsp_cmd[3];
 
@@ -516,7 +518,7 @@ static int set_register(sb_t *chip, unsigned char reg, unsigned char val)
  * read CSP register
  * return < 0 -> error
  */
-static int read_register(sb_t *chip, unsigned char reg)
+static int read_register(struct snd_sb *chip, unsigned char reg)
 {
 	unsigned char dsp_cmd[2];
 
@@ -529,7 +531,7 @@ static int read_register(sb_t *chip, unsigned char reg)
 /*
  * set CSP mode register
  */
-static int set_mode_register(sb_t *chip, unsigned char mode)
+static int set_mode_register(struct snd_sb *chip, unsigned char mode)
 {
 	unsigned char dsp_cmd[2];
 
@@ -542,7 +544,7 @@ static int set_mode_register(sb_t *chip, unsigned char mode)
  * Detect CSP
  * return 0 if CSP exists.
  */
-static int csp_detect(sb_t *chip, int *version)
+static int csp_detect(struct snd_sb *chip, int *version)
 {
 	unsigned char csp_test1, csp_test2;
 	unsigned long flags;
@@ -579,7 +581,7 @@ static int csp_detect(sb_t *chip, int *version)
 /*
  * get CSP version number
  */
-static int get_version(sb_t *chip)
+static int get_version(struct snd_sb *chip)
 {
 	unsigned char dsp_cmd[2];
 
@@ -593,7 +595,7 @@ static int get_version(sb_t *chip)
 /*
  * check if the CSP version is valid
  */
-static int snd_sb_csp_check_version(snd_sb_csp_t * p)
+static int snd_sb_csp_check_version(struct snd_sb_csp * p)
 {
 	if (p->version < 0x10 || p->version > 0x1f) {
 		snd_printd("%s: Invalid CSP version: 0x%x\n", __FUNCTION__, p->version);
@@ -605,7 +607,7 @@ static int snd_sb_csp_check_version(snd_sb_csp_t * p)
 /*
  * download microcode to CSP (microcode should have one "main" block).
  */
-static int snd_sb_csp_load(snd_sb_csp_t * p, const unsigned char *buf, int size, int load_flags)
+static int snd_sb_csp_load(struct snd_sb_csp * p, const unsigned char *buf, int size, int load_flags)
 {
 	int status, i;
 	int err;
@@ -671,7 +673,7 @@ static int snd_sb_csp_load(snd_sb_csp_t * p, const unsigned char *buf, int size,
 	return result;
 }
  
-static int snd_sb_csp_load_user(snd_sb_csp_t * p, const unsigned char __user *buf, int size, int load_flags)
+static int snd_sb_csp_load_user(struct snd_sb_csp * p, const unsigned char __user *buf, int size, int load_flags)
 {
 	int err = -ENOMEM;
 	unsigned char *kbuf = kmalloc(size, GFP_KERNEL);
@@ -691,7 +693,7 @@ static int snd_sb_csp_load_user(snd_sb_csp_t * p, const unsigned char __user *bu
  * autoload hardware codec if necessary
  * return 0 if CSP is loaded and ready to run (p->running != 0)
  */
-static int snd_sb_csp_autoload(snd_sb_csp_t * p, int pcm_sfmt, int play_rec_mode)
+static int snd_sb_csp_autoload(struct snd_sb_csp * p, int pcm_sfmt, int play_rec_mode)
 {
 	unsigned long flags;
 	int err = 0;
@@ -763,7 +765,7 @@ static int snd_sb_csp_autoload(snd_sb_csp_t * p, int pcm_sfmt, int play_rec_mode
 /*
  * start CSP
  */
-static int snd_sb_csp_start(snd_sb_csp_t * p, int sample_width, int channels)
+static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channels)
 {
 	unsigned char s_type;	/* sample type */
 	unsigned char mixL, mixR;
@@ -842,7 +844,7 @@ static int snd_sb_csp_start(snd_sb_csp_t * p, int sample_width, int channels)
 /*
  * stop CSP
  */
-static int snd_sb_csp_stop(snd_sb_csp_t * p)
+static int snd_sb_csp_stop(struct snd_sb_csp * p)
 {
 	int result;
 	unsigned char mixL, mixR;
@@ -883,7 +885,7 @@ static int snd_sb_csp_stop(snd_sb_csp_t * p)
 /*
  * pause CSP codec and hold DMA transfer
  */
-static int snd_sb_csp_pause(snd_sb_csp_t * p)
+static int snd_sb_csp_pause(struct snd_sb_csp * p)
 {
 	int result;
 	unsigned long flags;
@@ -903,7 +905,7 @@ static int snd_sb_csp_pause(snd_sb_csp_t * p)
 /*
  * restart CSP codec and resume DMA transfer
  */
-static int snd_sb_csp_restart(snd_sb_csp_t * p)
+static int snd_sb_csp_restart(struct snd_sb_csp * p)
 {
 	int result;
 	unsigned long flags;
@@ -926,7 +928,7 @@ static int snd_sb_csp_restart(snd_sb_csp_t * p)
  * QSound mixer control for PCM
  */
 
-static int snd_sb_qsound_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_sb_qsound_switch_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -935,17 +937,17 @@ static int snd_sb_qsound_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info
 	return 0;
 }
 
-static int snd_sb_qsound_switch_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sb_qsound_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	snd_sb_csp_t *p = snd_kcontrol_chip(kcontrol);
+	struct snd_sb_csp *p = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.integer.value[0] = p->q_enabled ? 1 : 0;
 	return 0;
 }
 
-static int snd_sb_qsound_switch_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sb_qsound_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	snd_sb_csp_t *p = snd_kcontrol_chip(kcontrol);
+	struct snd_sb_csp *p = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int change;
 	unsigned char nval;
@@ -958,7 +960,7 @@ static int snd_sb_qsound_switch_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
 	return change;
 }
 
-static int snd_sb_qsound_space_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_sb_qsound_space_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
@@ -967,9 +969,9 @@ static int snd_sb_qsound_space_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
 	return 0;
 }
 
-static int snd_sb_qsound_space_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sb_qsound_space_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	snd_sb_csp_t *p = snd_kcontrol_chip(kcontrol);
+	struct snd_sb_csp *p = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	
 	spin_lock_irqsave(&p->q_lock, flags);
@@ -979,9 +981,9 @@ static int snd_sb_qsound_space_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
 	return 0;
 }
 
-static int snd_sb_qsound_space_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sb_qsound_space_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	snd_sb_csp_t *p = snd_kcontrol_chip(kcontrol);
+	struct snd_sb_csp *p = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int change;
 	unsigned char nval1, nval2;
@@ -1001,7 +1003,7 @@ static int snd_sb_qsound_space_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
 	return change;
 }
 
-static snd_kcontrol_new_t snd_sb_qsound_switch = {
+static struct snd_kcontrol_new snd_sb_qsound_switch = {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "3D Control - Switch",
 	.info = snd_sb_qsound_switch_info,
@@ -1009,7 +1011,7 @@ static snd_kcontrol_new_t snd_sb_qsound_switch = {
 	.put = snd_sb_qsound_switch_put
 };
 
-static snd_kcontrol_new_t snd_sb_qsound_space = {
+static struct snd_kcontrol_new snd_sb_qsound_space = {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "3D Control - Space",
 	.info = snd_sb_qsound_space_info,
@@ -1017,9 +1019,9 @@ static snd_kcontrol_new_t snd_sb_qsound_space = {
 	.put = snd_sb_qsound_space_put
 };
 
-static int snd_sb_qsound_build(snd_sb_csp_t * p)
+static int snd_sb_qsound_build(struct snd_sb_csp * p)
 {
-	snd_card_t * card;
+	struct snd_card *card;
 	int err;
 
 	snd_assert(p != NULL, return -EINVAL);
@@ -1042,9 +1044,9 @@ static int snd_sb_qsound_build(snd_sb_csp_t * p)
 	return err;
 }
 
-static void snd_sb_qsound_destroy(snd_sb_csp_t * p)
+static void snd_sb_qsound_destroy(struct snd_sb_csp * p)
 {
-	snd_card_t * card;
+	struct snd_card *card;
 	unsigned long flags;
 
 	snd_assert(p != NULL, return);
@@ -1068,7 +1070,7 @@ static void snd_sb_qsound_destroy(snd_sb_csp_t * p)
  * Transfer qsound parameters to CSP,
  * function should be called from interrupt routine
  */
-static int snd_sb_csp_qsound_transfer(snd_sb_csp_t * p)
+static int snd_sb_csp_qsound_transfer(struct snd_sb_csp * p)
 {
 	int err = -ENXIO;
 
@@ -1093,19 +1095,19 @@ static int snd_sb_csp_qsound_transfer(snd_sb_csp_t * p)
 /*
  * proc interface
  */
-static int init_proc_entry(snd_sb_csp_t * p, int device)
+static int init_proc_entry(struct snd_sb_csp * p, int device)
 {
 	char name[16];
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 	sprintf(name, "cspD%d", device);
 	if (! snd_card_proc_new(p->chip->card, name, &entry))
 		snd_info_set_text_ops(entry, p, 1024, info_read);
 	return 0;
 }
 
-static void info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
 {
-	snd_sb_csp_t *p = entry->private_data;
+	struct snd_sb_csp *p = entry->private_data;
 
 	snd_iprintf(buffer, "Creative Signal Processor [v%d.%d]\n", (p->version >> 4), (p->version & 0x0f));
 	snd_iprintf(buffer, "State: %cx%c%c%c\n", ((p->running & SNDRV_SB_CSP_ST_QSOUND) ? 'Q' : '-'),
diff --git a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c
index 17312e060a1..97786ed37dd 100644
--- a/sound/isa/sb/sb16_main.c
+++ b/sound/isa/sb/sb16_main.c
@@ -50,10 +50,10 @@ MODULE_DESCRIPTION("Routines for control of 16-bit SoundBlaster cards and clones
 MODULE_LICENSE("GPL");
 
 #ifdef CONFIG_SND_SB16_CSP
-static void snd_sb16_csp_playback_prepare(sb_t *chip, snd_pcm_runtime_t *runtime)
+static void snd_sb16_csp_playback_prepare(struct snd_sb *chip, struct snd_pcm_runtime *runtime)
 {
 	if (chip->hardware == SB_HW_16CSP) {
-		snd_sb_csp_t *csp = chip->csp;
+		struct snd_sb_csp *csp = chip->csp;
 
 		if (csp->running & SNDRV_SB_CSP_ST_LOADED) {
 			/* manually loaded codec */
@@ -98,10 +98,10 @@ static void snd_sb16_csp_playback_prepare(sb_t *chip, snd_pcm_runtime_t *runtime
 	}
 }
 
-static void snd_sb16_csp_capture_prepare(sb_t *chip, snd_pcm_runtime_t *runtime)
+static void snd_sb16_csp_capture_prepare(struct snd_sb *chip, struct snd_pcm_runtime *runtime)
 {
 	if (chip->hardware == SB_HW_16CSP) {
-		snd_sb_csp_t *csp = chip->csp;
+		struct snd_sb_csp *csp = chip->csp;
 
 		if (csp->running & SNDRV_SB_CSP_ST_LOADED) {
 			/* manually loaded codec */
@@ -136,10 +136,10 @@ static void snd_sb16_csp_capture_prepare(sb_t *chip, snd_pcm_runtime_t *runtime)
 	}
 }
 
-static void snd_sb16_csp_update(sb_t *chip)
+static void snd_sb16_csp_update(struct snd_sb *chip)
 {
 	if (chip->hardware == SB_HW_16CSP) {
-		snd_sb_csp_t *csp = chip->csp;
+		struct snd_sb_csp *csp = chip->csp;
 
 		if (csp->qpos_changed) {
 			spin_lock(&chip->reg_lock);
@@ -149,11 +149,11 @@ static void snd_sb16_csp_update(sb_t *chip)
 	}
 }
 
-static void snd_sb16_csp_playback_open(sb_t *chip, snd_pcm_runtime_t *runtime)
+static void snd_sb16_csp_playback_open(struct snd_sb *chip, struct snd_pcm_runtime *runtime)
 {
 	/* CSP decoders (QSound excluded) support only 16bit transfers */
 	if (chip->hardware == SB_HW_16CSP) {
-		snd_sb_csp_t *csp = chip->csp;
+		struct snd_sb_csp *csp = chip->csp;
 
 		if (csp->running & SNDRV_SB_CSP_ST_LOADED) {
 			/* manually loaded codec */
@@ -168,10 +168,10 @@ static void snd_sb16_csp_playback_open(sb_t *chip, snd_pcm_runtime_t *runtime)
 	}
 }
 
-static void snd_sb16_csp_playback_close(sb_t *chip)
+static void snd_sb16_csp_playback_close(struct snd_sb *chip)
 {
 	if ((chip->hardware == SB_HW_16CSP) && (chip->open == SNDRV_SB_CSP_MODE_DSP_WRITE)) {
-		snd_sb_csp_t *csp = chip->csp;
+		struct snd_sb_csp *csp = chip->csp;
 
 		if (csp->ops.csp_stop(csp) == 0) {
 			csp->ops.csp_unuse(csp);
@@ -180,11 +180,11 @@ static void snd_sb16_csp_playback_close(sb_t *chip)
 	}
 }
 
-static void snd_sb16_csp_capture_open(sb_t *chip, snd_pcm_runtime_t *runtime)
+static void snd_sb16_csp_capture_open(struct snd_sb *chip, struct snd_pcm_runtime *runtime)
 {
 	/* CSP coders support only 16bit transfers */
 	if (chip->hardware == SB_HW_16CSP) {
-		snd_sb_csp_t *csp = chip->csp;
+		struct snd_sb_csp *csp = chip->csp;
 
 		if (csp->running & SNDRV_SB_CSP_ST_LOADED) {
 			/* manually loaded codec */
@@ -199,10 +199,10 @@ static void snd_sb16_csp_capture_open(sb_t *chip, snd_pcm_runtime_t *runtime)
 	}
 }
 
-static void snd_sb16_csp_capture_close(sb_t *chip)
+static void snd_sb16_csp_capture_close(struct snd_sb *chip)
 {
 	if ((chip->hardware == SB_HW_16CSP) && (chip->open == SNDRV_SB_CSP_MODE_DSP_READ)) {
-		snd_sb_csp_t *csp = chip->csp;
+		struct snd_sb_csp *csp = chip->csp;
 
 		if (csp->ops.csp_stop(csp) == 0) {
 			csp->ops.csp_unuse(csp);
@@ -221,7 +221,7 @@ static void snd_sb16_csp_capture_close(sb_t *chip)
 #endif
 
 
-static void snd_sb16_setup_rate(sb_t *chip,
+static void snd_sb16_setup_rate(struct snd_sb *chip,
 				unsigned short rate,
 				int channel)
 {
@@ -244,23 +244,23 @@ static void snd_sb16_setup_rate(sb_t *chip,
 	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
-static int snd_sb16_hw_params(snd_pcm_substream_t * substream,
-			      snd_pcm_hw_params_t * hw_params)
+static int snd_sb16_hw_params(struct snd_pcm_substream *substream,
+			      struct snd_pcm_hw_params *hw_params)
 {
 	return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
 }
 
-static int snd_sb16_hw_free(snd_pcm_substream_t * substream)
+static int snd_sb16_hw_free(struct snd_pcm_substream *substream)
 {
 	snd_pcm_lib_free_pages(substream);
 	return 0;
 }
 
-static int snd_sb16_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_sb16_playback_prepare(struct snd_pcm_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned char format;
 	unsigned int size, count, dma;
 
@@ -298,10 +298,10 @@ static int snd_sb16_playback_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_sb16_playback_trigger(snd_pcm_substream_t * substream,
+static int snd_sb16_playback_trigger(struct snd_pcm_substream *substream,
 				     int cmd)
 {
-	sb_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
 	int result = 0;
 
 	spin_lock(&chip->reg_lock);
@@ -324,11 +324,11 @@ static int snd_sb16_playback_trigger(snd_pcm_substream_t * substream,
 	return result;
 }
 
-static int snd_sb16_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_sb16_capture_prepare(struct snd_pcm_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned char format;
 	unsigned int size, count, dma;
 
@@ -365,10 +365,10 @@ static int snd_sb16_capture_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_sb16_capture_trigger(snd_pcm_substream_t * substream,
+static int snd_sb16_capture_trigger(struct snd_pcm_substream *substream,
 				    int cmd)
 {
-	sb_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
 	int result = 0;
 
 	spin_lock(&chip->reg_lock);
@@ -393,7 +393,7 @@ static int snd_sb16_capture_trigger(snd_pcm_substream_t * substream,
 
 irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	sb_t *chip = dev_id;
+	struct snd_sb *chip = dev_id;
 	unsigned char status;
 	int ok;
 
@@ -443,9 +443,9 @@ irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 
  */
 
-static snd_pcm_uframes_t snd_sb16_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_sb16_playback_pointer(struct snd_pcm_substream *substream)
 {
-	sb_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
 	unsigned int dma;
 	size_t ptr;
 
@@ -454,9 +454,9 @@ static snd_pcm_uframes_t snd_sb16_playback_pointer(snd_pcm_substream_t * substre
 	return bytes_to_frames(substream->runtime, ptr);
 }
 
-static snd_pcm_uframes_t snd_sb16_capture_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_sb16_capture_pointer(struct snd_pcm_substream *substream)
 {
-	sb_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
 	unsigned int dma;
 	size_t ptr;
 
@@ -469,7 +469,7 @@ static snd_pcm_uframes_t snd_sb16_capture_pointer(snd_pcm_substream_t * substrea
 
  */
 
-static snd_pcm_hardware_t snd_sb16_playback =
+static struct snd_pcm_hardware snd_sb16_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
@@ -487,7 +487,7 @@ static snd_pcm_hardware_t snd_sb16_playback =
 	.fifo_size =		0,
 };
 
-static snd_pcm_hardware_t snd_sb16_capture =
+static struct snd_pcm_hardware snd_sb16_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
@@ -509,11 +509,11 @@ static snd_pcm_hardware_t snd_sb16_capture =
  *  open/close
  */
 
-static int snd_sb16_playback_open(snd_pcm_substream_t * substream)
+static int snd_sb16_playback_open(struct snd_pcm_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	spin_lock_irqsave(&chip->open_lock, flags);
 	if (chip->mode & SB_MODE_PLAYBACK) {
@@ -566,10 +566,10 @@ static int snd_sb16_playback_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_sb16_playback_close(snd_pcm_substream_t * substream)
+static int snd_sb16_playback_close(struct snd_pcm_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
 
 	snd_sb16_csp_playback_close(chip);
 	spin_lock_irqsave(&chip->open_lock, flags);
@@ -579,11 +579,11 @@ static int snd_sb16_playback_close(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_sb16_capture_open(snd_pcm_substream_t * substream)
+static int snd_sb16_capture_open(struct snd_pcm_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	spin_lock_irqsave(&chip->open_lock, flags);
 	if (chip->mode & SB_MODE_CAPTURE) {
@@ -636,10 +636,10 @@ static int snd_sb16_capture_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_sb16_capture_close(snd_pcm_substream_t * substream)
+static int snd_sb16_capture_close(struct snd_pcm_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
 
 	snd_sb16_csp_capture_close(chip);
 	spin_lock_irqsave(&chip->open_lock, flags);
@@ -653,7 +653,7 @@ static int snd_sb16_capture_close(snd_pcm_substream_t * substream)
  *  DMA control interface
  */
 
-static int snd_sb16_set_dma_mode(sb_t *chip, int what)
+static int snd_sb16_set_dma_mode(struct snd_sb *chip, int what)
 {
 	if (chip->dma8 < 0 || chip->dma16 < 0) {
 		snd_assert(what == 0, return -EINVAL);
@@ -671,7 +671,7 @@ static int snd_sb16_set_dma_mode(sb_t *chip, int what)
 	return 0;
 }
 
-static int snd_sb16_get_dma_mode(sb_t *chip)
+static int snd_sb16_get_dma_mode(struct snd_sb *chip)
 {
 	if (chip->dma8 < 0 || chip->dma16 < 0)
 		return 0;
@@ -685,7 +685,7 @@ static int snd_sb16_get_dma_mode(sb_t *chip)
 	}
 }
 
-static int snd_sb16_dma_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_sb16_dma_control_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[3] = {
 		"Auto", "Playback", "Capture"
@@ -700,9 +700,9 @@ static int snd_sb16_dma_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info
 	return 0;
 }
 
-static int snd_sb16_dma_control_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sb16_dma_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	sb_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_sb *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	
 	spin_lock_irqsave(&chip->reg_lock, flags);
@@ -711,9 +711,9 @@ static int snd_sb16_dma_control_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
 	return 0;
 }
 
-static int snd_sb16_dma_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sb16_dma_control_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	sb_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_sb *chip = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	unsigned char nval, oval;
 	int change;
@@ -728,7 +728,7 @@ static int snd_sb16_dma_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
 	return change;
 }
 
-static snd_kcontrol_new_t snd_sb16_dma_control = {
+static struct snd_kcontrol_new snd_sb16_dma_control = {
 	.iface = SNDRV_CTL_ELEM_IFACE_CARD,
 	.name = "16-bit DMA Allocation",
 	.info = snd_sb16_dma_control_info,
@@ -740,7 +740,7 @@ static snd_kcontrol_new_t snd_sb16_dma_control = {
  *  Initialization part
  */
  
-int snd_sb16dsp_configure(sb_t * chip)
+int snd_sb16dsp_configure(struct snd_sb * chip)
 {
 	unsigned long flags;
 	unsigned char irqreg = 0, dmareg = 0, mpureg;
@@ -829,7 +829,7 @@ int snd_sb16dsp_configure(sb_t * chip)
 	return 0;
 }
 
-static snd_pcm_ops_t snd_sb16_playback_ops = {
+static struct snd_pcm_ops snd_sb16_playback_ops = {
 	.open =		snd_sb16_playback_open,
 	.close =	snd_sb16_playback_close,
 	.ioctl =	snd_pcm_lib_ioctl,
@@ -840,7 +840,7 @@ static snd_pcm_ops_t snd_sb16_playback_ops = {
 	.pointer =	snd_sb16_playback_pointer,
 };
 
-static snd_pcm_ops_t snd_sb16_capture_ops = {
+static struct snd_pcm_ops snd_sb16_capture_ops = {
 	.open =		snd_sb16_capture_open,
 	.close =	snd_sb16_capture_close,
 	.ioctl =	snd_pcm_lib_ioctl,
@@ -851,10 +851,10 @@ static snd_pcm_ops_t snd_sb16_capture_ops = {
 	.pointer =	snd_sb16_capture_pointer,
 };
 
-int snd_sb16dsp_pcm(sb_t * chip, int device, snd_pcm_t ** rpcm)
+int snd_sb16dsp_pcm(struct snd_sb * chip, int device, struct snd_pcm ** rpcm)
 {
-	snd_card_t *card = chip->card;
-	snd_pcm_t *pcm;
+	struct snd_card *card = chip->card;
+	struct snd_pcm *pcm;
 	int err;
 
 	if (rpcm)
@@ -882,7 +882,7 @@ int snd_sb16dsp_pcm(sb_t * chip, int device, snd_pcm_t ** rpcm)
 	return 0;
 }
 
-const snd_pcm_ops_t *snd_sb16dsp_get_pcm_ops(int direction)
+const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction)
 {
 	return direction == SNDRV_PCM_STREAM_PLAYBACK ?
 		&snd_sb16_playback_ops : &snd_sb16_capture_ops;
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
index 0bc0a3afdab..5116038fcb4 100644
--- a/sound/isa/sb/sb8.c
+++ b/sound/isa/sb/sb8.c
@@ -59,11 +59,11 @@ struct snd_sb8 {
 	struct resource *fm_res;	/* used to block FM i/o region for legacy cards */
 };
 
-static snd_card_t *snd_sb8_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_sb8_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
 static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	sb_t *chip = dev_id;
+	struct snd_sb *chip = dev_id;
 
 	if (chip->open & SB_OPEN_PCM) {
 		return snd_sb8dsp_interrupt(chip);
@@ -72,7 +72,7 @@ static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id, struct pt_regs *regs
 	}
 }
 
-static void snd_sb8_free(snd_card_t *card)
+static void snd_sb8_free(struct snd_card *card)
 {
 	struct snd_sb8 *acard = (struct snd_sb8 *)card->private_data;
 
@@ -83,10 +83,10 @@ static void snd_sb8_free(snd_card_t *card)
 
 static int __init snd_sb8_probe(int dev)
 {
-	sb_t *chip;
-	snd_card_t *card;
+	struct snd_sb *chip;
+	struct snd_card *card;
 	struct snd_sb8 *acard;
-	opl3_t *opl3;
+	struct snd_opl3 *opl3;
 	int err;
 
 	card = snd_card_new(index[dev], id[dev], THIS_MODULE,
diff --git a/sound/isa/sb/sb8_main.c b/sound/isa/sb/sb8_main.c
index 28d8afdf689..aea9e5ec7b3 100644
--- a/sound/isa/sb/sb8_main.c
+++ b/sound/isa/sb/sb8_main.c
@@ -46,19 +46,19 @@ MODULE_LICENSE("GPL");
 #define SB8_DEN(v)	((SB8_CLOCK + (v) / 2) / (v))
 #define SB8_RATE(v)	(SB8_CLOCK / SB8_DEN(v))
 
-static ratnum_t clock = {
+static struct snd_ratnum clock = {
 	.num = SB8_CLOCK,
 	.den_min = 1,
 	.den_max = 256,
 	.den_step = 1,
 };
 
-static snd_pcm_hw_constraint_ratnums_t hw_constraints_clock = {
+static struct snd_pcm_hw_constraint_ratnums hw_constraints_clock = {
 	.nrats = 1,
 	.rats = &clock,
 };
 
-static ratnum_t stereo_clocks[] = {
+static struct snd_ratnum stereo_clocks[] = {
 	{
 		.num = SB8_CLOCK,
 		.den_min = SB8_DEN(22050),
@@ -73,10 +73,10 @@ static ratnum_t stereo_clocks[] = {
 	}
 };
 
-static int snd_sb8_hw_constraint_rate_channels(snd_pcm_hw_params_t *params,
-					       snd_pcm_hw_rule_t *rule)
+static int snd_sb8_hw_constraint_rate_channels(struct snd_pcm_hw_params *params,
+					       struct snd_pcm_hw_rule *rule)
 {
-	snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
+	struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
 	if (c->min > 1) {
 	  	unsigned int num = 0, den = 0;
 		int err = snd_interval_ratnum(hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE),
@@ -90,22 +90,22 @@ static int snd_sb8_hw_constraint_rate_channels(snd_pcm_hw_params_t *params,
 	return 0;
 }
 
-static int snd_sb8_hw_constraint_channels_rate(snd_pcm_hw_params_t *params,
-					       snd_pcm_hw_rule_t *rule)
+static int snd_sb8_hw_constraint_channels_rate(struct snd_pcm_hw_params *params,
+					       struct snd_pcm_hw_rule *rule)
 {
-	snd_interval_t *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
+	struct snd_interval *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
 	if (r->min > SB8_RATE(22050) || r->max <= SB8_RATE(11025)) {
-		snd_interval_t t = { .min = 1, .max = 1 };
+		struct snd_interval t = { .min = 1, .max = 1 };
 		return snd_interval_refine(hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS), &t);
 	}
 	return 0;
 }
 
-static int snd_sb8_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_sb8_playback_prepare(struct snd_pcm_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned int mixreg, rate, size, count;
 
 	rate = runtime->rate;
@@ -178,11 +178,11 @@ static int snd_sb8_playback_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream,
+static int snd_sb8_playback_trigger(struct snd_pcm_substream *substream,
 				    int cmd)
 {
 	unsigned long flags;
-	sb_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
 	unsigned int count;
 
 	spin_lock_irqsave(&chip->reg_lock, flags);
@@ -197,7 +197,7 @@ static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream,
 		break;
 	case SNDRV_PCM_TRIGGER_STOP:
 		if (chip->playback_format == SB_DSP_HI_OUTPUT_AUTO) {
-			snd_pcm_runtime_t *runtime = substream->runtime;
+			struct snd_pcm_runtime *runtime = substream->runtime;
 			snd_sbdsp_reset(chip);
 			if (runtime->channels > 1) {
 				spin_lock(&chip->mixer_lock);
@@ -215,23 +215,23 @@ static int snd_sb8_playback_trigger(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_sb8_hw_params(snd_pcm_substream_t * substream,
-			     snd_pcm_hw_params_t * hw_params)
+static int snd_sb8_hw_params(struct snd_pcm_substream *substream,
+			     struct snd_pcm_hw_params *hw_params)
 {
 	return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
 }
 
-static int snd_sb8_hw_free(snd_pcm_substream_t * substream)
+static int snd_sb8_hw_free(struct snd_pcm_substream *substream)
 {
 	snd_pcm_lib_free_pages(substream);
 	return 0;
 }
 
-static int snd_sb8_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_sb8_capture_prepare(struct snd_pcm_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned int mixreg, rate, size, count;
 
 	rate = runtime->rate;
@@ -290,11 +290,11 @@ static int snd_sb8_capture_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream,
+static int snd_sb8_capture_trigger(struct snd_pcm_substream *substream,
 				   int cmd)
 {
 	unsigned long flags;
-	sb_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
 	unsigned int count;
 
 	spin_lock_irqsave(&chip->reg_lock, flags);
@@ -309,7 +309,7 @@ static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream,
 		break;
 	case SNDRV_PCM_TRIGGER_STOP:
 		if (chip->capture_format == SB_DSP_HI_INPUT_AUTO) {
-			snd_pcm_runtime_t *runtime = substream->runtime;
+			struct snd_pcm_runtime *runtime = substream->runtime;
 			snd_sbdsp_reset(chip);
 			if (runtime->channels > 1) {
 				/* restore input filter status */
@@ -329,10 +329,10 @@ static int snd_sb8_capture_trigger(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-irqreturn_t snd_sb8dsp_interrupt(sb_t *chip)
+irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip)
 {
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
 
 	snd_sb_ack_8bit(chip);
 	switch (chip->mode) {
@@ -354,9 +354,9 @@ irqreturn_t snd_sb8dsp_interrupt(sb_t *chip)
 	return IRQ_HANDLED;
 }
 
-static snd_pcm_uframes_t snd_sb8_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_sb8_playback_pointer(struct snd_pcm_substream *substream)
 {
-	sb_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
 	size_t ptr;
 
 	if (chip->mode != SB_MODE_PLAYBACK_8)
@@ -365,9 +365,9 @@ static snd_pcm_uframes_t snd_sb8_playback_pointer(snd_pcm_substream_t * substrea
 	return bytes_to_frames(substream->runtime, ptr);
 }
 
-static snd_pcm_uframes_t snd_sb8_capture_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_sb8_capture_pointer(struct snd_pcm_substream *substream)
 {
-	sb_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
 	size_t ptr;
 
 	if (chip->mode != SB_MODE_CAPTURE_8)
@@ -380,7 +380,7 @@ static snd_pcm_uframes_t snd_sb8_capture_pointer(snd_pcm_substream_t * substream
 
  */
 
-static snd_pcm_hardware_t snd_sb8_playback =
+static struct snd_pcm_hardware snd_sb8_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
@@ -399,7 +399,7 @@ static snd_pcm_hardware_t snd_sb8_playback =
 	.fifo_size =		0,
 };
 
-static snd_pcm_hardware_t snd_sb8_capture =
+static struct snd_pcm_hardware snd_sb8_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
@@ -422,10 +422,10 @@ static snd_pcm_hardware_t snd_sb8_capture =
  *
  */
  
-static int snd_sb8_open(snd_pcm_substream_t *substream)
+static int snd_sb8_open(struct snd_pcm_substream *substream)
 {
-	sb_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned long flags;
 
 	spin_lock_irqsave(&chip->open_lock, flags);
@@ -468,10 +468,10 @@ static int snd_sb8_open(snd_pcm_substream_t *substream)
 	return 0;	
 }
 
-static int snd_sb8_close(snd_pcm_substream_t *substream)
+static int snd_sb8_close(struct snd_pcm_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_sb *chip = snd_pcm_substream_chip(substream);
 
 	chip->playback_substream = NULL;
 	chip->capture_substream = NULL;
@@ -485,7 +485,7 @@ static int snd_sb8_close(snd_pcm_substream_t *substream)
  *  Initialization part
  */
  
-static snd_pcm_ops_t snd_sb8_playback_ops = {
+static struct snd_pcm_ops snd_sb8_playback_ops = {
 	.open =			snd_sb8_open,
 	.close =		snd_sb8_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -496,7 +496,7 @@ static snd_pcm_ops_t snd_sb8_playback_ops = {
 	.pointer =		snd_sb8_playback_pointer,
 };
 
-static snd_pcm_ops_t snd_sb8_capture_ops = {
+static struct snd_pcm_ops snd_sb8_capture_ops = {
 	.open =			snd_sb8_open,
 	.close =		snd_sb8_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -507,10 +507,10 @@ static snd_pcm_ops_t snd_sb8_capture_ops = {
 	.pointer =		snd_sb8_capture_pointer,
 };
 
-int snd_sb8dsp_pcm(sb_t *chip, int device, snd_pcm_t ** rpcm)
+int snd_sb8dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm)
 {
-	snd_card_t *card = chip->card;
-	snd_pcm_t *pcm;
+	struct snd_card *card = chip->card;
+	struct snd_pcm *pcm;
 	int err;
 
 	if (rpcm)
diff --git a/sound/isa/sb/sb8_midi.c b/sound/isa/sb/sb8_midi.c
index d2c633a40e7..c549aceea29 100644
--- a/sound/isa/sb/sb8_midi.c
+++ b/sound/isa/sb/sb8_midi.c
@@ -36,9 +36,9 @@
 
  */
 
-irqreturn_t snd_sb8dsp_midi_interrupt(sb_t * chip)
+irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb * chip)
 {
-	snd_rawmidi_t *rmidi;
+	struct snd_rawmidi *rmidi;
 	int max = 64;
 	char byte;
 
@@ -63,10 +63,10 @@ irqreturn_t snd_sb8dsp_midi_interrupt(sb_t * chip)
 
  */
 
-static int snd_sb8dsp_midi_input_open(snd_rawmidi_substream_t * substream)
+static int snd_sb8dsp_midi_input_open(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip;
+	struct snd_sb *chip;
 	unsigned int valid_open_flags;
 
 	chip = substream->rmidi->private_data;
@@ -90,10 +90,10 @@ static int snd_sb8dsp_midi_input_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_sb8dsp_midi_output_open(snd_rawmidi_substream_t * substream)
+static int snd_sb8dsp_midi_output_open(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip;
+	struct snd_sb *chip;
 	unsigned int valid_open_flags;
 
 	chip = substream->rmidi->private_data;
@@ -117,10 +117,10 @@ static int snd_sb8dsp_midi_output_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_sb8dsp_midi_input_close(snd_rawmidi_substream_t * substream)
+static int snd_sb8dsp_midi_input_close(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip;
+	struct snd_sb *chip;
 
 	chip = substream->rmidi->private_data;
 	spin_lock_irqsave(&chip->open_lock, flags);
@@ -135,10 +135,10 @@ static int snd_sb8dsp_midi_input_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_sb8dsp_midi_output_close(snd_rawmidi_substream_t * substream)
+static int snd_sb8dsp_midi_output_close(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip;
+	struct snd_sb *chip;
 
 	chip = substream->rmidi->private_data;
 	spin_lock_irqsave(&chip->open_lock, flags);
@@ -153,10 +153,10 @@ static int snd_sb8dsp_midi_output_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static void snd_sb8dsp_midi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_sb8dsp_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
 {
 	unsigned long flags;
-	sb_t *chip;
+	struct snd_sb *chip;
 
 	chip = substream->rmidi->private_data;
 	spin_lock_irqsave(&chip->open_lock, flags);
@@ -176,10 +176,10 @@ static void snd_sb8dsp_midi_input_trigger(snd_rawmidi_substream_t * substream, i
 	spin_unlock_irqrestore(&chip->open_lock, flags);
 }
 
-static void snd_sb8dsp_midi_output_write(snd_rawmidi_substream_t * substream)
+static void snd_sb8dsp_midi_output_write(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
-	sb_t *chip;
+	struct snd_sb *chip;
 	char byte;
 	int max = 32;
 
@@ -214,8 +214,8 @@ static void snd_sb8dsp_midi_output_write(snd_rawmidi_substream_t * substream)
 
 static void snd_sb8dsp_midi_output_timer(unsigned long data)
 {
-	snd_rawmidi_substream_t * substream = (snd_rawmidi_substream_t *) data;
-	sb_t * chip = substream->rmidi->private_data;
+	struct snd_rawmidi_substream *substream = (struct snd_rawmidi_substream *) data;
+	struct snd_sb * chip = substream->rmidi->private_data;
 	unsigned long flags;
 
 	spin_lock_irqsave(&chip->open_lock, flags);
@@ -225,10 +225,10 @@ static void snd_sb8dsp_midi_output_timer(unsigned long data)
 	snd_sb8dsp_midi_output_write(substream);
 }
 
-static void snd_sb8dsp_midi_output_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_sb8dsp_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
 {
 	unsigned long flags;
-	sb_t *chip;
+	struct snd_sb *chip;
 
 	chip = substream->rmidi->private_data;
 	spin_lock_irqsave(&chip->open_lock, flags);
@@ -256,23 +256,23 @@ static void snd_sb8dsp_midi_output_trigger(snd_rawmidi_substream_t * substream,
 
  */
 
-static snd_rawmidi_ops_t snd_sb8dsp_midi_output =
+static struct snd_rawmidi_ops snd_sb8dsp_midi_output =
 {
 	.open =		snd_sb8dsp_midi_output_open,
 	.close =	snd_sb8dsp_midi_output_close,
 	.trigger =	snd_sb8dsp_midi_output_trigger,
 };
 
-static snd_rawmidi_ops_t snd_sb8dsp_midi_input =
+static struct snd_rawmidi_ops snd_sb8dsp_midi_input =
 {
 	.open =		snd_sb8dsp_midi_input_open,
 	.close =	snd_sb8dsp_midi_input_close,
 	.trigger =	snd_sb8dsp_midi_input_trigger,
 };
 
-int snd_sb8dsp_midi(sb_t *chip, int device, snd_rawmidi_t ** rrawmidi)
+int snd_sb8dsp_midi(struct snd_sb *chip, int device, struct snd_rawmidi ** rrawmidi)
 {
-	snd_rawmidi_t *rmidi;
+	struct snd_rawmidi *rmidi;
 	int err;
 
 	if (rrawmidi)
diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c
index 603e923b5d2..eb86b4456ee 100644
--- a/sound/isa/sb/sb_common.c
+++ b/sound/isa/sb/sb_common.c
@@ -41,7 +41,7 @@ MODULE_LICENSE("GPL");
 
 #undef IO_DEBUG
 
-int snd_sbdsp_command(sb_t *chip, unsigned char val)
+int snd_sbdsp_command(struct snd_sb *chip, unsigned char val)
 {
 	int i;
 #ifdef IO_DEBUG
@@ -56,7 +56,7 @@ int snd_sbdsp_command(sb_t *chip, unsigned char val)
 	return 0;
 }
 
-int snd_sbdsp_get_byte(sb_t *chip)
+int snd_sbdsp_get_byte(struct snd_sb *chip)
 {
 	int val;
 	int i;
@@ -73,7 +73,7 @@ int snd_sbdsp_get_byte(sb_t *chip)
 	return -ENODEV;
 }
 
-int snd_sbdsp_reset(sb_t *chip)
+int snd_sbdsp_reset(struct snd_sb *chip)
 {
 	int i;
 
@@ -92,7 +92,7 @@ int snd_sbdsp_reset(sb_t *chip)
 	return -ENODEV;
 }
 
-static int snd_sbdsp_version(sb_t * chip)
+static int snd_sbdsp_version(struct snd_sb * chip)
 {
 	unsigned int result = -ENODEV;
 
@@ -102,7 +102,7 @@ static int snd_sbdsp_version(sb_t * chip)
 	return result;
 }
 
-static int snd_sbdsp_probe(sb_t * chip)
+static int snd_sbdsp_probe(struct snd_sb * chip)
 {
 	int version;
 	int major, minor;
@@ -176,7 +176,7 @@ static int snd_sbdsp_probe(sb_t * chip)
 	return 0;
 }
 
-static int snd_sbdsp_free(sb_t *chip)
+static int snd_sbdsp_free(struct snd_sb *chip)
 {
 	if (chip->res_port)
 		release_and_free_resource(chip->res_port);
@@ -196,24 +196,24 @@ static int snd_sbdsp_free(sb_t *chip)
 	return 0;
 }
 
-static int snd_sbdsp_dev_free(snd_device_t *device)
+static int snd_sbdsp_dev_free(struct snd_device *device)
 {
-	sb_t *chip = device->device_data;
+	struct snd_sb *chip = device->device_data;
 	return snd_sbdsp_free(chip);
 }
 
-int snd_sbdsp_create(snd_card_t *card,
+int snd_sbdsp_create(struct snd_card *card,
 		     unsigned long port,
 		     int irq,
 		     irqreturn_t (*irq_handler)(int, void *, struct pt_regs *),
 		     int dma8,
 		     int dma16,
 		     unsigned short hardware,
-		     sb_t **r_chip)
+		     struct snd_sb **r_chip)
 {
-	sb_t *chip;
+	struct snd_sb *chip;
 	int err;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_sbdsp_dev_free,
 	};
 
diff --git a/sound/isa/sb/sb_mixer.c b/sound/isa/sb/sb_mixer.c
index 23cfa6a6a0a..6e0b935a8b8 100644
--- a/sound/isa/sb/sb_mixer.c
+++ b/sound/isa/sb/sb_mixer.c
@@ -29,7 +29,7 @@
 
 #undef IO_DEBUG
 
-void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data)
+void snd_sbmixer_write(struct snd_sb *chip, unsigned char reg, unsigned char data)
 {
 	outb(reg, SBP(chip, MIXER_ADDR));
 	udelay(10);
@@ -40,7 +40,7 @@ void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data)
 #endif
 }
 
-unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg)
+unsigned char snd_sbmixer_read(struct snd_sb *chip, unsigned char reg)
 {
 	unsigned char result;
 
@@ -58,7 +58,7 @@ unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg)
  * Single channel mixer element
  */
 
-static int snd_sbmixer_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_sbmixer_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 24) & 0xff;
 
@@ -69,9 +69,9 @@ static int snd_sbmixer_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_sbmixer_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sbmixer_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	sb_t *sb = snd_kcontrol_chip(kcontrol);
+	struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 16) & 0xff;
@@ -85,9 +85,9 @@ static int snd_sbmixer_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
 	return 0;
 }
 
-static int snd_sbmixer_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sbmixer_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	sb_t *sb = snd_kcontrol_chip(kcontrol);
+	struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 16) & 0x07;
@@ -110,7 +110,7 @@ static int snd_sbmixer_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
  * Double channel mixer element
  */
 
-static int snd_sbmixer_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_sbmixer_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 24) & 0xff;
 
@@ -121,9 +121,9 @@ static int snd_sbmixer_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_sbmixer_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sbmixer_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	sb_t *sb = snd_kcontrol_chip(kcontrol);
+	struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -141,9 +141,9 @@ static int snd_sbmixer_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
 	return 0;
 }
 
-static int snd_sbmixer_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sbmixer_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	sb_t *sb = snd_kcontrol_chip(kcontrol);
+	struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -181,7 +181,7 @@ static int snd_sbmixer_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
  * DT-019x / ALS-007 capture/input switch
  */
 
-static int snd_dt019x_input_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_dt019x_input_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[5] = {
 		"CD", "Mic", "Line", "Synth", "Master"
@@ -196,9 +196,9 @@ static int snd_dt019x_input_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
 	return 0;
 }
 
-static int snd_dt019x_input_sw_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_dt019x_input_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	sb_t *sb = snd_kcontrol_chip(kcontrol);
+	struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	unsigned char oval;
 	
@@ -232,9 +232,9 @@ static int snd_dt019x_input_sw_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
 	return 0;
 }
 
-static int snd_dt019x_input_sw_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_dt019x_input_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	sb_t *sb = snd_kcontrol_chip(kcontrol);
+	struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int change;
 	unsigned char nval, oval;
@@ -273,7 +273,7 @@ static int snd_dt019x_input_sw_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
  * SBPRO input multiplexer
  */
 
-static int snd_sb8mixer_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_sb8mixer_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[3] = {
 		"Mic", "CD", "Line"
@@ -289,9 +289,9 @@ static int snd_sb8mixer_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
 }
 
 
-static int snd_sb8mixer_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sb8mixer_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	sb_t *sb = snd_kcontrol_chip(kcontrol);
+	struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	unsigned char oval;
 	
@@ -312,9 +312,9 @@ static int snd_sb8mixer_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_sb8mixer_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sb8mixer_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	sb_t *sb = snd_kcontrol_chip(kcontrol);
+	struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int change;
 	unsigned char nval, oval;
@@ -346,7 +346,7 @@ static int snd_sb8mixer_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
  * SB16 input switch
  */
 
-static int snd_sb16mixer_info_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_sb16mixer_info_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 4;
@@ -355,9 +355,9 @@ static int snd_sb16mixer_info_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_i
 	return 0;
 }
 
-static int snd_sb16mixer_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sb16mixer_get_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	sb_t *sb = snd_kcontrol_chip(kcontrol);
+	struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg1 = kcontrol->private_value & 0xff;
 	int reg2 = (kcontrol->private_value >> 8) & 0xff;
@@ -376,9 +376,9 @@ static int snd_sb16mixer_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
 	return 0;
 }                                                                                                                   
 
-static int snd_sb16mixer_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_sb16mixer_put_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	sb_t *sb = snd_kcontrol_chip(kcontrol);
+	struct snd_sb *sb = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int reg1 = kcontrol->private_value & 0xff;
 	int reg2 = (kcontrol->private_value >> 8) & 0xff;
@@ -410,9 +410,9 @@ static int snd_sb16mixer_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
  */
 /*
  */
-int snd_sbmixer_add_ctl(sb_t *chip, const char *name, int index, int type, unsigned long value)
+int snd_sbmixer_add_ctl(struct snd_sb *chip, const char *name, int index, int type, unsigned long value)
 {
-	static snd_kcontrol_new_t newctls[] = {
+	static struct snd_kcontrol_new newctls[] = {
 		[SB_MIX_SINGLE] = {
 			.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 			.info = snd_sbmixer_info_single,
@@ -444,7 +444,7 @@ int snd_sbmixer_add_ctl(sb_t *chip, const char *name, int index, int type, unsig
 			.put = snd_dt019x_input_sw_put,
 		},
 	};
-	snd_kcontrol_t *ctl;
+	struct snd_kcontrol *ctl;
 	int err;
 
 	ctl = snd_ctl_new1(&newctls[type], chip);
@@ -758,7 +758,7 @@ static unsigned char snd_als4000_init_values[][2] = {
 
 /*
  */
-static int snd_sbmixer_init(sb_t *chip,
+static int snd_sbmixer_init(struct snd_sb *chip,
 			    struct sbmix_elem **controls,
 			    int controls_count,
 			    unsigned char map[][2],
@@ -766,7 +766,7 @@ static int snd_sbmixer_init(sb_t *chip,
 			    char *name)
 {
 	unsigned long flags;
-	snd_card_t *card = chip->card;
+	struct snd_card *card = chip->card;
 	int idx, err;
 
 	/* mixer reset */
@@ -790,9 +790,9 @@ static int snd_sbmixer_init(sb_t *chip,
 	return 0;
 }
 
-int snd_sbmixer_new(sb_t *chip)
+int snd_sbmixer_new(struct snd_sb *chip)
 {
-	snd_card_t * card;
+	struct snd_card *card;
 	int err;
 
 	snd_assert(chip != NULL && chip->card != NULL, return -EINVAL);
-- 
cgit v1.2.3-70-g09d2


From 5e2da20648e39a0e3cb33861499b686a6fe38112 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:36:44 +0100
Subject: [ALSA] Remove xxx_t typedefs: ISA GUS

Remove xxx_t typedefs from the ISA GUS drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/gus.h          | 317 +++++++++++++++++++++----------------------
 sound/isa/gus/gus_dma.c      |  24 ++--
 sound/isa/gus/gus_dram.c     |   8 +-
 sound/isa/gus/gus_instr.c    |  42 +++---
 sound/isa/gus/gus_io.c       |  72 +++++-----
 sound/isa/gus/gus_irq.c      |  16 +--
 sound/isa/gus/gus_main.c     |  54 ++++----
 sound/isa/gus/gus_mem.c      |  64 ++++-----
 sound/isa/gus/gus_mem_proc.c |  26 ++--
 sound/isa/gus/gus_mixer.c    |  28 ++--
 sound/isa/gus/gus_pcm.c      | 194 +++++++++++++-------------
 sound/isa/gus/gus_reset.c    |  54 ++++----
 sound/isa/gus/gus_sample.c   |  42 +++---
 sound/isa/gus/gus_simple.c   |  86 ++++++------
 sound/isa/gus/gus_synth.c    |  70 +++++-----
 sound/isa/gus/gus_timer.c    |  44 +++---
 sound/isa/gus/gus_uart.c     |  38 +++---
 sound/isa/gus/gus_volume.c   |   4 +-
 sound/isa/gus/gusclassic.c   |  10 +-
 sound/isa/gus/gusextreme.c   |  26 ++--
 sound/isa/gus/gusmax.c       |  26 ++--
 sound/isa/gus/interwave.c    |  60 ++++----
 22 files changed, 658 insertions(+), 647 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/gus.h b/include/sound/gus.h
index bb12e9fab8a..63da50fae77 100644
--- a/include/sound/gus.h
+++ b/include/sound/gus.h
@@ -183,17 +183,16 @@
 
 /* --- */
 
-struct _snd_gus_card;
-typedef struct _snd_gus_card snd_gus_card_t;
+struct snd_gus_card;
 
 /* GF1 specific structure */
 
-typedef struct _snd_gf1_bank_info {
+struct snd_gf1_bank_info {
 	unsigned int address;
 	unsigned int size;
-} snd_gf1_bank_info_t;
+};
 
-typedef struct _snd_gf1_mem_block {
+struct snd_gf1_mem_block {
 	unsigned short flags;	/* flags - SNDRV_GF1_MEM_BLOCK_XXXX */
 	unsigned short owner;	/* owner - SNDRV_GF1_MEM_OWNER_XXXX */
 	unsigned int share;	/* share count */
@@ -201,68 +200,68 @@ typedef struct _snd_gf1_mem_block {
 	unsigned int ptr;
 	unsigned int size;
 	char *name;
-	struct _snd_gf1_mem_block *next;
-	struct _snd_gf1_mem_block *prev;
-} snd_gf1_mem_block_t;
-
-typedef struct _snd_gf1_mem {
-	snd_gf1_bank_info_t banks_8[4];
-	snd_gf1_bank_info_t banks_16[4];
-	snd_gf1_mem_block_t *first;
-	snd_gf1_mem_block_t *last;
+	struct snd_gf1_mem_block *next;
+	struct snd_gf1_mem_block *prev;
+};
+
+struct snd_gf1_mem {
+	struct snd_gf1_bank_info banks_8[4];
+	struct snd_gf1_bank_info banks_16[4];
+	struct snd_gf1_mem_block *first;
+	struct snd_gf1_mem_block *last;
 	struct semaphore memory_mutex;
-} snd_gf1_mem_t;
+};
 
-typedef struct snd_gf1_dma_block {
+struct snd_gf1_dma_block {
 	void *buffer;		/* buffer in computer's RAM */
 	unsigned long buf_addr;	/* buffer address */
 	unsigned int addr;	/* address in onboard memory */
 	unsigned int count;	/* count in bytes */
 	unsigned int cmd;	/* DMA command (format) */
-	void (*ack)(snd_gus_card_t * gus, void *private_data);
+	void (*ack)(struct snd_gus_card * gus, void *private_data);
 	void *private_data;
 	struct snd_gf1_dma_block *next;
-} snd_gf1_dma_block_t;
+};
 
-typedef struct {
-	snd_midi_channel_set_t * chset;
-	snd_gus_card_t * gus;
+struct snd_gus_port {
+	struct snd_midi_channel_set * chset;
+	struct snd_gus_card * gus;
 	int mode;		/* operation mode */
 	int client;		/* sequencer client number */
 	int port;		/* sequencer port number */
 	unsigned int midi_has_voices: 1;
-} snd_gus_port_t;
+};
 
-typedef struct _snd_gus_voice snd_gus_voice_t;
+struct snd_gus_voice;
 
-typedef struct {
-	void (*sample_start)(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_position_t position);
-	void (*sample_stop)(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_stop_mode_t mode);
-	void (*sample_freq)(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_frequency_t freq);
-	void (*sample_volume)(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_ev_volume_t *volume);
-	void (*sample_loop)(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_ev_loop_t *loop);
-	void (*sample_pos)(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_position_t position);
-	void (*sample_private1)(snd_gus_card_t *card, snd_gus_voice_t *voice, unsigned char *data);
-} snd_gus_sample_ops_t;
+struct snd_gus_sample_ops {
+	void (*sample_start)(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_position_t position);
+	void (*sample_stop)(struct snd_gus_card *gus, struct snd_gus_voice *voice, int mode);
+	void (*sample_freq)(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_frequency_t freq);
+	void (*sample_volume)(struct snd_gus_card *gus, struct snd_gus_voice *voice, struct snd_seq_ev_volume *volume);
+	void (*sample_loop)(struct snd_gus_card *card, struct snd_gus_voice *voice, struct snd_seq_ev_loop *loop);
+	void (*sample_pos)(struct snd_gus_card *card, struct snd_gus_voice *voice, snd_seq_position_t position);
+	void (*sample_private1)(struct snd_gus_card *card, struct snd_gus_voice *voice, unsigned char *data);
+};
 
-#define SNDRV_GF1_VOICE_TYPE_PCM		0
+#define SNDRV_GF1_VOICE_TYPE_PCM	0
 #define SNDRV_GF1_VOICE_TYPE_SYNTH 	1
-#define SNDRV_GF1_VOICE_TYPE_MIDI		2
+#define SNDRV_GF1_VOICE_TYPE_MIDI	2
 
 #define SNDRV_GF1_VFLG_RUNNING		(1<<0)
 #define SNDRV_GF1_VFLG_EFFECT_TIMER1	(1<<1)
 #define SNDRV_GF1_VFLG_PAN		(1<<2)
 
-typedef enum {
+enum snd_gus_volume_state {
 	VENV_BEFORE,
 	VENV_ATTACK,
 	VENV_SUSTAIN,
 	VENV_RELEASE,
 	VENV_DONE,
 	VENV_VOLUME
-} snd_gus_volume_state_t;
+};
 
-struct _snd_gus_voice {
+struct snd_gus_voice {
 	int number;
 	unsigned int use: 1,
 	    pcm: 1,
@@ -278,18 +277,18 @@ struct _snd_gus_voice {
 	unsigned int interrupt_stat_wave;
 	unsigned int interrupt_stat_volume;
 #endif
-	void (*handler_wave) (snd_gus_card_t * gus, snd_gus_voice_t * voice);
-	void (*handler_volume) (snd_gus_card_t * gus, snd_gus_voice_t * voice);
-	void (*handler_effect) (snd_gus_card_t * gus, snd_gus_voice_t * voice);
-	void (*volume_change) (snd_gus_card_t * gus);
+	void (*handler_wave) (struct snd_gus_card * gus, struct snd_gus_voice * voice);
+	void (*handler_volume) (struct snd_gus_card * gus, struct snd_gus_voice * voice);
+	void (*handler_effect) (struct snd_gus_card * gus, struct snd_gus_voice * voice);
+	void (*volume_change) (struct snd_gus_card * gus);
 
-	snd_gus_sample_ops_t *sample_ops;
+	struct snd_gus_sample_ops *sample_ops;
 
-	snd_seq_instr_t instr;
+	struct snd_seq_instr instr;
 
 	/* running status / registers */
 
-	snd_seq_ev_volume_t sample_volume;
+	struct snd_seq_ev_volume sample_volume;
 
 	unsigned short fc_register;
 	unsigned short fc_lfo;
@@ -300,8 +299,8 @@ struct _snd_gus_voice {
 	unsigned char effect_accumulator;
 	unsigned char volume_control;
 	unsigned char venv_value_next;
-	snd_gus_volume_state_t venv_state;
-	snd_gus_volume_state_t venv_state_prev;
+	enum snd_gus_volume_state venv_state;
+	enum snd_gus_volume_state venv_state_prev;
 	unsigned short vlo;
 	unsigned short vro;
 	unsigned short gf1_effect_volume;
@@ -309,10 +308,10 @@ struct _snd_gus_voice {
 	/* --- */
 
 	void *private_data;
-	void (*private_free)(snd_gus_voice_t *voice);
+	void (*private_free)(struct snd_gus_voice *voice);
 };
 
-struct _snd_gf1 {
+struct snd_gf1 {
 
 	unsigned int enh_mode:1,	/* enhanced mode (GFA1) */
 		     hw_lfo:1,		/* use hardware LFO */
@@ -330,7 +329,7 @@ struct _snd_gf1 {
 	unsigned int rom_present;	/* bitmask */
 	unsigned int rom_banks;		/* GUS's ROM banks */
 
-	snd_gf1_mem_t mem_alloc;
+	struct snd_gf1_mem mem_alloc;
 
 	/* registers */
 	unsigned short reg_page;
@@ -347,7 +346,7 @@ struct _snd_gf1 {
 	unsigned char active_voices;	/* active voices */
 	unsigned char active_voice;	/* selected voice (GF1PAGE register) */
 
-	snd_gus_voice_t voices[32];	/* GF1 voices */
+	struct snd_gus_voice voices[32];	/* GF1 voices */
 
 	unsigned int default_voice_address;
 
@@ -362,12 +361,12 @@ struct _snd_gf1 {
 
 	/* interrupt handlers */
 
-	void (*interrupt_handler_midi_out) (snd_gus_card_t * gus);
-	void (*interrupt_handler_midi_in) (snd_gus_card_t * gus);
-	void (*interrupt_handler_timer1) (snd_gus_card_t * gus);
-	void (*interrupt_handler_timer2) (snd_gus_card_t * gus);
-	void (*interrupt_handler_dma_write) (snd_gus_card_t * gus);
-	void (*interrupt_handler_dma_read) (snd_gus_card_t * gus);
+	void (*interrupt_handler_midi_out) (struct snd_gus_card * gus);
+	void (*interrupt_handler_midi_in) (struct snd_gus_card * gus);
+	void (*interrupt_handler_timer1) (struct snd_gus_card * gus);
+	void (*interrupt_handler_timer2) (struct snd_gus_card * gus);
+	void (*interrupt_handler_dma_write) (struct snd_gus_card * gus);
+	void (*interrupt_handler_dma_read) (struct snd_gus_card * gus);
 
 #ifdef CONFIG_SND_DEBUG
 	unsigned int interrupt_stat_midi_out;
@@ -382,17 +381,17 @@ struct _snd_gf1 {
 	/* synthesizer */
 
 	int seq_client;
-	snd_gus_port_t seq_ports[4];
-	snd_seq_kinstr_list_t *ilist;
-	snd_iwffff_ops_t iwffff_ops;
-	snd_gf1_ops_t gf1_ops;
-	snd_simple_ops_t simple_ops;
+	struct snd_gus_port seq_ports[4];
+	struct snd_seq_kinstr_list *ilist;
+	struct snd_iwffff_ops iwffff_ops;
+	struct snd_gf1_ops gf1_ops;
+	struct snd_simple_ops simple_ops;
 
 	/* timer */
 
 	unsigned short timer_enabled;
-	snd_timer_t *timer1;
-	snd_timer_t *timer2;
+	struct snd_timer *timer1;
+	struct snd_timer *timer2;
 
 	/* midi */
 
@@ -404,11 +403,11 @@ struct _snd_gf1 {
 
 	unsigned int dma_flags;
 	unsigned int dma_shared;
-	snd_gf1_dma_block_t *dma_data_pcm;
-	snd_gf1_dma_block_t *dma_data_pcm_last;
-	snd_gf1_dma_block_t *dma_data_synth;
-	snd_gf1_dma_block_t *dma_data_synth_last;
-	void (*dma_ack)(snd_gus_card_t * gus, void *private_data);
+	struct snd_gf1_dma_block *dma_data_pcm;
+	struct snd_gf1_dma_block *dma_data_pcm_last;
+	struct snd_gf1_dma_block *dma_data_synth;
+	struct snd_gf1_dma_block *dma_data_synth_last;
+	void (*dma_ack)(struct snd_gus_card * gus, void *private_data);
 	void *dma_private_data;
 
 	/* pcm */
@@ -425,8 +424,8 @@ struct _snd_gf1 {
 
 /* main structure for GUS card */
 
-struct _snd_gus_card {
-	snd_card_t *card;
+struct snd_gus_card {
+	struct snd_card *card;
 
 	unsigned int
 	 initialized: 1,		/* resources were initialized */
@@ -448,18 +447,18 @@ struct _snd_gus_card {
 	unsigned short joystick_dac;	/* joystick DAC level */
 	int timer_dev;			/* timer device */
 
-	struct _snd_gf1 gf1;	/* gf1 specific variables */
-	snd_pcm_t *pcm;
-	snd_pcm_substream_t *pcm_cap_substream;
+	struct snd_gf1 gf1;	/* gf1 specific variables */
+	struct snd_pcm *pcm;
+	struct snd_pcm_substream *pcm_cap_substream;
 	unsigned int c_dma_size;
 	unsigned int c_period_size;
 	unsigned int c_pos;
 
-	snd_rawmidi_t *midi_uart;
-	snd_rawmidi_substream_t *midi_substream_output;
-	snd_rawmidi_substream_t *midi_substream_input;
+	struct snd_rawmidi *midi_uart;
+	struct snd_rawmidi_substream *midi_substream_output;
+	struct snd_rawmidi_substream *midi_substream_input;
 
-	snd_seq_device_t *seq_dev;
+	struct snd_seq_device *seq_dev;
 
 	spinlock_t reg_lock;
 	spinlock_t voice_alloc;
@@ -474,7 +473,7 @@ struct _snd_gus_card {
 
 /* I/O functions for GF1/InterWave chip - gus_io.c */
 
-static inline void snd_gf1_select_voice(snd_gus_card_t * gus, int voice)
+static inline void snd_gf1_select_voice(struct snd_gus_card * gus, int voice)
 {
 	unsigned long flags;
 
@@ -486,63 +485,63 @@ static inline void snd_gf1_select_voice(snd_gus_card_t * gus, int voice)
 	spin_unlock_irqrestore(&gus->active_voice_lock, flags);
 }
 
-static inline void snd_gf1_uart_cmd(snd_gus_card_t * gus, unsigned char b)
+static inline void snd_gf1_uart_cmd(struct snd_gus_card * gus, unsigned char b)
 {
 	outb(gus->gf1.uart_cmd = b, GUSP(gus, MIDICTRL));
 }
 
-static inline unsigned char snd_gf1_uart_stat(snd_gus_card_t * gus)
+static inline unsigned char snd_gf1_uart_stat(struct snd_gus_card * gus)
 {
 	return inb(GUSP(gus, MIDISTAT));
 }
 
-static inline void snd_gf1_uart_put(snd_gus_card_t * gus, unsigned char b)
+static inline void snd_gf1_uart_put(struct snd_gus_card * gus, unsigned char b)
 {
 	outb(b, GUSP(gus, MIDIDATA));
 }
 
-static inline unsigned char snd_gf1_uart_get(snd_gus_card_t * gus)
+static inline unsigned char snd_gf1_uart_get(struct snd_gus_card * gus)
 {
 	return inb(GUSP(gus, MIDIDATA));
 }
 
-extern void snd_gf1_delay(snd_gus_card_t * gus);
+extern void snd_gf1_delay(struct snd_gus_card * gus);
 
-extern void snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg);
+extern void snd_gf1_ctrl_stop(struct snd_gus_card * gus, unsigned char reg);
 
-extern void snd_gf1_write8(snd_gus_card_t * gus, unsigned char reg, unsigned char data);
-extern unsigned char snd_gf1_look8(snd_gus_card_t * gus, unsigned char reg);
-static inline unsigned char snd_gf1_read8(snd_gus_card_t * gus, unsigned char reg)
+extern void snd_gf1_write8(struct snd_gus_card * gus, unsigned char reg, unsigned char data);
+extern unsigned char snd_gf1_look8(struct snd_gus_card * gus, unsigned char reg);
+static inline unsigned char snd_gf1_read8(struct snd_gus_card * gus, unsigned char reg)
 {
 	return snd_gf1_look8(gus, reg | 0x80);
 }
-extern void snd_gf1_write16(snd_gus_card_t * gus, unsigned char reg, unsigned int data);
-extern unsigned short snd_gf1_look16(snd_gus_card_t * gus, unsigned char reg);
-static inline unsigned short snd_gf1_read16(snd_gus_card_t * gus, unsigned char reg)
+extern void snd_gf1_write16(struct snd_gus_card * gus, unsigned char reg, unsigned int data);
+extern unsigned short snd_gf1_look16(struct snd_gus_card * gus, unsigned char reg);
+static inline unsigned short snd_gf1_read16(struct snd_gus_card * gus, unsigned char reg)
 {
 	return snd_gf1_look16(gus, reg | 0x80);
 }
-extern void snd_gf1_adlib_write(snd_gus_card_t * gus, unsigned char reg, unsigned char data);
-extern void snd_gf1_dram_addr(snd_gus_card_t * gus, unsigned int addr);
-extern void snd_gf1_poke(snd_gus_card_t * gus, unsigned int addr, unsigned char data);
-extern unsigned char snd_gf1_peek(snd_gus_card_t * gus, unsigned int addr);
-extern void snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg, unsigned int addr, short w_16bit);
-extern unsigned int snd_gf1_read_addr(snd_gus_card_t * gus, unsigned char reg, short w_16bit);
-extern void snd_gf1_i_ctrl_stop(snd_gus_card_t * gus, unsigned char reg);
-extern void snd_gf1_i_write8(snd_gus_card_t * gus, unsigned char reg, unsigned char data);
-extern unsigned char snd_gf1_i_look8(snd_gus_card_t * gus, unsigned char reg);
-extern void snd_gf1_i_write16(snd_gus_card_t * gus, unsigned char reg, unsigned int data);
-static inline unsigned char snd_gf1_i_read8(snd_gus_card_t * gus, unsigned char reg)
+extern void snd_gf1_adlib_write(struct snd_gus_card * gus, unsigned char reg, unsigned char data);
+extern void snd_gf1_dram_addr(struct snd_gus_card * gus, unsigned int addr);
+extern void snd_gf1_poke(struct snd_gus_card * gus, unsigned int addr, unsigned char data);
+extern unsigned char snd_gf1_peek(struct snd_gus_card * gus, unsigned int addr);
+extern void snd_gf1_write_addr(struct snd_gus_card * gus, unsigned char reg, unsigned int addr, short w_16bit);
+extern unsigned int snd_gf1_read_addr(struct snd_gus_card * gus, unsigned char reg, short w_16bit);
+extern void snd_gf1_i_ctrl_stop(struct snd_gus_card * gus, unsigned char reg);
+extern void snd_gf1_i_write8(struct snd_gus_card * gus, unsigned char reg, unsigned char data);
+extern unsigned char snd_gf1_i_look8(struct snd_gus_card * gus, unsigned char reg);
+extern void snd_gf1_i_write16(struct snd_gus_card * gus, unsigned char reg, unsigned int data);
+static inline unsigned char snd_gf1_i_read8(struct snd_gus_card * gus, unsigned char reg)
 {
 	return snd_gf1_i_look8(gus, reg | 0x80);
 }
-extern unsigned short snd_gf1_i_look16(snd_gus_card_t * gus, unsigned char reg);
-static inline unsigned short snd_gf1_i_read16(snd_gus_card_t * gus, unsigned char reg)
+extern unsigned short snd_gf1_i_look16(struct snd_gus_card * gus, unsigned char reg);
+static inline unsigned short snd_gf1_i_read16(struct snd_gus_card * gus, unsigned char reg)
 {
 	return snd_gf1_i_look16(gus, reg | 0x80);
 }
 
-extern void snd_gf1_select_active_voices(snd_gus_card_t * gus);
+extern void snd_gf1_select_active_voices(struct snd_gus_card * gus);
 
 /* gus_lfo.c */
 
@@ -555,98 +554,98 @@ struct _SND_IW_LFO_PROGRAM {
 };
 
 #if 0
-extern irqreturn_t snd_gf1_lfo_effect_interrupt(snd_gus_card_t * gus, snd_gf1_voice_t * voice);
+extern irqreturn_t snd_gf1_lfo_effect_interrupt(struct snd_gus_card * gus, snd_gf1_voice_t * voice);
 #endif
-extern void snd_gf1_lfo_init(snd_gus_card_t * gus);
-extern void snd_gf1_lfo_done(snd_gus_card_t * gus);
-extern void snd_gf1_lfo_program(snd_gus_card_t * gus, int voice, int lfo_type, struct _SND_IW_LFO_PROGRAM *program);
-extern void snd_gf1_lfo_enable(snd_gus_card_t * gus, int voice, int lfo_type);
-extern void snd_gf1_lfo_disable(snd_gus_card_t * gus, int voice, int lfo_type);
-extern void snd_gf1_lfo_change_freq(snd_gus_card_t * gus, int voice, int lfo_type, int freq);
-extern void snd_gf1_lfo_change_depth(snd_gus_card_t * gus, int voice, int lfo_type, int depth);
-extern void snd_gf1_lfo_setup(snd_gus_card_t * gus, int voice, int lfo_type, int freq, int current_depth, int depth, int sweep, int shape);
-extern void snd_gf1_lfo_shutdown(snd_gus_card_t * gus, int voice, int lfo_type);
+extern void snd_gf1_lfo_init(struct snd_gus_card * gus);
+extern void snd_gf1_lfo_done(struct snd_gus_card * gus);
+extern void snd_gf1_lfo_program(struct snd_gus_card * gus, int voice, int lfo_type, struct _SND_IW_LFO_PROGRAM *program);
+extern void snd_gf1_lfo_enable(struct snd_gus_card * gus, int voice, int lfo_type);
+extern void snd_gf1_lfo_disable(struct snd_gus_card * gus, int voice, int lfo_type);
+extern void snd_gf1_lfo_change_freq(struct snd_gus_card * gus, int voice, int lfo_type, int freq);
+extern void snd_gf1_lfo_change_depth(struct snd_gus_card * gus, int voice, int lfo_type, int depth);
+extern void snd_gf1_lfo_setup(struct snd_gus_card * gus, int voice, int lfo_type, int freq, int current_depth, int depth, int sweep, int shape);
+extern void snd_gf1_lfo_shutdown(struct snd_gus_card * gus, int voice, int lfo_type);
 #if 0
-extern void snd_gf1_lfo_command(snd_gus_card_t * gus, int voice, unsigned char *command);
+extern void snd_gf1_lfo_command(struct snd_gus_card * gus, int voice, unsigned char *command);
 #endif
 
 /* gus_mem.c */
 
-void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup);
-int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block);
-snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner,
+void snd_gf1_mem_lock(struct snd_gf1_mem * alloc, int xup);
+int snd_gf1_mem_xfree(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * block);
+struct snd_gf1_mem_block *snd_gf1_mem_alloc(struct snd_gf1_mem * alloc, int owner,
 				       char *name, int size, int w_16,
 				       int align, unsigned int *share_id);
-int snd_gf1_mem_free(snd_gf1_mem_t * alloc, unsigned int address);
-int snd_gf1_mem_free_owner(snd_gf1_mem_t * alloc, int owner);
-int snd_gf1_mem_init(snd_gus_card_t * gus);
-int snd_gf1_mem_done(snd_gus_card_t * gus);
+int snd_gf1_mem_free(struct snd_gf1_mem * alloc, unsigned int address);
+int snd_gf1_mem_free_owner(struct snd_gf1_mem * alloc, int owner);
+int snd_gf1_mem_init(struct snd_gus_card * gus);
+int snd_gf1_mem_done(struct snd_gus_card * gus);
 
 /* gus_mem_proc.c */
 
-int snd_gf1_mem_proc_init(snd_gus_card_t * gus);
+int snd_gf1_mem_proc_init(struct snd_gus_card * gus);
 
 /* gus_dma.c */
 
-int snd_gf1_dma_init(snd_gus_card_t * gus);
-int snd_gf1_dma_done(snd_gus_card_t * gus);
-int snd_gf1_dma_transfer_block(snd_gus_card_t * gus,
-			       snd_gf1_dma_block_t * block,
+int snd_gf1_dma_init(struct snd_gus_card * gus);
+int snd_gf1_dma_done(struct snd_gus_card * gus);
+int snd_gf1_dma_transfer_block(struct snd_gus_card * gus,
+			       struct snd_gf1_dma_block * block,
 			       int atomic,
 			       int synth);
 
 /* gus_volume.c */
 
 unsigned short snd_gf1_lvol_to_gvol_raw(unsigned int vol);
-unsigned short snd_gf1_translate_freq(snd_gus_card_t * gus, unsigned int freq2);
+unsigned short snd_gf1_translate_freq(struct snd_gus_card * gus, unsigned int freq2);
 
 /* gus_reset.c */
 
-void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what);
-void snd_gf1_smart_stop_voice(snd_gus_card_t * gus, unsigned short voice);
-void snd_gf1_stop_voice(snd_gus_card_t * gus, unsigned short voice);
-void snd_gf1_stop_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned short v_max);
-snd_gus_voice_t *snd_gf1_alloc_voice(snd_gus_card_t * gus, int type, int client, int port);
-void snd_gf1_free_voice(snd_gus_card_t * gus, snd_gus_voice_t *voice);
-int snd_gf1_start(snd_gus_card_t * gus);
-int snd_gf1_stop(snd_gus_card_t * gus);
+void snd_gf1_set_default_handlers(struct snd_gus_card * gus, unsigned int what);
+void snd_gf1_smart_stop_voice(struct snd_gus_card * gus, unsigned short voice);
+void snd_gf1_stop_voice(struct snd_gus_card * gus, unsigned short voice);
+void snd_gf1_stop_voices(struct snd_gus_card * gus, unsigned short v_min, unsigned short v_max);
+struct snd_gus_voice *snd_gf1_alloc_voice(struct snd_gus_card * gus, int type, int client, int port);
+void snd_gf1_free_voice(struct snd_gus_card * gus, struct snd_gus_voice *voice);
+int snd_gf1_start(struct snd_gus_card * gus);
+int snd_gf1_stop(struct snd_gus_card * gus);
 
 /* gus_mixer.c */
 
-int snd_gf1_new_mixer(snd_gus_card_t * gus);
+int snd_gf1_new_mixer(struct snd_gus_card * gus);
 
 /* gus_pcm.c */
 
-int snd_gf1_pcm_new(snd_gus_card_t * gus, int pcm_dev, int control_index, snd_pcm_t ** rpcm);
+int snd_gf1_pcm_new(struct snd_gus_card * gus, int pcm_dev, int control_index, struct snd_pcm ** rpcm);
 
 #ifdef CONFIG_SND_DEBUG
-extern void snd_gf1_print_voice_registers(snd_gus_card_t * gus);
+extern void snd_gf1_print_voice_registers(struct snd_gus_card * gus);
 #endif
 
 /* gus.c */
 
-int snd_gus_use_inc(snd_gus_card_t * gus);
-void snd_gus_use_dec(snd_gus_card_t * gus);
-int snd_gus_create(snd_card_t * card,
+int snd_gus_use_inc(struct snd_gus_card * gus);
+void snd_gus_use_dec(struct snd_gus_card * gus);
+int snd_gus_create(struct snd_card *card,
 		   unsigned long port,
 		   int irq, int dma1, int dma2,
 		   int timer_dev,
 		   int voices,
 		   int pcm_channels,
 		   int effect,
-		   snd_gus_card_t ** rgus);
-int snd_gus_initialize(snd_gus_card_t * gus);
+		   struct snd_gus_card ** rgus);
+int snd_gus_initialize(struct snd_gus_card * gus);
 
 /* gus_irq.c */
 
 irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 #ifdef CONFIG_SND_DEBUG
-void snd_gus_irq_profile_init(snd_gus_card_t *gus);
+void snd_gus_irq_profile_init(struct snd_gus_card *gus);
 #endif
 
 /* gus_uart.c */
 
-int snd_gf1_rawmidi_new(snd_gus_card_t * gus, int device, snd_rawmidi_t **rrawmidi);
+int snd_gf1_rawmidi_new(struct snd_gus_card * gus, int device, struct snd_rawmidi **rrawmidi);
 
 #if 0
 extern void snd_engine_instrument_register(unsigned short mode,
@@ -657,37 +656,37 @@ extern int snd_engine_instrument_register_ask(unsigned short mode);
 #endif
 
 /* gus_dram.c */
-int snd_gus_dram_write(snd_gus_card_t *gus, char __user *ptr,
+int snd_gus_dram_write(struct snd_gus_card *gus, char __user *ptr,
 		       unsigned int addr, unsigned int size);
-int snd_gus_dram_read(snd_gus_card_t *gus, char __user *ptr,
+int snd_gus_dram_read(struct snd_gus_card *gus, char __user *ptr,
 		      unsigned int addr, unsigned int size, int rom);
 
 #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
 
 /* gus_sample.c */
-void snd_gus_sample_event(snd_seq_event_t *ev, snd_gus_port_t *p);
+void snd_gus_sample_event(struct snd_seq_event *ev, struct snd_gus_port *p);
 
 /* gus_simple.c */
-void snd_gf1_simple_init(snd_gus_voice_t *voice);
+void snd_gf1_simple_init(struct snd_gus_voice *voice);
 
 /* gus_instr.c */
-int snd_gus_iwffff_put_sample(void *private_data, iwffff_wave_t *wave,
+int snd_gus_iwffff_put_sample(void *private_data, struct iwffff_wave *wave,
 			      char __user *data, long len, int atomic);
-int snd_gus_iwffff_get_sample(void *private_data, iwffff_wave_t *wave,
+int snd_gus_iwffff_get_sample(void *private_data, struct iwffff_wave *wave,
 			      char __user *data, long len, int atomic);
-int snd_gus_iwffff_remove_sample(void *private_data, iwffff_wave_t *wave,
+int snd_gus_iwffff_remove_sample(void *private_data, struct iwffff_wave *wave,
 				 int atomic);
-int snd_gus_gf1_put_sample(void *private_data, gf1_wave_t *wave,
+int snd_gus_gf1_put_sample(void *private_data, struct gf1_wave *wave,
 			   char __user *data, long len, int atomic);
-int snd_gus_gf1_get_sample(void *private_data, gf1_wave_t *wave,
+int snd_gus_gf1_get_sample(void *private_data, struct gf1_wave *wave,
 			   char __user *data, long len, int atomic);
-int snd_gus_gf1_remove_sample(void *private_data, gf1_wave_t *wave,
+int snd_gus_gf1_remove_sample(void *private_data, struct gf1_wave *wave,
 			      int atomic);
-int snd_gus_simple_put_sample(void *private_data, simple_instrument_t *instr,
+int snd_gus_simple_put_sample(void *private_data, struct simple_instrument *instr,
 			      char __user *data, long len, int atomic);
-int snd_gus_simple_get_sample(void *private_data, simple_instrument_t *instr,
+int snd_gus_simple_get_sample(void *private_data, struct simple_instrument *instr,
 			      char __user *data, long len, int atomic);
-int snd_gus_simple_remove_sample(void *private_data, simple_instrument_t *instr,
+int snd_gus_simple_remove_sample(void *private_data, struct simple_instrument *instr,
 				 int atomic);
 
 #endif /* CONFIG_SND_SEQUENCER */
diff --git a/sound/isa/gus/gus_dma.c b/sound/isa/gus/gus_dma.c
index ef1b2e9832e..930f4bc56f3 100644
--- a/sound/isa/gus/gus_dma.c
+++ b/sound/isa/gus/gus_dma.c
@@ -25,7 +25,7 @@
 #include <sound/core.h>
 #include <sound/gus.h>
 
-static void snd_gf1_dma_ack(snd_gus_card_t * gus)
+static void snd_gf1_dma_ack(struct snd_gus_card * gus)
 {
 	unsigned long flags;
 
@@ -35,7 +35,7 @@ static void snd_gf1_dma_ack(snd_gus_card_t * gus)
 	spin_unlock_irqrestore(&gus->reg_lock, flags);
 }
 
-static void snd_gf1_dma_program(snd_gus_card_t * gus,
+static void snd_gf1_dma_program(struct snd_gus_card * gus,
 				unsigned int addr,
 				unsigned long buf_addr,
 				unsigned int count,
@@ -91,9 +91,9 @@ static void snd_gf1_dma_program(snd_gus_card_t * gus,
 	spin_unlock_irqrestore(&gus->reg_lock, flags);
 }
 
-static snd_gf1_dma_block_t *snd_gf1_dma_next_block(snd_gus_card_t * gus)
+static struct snd_gf1_dma_block *snd_gf1_dma_next_block(struct snd_gus_card * gus)
 {
-	snd_gf1_dma_block_t *block;
+	struct snd_gf1_dma_block *block;
 
 	/* PCM block have bigger priority than synthesizer one */
 	if (gus->gf1.dma_data_pcm) {
@@ -123,9 +123,9 @@ static snd_gf1_dma_block_t *snd_gf1_dma_next_block(snd_gus_card_t * gus)
 }
 
 
-static void snd_gf1_dma_interrupt(snd_gus_card_t * gus)
+static void snd_gf1_dma_interrupt(struct snd_gus_card * gus)
 {
-	snd_gf1_dma_block_t *block;
+	struct snd_gf1_dma_block *block;
 
 	snd_gf1_dma_ack(gus);
 	if (gus->gf1.dma_ack)
@@ -147,7 +147,7 @@ static void snd_gf1_dma_interrupt(snd_gus_card_t * gus)
 #endif
 }
 
-int snd_gf1_dma_init(snd_gus_card_t * gus)
+int snd_gf1_dma_init(struct snd_gus_card * gus)
 {
 	down(&gus->dma_mutex);
 	gus->gf1.dma_shared++;
@@ -164,9 +164,9 @@ int snd_gf1_dma_init(snd_gus_card_t * gus)
 	return 0;
 }
 
-int snd_gf1_dma_done(snd_gus_card_t * gus)
+int snd_gf1_dma_done(struct snd_gus_card * gus)
 {
-	snd_gf1_dma_block_t *block;
+	struct snd_gf1_dma_block *block;
 
 	down(&gus->dma_mutex);
 	gus->gf1.dma_shared--;
@@ -189,13 +189,13 @@ int snd_gf1_dma_done(snd_gus_card_t * gus)
 	return 0;
 }
 
-int snd_gf1_dma_transfer_block(snd_gus_card_t * gus,
-			       snd_gf1_dma_block_t * __block,
+int snd_gf1_dma_transfer_block(struct snd_gus_card * gus,
+			       struct snd_gf1_dma_block * __block,
 			       int atomic,
 			       int synth)
 {
 	unsigned long flags;
-	snd_gf1_dma_block_t *block;
+	struct snd_gf1_dma_block *block;
 
 	block = kmalloc(sizeof(*block), atomic ? GFP_ATOMIC : GFP_KERNEL);
 	if (block == NULL) {
diff --git a/sound/isa/gus/gus_dram.c b/sound/isa/gus/gus_dram.c
index 22120b868b5..f22fe7967fc 100644
--- a/sound/isa/gus/gus_dram.c
+++ b/sound/isa/gus/gus_dram.c
@@ -26,7 +26,7 @@
 #include <sound/info.h>
 
 
-static int snd_gus_dram_poke(snd_gus_card_t *gus, char __user *_buffer,
+static int snd_gus_dram_poke(struct snd_gus_card *gus, char __user *_buffer,
 			     unsigned int address, unsigned int size)
 {
 	unsigned long flags;
@@ -57,13 +57,13 @@ static int snd_gus_dram_poke(snd_gus_card_t *gus, char __user *_buffer,
 }
 
 
-int snd_gus_dram_write(snd_gus_card_t *gus, char __user *buffer,
+int snd_gus_dram_write(struct snd_gus_card *gus, char __user *buffer,
 		       unsigned int address, unsigned int size)
 {
 	return snd_gus_dram_poke(gus, buffer, address, size);
 }
 
-static int snd_gus_dram_peek(snd_gus_card_t *gus, char __user *_buffer,
+static int snd_gus_dram_peek(struct snd_gus_card *gus, char __user *_buffer,
 			     unsigned int address, unsigned int size,
 			     int rom)
 {
@@ -95,7 +95,7 @@ static int snd_gus_dram_peek(snd_gus_card_t *gus, char __user *_buffer,
 	return 0;
 }
 
-int snd_gus_dram_read(snd_gus_card_t *gus, char __user *buffer,
+int snd_gus_dram_read(struct snd_gus_card *gus, char __user *buffer,
 		      unsigned int address, unsigned int size,
 		      int rom)
 {
diff --git a/sound/isa/gus/gus_instr.c b/sound/isa/gus/gus_instr.c
index 591a9a17feb..d0c38e1856e 100644
--- a/sound/isa/gus/gus_instr.c
+++ b/sound/isa/gus/gus_instr.c
@@ -28,11 +28,11 @@
  *
  */
 
-int snd_gus_iwffff_put_sample(void *private_data, iwffff_wave_t *wave,
+int snd_gus_iwffff_put_sample(void *private_data, struct iwffff_wave *wave,
 			      char __user *data, long len, int atomic)
 {
-	snd_gus_card_t *gus = private_data;
-	snd_gf1_mem_block_t *block;
+	struct snd_gus_card *gus = private_data;
+	struct snd_gf1_mem_block *block;
 	int err;
 
 	if (wave->format & IWFFFF_WAVE_ROM)
@@ -58,19 +58,19 @@ int snd_gus_iwffff_put_sample(void *private_data, iwffff_wave_t *wave,
 	return 0;
 }
 
-int snd_gus_iwffff_get_sample(void *private_data, iwffff_wave_t *wave,
+int snd_gus_iwffff_get_sample(void *private_data, struct iwffff_wave *wave,
 			      char __user *data, long len, int atomic)
 {
-	snd_gus_card_t *gus = private_data;
+	struct snd_gus_card *gus = private_data;
 
 	return snd_gus_dram_read(gus, data, wave->address.memory, wave->size,
 				 wave->format & IWFFFF_WAVE_ROM ? 1 : 0);
 }
 
-int snd_gus_iwffff_remove_sample(void *private_data, iwffff_wave_t *wave,
+int snd_gus_iwffff_remove_sample(void *private_data, struct iwffff_wave *wave,
 				 int atomic)
 {
-	snd_gus_card_t *gus = private_data;
+	struct snd_gus_card *gus = private_data;
 
 	if (wave->format & IWFFFF_WAVE_ROM)
 		return 0;	/* it's probably ok - verify the address? */	
@@ -81,11 +81,11 @@ int snd_gus_iwffff_remove_sample(void *private_data, iwffff_wave_t *wave,
  *
  */
 
-int snd_gus_gf1_put_sample(void *private_data, gf1_wave_t *wave,
+int snd_gus_gf1_put_sample(void *private_data, struct gf1_wave *wave,
 			   char __user *data, long len, int atomic)
 {
-	snd_gus_card_t *gus = private_data;
-	snd_gf1_mem_block_t *block;
+	struct snd_gus_card *gus = private_data;
+	struct snd_gf1_mem_block *block;
 	int err;
 
 	if (wave->format & GF1_WAVE_STEREO)
@@ -109,18 +109,18 @@ int snd_gus_gf1_put_sample(void *private_data, gf1_wave_t *wave,
 	return 0;
 }
 
-int snd_gus_gf1_get_sample(void *private_data, gf1_wave_t *wave,
+int snd_gus_gf1_get_sample(void *private_data, struct gf1_wave *wave,
 			   char __user *data, long len, int atomic)
 {
-	snd_gus_card_t *gus = private_data;
+	struct snd_gus_card *gus = private_data;
 
 	return snd_gus_dram_read(gus, data, wave->address.memory, wave->size, 0);
 }
 
-int snd_gus_gf1_remove_sample(void *private_data, gf1_wave_t *wave,
+int snd_gus_gf1_remove_sample(void *private_data, struct gf1_wave *wave,
 			      int atomic)
 {
-	snd_gus_card_t *gus = private_data;
+	struct snd_gus_card *gus = private_data;
 
 	return snd_gf1_mem_free(&gus->gf1.mem_alloc, wave->address.memory);
 }
@@ -129,11 +129,11 @@ int snd_gus_gf1_remove_sample(void *private_data, gf1_wave_t *wave,
  *
  */
 
-int snd_gus_simple_put_sample(void *private_data, simple_instrument_t *instr,
+int snd_gus_simple_put_sample(void *private_data, struct simple_instrument *instr,
 			      char __user *data, long len, int atomic)
 {
-	snd_gus_card_t *gus = private_data;
-	snd_gf1_mem_block_t *block;
+	struct snd_gus_card *gus = private_data;
+	struct snd_gf1_mem_block *block;
 	int err;
 
 	if (instr->format & SIMPLE_WAVE_STEREO)
@@ -156,18 +156,18 @@ int snd_gus_simple_put_sample(void *private_data, simple_instrument_t *instr,
 	return 0;
 }
 
-int snd_gus_simple_get_sample(void *private_data, simple_instrument_t *instr,
+int snd_gus_simple_get_sample(void *private_data, struct simple_instrument *instr,
 			      char __user *data, long len, int atomic)
 {
-	snd_gus_card_t *gus = private_data;
+	struct snd_gus_card *gus = private_data;
 
 	return snd_gus_dram_read(gus, data, instr->address.memory, instr->size, 0);
 }
 
-int snd_gus_simple_remove_sample(void *private_data, simple_instrument_t *instr,
+int snd_gus_simple_remove_sample(void *private_data, struct simple_instrument *instr,
 			         int atomic)
 {
-	snd_gus_card_t *gus = private_data;
+	struct snd_gus_card *gus = private_data;
 
 	return snd_gf1_mem_free(&gus->gf1.mem_alloc, instr->address.memory);
 }
diff --git a/sound/isa/gus/gus_io.c b/sound/isa/gus/gus_io.c
index 8d5752b2378..9b1fe292de4 100644
--- a/sound/isa/gus/gus_io.c
+++ b/sound/isa/gus/gus_io.c
@@ -25,7 +25,7 @@
 #include <sound/core.h>
 #include <sound/gus.h>
 
-void snd_gf1_delay(snd_gus_card_t * gus)
+void snd_gf1_delay(struct snd_gus_card * gus)
 {
 	int i;
 
@@ -44,7 +44,7 @@ void snd_gf1_delay(snd_gus_card_t * gus)
  *       big UltraClick (tm) elimination...
  */
 
-static inline void __snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg)
+static inline void __snd_gf1_ctrl_stop(struct snd_gus_card * gus, unsigned char reg)
 {
 	unsigned char value;
 
@@ -58,7 +58,7 @@ static inline void __snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg)
 	mb();
 }
 
-static inline void __snd_gf1_write8(snd_gus_card_t * gus,
+static inline void __snd_gf1_write8(struct snd_gus_card * gus,
 				    unsigned char reg,
 				    unsigned char data)
 {
@@ -68,7 +68,7 @@ static inline void __snd_gf1_write8(snd_gus_card_t * gus,
 	mb();
 }
 
-static inline unsigned char __snd_gf1_look8(snd_gus_card_t * gus,
+static inline unsigned char __snd_gf1_look8(struct snd_gus_card * gus,
 					    unsigned char reg)
 {
 	outb(reg, gus->gf1.reg_regsel);
@@ -76,7 +76,7 @@ static inline unsigned char __snd_gf1_look8(snd_gus_card_t * gus,
 	return inb(gus->gf1.reg_data8);
 }
 
-static inline void __snd_gf1_write16(snd_gus_card_t * gus,
+static inline void __snd_gf1_write16(struct snd_gus_card * gus,
 				     unsigned char reg, unsigned int data)
 {
 	outb(reg, gus->gf1.reg_regsel);
@@ -85,7 +85,7 @@ static inline void __snd_gf1_write16(snd_gus_card_t * gus,
 	mb();
 }
 
-static inline unsigned short __snd_gf1_look16(snd_gus_card_t * gus,
+static inline unsigned short __snd_gf1_look16(struct snd_gus_card * gus,
 					      unsigned char reg)
 {
 	outb(reg, gus->gf1.reg_regsel);
@@ -93,7 +93,7 @@ static inline unsigned short __snd_gf1_look16(snd_gus_card_t * gus,
 	return inw(gus->gf1.reg_data16);
 }
 
-static inline void __snd_gf1_adlib_write(snd_gus_card_t * gus,
+static inline void __snd_gf1_adlib_write(struct snd_gus_card * gus,
 					 unsigned char reg, unsigned char data)
 {
 	outb(reg, gus->gf1.reg_timerctrl);
@@ -104,7 +104,7 @@ static inline void __snd_gf1_adlib_write(snd_gus_card_t * gus,
 	inb(gus->gf1.reg_timerctrl);
 }
 
-static inline void __snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg,
+static inline void __snd_gf1_write_addr(struct snd_gus_card * gus, unsigned char reg,
                                         unsigned int addr, int w_16bit)
 {
 	if (gus->gf1.enh_mode) {
@@ -117,7 +117,7 @@ static inline void __snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg,
 	__snd_gf1_write16(gus, reg + 1, (unsigned short) (addr << 5));
 }
 
-static inline unsigned int __snd_gf1_read_addr(snd_gus_card_t * gus,
+static inline unsigned int __snd_gf1_read_addr(struct snd_gus_card * gus,
 					       unsigned char reg, short w_16bit)
 {
 	unsigned int res;
@@ -138,49 +138,49 @@ static inline unsigned int __snd_gf1_read_addr(snd_gus_card_t * gus,
  *  =======================================================================
  */
 
-void snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg)
+void snd_gf1_ctrl_stop(struct snd_gus_card * gus, unsigned char reg)
 {
 	__snd_gf1_ctrl_stop(gus, reg);
 }
 
-void snd_gf1_write8(snd_gus_card_t * gus,
+void snd_gf1_write8(struct snd_gus_card * gus,
 		    unsigned char reg,
 		    unsigned char data)
 {
 	__snd_gf1_write8(gus, reg, data);
 }
 
-unsigned char snd_gf1_look8(snd_gus_card_t * gus, unsigned char reg)
+unsigned char snd_gf1_look8(struct snd_gus_card * gus, unsigned char reg)
 {
 	return __snd_gf1_look8(gus, reg);
 }
 
-void snd_gf1_write16(snd_gus_card_t * gus,
+void snd_gf1_write16(struct snd_gus_card * gus,
 		     unsigned char reg,
 		     unsigned int data)
 {
 	__snd_gf1_write16(gus, reg, data);
 }
 
-unsigned short snd_gf1_look16(snd_gus_card_t * gus, unsigned char reg)
+unsigned short snd_gf1_look16(struct snd_gus_card * gus, unsigned char reg)
 {
 	return __snd_gf1_look16(gus, reg);
 }
 
-void snd_gf1_adlib_write(snd_gus_card_t * gus,
+void snd_gf1_adlib_write(struct snd_gus_card * gus,
                          unsigned char reg,
                          unsigned char data)
 {
 	__snd_gf1_adlib_write(gus, reg, data);
 }
 
-void snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg,
+void snd_gf1_write_addr(struct snd_gus_card * gus, unsigned char reg,
                         unsigned int addr, short w_16bit)
 {
 	__snd_gf1_write_addr(gus, reg, addr, w_16bit);
 }
 
-unsigned int snd_gf1_read_addr(snd_gus_card_t * gus,
+unsigned int snd_gf1_read_addr(struct snd_gus_card * gus,
                                unsigned char reg,
                                short w_16bit)
 {
@@ -191,7 +191,7 @@ unsigned int snd_gf1_read_addr(snd_gus_card_t * gus,
 
  */
 
-void snd_gf1_i_ctrl_stop(snd_gus_card_t * gus, unsigned char reg)
+void snd_gf1_i_ctrl_stop(struct snd_gus_card * gus, unsigned char reg)
 {
 	unsigned long flags;
 
@@ -200,7 +200,7 @@ void snd_gf1_i_ctrl_stop(snd_gus_card_t * gus, unsigned char reg)
 	spin_unlock_irqrestore(&gus->reg_lock, flags);
 }
 
-void snd_gf1_i_write8(snd_gus_card_t * gus,
+void snd_gf1_i_write8(struct snd_gus_card * gus,
 		      unsigned char reg,
                       unsigned char data)
 {
@@ -211,7 +211,7 @@ void snd_gf1_i_write8(snd_gus_card_t * gus,
 	spin_unlock_irqrestore(&gus->reg_lock, flags);
 }
 
-unsigned char snd_gf1_i_look8(snd_gus_card_t * gus, unsigned char reg)
+unsigned char snd_gf1_i_look8(struct snd_gus_card * gus, unsigned char reg)
 {
 	unsigned long flags;
 	unsigned char res;
@@ -222,7 +222,7 @@ unsigned char snd_gf1_i_look8(snd_gus_card_t * gus, unsigned char reg)
 	return res;
 }
 
-void snd_gf1_i_write16(snd_gus_card_t * gus,
+void snd_gf1_i_write16(struct snd_gus_card * gus,
 		       unsigned char reg,
 		       unsigned int data)
 {
@@ -233,7 +233,7 @@ void snd_gf1_i_write16(snd_gus_card_t * gus,
 	spin_unlock_irqrestore(&gus->reg_lock, flags);
 }
 
-unsigned short snd_gf1_i_look16(snd_gus_card_t * gus, unsigned char reg)
+unsigned short snd_gf1_i_look16(struct snd_gus_card * gus, unsigned char reg)
 {
 	unsigned long flags;
 	unsigned short res;
@@ -246,7 +246,7 @@ unsigned short snd_gf1_i_look16(snd_gus_card_t * gus, unsigned char reg)
 
 #if 0
 
-void snd_gf1_i_adlib_write(snd_gus_card_t * gus,
+void snd_gf1_i_adlib_write(struct snd_gus_card * gus,
 		           unsigned char reg,
 		           unsigned char data)
 {
@@ -257,7 +257,7 @@ void snd_gf1_i_adlib_write(snd_gus_card_t * gus,
 	spin_unlock_irqrestore(&gus->reg_lock, flags);
 }
 
-void snd_gf1_i_write_addr(snd_gus_card_t * gus, unsigned char reg,
+void snd_gf1_i_write_addr(struct snd_gus_card * gus, unsigned char reg,
 			  unsigned int addr, short w_16bit)
 {
 	unsigned long flags;
@@ -270,7 +270,7 @@ void snd_gf1_i_write_addr(snd_gus_card_t * gus, unsigned char reg,
 #endif  /*  0  */
 
 #ifdef CONFIG_SND_DEBUG
-static unsigned int snd_gf1_i_read_addr(snd_gus_card_t * gus,
+static unsigned int snd_gf1_i_read_addr(struct snd_gus_card * gus,
 					unsigned char reg, short w_16bit)
 {
 	unsigned int res;
@@ -287,7 +287,7 @@ static unsigned int snd_gf1_i_read_addr(snd_gus_card_t * gus,
 
  */
 
-void snd_gf1_dram_addr(snd_gus_card_t * gus, unsigned int addr)
+void snd_gf1_dram_addr(struct snd_gus_card * gus, unsigned int addr)
 {
 	outb(0x43, gus->gf1.reg_regsel);
 	mb();
@@ -299,7 +299,7 @@ void snd_gf1_dram_addr(snd_gus_card_t * gus, unsigned int addr)
 	mb();
 }
 
-void snd_gf1_poke(snd_gus_card_t * gus, unsigned int addr, unsigned char data)
+void snd_gf1_poke(struct snd_gus_card * gus, unsigned int addr, unsigned char data)
 {
 	unsigned long flags;
 
@@ -316,7 +316,7 @@ void snd_gf1_poke(snd_gus_card_t * gus, unsigned int addr, unsigned char data)
 	spin_unlock_irqrestore(&gus->reg_lock, flags);
 }
 
-unsigned char snd_gf1_peek(snd_gus_card_t * gus, unsigned int addr)
+unsigned char snd_gf1_peek(struct snd_gus_card * gus, unsigned int addr)
 {
 	unsigned long flags;
 	unsigned char res;
@@ -337,7 +337,7 @@ unsigned char snd_gf1_peek(snd_gus_card_t * gus, unsigned int addr)
 
 #if 0
 
-void snd_gf1_pokew(snd_gus_card_t * gus, unsigned int addr, unsigned short data)
+void snd_gf1_pokew(struct snd_gus_card * gus, unsigned int addr, unsigned short data)
 {
 	unsigned long flags;
 
@@ -360,7 +360,7 @@ void snd_gf1_pokew(snd_gus_card_t * gus, unsigned int addr, unsigned short data)
 	spin_unlock_irqrestore(&gus->reg_lock, flags);
 }
 
-unsigned short snd_gf1_peekw(snd_gus_card_t * gus, unsigned int addr)
+unsigned short snd_gf1_peekw(struct snd_gus_card * gus, unsigned int addr)
 {
 	unsigned long flags;
 	unsigned short res;
@@ -385,7 +385,7 @@ unsigned short snd_gf1_peekw(snd_gus_card_t * gus, unsigned int addr)
 	return res;
 }
 
-void snd_gf1_dram_setmem(snd_gus_card_t * gus, unsigned int addr,
+void snd_gf1_dram_setmem(struct snd_gus_card * gus, unsigned int addr,
 			 unsigned short value, unsigned int count)
 {
 	unsigned long port;
@@ -415,7 +415,7 @@ void snd_gf1_dram_setmem(snd_gus_card_t * gus, unsigned int addr,
 
 #endif  /*  0  */
 
-void snd_gf1_select_active_voices(snd_gus_card_t * gus)
+void snd_gf1_select_active_voices(struct snd_gus_card * gus)
 {
 	unsigned short voices;
 
@@ -443,7 +443,7 @@ void snd_gf1_select_active_voices(snd_gus_card_t * gus)
 
 #ifdef CONFIG_SND_DEBUG
 
-void snd_gf1_print_voice_registers(snd_gus_card_t * gus)
+void snd_gf1_print_voice_registers(struct snd_gus_card * gus)
 {
 	unsigned char mode;
 	int voice, ctrl;
@@ -477,7 +477,7 @@ void snd_gf1_print_voice_registers(snd_gus_card_t * gus)
 
 #if 0
 
-void snd_gf1_print_global_registers(snd_gus_card_t * gus)
+void snd_gf1_print_global_registers(struct snd_gus_card * gus)
 {
 	unsigned char global_mode = 0x00;
 
@@ -504,7 +504,7 @@ void snd_gf1_print_global_registers(snd_gus_card_t * gus)
 	}
 }
 
-void snd_gf1_print_setup_registers(snd_gus_card_t * gus)
+void snd_gf1_print_setup_registers(struct snd_gus_card * gus)
 {
 	printk(KERN_INFO " -S- mix control                  = 0x%x\n", inb(GUSP(gus, MIXCNTRLREG)));
 	printk(KERN_INFO " -S- IRQ status                   = 0x%x\n", inb(GUSP(gus, IRQSTAT)));
@@ -523,7 +523,7 @@ void snd_gf1_print_setup_registers(snd_gus_card_t * gus)
 	}
 }
 
-void snd_gf1_peek_print_block(snd_gus_card_t * gus, unsigned int addr, int count, int w_16bit)
+void snd_gf1_peek_print_block(struct snd_gus_card * gus, unsigned int addr, int count, int w_16bit)
 {
 	if (!w_16bit) {
 		while (count-- > 0)
diff --git a/sound/isa/gus/gus_irq.c b/sound/isa/gus/gus_irq.c
index 1e2a15eb810..c19ba2910b7 100644
--- a/sound/isa/gus/gus_irq.c
+++ b/sound/isa/gus/gus_irq.c
@@ -32,7 +32,7 @@
 
 irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	snd_gus_card_t * gus = dev_id;
+	struct snd_gus_card * gus = dev_id;
 	unsigned char status;
 	int loop = 100;
 	int handled = 0;
@@ -54,7 +54,7 @@ __again:
 	if (status & (0x20 | 0x40)) {
 		unsigned int already, _current_;
 		unsigned char voice_status, voice;
-		snd_gus_voice_t *pvoice;
+		struct snd_gus_voice *pvoice;
 
 		already = 0;
 		while (((voice_status = snd_gf1_i_read8(gus, SNDRV_GF1_GB_VOICES_IRQ)) & 0xc0) != 0xc0) {
@@ -107,11 +107,11 @@ __again:
 }
 
 #ifdef CONFIG_SND_DEBUG
-static void snd_gus_irq_info_read(snd_info_entry_t *entry, 
-				  snd_info_buffer_t * buffer)
+static void snd_gus_irq_info_read(struct snd_info_entry *entry, 
+				  struct snd_info_buffer *buffer)
 {
-	snd_gus_card_t *gus;
-	snd_gus_voice_t *pvoice;
+	struct snd_gus_card *gus;
+	struct snd_gus_voice *pvoice;
 	int idx;
 
 	gus = entry->private_data;
@@ -131,9 +131,9 @@ static void snd_gus_irq_info_read(snd_info_entry_t *entry,
 	}
 }
 
-void snd_gus_irq_profile_init(snd_gus_card_t *gus)
+void snd_gus_irq_profile_init(struct snd_gus_card *gus)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	if (! snd_card_proc_new(gus->card, "gusirq", &entry))
 		snd_info_set_text_ops(entry, gus, 1024, snd_gus_irq_info_read);
diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c
index 4f57ff4ab35..6d15b3d18a8 100644
--- a/sound/isa/gus/gus_main.c
+++ b/sound/isa/gus/gus_main.c
@@ -35,21 +35,21 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("Routines for Gravis UltraSound soundcards");
 MODULE_LICENSE("GPL");
 
-static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches);
+static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches);
 
-int snd_gus_use_inc(snd_gus_card_t * gus)
+int snd_gus_use_inc(struct snd_gus_card * gus)
 {
 	if (!try_module_get(gus->card->module))
 		return 0;
 	return 1;
 }
 
-void snd_gus_use_dec(snd_gus_card_t * gus)
+void snd_gus_use_dec(struct snd_gus_card * gus)
 {
 	module_put(gus->card->module);
 }
 
-static int snd_gus_joystick_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_gus_joystick_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -58,17 +58,17 @@ static int snd_gus_joystick_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
 	return 0;
 }
 
-static int snd_gus_joystick_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_gus_joystick_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
+	struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.integer.value[0] = gus->joystick_dac & 31;
 	return 0;
 }
 
-static int snd_gus_joystick_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_gus_joystick_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
+	struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int change;
 	unsigned char nval;
@@ -82,7 +82,7 @@ static int snd_gus_joystick_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return change;
 }
 
-static snd_kcontrol_new_t snd_gus_joystick_control = {
+static struct snd_kcontrol_new snd_gus_joystick_control = {
 	.iface = SNDRV_CTL_ELEM_IFACE_CARD,
 	.name = "Joystick Speed",
 	.info = snd_gus_joystick_info,
@@ -90,7 +90,7 @@ static snd_kcontrol_new_t snd_gus_joystick_control = {
 	.put = snd_gus_joystick_put
 };
 
-static void snd_gus_init_control(snd_gus_card_t *gus)
+static void snd_gus_init_control(struct snd_gus_card *gus)
 {
 	if (!gus->ace_flag)
 		snd_ctl_add(gus->card, snd_ctl_new1(&snd_gus_joystick_control, gus));
@@ -100,7 +100,7 @@ static void snd_gus_init_control(snd_gus_card_t *gus)
  *
  */
 
-static int snd_gus_free(snd_gus_card_t *gus)
+static int snd_gus_free(struct snd_gus_card *gus)
 {
 	if (gus->gf1.res_port2 == NULL)
 		goto __hw_end;
@@ -129,24 +129,24 @@ static int snd_gus_free(snd_gus_card_t *gus)
 	return 0;
 }
 
-static int snd_gus_dev_free(snd_device_t *device)
+static int snd_gus_dev_free(struct snd_device *device)
 {
-	snd_gus_card_t *gus = device->device_data;
+	struct snd_gus_card *gus = device->device_data;
 	return snd_gus_free(gus);
 }
 
-int snd_gus_create(snd_card_t * card,
+int snd_gus_create(struct snd_card *card,
 		   unsigned long port,
 		   int irq, int dma1, int dma2,
 		   int timer_dev,
 		   int voices,
 		   int pcm_channels,
 		   int effect,
-		   snd_gus_card_t **rgus)
+		   struct snd_gus_card **rgus)
 {
-	snd_gus_card_t *gus;
+	struct snd_gus_card *gus;
 	int err;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_gus_dev_free,
 	};
 
@@ -238,7 +238,7 @@ int snd_gus_create(snd_card_t * card,
  *  Memory detection routine for plain GF1 soundcards
  */
 
-static int snd_gus_detect_memory(snd_gus_card_t * gus)
+static int snd_gus_detect_memory(struct snd_gus_card * gus)
 {
 	int l, idx, local;
 	unsigned char d;
@@ -273,9 +273,9 @@ static int snd_gus_detect_memory(snd_gus_card_t * gus)
 	return 0;		/* some memory were detected */
 }
 
-static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches)
+static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	unsigned long flags;
 	int irq, dma1, dma2;
 	static unsigned char irqs[16] =
@@ -360,11 +360,11 @@ static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches)
 	return 0;
 }
 
-static int snd_gus_check_version(snd_gus_card_t * gus)
+static int snd_gus_check_version(struct snd_gus_card * gus)
 {
 	unsigned long flags;
 	unsigned char val, rev;
-	snd_card_t *card;
+	struct snd_card *card;
 
 	card = gus->card;
 	spin_lock_irqsave(&gus->reg_lock, flags);
@@ -409,14 +409,14 @@ static int snd_gus_check_version(snd_gus_card_t * gus)
 }
 
 #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
-static void snd_gus_seq_dev_free(snd_seq_device_t *seq_dev)
+static void snd_gus_seq_dev_free(struct snd_seq_device *seq_dev)
 {
-	snd_gus_card_t *gus = seq_dev->private_data;
+	struct snd_gus_card *gus = seq_dev->private_data;
 	gus->seq_dev = NULL;
 }
 #endif
 
-int snd_gus_initialize(snd_gus_card_t *gus)
+int snd_gus_initialize(struct snd_gus_card *gus)
 {
 	int err;
 
@@ -432,9 +432,9 @@ int snd_gus_initialize(snd_gus_card_t *gus)
 		return err;
 #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
 	if (snd_seq_device_new(gus->card, 1, SNDRV_SEQ_DEV_ID_GUS,
-			       sizeof(snd_gus_card_t*), &gus->seq_dev) >= 0) {
+			       sizeof(struct snd_gus_card *), &gus->seq_dev) >= 0) {
 		strcpy(gus->seq_dev->name, "GUS");
-		*(snd_gus_card_t**)SNDRV_SEQ_DEVICE_ARGPTR(gus->seq_dev) = gus;
+		*(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(gus->seq_dev) = gus;
 		gus->seq_dev->private_data = gus;
 		gus->seq_dev->private_free = snd_gus_seq_dev_free;
 	}
diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c
index 2e23f2a8c62..e8bdb860a19 100644
--- a/sound/isa/gus/gus_mem.c
+++ b/sound/isa/gus/gus_mem.c
@@ -27,11 +27,11 @@
 #include <sound/info.h>
 
 #ifdef CONFIG_SND_DEBUG
-static void snd_gf1_mem_info_read(snd_info_entry_t *entry, 
-				  snd_info_buffer_t * buffer);
+static void snd_gf1_mem_info_read(struct snd_info_entry *entry, 
+				  struct snd_info_buffer *buffer);
 #endif
 
-void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup)
+void snd_gf1_mem_lock(struct snd_gf1_mem * alloc, int xup)
 {
 	if (!xup) {
 		down(&alloc->memory_mutex);
@@ -40,12 +40,12 @@ void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup)
 	}
 }
 
-static snd_gf1_mem_block_t *snd_gf1_mem_xalloc(snd_gf1_mem_t * alloc,
-					       snd_gf1_mem_block_t * block)
+static struct snd_gf1_mem_block *snd_gf1_mem_xalloc(struct snd_gf1_mem * alloc,
+					       struct snd_gf1_mem_block * block)
 {
-	snd_gf1_mem_block_t *pblock, *nblock;
+	struct snd_gf1_mem_block *pblock, *nblock;
 
-	nblock = (snd_gf1_mem_block_t *) kmalloc(sizeof(snd_gf1_mem_block_t), GFP_KERNEL);
+	nblock = kmalloc(sizeof(struct snd_gf1_mem_block), GFP_KERNEL);
 	if (nblock == NULL)
 		return NULL;
 	*nblock = *block;
@@ -76,7 +76,7 @@ static snd_gf1_mem_block_t *snd_gf1_mem_xalloc(snd_gf1_mem_t * alloc,
 	return nblock;
 }
 
-int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block)
+int snd_gf1_mem_xfree(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * block)
 {
 	if (block->share) {	/* ok.. shared block */
 		block->share--;
@@ -106,10 +106,10 @@ int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block)
 	return 0;
 }
 
-static snd_gf1_mem_block_t *snd_gf1_mem_look(snd_gf1_mem_t * alloc,
+static struct snd_gf1_mem_block *snd_gf1_mem_look(struct snd_gf1_mem * alloc,
 					     unsigned int address)
 {
-	snd_gf1_mem_block_t *block;
+	struct snd_gf1_mem_block *block;
 
 	for (block = alloc->first; block; block = block->next) {
 		if (block->ptr == address) {
@@ -119,10 +119,10 @@ static snd_gf1_mem_block_t *snd_gf1_mem_look(snd_gf1_mem_t * alloc,
 	return NULL;
 }
 
-static snd_gf1_mem_block_t *snd_gf1_mem_share(snd_gf1_mem_t * alloc,
+static struct snd_gf1_mem_block *snd_gf1_mem_share(struct snd_gf1_mem * alloc,
 					      unsigned int *share_id)
 {
-	snd_gf1_mem_block_t *block;
+	struct snd_gf1_mem_block *block;
 
 	if (!share_id[0] && !share_id[1] &&
 	    !share_id[2] && !share_id[3])
@@ -133,14 +133,14 @@ static snd_gf1_mem_block_t *snd_gf1_mem_share(snd_gf1_mem_t * alloc,
 	return NULL;
 }
 
-static int snd_gf1_mem_find(snd_gf1_mem_t * alloc,
-			    snd_gf1_mem_block_t * block,
+static int snd_gf1_mem_find(struct snd_gf1_mem * alloc,
+			    struct snd_gf1_mem_block * block,
 			    unsigned int size, int w_16, int align)
 {
-	snd_gf1_bank_info_t *info = w_16 ? alloc->banks_16 : alloc->banks_8;
+	struct snd_gf1_bank_info *info = w_16 ? alloc->banks_16 : alloc->banks_8;
 	unsigned int idx, boundary;
 	int size1;
-	snd_gf1_mem_block_t *pblock;
+	struct snd_gf1_mem_block *pblock;
 	unsigned int ptr1, ptr2;
 
 	align--;
@@ -186,11 +186,11 @@ static int snd_gf1_mem_find(snd_gf1_mem_t * alloc,
 	return -ENOMEM;
 }
 
-snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner,
+struct snd_gf1_mem_block *snd_gf1_mem_alloc(struct snd_gf1_mem * alloc, int owner,
 				       char *name, int size, int w_16, int align,
 				       unsigned int *share_id)
 {
-	snd_gf1_mem_block_t block, *nblock;
+	struct snd_gf1_mem_block block, *nblock;
 
 	snd_gf1_mem_lock(alloc, 0);
 	if (share_id != NULL) {
@@ -220,10 +220,10 @@ snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner,
 	return nblock;
 }
 
-int snd_gf1_mem_free(snd_gf1_mem_t * alloc, unsigned int address)
+int snd_gf1_mem_free(struct snd_gf1_mem * alloc, unsigned int address)
 {
 	int result;
-	snd_gf1_mem_block_t *block;
+	struct snd_gf1_mem_block *block;
 
 	snd_gf1_mem_lock(alloc, 0);
 	if ((block = snd_gf1_mem_look(alloc, address)) != NULL) {
@@ -235,12 +235,12 @@ int snd_gf1_mem_free(snd_gf1_mem_t * alloc, unsigned int address)
 	return -EINVAL;
 }
 
-int snd_gf1_mem_init(snd_gus_card_t * gus)
+int snd_gf1_mem_init(struct snd_gus_card * gus)
 {
-	snd_gf1_mem_t *alloc;
-	snd_gf1_mem_block_t block;
+	struct snd_gf1_mem *alloc;
+	struct snd_gf1_mem_block block;
 #ifdef CONFIG_SND_DEBUG
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 #endif
 
 	alloc = &gus->gf1.mem_alloc;
@@ -272,10 +272,10 @@ int snd_gf1_mem_init(snd_gus_card_t * gus)
 	return 0;
 }
 
-int snd_gf1_mem_done(snd_gus_card_t * gus)
+int snd_gf1_mem_done(struct snd_gus_card * gus)
 {
-	snd_gf1_mem_t *alloc;
-	snd_gf1_mem_block_t *block, *nblock;
+	struct snd_gf1_mem *alloc;
+	struct snd_gf1_mem_block *block, *nblock;
 
 	alloc = &gus->gf1.mem_alloc;
 	block = alloc->first;
@@ -288,12 +288,12 @@ int snd_gf1_mem_done(snd_gus_card_t * gus)
 }
 
 #ifdef CONFIG_SND_DEBUG
-static void snd_gf1_mem_info_read(snd_info_entry_t *entry, 
-				  snd_info_buffer_t * buffer)
+static void snd_gf1_mem_info_read(struct snd_info_entry *entry, 
+				  struct snd_info_buffer *buffer)
 {
-	snd_gus_card_t *gus;
-	snd_gf1_mem_t *alloc;
-	snd_gf1_mem_block_t *block;
+	struct snd_gus_card *gus;
+	struct snd_gf1_mem *alloc;
+	struct snd_gf1_mem_block *block;
 	unsigned int total, used;
 	int i;
 
diff --git a/sound/isa/gus/gus_mem_proc.c b/sound/isa/gus/gus_mem_proc.c
index 7f96ac237f3..4080255007d 100644
--- a/sound/isa/gus/gus_mem_proc.c
+++ b/sound/isa/gus/gus_mem_proc.c
@@ -25,20 +25,20 @@
 #include <sound/gus.h>
 #include <sound/info.h>
 
-typedef struct gus_proc_private {
+struct gus_proc_private {
 	int rom;		/* data are in ROM */
 	unsigned int address;
 	unsigned int size;
-	snd_gus_card_t * gus;
-} gus_proc_private_t;
+	struct snd_gus_card * gus;
+};
 
-static long snd_gf1_mem_proc_dump(snd_info_entry_t *entry, void *file_private_data,
+static long snd_gf1_mem_proc_dump(struct snd_info_entry *entry, void *file_private_data,
 			          struct file *file, char __user *buf,
 			          unsigned long count, unsigned long pos)
 {
 	long size;
-	gus_proc_private_t *priv = entry->private_data;
-	snd_gus_card_t *gus = priv->gus;
+	struct gus_proc_private *priv = entry->private_data;
+	struct snd_gus_card *gus = priv->gus;
 	int err;
 
 	size = count;
@@ -52,13 +52,13 @@ static long snd_gf1_mem_proc_dump(snd_info_entry_t *entry, void *file_private_da
 	return 0;
 }			
 
-static long long snd_gf1_mem_proc_llseek(snd_info_entry_t *entry,
+static long long snd_gf1_mem_proc_llseek(struct snd_info_entry *entry,
 					void *private_file_data,
 					struct file *file,
 					long long offset,
 					int orig)
 {
-	gus_proc_private_t *priv = entry->private_data;
+	struct gus_proc_private *priv = entry->private_data;
 
 	switch (orig) {
 	case 0:	/* SEEK_SET */
@@ -78,9 +78,9 @@ static long long snd_gf1_mem_proc_llseek(snd_info_entry_t *entry,
 	return file->f_pos;
 }
 
-static void snd_gf1_mem_proc_free(snd_info_entry_t *entry)
+static void snd_gf1_mem_proc_free(struct snd_info_entry *entry)
 {
-	gus_proc_private_t *priv = entry->private_data;
+	struct gus_proc_private *priv = entry->private_data;
 	kfree(priv);
 }
 
@@ -89,12 +89,12 @@ static struct snd_info_entry_ops snd_gf1_mem_proc_ops = {
 	.llseek = snd_gf1_mem_proc_llseek,
 };
 
-int snd_gf1_mem_proc_init(snd_gus_card_t * gus)
+int snd_gf1_mem_proc_init(struct snd_gus_card * gus)
 {
 	int idx;
 	char name[16];
-	gus_proc_private_t *priv;
-	snd_info_entry_t *entry;
+	struct gus_proc_private *priv;
+	struct snd_info_entry *entry;
 
 	for (idx = 0; idx < 4; idx++) {
 		if (gus->gf1.mem_alloc.banks_8[idx].size > 0) {
diff --git a/sound/isa/gus/gus_mixer.c b/sound/isa/gus/gus_mixer.c
index a051094d510..acc25a29720 100644
--- a/sound/isa/gus/gus_mixer.c
+++ b/sound/isa/gus/gus_mixer.c
@@ -36,7 +36,7 @@
   .get = snd_gf1_get_single, .put = snd_gf1_put_single, \
   .private_value = shift | (invert << 8) }
 
-static int snd_gf1_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_gf1_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -45,9 +45,9 @@ static int snd_gf1_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
 	return 0;
 }
 
-static int snd_gf1_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_gf1_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
+	struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
 	int shift = kcontrol->private_value & 0xff;
 	int invert = (kcontrol->private_value >> 8) & 1;
 	
@@ -57,9 +57,9 @@ static int snd_gf1_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
 	return 0;
 }
 
-static int snd_gf1_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_gf1_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
+	struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int shift = kcontrol->private_value & 0xff;
 	int invert = (kcontrol->private_value >> 8) & 1;
@@ -86,7 +86,7 @@ static int snd_gf1_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
   .get = snd_ics_get_double, .put = snd_ics_put_double, \
   .private_value = addr }
 
-static int snd_ics_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ics_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
@@ -95,9 +95,9 @@ static int snd_ics_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
 	return 0;
 }
 
-static int snd_ics_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ics_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
+	struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int addr = kcontrol->private_value & 0xff;
 	unsigned char left, right;
@@ -111,9 +111,9 @@ static int snd_ics_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
 	return 0;
 }
 
-static int snd_ics_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ics_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
+	struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int addr = kcontrol->private_value & 0xff;
 	int change;
@@ -146,13 +146,13 @@ static int snd_ics_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
 	return change;
 }
 
-static snd_kcontrol_new_t snd_gf1_controls[] = {
+static struct snd_kcontrol_new snd_gf1_controls[] = {
 GF1_SINGLE("Master Playback Switch", 0, 1, 1),
 GF1_SINGLE("Line Switch", 0, 0, 1),
 GF1_SINGLE("Mic Switch", 0, 2, 0)
 };
 
-static snd_kcontrol_new_t snd_ics_controls[] = {
+static struct snd_kcontrol_new snd_ics_controls[] = {
 GF1_SINGLE("Master Playback Switch", 0, 1, 1),
 ICS_DOUBLE("Master Playback Volume", 0, SNDRV_ICS_MASTER_DEV),
 ICS_DOUBLE("Synth Playback Volume", 0, SNDRV_ICS_GF1_DEV),
@@ -163,9 +163,9 @@ ICS_DOUBLE("Mic Playback Volume", 0, SNDRV_ICS_MIC_DEV),
 ICS_DOUBLE("CD Playback Volume", 0, SNDRV_ICS_CD_DEV)
 };
 
-int snd_gf1_new_mixer(snd_gus_card_t * gus)
+int snd_gf1_new_mixer(struct snd_gus_card * gus)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	unsigned int idx, max;
 	int err;
 
diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c
index bae0fee705e..d0829393ec8 100644
--- a/sound/isa/gus/gus_pcm.c
+++ b/sound/isa/gus/gus_pcm.c
@@ -42,12 +42,12 @@
 #define SNDRV_GF1_PCM_PFLG_ACTIVE	(1<<0)
 #define SNDRV_GF1_PCM_PFLG_NEUTRAL	(2<<0)
 
-typedef struct {
-	snd_gus_card_t * gus;
-	snd_pcm_substream_t * substream;
+struct gus_pcm_private {
+	struct snd_gus_card * gus;
+	struct snd_pcm_substream *substream;
 	spinlock_t lock;
 	unsigned int voices;
-	snd_gus_voice_t *pvoices[2];
+	struct snd_gus_voice *pvoices[2];
 	unsigned int memory;
 	unsigned short flags;
 	unsigned char voice_ctrl, ramp_ctrl;
@@ -58,13 +58,13 @@ typedef struct {
 	wait_queue_head_t sleep;
 	atomic_t dma_count;
 	int final_volume;
-} gus_pcm_private_t;
+};
 
 static int snd_gf1_pcm_use_dma = 1;
 
-static void snd_gf1_pcm_block_change_ack(snd_gus_card_t * gus, void *private_data)
+static void snd_gf1_pcm_block_change_ack(struct snd_gus_card * gus, void *private_data)
 {
-	gus_pcm_private_t *pcmp = private_data;
+	struct gus_pcm_private *pcmp = private_data;
 
 	if (pcmp) {
 		atomic_dec(&pcmp->dma_count);
@@ -72,14 +72,14 @@ static void snd_gf1_pcm_block_change_ack(snd_gus_card_t * gus, void *private_dat
 	}
 }
 
-static int snd_gf1_pcm_block_change(snd_pcm_substream_t * substream,
+static int snd_gf1_pcm_block_change(struct snd_pcm_substream *substream,
 				    unsigned int offset,
 				    unsigned int addr,
 				    unsigned int count)
 {
-	snd_gf1_dma_block_t block;
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	gus_pcm_private_t *pcmp = runtime->private_data;
+	struct snd_gf1_dma_block block;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct gus_pcm_private *pcmp = runtime->private_data;
 
 	count += offset & 31;
 	offset &= ~31;
@@ -101,11 +101,11 @@ static int snd_gf1_pcm_block_change(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static void snd_gf1_pcm_trigger_up(snd_pcm_substream_t * substream)
+static void snd_gf1_pcm_trigger_up(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	gus_pcm_private_t *pcmp = runtime->private_data;
-	snd_gus_card_t * gus = pcmp->gus;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct gus_pcm_private *pcmp = runtime->private_data;
+	struct snd_gus_card * gus = pcmp->gus;
 	unsigned long flags;
 	unsigned char voice_ctrl, ramp_ctrl;
 	unsigned short rate;
@@ -179,10 +179,11 @@ static void snd_gf1_pcm_trigger_up(snd_pcm_substream_t * substream)
 	spin_unlock_irqrestore(&gus->reg_lock, flags);
 }
 
-static void snd_gf1_pcm_interrupt_wave(snd_gus_card_t * gus, snd_gus_voice_t *pvoice)
+static void snd_gf1_pcm_interrupt_wave(struct snd_gus_card * gus,
+				       struct snd_gus_voice *pvoice)
 {
-	gus_pcm_private_t * pcmp;
-	snd_pcm_runtime_t * runtime;
+	struct gus_pcm_private * pcmp;
+	struct snd_pcm_runtime *runtime;
 	unsigned char voice_ctrl, ramp_ctrl;
 	unsigned int idx;
 	unsigned int end, step;
@@ -261,11 +262,12 @@ static void snd_gf1_pcm_interrupt_wave(snd_gus_card_t * gus, snd_gus_voice_t *pv
 #endif
 }
 
-static void snd_gf1_pcm_interrupt_volume(snd_gus_card_t * gus, snd_gus_voice_t * pvoice)
+static void snd_gf1_pcm_interrupt_volume(struct snd_gus_card * gus,
+					 struct snd_gus_voice * pvoice)
 {
 	unsigned short vol;
 	int cvoice;
-	gus_pcm_private_t *pcmp = pvoice->private_data;
+	struct gus_pcm_private *pcmp = pvoice->private_data;
 
 	/* stop ramp, but leave rollover bit untouched */
 	spin_lock(&gus->reg_lock);
@@ -289,11 +291,11 @@ static void snd_gf1_pcm_interrupt_volume(snd_gus_card_t * gus, snd_gus_voice_t *
 	spin_unlock(&gus->reg_lock);
 }
 
-static void snd_gf1_pcm_volume_change(snd_gus_card_t * gus)
+static void snd_gf1_pcm_volume_change(struct snd_gus_card * gus)
 {
 }
 
-static int snd_gf1_pcm_poke_block(snd_gus_card_t *gus, unsigned char *buf,
+static int snd_gf1_pcm_poke_block(struct snd_gus_card *gus, unsigned char *buf,
 				  unsigned int pos, unsigned int count,
 				  int w16, int invert)
 {
@@ -341,14 +343,14 @@ static int snd_gf1_pcm_poke_block(snd_gus_card_t *gus, unsigned char *buf,
 	return 0;
 }
 
-static int snd_gf1_pcm_playback_copy(snd_pcm_substream_t *substream,
+static int snd_gf1_pcm_playback_copy(struct snd_pcm_substream *substream,
 				     int voice,
 				     snd_pcm_uframes_t pos,
 				     void __user *src,
 				     snd_pcm_uframes_t count)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	gus_pcm_private_t *pcmp = runtime->private_data;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct gus_pcm_private *pcmp = runtime->private_data;
 	unsigned int bpos, len;
 	
 	bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2));
@@ -360,7 +362,7 @@ static int snd_gf1_pcm_playback_copy(snd_pcm_substream_t *substream,
 	if (snd_gf1_pcm_use_dma && len > 32) {
 		return snd_gf1_pcm_block_change(substream, bpos, pcmp->memory + bpos, len);
 	} else {
-		snd_gus_card_t *gus = pcmp->gus;
+		struct snd_gus_card *gus = pcmp->gus;
 		int err, w16, invert;
 
 		w16 = (snd_pcm_format_width(runtime->format) == 16);
@@ -371,13 +373,13 @@ static int snd_gf1_pcm_playback_copy(snd_pcm_substream_t *substream,
 	return 0;
 }
 
-static int snd_gf1_pcm_playback_silence(snd_pcm_substream_t *substream,
+static int snd_gf1_pcm_playback_silence(struct snd_pcm_substream *substream,
 					int voice,
 					snd_pcm_uframes_t pos,
 					snd_pcm_uframes_t count)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	gus_pcm_private_t *pcmp = runtime->private_data;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct gus_pcm_private *pcmp = runtime->private_data;
 	unsigned int bpos, len;
 	
 	bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2));
@@ -388,7 +390,7 @@ static int snd_gf1_pcm_playback_silence(snd_pcm_substream_t *substream,
 	if (snd_gf1_pcm_use_dma && len > 32) {
 		return snd_gf1_pcm_block_change(substream, bpos, pcmp->memory + bpos, len);
 	} else {
-		snd_gus_card_t *gus = pcmp->gus;
+		struct snd_gus_card *gus = pcmp->gus;
 		int err, w16, invert;
 
 		w16 = (snd_pcm_format_width(runtime->format) == 16);
@@ -399,18 +401,18 @@ static int snd_gf1_pcm_playback_silence(snd_pcm_substream_t *substream,
 	return 0;
 }
 
-static int snd_gf1_pcm_playback_hw_params(snd_pcm_substream_t * substream,
-					  snd_pcm_hw_params_t * hw_params)
+static int snd_gf1_pcm_playback_hw_params(struct snd_pcm_substream *substream,
+					  struct snd_pcm_hw_params *hw_params)
 {
-	snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	gus_pcm_private_t *pcmp = runtime->private_data;
+	struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct gus_pcm_private *pcmp = runtime->private_data;
 	int err;
 	
 	if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0)
 		return err;
 	if (err > 0) {	/* change */
-		snd_gf1_mem_block_t *block;
+		struct snd_gf1_mem_block *block;
 		if (pcmp->memory > 0) {
 			snd_gf1_mem_free(&gus->gf1.mem_alloc, pcmp->memory);
 			pcmp->memory = 0;
@@ -448,10 +450,10 @@ static int snd_gf1_pcm_playback_hw_params(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_gf1_pcm_playback_hw_free(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_playback_hw_free(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	gus_pcm_private_t *pcmp = runtime->private_data;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct gus_pcm_private *pcmp = runtime->private_data;
 
 	snd_pcm_lib_free_pages(substream);
 	if (pcmp->pvoices[0]) {
@@ -469,10 +471,10 @@ static int snd_gf1_pcm_playback_hw_free(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_gf1_pcm_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_playback_prepare(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	gus_pcm_private_t *pcmp = runtime->private_data;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct gus_pcm_private *pcmp = runtime->private_data;
 
 	pcmp->bpos = 0;
 	pcmp->dma_size = snd_pcm_lib_buffer_bytes(substream);
@@ -481,12 +483,12 @@ static int snd_gf1_pcm_playback_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_gf1_pcm_playback_trigger(snd_pcm_substream_t * substream,
+static int snd_gf1_pcm_playback_trigger(struct snd_pcm_substream *substream,
 					int cmd)
 {
-	snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	gus_pcm_private_t *pcmp = runtime->private_data;
+	struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct gus_pcm_private *pcmp = runtime->private_data;
 	int voice;
 
 	if (cmd == SNDRV_PCM_TRIGGER_START) {
@@ -507,11 +509,11 @@ static int snd_gf1_pcm_playback_trigger(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(struct snd_pcm_substream *substream)
 {
-	snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	gus_pcm_private_t *pcmp = runtime->private_data;
+	struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct gus_pcm_private *pcmp = runtime->private_data;
 	unsigned int pos;
 	unsigned char voice_ctrl;
 
@@ -529,22 +531,22 @@ static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(snd_pcm_substream_t * subs
 	return pos;
 }
 
-static ratnum_t clock = {
+static struct snd_ratnum clock = {
 	.num = 9878400/16,
 	.den_min = 2,
 	.den_max = 257,
 	.den_step = 1,
 };
 
-static snd_pcm_hw_constraint_ratnums_t hw_constraints_clocks  = {
+static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks  = {
 	.nrats = 1,
 	.rats = &clock,
 };
 
-static int snd_gf1_pcm_capture_hw_params(snd_pcm_substream_t * substream,
-					 snd_pcm_hw_params_t * hw_params)
+static int snd_gf1_pcm_capture_hw_params(struct snd_pcm_substream *substream,
+					 struct snd_pcm_hw_params *hw_params)
 {
-	snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
+	struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
 
 	gus->c_dma_size = params_buffer_bytes(hw_params);
 	gus->c_period_size = params_period_bytes(hw_params);
@@ -559,15 +561,15 @@ static int snd_gf1_pcm_capture_hw_params(snd_pcm_substream_t * substream,
 	return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
 }
 
-static int snd_gf1_pcm_capture_hw_free(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_capture_hw_free(struct snd_pcm_substream *substream)
 {
 	return snd_pcm_lib_free_pages(substream);
 }
 
-static int snd_gf1_pcm_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_capture_prepare(struct snd_pcm_substream *substream)
 {
-	snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	snd_gf1_i_write8(gus, SNDRV_GF1_GB_RECORD_RATE, runtime->rate_den - 2);
 	snd_gf1_i_write8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL, 0);	/* disable sampling */
@@ -576,10 +578,10 @@ static int snd_gf1_pcm_capture_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_gf1_pcm_capture_trigger(snd_pcm_substream_t * substream,
+static int snd_gf1_pcm_capture_trigger(struct snd_pcm_substream *substream,
 				       int cmd)
 {
-	snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
+	struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
 	int val;
 	
 	if (cmd == SNDRV_PCM_TRIGGER_START) {
@@ -597,15 +599,15 @@ static int snd_gf1_pcm_capture_trigger(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static snd_pcm_uframes_t snd_gf1_pcm_capture_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_gf1_pcm_capture_pointer(struct snd_pcm_substream *substream)
 {
-	snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
+	struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
 	int pos = snd_dma_pointer(gus->gf1.dma2, gus->c_period_size);
 	pos = bytes_to_frames(substream->runtime, (gus->c_pos + pos) % gus->c_dma_size);
 	return pos;
 }
 
-static void snd_gf1_pcm_interrupt_dma_read(snd_gus_card_t * gus)
+static void snd_gf1_pcm_interrupt_dma_read(struct snd_gus_card * gus)
 {
 	snd_gf1_i_write8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL, 0);	/* disable sampling */
 	snd_gf1_i_look8(gus, SNDRV_GF1_GB_REC_DMA_CONTROL);	/* Sampling Control Register */
@@ -617,7 +619,7 @@ static void snd_gf1_pcm_interrupt_dma_read(snd_gus_card_t * gus)
 	}
 }
 
-static snd_pcm_hardware_t snd_gf1_pcm_playback =
+static struct snd_pcm_hardware snd_gf1_pcm_playback =
 {
 	.info =			SNDRV_PCM_INFO_NONINTERLEAVED,
 	.formats		= (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 |
@@ -635,7 +637,7 @@ static snd_pcm_hardware_t snd_gf1_pcm_playback =
 	.fifo_size =		0,
 };
 
-static snd_pcm_hardware_t snd_gf1_pcm_capture =
+static struct snd_pcm_hardware snd_gf1_pcm_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
@@ -653,16 +655,16 @@ static snd_pcm_hardware_t snd_gf1_pcm_capture =
 	.fifo_size =		0,
 };
 
-static void snd_gf1_pcm_playback_free(snd_pcm_runtime_t *runtime)
+static void snd_gf1_pcm_playback_free(struct snd_pcm_runtime *runtime)
 {
 	kfree(runtime->private_data);
 }
 
-static int snd_gf1_pcm_playback_open(snd_pcm_substream_t *substream)
+static int snd_gf1_pcm_playback_open(struct snd_pcm_substream *substream)
 {
-	gus_pcm_private_t *pcmp;
-	snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct gus_pcm_private *pcmp;
+	struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 
 	pcmp = kzalloc(sizeof(*pcmp), GFP_KERNEL);
@@ -690,11 +692,11 @@ static int snd_gf1_pcm_playback_open(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-static int snd_gf1_pcm_playback_close(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_playback_close(struct snd_pcm_substream *substream)
 {
-	snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	gus_pcm_private_t *pcmp = runtime->private_data;
+	struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct gus_pcm_private *pcmp = runtime->private_data;
 	
 	if (!wait_event_timeout(pcmp->sleep, (atomic_read(&pcmp->dma_count) <= 0), 2*HZ))
 		snd_printk(KERN_ERR "gf1 pcm - serious DMA problem\n");
@@ -703,10 +705,10 @@ static int snd_gf1_pcm_playback_close(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_gf1_pcm_capture_open(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_capture_open(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
 
 	gus->gf1.interrupt_handler_dma_read = snd_gf1_pcm_interrupt_dma_read;
 	gus->pcm_cap_substream = substream;
@@ -718,16 +720,16 @@ static int snd_gf1_pcm_capture_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_gf1_pcm_capture_close(snd_pcm_substream_t * substream)
+static int snd_gf1_pcm_capture_close(struct snd_pcm_substream *substream)
 {
-	snd_gus_card_t *gus = snd_pcm_substream_chip(substream);
+	struct snd_gus_card *gus = snd_pcm_substream_chip(substream);
 
 	gus->pcm_cap_substream = NULL;
 	snd_gf1_set_default_handlers(gus, SNDRV_GF1_HANDLER_DMA_READ);
 	return 0;
 }
 
-static int snd_gf1_pcm_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_gf1_pcm_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
@@ -736,9 +738,9 @@ static int snd_gf1_pcm_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_gf1_pcm_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_gf1_pcm_volume_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
+	struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	
 	spin_lock_irqsave(&gus->pcm_volume_level_lock, flags);
@@ -748,15 +750,15 @@ static int snd_gf1_pcm_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
 	return 0;
 }
 
-static int snd_gf1_pcm_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_gf1_pcm_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	snd_gus_card_t *gus = snd_kcontrol_chip(kcontrol);
+	struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
 	unsigned long flags;
 	int change;
 	unsigned int idx;
 	unsigned short val1, val2, vol;
-	gus_pcm_private_t *pcmp;
-	snd_gus_voice_t *pvoice;
+	struct gus_pcm_private *pcmp;
+	struct snd_gus_voice *pvoice;
 	
 	val1 = ucontrol->value.integer.value[0] & 127;
 	val2 = ucontrol->value.integer.value[1] & 127;
@@ -790,7 +792,7 @@ static int snd_gf1_pcm_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
 	return change;
 }
 
-static snd_kcontrol_new_t snd_gf1_pcm_volume_control =
+static struct snd_kcontrol_new snd_gf1_pcm_volume_control =
 {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "PCM Playback Volume",
@@ -799,7 +801,7 @@ static snd_kcontrol_new_t snd_gf1_pcm_volume_control =
 	.put = snd_gf1_pcm_volume_put
 };
 
-static snd_kcontrol_new_t snd_gf1_pcm_volume_control1 =
+static struct snd_kcontrol_new snd_gf1_pcm_volume_control1 =
 {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "GPCM Playback Volume",
@@ -808,7 +810,7 @@ static snd_kcontrol_new_t snd_gf1_pcm_volume_control1 =
 	.put = snd_gf1_pcm_volume_put
 };
 
-static snd_pcm_ops_t snd_gf1_pcm_playback_ops = {
+static struct snd_pcm_ops snd_gf1_pcm_playback_ops = {
 	.open =		snd_gf1_pcm_playback_open,
 	.close =	snd_gf1_pcm_playback_close,
 	.ioctl =	snd_pcm_lib_ioctl,
@@ -821,7 +823,7 @@ static snd_pcm_ops_t snd_gf1_pcm_playback_ops = {
 	.silence =	snd_gf1_pcm_playback_silence,
 };
 
-static snd_pcm_ops_t snd_gf1_pcm_capture_ops = {
+static struct snd_pcm_ops snd_gf1_pcm_capture_ops = {
 	.open =		snd_gf1_pcm_capture_open,
 	.close =	snd_gf1_pcm_capture_close,
 	.ioctl =	snd_pcm_lib_ioctl,
@@ -832,12 +834,12 @@ static snd_pcm_ops_t snd_gf1_pcm_capture_ops = {
 	.pointer =	snd_gf1_pcm_capture_pointer,
 };
 
-int snd_gf1_pcm_new(snd_gus_card_t * gus, int pcm_dev, int control_index, snd_pcm_t ** rpcm)
+int snd_gf1_pcm_new(struct snd_gus_card * gus, int pcm_dev, int control_index, struct snd_pcm ** rpcm)
 {
-	snd_card_t *card;
-	snd_kcontrol_t *kctl;
-	snd_pcm_t *pcm;
-	snd_pcm_substream_t *substream;
+	struct snd_card *card;
+	struct snd_kcontrol *kctl;
+	struct snd_pcm *pcm;
+	struct snd_pcm_substream *substream;
 	int capture, err;
 
 	if (rpcm)
diff --git a/sound/isa/gus/gus_reset.c b/sound/isa/gus/gus_reset.c
index 90710969ef7..b263655c411 100644
--- a/sound/isa/gus/gus_reset.c
+++ b/sound/isa/gus/gus_reset.c
@@ -25,52 +25,52 @@
 #include <sound/core.h>
 #include <sound/gus.h>
 
-extern void snd_gf1_timers_init(snd_gus_card_t * gus);
-extern void snd_gf1_timers_done(snd_gus_card_t * gus);
-extern int snd_gf1_synth_init(snd_gus_card_t * gus);
-extern void snd_gf1_synth_done(snd_gus_card_t * gus);
+extern void snd_gf1_timers_init(struct snd_gus_card * gus);
+extern void snd_gf1_timers_done(struct snd_gus_card * gus);
+extern int snd_gf1_synth_init(struct snd_gus_card * gus);
+extern void snd_gf1_synth_done(struct snd_gus_card * gus);
 
 /*
  *  ok.. default interrupt handlers...
  */
 
-static void snd_gf1_default_interrupt_handler_midi_out(snd_gus_card_t * gus)
+static void snd_gf1_default_interrupt_handler_midi_out(struct snd_gus_card * gus)
 {
 	snd_gf1_uart_cmd(gus, gus->gf1.uart_cmd &= ~0x20);
 }
 
-static void snd_gf1_default_interrupt_handler_midi_in(snd_gus_card_t * gus)
+static void snd_gf1_default_interrupt_handler_midi_in(struct snd_gus_card * gus)
 {
 	snd_gf1_uart_cmd(gus, gus->gf1.uart_cmd &= ~0x80);
 }
 
-static void snd_gf1_default_interrupt_handler_timer1(snd_gus_card_t * gus)
+static void snd_gf1_default_interrupt_handler_timer1(struct snd_gus_card * gus)
 {
 	snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, gus->gf1.timer_enabled &= ~4);
 }
 
-static void snd_gf1_default_interrupt_handler_timer2(snd_gus_card_t * gus)
+static void snd_gf1_default_interrupt_handler_timer2(struct snd_gus_card * gus)
 {
 	snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, gus->gf1.timer_enabled &= ~8);
 }
 
-static void snd_gf1_default_interrupt_handler_wave_and_volume(snd_gus_card_t * gus, snd_gus_voice_t * voice)
+static void snd_gf1_default_interrupt_handler_wave_and_volume(struct snd_gus_card * gus, struct snd_gus_voice * voice)
 {
 	snd_gf1_i_ctrl_stop(gus, 0x00);
 	snd_gf1_i_ctrl_stop(gus, 0x0d);
 }
 
-static void snd_gf1_default_interrupt_handler_dma_write(snd_gus_card_t * gus)
+static void snd_gf1_default_interrupt_handler_dma_write(struct snd_gus_card * gus)
 {
 	snd_gf1_i_write8(gus, 0x41, 0x00);
 }
 
-static void snd_gf1_default_interrupt_handler_dma_read(snd_gus_card_t * gus)
+static void snd_gf1_default_interrupt_handler_dma_read(struct snd_gus_card * gus)
 {
 	snd_gf1_i_write8(gus, 0x49, 0x00);
 }
 
-void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what)
+void snd_gf1_set_default_handlers(struct snd_gus_card * gus, unsigned int what)
 {
 	if (what & SNDRV_GF1_HANDLER_MIDI_OUT)
 		gus->gf1.interrupt_handler_midi_out = snd_gf1_default_interrupt_handler_midi_out;
@@ -81,7 +81,7 @@ void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what)
 	if (what & SNDRV_GF1_HANDLER_TIMER2)
 		gus->gf1.interrupt_handler_timer2 = snd_gf1_default_interrupt_handler_timer2;
 	if (what & SNDRV_GF1_HANDLER_VOICE) {
-		snd_gus_voice_t *voice;
+		struct snd_gus_voice *voice;
 		
 		voice = &gus->gf1.voices[what & 0xffff];
 		voice->handler_wave =
@@ -99,7 +99,7 @@ void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what)
 
  */
 
-static void snd_gf1_clear_regs(snd_gus_card_t * gus)
+static void snd_gf1_clear_regs(struct snd_gus_card * gus)
 {
 	unsigned long flags;
 
@@ -111,7 +111,7 @@ static void snd_gf1_clear_regs(snd_gus_card_t * gus)
 	spin_unlock_irqrestore(&gus->reg_lock, flags);
 }
 
-static void snd_gf1_look_regs(snd_gus_card_t * gus)
+static void snd_gf1_look_regs(struct snd_gus_card * gus)
 {
 	unsigned long flags;
 
@@ -127,7 +127,7 @@ static void snd_gf1_look_regs(snd_gus_card_t * gus)
  *  put selected GF1 voices to initial stage...
  */
 
-void snd_gf1_smart_stop_voice(snd_gus_card_t * gus, unsigned short voice)
+void snd_gf1_smart_stop_voice(struct snd_gus_card * gus, unsigned short voice)
 {
 	unsigned long flags;
 
@@ -141,7 +141,7 @@ void snd_gf1_smart_stop_voice(snd_gus_card_t * gus, unsigned short voice)
 	spin_unlock_irqrestore(&gus->reg_lock, flags);
 }
 
-void snd_gf1_stop_voice(snd_gus_card_t * gus, unsigned short voice)
+void snd_gf1_stop_voice(struct snd_gus_card * gus, unsigned short voice)
 {
 	unsigned long flags;
 
@@ -161,7 +161,7 @@ void snd_gf1_stop_voice(snd_gus_card_t * gus, unsigned short voice)
 #endif
 }
 
-static void snd_gf1_clear_voices(snd_gus_card_t * gus, unsigned short v_min,
+static void snd_gf1_clear_voices(struct snd_gus_card * gus, unsigned short v_min,
 				 unsigned short v_max)
 {
 	unsigned long flags;
@@ -203,7 +203,7 @@ static void snd_gf1_clear_voices(snd_gus_card_t * gus, unsigned short v_min,
 	}
 }
 
-void snd_gf1_stop_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned short v_max)
+void snd_gf1_stop_voices(struct snd_gus_card * gus, unsigned short v_min, unsigned short v_max)
 {
 	unsigned long flags;
 	short i, ramp_ok;
@@ -232,8 +232,8 @@ void snd_gf1_stop_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned sh
 	snd_gf1_clear_voices(gus, v_min, v_max);
 }
 
-static void snd_gf1_alloc_voice_use(snd_gus_card_t * gus, 
-				    snd_gus_voice_t * pvoice,
+static void snd_gf1_alloc_voice_use(struct snd_gus_card * gus, 
+				    struct snd_gus_voice * pvoice,
 				    int type, int client, int port)
 {
 	pvoice->use = 1;
@@ -255,9 +255,9 @@ static void snd_gf1_alloc_voice_use(snd_gus_card_t * gus,
 	}
 }
 
-snd_gus_voice_t *snd_gf1_alloc_voice(snd_gus_card_t * gus, int type, int client, int port)
+struct snd_gus_voice *snd_gf1_alloc_voice(struct snd_gus_card * gus, int type, int client, int port)
 {
-	snd_gus_voice_t *pvoice;
+	struct snd_gus_voice *pvoice;
 	unsigned long flags;
 	int idx;
 
@@ -289,10 +289,10 @@ snd_gus_voice_t *snd_gf1_alloc_voice(snd_gus_card_t * gus, int type, int client,
 	return NULL;
 }
 
-void snd_gf1_free_voice(snd_gus_card_t * gus, snd_gus_voice_t *voice)
+void snd_gf1_free_voice(struct snd_gus_card * gus, struct snd_gus_voice *voice)
 {
 	unsigned long flags;
-	void (*private_free)(snd_gus_voice_t *voice);
+	void (*private_free)(struct snd_gus_voice *voice);
 	void *private_data;
 
 	if (voice == NULL || !voice->use)
@@ -317,7 +317,7 @@ void snd_gf1_free_voice(snd_gus_card_t * gus, snd_gus_voice_t *voice)
  *  call this function only by start of driver
  */
 
-int snd_gf1_start(snd_gus_card_t * gus)
+int snd_gf1_start(struct snd_gus_card * gus)
 {
 	unsigned long flags;
 	unsigned int i;
@@ -400,7 +400,7 @@ int snd_gf1_start(snd_gus_card_t * gus)
  *  call this function only by shutdown of driver
  */
 
-int snd_gf1_stop(snd_gus_card_t * gus)
+int snd_gf1_stop(struct snd_gus_card * gus)
 {
 	snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, 0); /* stop all timers */
 	snd_gf1_stop_voices(gus, 0, 31);		/* stop all voices */
diff --git a/sound/isa/gus/gus_sample.c b/sound/isa/gus/gus_sample.c
index 4290e03acd5..9e0c55ab25b 100644
--- a/sound/isa/gus/gus_sample.c
+++ b/sound/isa/gus/gus_sample.c
@@ -28,9 +28,9 @@
  *
  */
 
-static void select_instrument(snd_gus_card_t * gus, snd_gus_voice_t * v)
+static void select_instrument(struct snd_gus_card * gus, struct snd_gus_voice * v)
 {
-	snd_seq_kinstr_t *instr;
+	struct snd_seq_kinstr *instr;
 
 #if 0
 	printk("select instrument: cluster = %li, std = 0x%x, bank = %i, prg = %i\n",
@@ -53,7 +53,8 @@ static void select_instrument(snd_gus_card_t * gus, snd_gus_voice_t * v)
  *
  */
 
-static void event_sample(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
+static void event_sample(struct snd_seq_event *ev, struct snd_gus_port *p,
+			 struct snd_gus_voice *v)
 {
 	if (v->sample_ops && v->sample_ops->sample_stop)
 		v->sample_ops->sample_stop(p->gus, v, SAMPLE_STOP_IMMEDIATELY);
@@ -67,7 +68,8 @@ static void event_sample(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t
 	select_instrument(p->gus, v);
 }
 
-static void event_cluster(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
+static void event_cluster(struct snd_seq_event *ev, struct snd_gus_port *p,
+			  struct snd_gus_voice *v)
 {
 	if (v->sample_ops && v->sample_ops->sample_stop)
 		v->sample_ops->sample_stop(p->gus, v, SAMPLE_STOP_IMMEDIATELY);
@@ -75,50 +77,58 @@ static void event_cluster(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_
 	select_instrument(p->gus, v);
 }
 
-static void event_start(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
+static void event_start(struct snd_seq_event *ev, struct snd_gus_port *p,
+			struct snd_gus_voice *v)
 {
 	if (v->sample_ops && v->sample_ops->sample_start)
 		v->sample_ops->sample_start(p->gus, v, ev->data.sample.param.position);
 }
 
-static void event_stop(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
+static void event_stop(struct snd_seq_event *ev, struct snd_gus_port *p,
+		       struct snd_gus_voice *v)
 {
 	if (v->sample_ops && v->sample_ops->sample_stop)
 		v->sample_ops->sample_stop(p->gus, v, ev->data.sample.param.stop_mode);
 }
 
-static void event_freq(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
+static void event_freq(struct snd_seq_event *ev, struct snd_gus_port *p,
+		       struct snd_gus_voice *v)
 {
 	if (v->sample_ops && v->sample_ops->sample_freq)
 		v->sample_ops->sample_freq(p->gus, v, ev->data.sample.param.frequency);
 }
 
-static void event_volume(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
+static void event_volume(struct snd_seq_event *ev, struct snd_gus_port *p,
+			 struct snd_gus_voice *v)
 {
 	if (v->sample_ops && v->sample_ops->sample_volume)
 		v->sample_ops->sample_volume(p->gus, v, &ev->data.sample.param.volume);
 }
 
-static void event_loop(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
+static void event_loop(struct snd_seq_event *ev, struct snd_gus_port *p,
+		       struct snd_gus_voice *v)
 {
 	if (v->sample_ops && v->sample_ops->sample_loop)
 		v->sample_ops->sample_loop(p->gus, v, &ev->data.sample.param.loop);
 }
 
-static void event_position(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
+static void event_position(struct snd_seq_event *ev, struct snd_gus_port *p,
+			   struct snd_gus_voice *v)
 {
 	if (v->sample_ops && v->sample_ops->sample_pos)
 		v->sample_ops->sample_pos(p->gus, v, ev->data.sample.param.position);
 }
 
-static void event_private1(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v)
+static void event_private1(struct snd_seq_event *ev, struct snd_gus_port *p,
+			   struct snd_gus_voice *v)
 {
 	if (v->sample_ops && v->sample_ops->sample_private1)
 		v->sample_ops->sample_private1(p->gus, v, (unsigned char *)&ev->data.sample.param.raw8);
 }
 
-typedef void (gus_sample_event_handler_t)(snd_seq_event_t *ev, snd_gus_port_t *p, snd_gus_voice_t *v);
-
+typedef void (gus_sample_event_handler_t)(struct snd_seq_event *ev,
+					  struct snd_gus_port *p,
+					  struct snd_gus_voice *v);
 static gus_sample_event_handler_t *gus_sample_event_handlers[9] = {
 	event_sample,
 	event_cluster,
@@ -131,11 +141,11 @@ static gus_sample_event_handler_t *gus_sample_event_handlers[9] = {
 	event_private1
 };
 
-void snd_gus_sample_event(snd_seq_event_t *ev, snd_gus_port_t *p)
+void snd_gus_sample_event(struct snd_seq_event *ev, struct snd_gus_port *p)
 {
 	int idx, voice;
-	snd_gus_card_t *gus = p->gus;
-	snd_gus_voice_t *v;
+	struct snd_gus_card *gus = p->gus;
+	struct snd_gus_voice *v;
 	unsigned long flags;
 	
 	idx = ev->type - SNDRV_SEQ_EVENT_SAMPLE;
diff --git a/sound/isa/gus/gus_simple.c b/sound/isa/gus/gus_simple.c
index dfed85b58b3..dcad6ed0198 100644
--- a/sound/isa/gus/gus_simple.c
+++ b/sound/isa/gus/gus_simple.c
@@ -29,19 +29,19 @@
  *
  */
 
-static void interrupt_wave(snd_gus_card_t *gus, snd_gus_voice_t *voice);
-static void interrupt_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice);
-static void interrupt_effect(snd_gus_card_t *gus, snd_gus_voice_t *voice);
-
-static void sample_start(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_position_t position);
-static void sample_stop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_stop_mode_t mode);
-static void sample_freq(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_frequency_t freq);
-static void sample_volume(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_ev_volume_t *volume);
-static void sample_loop(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_ev_loop_t *loop);
-static void sample_pos(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_position_t position);
-static void sample_private1(snd_gus_card_t *card, snd_gus_voice_t *voice, unsigned char *data);
-
-static snd_gus_sample_ops_t sample_ops = {
+static void interrupt_wave(struct snd_gus_card *gus, struct snd_gus_voice *voice);
+static void interrupt_volume(struct snd_gus_card *gus, struct snd_gus_voice *voice);
+static void interrupt_effect(struct snd_gus_card *gus, struct snd_gus_voice *voice);
+
+static void sample_start(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_position_t position);
+static void sample_stop(struct snd_gus_card *gus, struct snd_gus_voice *voice, int mode);
+static void sample_freq(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_frequency_t freq);
+static void sample_volume(struct snd_gus_card *card, struct snd_gus_voice *voice, struct snd_seq_ev_volume *volume);
+static void sample_loop(struct snd_gus_card *card, struct snd_gus_voice *voice, struct snd_seq_ev_loop *loop);
+static void sample_pos(struct snd_gus_card *card, struct snd_gus_voice *voice, snd_seq_position_t position);
+static void sample_private1(struct snd_gus_card *card, struct snd_gus_voice *voice, unsigned char *data);
+
+static struct snd_gus_sample_ops sample_ops = {
 	sample_start,
 	sample_stop,
 	sample_freq,
@@ -53,13 +53,13 @@ static snd_gus_sample_ops_t sample_ops = {
 
 #if 0
 
-static void note_stop(snd_gus_card_t *gus, snd_gus_voice_t *voice, int wait);
-static void note_wait(snd_gus_card_t *gus, snd_gus_voice_t *voice);
-static void note_off(snd_gus_card_t *gus, snd_gus_voice_t *voice);
-static void note_volume(snd_gus_card_t *card, snd_gus_voice_t *voice);
-static void note_pitchbend(snd_gus_card_t *card, snd_gus_voice_t *voice);
-static void note_vibrato(snd_gus_card_t *card, snd_gus_voice_t *voice);
-static void note_tremolo(snd_gus_card_t *card, snd_gus_voice_t *voice);
+static void note_stop(struct snd_gus_card *gus, struct snd_gus_voice *voice, int wait);
+static void note_wait(struct snd_gus_card *gus, struct snd_gus_voice *voice);
+static void note_off(struct snd_gus_card *gus, struct snd_gus_voice *voice);
+static void note_volume(struct snd_gus_card *card, struct snd_gus_voice *voice);
+static void note_pitchbend(struct snd_gus_card *card, struct snd_gus_voice *voice);
+static void note_vibrato(struct snd_gus_card *card, struct snd_gus_voice *voice);
+static void note_tremolo(struct snd_gus_card *card, struct snd_gus_voice *voice);
 
 static struct snd_gus_note_handlers note_commands = {
 	note_stop,
@@ -71,7 +71,7 @@ static struct snd_gus_note_handlers note_commands = {
 	note_tremolo
 };
 
-static void chn_trigger_down(snd_gus_card_t *card, ultra_channel_t *channel, ultra_instrument_t *instrument, unsigned char note, unsigned char velocity, unsigned char priority );
+static void chn_trigger_down(struct snd_gus_card *card, ultra_channel_t *channel, ultra_instrument_t *instrument, unsigned char note, unsigned char velocity, unsigned char priority );
 static void chn_trigger_up( ultra_card_t *card, ultra_note_t *note );
 static void chn_control( ultra_card_t *card, ultra_channel_t *channel, unsigned short p1, unsigned short p2 );
 
@@ -83,14 +83,14 @@ static struct ULTRA_STRU_INSTRUMENT_CHANNEL_COMMANDS channel_commands = {
 
 #endif
 
-static void do_volume_envelope(snd_gus_card_t *card, snd_gus_voice_t *voice);
-static void do_pan_envelope(snd_gus_card_t *card, snd_gus_voice_t *voice);
+static void do_volume_envelope(struct snd_gus_card *card, struct snd_gus_voice *voice);
+static void do_pan_envelope(struct snd_gus_card *card, struct snd_gus_voice *voice);
 
 /*
  *
  */
 
-static void interrupt_wave(snd_gus_card_t *gus, snd_gus_voice_t *voice)
+static void interrupt_wave(struct snd_gus_card *gus, struct snd_gus_voice *voice)
 {
 	spin_lock(&gus->event_lock);
 	snd_gf1_stop_voice(gus, voice->number);
@@ -102,7 +102,7 @@ static void interrupt_wave(snd_gus_card_t *gus, snd_gus_voice_t *voice)
 	spin_unlock(&gus->event_lock);
 }
 
-static void interrupt_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice)
+static void interrupt_volume(struct snd_gus_card *gus, struct snd_gus_voice *voice)
 {
 	spin_lock(&gus->event_lock);
 	if (voice->flags & SNDRV_GF1_VFLG_RUNNING)
@@ -112,7 +112,7 @@ static void interrupt_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice)
 	spin_unlock(&gus->event_lock);
 }
 
-static void interrupt_effect(snd_gus_card_t *gus, snd_gus_voice_t *voice)
+static void interrupt_effect(struct snd_gus_card *gus, struct snd_gus_voice *voice)
 {
 	spin_lock(&gus->event_lock);
 	if ((voice->flags & (SNDRV_GF1_VFLG_RUNNING|SNDRV_GF1_VFLG_EFFECT_TIMER1)) ==
@@ -125,7 +125,7 @@ static void interrupt_effect(snd_gus_card_t *gus, snd_gus_voice_t *voice)
  *
  */
 
-static void do_volume_envelope(snd_gus_card_t *gus, snd_gus_voice_t *voice)
+static void do_volume_envelope(struct snd_gus_card *gus, struct snd_gus_voice *voice)
 {
 	unsigned short next, rate, old_volume;
 	int program_next_ramp;
@@ -229,7 +229,7 @@ static void do_volume_envelope(snd_gus_card_t *gus, snd_gus_voice_t *voice)
 	}
 }
 
-static void do_pan_envelope(snd_gus_card_t *gus, snd_gus_voice_t *voice)
+static void do_pan_envelope(struct snd_gus_card *gus, struct snd_gus_voice *voice)
 {
 	unsigned long flags;
 	unsigned char old_pan;
@@ -276,7 +276,7 @@ static void do_pan_envelope(snd_gus_card_t *gus, snd_gus_voice_t *voice)
 #endif
 }
 
-static void set_enhanced_pan(snd_gus_card_t *gus, snd_gus_voice_t *voice, unsigned short pan)
+static void set_enhanced_pan(struct snd_gus_card *gus, struct snd_gus_voice *voice, unsigned short pan)
 {
 	unsigned long flags;
 	unsigned short vlo, vro;
@@ -307,13 +307,13 @@ static void set_enhanced_pan(snd_gus_card_t *gus, snd_gus_voice_t *voice, unsign
  *
  */
 
-static void sample_start(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_position_t position)
+static void sample_start(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_position_t position)
 {
 	unsigned long flags;
 	unsigned int begin, addr, addr_end, addr_start;
 	int w_16;
-	simple_instrument_t *simple;
-	snd_seq_kinstr_t *instr;
+	struct simple_instrument *simple;
+	struct snd_seq_kinstr *instr;
 
 	instr = snd_seq_instr_find(gus->gf1.ilist, &voice->instr, 0, 1);
 	if (instr == NULL)
@@ -397,7 +397,7 @@ static void sample_start(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_po
 	snd_seq_instr_free_use(gus->gf1.ilist, instr);
 }
 
-static void sample_stop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_stop_mode_t mode)
+static void sample_stop(struct snd_gus_card *gus, struct snd_gus_voice *voice, int mode)
 {
 	unsigned char control;
 	unsigned long flags;
@@ -433,7 +433,7 @@ static void sample_stop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_sto
 	}
 }
 
-static void sample_freq(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_frequency_t freq)
+static void sample_freq(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_frequency_t freq)
 {
 	unsigned long flags;
 
@@ -444,7 +444,7 @@ static void sample_freq(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_fre
 	spin_unlock_irqrestore(&gus->reg_lock, flags);
 }
 
-static void sample_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_ev_volume_t *volume)
+static void sample_volume(struct snd_gus_card *gus, struct snd_gus_voice *voice, struct snd_seq_ev_volume *volume)
 {
 	if (volume->volume >= 0) {
 		volume->volume &= 0x3fff;
@@ -471,13 +471,13 @@ static void sample_volume(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_e
 	}
 }
 
-static void sample_loop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_ev_loop_t *loop)
+static void sample_loop(struct snd_gus_card *gus, struct snd_gus_voice *voice, struct snd_seq_ev_loop *loop)
 {
 	unsigned long flags;
 	int w_16 = voice->control & 0x04;
 	unsigned int begin, addr_start, addr_end;
-	simple_instrument_t *simple;
-	snd_seq_kinstr_t *instr;
+	struct simple_instrument *simple;
+	struct snd_seq_kinstr *instr;
 
 #if 0
 	printk("voice_loop: start = 0x%x, end = 0x%x\n", loop->start, loop->end);
@@ -500,13 +500,13 @@ static void sample_loop(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_ev_
 	snd_seq_instr_free_use(gus->gf1.ilist, instr);
 }
 
-static void sample_pos(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_position_t position)
+static void sample_pos(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_position_t position)
 {
 	unsigned long flags;
 	int w_16 = voice->control & 0x04;
 	unsigned int begin, addr;
-	simple_instrument_t *simple;
-	snd_seq_kinstr_t *instr;
+	struct simple_instrument *simple;
+	struct snd_seq_kinstr *instr;
 
 #if 0
 	printk("voice_loop: start = 0x%x, end = 0x%x\n", loop->start, loop->end);
@@ -537,7 +537,7 @@ static unsigned char get_effects_mask( ultra_card_t *card, int value )
 
 #endif
 
-static void sample_private1(snd_gus_card_t *card, snd_gus_voice_t *voice, unsigned char *data)
+static void sample_private1(struct snd_gus_card *card, struct snd_gus_voice *voice, unsigned char *data)
 {
 #if 0
   unsigned long flags;
@@ -624,7 +624,7 @@ static void chn_control( ultra_card_t *card, ultra_channel_t *channel, unsigned
  
 #endif
 
-void snd_gf1_simple_init(snd_gus_voice_t *voice)
+void snd_gf1_simple_init(struct snd_gus_voice *voice)
 {
 	voice->handler_wave = interrupt_wave;
 	voice->handler_volume = interrupt_volume;
diff --git a/sound/isa/gus/gus_synth.c b/sound/isa/gus/gus_synth.c
index f51c386ee19..9c7d6986f62 100644
--- a/sound/isa/gus/gus_synth.c
+++ b/sound/isa/gus/gus_synth.c
@@ -34,10 +34,10 @@ MODULE_LICENSE("GPL");
  *
  */
 
-static void snd_gus_synth_free_voices(snd_gus_card_t * gus, int client, int port)
+static void snd_gus_synth_free_voices(struct snd_gus_card * gus, int client, int port)
 {
 	int idx;
-	snd_gus_voice_t * voice;
+	struct snd_gus_voice * voice;
 	
 	for (idx = 0; idx < 32; idx++) {
 		voice = &gus->gf1.voices[idx];
@@ -46,11 +46,11 @@ static void snd_gus_synth_free_voices(snd_gus_card_t * gus, int client, int port
 	}
 }
 
-static int snd_gus_synth_use(void *private_data, snd_seq_port_subscribe_t *info)
+static int snd_gus_synth_use(void *private_data, struct snd_seq_port_subscribe *info)
 {
-	snd_gus_port_t * port = (snd_gus_port_t *)private_data;
-	snd_gus_card_t * gus = port->gus;
-	snd_gus_voice_t * voice;
+	struct snd_gus_port * port = private_data;
+	struct snd_gus_card * gus = port->gus;
+	struct snd_gus_voice * voice;
 	unsigned int idx;
 
 	if (info->voices > 32)
@@ -74,10 +74,10 @@ static int snd_gus_synth_use(void *private_data, snd_seq_port_subscribe_t *info)
 	return 0;
 }
 
-static int snd_gus_synth_unuse(void *private_data, snd_seq_port_subscribe_t *info)
+static int snd_gus_synth_unuse(void *private_data, struct snd_seq_port_subscribe *info)
 {
-	snd_gus_port_t * port = (snd_gus_port_t *)private_data;
-	snd_gus_card_t * gus = port->gus;
+	struct snd_gus_port * port = private_data;
+	struct snd_gus_card * gus = port->gus;
 
 	down(&gus->register_mutex);
 	snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port);
@@ -90,19 +90,19 @@ static int snd_gus_synth_unuse(void *private_data, snd_seq_port_subscribe_t *inf
  *
  */
 
-static void snd_gus_synth_free_private_instruments(snd_gus_port_t *p, int client)
+static void snd_gus_synth_free_private_instruments(struct snd_gus_port *p, int client)
 {
-	snd_seq_instr_header_t ifree;
+	struct snd_seq_instr_header ifree;
 
 	memset(&ifree, 0, sizeof(ifree));
 	ifree.cmd = SNDRV_SEQ_INSTR_FREE_CMD_PRIVATE;
 	snd_seq_instr_list_free_cond(p->gus->gf1.ilist, &ifree, client, 0);
 }
  
-static int snd_gus_synth_event_input(snd_seq_event_t *ev, int direct,
+static int snd_gus_synth_event_input(struct snd_seq_event *ev, int direct,
 				     void *private_data, int atomic, int hop)
 {
-	snd_gus_port_t * p = (snd_gus_port_t *) private_data;
+	struct snd_gus_port * p = private_data;
 	
 	snd_assert(p != NULL, return -EINVAL);
 	if (ev->type >= SNDRV_SEQ_EVENT_SAMPLE &&
@@ -131,12 +131,12 @@ static int snd_gus_synth_event_input(snd_seq_event_t *ev, int direct,
 }
 
 static void snd_gus_synth_instr_notify(void *private_data,
-				       snd_seq_kinstr_t *instr,
+				       struct snd_seq_kinstr *instr,
 				       int what)
 {
 	unsigned int idx;
-	snd_gus_card_t *gus = private_data;
-	snd_gus_voice_t *pvoice;
+	struct snd_gus_card *gus = private_data;
+	struct snd_gus_voice *pvoice;
 	unsigned long flags;
 	
 	spin_lock_irqsave(&gus->event_lock, flags);
@@ -160,16 +160,16 @@ static void snd_gus_synth_instr_notify(void *private_data,
 
 static void snd_gus_synth_free_port(void *private_data)
 {
-	snd_gus_port_t * p = (snd_gus_port_t *)private_data;
+	struct snd_gus_port * p = private_data;
 	
 	if (p)
 		snd_midi_channel_free_set(p->chset);
 }
 
-static int snd_gus_synth_create_port(snd_gus_card_t * gus, int idx)
+static int snd_gus_synth_create_port(struct snd_gus_card * gus, int idx)
 {
-	snd_gus_port_t * p;
-	snd_seq_port_callback_t callbacks;
+	struct snd_gus_port * p;
+	struct snd_seq_port_callback callbacks;
 	char name[32];
 	int result;
 	
@@ -210,18 +210,18 @@ static int snd_gus_synth_create_port(snd_gus_card_t * gus, int idx)
  *
  */
 
-static int snd_gus_synth_new_device(snd_seq_device_t *dev)
+static int snd_gus_synth_new_device(struct snd_seq_device *dev)
 {
-	snd_gus_card_t *gus;
+	struct snd_gus_card *gus;
 	int client, i;
-	snd_seq_client_callback_t callbacks;
-	snd_seq_client_info_t *cinfo;
-	snd_seq_port_subscribe_t sub;
-	snd_iwffff_ops_t *iwops;
-	snd_gf1_ops_t *gf1ops;
-	snd_simple_ops_t *simpleops;
-
-	gus = *(snd_gus_card_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev);
+	struct snd_seq_client_callback callbacks;
+	struct snd_seq_client_info *cinfo;
+	struct snd_seq_port_subscribe sub;
+	struct snd_iwffff_ops *iwops;
+	struct snd_gf1_ops *gf1ops;
+	struct snd_simple_ops *simpleops;
+
+	gus = *(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
 	if (gus == NULL)
 		return -EINVAL;
 
@@ -293,11 +293,11 @@ static int snd_gus_synth_new_device(snd_seq_device_t *dev)
 	return 0;
 }
 
-static int snd_gus_synth_delete_device(snd_seq_device_t *dev)
+static int snd_gus_synth_delete_device(struct snd_seq_device *dev)
 {
-	snd_gus_card_t *gus;
+	struct snd_gus_card *gus;
 
-	gus = *(snd_gus_card_t**)SNDRV_SEQ_DEVICE_ARGPTR(dev);
+	gus = *(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
 	if (gus == NULL)
 		return -EINVAL;
 
@@ -312,13 +312,13 @@ static int snd_gus_synth_delete_device(snd_seq_device_t *dev)
 
 static int __init alsa_gus_synth_init(void)
 {
-	static snd_seq_dev_ops_t ops = {
+	static struct snd_seq_dev_ops ops = {
 		snd_gus_synth_new_device,
 		snd_gus_synth_delete_device
 	};
 
 	return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_GUS, &ops,
-					      sizeof(snd_gus_card_t*));
+					      sizeof(struct snd_gus_card *));
 }
 
 static void __exit alsa_gus_synth_exit(void)
diff --git a/sound/isa/gus/gus_timer.c b/sound/isa/gus/gus_timer.c
index 9876603ff6c..a43b662f17c 100644
--- a/sound/isa/gus/gus_timer.c
+++ b/sound/isa/gus/gus_timer.c
@@ -30,12 +30,12 @@
  *  Timer 1 - 80us
  */
 
-static int snd_gf1_timer1_start(snd_timer_t * timer)
+static int snd_gf1_timer1_start(struct snd_timer * timer)
 {
 	unsigned long flags;
 	unsigned char tmp;
 	unsigned int ticks;
-	snd_gus_card_t *gus;
+	struct snd_gus_card *gus;
 
 	gus = snd_timer_chip(timer);
 	spin_lock_irqsave(&gus->reg_lock, flags);
@@ -48,11 +48,11 @@ static int snd_gf1_timer1_start(snd_timer_t * timer)
 	return 0;
 }
 
-static int snd_gf1_timer1_stop(snd_timer_t * timer)
+static int snd_gf1_timer1_stop(struct snd_timer * timer)
 {
 	unsigned long flags;
 	unsigned char tmp;
-	snd_gus_card_t *gus;
+	struct snd_gus_card *gus;
 
 	gus = snd_timer_chip(timer);
 	spin_lock_irqsave(&gus->reg_lock, flags);
@@ -66,12 +66,12 @@ static int snd_gf1_timer1_stop(snd_timer_t * timer)
  *  Timer 2 - 320us
  */
 
-static int snd_gf1_timer2_start(snd_timer_t * timer)
+static int snd_gf1_timer2_start(struct snd_timer * timer)
 {
 	unsigned long flags;
 	unsigned char tmp;
 	unsigned int ticks;
-	snd_gus_card_t *gus;
+	struct snd_gus_card *gus;
 
 	gus = snd_timer_chip(timer);
 	spin_lock_irqsave(&gus->reg_lock, flags);
@@ -84,11 +84,11 @@ static int snd_gf1_timer2_start(snd_timer_t * timer)
 	return 0;
 }
 
-static int snd_gf1_timer2_stop(snd_timer_t * timer)
+static int snd_gf1_timer2_stop(struct snd_timer * timer)
 {
 	unsigned long flags;
 	unsigned char tmp;
-	snd_gus_card_t *gus;
+	struct snd_gus_card *gus;
 
 	gus = snd_timer_chip(timer);
 	spin_lock_irqsave(&gus->reg_lock, flags);
@@ -102,18 +102,18 @@ static int snd_gf1_timer2_stop(snd_timer_t * timer)
 
  */
 
-static void snd_gf1_interrupt_timer1(snd_gus_card_t * gus)
+static void snd_gf1_interrupt_timer1(struct snd_gus_card * gus)
 {
-	snd_timer_t *timer = gus->gf1.timer1;
+	struct snd_timer *timer = gus->gf1.timer1;
 
 	if (timer == NULL)
 		return;
 	snd_timer_interrupt(timer, timer->sticks);
 }
 
-static void snd_gf1_interrupt_timer2(snd_gus_card_t * gus)
+static void snd_gf1_interrupt_timer2(struct snd_gus_card * gus)
 {
-	snd_timer_t *timer = gus->gf1.timer2;
+	struct snd_timer *timer = gus->gf1.timer2;
 
 	if (timer == NULL)
 		return;
@@ -124,7 +124,7 @@ static void snd_gf1_interrupt_timer2(snd_gus_card_t * gus)
 
  */
 
-static struct _snd_timer_hardware snd_gf1_timer1 =
+static struct snd_timer_hardware snd_gf1_timer1 =
 {
 	.flags =	SNDRV_TIMER_HW_STOP,
 	.resolution =	80000,
@@ -133,7 +133,7 @@ static struct _snd_timer_hardware snd_gf1_timer1 =
 	.stop =		snd_gf1_timer1_stop,
 };
 
-static struct _snd_timer_hardware snd_gf1_timer2 =
+static struct snd_timer_hardware snd_gf1_timer2 =
 {
 	.flags =	SNDRV_TIMER_HW_STOP,
 	.resolution =	320000,
@@ -142,22 +142,22 @@ static struct _snd_timer_hardware snd_gf1_timer2 =
 	.stop =		snd_gf1_timer2_stop,
 };
 
-static void snd_gf1_timer1_free(snd_timer_t *timer)
+static void snd_gf1_timer1_free(struct snd_timer *timer)
 {
-	snd_gus_card_t *gus = timer->private_data;
+	struct snd_gus_card *gus = timer->private_data;
 	gus->gf1.timer1 = NULL;
 }
 
-static void snd_gf1_timer2_free(snd_timer_t *timer)
+static void snd_gf1_timer2_free(struct snd_timer *timer)
 {
-	snd_gus_card_t *gus = timer->private_data;
+	struct snd_gus_card *gus = timer->private_data;
 	gus->gf1.timer2 = NULL;
 }
 
-void snd_gf1_timers_init(snd_gus_card_t * gus)
+void snd_gf1_timers_init(struct snd_gus_card * gus)
 {
-	snd_timer_t *timer;
-	snd_timer_id_t tid;
+	struct snd_timer *timer;
+	struct snd_timer_id tid;
 
 	if (gus->gf1.timer1 != NULL || gus->gf1.timer2 != NULL)
 		return;
@@ -190,7 +190,7 @@ void snd_gf1_timers_init(snd_gus_card_t * gus)
 	gus->gf1.timer2 = timer;
 }
 
-void snd_gf1_timers_done(snd_gus_card_t * gus)
+void snd_gf1_timers_done(struct snd_gus_card * gus)
 {
 	snd_gf1_set_default_handlers(gus, SNDRV_GF1_HANDLER_TIMER1 | SNDRV_GF1_HANDLER_TIMER2);
 	if (gus->gf1.timer1) {
diff --git a/sound/isa/gus/gus_uart.c b/sound/isa/gus/gus_uart.c
index fbc95e99105..654290a8b21 100644
--- a/sound/isa/gus/gus_uart.c
+++ b/sound/isa/gus/gus_uart.c
@@ -26,7 +26,7 @@
 #include <sound/core.h>
 #include <sound/gus.h>
 
-static void snd_gf1_interrupt_midi_in(snd_gus_card_t * gus)
+static void snd_gf1_interrupt_midi_in(struct snd_gus_card * gus)
 {
 	int count;
 	unsigned char stat, data, byte;
@@ -61,7 +61,7 @@ static void snd_gf1_interrupt_midi_in(snd_gus_card_t * gus)
 	}
 }
 
-static void snd_gf1_interrupt_midi_out(snd_gus_card_t * gus)
+static void snd_gf1_interrupt_midi_out(struct snd_gus_card * gus)
 {
 	char byte;
 	unsigned long flags;
@@ -81,7 +81,7 @@ static void snd_gf1_interrupt_midi_out(snd_gus_card_t * gus)
 	spin_unlock_irqrestore(&gus->uart_cmd_lock, flags);
 }
 
-static void snd_gf1_uart_reset(snd_gus_card_t * gus, int close)
+static void snd_gf1_uart_reset(struct snd_gus_card * gus, int close)
 {
 	snd_gf1_uart_cmd(gus, 0x03);	/* reset */
 	if (!close && gus->uart_enable) {
@@ -90,10 +90,10 @@ static void snd_gf1_uart_reset(snd_gus_card_t * gus, int close)
 	}
 }
 
-static int snd_gf1_uart_output_open(snd_rawmidi_substream_t * substream)
+static int snd_gf1_uart_output_open(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
-	snd_gus_card_t *gus;
+	struct snd_gus_card *gus;
 
 	gus = substream->rmidi->private_data;
 	spin_lock_irqsave(&gus->uart_cmd_lock, flags);
@@ -109,10 +109,10 @@ static int snd_gf1_uart_output_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_gf1_uart_input_open(snd_rawmidi_substream_t * substream)
+static int snd_gf1_uart_input_open(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
-	snd_gus_card_t *gus;
+	struct snd_gus_card *gus;
 	int i;
 
 	gus = substream->rmidi->private_data;
@@ -136,10 +136,10 @@ static int snd_gf1_uart_input_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_gf1_uart_output_close(snd_rawmidi_substream_t * substream)
+static int snd_gf1_uart_output_close(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
-	snd_gus_card_t *gus;
+	struct snd_gus_card *gus;
 
 	gus = substream->rmidi->private_data;
 	spin_lock_irqsave(&gus->uart_cmd_lock, flags);
@@ -151,10 +151,10 @@ static int snd_gf1_uart_output_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_gf1_uart_input_close(snd_rawmidi_substream_t * substream)
+static int snd_gf1_uart_input_close(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
-	snd_gus_card_t *gus;
+	struct snd_gus_card *gus;
 
 	gus = substream->rmidi->private_data;
 	spin_lock_irqsave(&gus->uart_cmd_lock, flags);
@@ -166,9 +166,9 @@ static int snd_gf1_uart_input_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static void snd_gf1_uart_input_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_gf1_uart_input_trigger(struct snd_rawmidi_substream *substream, int up)
 {
-	snd_gus_card_t *gus;
+	struct snd_gus_card *gus;
 	unsigned long flags;
 
 	gus = substream->rmidi->private_data;
@@ -184,10 +184,10 @@ static void snd_gf1_uart_input_trigger(snd_rawmidi_substream_t * substream, int
 	spin_unlock_irqrestore(&gus->uart_cmd_lock, flags);
 }
 
-static void snd_gf1_uart_output_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_gf1_uart_output_trigger(struct snd_rawmidi_substream *substream, int up)
 {
 	unsigned long flags;
-	snd_gus_card_t *gus;
+	struct snd_gus_card *gus;
 	char byte;
 	int timeout;
 
@@ -222,23 +222,23 @@ static void snd_gf1_uart_output_trigger(snd_rawmidi_substream_t * substream, int
 	spin_unlock_irqrestore(&gus->uart_cmd_lock, flags);
 }
 
-static snd_rawmidi_ops_t snd_gf1_uart_output =
+static struct snd_rawmidi_ops snd_gf1_uart_output =
 {
 	.open =		snd_gf1_uart_output_open,
 	.close =	snd_gf1_uart_output_close,
 	.trigger =	snd_gf1_uart_output_trigger,
 };
 
-static snd_rawmidi_ops_t snd_gf1_uart_input =
+static struct snd_rawmidi_ops snd_gf1_uart_input =
 {
 	.open =		snd_gf1_uart_input_open,
 	.close =	snd_gf1_uart_input_close,
 	.trigger =	snd_gf1_uart_input_trigger,
 };
 
-int snd_gf1_rawmidi_new(snd_gus_card_t * gus, int device, snd_rawmidi_t ** rrawmidi)
+int snd_gf1_rawmidi_new(struct snd_gus_card * gus, int device, struct snd_rawmidi ** rrawmidi)
 {
-	snd_rawmidi_t *rmidi;
+	struct snd_rawmidi *rmidi;
 	int err;
 
 	if (rrawmidi)
diff --git a/sound/isa/gus/gus_volume.c b/sound/isa/gus/gus_volume.c
index b3382fec529..dbbc0a6d765 100644
--- a/sound/isa/gus/gus_volume.c
+++ b/sound/isa/gus/gus_volume.c
@@ -72,7 +72,7 @@ unsigned int snd_gf1_gvol_to_lvol_raw(unsigned short gf1_vol)
 	return rvol | (m >> (8 - e));
 }
 
-unsigned int snd_gf1_calc_ramp_rate(snd_gus_card_t * gus,
+unsigned int snd_gf1_calc_ramp_rate(struct snd_gus_card * gus,
 				    unsigned short start,
 				    unsigned short end,
 				    unsigned int us)
@@ -112,7 +112,7 @@ unsigned int snd_gf1_calc_ramp_rate(snd_gus_card_t * gus,
 
 #endif  /*  0  */
 
-unsigned short snd_gf1_translate_freq(snd_gus_card_t * gus, unsigned int freq16)
+unsigned short snd_gf1_translate_freq(struct snd_gus_card * gus, unsigned int freq16)
 {
 	freq16 >>= 3;
 	if (freq16 < 50)
diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c
index 39cef38835c..6db484f7136 100644
--- a/sound/isa/gus/gusclassic.c
+++ b/sound/isa/gus/gusclassic.c
@@ -70,11 +70,11 @@ MODULE_PARM_DESC(channels, "GF1 channels for GUS Classic driver.");
 module_param_array(pcm_channels, int, NULL, 0444);
 MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Classic driver.");
 
-static snd_card_t *snd_gusclassic_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_gusclassic_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
 #define PFX	"gusclassic: "
 
-static int __init snd_gusclassic_detect(snd_gus_card_t * gus)
+static int __init snd_gusclassic_detect(struct snd_gus_card * gus)
 {
 	unsigned char d;
 
@@ -93,7 +93,7 @@ static int __init snd_gusclassic_detect(snd_gus_card_t * gus)
 	return 0;
 }
 
-static void __init snd_gusclassic_init(int dev, snd_gus_card_t * gus)
+static void __init snd_gusclassic_init(int dev, struct snd_gus_card * gus)
 {
 	gus->equal_irq = 0;
 	gus->codec_flag = 0;
@@ -106,9 +106,9 @@ static int __init snd_gusclassic_probe(int dev)
 	static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, 4, -1};
 	static int possible_dmas[] = {5, 6, 7, 1, 3, -1};
 	int xirq, xdma1, xdma2;
-	snd_card_t *card;
+	struct snd_card *card;
 	struct snd_gusclassic *guscard;
-	snd_gus_card_t *gus = NULL;
+	struct snd_gus_card *gus = NULL;
 	int err;
 
 	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c
index d2e7cb1df53..9be59d50133 100644
--- a/sound/isa/gus/gusextreme.c
+++ b/sound/isa/gus/gusextreme.c
@@ -85,14 +85,14 @@ MODULE_PARM_DESC(channels, "GF1 channels for GUS Extreme driver.");
 module_param_array(pcm_channels, int, NULL, 0444);
 MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Extreme driver.");
 
-static snd_card_t *snd_gusextreme_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_gusextreme_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
 #define PFX	"gusextreme: "
 
 static int __init snd_gusextreme_detect(int dev,
-					snd_card_t * card,
-					snd_gus_card_t * gus,
-					es1688_t *es1688)
+					struct snd_card *card,
+					struct snd_gus_card * gus,
+					struct snd_es1688 *es1688)
 {
 	unsigned long flags;
 	unsigned char d;
@@ -139,15 +139,15 @@ static int __init snd_gusextreme_detect(int dev,
 	return 0;
 }
 
-static void __init snd_gusextreme_init(int dev, snd_gus_card_t * gus)
+static void __init snd_gusextreme_init(int dev, struct snd_gus_card * gus)
 {
 	gus->joystick_dac = joystick_dac[dev];
 }
 
-static int __init snd_gusextreme_mixer(es1688_t *chip)
+static int __init snd_gusextreme_mixer(struct snd_es1688 *chip)
 {
-	snd_card_t *card = chip->card;
-	snd_ctl_elem_id_t id1, id2;
+	struct snd_card *card = chip->card;
+	struct snd_ctl_elem_id id1, id2;
 	int err;
 
 	memset(&id1, 0, sizeof(id1));
@@ -173,11 +173,11 @@ static int __init snd_gusextreme_probe(int dev)
 	static int possible_gf1_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
 	static int possible_gf1_dmas[] = {5, 6, 7, 1, 3, -1};
 	int xgf1_irq, xgf1_dma, xess_irq, xmpu_irq, xess_dma;
-	snd_card_t *card;
+	struct snd_card *card;
 	struct snd_gusextreme *acard;
-	snd_gus_card_t *gus;
-	es1688_t *es1688;
-	opl3_t *opl3;
+	struct snd_gus_card *gus;
+	struct snd_es1688 *es1688;
+	struct snd_opl3 *opl3;
 	int err;
 
 	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
@@ -345,7 +345,7 @@ static int __init alsa_card_gusextreme_init(void)
 static void __exit alsa_card_gusextreme_exit(void)
 {
 	int idx;
-	snd_card_t *card;
+	struct snd_card *card;
 	struct snd_gusextreme *acard;
 
 	for (idx = 0; idx < SNDRV_CARDS; idx++) {
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
index 0bb44b51934..63311cdb4a1 100644
--- a/sound/isa/gus/gusmax.c
+++ b/sound/isa/gus/gusmax.c
@@ -73,18 +73,18 @@ MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS MAX driver.");
 
 struct snd_gusmax {
 	int irq;
-	snd_card_t *card;
-	snd_gus_card_t *gus;
-	cs4231_t *cs4231;
+	struct snd_card *card;
+	struct snd_gus_card *gus;
+	struct snd_cs4231 *cs4231;
 	unsigned short gus_status_reg;
 	unsigned short pcm_status_reg;
 };
 
-static snd_card_t *snd_gusmax_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_gusmax_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
 #define PFX	"gusmax: "
 
-static int __init snd_gusmax_detect(snd_gus_card_t * gus)
+static int __init snd_gusmax_detect(struct snd_gus_card * gus)
 {
 	unsigned char d;
 
@@ -126,7 +126,7 @@ static irqreturn_t snd_gusmax_interrupt(int irq, void *dev_id, struct pt_regs *r
 	return IRQ_RETVAL(handled);
 }
 
-static void __init snd_gusmax_init(int dev, snd_card_t * card, snd_gus_card_t * gus)
+static void __init snd_gusmax_init(int dev, struct snd_card *card, struct snd_gus_card * gus)
 {
 	gus->equal_irq = 1;
 	gus->codec_flag = 1;
@@ -144,10 +144,10 @@ static void __init snd_gusmax_init(int dev, snd_card_t * card, snd_gus_card_t *
 #define CS4231_PRIVATE( left, right, shift, mute ) \
 			((left << 24)|(right << 16)|(shift<<8)|mute)
 
-static int __init snd_gusmax_mixer(cs4231_t *chip)
+static int __init snd_gusmax_mixer(struct snd_cs4231 *chip)
 {
-	snd_card_t *card = chip->card;
-	snd_ctl_elem_id_t id1, id2;
+	struct snd_card *card = chip->card;
+	struct snd_ctl_elem_id id1, id2;
 	int err;
 	
 	memset(&id1, 0, sizeof(id1));
@@ -193,7 +193,7 @@ static int __init snd_gusmax_mixer(cs4231_t *chip)
 	return 0;
 }
 
-static void snd_gusmax_free(snd_card_t *card)
+static void snd_gusmax_free(struct snd_card *card)
 {
 	struct snd_gusmax *maxcard = (struct snd_gusmax *)card->private_data;
 	
@@ -208,9 +208,9 @@ static int __init snd_gusmax_probe(int dev)
 	static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
 	static int possible_dmas[] = {5, 6, 7, 1, 3, -1};
 	int xirq, xdma1, xdma2, err;
-	snd_card_t *card;
-	snd_gus_card_t *gus = NULL;
-	cs4231_t *cs4231;
+	struct snd_card *card;
+	struct snd_gus_card *gus = NULL;
+	struct snd_cs4231 *cs4231;
 	struct snd_gusmax *maxcard;
 
 	card = snd_card_new(index[dev], id[dev], THIS_MODULE,
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
index f703a9f4257..f2e9c507354 100644
--- a/sound/isa/gus/interwave.c
+++ b/sound/isa/gus/interwave.c
@@ -112,9 +112,9 @@ MODULE_PARM_DESC(effect, "Effects enable for InterWave driver.");
 
 struct snd_interwave {
 	int irq;
-	snd_card_t *card;
-	snd_gus_card_t *gus;
-	cs4231_t *cs4231;
+	struct snd_card *card;
+	struct snd_gus_card *gus;
+	struct snd_cs4231 *cs4231;
 #ifdef SNDRV_STB
 	struct resource *i2c_res;
 #endif
@@ -128,7 +128,7 @@ struct snd_interwave {
 #endif
 };
 
-static snd_card_t *snd_interwave_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_interwave_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
 #ifdef CONFIG_PNP
 
@@ -160,7 +160,7 @@ MODULE_DEVICE_TABLE(pnp_card, snd_interwave_pnpids);
 
 
 #ifdef SNDRV_STB
-static void snd_interwave_i2c_setlines(snd_i2c_bus_t *bus, int ctrl, int data)
+static void snd_interwave_i2c_setlines(struct snd_i2c_bus *bus, int ctrl, int data)
 {
 	unsigned long port = bus->private_value;
 
@@ -171,7 +171,7 @@ static void snd_interwave_i2c_setlines(snd_i2c_bus_t *bus, int ctrl, int data)
 	udelay(10);
 }
 
-static int snd_interwave_i2c_getclockline(snd_i2c_bus_t *bus)
+static int snd_interwave_i2c_getclockline(struct snd_i2c_bus *bus)
 {
 	unsigned long port = bus->private_value;
 	unsigned char res;
@@ -183,7 +183,7 @@ static int snd_interwave_i2c_getclockline(snd_i2c_bus_t *bus)
 	return res;
 }
 
-static int snd_interwave_i2c_getdataline(snd_i2c_bus_t *bus, int ack)
+static int snd_interwave_i2c_getdataline(struct snd_i2c_bus *bus, int ack)
 {
 	unsigned long port = bus->private_value;
 	unsigned char res;
@@ -197,19 +197,19 @@ static int snd_interwave_i2c_getdataline(snd_i2c_bus_t *bus, int ack)
 	return res;
 }
 
-static snd_i2c_bit_ops_t snd_interwave_i2c_bit_ops = {
+static struct snd_i2c_bit_ops snd_interwave_i2c_bit_ops = {
 	.setlines = snd_interwave_i2c_setlines,
 	.getclock = snd_interwave_i2c_getclockline,
 	.getdata  = snd_interwave_i2c_getdataline,
 };
 
 static int __devinit snd_interwave_detect_stb(struct snd_interwave *iwcard,
-					      snd_gus_card_t * gus, int dev,
-					      snd_i2c_bus_t **rbus)
+					      struct snd_gus_card * gus, int dev,
+					      struct snd_i2c_bus **rbus)
 {
 	unsigned long port;
-	snd_i2c_bus_t *bus;
-	snd_card_t *card = iwcard->card;
+	struct snd_i2c_bus *bus;
+	struct snd_card *card = iwcard->card;
 	char name[32];
 	int err;
 
@@ -246,10 +246,10 @@ static int __devinit snd_interwave_detect_stb(struct snd_interwave *iwcard,
 #endif
 
 static int __devinit snd_interwave_detect(struct snd_interwave *iwcard,
-				          snd_gus_card_t * gus,
+				          struct snd_gus_card * gus,
 				          int dev
 #ifdef SNDRV_STB
-				          , snd_i2c_bus_t **rbus
+				          , struct snd_i2c_bus **rbus
 #endif
 				          )
 {
@@ -314,7 +314,7 @@ static irqreturn_t snd_interwave_interrupt(int irq, void *dev_id, struct pt_regs
 	return IRQ_RETVAL(handled);
 }
 
-static void __devinit snd_interwave_reset(snd_gus_card_t * gus)
+static void __devinit snd_interwave_reset(struct snd_gus_card * gus)
 {
 	snd_gf1_write8(gus, SNDRV_GF1_GB_RESET, 0x00);
 	udelay(160);
@@ -322,7 +322,7 @@ static void __devinit snd_interwave_reset(snd_gus_card_t * gus)
 	udelay(160);
 }
 
-static void __devinit snd_interwave_bank_sizes(snd_gus_card_t * gus, int *sizes)
+static void __devinit snd_interwave_bank_sizes(struct snd_gus_card * gus, int *sizes)
 {
 	unsigned int idx;
 	unsigned int local;
@@ -371,7 +371,7 @@ struct rom_hdr {
 	/* 511 */ unsigned char csum;
 };
 
-static void __devinit snd_interwave_detect_memory(snd_gus_card_t * gus)
+static void __devinit snd_interwave_detect_memory(struct snd_gus_card * gus)
 {
 	static unsigned int lmc[13] =
 	{
@@ -470,7 +470,7 @@ static void __devinit snd_interwave_detect_memory(snd_gus_card_t * gus)
 		snd_interwave_reset(gus);
 }
 
-static void __devinit snd_interwave_init(int dev, snd_gus_card_t * gus)
+static void __devinit snd_interwave_init(int dev, struct snd_gus_card * gus)
 {
 	unsigned long flags;
 
@@ -492,17 +492,17 @@ static void __devinit snd_interwave_init(int dev, snd_gus_card_t * gus)
 
 }
 
-static snd_kcontrol_new_t snd_interwave_controls[] = {
+static struct snd_kcontrol_new snd_interwave_controls[] = {
 CS4231_DOUBLE("Master Playback Switch", 0, CS4231_LINE_LEFT_OUTPUT, CS4231_LINE_RIGHT_OUTPUT, 7, 7, 1, 1),
 CS4231_DOUBLE("Master Playback Volume", 0, CS4231_LINE_LEFT_OUTPUT, CS4231_LINE_RIGHT_OUTPUT, 0, 0, 31, 1),
 CS4231_DOUBLE("Mic Playback Switch", 0, CS4231_LEFT_MIC_INPUT, CS4231_RIGHT_MIC_INPUT, 7, 7, 1, 1),
 CS4231_DOUBLE("Mic Playback Volume", 0, CS4231_LEFT_MIC_INPUT, CS4231_RIGHT_MIC_INPUT, 0, 0, 31, 1)
 };
 
-static int __devinit snd_interwave_mixer(cs4231_t *chip)
+static int __devinit snd_interwave_mixer(struct snd_cs4231 *chip)
 {
-	snd_card_t *card = chip->card;
-	snd_ctl_elem_id_t id1, id2;
+	struct snd_card *card = chip->card;
+	struct snd_ctl_elem_id id1, id2;
 	unsigned int idx;
 	int err;
 
@@ -631,7 +631,7 @@ static int __devinit snd_interwave_pnp(int dev, struct snd_interwave *iwcard,
 }
 #endif /* CONFIG_PNP */
 
-static void snd_interwave_free(snd_card_t *card)
+static void snd_interwave_free(struct snd_card *card)
 {
 	struct snd_interwave *iwcard = (struct snd_interwave *)card->private_data;
 
@@ -650,14 +650,14 @@ static int __devinit snd_interwave_probe(int dev, struct pnp_card_link *pcard,
 	static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
 	static int possible_dmas[] = {0, 1, 3, 5, 6, 7, -1};
 	int xirq, xdma1, xdma2;
-	snd_card_t *card;
+	struct snd_card *card;
 	struct snd_interwave *iwcard;
-	cs4231_t *cs4231;
-	snd_gus_card_t *gus;
+	struct snd_cs4231 *cs4231;
+	struct snd_gus_card *gus;
 #ifdef SNDRV_STB
-	snd_i2c_bus_t *i2c_bus;
+	struct snd_i2c_bus *i2c_bus;
 #endif
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	char *str;
 	int err;
 
@@ -761,7 +761,7 @@ static int __devinit snd_interwave_probe(int dev, struct pnp_card_link *pcard,
 
 #ifdef SNDRV_STB
 	{
-		snd_ctl_elem_id_t id1, id2;
+		struct snd_ctl_elem_id id1, id2;
 		memset(&id1, 0, sizeof(id1));
 		memset(&id2, 0, sizeof(id2));
 		id1.iface = id2.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
@@ -863,7 +863,7 @@ static int __devinit snd_interwave_pnp_detect(struct pnp_card_link *card,
 
 static void __devexit snd_interwave_pnp_remove(struct pnp_card_link * pcard)
 {
-	snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard);
+	struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
 
 	snd_card_disconnect(card);
 	snd_card_free_in_thread(card);
-- 
cgit v1.2.3-70-g09d2


From 542172f31d41e689988aedcf0d6e67dfe757736a Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:39:06 +0100
Subject: [ALSA] Remove xxx_t typedefs: ISA Wavefront

Modules: Wavefront drivers

Remove xxx_t typedefs from the ISA Wavefront driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/snd_wavefront.h         | 20 +++++++++---------
 sound/isa/wavefront/wavefront.c       | 38 +++++++++++++++++------------------
 sound/isa/wavefront/wavefront_fx.c    |  8 ++++----
 sound/isa/wavefront/wavefront_midi.c  | 22 ++++++++++----------
 sound/isa/wavefront/wavefront_synth.c | 24 +++++++++++-----------
 5 files changed, 56 insertions(+), 56 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/snd_wavefront.h b/include/sound/snd_wavefront.h
index 4b0b2b9370b..0b9e5de94ff 100644
--- a/include/sound/snd_wavefront.h
+++ b/include/sound/snd_wavefront.h
@@ -26,8 +26,8 @@ struct _snd_wavefront_midi {
         snd_wavefront_mpu_id     output_mpu;  /* most-recently-used */
         snd_wavefront_mpu_id     input_mpu;   /* most-recently-used */
         unsigned int             mode[2];     /* MPU401_MODE_XXX */
-	snd_rawmidi_substream_t	 *substream_output[2];
-	snd_rawmidi_substream_t	 *substream_input[2];
+	struct snd_rawmidi_substream	 *substream_output[2];
+	struct snd_rawmidi_substream	 *substream_input[2];
 	struct timer_list	 timer;
         spinlock_t               open;
         spinlock_t               virtual;     /* protects isvirtual */
@@ -38,8 +38,8 @@ struct _snd_wavefront_midi {
 #define	MPU_ACK		0xFE
 #define	UART_MODE_ON	0x3F
 
-extern snd_rawmidi_ops_t snd_wavefront_midi_output;
-extern snd_rawmidi_ops_t snd_wavefront_midi_input;
+extern struct snd_rawmidi_ops snd_wavefront_midi_output;
+extern struct snd_rawmidi_ops snd_wavefront_midi_input;
 
 extern void   snd_wavefront_midi_enable_virtual (snd_wavefront_card_t *);
 extern void   snd_wavefront_midi_disable_virtual (snd_wavefront_card_t *);
@@ -116,23 +116,23 @@ extern int  snd_wavefront_config_midi (snd_wavefront_t *dev) ;
 extern int  snd_wavefront_cmd (snd_wavefront_t *, int, unsigned char *,
 			       unsigned char *);
 
-extern int snd_wavefront_synth_ioctl   (snd_hwdep_t *, 
+extern int snd_wavefront_synth_ioctl   (struct snd_hwdep *, 
 					struct file *,
 					unsigned int cmd, 
 					unsigned long arg);
-extern int  snd_wavefront_synth_open    (snd_hwdep_t *, struct file *);
-extern int  snd_wavefront_synth_release (snd_hwdep_t *, struct file *);
+extern int  snd_wavefront_synth_open    (struct snd_hwdep *, struct file *);
+extern int  snd_wavefront_synth_release (struct snd_hwdep *, struct file *);
 
 /* FX processor - see also yss225.[ch] */
 
 extern int  snd_wavefront_fx_start  (snd_wavefront_t *);
 extern int  snd_wavefront_fx_detect (snd_wavefront_t *);
-extern int  snd_wavefront_fx_ioctl  (snd_hwdep_t *, 
+extern int  snd_wavefront_fx_ioctl  (struct snd_hwdep *, 
 				     struct file *,
 				     unsigned int cmd, 
 				     unsigned long arg);
-extern int snd_wavefront_fx_open    (snd_hwdep_t *, struct file *);
-extern int snd_wavefront_fx_release (snd_hwdep_t *, struct file *);
+extern int snd_wavefront_fx_open    (struct snd_hwdep *, struct file *);
+extern int snd_wavefront_fx_release (struct snd_hwdep *, struct file *);
 
 /* prefix in all snd_printk() delivered messages */
 
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
index 1818f1013c3..9e5b57163c0 100644
--- a/sound/isa/wavefront/wavefront.c
+++ b/sound/isa/wavefront/wavefront.c
@@ -81,7 +81,7 @@ MODULE_PARM_DESC(fm_port, "FM port #.");
 module_param_array(use_cs4232_midi, bool, NULL, 0444);
 MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)");
 
-static snd_card_t *snd_wavefront_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_wavefront_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
 #ifdef CONFIG_PNP
 
@@ -279,12 +279,12 @@ static irqreturn_t snd_wavefront_ics2115_interrupt(int irq,
 	return IRQ_HANDLED;
 }
 
-static snd_hwdep_t * __devinit
-snd_wavefront_new_synth (snd_card_t *card,
+static struct snd_hwdep * __devinit
+snd_wavefront_new_synth (struct snd_card *card,
 			 int hw_dev,
 			 snd_wavefront_card_t *acard)
 {
-	snd_hwdep_t *wavefront_synth;
+	struct snd_hwdep *wavefront_synth;
 
 	if (snd_wavefront_detect (acard) < 0) {
 		return NULL;
@@ -305,14 +305,14 @@ snd_wavefront_new_synth (snd_card_t *card,
 	return wavefront_synth;
 }
 
-static snd_hwdep_t * __devinit
-snd_wavefront_new_fx (snd_card_t *card,
+static struct snd_hwdep * __devinit
+snd_wavefront_new_fx (struct snd_card *card,
 		      int hw_dev,
 		      snd_wavefront_card_t *acard,
 		      unsigned long port)
 
 {
-	snd_hwdep_t *fx_processor;
+	struct snd_hwdep *fx_processor;
 
 	if (snd_wavefront_fx_start (&acard->wavefront)) {
 		snd_printk ("cannot initialize YSS225 FX processor");
@@ -332,15 +332,15 @@ snd_wavefront_new_fx (snd_card_t *card,
 static snd_wavefront_mpu_id internal_id = internal_mpu;
 static snd_wavefront_mpu_id external_id = external_mpu;
 
-static snd_rawmidi_t * __devinit
-snd_wavefront_new_midi (snd_card_t *card,
+static struct snd_rawmidi *__devinit
+snd_wavefront_new_midi (struct snd_card *card,
 			int midi_dev,
 			snd_wavefront_card_t *acard,
 			unsigned long port,
 			snd_wavefront_mpu_id mpu)
 
 {
-	snd_rawmidi_t *rmidi;
+	struct snd_rawmidi *rmidi;
 	static int first = 1;
 
 	if (first) {
@@ -374,7 +374,7 @@ snd_wavefront_new_midi (snd_card_t *card,
 }
 
 static void
-snd_wavefront_free(snd_card_t *card)
+snd_wavefront_free(struct snd_card *card)
 {
 	snd_wavefront_card_t *acard = (snd_wavefront_card_t *)card->private_data;
 	
@@ -389,13 +389,13 @@ static int __devinit
 snd_wavefront_probe (int dev, struct pnp_card_link *pcard,
 		     const struct pnp_card_device_id *pid)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	snd_wavefront_card_t *acard;
-	cs4231_t *chip;
-	snd_hwdep_t *wavefront_synth;
-	snd_rawmidi_t *ics2115_internal_rmidi = NULL;
-	snd_rawmidi_t *ics2115_external_rmidi = NULL;
-	snd_hwdep_t *fx_processor;
+	struct snd_cs4231 *chip;
+	struct snd_hwdep *wavefront_synth;
+	struct snd_rawmidi *ics2115_internal_rmidi = NULL;
+	struct snd_rawmidi *ics2115_external_rmidi = NULL;
+	struct snd_hwdep *fx_processor;
 	int hw_dev = 0, midi_dev = 0, err;
 
 #ifdef CONFIG_PNP
@@ -467,7 +467,7 @@ snd_wavefront_probe (int dev, struct pnp_card_link *pcard,
 	/* ---------- OPL3 synth --------- */
 
 	if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
-		opl3_t *opl3;
+		struct snd_opl3 *opl3;
 
 	        if ((err = snd_opl3_create(card,
 					   fm_port[dev],
@@ -658,7 +658,7 @@ static int __devinit snd_wavefront_pnp_detect(struct pnp_card_link *card,
 
 static void __devexit snd_wavefront_pnp_remove(struct pnp_card_link * pcard)
 {
-	snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard);
+	struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
 
 	snd_card_disconnect(card);
 	snd_card_free_in_thread(card);
diff --git a/sound/isa/wavefront/wavefront_fx.c b/sound/isa/wavefront/wavefront_fx.c
index 32379688eed..180661c5ffd 100644
--- a/sound/isa/wavefront/wavefront_fx.c
+++ b/sound/isa/wavefront/wavefront_fx.c
@@ -460,7 +460,7 @@ snd_wavefront_fx_detect (snd_wavefront_t *dev)
 }
 
 int
-snd_wavefront_fx_open (snd_hwdep_t *hw, struct file *file)
+snd_wavefront_fx_open (struct snd_hwdep *hw, struct file *file)
 
 {
 	if (!try_module_get(hw->card->module))
@@ -470,7 +470,7 @@ snd_wavefront_fx_open (snd_hwdep_t *hw, struct file *file)
 }
 
 int 
-snd_wavefront_fx_release (snd_hwdep_t *hw, struct file *file)
+snd_wavefront_fx_release (struct snd_hwdep *hw, struct file *file)
 
 {
 	module_put(hw->card->module);
@@ -478,11 +478,11 @@ snd_wavefront_fx_release (snd_hwdep_t *hw, struct file *file)
 }
 
 int
-snd_wavefront_fx_ioctl (snd_hwdep_t *sdev, struct file *file,
+snd_wavefront_fx_ioctl (struct snd_hwdep *sdev, struct file *file,
 			unsigned int cmd, unsigned long arg)
 
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	snd_wavefront_card_t *acard;
 	snd_wavefront_t *dev;
 	wavefront_fx_info r;
diff --git a/sound/isa/wavefront/wavefront_midi.c b/sound/isa/wavefront/wavefront_midi.c
index 6f51d64fb56..15888ba2169 100644
--- a/sound/isa/wavefront/wavefront_midi.c
+++ b/sound/isa/wavefront/wavefront_midi.c
@@ -91,10 +91,10 @@ write_data (snd_wavefront_midi_t *midi, unsigned char byte)
 }
 
 static snd_wavefront_midi_t *
-get_wavefront_midi (snd_rawmidi_substream_t *substream)
+get_wavefront_midi (struct snd_rawmidi_substream *substream)
 
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	snd_wavefront_card_t *acard;
 
 	if (substream == NULL || substream->rmidi == NULL) 
@@ -230,7 +230,7 @@ static void snd_wavefront_midi_output_write(snd_wavefront_card_t *card)
 	}
 }
 
-static int snd_wavefront_midi_input_open(snd_rawmidi_substream_t * substream)
+static int snd_wavefront_midi_input_open(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
 	snd_wavefront_midi_t *midi;
@@ -252,7 +252,7 @@ static int snd_wavefront_midi_input_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_wavefront_midi_output_open(snd_rawmidi_substream_t * substream)
+static int snd_wavefront_midi_output_open(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
 	snd_wavefront_midi_t *midi;
@@ -274,7 +274,7 @@ static int snd_wavefront_midi_output_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_wavefront_midi_input_close(snd_rawmidi_substream_t * substream)
+static int snd_wavefront_midi_input_close(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
 	snd_wavefront_midi_t *midi;
@@ -295,7 +295,7 @@ static int snd_wavefront_midi_input_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_wavefront_midi_output_close(snd_rawmidi_substream_t * substream)
+static int snd_wavefront_midi_output_close(struct snd_rawmidi_substream *substream)
 {
 	unsigned long flags;
 	snd_wavefront_midi_t *midi;
@@ -315,7 +315,7 @@ static int snd_wavefront_midi_output_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static void snd_wavefront_midi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_wavefront_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
 {
 	unsigned long flags;
 	snd_wavefront_midi_t *midi;
@@ -355,7 +355,7 @@ static void snd_wavefront_midi_output_timer(unsigned long data)
 	snd_wavefront_midi_output_write(card);
 }
 
-static void snd_wavefront_midi_output_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_wavefront_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
 {
 	unsigned long flags;
 	snd_wavefront_midi_t *midi;
@@ -401,7 +401,7 @@ snd_wavefront_midi_interrupt (snd_wavefront_card_t *card)
 {
 	unsigned long flags;
 	snd_wavefront_midi_t *midi;
-	static snd_rawmidi_substream_t *substream = NULL;
+	static struct snd_rawmidi_substream *substream = NULL;
 	static int mpu = external_mpu; 
 	int max = 128;
 	unsigned char byte;
@@ -554,14 +554,14 @@ snd_wavefront_midi_start (snd_wavefront_card_t *card)
 	return 0;
 }
 
-snd_rawmidi_ops_t snd_wavefront_midi_output =
+struct snd_rawmidi_ops snd_wavefront_midi_output =
 {
 	.open =		snd_wavefront_midi_output_open,
 	.close =	snd_wavefront_midi_output_close,
 	.trigger =	snd_wavefront_midi_output_trigger,
 };
 
-snd_rawmidi_ops_t snd_wavefront_midi_input =
+struct snd_rawmidi_ops snd_wavefront_midi_input =
 {
 	.open =		snd_wavefront_midi_input_open,
 	.close =	snd_wavefront_midi_input_close,
diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c
index abd79b78141..679d0ae97e4 100644
--- a/sound/isa/wavefront/wavefront_synth.c
+++ b/sound/isa/wavefront/wavefront_synth.c
@@ -144,13 +144,13 @@ MODULE_PARM_DESC(osrun_time, "how many seconds to wait for the ICS2115 OS");
 static int wavefront_delete_sample (snd_wavefront_t *, int sampnum);
 static int wavefront_find_free_sample (snd_wavefront_t *);
 
-typedef struct {
+struct wavefront_command {
 	int cmd;
 	char *action;
 	unsigned int read_cnt;
 	unsigned int write_cnt;
 	int need_ack;
-} wavefront_command;
+};
 
 static struct {
 	int errno;
@@ -170,7 +170,7 @@ static struct {
 
 #define NEEDS_ACK 1
 
-static wavefront_command wavefront_commands[] = {
+static struct wavefront_command wavefront_commands[] = {
 	{ WFC_SET_SYNTHVOL, "set synthesizer volume", 0, 1, NEEDS_ACK },
 	{ WFC_GET_SYNTHVOL, "get synthesizer volume", 1, 0, 0},
 	{ WFC_SET_NVOICES, "set number of voices", 0, 1, NEEDS_ACK },
@@ -249,7 +249,7 @@ wavefront_errorstr (int errnum)
 	return "Unknown WaveFront error";
 }
 
-static wavefront_command *
+static struct wavefront_command *
 wavefront_get_command (int cmd) 
 
 {
@@ -261,7 +261,7 @@ wavefront_get_command (int cmd)
 		}
 	}
 
-	return (wavefront_command *) 0;
+	return NULL;
 }
 
 static inline int
@@ -345,9 +345,9 @@ snd_wavefront_cmd (snd_wavefront_t *dev,
 	int ack;
 	unsigned int i;
 	int c;
-	wavefront_command *wfcmd;
+	struct wavefront_command *wfcmd;
 
-	if ((wfcmd = wavefront_get_command (cmd)) == (wavefront_command *) 0) {
+	if ((wfcmd = wavefront_get_command (cmd)) == NULL) {
 		snd_printk ("command 0x%x not supported.\n",
 			cmd);
 		return 1;
@@ -1625,7 +1625,7 @@ wavefront_synth_control (snd_wavefront_card_t *acard,
 }
 
 int 
-snd_wavefront_synth_open (snd_hwdep_t *hw, struct file *file)
+snd_wavefront_synth_open (struct snd_hwdep *hw, struct file *file)
 
 {
 	if (!try_module_get(hw->card->module))
@@ -1635,7 +1635,7 @@ snd_wavefront_synth_open (snd_hwdep_t *hw, struct file *file)
 }
 
 int 
-snd_wavefront_synth_release (snd_hwdep_t *hw, struct file *file)
+snd_wavefront_synth_release (struct snd_hwdep *hw, struct file *file)
 
 {
 	module_put(hw->card->module);
@@ -1643,18 +1643,18 @@ snd_wavefront_synth_release (snd_hwdep_t *hw, struct file *file)
 }
 
 int
-snd_wavefront_synth_ioctl (snd_hwdep_t *hw, struct file *file,
+snd_wavefront_synth_ioctl (struct snd_hwdep *hw, struct file *file,
 			   unsigned int cmd, unsigned long arg)
 
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	snd_wavefront_t *dev;
 	snd_wavefront_card_t *acard;
 	wavefront_control *wc;
 	void __user *argp = (void __user *)arg;
 	int err;
 
-	card = (snd_card_t *) hw->card;
+	card = (struct snd_card *) hw->card;
 
 	snd_assert(card != NULL, return -ENODEV);
 
-- 
cgit v1.2.3-70-g09d2


From 9f38945fab04a0a0ea50880fa634f9bfa28f6226 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:44:47 +0100
Subject: [ALSA] Remove xxx_t typedefs: AK4531 codec

Modules: AK4531 codec

Remove xxx_t typedefs from the AK4531 codec support code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/ak4531_codec.h  | 12 ++++-----
 sound/pci/ac97/ak4531_codec.c | 59 ++++++++++++++++++++++---------------------
 2 files changed, 36 insertions(+), 35 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/ak4531_codec.h b/include/sound/ak4531_codec.h
index 8b18992376d..4e7c661af48 100644
--- a/include/sound/ak4531_codec.h
+++ b/include/sound/ak4531_codec.h
@@ -64,17 +64,17 @@
 #define AK4531_AD_IN    0x18	/* AD input select */
 #define AK4531_MIC_GAIN 0x19	/* MIC amplified gain */
 
-typedef struct _snd_ak4531 ak4531_t;
-
-struct _snd_ak4531 {
-	void (*write) (ak4531_t *ak4531, unsigned short reg, unsigned short val);
+struct snd_ak4531 {
+	void (*write) (struct snd_ak4531 *ak4531, unsigned short reg,
+		       unsigned short val);
 	void *private_data;
-	void (*private_free) (ak4531_t *ak4531);
+	void (*private_free) (struct snd_ak4531 *ak4531);
 	/* --- */
 	unsigned char regs[0x20];
 	struct semaphore reg_mutex;
 };
 
-int snd_ak4531_mixer(snd_card_t * card, ak4531_t * _ak4531, ak4531_t ** rak4531);
+int snd_ak4531_mixer(struct snd_card *card, struct snd_ak4531 *_ak4531,
+		     struct snd_ak4531 **rak4531);
 
 #endif /* __SOUND_AK4531_CODEC_H */
diff --git a/sound/pci/ac97/ak4531_codec.c b/sound/pci/ac97/ak4531_codec.c
index 4032c574837..088d8dc336b 100644
--- a/sound/pci/ac97/ak4531_codec.c
+++ b/sound/pci/ac97/ak4531_codec.c
@@ -30,7 +30,7 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("Universal routines for AK4531 codec");
 MODULE_LICENSE("GPL");
 
-static void snd_ak4531_proc_init(snd_card_t * card, ak4531_t * ak4531);
+static void snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531);
 
 /*
  *
@@ -38,7 +38,7 @@ static void snd_ak4531_proc_init(snd_card_t * card, ak4531_t * ak4531);
  
 #if 0
 
-static void snd_ak4531_dump(ak4531_t *ak4531)
+static void snd_ak4531_dump(struct snd_ak4531 *ak4531)
 {
 	int idx;
 	
@@ -58,7 +58,7 @@ static void snd_ak4531_dump(ak4531_t *ak4531)
   .get = snd_ak4531_get_single, .put = snd_ak4531_put_single, \
   .private_value = reg | (shift << 16) | (mask << 24) | (invert << 22) }
 
-static int snd_ak4531_info_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ak4531_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 24) & 0xff;
 
@@ -69,9 +69,9 @@ static int snd_ak4531_info_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
  
-static int snd_ak4531_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4531_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol);
+	struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 16) & 0x07;
 	int mask = (kcontrol->private_value >> 24) & 0xff;
@@ -88,9 +88,9 @@ static int snd_ak4531_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_ak4531_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4531_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol);
+	struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value & 0xff;
 	int shift = (kcontrol->private_value >> 16) & 0x07;
 	int mask = (kcontrol->private_value >> 24) & 0xff;
@@ -117,7 +117,7 @@ static int snd_ak4531_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
   .get = snd_ak4531_get_double, .put = snd_ak4531_put_double, \
   .private_value = left_reg | (right_reg << 8) | (left_shift << 16) | (right_shift << 19) | (mask << 24) | (invert << 22) }
 
-static int snd_ak4531_info_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ak4531_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	int mask = (kcontrol->private_value >> 24) & 0xff;
 
@@ -128,9 +128,9 @@ static int snd_ak4531_info_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
  
-static int snd_ak4531_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4531_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol);
+	struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol);
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
 	int left_shift = (kcontrol->private_value >> 16) & 0x07;
@@ -152,9 +152,9 @@ static int snd_ak4531_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_ak4531_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4531_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol);
+	struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol);
 	int left_reg = kcontrol->private_value & 0xff;
 	int right_reg = (kcontrol->private_value >> 8) & 0xff;
 	int left_shift = (kcontrol->private_value >> 16) & 0x07;
@@ -194,7 +194,7 @@ static int snd_ak4531_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
   .get = snd_ak4531_get_input_sw, .put = snd_ak4531_put_input_sw, \
   .private_value = reg1 | (reg2 << 8) | (left_shift << 16) | (right_shift << 24) }
 
-static int snd_ak4531_info_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ak4531_info_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 4;
@@ -203,9 +203,9 @@ static int snd_ak4531_info_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_info
 	return 0;
 }
  
-static int snd_ak4531_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4531_get_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol);
+	struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol);
 	int reg1 = kcontrol->private_value & 0xff;
 	int reg2 = (kcontrol->private_value >> 8) & 0xff;
 	int left_shift = (kcontrol->private_value >> 16) & 0x0f;
@@ -220,9 +220,9 @@ static int snd_ak4531_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
 	return 0;
 }
 
-static int snd_ak4531_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ak4531_put_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ak4531_t *ak4531 = snd_kcontrol_chip(kcontrol);
+	struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol);
 	int reg1 = kcontrol->private_value & 0xff;
 	int reg2 = (kcontrol->private_value >> 8) & 0xff;
 	int left_shift = (kcontrol->private_value >> 16) & 0x0f;
@@ -244,7 +244,7 @@ static int snd_ak4531_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
 	return change;
 }
 
-static snd_kcontrol_new_t snd_ak4531_controls[] = {
+static struct snd_kcontrol_new snd_ak4531_controls[] = {
 
 AK4531_DOUBLE("Master Playback Switch", 0, AK4531_LMASTER, AK4531_RMASTER, 7, 7, 1, 1),
 AK4531_DOUBLE("Master Playback Volume", 0, AK4531_LMASTER, AK4531_RMASTER, 0, 0, 0x1f, 1),
@@ -300,7 +300,7 @@ AK4531_SINGLE("AD Input Select", 0, AK4531_AD_IN, 0, 1, 0),
 AK4531_SINGLE("Mic Boost (+30dB)", 0, AK4531_MIC_GAIN, 0, 1, 0)
 };
 
-static int snd_ak4531_free(ak4531_t *ak4531)
+static int snd_ak4531_free(struct snd_ak4531 *ak4531)
 {
 	if (ak4531) {
 		if (ak4531->private_free)
@@ -310,9 +310,9 @@ static int snd_ak4531_free(ak4531_t *ak4531)
 	return 0;
 }
 
-static int snd_ak4531_dev_free(snd_device_t *device)
+static int snd_ak4531_dev_free(struct snd_device *device)
 {
-	ak4531_t *ak4531 = device->device_data;
+	struct snd_ak4531 *ak4531 = device->device_data;
 	return snd_ak4531_free(ak4531);
 }
 
@@ -345,12 +345,13 @@ static u8 snd_ak4531_initial_map[0x19 + 1] = {
 	0x01		/* 19: Mic Amp Setup */
 };
 
-int snd_ak4531_mixer(snd_card_t * card, ak4531_t * _ak4531, ak4531_t ** rak4531)
+int snd_ak4531_mixer(struct snd_card *card, struct snd_ak4531 *_ak4531,
+		     struct snd_ak4531 **rak4531)
 {
 	unsigned int idx;
 	int err;
-	ak4531_t * ak4531;
-	static snd_device_ops_t ops = {
+	struct snd_ak4531 *ak4531;
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_ak4531_dev_free,
 	};
 
@@ -398,10 +399,10 @@ int snd_ak4531_mixer(snd_card_t * card, ak4531_t * _ak4531, ak4531_t ** rak4531)
 
  */
 
-static void snd_ak4531_proc_read(snd_info_entry_t *entry, 
-				 snd_info_buffer_t * buffer)
+static void snd_ak4531_proc_read(struct snd_info_entry *entry, 
+				 struct snd_info_buffer *buffer)
 {
-	ak4531_t *ak4531 = entry->private_data;
+	struct snd_ak4531 *ak4531 = entry->private_data;
 
 	snd_iprintf(buffer, "Asahi Kasei AK4531\n\n");
 	snd_iprintf(buffer, "Recording source   : %s\n"
@@ -410,9 +411,9 @@ static void snd_ak4531_proc_read(snd_info_entry_t *entry,
 		    ak4531->regs[AK4531_MIC_GAIN] & 1 ? "+30dB" : "+0dB");
 }
 
-static void snd_ak4531_proc_init(snd_card_t * card, ak4531_t * ak4531)
+static void snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	if (! snd_card_proc_new(card, "ak4531", &entry))
 		snd_info_set_text_ops(entry, ak4531, 1024, snd_ak4531_proc_read);
-- 
cgit v1.2.3-70-g09d2


From af26367f69a474ed809e4a59abb5855b47daaff4 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:46:59 +0100
Subject: [ALSA] Remove xxx_t typedefs: VXdriver

Remove xxx_t typedefs from the VXdriver codes
(vx_core support, vx222 and vxpocket).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/vx_core.h     | 123 ++++++++++++++-------------
 sound/drivers/vx/vx_core.c  |  58 ++++++-------
 sound/drivers/vx/vx_hwdep.c |  24 +++---
 sound/drivers/vx/vx_mixer.c | 162 +++++++++++++++++------------------
 sound/drivers/vx/vx_pcm.c   | 200 ++++++++++++++++++++++++--------------------
 sound/drivers/vx/vx_uer.c   |  22 ++---
 sound/pci/vx222/vx222.c     |  16 ++--
 sound/pci/vx222/vx222.h     |   2 +-
 sound/pci/vx222/vx222_ops.c |  84 +++++++++----------
 sound/pcmcia/vx/vxp_mixer.c |  26 +++---
 sound/pcmcia/vx/vxp_ops.c   |  48 +++++------
 sound/pcmcia/vx/vxpocket.c  |  26 +++---
 sound/pcmcia/vx/vxpocket.h  |   8 +-
 13 files changed, 410 insertions(+), 389 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/vx_core.h b/include/sound/vx_core.h
index 43c901bf7c1..0a85c37d1bc 100644
--- a/include/sound/vx_core.h
+++ b/include/sound/vx_core.h
@@ -36,9 +36,6 @@
 struct firmware;
 struct device;
 
-typedef struct snd_vx_core vx_core_t;
-typedef struct vx_pipe vx_pipe_t;
-
 #define VX_DRIVER_VERSION	0x010000	/* 1.0.0 */
 
 /*
@@ -76,7 +73,7 @@ struct vx_pipe {
 	int channels;
 	unsigned int differed_type;
 	pcx_time_t pcx_time;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 
 	int hbuf_size;		/* H-buffer size in bytes */
 	int buffer_bytes;	/* the ALSA pcm buffer size in bytes */
@@ -88,36 +85,38 @@ struct vx_pipe {
 	u64 cur_count;		/* current sample position (for playback) */
 
 	unsigned int references;     /* an output pipe may be used for monitoring and/or playback */
-	vx_pipe_t *monitoring_pipe;  /* pointer to the monitoring pipe (capture pipe only)*/
+	struct vx_pipe *monitoring_pipe;  /* pointer to the monitoring pipe (capture pipe only)*/
 
 	struct tasklet_struct start_tq;
 };
 
+struct vx_core;
+
 struct snd_vx_ops {
 	/* low-level i/o */
-	unsigned char (*in8)(vx_core_t *chip, int reg);
-	unsigned int (*in32)(vx_core_t *chip, int reg);
-	void (*out8)(vx_core_t *chip, int reg, unsigned char val);
-	void (*out32)(vx_core_t *chip, int reg, unsigned int val);
+	unsigned char (*in8)(struct vx_core *chip, int reg);
+	unsigned int (*in32)(struct vx_core *chip, int reg);
+	void (*out8)(struct vx_core *chip, int reg, unsigned char val);
+	void (*out32)(struct vx_core *chip, int reg, unsigned int val);
 	/* irq */
-	int (*test_and_ack)(vx_core_t *chip);
-	void (*validate_irq)(vx_core_t *chip, int enable);
+	int (*test_and_ack)(struct vx_core *chip);
+	void (*validate_irq)(struct vx_core *chip, int enable);
 	/* codec */
-	void (*write_codec)(vx_core_t *chip, int codec, unsigned int data);
-	void (*akm_write)(vx_core_t *chip, int reg, unsigned int data);
-	void (*reset_codec)(vx_core_t *chip);
-	void (*change_audio_source)(vx_core_t *chip, int src);
-	void (*set_clock_source)(vx_core_t *chp, int src);
+	void (*write_codec)(struct vx_core *chip, int codec, unsigned int data);
+	void (*akm_write)(struct vx_core *chip, int reg, unsigned int data);
+	void (*reset_codec)(struct vx_core *chip);
+	void (*change_audio_source)(struct vx_core *chip, int src);
+	void (*set_clock_source)(struct vx_core *chp, int src);
 	/* chip init */
-	int (*load_dsp)(vx_core_t *chip, int idx, const struct firmware *fw);
-	void (*reset_dsp)(vx_core_t *chip);
-	void (*reset_board)(vx_core_t *chip, int cold_reset);
-	int (*add_controls)(vx_core_t *chip);
+	int (*load_dsp)(struct vx_core *chip, int idx, const struct firmware *fw);
+	void (*reset_dsp)(struct vx_core *chip);
+	void (*reset_board)(struct vx_core *chip, int cold_reset);
+	int (*add_controls)(struct vx_core *chip);
 	/* pcm */
-	void (*dma_write)(vx_core_t *chip, snd_pcm_runtime_t *runtime,
-			  vx_pipe_t *pipe, int count);
-	void (*dma_read)(vx_core_t *chip, snd_pcm_runtime_t *runtime,
-			  vx_pipe_t *pipe, int count);
+	void (*dma_write)(struct vx_core *chip, struct snd_pcm_runtime *runtime,
+			  struct vx_pipe *pipe, int count);
+	void (*dma_read)(struct vx_core *chip, struct snd_pcm_runtime *runtime,
+			  struct vx_pipe *pipe, int count);
 };
 
 struct snd_vx_hardware {
@@ -158,10 +157,10 @@ enum {
 /* min/max values for analog output for old codecs */
 #define VX_ANALOG_OUT_LEVEL_MAX		0xe3
 
-struct snd_vx_core {
+struct vx_core {
 	/* ALSA stuff */
-	snd_card_t *card;
-	snd_pcm_t *pcm[VX_MAX_CODECS];
+	struct snd_card *card;
+	struct snd_pcm *pcm[VX_MAX_CODECS];
 	int type;	/* VX_TYPE_XXX */
 
 	int irq;
@@ -179,7 +178,7 @@ struct snd_vx_core {
 	unsigned int pcm_running;
 
 	struct device *dev;
-	snd_hwdep_t *hwdep;
+	struct snd_hwdep *hwdep;
 
 	struct vx_rmh irq_rmh;	/* RMH used in interrupts */
 
@@ -216,14 +215,14 @@ struct snd_vx_core {
 /*
  * constructor
  */
-vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw,
-			 struct snd_vx_ops *ops, int extra_size);
-int snd_vx_setup_firmware(vx_core_t *chip);
-int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *dsp);
-int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *dsp);
-int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp);
+struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw,
+			      struct snd_vx_ops *ops, int extra_size);
+int snd_vx_setup_firmware(struct vx_core *chip);
+int snd_vx_load_boot_image(struct vx_core *chip, const struct firmware *dsp);
+int snd_vx_dsp_boot(struct vx_core *chip, const struct firmware *dsp);
+int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp);
 
-void snd_vx_free_firmware(vx_core_t *chip);
+void snd_vx_free_firmware(struct vx_core *chip);
 
 /*
  * interrupt handler; exported for pcmcia
@@ -233,37 +232,37 @@ irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs);
 /*
  * lowlevel functions
  */
-static inline int vx_test_and_ack(vx_core_t *chip)
+static inline int vx_test_and_ack(struct vx_core *chip)
 {
 	snd_assert(chip->ops->test_and_ack, return -ENXIO);
 	return chip->ops->test_and_ack(chip);
 }
 
-static inline void vx_validate_irq(vx_core_t *chip, int enable)
+static inline void vx_validate_irq(struct vx_core *chip, int enable)
 {
 	snd_assert(chip->ops->validate_irq, return);
 	chip->ops->validate_irq(chip, enable);
 }
 
-static inline unsigned char snd_vx_inb(vx_core_t *chip, int reg)
+static inline unsigned char snd_vx_inb(struct vx_core *chip, int reg)
 {
 	snd_assert(chip->ops->in8, return 0);
 	return chip->ops->in8(chip, reg);
 }
 
-static inline unsigned int snd_vx_inl(vx_core_t *chip, int reg)
+static inline unsigned int snd_vx_inl(struct vx_core *chip, int reg)
 {
 	snd_assert(chip->ops->in32, return 0);
 	return chip->ops->in32(chip, reg);
 }
 
-static inline void snd_vx_outb(vx_core_t *chip, int reg, unsigned char val)
+static inline void snd_vx_outb(struct vx_core *chip, int reg, unsigned char val)
 {
 	snd_assert(chip->ops->out8, return);
 	chip->ops->out8(chip, reg, val);
 }
 
-static inline void snd_vx_outl(vx_core_t *chip, int reg, unsigned int val)
+static inline void snd_vx_outl(struct vx_core *chip, int reg, unsigned int val)
 {
 	snd_assert(chip->ops->out32, return);
 	chip->ops->out32(chip, reg, val);
@@ -274,25 +273,25 @@ static inline void snd_vx_outl(vx_core_t *chip, int reg, unsigned int val)
 #define vx_inl(chip,reg)	snd_vx_inl(chip, VX_##reg)
 #define vx_outl(chip,reg,val)	snd_vx_outl(chip, VX_##reg,val)
 
-static inline void vx_reset_dsp(vx_core_t *chip)
+static inline void vx_reset_dsp(struct vx_core *chip)
 {
 	snd_assert(chip->ops->reset_dsp, return);
 	chip->ops->reset_dsp(chip);
 }
 
-int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh);
-int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh);
-int vx_send_rih(vx_core_t *chip, int cmd);
-int vx_send_rih_nolock(vx_core_t *chip, int cmd);
+int vx_send_msg(struct vx_core *chip, struct vx_rmh *rmh);
+int vx_send_msg_nolock(struct vx_core *chip, struct vx_rmh *rmh);
+int vx_send_rih(struct vx_core *chip, int cmd);
+int vx_send_rih_nolock(struct vx_core *chip, int cmd);
 
-void vx_reset_codec(vx_core_t *chip, int cold_reset);
+void vx_reset_codec(struct vx_core *chip, int cold_reset);
 
 /*
  * check the bit on the specified register
  * returns zero if a bit matches, or a negative error code.
  * exported for vxpocket driver
  */
-int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time);
+int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time);
 #define vx_check_isr(chip,mask,bit,time) snd_vx_check_reg_bit(chip, VX_ISR, mask, bit, time)
 #define vx_wait_isr_bit(chip,bit) vx_check_isr(chip, bit, bit, 200)
 #define vx_wait_for_rx_full(chip) vx_wait_isr_bit(chip, ISR_RX_FULL)
@@ -301,15 +300,15 @@ int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time);
 /*
  * pseudo-DMA transfer
  */
-static inline void vx_pseudo_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
-				       vx_pipe_t *pipe, int count)
+static inline void vx_pseudo_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime,
+				       struct vx_pipe *pipe, int count)
 {
 	snd_assert(chip->ops->dma_write, return);
 	chip->ops->dma_write(chip, runtime, pipe, count);
 }
 
-static inline void vx_pseudo_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
-				      vx_pipe_t *pipe, int count)
+static inline void vx_pseudo_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
+				      struct vx_pipe *pipe, int count)
 {
 	snd_assert(chip->ops->dma_read, return);
 	chip->ops->dma_read(chip, runtime, pipe, count);
@@ -327,24 +326,24 @@ static inline void vx_pseudo_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtim
 /*
  * pcm stuff
  */
-int snd_vx_pcm_new(vx_core_t *chip);
-void vx_pcm_update_intr(vx_core_t *chip, unsigned int events);
+int snd_vx_pcm_new(struct vx_core *chip);
+void vx_pcm_update_intr(struct vx_core *chip, unsigned int events);
 
 /*
  * mixer stuff
  */
-int snd_vx_mixer_new(vx_core_t *chip);
-void vx_toggle_dac_mute(vx_core_t *chip, int mute);
-int vx_sync_audio_source(vx_core_t *chip);
-int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active);
+int snd_vx_mixer_new(struct vx_core *chip);
+void vx_toggle_dac_mute(struct vx_core *chip, int mute);
+int vx_sync_audio_source(struct vx_core *chip);
+int vx_set_monitor_level(struct vx_core *chip, int audio, int level, int active);
 
 /*
  * IEC958 & clock stuff
  */
-void vx_set_iec958_status(vx_core_t *chip, unsigned int bits);
-int vx_set_clock(vx_core_t *chip, unsigned int freq);
-void vx_set_internal_clock(vx_core_t *chip, unsigned int freq);
-int vx_change_frequency(vx_core_t *chip);
+void vx_set_iec958_status(struct vx_core *chip, unsigned int bits);
+int vx_set_clock(struct vx_core *chip, unsigned int freq);
+void vx_set_internal_clock(struct vx_core *chip, unsigned int freq);
+int vx_change_frequency(struct vx_core *chip);
 
 
 /*
diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c
index e6e4cf99741..5abf4235177 100644
--- a/sound/drivers/vx/vx_core.c
+++ b/sound/drivers/vx/vx_core.c
@@ -49,7 +49,7 @@ MODULE_LICENSE("GPL");
  *
  * returns zero if a bit matches, or a negative error code.
  */
-int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time)
+int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time)
 {
 	unsigned long end_time = jiffies + (time * HZ + 999) / 1000;
 #ifdef CONFIG_SND_DEBUG
@@ -78,7 +78,7 @@ int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time)
  * returns 0 if successful, or a negative error code.
  * 
  */
-static int vx_send_irq_dsp(vx_core_t *chip, int num)
+static int vx_send_irq_dsp(struct vx_core *chip, int num)
 {
 	int nirq;
 
@@ -99,7 +99,7 @@ static int vx_send_irq_dsp(vx_core_t *chip, int num)
  *
  * returns 0 if successful, or a negative error code.
  */
-static int vx_reset_chk(vx_core_t *chip)
+static int vx_reset_chk(struct vx_core *chip)
 {
 	/* Reset irq CHK */
 	if (vx_send_irq_dsp(chip, IRQ_RESET_CHK) < 0)
@@ -118,7 +118,7 @@ static int vx_reset_chk(vx_core_t *chip)
  * the error code can be VX-specific, retrieved via vx_get_error().
  * NB: call with spinlock held!
  */
-static int vx_transfer_end(vx_core_t *chip, int cmd)
+static int vx_transfer_end(struct vx_core *chip, int cmd)
 {
 	int err;
 
@@ -156,7 +156,7 @@ static int vx_transfer_end(vx_core_t *chip, int cmd)
  * the error code can be VX-specific, retrieved via vx_get_error().
  * NB: call with spinlock held!
  */
-static int vx_read_status(vx_core_t *chip, struct vx_rmh *rmh)
+static int vx_read_status(struct vx_core *chip, struct vx_rmh *rmh)
 {
 	int i, err, val, size;
 
@@ -236,7 +236,7 @@ static int vx_read_status(vx_core_t *chip, struct vx_rmh *rmh)
  * 
  * this function doesn't call spinlock at all.
  */
-int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh)
+int vx_send_msg_nolock(struct vx_core *chip, struct vx_rmh *rmh)
 {
 	int i, err;
 	
@@ -341,7 +341,7 @@ int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh)
  * returns 0 if successful, or a negative error code.
  * see vx_send_msg_nolock().
  */
-int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh)
+int vx_send_msg(struct vx_core *chip, struct vx_rmh *rmh)
 {
 	unsigned long flags;
 	int err;
@@ -364,7 +364,7 @@ int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh)
  *
  * unlike RMH, no command is sent to DSP.
  */
-int vx_send_rih_nolock(vx_core_t *chip, int cmd)
+int vx_send_rih_nolock(struct vx_core *chip, int cmd)
 {
 	int err;
 
@@ -401,7 +401,7 @@ int vx_send_rih_nolock(vx_core_t *chip, int cmd)
  *
  * see vx_send_rih_nolock().
  */
-int vx_send_rih(vx_core_t *chip, int cmd)
+int vx_send_rih(struct vx_core *chip, int cmd)
 {
 	unsigned long flags;
 	int err;
@@ -418,7 +418,7 @@ int vx_send_rih(vx_core_t *chip, int cmd)
  * snd_vx_boot_xilinx - boot up the xilinx interface
  * @boot: the boot record to load
  */
-int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *boot)
+int snd_vx_load_boot_image(struct vx_core *chip, const struct firmware *boot)
 {
 	unsigned int i;
 	int no_fillup = vx_has_new_dsp(chip);
@@ -470,7 +470,7 @@ int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *boot)
  *
  * called from irq handler only
  */
-static int vx_test_irq_src(vx_core_t *chip, unsigned int *ret)
+static int vx_test_irq_src(struct vx_core *chip, unsigned int *ret)
 {
 	int err;
 
@@ -491,7 +491,7 @@ static int vx_test_irq_src(vx_core_t *chip, unsigned int *ret)
  */
 static void vx_interrupt(unsigned long private_data)
 {
-	vx_core_t *chip = (vx_core_t *) private_data;
+	struct vx_core *chip = (struct vx_core *) private_data;
 	unsigned int events;
 		
 	if (chip->chip_status & VX_STAT_IS_STALE)
@@ -535,7 +535,7 @@ static void vx_interrupt(unsigned long private_data)
  */
 irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs)
 {
-	vx_core_t *chip = dev;
+	struct vx_core *chip = dev;
 
 	if (! (chip->chip_status & VX_STAT_CHIP_INIT) ||
 	    (chip->chip_status & VX_STAT_IS_STALE))
@@ -548,7 +548,7 @@ irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs)
 
 /*
  */
-static void vx_reset_board(vx_core_t *chip, int cold_reset)
+static void vx_reset_board(struct vx_core *chip, int cold_reset)
 {
 	snd_assert(chip->ops->reset_board, return);
 
@@ -587,9 +587,9 @@ static void vx_reset_board(vx_core_t *chip, int cold_reset)
  * proc interface
  */
 
-static void vx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
+static void vx_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
 {
-	vx_core_t *chip = entry->private_data;
+	struct vx_core *chip = entry->private_data;
 	static char *audio_src_vxp[] = { "Line", "Mic", "Digital" };
 	static char *audio_src_vx2[] = { "Analog", "Analog", "Digital" };
 	static char *clock_mode[] = { "Auto", "Internal", "External" };
@@ -630,9 +630,9 @@ static void vx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
 		    chip->ibl.granularity);
 }
 
-static void vx_proc_init(vx_core_t *chip)
+static void vx_proc_init(struct vx_core *chip)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	if (! snd_card_proc_new(chip->card, "vx-status", &entry))
 		snd_info_set_text_ops(entry, chip, 1024, vx_proc_read);
@@ -642,7 +642,7 @@ static void vx_proc_init(vx_core_t *chip)
 /**
  * snd_vx_dsp_boot - load the DSP boot
  */
-int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *boot)
+int snd_vx_dsp_boot(struct vx_core *chip, const struct firmware *boot)
 {
 	int err;
 	int cold_reset = !(chip->chip_status & VX_STAT_DEVICE_INIT);
@@ -660,7 +660,7 @@ int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *boot)
 /**
  * snd_vx_dsp_load - load the DSP image
  */
-int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp)
+int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp)
 {
 	unsigned int i;
 	int err;
@@ -709,9 +709,9 @@ int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp)
 /*
  * suspend
  */
-static int snd_vx_suspend(snd_card_t *card, pm_message_t state)
+static int snd_vx_suspend(struct snd_card *card, pm_message_t state)
 {
-	vx_core_t *chip = card->pm_private_data;
+	struct vx_core *chip = card->pm_private_data;
 	unsigned int i;
 
 	snd_assert(chip, return -EINVAL);
@@ -726,9 +726,9 @@ static int snd_vx_suspend(snd_card_t *card, pm_message_t state)
 /*
  * resume
  */
-static int snd_vx_resume(snd_card_t *card)
+static int snd_vx_resume(struct snd_card *card)
 {
-	vx_core_t *chip = card->pm_private_data;
+	struct vx_core *chip = card->pm_private_data;
 	int i, err;
 
 	snd_assert(chip, return -EINVAL);
@@ -754,7 +754,7 @@ static int snd_vx_resume(snd_card_t *card)
 #endif
 
 /**
- * snd_vx_create - constructor for vx_core_t
+ * snd_vx_create - constructor for struct vx_core
  * @hw: hardware specific record
  *
  * this function allocates the instance and prepare for the hardware
@@ -762,11 +762,11 @@ static int snd_vx_resume(snd_card_t *card)
  *
  * return the instance pointer if successful, NULL in error.
  */
-vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw,
-			 struct snd_vx_ops *ops,
-			 int extra_size)
+struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw,
+			      struct snd_vx_ops *ops,
+			      int extra_size)
 {
-	vx_core_t *chip;
+	struct vx_core *chip;
 
 	snd_assert(card && hw && ops, return NULL);
 
diff --git a/sound/drivers/vx/vx_hwdep.c b/sound/drivers/vx/vx_hwdep.c
index c4993b004c4..d837783fb53 100644
--- a/sound/drivers/vx/vx_hwdep.c
+++ b/sound/drivers/vx/vx_hwdep.c
@@ -30,7 +30,7 @@
 
 #ifdef SND_VX_FW_LOADER
 
-int snd_vx_setup_firmware(vx_core_t *chip)
+int snd_vx_setup_firmware(struct vx_core *chip)
 {
 	static char *fw_files[VX_TYPE_NUMS][4] = {
 		[VX_TYPE_BOARD] = {
@@ -95,7 +95,7 @@ int snd_vx_setup_firmware(vx_core_t *chip)
 }
 
 /* exported */
-void snd_vx_free_firmware(vx_core_t *chip)
+void snd_vx_free_firmware(struct vx_core *chip)
 {
 #ifdef CONFIG_PM
 	int i;
@@ -106,17 +106,18 @@ void snd_vx_free_firmware(vx_core_t *chip)
 
 #else /* old style firmware loading */
 
-static int vx_hwdep_open(snd_hwdep_t *hw, struct file *file)
+static int vx_hwdep_open(struct snd_hwdep *hw, struct file *file)
 {
 	return 0;
 }
 
-static int vx_hwdep_release(snd_hwdep_t *hw, struct file *file)
+static int vx_hwdep_release(struct snd_hwdep *hw, struct file *file)
 {
 	return 0;
 }
 
-static int vx_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info)
+static int vx_hwdep_dsp_status(struct snd_hwdep *hw,
+			       struct snd_hwdep_dsp_status *info)
 {
 	static char *type_ids[VX_TYPE_NUMS] = {
 		[VX_TYPE_BOARD] = "vxboard",
@@ -125,7 +126,7 @@ static int vx_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info)
 		[VX_TYPE_VXPOCKET] = "vxpocket",
 		[VX_TYPE_VXP440] = "vxp440",
 	};
-	vx_core_t *vx = hw->private_data;
+	struct vx_core *vx = hw->private_data;
 
 	snd_assert(type_ids[vx->type], return -EINVAL);
 	strcpy(info->id, type_ids[vx->type]);
@@ -147,9 +148,10 @@ static void free_fw(const struct firmware *fw)
 	}
 }
 
-static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp)
+static int vx_hwdep_dsp_load(struct snd_hwdep *hw,
+			     struct snd_hwdep_dsp_image *dsp)
 {
-	vx_core_t *vx = hw->private_data;
+	struct vx_core *vx = hw->private_data;
 	int index, err;
 	struct firmware *fw;
 
@@ -216,10 +218,10 @@ static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp)
 
 
 /* exported */
-int snd_vx_setup_firmware(vx_core_t *chip)
+int snd_vx_setup_firmware(struct vx_core *chip)
 {
 	int err;
-	snd_hwdep_t *hw;
+	struct snd_hwdep *hw;
 
 	if ((err = snd_hwdep_new(chip->card, SND_VX_HWDEP_ID, 0, &hw)) < 0)
 		return err;
@@ -238,7 +240,7 @@ int snd_vx_setup_firmware(vx_core_t *chip)
 }
 
 /* exported */
-void snd_vx_free_firmware(vx_core_t *chip)
+void snd_vx_free_firmware(struct vx_core *chip)
 {
 #ifdef CONFIG_PM
 	int i;
diff --git a/sound/drivers/vx/vx_mixer.c b/sound/drivers/vx/vx_mixer.c
index 19fc68c2337..8ec2c605d2f 100644
--- a/sound/drivers/vx/vx_mixer.c
+++ b/sound/drivers/vx/vx_mixer.c
@@ -30,7 +30,7 @@
 /*
  * write a codec data (24bit)
  */
-static void vx_write_codec_reg(vx_core_t *chip, int codec, unsigned int data)
+static void vx_write_codec_reg(struct vx_core *chip, int codec, unsigned int data)
 {
 	unsigned long flags;
 
@@ -47,7 +47,7 @@ static void vx_write_codec_reg(vx_core_t *chip, int codec, unsigned int data)
 /*
  * Data type used to access the Codec
  */
-typedef union {
+union vx_codec_data {
 	u32 l;
 #ifdef SNDRV_BIG_ENDIAN
 	struct w {
@@ -72,7 +72,7 @@ typedef union {
 		u8 hh;
 	} b;
 #endif
-} vx_codec_data_t;
+};
 
 #define SET_CDC_DATA_SEL(di,s)          ((di).b.mh = (u8) (s))
 #define SET_CDC_DATA_REG(di,r)          ((di).b.ml = (u8) (r))
@@ -85,9 +85,9 @@ typedef union {
  * @reg: register index
  * @val: data value
  */
-static void vx_set_codec_reg(vx_core_t *chip, int codec, int reg, int val)
+static void vx_set_codec_reg(struct vx_core *chip, int codec, int reg, int val)
 {
-	vx_codec_data_t data;
+	union vx_codec_data data;
 	/* DAC control register */
 	SET_CDC_DATA_INIT(data);
 	SET_CDC_DATA_REG(data, reg);
@@ -102,7 +102,7 @@ static void vx_set_codec_reg(vx_core_t *chip, int codec, int reg, int val)
  * @left: left output level, 0 = mute
  * @right: right output level
  */
-static void vx_set_analog_output_level(vx_core_t *chip, int codec, int left, int right)
+static void vx_set_analog_output_level(struct vx_core *chip, int codec, int left, int right)
 {
 	left  = chip->hw->output_level_max - left;
 	right = chip->hw->output_level_max - right;
@@ -126,7 +126,7 @@ static void vx_set_analog_output_level(vx_core_t *chip, int codec, int left, int
 #define DAC_ATTEN_MIN	0x08
 #define DAC_ATTEN_MAX	0x38
 
-void vx_toggle_dac_mute(vx_core_t *chip, int mute)
+void vx_toggle_dac_mute(struct vx_core *chip, int mute)
 {
 	unsigned int i;
 	for (i = 0; i < chip->hw->num_codecs; i++) {
@@ -141,7 +141,7 @@ void vx_toggle_dac_mute(vx_core_t *chip, int mute)
 /*
  * vx_reset_codec - reset and initialize the codecs
  */
-void vx_reset_codec(vx_core_t *chip, int cold_reset)
+void vx_reset_codec(struct vx_core *chip, int cold_reset)
 {
 	unsigned int i;
 	int port = chip->type >= VX_TYPE_VXPOCKET ? 0x75 : 0x65;
@@ -175,7 +175,7 @@ void vx_reset_codec(vx_core_t *chip, int cold_reset)
  * change the audio input source
  * @src: the target source (VX_AUDIO_SRC_XXX)
  */
-static void vx_change_audio_source(vx_core_t *chip, int src)
+static void vx_change_audio_source(struct vx_core *chip, int src)
 {
 	unsigned long flags;
 
@@ -192,7 +192,7 @@ static void vx_change_audio_source(vx_core_t *chip, int src)
  * change the audio source if necessary and possible
  * returns 1 if the source is actually changed.
  */
-int vx_sync_audio_source(vx_core_t *chip)
+int vx_sync_audio_source(struct vx_core *chip)
 {
 	if (chip->audio_source_target == chip->audio_source ||
 	    chip->pcm_running)
@@ -217,7 +217,7 @@ struct vx_audio_level {
 	short monitor_level;
 };
 
-static int vx_adjust_audio_level(vx_core_t *chip, int audio, int capture,
+static int vx_adjust_audio_level(struct vx_core *chip, int audio, int capture,
 				 struct vx_audio_level *info)
 {
 	struct vx_rmh rmh;
@@ -256,7 +256,7 @@ static int vx_adjust_audio_level(vx_core_t *chip, int audio, int capture,
 
     
 #if 0 // not used
-static int vx_read_audio_level(vx_core_t *chip, int audio, int capture,
+static int vx_read_audio_level(struct vx_core *chip, int audio, int capture,
 			       struct vx_audio_level *info)
 {
 	int err;
@@ -283,7 +283,7 @@ static int vx_read_audio_level(vx_core_t *chip, int audio, int capture,
  * set the monitoring level and mute state of the given audio
  * no more static, because must be called from vx_pcm to demute monitoring
  */
-int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active)
+int vx_set_monitor_level(struct vx_core *chip, int audio, int level, int active)
 {
 	struct vx_audio_level info;
 
@@ -301,7 +301,7 @@ int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active)
 /*
  * set the mute status of the given audio
  */
-static int vx_set_audio_switch(vx_core_t *chip, int audio, int active)
+static int vx_set_audio_switch(struct vx_core *chip, int audio, int active)
 {
 	struct vx_audio_level info;
 
@@ -315,7 +315,7 @@ static int vx_set_audio_switch(vx_core_t *chip, int audio, int active)
 /*
  * set the mute status of the given audio
  */
-static int vx_set_audio_gain(vx_core_t *chip, int audio, int capture, int level)
+static int vx_set_audio_gain(struct vx_core *chip, int audio, int capture, int level)
 {
 	struct vx_audio_level info;
 
@@ -329,7 +329,7 @@ static int vx_set_audio_gain(vx_core_t *chip, int audio, int capture, int level)
 /*
  * reset all audio levels
  */
-static void vx_reset_audio_levels(vx_core_t *chip)
+static void vx_reset_audio_levels(struct vx_core *chip)
 {
 	unsigned int i, c;
 	struct vx_audio_level info;
@@ -375,7 +375,7 @@ struct vx_vu_meter {
  * @capture: 0 = playback, 1 = capture operation
  * @info: the array of vx_vu_meter records (size = 2).
  */
-static int vx_get_audio_vu_meter(vx_core_t *chip, int audio, int capture, struct vx_vu_meter *info)
+static int vx_get_audio_vu_meter(struct vx_core *chip, int audio, int capture, struct vx_vu_meter *info)
 {
 	struct vx_rmh rmh;
 	int i, err;
@@ -413,9 +413,9 @@ static int vx_get_audio_vu_meter(vx_core_t *chip, int audio, int capture, struct
 /*
  * output level control
  */
-static int vx_output_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int vx_output_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
 	uinfo->value.integer.min = 0;
@@ -423,9 +423,9 @@ static int vx_output_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *u
 	return 0;
 }
 
-static int vx_output_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_output_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	int codec = kcontrol->id.index;
 	down(&chip->mixer_mutex);
 	ucontrol->value.integer.value[0] = chip->output_level[codec][0];
@@ -434,9 +434,9 @@ static int vx_output_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u
 	return 0;
 }
 
-static int vx_output_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_output_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	int codec = kcontrol->id.index;
 	down(&chip->mixer_mutex);
 	if (ucontrol->value.integer.value[0] != chip->output_level[codec][0] ||
@@ -453,7 +453,7 @@ static int vx_output_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u
 	return 0;
 }
 
-static snd_kcontrol_new_t vx_control_output_level = {
+static struct snd_kcontrol_new vx_control_output_level = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =		"Master Playback Volume",
 	.info =		vx_output_level_info,
@@ -464,7 +464,7 @@ static snd_kcontrol_new_t vx_control_output_level = {
 /*
  * audio source select
  */
-static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int vx_audio_src_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts_mic[3] = {
 		"Digital", "Line", "Mic"
@@ -472,7 +472,7 @@ static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
 	static char *texts_vx2[2] = {
 		"Digital", "Analog"
 	};
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
 	uinfo->count = 1;
@@ -492,16 +492,16 @@ static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
 	return 0;
 }
 
-static int vx_audio_src_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_audio_src_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	ucontrol->value.enumerated.item[0] = chip->audio_source_target;
 	return 0;
 }
 
-static int vx_audio_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_audio_src_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	down(&chip->mixer_mutex);
 	if (chip->audio_source_target != ucontrol->value.enumerated.item[0]) {
 		chip->audio_source_target = ucontrol->value.enumerated.item[0];
@@ -513,7 +513,7 @@ static int vx_audio_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
 	return 0;
 }
 
-static snd_kcontrol_new_t vx_control_audio_src = {
+static struct snd_kcontrol_new vx_control_audio_src = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =		"Capture Source",
 	.info =		vx_audio_src_info,
@@ -524,7 +524,7 @@ static snd_kcontrol_new_t vx_control_audio_src = {
 /*
  * clock mode selection
  */
-static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int vx_clock_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[3] = {
 		"Auto", "Internal", "External"
@@ -540,16 +540,16 @@ static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin
 	return 0;
 }
 
-static int vx_clock_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_clock_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	ucontrol->value.enumerated.item[0] = chip->clock_mode;
 	return 0;
 }
 
-static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_clock_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	down(&chip->mixer_mutex);
 	if (chip->clock_mode != ucontrol->value.enumerated.item[0]) {
 		chip->clock_mode = ucontrol->value.enumerated.item[0];
@@ -561,7 +561,7 @@ static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
 	return 0;
 }
 
-static snd_kcontrol_new_t vx_control_clock_mode = {
+static struct snd_kcontrol_new vx_control_clock_mode = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =		"Clock Mode",
 	.info =		vx_clock_mode_info,
@@ -572,7 +572,7 @@ static snd_kcontrol_new_t vx_control_clock_mode = {
 /*
  * Audio Gain
  */
-static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int vx_audio_gain_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
@@ -581,9 +581,9 @@ static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin
 	return 0;
 }
 
-static int vx_audio_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_audio_gain_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	int audio = kcontrol->private_value & 0xff;
 	int capture = (kcontrol->private_value >> 8) & 1;
 
@@ -594,9 +594,9 @@ static int vx_audio_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
 	return 0;
 }
 
-static int vx_audio_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_audio_gain_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	int audio = kcontrol->private_value & 0xff;
 	int capture = (kcontrol->private_value >> 8) & 1;
 
@@ -612,9 +612,9 @@ static int vx_audio_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
 	return 0;
 }
 
-static int vx_audio_monitor_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_audio_monitor_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	int audio = kcontrol->private_value & 0xff;
 
 	down(&chip->mixer_mutex);
@@ -624,9 +624,9 @@ static int vx_audio_monitor_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
 	return 0;
 }
 
-static int vx_audio_monitor_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_audio_monitor_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	int audio = kcontrol->private_value & 0xff;
 
 	down(&chip->mixer_mutex);
@@ -643,7 +643,7 @@ static int vx_audio_monitor_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
 	return 0;
 }
 
-static int vx_audio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int vx_audio_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 2;
@@ -652,9 +652,9 @@ static int vx_audio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo
 	return 0;
 }
 
-static int vx_audio_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_audio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	int audio = kcontrol->private_value & 0xff;
 
 	down(&chip->mixer_mutex);
@@ -664,9 +664,9 @@ static int vx_audio_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont
 	return 0;
 }
 
-static int vx_audio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_audio_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	int audio = kcontrol->private_value & 0xff;
 
 	down(&chip->mixer_mutex);
@@ -681,9 +681,9 @@ static int vx_audio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont
 	return 0;
 }
 
-static int vx_monitor_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_monitor_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	int audio = kcontrol->private_value & 0xff;
 
 	down(&chip->mixer_mutex);
@@ -693,9 +693,9 @@ static int vx_monitor_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
 	return 0;
 }
 
-static int vx_monitor_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_monitor_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	int audio = kcontrol->private_value & 0xff;
 
 	down(&chip->mixer_mutex);
@@ -712,28 +712,28 @@ static int vx_monitor_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
 	return 0;
 }
 
-static snd_kcontrol_new_t vx_control_audio_gain = {
+static struct snd_kcontrol_new vx_control_audio_gain = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	/* name will be filled later */
 	.info =         vx_audio_gain_info,
 	.get =          vx_audio_gain_get,
 	.put =          vx_audio_gain_put
 };
-static snd_kcontrol_new_t vx_control_output_switch = {
+static struct snd_kcontrol_new vx_control_output_switch = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "PCM Playback Switch",
 	.info =         vx_audio_sw_info,
 	.get =          vx_audio_sw_get,
 	.put =          vx_audio_sw_put
 };
-static snd_kcontrol_new_t vx_control_monitor_gain = {
+static struct snd_kcontrol_new vx_control_monitor_gain = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "Monitoring Volume",
 	.info =         vx_audio_gain_info,	/* shared */
 	.get =          vx_audio_monitor_get,
 	.put =          vx_audio_monitor_put
 };
-static snd_kcontrol_new_t vx_control_monitor_switch = {
+static struct snd_kcontrol_new vx_control_monitor_switch = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "Monitoring Switch",
 	.info =         vx_audio_sw_info,	/* shared */
@@ -745,16 +745,16 @@ static snd_kcontrol_new_t vx_control_monitor_switch = {
 /*
  * IEC958 status bits
  */
-static int vx_iec958_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int vx_iec958_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int vx_iec958_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_iec958_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 
 	down(&chip->mixer_mutex);
 	ucontrol->value.iec958.status[0] = (chip->uer_bits >> 0) & 0xff;
@@ -765,7 +765,7 @@ static int vx_iec958_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontro
         return 0;
 }
 
-static int vx_iec958_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_iec958_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
 	ucontrol->value.iec958.status[0] = 0xff;
 	ucontrol->value.iec958.status[1] = 0xff;
@@ -774,9 +774,9 @@ static int vx_iec958_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *u
         return 0;
 }
 
-static int vx_iec958_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_iec958_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	unsigned int val;
 
 	val = (ucontrol->value.iec958.status[0] << 0) |
@@ -794,7 +794,7 @@ static int vx_iec958_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontro
 	return 0;
 }
 
-static snd_kcontrol_new_t vx_control_iec958_mask = {
+static struct snd_kcontrol_new vx_control_iec958_mask = {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ,
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
 	.name =		SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
@@ -802,7 +802,7 @@ static snd_kcontrol_new_t vx_control_iec958_mask = {
 	.get =		vx_iec958_mask_get,
 };
 
-static snd_kcontrol_new_t vx_control_iec958 = {
+static struct snd_kcontrol_new vx_control_iec958 = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
 	.name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
 	.info =         vx_iec958_info,
@@ -818,7 +818,7 @@ static snd_kcontrol_new_t vx_control_iec958 = {
 #define METER_MAX	0xff
 #define METER_SHIFT	16
 
-static int vx_vu_meter_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int vx_vu_meter_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
@@ -827,9 +827,9 @@ static int vx_vu_meter_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo
 	return 0;
 }
 
-static int vx_vu_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_vu_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	struct vx_vu_meter meter[2];
 	int audio = kcontrol->private_value & 0xff;
 	int capture = (kcontrol->private_value >> 8) & 1;
@@ -840,9 +840,9 @@ static int vx_vu_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont
 	return 0;
 }
 
-static int vx_peak_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_peak_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	struct vx_vu_meter meter[2];
 	int audio = kcontrol->private_value & 0xff;
 	int capture = (kcontrol->private_value >> 8) & 1;
@@ -853,7 +853,7 @@ static int vx_peak_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
 	return 0;
 }
 
-static int vx_saturation_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int vx_saturation_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 2;
@@ -862,9 +862,9 @@ static int vx_saturation_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin
 	return 0;
 }
 
-static int vx_saturation_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_saturation_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *chip = snd_kcontrol_chip(kcontrol);
 	struct vx_vu_meter meter[2];
 	int audio = kcontrol->private_value & 0xff;
 
@@ -874,7 +874,7 @@ static int vx_saturation_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
 	return 0;
 }
 
-static snd_kcontrol_new_t vx_control_vu_meter = {
+static struct snd_kcontrol_new vx_control_vu_meter = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
 	/* name will be filled later */
@@ -882,7 +882,7 @@ static snd_kcontrol_new_t vx_control_vu_meter = {
 	.get =		vx_vu_meter_get,
 };
 
-static snd_kcontrol_new_t vx_control_peak_meter = {
+static struct snd_kcontrol_new vx_control_peak_meter = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
 	/* name will be filled later */
@@ -890,7 +890,7 @@ static snd_kcontrol_new_t vx_control_peak_meter = {
 	.get =		vx_peak_meter_get,
 };
 
-static snd_kcontrol_new_t vx_control_saturation = {
+static struct snd_kcontrol_new vx_control_saturation = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =		"Input Saturation",
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
@@ -904,12 +904,12 @@ static snd_kcontrol_new_t vx_control_saturation = {
  *
  */
 
-int snd_vx_mixer_new(vx_core_t *chip)
+int snd_vx_mixer_new(struct vx_core *chip)
 {
 	unsigned int i, c;
 	int err;
-	snd_kcontrol_new_t temp;
-	snd_card_t *card = chip->card;
+	struct snd_kcontrol_new temp;
+	struct snd_card *card = chip->card;
 	char name[32];
 
 	strcpy(card->mixername, card->driver);
diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c
index 2b46758fe86..464109e421d 100644
--- a/sound/drivers/vx/vx_pcm.c
+++ b/sound/drivers/vx/vx_pcm.c
@@ -61,7 +61,8 @@
  */
 
 /* get the physical page pointer on the given offset */
-static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs, unsigned long offset)
+static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs,
+					     unsigned long offset)
 {
 	void *pageptr = subs->runtime->dma_area + offset;
 	return vmalloc_to_page(pageptr);
@@ -72,9 +73,9 @@ static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs, unsigned
  * called from hw_params
  * NOTE: this may be called not only once per pcm open!
  */
-static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size)
+static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t size)
 {
-	snd_pcm_runtime_t *runtime = subs->runtime;
+	struct snd_pcm_runtime *runtime = subs->runtime;
 	if (runtime->dma_area) {
 		/* already allocated */
 		if (runtime->dma_bytes >= size)
@@ -94,9 +95,9 @@ static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size)
  * called from hw_free callback
  * NOTE: this may be called not only once per pcm open!
  */
-static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs)
+static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs)
 {
-	snd_pcm_runtime_t *runtime = subs->runtime;
+	struct snd_pcm_runtime *runtime = subs->runtime;
 	if (runtime->dma_area) {
 		vfree(runtime->dma_area);
 		runtime->dma_area = NULL;
@@ -108,7 +109,8 @@ static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs)
 /*
  * read three pending pcm bytes via inb()
  */
-static void vx_pcm_read_per_bytes(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe)
+static void vx_pcm_read_per_bytes(struct vx_core *chip, struct snd_pcm_runtime *runtime,
+				  struct vx_pipe *pipe)
 {
 	int offset = pipe->hw_ptr;
 	unsigned char *buf = (unsigned char *)(runtime->dma_area + offset);
@@ -135,7 +137,8 @@ static void vx_pcm_read_per_bytes(vx_core_t *chip, snd_pcm_runtime_t *runtime, v
  * @pc_time: the pointer for the PC-time to set
  * @dsp_time: the pointer for RMH status time array
  */
-static void vx_set_pcx_time(vx_core_t *chip, pcx_time_t *pc_time, unsigned int *dsp_time)
+static void vx_set_pcx_time(struct vx_core *chip, pcx_time_t *pc_time,
+			    unsigned int *dsp_time)
 {
 	dsp_time[0] = (unsigned int)((*pc_time) >> 24) & PCX_TIME_HI_MASK;
 	dsp_time[1] = (unsigned int)(*pc_time) &  MASK_DSP_WORD;
@@ -151,7 +154,8 @@ static void vx_set_pcx_time(vx_core_t *chip, pcx_time_t *pc_time, unsigned int *
  *
  * returns the increase of the command length.
  */
-static int vx_set_differed_time(vx_core_t *chip, struct vx_rmh *rmh, vx_pipe_t *pipe)
+static int vx_set_differed_time(struct vx_core *chip, struct vx_rmh *rmh,
+				struct vx_pipe *pipe)
 {
 	/* Update The length added to the RMH command by the timestamp */
 	if (! (pipe->differed_type & DC_DIFFERED_DELAY))
@@ -184,7 +188,8 @@ static int vx_set_differed_time(vx_core_t *chip, struct vx_rmh *rmh, vx_pipe_t *
  * @pipe: the affected pipe
  * @data: format bitmask
  */
-static int vx_set_stream_format(vx_core_t *chip, vx_pipe_t *pipe, unsigned int data)
+static int vx_set_stream_format(struct vx_core *chip, struct vx_pipe *pipe,
+				unsigned int data)
 {
 	struct vx_rmh rmh;
 
@@ -210,8 +215,8 @@ static int vx_set_stream_format(vx_core_t *chip, vx_pipe_t *pipe, unsigned int d
  *
  * returns 0 if successful, or a negative error code.
  */
-static int vx_set_format(vx_core_t *chip, vx_pipe_t *pipe,
-			 snd_pcm_runtime_t *runtime)
+static int vx_set_format(struct vx_core *chip, struct vx_pipe *pipe,
+			 struct snd_pcm_runtime *runtime)
 {
 	unsigned int header = HEADER_FMT_BASE;
 
@@ -239,7 +244,7 @@ static int vx_set_format(vx_core_t *chip, vx_pipe_t *pipe,
 /*
  * set / query the IBL size
  */
-static int vx_set_ibl(vx_core_t *chip, struct vx_ibl_info *info)
+static int vx_set_ibl(struct vx_core *chip, struct vx_ibl_info *info)
 {
 	int err;
 	struct vx_rmh rmh;
@@ -269,7 +274,7 @@ static int vx_set_ibl(vx_core_t *chip, struct vx_ibl_info *info)
  *
  * called from trigger callback only
  */
-static int vx_get_pipe_state(vx_core_t *chip, vx_pipe_t *pipe, int *state)
+static int vx_get_pipe_state(struct vx_core *chip, struct vx_pipe *pipe, int *state)
 {
 	int err;
 	struct vx_rmh rmh;
@@ -294,7 +299,7 @@ static int vx_get_pipe_state(vx_core_t *chip, vx_pipe_t *pipe, int *state)
  *       you'll need to disconnect the host to get back to the
  *       normal mode.
  */
-static int vx_query_hbuffer_size(vx_core_t *chip, vx_pipe_t *pipe)
+static int vx_query_hbuffer_size(struct vx_core *chip, struct vx_pipe *pipe)
 {
 	int result;
 	struct vx_rmh rmh;
@@ -318,7 +323,7 @@ static int vx_query_hbuffer_size(vx_core_t *chip, vx_pipe_t *pipe)
  *
  * called from trigger callback only
  */
-static int vx_pipe_can_start(vx_core_t *chip, vx_pipe_t *pipe)
+static int vx_pipe_can_start(struct vx_core *chip, struct vx_pipe *pipe)
 {
 	int err;
 	struct vx_rmh rmh;
@@ -339,7 +344,7 @@ static int vx_pipe_can_start(vx_core_t *chip, vx_pipe_t *pipe)
  * vx_conf_pipe - tell the pipe to stand by and wait for IRQA.
  * @pipe: the pipe to be configured
  */
-static int vx_conf_pipe(vx_core_t *chip, vx_pipe_t *pipe)
+static int vx_conf_pipe(struct vx_core *chip, struct vx_pipe *pipe)
 {
 	struct vx_rmh rmh;
 
@@ -353,7 +358,7 @@ static int vx_conf_pipe(vx_core_t *chip, vx_pipe_t *pipe)
 /*
  * vx_send_irqa - trigger IRQA
  */
-static int vx_send_irqa(vx_core_t *chip)
+static int vx_send_irqa(struct vx_core *chip)
 {
 	struct vx_rmh rmh;
 
@@ -378,7 +383,7 @@ static int vx_send_irqa(vx_core_t *chip)
  * called from trigger callback only
  *
  */
-static int vx_toggle_pipe(vx_core_t *chip, vx_pipe_t *pipe, int state)
+static int vx_toggle_pipe(struct vx_core *chip, struct vx_pipe *pipe, int state)
 {
 	int err, i, cur_state;
 
@@ -431,7 +436,7 @@ static int vx_toggle_pipe(vx_core_t *chip, vx_pipe_t *pipe, int state)
  *
  * called from trigger callback only
  */
-static int vx_stop_pipe(vx_core_t *chip, vx_pipe_t *pipe)
+static int vx_stop_pipe(struct vx_core *chip, struct vx_pipe *pipe)
 {
 	struct vx_rmh rmh;
 	vx_init_rmh(&rmh, CMD_STOP_PIPE);
@@ -449,12 +454,12 @@ static int vx_stop_pipe(vx_core_t *chip, vx_pipe_t *pipe)
  *
  * return 0 on success, or a negative error code.
  */
-static int vx_alloc_pipe(vx_core_t *chip, int capture,
+static int vx_alloc_pipe(struct vx_core *chip, int capture,
 			 int audioid, int num_audio,
-			 vx_pipe_t **pipep)
+			 struct vx_pipe **pipep)
 {
 	int err;
-	vx_pipe_t *pipe;
+	struct vx_pipe *pipe;
 	struct vx_rmh rmh;
 	int data_mode;
 
@@ -499,7 +504,7 @@ static int vx_alloc_pipe(vx_core_t *chip, int capture,
  * vx_free_pipe - release a pipe
  * @pipe: pipe to be released
  */
-static int vx_free_pipe(vx_core_t *chip, vx_pipe_t *pipe)
+static int vx_free_pipe(struct vx_core *chip, struct vx_pipe *pipe)
 {
 	struct vx_rmh rmh;
 
@@ -517,7 +522,7 @@ static int vx_free_pipe(vx_core_t *chip, vx_pipe_t *pipe)
  *
  * called from trigger callback only
  */
-static int vx_start_stream(vx_core_t *chip, vx_pipe_t *pipe)
+static int vx_start_stream(struct vx_core *chip, struct vx_pipe *pipe)
 {
 	struct vx_rmh rmh;
 
@@ -533,7 +538,7 @@ static int vx_start_stream(vx_core_t *chip, vx_pipe_t *pipe)
  *
  * called from trigger callback only
  */
-static int vx_stop_stream(vx_core_t *chip, vx_pipe_t *pipe)
+static int vx_stop_stream(struct vx_core *chip, struct vx_pipe *pipe)
 {
 	struct vx_rmh rmh;
 
@@ -547,11 +552,12 @@ static int vx_stop_stream(vx_core_t *chip, vx_pipe_t *pipe)
  * playback hw information
  */
 
-static snd_pcm_hardware_t vx_pcm_playback_hw = {
+static struct snd_pcm_hardware vx_pcm_playback_hw = {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/
 				 /*SNDRV_PCM_INFO_RESUME*/),
-	.formats =		/*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE,
+	.formats =		(/*SNDRV_PCM_FMTBIT_U8 |*/
+				 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE),
 	.rates =		SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
 	.rate_min =		5000,
 	.rate_max =		48000,
@@ -571,11 +577,11 @@ static void vx_pcm_delayed_start(unsigned long arg);
 /*
  * vx_pcm_playback_open - open callback for playback
  */
-static int vx_pcm_playback_open(snd_pcm_substream_t *subs)
+static int vx_pcm_playback_open(struct snd_pcm_substream *subs)
 {
-	snd_pcm_runtime_t *runtime = subs->runtime;
-	vx_core_t *chip = snd_pcm_substream_chip(subs);
-	vx_pipe_t *pipe = NULL;
+	struct snd_pcm_runtime *runtime = subs->runtime;
+	struct vx_core *chip = snd_pcm_substream_chip(subs);
+	struct vx_pipe *pipe = NULL;
 	unsigned int audio;
 	int err;
 
@@ -615,10 +621,10 @@ static int vx_pcm_playback_open(snd_pcm_substream_t *subs)
 /*
  * vx_pcm_playback_close - close callback for playback
  */
-static int vx_pcm_playback_close(snd_pcm_substream_t *subs)
+static int vx_pcm_playback_close(struct snd_pcm_substream *subs)
 {
-	vx_core_t *chip = snd_pcm_substream_chip(subs);
-	vx_pipe_t *pipe;
+	struct vx_core *chip = snd_pcm_substream_chip(subs);
+	struct vx_pipe *pipe;
 
 	if (! subs->runtime->private_data)
 		return -EINVAL;
@@ -641,7 +647,7 @@ static int vx_pcm_playback_close(snd_pcm_substream_t *subs)
  *
  * NB: call with a certain lock.
  */
-static int vx_notify_end_of_buffer(vx_core_t *chip, vx_pipe_t *pipe)
+static int vx_notify_end_of_buffer(struct vx_core *chip, struct vx_pipe *pipe)
 {
 	int err;
 	struct vx_rmh rmh;  /* use a temporary rmh here */
@@ -669,7 +675,9 @@ static int vx_notify_end_of_buffer(vx_core_t *chip, vx_pipe_t *pipe)
  *
  * return 0 if ok.
  */
-static int vx_pcm_playback_transfer_chunk(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe, int size)
+static int vx_pcm_playback_transfer_chunk(struct vx_core *chip,
+					  struct snd_pcm_runtime *runtime,
+					  struct vx_pipe *pipe, int size)
 {
 	int space, err = 0;
 
@@ -705,7 +713,9 @@ static int vx_pcm_playback_transfer_chunk(vx_core_t *chip, snd_pcm_runtime_t *ru
  * so that the caller can check the total transferred size later
  * (to call snd_pcm_period_elapsed).
  */
-static int vx_update_pipe_position(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe)
+static int vx_update_pipe_position(struct vx_core *chip,
+				   struct snd_pcm_runtime *runtime,
+				   struct vx_pipe *pipe)
 {
 	struct vx_rmh rmh;
 	int err, update;
@@ -731,10 +741,12 @@ static int vx_update_pipe_position(vx_core_t *chip, snd_pcm_runtime_t *runtime,
  * transfer the pending playback buffer data to DSP
  * called from interrupt handler
  */
-static void vx_pcm_playback_transfer(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe, int nchunks)
+static void vx_pcm_playback_transfer(struct vx_core *chip,
+				     struct snd_pcm_substream *subs,
+				     struct vx_pipe *pipe, int nchunks)
 {
 	int i, err;
-	snd_pcm_runtime_t *runtime = subs->runtime;
+	struct snd_pcm_runtime *runtime = subs->runtime;
 
 	if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE))
 		return;
@@ -749,10 +761,12 @@ static void vx_pcm_playback_transfer(vx_core_t *chip, snd_pcm_substream_t *subs,
  * update the playback position and call snd_pcm_period_elapsed() if necessary
  * called from interrupt handler
  */
-static void vx_pcm_playback_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe)
+static void vx_pcm_playback_update(struct vx_core *chip,
+				   struct snd_pcm_substream *subs,
+				   struct vx_pipe *pipe)
 {
 	int err;
-	snd_pcm_runtime_t *runtime = subs->runtime;
+	struct snd_pcm_runtime *runtime = subs->runtime;
 
 	if (pipe->running && ! (chip->chip_status & VX_STAT_IS_STALE)) {
 		if ((err = vx_update_pipe_position(chip, runtime, pipe)) < 0)
@@ -771,9 +785,9 @@ static void vx_pcm_playback_update(vx_core_t *chip, snd_pcm_substream_t *subs, v
  */
 static void vx_pcm_delayed_start(unsigned long arg)
 {
-	snd_pcm_substream_t *subs = (snd_pcm_substream_t *)arg;
-	vx_core_t *chip = subs->pcm->private_data;
-	vx_pipe_t *pipe = subs->runtime->private_data;
+	struct snd_pcm_substream *subs = (struct snd_pcm_substream *)arg;
+	struct vx_core *chip = subs->pcm->private_data;
+	struct vx_pipe *pipe = subs->runtime->private_data;
 	int err;
 
 	/*  printk( KERN_DEBUG "DDDD tasklet delayed start jiffies = %ld\n", jiffies);*/
@@ -792,10 +806,10 @@ static void vx_pcm_delayed_start(unsigned long arg)
 /*
  * vx_pcm_playback_trigger - trigger callback for playback
  */
-static int vx_pcm_trigger(snd_pcm_substream_t *subs, int cmd)
+static int vx_pcm_trigger(struct snd_pcm_substream *subs, int cmd)
 {
-	vx_core_t *chip = snd_pcm_substream_chip(subs);
-	vx_pipe_t *pipe = subs->runtime->private_data;
+	struct vx_core *chip = snd_pcm_substream_chip(subs);
+	struct vx_pipe *pipe = subs->runtime->private_data;
 	int err;
 
 	if (chip->chip_status & VX_STAT_IS_STALE)
@@ -839,18 +853,18 @@ static int vx_pcm_trigger(snd_pcm_substream_t *subs, int cmd)
 /*
  * vx_pcm_playback_pointer - pointer callback for playback
  */
-static snd_pcm_uframes_t vx_pcm_playback_pointer(snd_pcm_substream_t *subs)
+static snd_pcm_uframes_t vx_pcm_playback_pointer(struct snd_pcm_substream *subs)
 {
-	snd_pcm_runtime_t *runtime = subs->runtime;
-	vx_pipe_t *pipe = runtime->private_data;
+	struct snd_pcm_runtime *runtime = subs->runtime;
+	struct vx_pipe *pipe = runtime->private_data;
 	return pipe->position;
 }
 
 /*
  * vx_pcm_hw_params - hw_params callback for playback and capture
  */
-static int vx_pcm_hw_params(snd_pcm_substream_t *subs,
-				     snd_pcm_hw_params_t *hw_params)
+static int vx_pcm_hw_params(struct snd_pcm_substream *subs,
+				     struct snd_pcm_hw_params *hw_params)
 {
 	return snd_pcm_alloc_vmalloc_buffer(subs, params_buffer_bytes(hw_params));
 }
@@ -858,7 +872,7 @@ static int vx_pcm_hw_params(snd_pcm_substream_t *subs,
 /*
  * vx_pcm_hw_free - hw_free callback for playback and capture
  */
-static int vx_pcm_hw_free(snd_pcm_substream_t *subs)
+static int vx_pcm_hw_free(struct snd_pcm_substream *subs)
 {
 	return snd_pcm_free_vmalloc_buffer(subs);
 }
@@ -866,11 +880,11 @@ static int vx_pcm_hw_free(snd_pcm_substream_t *subs)
 /*
  * vx_pcm_prepare - prepare callback for playback and capture
  */
-static int vx_pcm_prepare(snd_pcm_substream_t *subs)
+static int vx_pcm_prepare(struct snd_pcm_substream *subs)
 {
-	vx_core_t *chip = snd_pcm_substream_chip(subs);
-	snd_pcm_runtime_t *runtime = subs->runtime;
-	vx_pipe_t *pipe = runtime->private_data;
+	struct vx_core *chip = snd_pcm_substream_chip(subs);
+	struct snd_pcm_runtime *runtime = subs->runtime;
+	struct vx_pipe *pipe = runtime->private_data;
 	int err, data_mode;
 	// int max_size, nchunks;
 
@@ -897,7 +911,8 @@ static int vx_pcm_prepare(snd_pcm_substream_t *subs)
 	}
 
 	if (chip->pcm_running && chip->freq != runtime->rate) {
-		snd_printk(KERN_ERR "vx: cannot set different clock %d from the current %d\n", runtime->rate, chip->freq);
+		snd_printk(KERN_ERR "vx: cannot set different clock %d "
+			   "from the current %d\n", runtime->rate, chip->freq);
 		return -EINVAL;
 	}
 	vx_set_clock(chip, runtime->rate);
@@ -930,7 +945,7 @@ static int vx_pcm_prepare(snd_pcm_substream_t *subs)
 /*
  * operators for PCM playback
  */
-static snd_pcm_ops_t vx_pcm_playback_ops = {
+static struct snd_pcm_ops vx_pcm_playback_ops = {
 	.open =		vx_pcm_playback_open,
 	.close =	vx_pcm_playback_close,
 	.ioctl =	snd_pcm_lib_ioctl,
@@ -947,11 +962,12 @@ static snd_pcm_ops_t vx_pcm_playback_ops = {
  * playback hw information
  */
 
-static snd_pcm_hardware_t vx_pcm_capture_hw = {
+static struct snd_pcm_hardware vx_pcm_capture_hw = {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/
 				 /*SNDRV_PCM_INFO_RESUME*/),
-	.formats =		/*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE,
+	.formats =		(/*SNDRV_PCM_FMTBIT_U8 |*/
+				 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE),
 	.rates =		SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
 	.rate_min =		5000,
 	.rate_max =		48000,
@@ -969,12 +985,12 @@ static snd_pcm_hardware_t vx_pcm_capture_hw = {
 /*
  * vx_pcm_capture_open - open callback for capture
  */
-static int vx_pcm_capture_open(snd_pcm_substream_t *subs)
+static int vx_pcm_capture_open(struct snd_pcm_substream *subs)
 {
-	snd_pcm_runtime_t *runtime = subs->runtime;
-	vx_core_t *chip = snd_pcm_substream_chip(subs);
-	vx_pipe_t *pipe;
-	vx_pipe_t *pipe_out_monitoring = NULL;
+	struct snd_pcm_runtime *runtime = subs->runtime;
+	struct vx_core *chip = snd_pcm_substream_chip(subs);
+	struct vx_pipe *pipe;
+	struct vx_pipe *pipe_out_monitoring = NULL;
 	unsigned int audio;
 	int err;
 
@@ -1005,9 +1021,11 @@ static int vx_pcm_capture_open(snd_pcm_substream_t *subs)
 		   if an output pipe is available, it's audios still may need to be 
 		   unmuted. hence we'll have to call a mixer entry point.
 		*/
-		vx_set_monitor_level(chip, audio, chip->audio_monitor[audio], chip->audio_monitor_active[audio]);
+		vx_set_monitor_level(chip, audio, chip->audio_monitor[audio],
+				     chip->audio_monitor_active[audio]);
 		/* assuming stereo */
-		vx_set_monitor_level(chip, audio+1, chip->audio_monitor[audio+1], chip->audio_monitor_active[audio+1]); 
+		vx_set_monitor_level(chip, audio+1, chip->audio_monitor[audio+1],
+				     chip->audio_monitor_active[audio+1]); 
 	}
 
 	pipe->monitoring_pipe = pipe_out_monitoring; /* default value NULL */
@@ -1026,11 +1044,11 @@ static int vx_pcm_capture_open(snd_pcm_substream_t *subs)
 /*
  * vx_pcm_capture_close - close callback for capture
  */
-static int vx_pcm_capture_close(snd_pcm_substream_t *subs)
+static int vx_pcm_capture_close(struct snd_pcm_substream *subs)
 {
-	vx_core_t *chip = snd_pcm_substream_chip(subs);
-	vx_pipe_t *pipe;
-	vx_pipe_t *pipe_out_monitoring;
+	struct vx_core *chip = snd_pcm_substream_chip(subs);
+	struct vx_pipe *pipe;
+	struct vx_pipe *pipe_out_monitoring;
 	
 	if (! subs->runtime->private_data)
 		return -EINVAL;
@@ -1062,10 +1080,11 @@ static int vx_pcm_capture_close(snd_pcm_substream_t *subs)
 /*
  * vx_pcm_capture_update - update the capture buffer
  */
-static void vx_pcm_capture_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe)
+static void vx_pcm_capture_update(struct vx_core *chip, struct snd_pcm_substream *subs,
+				  struct vx_pipe *pipe)
 {
 	int size, space, count;
-	snd_pcm_runtime_t *runtime = subs->runtime;
+	struct snd_pcm_runtime *runtime = subs->runtime;
 
 	if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE))
 		return;
@@ -1135,17 +1154,17 @@ static void vx_pcm_capture_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx
 /*
  * vx_pcm_capture_pointer - pointer callback for capture
  */
-static snd_pcm_uframes_t vx_pcm_capture_pointer(snd_pcm_substream_t *subs)
+static snd_pcm_uframes_t vx_pcm_capture_pointer(struct snd_pcm_substream *subs)
 {
-	snd_pcm_runtime_t *runtime = subs->runtime;
-	vx_pipe_t *pipe = runtime->private_data;
+	struct snd_pcm_runtime *runtime = subs->runtime;
+	struct vx_pipe *pipe = runtime->private_data;
 	return bytes_to_frames(runtime, pipe->hw_ptr);
 }
 
 /*
  * operators for PCM capture
  */
-static snd_pcm_ops_t vx_pcm_capture_ops = {
+static struct snd_pcm_ops vx_pcm_capture_ops = {
 	.open =		vx_pcm_capture_open,
 	.close =	vx_pcm_capture_close,
 	.ioctl =	snd_pcm_lib_ioctl,
@@ -1161,10 +1180,10 @@ static snd_pcm_ops_t vx_pcm_capture_ops = {
 /*
  * interrupt handler for pcm streams
  */
-void vx_pcm_update_intr(vx_core_t *chip, unsigned int events)
+void vx_pcm_update_intr(struct vx_core *chip, unsigned int events)
 {
 	unsigned int i;
-	vx_pipe_t *pipe;
+	struct vx_pipe *pipe;
 
 #define EVENT_MASK	(END_OF_BUFFER_EVENTS_PENDING|ASYNC_EVENTS_PENDING)
 
@@ -1218,7 +1237,7 @@ void vx_pcm_update_intr(vx_core_t *chip, unsigned int events)
 /*
  * vx_init_audio_io - check the availabe audio i/o and allocate pipe arrays
  */
-static int vx_init_audio_io(vx_core_t *chip)
+static int vx_init_audio_io(struct vx_core *chip)
 {
 	struct vx_rmh rmh;
 	int preferred;
@@ -1234,19 +1253,20 @@ static int vx_init_audio_io(vx_core_t *chip)
 	chip->audio_info = rmh.Stat[1];
 
 	/* allocate pipes */
-	chip->playback_pipes = kmalloc(sizeof(vx_pipe_t *) * chip->audio_outs, GFP_KERNEL);
-	chip->capture_pipes = kmalloc(sizeof(vx_pipe_t *) * chip->audio_ins, GFP_KERNEL);
+	chip->playback_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_outs, GFP_KERNEL);
+	chip->capture_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_ins, GFP_KERNEL);
 	if (! chip->playback_pipes || ! chip->capture_pipes)
 		return -ENOMEM;
 
-	memset(chip->playback_pipes, 0, sizeof(vx_pipe_t *) * chip->audio_outs);
-	memset(chip->capture_pipes, 0, sizeof(vx_pipe_t *) * chip->audio_ins);
+	memset(chip->playback_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_outs);
+	memset(chip->capture_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_ins);
 
 	preferred = chip->ibl.size;
 	chip->ibl.size = 0;
 	vx_set_ibl(chip, &chip->ibl); /* query the info */
 	if (preferred > 0) {
-		chip->ibl.size = ((preferred + chip->ibl.granularity - 1) / chip->ibl.granularity) * chip->ibl.granularity;
+		chip->ibl.size = ((preferred + chip->ibl.granularity - 1) /
+				  chip->ibl.granularity) * chip->ibl.granularity;
 		if (chip->ibl.size > chip->ibl.max_size)
 			chip->ibl.size = chip->ibl.max_size;
 	} else
@@ -1260,9 +1280,9 @@ static int vx_init_audio_io(vx_core_t *chip)
 /*
  * free callback for pcm
  */
-static void snd_vx_pcm_free(snd_pcm_t *pcm)
+static void snd_vx_pcm_free(struct snd_pcm *pcm)
 {
-	vx_core_t *chip = pcm->private_data;
+	struct vx_core *chip = pcm->private_data;
 	chip->pcm[pcm->device] = NULL;
 	kfree(chip->playback_pipes);
 	chip->playback_pipes = NULL;
@@ -1273,9 +1293,9 @@ static void snd_vx_pcm_free(snd_pcm_t *pcm)
 /*
  * snd_vx_pcm_new - create and initialize a pcm
  */
-int snd_vx_pcm_new(vx_core_t *chip)
+int snd_vx_pcm_new(struct vx_core *chip)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	unsigned int i;
 	int err;
 
diff --git a/sound/drivers/vx/vx_uer.c b/sound/drivers/vx/vx_uer.c
index 4fc38bde34f..7400306b7f2 100644
--- a/sound/drivers/vx/vx_uer.c
+++ b/sound/drivers/vx/vx_uer.c
@@ -31,7 +31,7 @@
  * vx_modify_board_clock - tell the board that its clock has been modified
  * @sync: DSP needs to resynchronize its FIFO
  */
-static int vx_modify_board_clock(vx_core_t *chip, int sync)
+static int vx_modify_board_clock(struct vx_core *chip, int sync)
 {
 	struct vx_rmh rmh;
 
@@ -45,7 +45,7 @@ static int vx_modify_board_clock(vx_core_t *chip, int sync)
 /*
  * vx_modify_board_inputs - resync audio inputs
  */
-static int vx_modify_board_inputs(vx_core_t *chip)
+static int vx_modify_board_inputs(struct vx_core *chip)
 {
 	struct vx_rmh rmh;
 
@@ -59,7 +59,7 @@ static int vx_modify_board_inputs(vx_core_t *chip)
  * @index: the bit index
  * returns 0 or 1.
  */
-static int vx_read_one_cbit(vx_core_t *chip, int index)
+static int vx_read_one_cbit(struct vx_core *chip, int index)
 {
 	unsigned long flags;
 	int val;
@@ -82,7 +82,7 @@ static int vx_read_one_cbit(vx_core_t *chip, int index)
  * @index: the bit index
  * @val: bit value, 0 or 1
  */
-static void vx_write_one_cbit(vx_core_t *chip, int index, int val)
+static void vx_write_one_cbit(struct vx_core *chip, int index, int val)
 {
 	unsigned long flags;
 	val = !!val;	/* 0 or 1 */
@@ -104,7 +104,7 @@ static void vx_write_one_cbit(vx_core_t *chip, int index, int val)
  * returns the frequency of UER, or 0 if not sync,
  * or a negative error code.
  */
-static int vx_read_uer_status(vx_core_t *chip, int *mode)
+static int vx_read_uer_status(struct vx_core *chip, int *mode)
 {
 	int val, freq;
 
@@ -160,7 +160,7 @@ static int vx_read_uer_status(vx_core_t *chip, int *mode)
  *    default        : HexFreq = (dword) ((double) 28224000 / (double) (Frequency*4)) - 0x000001FF
  */
 
-static int vx_calc_clock_from_freq(vx_core_t *chip, int freq)
+static int vx_calc_clock_from_freq(struct vx_core *chip, int freq)
 {
 	int hexfreq;
 
@@ -187,7 +187,7 @@ static int vx_calc_clock_from_freq(vx_core_t *chip, int freq)
  * vx_change_clock_source - change the clock source
  * @source: the new source
  */
-static void vx_change_clock_source(vx_core_t *chip, int source)
+static void vx_change_clock_source(struct vx_core *chip, int source)
 {
 	unsigned long flags;
 
@@ -205,7 +205,7 @@ static void vx_change_clock_source(vx_core_t *chip, int source)
 /*
  * set the internal clock
  */
-void vx_set_internal_clock(vx_core_t *chip, unsigned int freq)
+void vx_set_internal_clock(struct vx_core *chip, unsigned int freq)
 {
 	int clock;
 	unsigned long flags;
@@ -228,7 +228,7 @@ void vx_set_internal_clock(vx_core_t *chip, unsigned int freq)
  * set the iec958 status bits
  * @bits: 32-bit status bits
  */
-void vx_set_iec958_status(vx_core_t *chip, unsigned int bits)
+void vx_set_iec958_status(struct vx_core *chip, unsigned int bits)
 {
 	int i;
 
@@ -243,7 +243,7 @@ void vx_set_iec958_status(vx_core_t *chip, unsigned int bits)
 /*
  * vx_set_clock - change the clock and audio source if necessary
  */
-int vx_set_clock(vx_core_t *chip, unsigned int freq)
+int vx_set_clock(struct vx_core *chip, unsigned int freq)
 {
 	int src_changed = 0;
 
@@ -285,7 +285,7 @@ int vx_set_clock(vx_core_t *chip, unsigned int freq)
 /*
  * vx_change_frequency - called from interrupt handler
  */
-int vx_change_frequency(vx_core_t *chip)
+int vx_change_frequency(struct vx_core *chip)
 {
 	int freq;
 
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c
index dca6bd2c758..4ebbabedb3c 100644
--- a/sound/pci/vx222/vx222.c
+++ b/sound/pci/vx222/vx222.c
@@ -108,7 +108,7 @@ static struct snd_vx_hardware vx222_mic_hw = {
 
 /*
  */
-static int snd_vx222_free(vx_core_t *chip)
+static int snd_vx222_free(struct vx_core *chip)
 {
 	struct snd_vx222 *vx = (struct snd_vx222 *)chip;
 
@@ -121,21 +121,21 @@ static int snd_vx222_free(vx_core_t *chip)
 	return 0;
 }
 
-static int snd_vx222_dev_free(snd_device_t *device)
+static int snd_vx222_dev_free(struct snd_device *device)
 {
-	vx_core_t *chip = device->device_data;
+	struct vx_core *chip = device->device_data;
 	return snd_vx222_free(chip);
 }
 
 
-static int __devinit snd_vx222_create(snd_card_t *card, struct pci_dev *pci,
+static int __devinit snd_vx222_create(struct snd_card *card, struct pci_dev *pci,
 				      struct snd_vx_hardware *hw,
 				      struct snd_vx222 **rchip)
 {
-	vx_core_t *chip;
+	struct vx_core *chip;
 	struct snd_vx222 *vx;
 	int i, err;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_vx222_dev_free,
 	};
 	struct snd_vx_ops *vx_ops;
@@ -147,7 +147,7 @@ static int __devinit snd_vx222_create(snd_card_t *card, struct pci_dev *pci,
 
 	vx_ops = hw->type == VX_TYPE_BOARD ? &vx222_old_ops : &vx222_ops;
 	chip = snd_vx_create(card, hw, vx_ops,
-			     sizeof(struct snd_vx222) - sizeof(vx_core_t));
+			     sizeof(struct snd_vx222) - sizeof(struct vx_core));
 	if (! chip) {
 		pci_disable_device(pci);
 		return -ENOMEM;
@@ -186,7 +186,7 @@ static int __devinit snd_vx222_probe(struct pci_dev *pci,
 				     const struct pci_device_id *pci_id)
 {
 	static int dev;
-	snd_card_t *card;
+	struct snd_card *card;
 	struct snd_vx_hardware *hw;
 	struct snd_vx222 *vx;
 	int err;
diff --git a/sound/pci/vx222/vx222.h b/sound/pci/vx222/vx222.h
index 18478ae124a..2f0d78f609a 100644
--- a/sound/pci/vx222/vx222.h
+++ b/sound/pci/vx222/vx222.h
@@ -25,7 +25,7 @@
 
 struct snd_vx222 {
 
-	vx_core_t core;
+	struct vx_core core;
 
 	/* h/w config; for PLX and for DSP */
 	struct pci_dev *pci;
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c
index 2d4d0c29b4c..c705af409b0 100644
--- a/sound/pci/vx222/vx222_ops.c
+++ b/sound/pci/vx222/vx222_ops.c
@@ -82,7 +82,7 @@ static int vx2_reg_index[VX_REG_MAX] = {
 	[VX_GPIOC]	= 0,	/* on the PLX */
 };
 
-static inline unsigned long vx2_reg_addr(vx_core_t *_chip, int reg)
+static inline unsigned long vx2_reg_addr(struct vx_core *_chip, int reg)
 {
 	struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
 	return chip->port[vx2_reg_index[reg]] + vx2_reg_offset[reg];
@@ -92,7 +92,7 @@ static inline unsigned long vx2_reg_addr(vx_core_t *_chip, int reg)
  * snd_vx_inb - read a byte from the register
  * @offset: register enum
  */
-static unsigned char vx2_inb(vx_core_t *chip, int offset)
+static unsigned char vx2_inb(struct vx_core *chip, int offset)
 {
 	return inb(vx2_reg_addr(chip, offset));
 }
@@ -102,7 +102,7 @@ static unsigned char vx2_inb(vx_core_t *chip, int offset)
  * @offset: the register offset
  * @val: the value to write
  */
-static void vx2_outb(vx_core_t *chip, int offset, unsigned char val)
+static void vx2_outb(struct vx_core *chip, int offset, unsigned char val)
 {
 	outb(val, vx2_reg_addr(chip, offset));
 	//printk("outb: %x -> %x\n", val, vx2_reg_addr(chip, offset));
@@ -112,7 +112,7 @@ static void vx2_outb(vx_core_t *chip, int offset, unsigned char val)
  * snd_vx_inl - read a 32bit word from the register
  * @offset: register enum
  */
-static unsigned int vx2_inl(vx_core_t *chip, int offset)
+static unsigned int vx2_inl(struct vx_core *chip, int offset)
 {
 	return inl(vx2_reg_addr(chip, offset));
 }
@@ -122,7 +122,7 @@ static unsigned int vx2_inl(vx_core_t *chip, int offset)
  * @offset: the register enum
  * @val: the value to write
  */
-static void vx2_outl(vx_core_t *chip, int offset, unsigned int val)
+static void vx2_outl(struct vx_core *chip, int offset, unsigned int val)
 {
 	// printk("outl: %x -> %x\n", val, vx2_reg_addr(chip, offset));
 	outl(val, vx2_reg_addr(chip, offset));
@@ -132,13 +132,13 @@ static void vx2_outl(vx_core_t *chip, int offset, unsigned int val)
  * redefine macros to call directly
  */
 #undef vx_inb
-#define vx_inb(chip,reg)	vx2_inb((vx_core_t*)(chip), VX_##reg)
+#define vx_inb(chip,reg)	vx2_inb((struct vx_core*)(chip), VX_##reg)
 #undef vx_outb
-#define vx_outb(chip,reg,val)	vx2_outb((vx_core_t*)(chip), VX_##reg, val)
+#define vx_outb(chip,reg,val)	vx2_outb((struct vx_core*)(chip), VX_##reg, val)
 #undef vx_inl
-#define vx_inl(chip,reg)	vx2_inl((vx_core_t*)(chip), VX_##reg)
+#define vx_inl(chip,reg)	vx2_inl((struct vx_core*)(chip), VX_##reg)
 #undef vx_outl
-#define vx_outl(chip,reg,val)	vx2_outl((vx_core_t*)(chip), VX_##reg, val)
+#define vx_outl(chip,reg,val)	vx2_outl((struct vx_core*)(chip), VX_##reg, val)
 
 
 /*
@@ -147,7 +147,7 @@ static void vx2_outl(vx_core_t *chip, int offset, unsigned int val)
 
 #define XX_DSP_RESET_WAIT_TIME		2	/* ms */
 
-static void vx2_reset_dsp(vx_core_t *_chip)
+static void vx2_reset_dsp(struct vx_core *_chip)
 {
 	struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
 
@@ -162,7 +162,7 @@ static void vx2_reset_dsp(vx_core_t *_chip)
 }
 
 
-static int vx2_test_xilinx(vx_core_t *_chip)
+static int vx2_test_xilinx(struct vx_core *_chip)
 {
 	struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
 	unsigned int data;
@@ -219,7 +219,7 @@ static int vx2_test_xilinx(vx_core_t *_chip)
  * vx_setup_pseudo_dma - set up the pseudo dma read/write mode.
  * @do_write: 0 = read, 1 = set up for DMA write
  */
-static void vx2_setup_pseudo_dma(vx_core_t *chip, int do_write)
+static void vx2_setup_pseudo_dma(struct vx_core *chip, int do_write)
 {
 	/* Interrupt mode and HREQ pin enabled for host transmit data transfers
 	 * (in case of the use of the pseudo-dma facility).
@@ -235,7 +235,7 @@ static void vx2_setup_pseudo_dma(vx_core_t *chip, int do_write)
 /*
  * vx_release_pseudo_dma - disable the pseudo-DMA mode
  */
-static inline void vx2_release_pseudo_dma(vx_core_t *chip)
+static inline void vx2_release_pseudo_dma(struct vx_core *chip)
 {
 	/* HREQ pin disabled. */
 	vx_outl(chip, ICR, 0);
@@ -244,8 +244,8 @@ static inline void vx2_release_pseudo_dma(vx_core_t *chip)
 
 
 /* pseudo-dma write */
-static void vx2_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
-			  vx_pipe_t *pipe, int count)
+static void vx2_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime,
+			  struct vx_pipe *pipe, int count)
 {
 	unsigned long port = vx2_reg_addr(chip, VX_DMA);
 	int offset = pipe->hw_ptr;
@@ -282,8 +282,8 @@ static void vx2_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
 
 
 /* pseudo dma read */
-static void vx2_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
-			 vx_pipe_t *pipe, int count)
+static void vx2_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
+			 struct vx_pipe *pipe, int count)
 {
 	int offset = pipe->hw_ptr;
 	u32 *addr = (u32 *)(runtime->dma_area + offset);
@@ -321,7 +321,7 @@ static void vx2_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
 /*
  * transfer counts bits to PLX
  */
-static int put_xilinx_data(vx_core_t *chip, unsigned int port, unsigned int counts, unsigned char data)
+static int put_xilinx_data(struct vx_core *chip, unsigned int port, unsigned int counts, unsigned char data)
 {
 	unsigned int i;
 
@@ -353,7 +353,7 @@ static int put_xilinx_data(vx_core_t *chip, unsigned int port, unsigned int coun
 /*
  * load the xilinx image
  */
-static int vx2_load_xilinx_binary(vx_core_t *chip, const struct firmware *xilinx)
+static int vx2_load_xilinx_binary(struct vx_core *chip, const struct firmware *xilinx)
 {
 	unsigned int i;
 	unsigned int port;
@@ -400,7 +400,7 @@ static int vx2_load_xilinx_binary(vx_core_t *chip, const struct firmware *xilinx
 /*
  * load the boot/dsp images
  */
-static int vx2_load_dsp(vx_core_t *vx, int index, const struct firmware *dsp)
+static int vx2_load_dsp(struct vx_core *vx, int index, const struct firmware *dsp)
 {
 	int err;
 
@@ -432,7 +432,7 @@ static int vx2_load_dsp(vx_core_t *vx, int index, const struct firmware *dsp)
  *
  * spinlock held!
  */
-static int vx2_test_and_ack(vx_core_t *chip)
+static int vx2_test_and_ack(struct vx_core *chip)
 {
 	/* not booted yet? */
 	if (! (chip->chip_status & VX_STAT_XILINX_LOADED))
@@ -463,7 +463,7 @@ static int vx2_test_and_ack(vx_core_t *chip)
 /*
  * vx_validate_irq - enable/disable IRQ
  */
-static void vx2_validate_irq(vx_core_t *_chip, int enable)
+static void vx2_validate_irq(struct vx_core *_chip, int enable)
 {
 	struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
 
@@ -484,7 +484,7 @@ static void vx2_validate_irq(vx_core_t *_chip, int enable)
 /*
  * write an AKM codec data (24bit)
  */
-static void vx2_write_codec_reg(vx_core_t *chip, unsigned int data)
+static void vx2_write_codec_reg(struct vx_core *chip, unsigned int data)
 {
 	unsigned int i;
 
@@ -660,7 +660,7 @@ static const u8 vx2_akm_gains_lut[VX2_AKM_LEVEL_MAX+1] = {
 /*
  * pseudo-codec write entry
  */
-static void vx2_write_akm(vx_core_t *chip, int reg, unsigned int data)
+static void vx2_write_akm(struct vx_core *chip, int reg, unsigned int data)
 {
 	unsigned int val;
 
@@ -695,7 +695,7 @@ static void vx2_write_akm(vx_core_t *chip, int reg, unsigned int data)
 /*
  * write codec bit for old VX222 board
  */
-static void vx2_old_write_codec_bit(vx_core_t *chip, int codec, unsigned int data)
+static void vx2_old_write_codec_bit(struct vx_core *chip, int codec, unsigned int data)
 {
 	int i;
 
@@ -713,7 +713,7 @@ static void vx2_old_write_codec_bit(vx_core_t *chip, int codec, unsigned int dat
 /*
  * reset codec bit
  */
-static void vx2_reset_codec(vx_core_t *_chip)
+static void vx2_reset_codec(struct vx_core *_chip)
 {
 	struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
 
@@ -755,7 +755,7 @@ static void vx2_reset_codec(vx_core_t *_chip)
 /*
  * change the audio source
  */
-static void vx2_change_audio_source(vx_core_t *_chip, int src)
+static void vx2_change_audio_source(struct vx_core *_chip, int src)
 {
 	struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
 
@@ -774,7 +774,7 @@ static void vx2_change_audio_source(vx_core_t *_chip, int src)
 /*
  * set the clock source
  */
-static void vx2_set_clock_source(vx_core_t *_chip, int source)
+static void vx2_set_clock_source(struct vx_core *_chip, int source)
 {
 	struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
 
@@ -788,7 +788,7 @@ static void vx2_set_clock_source(vx_core_t *_chip, int source)
 /*
  * reset the board
  */
-static void vx2_reset_board(vx_core_t *_chip, int cold_reset)
+static void vx2_reset_board(struct vx_core *_chip, int cold_reset)
 {
 	struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
 
@@ -848,7 +848,7 @@ static void vx2_set_input_level(struct snd_vx222 *chip)
  */
 
 /* input levels */
-static int vx_input_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int vx_input_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
@@ -857,9 +857,9 @@ static int vx_input_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *ui
 	return 0;
 }
 
-static int vx_input_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_input_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
 	struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
 	down(&_chip->mixer_mutex);
 	ucontrol->value.integer.value[0] = chip->input_level[0];
@@ -868,9 +868,9 @@ static int vx_input_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
 	return 0;
 }
 
-static int vx_input_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_input_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
 	struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
 	down(&_chip->mixer_mutex);
 	if (chip->input_level[0] != ucontrol->value.integer.value[0] ||
@@ -886,7 +886,7 @@ static int vx_input_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
 }
 
 /* mic level */
-static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int vx_mic_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -895,17 +895,17 @@ static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
 	return 0;
 }
 
-static int vx_mic_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_mic_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
 	struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
 	ucontrol->value.integer.value[0] = chip->mic_level;
 	return 0;
 }
 
-static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
 	struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
 	down(&_chip->mixer_mutex);
 	if (chip->mic_level != ucontrol->value.integer.value[0]) {
@@ -918,7 +918,7 @@ static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
 	return 0;
 }
 
-static snd_kcontrol_new_t vx_control_input_level = {
+static struct snd_kcontrol_new vx_control_input_level = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =		"Capture Volume",
 	.info =		vx_input_level_info,
@@ -926,7 +926,7 @@ static snd_kcontrol_new_t vx_control_input_level = {
 	.put =		vx_input_level_put,
 };
 
-static snd_kcontrol_new_t vx_control_mic_level = {
+static struct snd_kcontrol_new vx_control_mic_level = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =		"Mic Capture Volume",
 	.info =		vx_mic_level_info,
@@ -938,7 +938,7 @@ static snd_kcontrol_new_t vx_control_mic_level = {
  * FIXME: compressor/limiter implementation is missing yet...
  */
 
-static int vx2_add_mic_controls(vx_core_t *_chip)
+static int vx2_add_mic_controls(struct vx_core *_chip)
 {
 	struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
 	int err;
diff --git a/sound/pcmcia/vx/vxp_mixer.c b/sound/pcmcia/vx/vxp_mixer.c
index aeaef3d8180..9450149b931 100644
--- a/sound/pcmcia/vx/vxp_mixer.c
+++ b/sound/pcmcia/vx/vxp_mixer.c
@@ -31,7 +31,7 @@
 /*
  * mic level control (for VXPocket)
  */
-static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int vx_mic_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -40,17 +40,17 @@ static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
 	return 0;
 }
 
-static int vx_mic_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_mic_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 	ucontrol->value.integer.value[0] = chip->mic_level;
 	return 0;
 }
 
-static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 	down(&_chip->mixer_mutex);
 	if (chip->mic_level != ucontrol->value.integer.value[0]) {
@@ -63,7 +63,7 @@ static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
 	return 0;
 }
 
-static snd_kcontrol_new_t vx_control_mic_level = {
+static struct snd_kcontrol_new vx_control_mic_level = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =		"Mic Capture Volume",
 	.info =		vx_mic_level_info,
@@ -74,7 +74,7 @@ static snd_kcontrol_new_t vx_control_mic_level = {
 /*
  * mic boost level control (for VXP440)
  */
-static int vx_mic_boost_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int vx_mic_boost_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -83,17 +83,17 @@ static int vx_mic_boost_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf
 	return 0;
 }
 
-static int vx_mic_boost_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_mic_boost_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 	ucontrol->value.integer.value[0] = chip->mic_level;
 	return 0;
 }
 
-static int vx_mic_boost_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int vx_mic_boost_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	vx_core_t *_chip = snd_kcontrol_chip(kcontrol);
+	struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 	down(&_chip->mixer_mutex);
 	if (chip->mic_level != ucontrol->value.integer.value[0]) {
@@ -106,7 +106,7 @@ static int vx_mic_boost_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
 	return 0;
 }
 
-static snd_kcontrol_new_t vx_control_mic_boost = {
+static struct snd_kcontrol_new vx_control_mic_boost = {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =		"Mic Boost",
 	.info =		vx_mic_boost_info,
@@ -115,7 +115,7 @@ static snd_kcontrol_new_t vx_control_mic_boost = {
 };
 
 
-int vxp_add_mic_controls(vx_core_t *_chip)
+int vxp_add_mic_controls(struct vx_core *_chip)
 {
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 	int err;
diff --git a/sound/pcmcia/vx/vxp_ops.c b/sound/pcmcia/vx/vxp_ops.c
index 2754d657a4d..7f82f619f9f 100644
--- a/sound/pcmcia/vx/vxp_ops.c
+++ b/sound/pcmcia/vx/vxp_ops.c
@@ -49,7 +49,7 @@ static int vxp_reg_offset[VX_REG_MAX] = {
 };
 
 
-static inline unsigned long vxp_reg_addr(vx_core_t *_chip, int reg)
+static inline unsigned long vxp_reg_addr(struct vx_core *_chip, int reg)
 {
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 	return chip->port + vxp_reg_offset[reg];
@@ -59,7 +59,7 @@ static inline unsigned long vxp_reg_addr(vx_core_t *_chip, int reg)
  * snd_vx_inb - read a byte from the register
  * @offset: register offset
  */
-static unsigned char vxp_inb(vx_core_t *chip, int offset)
+static unsigned char vxp_inb(struct vx_core *chip, int offset)
 {
 	return inb(vxp_reg_addr(chip, offset));
 }
@@ -69,7 +69,7 @@ static unsigned char vxp_inb(vx_core_t *chip, int offset)
  * @offset: the register offset
  * @val: the value to write
  */
-static void vxp_outb(vx_core_t *chip, int offset, unsigned char val)
+static void vxp_outb(struct vx_core *chip, int offset, unsigned char val)
 {
 	outb(val, vxp_reg_addr(chip, offset));
 }
@@ -78,9 +78,9 @@ static void vxp_outb(vx_core_t *chip, int offset, unsigned char val)
  * redefine macros to call directly
  */
 #undef vx_inb
-#define vx_inb(chip,reg)	vxp_inb((vx_core_t*)(chip), VX_##reg)
+#define vx_inb(chip,reg)	vxp_inb((struct vx_core *)(chip), VX_##reg)
 #undef vx_outb
-#define vx_outb(chip,reg,val)	vxp_outb((vx_core_t*)(chip), VX_##reg,val)
+#define vx_outb(chip,reg,val)	vxp_outb((struct vx_core *)(chip), VX_##reg,val)
 
 
 /*
@@ -88,7 +88,7 @@ static void vxp_outb(vx_core_t *chip, int offset, unsigned char val)
  *
  * returns zero if a magic word is detected, or a negative error code.
  */
-static int vx_check_magic(vx_core_t *chip)
+static int vx_check_magic(struct vx_core *chip)
 {
 	unsigned long end_time = jiffies + HZ / 5;
 	int c;
@@ -109,7 +109,7 @@ static int vx_check_magic(vx_core_t *chip)
 
 #define XX_DSP_RESET_WAIT_TIME		2	/* ms */
 
-static void vxp_reset_dsp(vx_core_t *_chip)
+static void vxp_reset_dsp(struct vx_core *_chip)
 {
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 
@@ -127,7 +127,7 @@ static void vxp_reset_dsp(vx_core_t *_chip)
 /*
  * reset codec bit
  */
-static void vxp_reset_codec(vx_core_t *_chip)
+static void vxp_reset_codec(struct vx_core *_chip)
 {
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 
@@ -146,7 +146,7 @@ static void vxp_reset_codec(vx_core_t *_chip)
  * vx_load_xilinx_binary - load the xilinx binary image
  * the binary image is the binary array converted from the bitstream file.
  */
-static int vxp_load_xilinx_binary(vx_core_t *_chip, const struct firmware *fw)
+static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware *fw)
 {
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 	unsigned int i;
@@ -244,7 +244,7 @@ static int vxp_load_xilinx_binary(vx_core_t *_chip, const struct firmware *fw)
 /*
  * vxp_load_dsp - load_dsp callback
  */
-static int vxp_load_dsp(vx_core_t *vx, int index, const struct firmware *fw)
+static int vxp_load_dsp(struct vx_core *vx, int index, const struct firmware *fw)
 {
 	int err;
 
@@ -279,7 +279,7 @@ static int vxp_load_dsp(vx_core_t *vx, int index, const struct firmware *fw)
  *
  * spinlock held!
  */
-static int vxp_test_and_ack(vx_core_t *_chip)
+static int vxp_test_and_ack(struct vx_core *_chip)
 {
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 
@@ -306,7 +306,7 @@ static int vxp_test_and_ack(vx_core_t *_chip)
 /*
  * vx_validate_irq - enable/disable IRQ
  */
-static void vxp_validate_irq(vx_core_t *_chip, int enable)
+static void vxp_validate_irq(struct vx_core *_chip, int enable)
 {
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 
@@ -322,7 +322,7 @@ static void vxp_validate_irq(vx_core_t *_chip, int enable)
  * vx_setup_pseudo_dma - set up the pseudo dma read/write mode.
  * @do_write: 0 = read, 1 = set up for DMA write
  */
-static void vx_setup_pseudo_dma(vx_core_t *_chip, int do_write)
+static void vx_setup_pseudo_dma(struct vx_core *_chip, int do_write)
 {
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 
@@ -342,7 +342,7 @@ static void vx_setup_pseudo_dma(vx_core_t *_chip, int do_write)
 /*
  * vx_release_pseudo_dma - disable the pseudo-DMA mode
  */
-static void vx_release_pseudo_dma(vx_core_t *_chip)
+static void vx_release_pseudo_dma(struct vx_core *_chip)
 {
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 
@@ -362,8 +362,8 @@ static void vx_release_pseudo_dma(vx_core_t *_chip)
  * data size must be aligned to 6 bytes to ensure the 24bit alignment on DSP.
  * NB: call with a certain lock!
  */
-static void vxp_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
-			  vx_pipe_t *pipe, int count)
+static void vxp_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime,
+			  struct vx_pipe *pipe, int count)
 {
 	long port = vxp_reg_addr(chip, VX_DMA);
 	int offset = pipe->hw_ptr;
@@ -401,8 +401,8 @@ static void vxp_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
  * the read length must be aligned to 6 bytes, as well as write.
  * NB: call with a certain lock!
  */
-static void vxp_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
-			 vx_pipe_t *pipe, int count)
+static void vxp_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
+			 struct vx_pipe *pipe, int count)
 {
 	struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip;
 	long port = vxp_reg_addr(chip, VX_DMA);
@@ -442,7 +442,7 @@ static void vxp_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
 /*
  * write a codec data (24bit)
  */
-static void vxp_write_codec_reg(vx_core_t *chip, int codec, unsigned int data)
+static void vxp_write_codec_reg(struct vx_core *chip, int codec, unsigned int data)
 {
 	int i;
 
@@ -465,7 +465,7 @@ static void vxp_write_codec_reg(vx_core_t *chip, int codec, unsigned int data)
  * vx_set_mic_boost - set mic boost level (on vxp440 only)
  * @boost: 0 = 20dB, 1 = +38dB
  */
-void vx_set_mic_boost(vx_core_t *chip, int boost)
+void vx_set_mic_boost(struct vx_core *chip, int boost)
 {
 	struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip;
 	unsigned long flags;
@@ -508,7 +508,7 @@ static int vx_compute_mic_level(int level)
  * vx_set_mic_level - set mic level (on vxpocket only)
  * @level: the mic level = 0 - 8 (max)
  */
-void vx_set_mic_level(vx_core_t *chip, int level)
+void vx_set_mic_level(struct vx_core *chip, int level)
 {
 	struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip;
 	unsigned long flags;
@@ -528,7 +528,7 @@ void vx_set_mic_level(vx_core_t *chip, int level)
 /*
  * change the input audio source
  */
-static void vxp_change_audio_source(vx_core_t *_chip, int src)
+static void vxp_change_audio_source(struct vx_core *_chip, int src)
 {
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 
@@ -568,7 +568,7 @@ static void vxp_change_audio_source(vx_core_t *_chip, int src)
  * change the clock source
  * source = INTERNAL_QUARTZ or UER_SYNC
  */
-static void vxp_set_clock_source(vx_core_t *_chip, int source)
+static void vxp_set_clock_source(struct vx_core *_chip, int source)
 {
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 
@@ -583,7 +583,7 @@ static void vxp_set_clock_source(vx_core_t *_chip, int source)
 /*
  * reset the board
  */
-static void vxp_reset_board(vx_core_t *_chip, int cold_reset)
+static void vxp_reset_board(struct vx_core *_chip, int cold_reset)
 {
 	struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip;
 
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 1e8f16b4c07..00962971414 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -83,9 +83,9 @@ static void vxpocket_release(dev_link_t *link)
 /*
  * destructor, called from snd_card_free_in_thread()
  */
-static int snd_vxpocket_dev_free(snd_device_t *device)
+static int snd_vxpocket_dev_free(struct snd_device *device)
 {
-	vx_core_t *chip = device->device_data;
+	struct vx_core *chip = device->device_data;
 
 	snd_vx_free_firmware(chip);
 	kfree(chip);
@@ -142,19 +142,19 @@ static struct snd_vx_hardware vxp440_hw = {
 /*
  * create vxpocket instance
  */
-static struct snd_vxpocket *snd_vxpocket_new(snd_card_t *card, int ibl)
+static struct snd_vxpocket *snd_vxpocket_new(struct snd_card *card, int ibl)
 {
 	client_reg_t client_reg;	/* Register with cardmgr */
 	dev_link_t *link;		/* Info for cardmgr */
-	vx_core_t *chip;
+	struct vx_core *chip;
 	struct snd_vxpocket *vxp;
 	int ret;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_vxpocket_dev_free,
 	};
 
 	chip = snd_vx_create(card, &vxpocket_hw, &snd_vxpocket_ops,
-			     sizeof(struct snd_vxpocket) - sizeof(vx_core_t));
+			     sizeof(struct snd_vxpocket) - sizeof(struct vx_core));
 	if (! chip)
 		return NULL;
 
@@ -218,10 +218,10 @@ static struct snd_vxpocket *snd_vxpocket_new(snd_card_t *card, int ibl)
  *
  * returns 0 if successful, or a negative error code.
  */
-static int snd_vxpocket_assign_resources(vx_core_t *chip, int port, int irq)
+static int snd_vxpocket_assign_resources(struct vx_core *chip, int port, int irq)
 {
 	int err;
-	snd_card_t *card = chip->card;
+	struct snd_card *card = chip->card;
 	struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
 
 	snd_printdd(KERN_DEBUG "vxpocket assign resources: port = 0x%x, irq = %d\n", port, irq);
@@ -250,7 +250,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
 static void vxpocket_config(dev_link_t *link)
 {
 	client_handle_t handle = link->handle;
-	vx_core_t *chip = link->priv;
+	struct vx_core *chip = link->priv;
 	struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
 	tuple_t tuple;
 	cisparse_t *parse;
@@ -324,7 +324,7 @@ failed:
 static int vxpocket_event(event_t event, int priority, event_callback_args_t *args)
 {
 	dev_link_t *link = args->client_data;
-	vx_core_t *chip = link->priv;
+	struct vx_core *chip = link->priv;
 
 	switch (event) {
 	case CS_EVENT_CARD_REMOVAL:
@@ -379,7 +379,7 @@ static int vxpocket_event(event_t event, int priority, event_callback_args_t *ar
  */
 static dev_link_t *vxpocket_attach(void)
 {
-	snd_card_t *card;
+	struct snd_card *card;
 	struct snd_vxpocket *vxp;
 	int i;
 
@@ -421,14 +421,14 @@ static dev_link_t *vxpocket_attach(void)
 static void vxpocket_detach(dev_link_t *link)
 {
 	struct snd_vxpocket *vxp;
-	vx_core_t *chip;
+	struct vx_core *chip;
 	dev_link_t **linkp;
 
 	if (! link)
 		return;
 
 	vxp = link->priv;
-	chip = (vx_core_t *)vxp;
+	chip = (struct vx_core *)vxp;
 	card_alloc &= ~(1 << vxp->index);
 
 	/* Remove the interface data from the linked list */
diff --git a/sound/pcmcia/vx/vxpocket.h b/sound/pcmcia/vx/vxpocket.h
index 70754aa3dd1..67efae3f6c8 100644
--- a/sound/pcmcia/vx/vxpocket.h
+++ b/sound/pcmcia/vx/vxpocket.h
@@ -30,7 +30,7 @@
 
 struct snd_vxpocket {
 
-	vx_core_t core;
+	struct vx_core core;
 
 	unsigned long port;
 
@@ -48,10 +48,10 @@ struct snd_vxpocket {
 
 extern struct snd_vx_ops snd_vxpocket_ops;
 
-void vx_set_mic_boost(vx_core_t *chip, int boost);
-void vx_set_mic_level(vx_core_t *chip, int level);
+void vx_set_mic_boost(struct vx_core *chip, int boost);
+void vx_set_mic_level(struct vx_core *chip, int level);
 
-int vxp_add_mic_controls(vx_core_t *chip);
+int vxp_add_mic_controls(struct vx_core *chip);
 
 /* Constants used to access the CDSP register (0x08). */
 #define CDSP_MAGIC	0xA7	/* magic value (for read) */
-- 
cgit v1.2.3-70-g09d2


From 3d19f804ef5f1d15fe001fc8d1ed58fac9d591fb Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:48:14 +0100
Subject: [ALSA] Remove xxx_t typedefs: PCI CS46xx

Modules: CS46xx driver

Remove xxx_t typedefs from the PCI CS46xx driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/cs46xx.h                |  87 +++--
 include/sound/cs46xx_dsp_scb_types.h  | 145 +++++----
 include/sound/cs46xx_dsp_spos.h       | 119 ++++---
 include/sound/cs46xx_dsp_task_types.h |  35 +-
 sound/pci/cs46xx/cs46xx.c             |   4 +-
 sound/pci/cs46xx/cs46xx_lib.c         | 584 +++++++++++++++++-----------------
 sound/pci/cs46xx/cs46xx_lib.h         | 211 ++++++------
 sound/pci/cs46xx/dsp_spos.c           | 264 ++++++++-------
 sound/pci/cs46xx/dsp_spos.h           |  18 +-
 sound/pci/cs46xx/dsp_spos_scb_lib.c   | 338 ++++++++++----------
 sound/pci/cs46xx/imgs/cwc4630.h       |   6 +-
 sound/pci/cs46xx/imgs/cwcasync.h      |   6 +-
 sound/pci/cs46xx/imgs/cwcbinhack.h    |   6 +-
 sound/pci/cs46xx/imgs/cwcdma.h        |   6 +-
 sound/pci/cs46xx/imgs/cwcemb80.h      |   6 +-
 sound/pci/cs46xx/imgs/cwcsnoop.h      |   6 +-
 16 files changed, 938 insertions(+), 903 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/cs46xx.h b/include/sound/cs46xx.h
index b0c0e192eb5..b33ca2a3630 100644
--- a/include/sound/cs46xx.h
+++ b/include/sound/cs46xx.h
@@ -1631,42 +1631,41 @@
 #define CS46XX_MIXER_SPDIF_INPUT_ELEMENT    1
 #define CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT   2
 
-typedef struct _snd_cs46xx cs46xx_t;
 
-typedef struct _snd_cs46xx_pcm_t {
+struct snd_cs46xx_pcm {
 	struct snd_dma_buffer hw_buf;
   
 	unsigned int ctl;
 	unsigned int shift;	/* Shift count to trasform frames in bytes */
-	snd_pcm_indirect_t pcm_rec;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_indirect pcm_rec;
+	struct snd_pcm_substream *substream;
 
-	pcm_channel_descriptor_t * pcm_channel;
+	struct dsp_pcm_channel_descriptor * pcm_channel;
 
 	int pcm_channel_id;    /* Fron Rear, Center Lfe  ... */
-} cs46xx_pcm_t;
+};
 
-typedef struct {
+struct snd_cs46xx_region {
 	char name[24];
 	unsigned long base;
 	void __iomem *remap_addr;
 	unsigned long size;
 	struct resource *resource;
-} snd_cs46xx_region_t;
+};
 
-struct _snd_cs46xx {
+struct snd_cs46xx {
 	int irq;
 	unsigned long ba0_addr;
 	unsigned long ba1_addr;
 	union {
 		struct {
-			snd_cs46xx_region_t ba0;
-			snd_cs46xx_region_t data0;
-			snd_cs46xx_region_t data1;
-			snd_cs46xx_region_t pmem;
-			snd_cs46xx_region_t reg;
+			struct snd_cs46xx_region ba0;
+			struct snd_cs46xx_region data0;
+			struct snd_cs46xx_region data1;
+			struct snd_cs46xx_region pmem;
+			struct snd_cs46xx_region reg;
 		} name;
-		snd_cs46xx_region_t idx[5];
+		struct snd_cs46xx_region idx[5];
 	} region;
 
 	unsigned int mode;
@@ -1676,34 +1675,34 @@ struct _snd_cs46xx {
 
 		unsigned int ctl;
 		unsigned int shift;	/* Shift count to trasform frames in bytes */
-		snd_pcm_indirect_t pcm_rec;
-		snd_pcm_substream_t *substream;
+		struct snd_pcm_indirect pcm_rec;
+		struct snd_pcm_substream *substream;
 	} capt;
 
 
 	int nr_ac97_codecs;
-	ac97_bus_t *ac97_bus;
-	ac97_t *ac97[MAX_NR_AC97];
+	struct snd_ac97_bus *ac97_bus;
+	struct snd_ac97 *ac97[MAX_NR_AC97];
 
 	struct pci_dev *pci;
-	snd_card_t *card;
-	snd_pcm_t *pcm;
+	struct snd_card *card;
+	struct snd_pcm *pcm;
 
-	snd_rawmidi_t *rmidi;
-	snd_rawmidi_substream_t *midi_input;
-	snd_rawmidi_substream_t *midi_output;
+	struct snd_rawmidi *rmidi;
+	struct snd_rawmidi_substream *midi_input;
+	struct snd_rawmidi_substream *midi_output;
 
 	spinlock_t reg_lock;
 	unsigned int midcr;
 	unsigned int uartm;
 
 	int amplifier;
-	void (*amplifier_ctrl)(cs46xx_t *, int);
-	void (*active_ctrl)(cs46xx_t *, int);
-  	void (*mixer_init)(cs46xx_t *);
+	void (*amplifier_ctrl)(struct snd_cs46xx *, int);
+	void (*active_ctrl)(struct snd_cs46xx *, int);
+  	void (*mixer_init)(struct snd_cs46xx *);
 
 	int acpi_port;
-	snd_kcontrol_t *eapd_switch; /* for amplifier hack */
+	struct snd_kcontrol *eapd_switch; /* for amplifier hack */
 	int accept_valid;	/* accept mmap valid (for OSS) */
 
 	struct gameport *gameport;
@@ -1714,29 +1713,29 @@ struct _snd_cs46xx {
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
 	struct semaphore spos_mutex;
 
-	dsp_spos_instance_t * dsp_spos_instance;
+	struct dsp_spos_instance * dsp_spos_instance;
 
-	snd_pcm_t *pcm_rear;
-	snd_pcm_t *pcm_center_lfe;
-	snd_pcm_t *pcm_iec958;
+	struct snd_pcm *pcm_rear;
+	struct snd_pcm *pcm_center_lfe;
+	struct snd_pcm *pcm_iec958;
 #else /* for compatibility */
-	cs46xx_pcm_t *playback_pcm;
+	struct snd_cs46xx_pcm *playback_pcm;
 	unsigned int play_ctl;
 #endif
 };
 
-int snd_cs46xx_create(snd_card_t *card,
+int snd_cs46xx_create(struct snd_card *card,
 		      struct pci_dev *pci,
 		      int external_amp, int thinkpad,
-		      cs46xx_t **rcodec);
-
-int snd_cs46xx_pcm(cs46xx_t *chip, int device, snd_pcm_t **rpcm);
-int snd_cs46xx_pcm_rear(cs46xx_t *chip, int device, snd_pcm_t **rpcm);
-int snd_cs46xx_pcm_iec958(cs46xx_t *chip, int device, snd_pcm_t **rpcm);
-int snd_cs46xx_pcm_center_lfe(cs46xx_t *chip, int device, snd_pcm_t **rpcm);
-int snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device);
-int snd_cs46xx_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rmidi);
-int snd_cs46xx_start_dsp(cs46xx_t *chip);
-int snd_cs46xx_gameport(cs46xx_t *chip);
+		      struct snd_cs46xx **rcodec);
+
+int snd_cs46xx_pcm(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm);
+int snd_cs46xx_pcm_rear(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm);
+int snd_cs46xx_pcm_iec958(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm);
+int snd_cs46xx_pcm_center_lfe(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm);
+int snd_cs46xx_mixer(struct snd_cs46xx *chip, int spdif_device);
+int snd_cs46xx_midi(struct snd_cs46xx *chip, int device, struct snd_rawmidi **rmidi);
+int snd_cs46xx_start_dsp(struct snd_cs46xx *chip);
+int snd_cs46xx_gameport(struct snd_cs46xx *chip);
 
 #endif /* __SOUND_CS46XX_H */
diff --git a/include/sound/cs46xx_dsp_scb_types.h b/include/sound/cs46xx_dsp_scb_types.h
index 3f990a3a690..9cb6c7d0956 100644
--- a/include/sound/cs46xx_dsp_scb_types.h
+++ b/include/sound/cs46xx_dsp_scb_types.h
@@ -41,7 +41,7 @@
 
 /* This structs are used internally by the SP */
 
-typedef struct _basic_dma_req_t {
+struct dsp_basic_dma_req {
 	/* DMA Requestor Word 0 (DCW)  fields:
 
 	   31 [30-28]27  [26:24] 23 22 21 20 [19:18] [17:16] 15 14 13  12  11 10 9 8 7 6  [5:0]
@@ -53,9 +53,9 @@ typedef struct _basic_dma_req_t {
 	u32 dmw;                 /* DMA Mode Word */
 	u32 saw;                 /* Source Address Word */
 	u32 daw;                 /* Destination Address Word  */
-} basic_dma_req_t;
+};
 
-typedef struct _scatter_gather_ext_t {
+struct dsp_scatter_gather_ext {
 	u32 npaw;                /* Next-Page Address Word */
 
 	/* DMA Requestor Word 5 (NPCW)  fields:
@@ -69,9 +69,9 @@ typedef struct _scatter_gather_ext_t {
 	u32 lbaw;                /* Loop-Begin Address Word */
 	u32 nplbaw;              /* Next-Page after Loop-Begin Address Word */
 	u32 sgaw;                /* Scatter/Gather Address Word */
-} scatter_gather_ext_t;
+};
 
-typedef struct _volume_control_t {
+struct dsp_volume_control {
 	___DSP_DUAL_16BIT_ALLOC(
 	   rightTarg,  /* Target volume for left & right channels */
 	   leftTarg
@@ -80,10 +80,10 @@ typedef struct _volume_control_t {
 	   rightVol,   /* Current left & right channel volumes */
 	   leftVol
 	)
-} volume_control_t;
+};
 
 /* Generic stream control block (SCB) structure definition */
-typedef struct _generic_scb_t {
+struct dsp_generic_scb {
 	/* For streaming I/O, the DSP should never alter any words in the DMA
 	   requestor or the scatter/gather extension.  Only ad hoc DMA request
 	   streams are free to alter the requestor (currently only occur in the
@@ -99,13 +99,13 @@ typedef struct _generic_scb_t {
   
 	/* Initialized by the host, only modified by DMA 
 	   R/O for the DSP task */
-	basic_dma_req_t  basic_req;  /* Optional */
+	struct dsp_basic_dma_req  basic_req;  /* Optional */
 
 	/* Scatter/gather DMA requestor extension   (5 ints) 
 	   Initialized by the host, only modified by DMA
 	   DSP task never needs to even read these.
 	*/
-	scatter_gather_ext_t sg_ext;  /* Optional */
+	struct dsp_scatter_gather_ext sg_ext;  /* Optional */
 
 	/* Sublist pointer & next stream control block (SCB) link.
 	   Initialized & modified by the host R/O for the DSP task
@@ -179,11 +179,11 @@ typedef struct _generic_scb_t {
      
 	   These two 32-bit words are redefined for wavetable & 3-D voices.    
 	*/
-	volume_control_t vol_ctrl_t;   /* Optional */
-} generic_scb_t;
+	struct dsp_volume_control vol_ctrl_t;   /* Optional */
+};
 
 
-typedef struct _spos_control_block_t {
+struct dsp_spos_control_block {
 	/* WARNING: Certain items in this structure are modified by the host
 	            Any dword that can be modified by the host, must not be
 		    modified by the SP as the host can only do atomic dword
@@ -273,10 +273,10 @@ typedef struct _spos_control_block_t {
 	u32 r32_save_for_spurious_int;
 	u32 r32_save_for_trap;
 	u32 r32_save_for_HFG;
-} spos_control_block_t;
+};
 
 /* SPB for MIX_TO_OSTREAM algorithm family */
-typedef struct _mix2_ostream_spb_t
+struct dsp_mix2_ostream_spb
 {
 	/* 16b.16b integer.frac approximation to the
 	   number of 3 sample triplets to output each
@@ -290,13 +290,13 @@ typedef struct _mix2_ostream_spb_t
 	   output triplets since the start of group 
 	*/
 	u32 accumOutTriplets;  
-} mix2_ostream_spb_t;
+};
 
 /* SCB for Timing master algorithm */
-typedef struct _timing_master_scb_t {
+struct dsp_timing_master_scb {
 	/* First 12 dwords from generic_scb_t */
-	basic_dma_req_t  basic_req;  /* Optional */
-	scatter_gather_ext_t sg_ext;  /* Optional */
+	struct dsp_basic_dma_req  basic_req;  /* Optional */
+	struct dsp_scatter_gather_ext sg_ext;  /* Optional */
 	___DSP_DUAL_16BIT_ALLOC(
 	    next_scb,     /* REQUIRED */
 	    sub_list_ptr  /* REQUIRED */
@@ -358,13 +358,13 @@ typedef struct _timing_master_scb_t {
 	   number of samples to output each frame.
 	   (approximation must be floor, to insure */
 	u32 nsamp_per_frm_q15;
-} timing_master_scb_t;
+};
 
 /* SCB for CODEC output algorithm */
-typedef struct _codec_output_scb_t {
+struct dsp_codec_output_scb {
 	/* First 13 dwords from generic_scb_t */
-	basic_dma_req_t  basic_req;  /* Optional */
-	scatter_gather_ext_t sg_ext;  /* Optional */
+	struct dsp_basic_dma_req  basic_req;  /* Optional */
+	struct dsp_scatter_gather_ext sg_ext;  /* Optional */
 	___DSP_DUAL_16BIT_ALLOC(
 	    next_scb,       /* REQUIRED */
 	    sub_list_ptr    /* REQUIRED */
@@ -422,13 +422,13 @@ typedef struct _codec_output_scb_t {
 	    reserved,
 	    last_sub_ptr
 	)
-} codec_output_scb_t;
+};
 
 /* SCB for CODEC input algorithm */
-typedef struct _codec_input_scb_t {
+struct dsp_codec_input_scb {
 	/* First 13 dwords from generic_scb_t */
-	basic_dma_req_t  basic_req;  /* Optional */
-	scatter_gather_ext_t sg_ext;  /* Optional */
+	struct dsp_basic_dma_req  basic_req;  /* Optional */
+	struct dsp_scatter_gather_ext sg_ext;  /* Optional */
 	___DSP_DUAL_16BIT_ALLOC(
 	    next_scb,       /* REQUIRED */
 	    sub_list_ptr    /* REQUIRED */
@@ -479,13 +479,13 @@ typedef struct _codec_input_scb_t {
 	)
 
 	u32  reserved2;
-} codec_input_scb_t;
+};
 
 
-typedef struct _pcm_serial_input_scb_t {
+struct dsp_pcm_serial_input_scb {
 	/* First 13 dwords from generic_scb_t */
-	basic_dma_req_t  basic_req;  /* Optional */
-	scatter_gather_ext_t sg_ext;  /* Optional */
+	struct dsp_basic_dma_req  basic_req;  /* Optional */
+	struct dsp_scatter_gather_ext sg_ext;  /* Optional */
 	___DSP_DUAL_16BIT_ALLOC(
 	    next_scb,       /* REQUIRED */
 	    sub_list_ptr    /* REQUIRED */
@@ -512,11 +512,11 @@ typedef struct _pcm_serial_input_scb_t {
 	)
 
 	/* Initialized by the host (host updates target volumes) */
-	volume_control_t psi_vol_ctrl;   
+	struct dsp_volume_control psi_vol_ctrl;   
   
-} pcm_serial_input_scb_t;
+};
 
-typedef struct _src_task_scb_t {
+struct dsp_src_task_scb {
 	___DSP_DUAL_16BIT_ALLOC(
 	    frames_left_in_gof,
 	    gofs_left_in_sec
@@ -571,10 +571,10 @@ typedef struct _src_task_scb_t {
   
 	u32   phiIncr6int_26frac;
   
-	volume_control_t src_vol_ctrl;
-} src_task_scb_t;
+	struct dsp_volume_control src_vol_ctrl;
+};
 
-typedef struct _decimate_by_pow2_scb_t {
+struct dsp_decimate_by_pow2_scb {
 	/* decimationFactor = 2, 4, or 8 (larger factors waste too much memory
 	                                  when compared to cascading decimators)
 	*/
@@ -648,10 +648,10 @@ typedef struct _decimate_by_pow2_scb_t {
 
 	u32  dec2_reserved4;
 
-	volume_control_t dec2_vol_ctrl; /* Not used! */
-} decimate_by_pow2_scb_t;
+	struct dsp_volume_control dec2_vol_ctrl; /* Not used! */
+};
 
-typedef struct _vari_decimate_scb_t {
+struct dsp_vari_decimate_scb {
 	___DSP_DUAL_16BIT_ALLOC(
 	    vdec_frames_left_in_gof,
 	    vdec_gofs_left_in_sec
@@ -711,15 +711,15 @@ typedef struct _vari_decimate_scb_t {
 
 	u32 vdec_phi_incr_6int_26frac;
 
-	volume_control_t vdec_vol_ctrl;
-} vari_decimate_scb_t;
+	struct dsp_volume_control vdec_vol_ctrl;
+};
 
 
 /* SCB for MIX_TO_OSTREAM algorithm family */
-typedef struct _mix2_ostream_scb_t {
+struct dsp_mix2_ostream_scb {
 	/* First 13 dwords from generic_scb_t */
-	basic_dma_req_t  basic_req;  /* Optional */
-	scatter_gather_ext_t sg_ext;  /* Optional */
+	struct dsp_basic_dma_req  basic_req;  /* Optional */
+	struct dsp_scatter_gather_ext sg_ext;  /* Optional */
 	___DSP_DUAL_16BIT_ALLOC(
 	    next_scb,       /* REQUIRED */
 	    sub_list_ptr    /* REQUIRED */
@@ -758,14 +758,14 @@ typedef struct _mix2_ostream_scb_t {
 	    const_FFFF,
 	    const_zero
 	)
-} mix2_ostream_scb_t;
+};
 
 
 /* SCB for S16_MIX algorithm */
-typedef struct _mix_only_scb_t {
+struct dsp_mix_only_scb {
 	/* First 13 dwords from generic_scb_t */
-	basic_dma_req_t  basic_req;  /* Optional */
-	scatter_gather_ext_t sg_ext;  /* Optional */
+	struct dsp_basic_dma_req  basic_req;  /* Optional */
+	struct dsp_scatter_gather_ext sg_ext;  /* Optional */
 	___DSP_DUAL_16BIT_ALLOC(
 	    next_scb,       /* REQUIRED */
 	    sub_list_ptr    /* REQUIRED */
@@ -780,11 +780,11 @@ typedef struct _mix_only_scb_t {
 	u32 strm_buf_ptr;   /* REQUIRED */
 
 	u32 reserved;
-	volume_control_t vol_ctrl;
-} mix_only_scb_t;
+	struct dsp_volume_control vol_ctrl;
+};
 
 /* SCB for the async. CODEC input algorithm */
-typedef struct _async_codec_input_scb_t {		 
+struct dsp_async_codec_input_scb {
 	u32 io_free2;     
   
 	u32 io_current_total;
@@ -837,11 +837,11 @@ typedef struct _async_codec_input_scb_t {
 	)
 
 	u32 i_free;
-} async_codec_input_scb_t;
+};
 
 
 /* SCB for the SP/DIF CODEC input and output */
-typedef struct _spdifiscb_t {
+struct dsp_spdifiscb {
 	___DSP_DUAL_16BIT_ALLOC(
 	    status_ptr,     
 	    status_start_ptr
@@ -895,12 +895,11 @@ typedef struct _spdifiscb_t {
 	)
 
 	u32  free1;
-} spdifiscb_t;
+};
 
 
 /* SCB for the SP/DIF CODEC input and output  */
-typedef struct _spdifoscb_t {		 
-
+struct dsp_spdifoscb {		 
 
 	u32 free2;     
 
@@ -941,11 +940,10 @@ typedef struct _spdifoscb_t {
 	)
 
 	u32  free1;                                         
-} spdifoscb_t;
-
+};
 
 
-typedef struct _asynch_fg_rx_scb_t {
+struct dsp_asynch_fg_rx_scb {
 	___DSP_DUAL_16BIT_ALLOC(
 	    bot_buf_mask,
 	    buf_Mask
@@ -993,11 +991,10 @@ typedef struct _asynch_fg_rx_scb_t {
 	    right_vol,
 	    left_vol
 	)
-} asynch_fg_rx_scb_t;
-
+};
 
 
-typedef struct _asynch_fg_tx_scb_t {
+struct dsp_asynch_fg_tx_scb {
 	___DSP_DUAL_16BIT_ALLOC(
 	    not_buf_mask,
 	    buf_mask
@@ -1052,13 +1049,13 @@ typedef struct _asynch_fg_tx_scb_t {
 	    unused_right_vol,
 	    unused_left_vol
 	)
-} asynch_fg_tx_scb_t;
+};
 
 
-typedef struct _output_snoop_scb_t {
+struct dsp_output_snoop_scb {
 	/* First 13 dwords from generic_scb_t */
-	basic_dma_req_t  basic_req;  /* Optional */
-	scatter_gather_ext_t sg_ext;  /* Optional */
+	struct dsp_basic_dma_req  basic_req;  /* Optional */
+	struct dsp_scatter_gather_ext sg_ext;  /* Optional */
 	___DSP_DUAL_16BIT_ALLOC(
 	    next_scb,       /* REQUIRED */
 	    sub_list_ptr    /* REQUIRED */
@@ -1083,9 +1080,9 @@ typedef struct _output_snoop_scb_t {
 	    reserved,
 	    input_scb
 	)
-} output_snoop_scb_t;
+};
 
-typedef struct _spio_write_scb_t {
+struct dsp_spio_write_scb {
 	___DSP_DUAL_16BIT_ALLOC(
 	    address1,
 	    address2
@@ -1122,9 +1119,9 @@ typedef struct _spio_write_scb_t {
 	)
 
 	u32 unused3[5];
-} spio_write_scb_t;
+};
 
-typedef struct _magic_snoop_task_t {
+struct dsp_magic_snoop_task {
 	u32 i0;
 	u32 i1;
 
@@ -1155,11 +1152,11 @@ typedef struct _magic_snoop_task_t {
 
 	u32 i8;
 
-	volume_control_t vdec_vol_ctrl;
-} magic_snoop_task_t;
+	struct dsp_volume_control vdec_vol_ctrl;
+};
 
 
-typedef struct _filter_scb_t {
+struct dsp_filter_scb {
 	___DSP_DUAL_16BIT_ALLOC(
 	      a0_right,          /* 0x00 */
 	      a0_left
@@ -1212,5 +1209,5 @@ typedef struct _filter_scb_t {
               b2_right,          /* 0x0F */
 	      b2_left
 	)
-} filter_scb_t;
+};
 #endif /* __DSP_SCB_TYPES_H__ */
diff --git a/include/sound/cs46xx_dsp_spos.h b/include/sound/cs46xx_dsp_spos.h
index 10014cb6242..da934def31e 100644
--- a/include/sound/cs46xx_dsp_spos.h
+++ b/include/sound/cs46xx_dsp_spos.h
@@ -65,133 +65,130 @@
 #define DSP_SPDIF_STATUS_HW_ENABLED           4
 #define DSP_SPDIF_STATUS_INPUT_CTRL_ENABLED   8
 
-struct _dsp_module_desc_t;
-
-typedef struct _symbol_entry_t {
+struct dsp_symbol_entry {
 	u32 address;
 	char symbol_name[DSP_MAX_SYMBOL_NAME];
 	int symbol_type;
 
 	/* initialized by driver */
-	struct _dsp_module_desc_t * module;
+	struct dsp_module_desc * module;
 	int deleted;
-} symbol_entry_t;
+};
 
-typedef struct _symbol_desc_t {
+struct dsp_symbol_desc {
 	int nsymbols;
 
-	symbol_entry_t * symbols;
+	struct dsp_symbol_entry *symbols;
 
 	/* initialized by driver */
 	int highest_frag_index;
-} symbol_desc_t;
-
+};
 
-typedef struct _segment_desc_t {
+struct dsp_segment_desc {
 	int segment_type;
 	u32 offset;
 	u32 size;
 	u32 * data;
-} segment_desc_t;
+};
 
-typedef struct _dsp_module_desc_t {
+struct dsp_module_desc {
 	char * module_name;
-	symbol_desc_t symbol_table;
+	struct dsp_symbol_desc symbol_table;
 	int nsegments;
-	segment_desc_t * segments;
+	struct dsp_segment_desc * segments;
 
 	/* initialized by driver */
 	u32 overlay_begin_address;
 	u32 load_address;
 	int nfixups;
-} dsp_module_desc_t;
+};
 
-typedef struct _dsp_scb_descriptor_t {
+struct dsp_scb_descriptor {
 	char scb_name[DSP_MAX_SCB_NAME];
 	u32 address;
 	int index;
 
-	struct _dsp_scb_descriptor_t * sub_list_ptr;
-	struct _dsp_scb_descriptor_t * next_scb_ptr;
-	struct _dsp_scb_descriptor_t * parent_scb_ptr;
+	struct dsp_scb_descriptor * sub_list_ptr;
+	struct dsp_scb_descriptor * next_scb_ptr;
+	struct dsp_scb_descriptor * parent_scb_ptr;
 
-	symbol_entry_t * task_entry;
-	symbol_entry_t * scb_symbol;
+	struct dsp_symbol_entry * task_entry;
+	struct dsp_symbol_entry * scb_symbol;
 
-	snd_info_entry_t *proc_info;
+	struct snd_info_entry *proc_info;
 	int ref_count;
 	spinlock_t lock;
 
 	int deleted;
-} dsp_scb_descriptor_t;
+};
 
-typedef struct _dsp_task_descriptor_t {
+struct dsp_task_descriptor {
 	char task_name[DSP_MAX_TASK_NAME];
 	int size;
 	u32 address;
 	int index;
-} dsp_task_descriptor_t;
+};
 
-typedef struct _pcm_channel_descriptor_t {
+struct dsp_pcm_channel_descriptor {
 	int active;
 	int src_slot;
 	int pcm_slot;
 	u32 sample_rate;
 	u32 unlinked;
-	dsp_scb_descriptor_t * pcm_reader_scb;
-	dsp_scb_descriptor_t * src_scb;
-	dsp_scb_descriptor_t * mixer_scb;
+	struct dsp_scb_descriptor * pcm_reader_scb;
+	struct dsp_scb_descriptor * src_scb;
+	struct dsp_scb_descriptor * mixer_scb;
 
 	void * private_data;
-} pcm_channel_descriptor_t;
+};
 
-typedef struct _dsp_spos_instance_t {
-	symbol_desc_t symbol_table; /* currently availble loaded symbols in SP */
+struct dsp_spos_instance {
+	struct dsp_symbol_desc symbol_table; /* currently availble loaded symbols in SP */
 
 	int nmodules;
-	dsp_module_desc_t * modules; /* modules loaded into SP */
+	struct dsp_module_desc * modules; /* modules loaded into SP */
 
-	segment_desc_t code;
+	struct dsp_segment_desc code;
 
 	/* Main PCM playback mixer */
-	dsp_scb_descriptor_t * master_mix_scb;
+	struct dsp_scb_descriptor * master_mix_scb;
 	u16 dac_volume_right;
 	u16 dac_volume_left;
 
 	/* Rear/surround PCM playback mixer */
-	dsp_scb_descriptor_t * rear_mix_scb;
+	struct dsp_scb_descriptor * rear_mix_scb;
 
 	/* Center/LFE mixer */
-	dsp_scb_descriptor_t * center_lfe_mix_scb;
+	struct dsp_scb_descriptor * center_lfe_mix_scb;
 
 	int npcm_channels;
 	int nsrc_scb;
-	pcm_channel_descriptor_t pcm_channels[DSP_MAX_PCM_CHANNELS];
+	struct dsp_pcm_channel_descriptor pcm_channels[DSP_MAX_PCM_CHANNELS];
 	int src_scb_slots[DSP_MAX_SRC_NR];
 
 	/* cache this symbols */
-	symbol_entry_t * null_algorithm; /* used by PCMreaderSCB's */
-	symbol_entry_t * s16_up;         /* used by SRCtaskSCB's */
+	struct dsp_symbol_entry * null_algorithm; /* used by PCMreaderSCB's */
+	struct dsp_symbol_entry * s16_up;         /* used by SRCtaskSCB's */
 
 	/* proc fs */  
-	snd_card_t * snd_card;
-	snd_info_entry_t * proc_dsp_dir;
-	snd_info_entry_t * proc_sym_info_entry;
-	snd_info_entry_t * proc_modules_info_entry;
-	snd_info_entry_t * proc_parameter_dump_info_entry;
-	snd_info_entry_t * proc_sample_dump_info_entry;
+	struct snd_card *snd_card;
+	struct snd_info_entry * proc_dsp_dir;
+	struct snd_info_entry * proc_sym_info_entry;
+	struct snd_info_entry * proc_modules_info_entry;
+	struct snd_info_entry * proc_parameter_dump_info_entry;
+	struct snd_info_entry * proc_sample_dump_info_entry;
 
 	/* SCB's descriptors */
 	int nscb;
 	int scb_highest_frag_index;
-	dsp_scb_descriptor_t scbs[DSP_MAX_SCB_DESC];
-	snd_info_entry_t * proc_scb_info_entry;
-	dsp_scb_descriptor_t * the_null_scb;
+	struct dsp_scb_descriptor scbs[DSP_MAX_SCB_DESC];
+	struct snd_info_entry * proc_scb_info_entry;
+	struct dsp_scb_descriptor * the_null_scb;
 
 	/* Task's descriptors */
 	int ntask;
-	dsp_task_descriptor_t tasks[DSP_MAX_TASK_DESC];
-	snd_info_entry_t * proc_task_info_entry;
+	struct dsp_task_descriptor tasks[DSP_MAX_TASK_DESC];
+	struct snd_info_entry * proc_task_info_entry;
 
 	/* SPDIF status */
 	int spdif_status_out;
@@ -204,30 +201,30 @@ typedef struct _dsp_spos_instance_t {
 	unsigned int spdif_csuv_stream;
 
 	/* SPDIF input sample rate converter */
-	dsp_scb_descriptor_t * spdif_in_src;
+	struct dsp_scb_descriptor * spdif_in_src;
 	/* SPDIF input asynch. receiver */
-	dsp_scb_descriptor_t * asynch_rx_scb;
+	struct dsp_scb_descriptor * asynch_rx_scb;
 
 	/* Capture record mixer SCB */
-	dsp_scb_descriptor_t * record_mixer_scb;
+	struct dsp_scb_descriptor * record_mixer_scb;
     
 	/* CODEC input SCB */
-	dsp_scb_descriptor_t * codec_in_scb;
+	struct dsp_scb_descriptor * codec_in_scb;
 
 	/* reference snooper */
-	dsp_scb_descriptor_t * ref_snoop_scb;
+	struct dsp_scb_descriptor * ref_snoop_scb;
 
 	/* SPDIF output  PCM reference  */
-	dsp_scb_descriptor_t * spdif_pcm_input_scb;
+	struct dsp_scb_descriptor * spdif_pcm_input_scb;
 
 	/* asynch TX task */
-	dsp_scb_descriptor_t * asynch_tx_scb;
+	struct dsp_scb_descriptor * asynch_tx_scb;
 
 	/* record sources */
-	dsp_scb_descriptor_t * pcm_input;
-	dsp_scb_descriptor_t * adc_input;
+	struct dsp_scb_descriptor * pcm_input;
+	struct dsp_scb_descriptor * adc_input;
 
 	int spdif_in_sample_rate;
-} dsp_spos_instance_t;
+};
 
 #endif /* __DSP_SPOS_H__ */
diff --git a/include/sound/cs46xx_dsp_task_types.h b/include/sound/cs46xx_dsp_task_types.h
index 5dd3bf69cb0..b3076c487de 100644
--- a/include/sound/cs46xx_dsp_task_types.h
+++ b/include/sound/cs46xx_dsp_task_types.h
@@ -71,7 +71,7 @@ Ptr____Call (c)
                                                at the end of BG */
 
 /* Minimal context save area for Hyper Forground */
-typedef struct _hf_save_area_t {
+struct dsp_hf_save_area {
 	u32	r10_save;
 	u32	r54_save;
 	u32	r98_save;
@@ -96,11 +96,11 @@ typedef struct _hf_save_area_t {
 	      rsa2Save
 	)
 	/* saved as part of HFG context  */
-} hf_save_area_t;
+};
 
 
 /* Task link data structure */
-typedef struct _tree_link_t {
+struct dsp_tree_link {
 	___DSP_DUAL_16BIT_ALLOC(
 	/* Pointer to sibling task control block */
 	    next_scb,
@@ -114,10 +114,10 @@ typedef struct _tree_link_t {
 	/* Pointer to local data */
 	    this_spb
 	)
-} tree_link_t;
+};
 
 
-typedef struct _task_tree_data_t {
+struct dsp_task_tree_data {
 	___DSP_DUAL_16BIT_ALLOC(
 	/* Initial tock count; controls task tree execution rate */
 	    tock_count_limit,
@@ -155,11 +155,10 @@ typedef struct _task_tree_data_t {
 	    data_stack_base_ptr
 	)
 
-} task_tree_data_t;
+};
 
 
-
-typedef struct _interval_timer_data_t
+struct dsp_interval_timer_data
 {
 	/* These data items have the same relative locations to those */
 	___DSP_DUAL_16BIT_ALLOC(
@@ -172,12 +171,12 @@ typedef struct _interval_timer_data_t
 	     num_FG_ticks_this_interval,        
 	     num_intervals
 	)
-} interval_timer_data_t;    
+};
 
 
 /* This structure contains extra storage for the task tree
    Currently, this additional data is related only to a full context save */
-typedef struct _task_tree_context_block_t {
+struct dsp_task_tree_context_block {
 	/* Up to 10 values are saved onto the stack.  8 for the task tree, 1 for
 	   The access to the context switch (call or interrupt), and 1 spare that
 	   users should never use.  This last may be required by the system */
@@ -238,16 +237,16 @@ typedef struct _task_tree_context_block_t {
 	u32		saveaux2xaux3x;
 	u32		savershouthl;
 	u32		savershoutxmacmode;
-} task_tree_context_block_t;						  
+};
                 
 
-typedef struct _task_tree_control_block_t	{
-	hf_save_area_t		 	context;
-	tree_link_t			links;
-	task_tree_data_t		data;
-	task_tree_context_block_t	context_blk;
-	interval_timer_data_t		int_timer;
-} task_tree_control_block_t;
+struct dsp_task_tree_control_block {
+	struct dsp_hf_save_area			context;
+	struct dsp_tree_link			links;
+	struct dsp_task_tree_data		data;
+	struct dsp_task_tree_context_block	context_blk;
+	struct dsp_interval_timer_data		int_timer;
+};
 
 
 #endif /* __DSP_TASK_TYPES_H__ */
diff --git a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c
index b9fff4ee6f9..7d6b29e5433 100644
--- a/sound/pci/cs46xx/cs46xx.c
+++ b/sound/pci/cs46xx/cs46xx.c
@@ -78,8 +78,8 @@ static int __devinit snd_card_cs46xx_probe(struct pci_dev *pci,
 					   const struct pci_device_id *pci_id)
 {
 	static int dev;
-	snd_card_t *card;
-	cs46xx_t *chip;
+	struct snd_card *card;
+	struct snd_cs46xx *chip;
 	int err;
 
 	if (dev >= SNDRV_CARDS)
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index 9a86148d718..11d91d08a14 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -66,23 +66,23 @@
 #include "cs46xx_lib.h"
 #include "dsp_spos.h"
 
-static void amp_voyetra(cs46xx_t *chip, int change);
+static void amp_voyetra(struct snd_cs46xx *chip, int change);
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
-static snd_pcm_ops_t snd_cs46xx_playback_rear_ops;
-static snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops;
-static snd_pcm_ops_t snd_cs46xx_playback_clfe_ops;
-static snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops;
-static snd_pcm_ops_t snd_cs46xx_playback_iec958_ops;
-static snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops;
+static struct snd_pcm_ops snd_cs46xx_playback_rear_ops;
+static struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops;
+static struct snd_pcm_ops snd_cs46xx_playback_clfe_ops;
+static struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops;
+static struct snd_pcm_ops snd_cs46xx_playback_iec958_ops;
+static struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops;
 #endif
 
-static snd_pcm_ops_t snd_cs46xx_playback_ops;
-static snd_pcm_ops_t snd_cs46xx_playback_indirect_ops;
-static snd_pcm_ops_t snd_cs46xx_capture_ops;
-static snd_pcm_ops_t snd_cs46xx_capture_indirect_ops;
+static struct snd_pcm_ops snd_cs46xx_playback_ops;
+static struct snd_pcm_ops snd_cs46xx_playback_indirect_ops;
+static struct snd_pcm_ops snd_cs46xx_capture_ops;
+static struct snd_pcm_ops snd_cs46xx_capture_indirect_ops;
 
-static unsigned short snd_cs46xx_codec_read(cs46xx_t *chip,
+static unsigned short snd_cs46xx_codec_read(struct snd_cs46xx *chip,
 					    unsigned short reg,
 					    int codec_index)
 {
@@ -204,10 +204,10 @@ static unsigned short snd_cs46xx_codec_read(cs46xx_t *chip,
 	return result;
 }
 
-static unsigned short snd_cs46xx_ac97_read(ac97_t * ac97,
+static unsigned short snd_cs46xx_ac97_read(struct snd_ac97 * ac97,
 					    unsigned short reg)
 {
-	cs46xx_t *chip = ac97->private_data;
+	struct snd_cs46xx *chip = ac97->private_data;
 	unsigned short val;
 	int codec_index = ac97->num;
 
@@ -221,7 +221,7 @@ static unsigned short snd_cs46xx_ac97_read(ac97_t * ac97,
 }
 
 
-static void snd_cs46xx_codec_write(cs46xx_t *chip,
+static void snd_cs46xx_codec_write(struct snd_cs46xx *chip,
 				   unsigned short reg,
 				   unsigned short val,
 				   int codec_index)
@@ -286,11 +286,11 @@ static void snd_cs46xx_codec_write(cs46xx_t *chip,
 	chip->active_ctrl(chip, -1);
 }
 
-static void snd_cs46xx_ac97_write(ac97_t *ac97,
+static void snd_cs46xx_ac97_write(struct snd_ac97 *ac97,
 				   unsigned short reg,
 				   unsigned short val)
 {
-	cs46xx_t *chip = ac97->private_data;
+	struct snd_cs46xx *chip = ac97->private_data;
 	int codec_index = ac97->num;
 
 	snd_assert(codec_index == CS46XX_PRIMARY_CODEC_INDEX ||
@@ -305,7 +305,7 @@ static void snd_cs46xx_ac97_write(ac97_t *ac97,
  *  Chip initialization
  */
 
-int snd_cs46xx_download(cs46xx_t *chip,
+int snd_cs46xx_download(struct snd_cs46xx *chip,
 			u32 *src,
                         unsigned long offset,
                         unsigned long len)
@@ -334,7 +334,7 @@ int snd_cs46xx_download(cs46xx_t *chip,
 #include "imgs/cwcbinhack.h"
 #include "imgs/cwcdma.h"
 
-int snd_cs46xx_clear_BA1(cs46xx_t *chip,
+int snd_cs46xx_clear_BA1(struct snd_cs46xx *chip,
                          unsigned long offset,
                          unsigned long len) 
 {
@@ -358,7 +358,7 @@ int snd_cs46xx_clear_BA1(cs46xx_t *chip,
 
 #include "cs46xx_image.h"
 
-int snd_cs46xx_download_image(cs46xx_t *chip)
+int snd_cs46xx_download_image(struct snd_cs46xx *chip)
 {
 	int idx, err;
 	unsigned long offset = 0;
@@ -379,7 +379,7 @@ int snd_cs46xx_download_image(cs46xx_t *chip)
  *  Chip reset
  */
 
-static void snd_cs46xx_reset(cs46xx_t *chip)
+static void snd_cs46xx_reset(struct snd_cs46xx *chip)
 {
 	int idx;
 
@@ -408,7 +408,7 @@ static void snd_cs46xx_reset(cs46xx_t *chip)
 	snd_cs46xx_poke(chip, BA1_FRMT, 0xadf);
 }
 
-static int cs46xx_wait_for_fifo(cs46xx_t * chip,int retry_timeout) 
+static int cs46xx_wait_for_fifo(struct snd_cs46xx * chip,int retry_timeout) 
 {
 	u32 i, status = 0;
 	/*
@@ -432,7 +432,7 @@ static int cs46xx_wait_for_fifo(cs46xx_t * chip,int retry_timeout)
 	return 0;
 }
 
-static void snd_cs46xx_clear_serial_FIFOs(cs46xx_t *chip)
+static void snd_cs46xx_clear_serial_FIFOs(struct snd_cs46xx *chip)
 {
 	int idx, powerdown = 0;
 	unsigned int tmp;
@@ -486,7 +486,7 @@ static void snd_cs46xx_clear_serial_FIFOs(cs46xx_t *chip)
 		snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, tmp);
 }
 
-static void snd_cs46xx_proc_start(cs46xx_t *chip)
+static void snd_cs46xx_proc_start(struct snd_cs46xx *chip)
 {
 	int cnt;
 
@@ -513,7 +513,7 @@ static void snd_cs46xx_proc_start(cs46xx_t *chip)
 		snd_printk(KERN_ERR "SPCR_RUNFR never reset\n");
 }
 
-static void snd_cs46xx_proc_stop(cs46xx_t *chip)
+static void snd_cs46xx_proc_stop(struct snd_cs46xx *chip)
 {
 	/*
 	 *  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)
 
 #define GOF_PER_SEC 200
 
-static void snd_cs46xx_set_play_sample_rate(cs46xx_t *chip, unsigned int rate)
+static void snd_cs46xx_set_play_sample_rate(struct snd_cs46xx *chip, unsigned int rate)
 {
 	unsigned long flags;
 	unsigned int tmp1, tmp2;
@@ -574,7 +574,7 @@ static void snd_cs46xx_set_play_sample_rate(cs46xx_t *chip, unsigned int rate)
 	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
-static void snd_cs46xx_set_capture_sample_rate(cs46xx_t *chip, unsigned int rate)
+static void snd_cs46xx_set_capture_sample_rate(struct snd_cs46xx *chip, unsigned int rate)
 {
 	unsigned long flags;
 	unsigned int phiIncr, coeffIncr, tmp1, tmp2;
@@ -684,43 +684,43 @@ static void snd_cs46xx_set_capture_sample_rate(cs46xx_t *chip, unsigned int rate
  *  PCM part
  */
 
-static void snd_cs46xx_pb_trans_copy(snd_pcm_substream_t *substream,
-				     snd_pcm_indirect_t *rec, size_t bytes)
+static void snd_cs46xx_pb_trans_copy(struct snd_pcm_substream *substream,
+				     struct snd_pcm_indirect *rec, size_t bytes)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	cs46xx_pcm_t * cpcm = runtime->private_data;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_cs46xx_pcm * cpcm = runtime->private_data;
 	memcpy(cpcm->hw_buf.area + rec->hw_data, runtime->dma_area + rec->sw_data, bytes);
 }
 
-static int snd_cs46xx_playback_transfer(snd_pcm_substream_t *substream)
+static int snd_cs46xx_playback_transfer(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	cs46xx_pcm_t * cpcm = runtime->private_data;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_cs46xx_pcm * cpcm = runtime->private_data;
 	snd_pcm_indirect_playback_transfer(substream, &cpcm->pcm_rec, snd_cs46xx_pb_trans_copy);
 	return 0;
 }
 
-static void snd_cs46xx_cp_trans_copy(snd_pcm_substream_t *substream,
-				     snd_pcm_indirect_t *rec, size_t bytes)
+static void snd_cs46xx_cp_trans_copy(struct snd_pcm_substream *substream,
+				     struct snd_pcm_indirect *rec, size_t bytes)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	memcpy(runtime->dma_area + rec->sw_data,
 	       chip->capt.hw_buf.area + rec->hw_data, bytes);
 }
 
-static int snd_cs46xx_capture_transfer(snd_pcm_substream_t *substream)
+static int snd_cs46xx_capture_transfer(struct snd_pcm_substream *substream)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
 	snd_pcm_indirect_capture_transfer(substream, &chip->capt.pcm_rec, snd_cs46xx_cp_trans_copy);
 	return 0;
 }
 
-static snd_pcm_uframes_t snd_cs46xx_playback_direct_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_cs46xx_playback_direct_pointer(struct snd_pcm_substream *substream)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
 	size_t ptr;
-	cs46xx_pcm_t *cpcm = substream->runtime->private_data;
+	struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data;
 	snd_assert (cpcm->pcm_channel,return -ENXIO);
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
@@ -732,11 +732,11 @@ static snd_pcm_uframes_t snd_cs46xx_playback_direct_pointer(snd_pcm_substream_t
 	return ptr >> cpcm->shift;
 }
 
-static snd_pcm_uframes_t snd_cs46xx_playback_indirect_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_cs46xx_playback_indirect_pointer(struct snd_pcm_substream *substream)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
 	size_t ptr;
-	cs46xx_pcm_t *cpcm = substream->runtime->private_data;
+	struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data;
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
 	snd_assert (cpcm->pcm_channel,return -ENXIO);
@@ -748,29 +748,29 @@ static snd_pcm_uframes_t snd_cs46xx_playback_indirect_pointer(snd_pcm_substream_
 	return snd_pcm_indirect_playback_pointer(substream, &cpcm->pcm_rec, ptr);
 }
 
-static snd_pcm_uframes_t snd_cs46xx_capture_direct_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_cs46xx_capture_direct_pointer(struct snd_pcm_substream *substream)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
 	size_t ptr = snd_cs46xx_peek(chip, BA1_CBA) - chip->capt.hw_buf.addr;
 	return ptr >> chip->capt.shift;
 }
 
-static snd_pcm_uframes_t snd_cs46xx_capture_indirect_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_cs46xx_capture_indirect_pointer(struct snd_pcm_substream *substream)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
 	size_t ptr = snd_cs46xx_peek(chip, BA1_CBA) - chip->capt.hw_buf.addr;
 	return snd_pcm_indirect_capture_pointer(substream, &chip->capt.pcm_rec, ptr);
 }
 
-static int snd_cs46xx_playback_trigger(snd_pcm_substream_t * substream,
+static int snd_cs46xx_playback_trigger(struct snd_pcm_substream *substream,
 				       int cmd)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
-	/*snd_pcm_runtime_t *runtime = substream->runtime;*/
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
+	/*struct snd_pcm_runtime *runtime = substream->runtime;*/
 	int result = 0;
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
-	cs46xx_pcm_t *cpcm = substream->runtime->private_data;
+	struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data;
 	if (! cpcm->pcm_channel) {
 		return -ENXIO;
 	}
@@ -827,10 +827,10 @@ static int snd_cs46xx_playback_trigger(snd_pcm_substream_t * substream,
 	return result;
 }
 
-static int snd_cs46xx_capture_trigger(snd_pcm_substream_t * substream,
+static int snd_cs46xx_capture_trigger(struct snd_pcm_substream *substream,
 				      int cmd)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
 	unsigned int tmp;
 	int result = 0;
 
@@ -858,7 +858,7 @@ static int snd_cs46xx_capture_trigger(snd_pcm_substream_t * substream,
 }
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
-static int _cs46xx_adjust_sample_rate (cs46xx_t *chip, cs46xx_pcm_t *cpcm,
+static int _cs46xx_adjust_sample_rate (struct snd_cs46xx *chip, struct snd_cs46xx_pcm *cpcm,
 				       int sample_rate) 
 {
 
@@ -893,14 +893,14 @@ static int _cs46xx_adjust_sample_rate (cs46xx_t *chip, cs46xx_pcm_t *cpcm,
 #endif
 
 
-static int snd_cs46xx_playback_hw_params(snd_pcm_substream_t * substream,
-					 snd_pcm_hw_params_t * hw_params)
+static int snd_cs46xx_playback_hw_params(struct snd_pcm_substream *substream,
+					 struct snd_pcm_hw_params *hw_params)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	cs46xx_pcm_t *cpcm;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_cs46xx_pcm *cpcm;
 	int err;
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
 	int sample_rate = params_rate(hw_params);
 	int period_size = params_period_bytes(hw_params);
 #endif
@@ -995,11 +995,11 @@ static int snd_cs46xx_playback_hw_params(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_cs46xx_playback_hw_free(snd_pcm_substream_t * substream)
+static int snd_cs46xx_playback_hw_free(struct snd_pcm_substream *substream)
 {
-	/*cs46xx_t *chip = snd_pcm_substream_chip(substream);*/
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	cs46xx_pcm_t *cpcm;
+	/*struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);*/
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_cs46xx_pcm *cpcm;
 
 	cpcm = runtime->private_data;
 
@@ -1017,13 +1017,13 @@ static int snd_cs46xx_playback_hw_free(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_cs46xx_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_cs46xx_playback_prepare(struct snd_pcm_substream *substream)
 {
 	unsigned int tmp;
 	unsigned int pfie;
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	cs46xx_pcm_t *cpcm;
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_cs46xx_pcm *cpcm;
 
 	cpcm = runtime->private_data;
 
@@ -1087,11 +1087,11 @@ static int snd_cs46xx_playback_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_cs46xx_capture_hw_params(snd_pcm_substream_t * substream,
-					snd_pcm_hw_params_t * hw_params)
+static int snd_cs46xx_capture_hw_params(struct snd_pcm_substream *substream,
+					struct snd_pcm_hw_params *hw_params)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
@@ -1118,10 +1118,10 @@ static int snd_cs46xx_capture_hw_params(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_cs46xx_capture_hw_free(snd_pcm_substream_t * substream)
+static int snd_cs46xx_capture_hw_free(struct snd_pcm_substream *substream)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	if (runtime->dma_area != chip->capt.hw_buf.area)
 		snd_pcm_lib_free_pages(substream);
@@ -1132,10 +1132,10 @@ static int snd_cs46xx_capture_hw_free(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_cs46xx_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_cs46xx_capture_prepare(struct snd_pcm_substream *substream)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	snd_cs46xx_poke(chip, BA1_CBA, chip->capt.hw_buf.addr);
 	chip->capt.shift = 2;
@@ -1149,13 +1149,13 @@ static int snd_cs46xx_capture_prepare(snd_pcm_substream_t * substream)
 
 static irqreturn_t snd_cs46xx_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	cs46xx_t *chip = dev_id;
+	struct snd_cs46xx *chip = dev_id;
 	u32 status1;
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	u32 status2;
 	int i;
-	cs46xx_pcm_t *cpcm = NULL;
+	struct snd_cs46xx_pcm *cpcm = NULL;
 #endif
 
 	/*
@@ -1239,7 +1239,7 @@ static irqreturn_t snd_cs46xx_interrupt(int irq, void *dev_id, struct pt_regs *r
 	return IRQ_HANDLED;
 }
 
-static snd_pcm_hardware_t snd_cs46xx_playback =
+static struct snd_pcm_hardware snd_cs46xx_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP |
 				 SNDRV_PCM_INFO_INTERLEAVED | 
@@ -1261,7 +1261,7 @@ static snd_pcm_hardware_t snd_cs46xx_playback =
 	.fifo_size =		0,
 };
 
-static snd_pcm_hardware_t snd_cs46xx_capture =
+static struct snd_pcm_hardware snd_cs46xx_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP |
 				 SNDRV_PCM_INFO_INTERLEAVED |
@@ -1285,7 +1285,7 @@ static snd_pcm_hardware_t snd_cs46xx_capture =
 
 static unsigned int period_sizes[] = { 32, 64, 128, 256, 512, 1024, 2048 };
 
-static snd_pcm_hw_constraint_list_t hw_constraints_period_sizes = {
+static struct snd_pcm_hw_constraint_list hw_constraints_period_sizes = {
 	.count = ARRAY_SIZE(period_sizes),
 	.list = period_sizes,
 	.mask = 0
@@ -1293,16 +1293,16 @@ static snd_pcm_hw_constraint_list_t hw_constraints_period_sizes = {
 
 #endif
 
-static void snd_cs46xx_pcm_free_substream(snd_pcm_runtime_t *runtime)
+static void snd_cs46xx_pcm_free_substream(struct snd_pcm_runtime *runtime)
 {
 	kfree(runtime->private_data);
 }
 
-static int _cs46xx_playback_open_channel (snd_pcm_substream_t * substream,int pcm_channel_id)
+static int _cs46xx_playback_open_channel (struct snd_pcm_substream *substream,int pcm_channel_id)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
-	cs46xx_pcm_t * cpcm;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs46xx_pcm * cpcm;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	cpcm = kzalloc(sizeof(*cpcm), GFP_KERNEL);
 	if (cpcm == NULL)
@@ -1340,30 +1340,30 @@ static int _cs46xx_playback_open_channel (snd_pcm_substream_t * substream,int pc
 	return 0;
 }
 
-static int snd_cs46xx_playback_open(snd_pcm_substream_t * substream)
+static int snd_cs46xx_playback_open(struct snd_pcm_substream *substream)
 {
 	snd_printdd("open front channel\n");
 	return _cs46xx_playback_open_channel(substream,DSP_PCM_MAIN_CHANNEL);
 }
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
-static int snd_cs46xx_playback_open_rear(snd_pcm_substream_t * substream)
+static int snd_cs46xx_playback_open_rear(struct snd_pcm_substream *substream)
 {
 	snd_printdd("open rear channel\n");
 
 	return _cs46xx_playback_open_channel(substream,DSP_PCM_REAR_CHANNEL);
 }
 
-static int snd_cs46xx_playback_open_clfe(snd_pcm_substream_t * substream)
+static int snd_cs46xx_playback_open_clfe(struct snd_pcm_substream *substream)
 {
 	snd_printdd("open center - LFE channel\n");
 
 	return _cs46xx_playback_open_channel(substream,DSP_PCM_CENTER_LFE_CHANNEL);
 }
 
-static int snd_cs46xx_playback_open_iec958(snd_pcm_substream_t * substream)
+static int snd_cs46xx_playback_open_iec958(struct snd_pcm_substream *substream)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
 
 	snd_printdd("open raw iec958 channel\n");
 
@@ -1374,12 +1374,12 @@ static int snd_cs46xx_playback_open_iec958(snd_pcm_substream_t * substream)
 	return _cs46xx_playback_open_channel(substream,DSP_IEC958_CHANNEL);
 }
 
-static int snd_cs46xx_playback_close(snd_pcm_substream_t * substream);
+static int snd_cs46xx_playback_close(struct snd_pcm_substream *substream);
 
-static int snd_cs46xx_playback_close_iec958(snd_pcm_substream_t * substream)
+static int snd_cs46xx_playback_close_iec958(struct snd_pcm_substream *substream)
 {
 	int err;
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
   
 	snd_printdd("close raw iec958 channel\n");
 
@@ -1393,9 +1393,9 @@ static int snd_cs46xx_playback_close_iec958(snd_pcm_substream_t * substream)
 }
 #endif
 
-static int snd_cs46xx_capture_open(snd_pcm_substream_t * substream)
+static int snd_cs46xx_capture_open(struct snd_pcm_substream *substream)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
 
 	if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
 				PAGE_SIZE, &chip->capt.hw_buf) < 0)
@@ -1416,11 +1416,11 @@ static int snd_cs46xx_capture_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_cs46xx_playback_close(snd_pcm_substream_t * substream)
+static int snd_cs46xx_playback_close(struct snd_pcm_substream *substream)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	cs46xx_pcm_t * cpcm;
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_cs46xx_pcm * cpcm;
 
 	cpcm = runtime->private_data;
 
@@ -1445,9 +1445,9 @@ static int snd_cs46xx_playback_close(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_cs46xx_capture_close(snd_pcm_substream_t * substream)
+static int snd_cs46xx_capture_close(struct snd_pcm_substream *substream)
 {
-	cs46xx_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
 
 	chip->capt.substream = NULL;
 	snd_dma_free_pages(&chip->capt.hw_buf);
@@ -1457,7 +1457,7 @@ static int snd_cs46xx_capture_close(snd_pcm_substream_t * substream)
 }
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
-static snd_pcm_ops_t snd_cs46xx_playback_rear_ops = {
+static struct snd_pcm_ops snd_cs46xx_playback_rear_ops = {
 	.open =			snd_cs46xx_playback_open_rear,
 	.close =		snd_cs46xx_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1468,7 +1468,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_rear_ops = {
 	.pointer =		snd_cs46xx_playback_direct_pointer,
 };
 
-static snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops = {
+static struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops = {
 	.open =			snd_cs46xx_playback_open_rear,
 	.close =		snd_cs46xx_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1480,7 +1480,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_indirect_rear_ops = {
 	.ack =			snd_cs46xx_playback_transfer,
 };
 
-static snd_pcm_ops_t snd_cs46xx_playback_clfe_ops = {
+static struct snd_pcm_ops snd_cs46xx_playback_clfe_ops = {
 	.open =			snd_cs46xx_playback_open_clfe,
 	.close =		snd_cs46xx_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1491,7 +1491,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_clfe_ops = {
 	.pointer =		snd_cs46xx_playback_direct_pointer,
 };
 
-static snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops = {
+static struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops = {
 	.open =			snd_cs46xx_playback_open_clfe,
 	.close =		snd_cs46xx_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1503,7 +1503,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_indirect_clfe_ops = {
 	.ack =			snd_cs46xx_playback_transfer,
 };
 
-static snd_pcm_ops_t snd_cs46xx_playback_iec958_ops = {
+static struct snd_pcm_ops snd_cs46xx_playback_iec958_ops = {
 	.open =			snd_cs46xx_playback_open_iec958,
 	.close =		snd_cs46xx_playback_close_iec958,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1514,7 +1514,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_iec958_ops = {
 	.pointer =		snd_cs46xx_playback_direct_pointer,
 };
 
-static snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops = {
+static struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops = {
 	.open =			snd_cs46xx_playback_open_iec958,
 	.close =		snd_cs46xx_playback_close_iec958,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1528,7 +1528,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_indirect_iec958_ops = {
 
 #endif
 
-static snd_pcm_ops_t snd_cs46xx_playback_ops = {
+static struct snd_pcm_ops snd_cs46xx_playback_ops = {
 	.open =			snd_cs46xx_playback_open,
 	.close =		snd_cs46xx_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1539,7 +1539,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_ops = {
 	.pointer =		snd_cs46xx_playback_direct_pointer,
 };
 
-static snd_pcm_ops_t snd_cs46xx_playback_indirect_ops = {
+static struct snd_pcm_ops snd_cs46xx_playback_indirect_ops = {
 	.open =			snd_cs46xx_playback_open,
 	.close =		snd_cs46xx_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1551,7 +1551,7 @@ static snd_pcm_ops_t snd_cs46xx_playback_indirect_ops = {
 	.ack =			snd_cs46xx_playback_transfer,
 };
 
-static snd_pcm_ops_t snd_cs46xx_capture_ops = {
+static struct snd_pcm_ops snd_cs46xx_capture_ops = {
 	.open =			snd_cs46xx_capture_open,
 	.close =		snd_cs46xx_capture_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1562,7 +1562,7 @@ static snd_pcm_ops_t snd_cs46xx_capture_ops = {
 	.pointer =		snd_cs46xx_capture_direct_pointer,
 };
 
-static snd_pcm_ops_t snd_cs46xx_capture_indirect_ops = {
+static struct snd_pcm_ops snd_cs46xx_capture_indirect_ops = {
 	.open =			snd_cs46xx_capture_open,
 	.close =		snd_cs46xx_capture_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1580,9 +1580,9 @@ static snd_pcm_ops_t snd_cs46xx_capture_indirect_ops = {
 #define MAX_PLAYBACK_CHANNELS	1
 #endif
 
-int __devinit snd_cs46xx_pcm(cs46xx_t *chip, int device, snd_pcm_t ** rpcm)
+int __devinit snd_cs46xx_pcm(struct snd_cs46xx *chip, int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if (rpcm)
@@ -1611,9 +1611,9 @@ int __devinit snd_cs46xx_pcm(cs46xx_t *chip, int device, snd_pcm_t ** rpcm)
 
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
-int __devinit snd_cs46xx_pcm_rear(cs46xx_t *chip, int device, snd_pcm_t ** rpcm)
+int __devinit snd_cs46xx_pcm_rear(struct snd_cs46xx *chip, int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if (rpcm)
@@ -1640,9 +1640,9 @@ int __devinit snd_cs46xx_pcm_rear(cs46xx_t *chip, int device, snd_pcm_t ** rpcm)
 	return 0;
 }
 
-int __devinit snd_cs46xx_pcm_center_lfe(cs46xx_t *chip, int device, snd_pcm_t ** rpcm)
+int __devinit snd_cs46xx_pcm_center_lfe(struct snd_cs46xx *chip, int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if (rpcm)
@@ -1669,9 +1669,9 @@ int __devinit snd_cs46xx_pcm_center_lfe(cs46xx_t *chip, int device, snd_pcm_t **
 	return 0;
 }
 
-int __devinit snd_cs46xx_pcm_iec958(cs46xx_t *chip, int device, snd_pcm_t ** rpcm)
+int __devinit snd_cs46xx_pcm_iec958(struct snd_cs46xx *chip, int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if (rpcm)
@@ -1702,16 +1702,16 @@ int __devinit snd_cs46xx_pcm_iec958(cs46xx_t *chip, int device, snd_pcm_t ** rpc
 /*
  *  Mixer routines
  */
-static void snd_cs46xx_mixer_free_ac97_bus(ac97_bus_t *bus)
+static void snd_cs46xx_mixer_free_ac97_bus(struct snd_ac97_bus *bus)
 {
-	cs46xx_t *chip = bus->private_data;
+	struct snd_cs46xx *chip = bus->private_data;
 
 	chip->ac97_bus = NULL;
 }
 
-static void snd_cs46xx_mixer_free_ac97(ac97_t *ac97)
+static void snd_cs46xx_mixer_free_ac97(struct snd_ac97 *ac97)
 {
-	cs46xx_t *chip = ac97->private_data;
+	struct snd_cs46xx *chip = ac97->private_data;
 
 	snd_assert ((ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]) ||
 		    (ac97 == chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]),
@@ -1725,8 +1725,8 @@ static void snd_cs46xx_mixer_free_ac97(ac97_t *ac97)
 		chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] = NULL;
 }
 
-static int snd_cs46xx_vol_info(snd_kcontrol_t *kcontrol, 
-			       snd_ctl_elem_info_t *uinfo)
+static int snd_cs46xx_vol_info(struct snd_kcontrol *kcontrol, 
+			       struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
@@ -1735,9 +1735,9 @@ static int snd_cs46xx_vol_info(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_cs46xx_vol_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs46xx_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value;
 	unsigned int val = snd_cs46xx_peek(chip, reg);
 	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 *
 	return 0;
 }
 
-static int snd_cs46xx_vol_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs46xx_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value;
 	unsigned int val = ((0xffff - ucontrol->value.integer.value[0]) << 16 | 
 			    (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 *
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
 
-static int snd_cs46xx_vol_dac_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs46xx_vol_dac_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.integer.value[0] = chip->dsp_spos_instance->dac_volume_left;
 	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_
 	return 0;
 }
 
-static int snd_cs46xx_vol_dac_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs46xx_vol_dac_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 	int change = 0;
 
 	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_
 }
 
 #if 0
-static int snd_cs46xx_vol_iec958_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs46xx_vol_iec958_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.integer.value[0] = chip->dsp_spos_instance->spdif_input_volume_left;
 	ucontrol->value.integer.value[1] = chip->dsp_spos_instance->spdif_input_volume_right;
 	return 0;
 }
 
-static int snd_cs46xx_vol_iec958_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_cs46xx_vol_iec958_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 	int change = 0;
 
 	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
 }
 #endif
 
-static int snd_mixer_boolean_info(snd_kcontrol_t *kcontrol, 
-				  snd_ctl_elem_info_t *uinfo)
+static int snd_mixer_boolean_info(struct snd_kcontrol *kcontrol, 
+				  struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -1826,10 +1826,10 @@ static int snd_mixer_boolean_info(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_cs46xx_iec958_get(snd_kcontrol_t *kcontrol, 
-                                 snd_ctl_elem_value_t *ucontrol)
+static int snd_cs46xx_iec958_get(struct snd_kcontrol *kcontrol, 
+                                 struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value;
 
 	if (reg == CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT)
@@ -1840,10 +1840,10 @@ static int snd_cs46xx_iec958_get(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_cs46xx_iec958_put(snd_kcontrol_t *kcontrol, 
-                                  snd_ctl_elem_value_t *ucontrol)
+static int snd_cs46xx_iec958_put(struct snd_kcontrol *kcontrol, 
+                                  struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 	int change, res;
 
 	switch (kcontrol->private_value) {
@@ -1877,11 +1877,11 @@ static int snd_cs46xx_iec958_put(snd_kcontrol_t *kcontrol,
 	return res;
 }
 
-static int snd_cs46xx_adc_capture_get(snd_kcontrol_t *kcontrol, 
-                                      snd_ctl_elem_value_t *ucontrol)
+static int snd_cs46xx_adc_capture_get(struct snd_kcontrol *kcontrol, 
+                                      struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	if (ins->adc_input != NULL) 
 		ucontrol->value.integer.value[0] = 1;
@@ -1891,11 +1891,11 @@ static int snd_cs46xx_adc_capture_get(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_cs46xx_adc_capture_put(snd_kcontrol_t *kcontrol, 
-                                      snd_ctl_elem_value_t *ucontrol)
+static int snd_cs46xx_adc_capture_put(struct snd_kcontrol *kcontrol, 
+                                      struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	int change = 0;
 
 	if (ucontrol->value.integer.value[0] && !ins->adc_input) {
@@ -1908,11 +1908,11 @@ static int snd_cs46xx_adc_capture_put(snd_kcontrol_t *kcontrol,
 	return change;
 }
 
-static int snd_cs46xx_pcm_capture_get(snd_kcontrol_t *kcontrol, 
-                                      snd_ctl_elem_value_t *ucontrol)
+static int snd_cs46xx_pcm_capture_get(struct snd_kcontrol *kcontrol, 
+                                      struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	if (ins->pcm_input != NULL) 
 		ucontrol->value.integer.value[0] = 1;
@@ -1923,11 +1923,11 @@ static int snd_cs46xx_pcm_capture_get(snd_kcontrol_t *kcontrol,
 }
 
 
-static int snd_cs46xx_pcm_capture_put(snd_kcontrol_t *kcontrol, 
-                                      snd_ctl_elem_value_t *ucontrol)
+static int snd_cs46xx_pcm_capture_put(struct snd_kcontrol *kcontrol, 
+                                      struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	int change = 0;
 
 	if (ucontrol->value.integer.value[0] && !ins->pcm_input) {
@@ -1941,10 +1941,10 @@ static int snd_cs46xx_pcm_capture_put(snd_kcontrol_t *kcontrol,
 	return change;
 }
 
-static int snd_herc_spdif_select_get(snd_kcontrol_t *kcontrol, 
-                                     snd_ctl_elem_value_t *ucontrol)
+static int snd_herc_spdif_select_get(struct snd_kcontrol *kcontrol, 
+                                     struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 
 	int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR);
 
@@ -1959,10 +1959,10 @@ static int snd_herc_spdif_select_get(snd_kcontrol_t *kcontrol,
 /*
  *	Game Theatre XP card - EGPIO[0] is used to select SPDIF input optical or coaxial.
  */ 
-static int snd_herc_spdif_select_put(snd_kcontrol_t *kcontrol, 
-                                       snd_ctl_elem_value_t *ucontrol)
+static int snd_herc_spdif_select_put(struct snd_kcontrol *kcontrol, 
+                                       struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 	int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR);
 	int val2 = snd_cs46xx_peekBA0(chip, BA0_EGPIOPTR);
 
@@ -1984,18 +1984,18 @@ static int snd_herc_spdif_select_put(snd_kcontrol_t *kcontrol,
 }
 
 
-static int snd_cs46xx_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_cs46xx_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_cs46xx_spdif_default_get(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_cs46xx_spdif_default_get(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	down (&chip->spos_mutex);
 	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,
 	return 0;
 }
 
-static int snd_cs46xx_spdif_default_put(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_cs46xx_spdif_default_put(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t * chip = snd_kcontrol_chip(kcontrol);
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct snd_cs46xx * chip = snd_kcontrol_chip(kcontrol);
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	unsigned int val;
 	int change;
 
@@ -2034,8 +2034,8 @@ static int snd_cs46xx_spdif_default_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static int snd_cs46xx_spdif_mask_get(snd_kcontrol_t * kcontrol,
-				     snd_ctl_elem_value_t * ucontrol)
+static int snd_cs46xx_spdif_mask_get(struct snd_kcontrol *kcontrol,
+				     struct snd_ctl_elem_value *ucontrol)
 {
 	ucontrol->value.iec958.status[0] = 0xff;
 	ucontrol->value.iec958.status[1] = 0xff;
@@ -2044,11 +2044,11 @@ static int snd_cs46xx_spdif_mask_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_cs46xx_spdif_stream_get(snd_kcontrol_t * kcontrol,
-                                         snd_ctl_elem_value_t * ucontrol)
+static int snd_cs46xx_spdif_stream_get(struct snd_kcontrol *kcontrol,
+                                         struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	down (&chip->spos_mutex);
 	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,
 	return 0;
 }
 
-static int snd_cs46xx_spdif_stream_put(snd_kcontrol_t * kcontrol,
-                                        snd_ctl_elem_value_t * ucontrol)
+static int snd_cs46xx_spdif_stream_put(struct snd_kcontrol *kcontrol,
+                                        struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t * chip = snd_kcontrol_chip(kcontrol);
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct snd_cs46xx * chip = snd_kcontrol_chip(kcontrol);
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	unsigned int val;
 	int change;
 
@@ -2091,8 +2091,8 @@ static int snd_cs46xx_spdif_stream_put(snd_kcontrol_t * kcontrol,
 
 
 #ifdef CONFIG_SND_CS46XX_DEBUG_GPIO
-static int snd_cs46xx_egpio_select_info(snd_kcontrol_t *kcontrol, 
-                                        snd_ctl_elem_info_t *uinfo)
+static int snd_cs46xx_egpio_select_info(struct snd_kcontrol *kcontrol, 
+                                        struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -2101,19 +2101,19 @@ static int snd_cs46xx_egpio_select_info(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_cs46xx_egpio_select_get(snd_kcontrol_t *kcontrol, 
-                                       snd_ctl_elem_value_t *ucontrol)
+static int snd_cs46xx_egpio_select_get(struct snd_kcontrol *kcontrol, 
+                                       struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 	ucontrol->value.integer.value[0] = chip->current_gpio;
 
 	return 0;
 }
 
-static int snd_cs46xx_egpio_select_put(snd_kcontrol_t *kcontrol, 
-                                       snd_ctl_elem_value_t *ucontrol)
+static int snd_cs46xx_egpio_select_put(struct snd_kcontrol *kcontrol, 
+                                       struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 	int change = (chip->current_gpio != ucontrol->value.integer.value[0]);
 	chip->current_gpio = ucontrol->value.integer.value[0];
 
@@ -2121,10 +2121,10 @@ static int snd_cs46xx_egpio_select_put(snd_kcontrol_t *kcontrol,
 }
 
 
-static int snd_cs46xx_egpio_get(snd_kcontrol_t *kcontrol, 
-                                       snd_ctl_elem_value_t *ucontrol)
+static int snd_cs46xx_egpio_get(struct snd_kcontrol *kcontrol, 
+                                       struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value;
 
 	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,
 	return 0;
 }
 
-static int snd_cs46xx_egpio_put(snd_kcontrol_t *kcontrol, 
-                                       snd_ctl_elem_value_t *ucontrol)
+static int snd_cs46xx_egpio_put(struct snd_kcontrol *kcontrol, 
+                                       struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value;
 	int val = snd_cs46xx_peekBA0(chip, reg);
 	int oldval = val;
@@ -2155,7 +2155,7 @@ static int snd_cs46xx_egpio_put(snd_kcontrol_t *kcontrol,
 }
 #endif /* CONFIG_SND_CS46XX_DEBUG_GPIO */
 
-static snd_kcontrol_new_t snd_cs46xx_controls[] __devinitdata = {
+static struct snd_kcontrol_new snd_cs46xx_controls[] __devinitdata = {
 {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "DAC Volume",
@@ -2285,26 +2285,26 @@ static snd_kcontrol_new_t snd_cs46xx_controls[] __devinitdata = {
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
 /* set primary cs4294 codec into Extended Audio Mode */
-static int snd_cs46xx_front_dup_get(snd_kcontrol_t *kcontrol, 
-				    snd_ctl_elem_value_t *ucontrol)
+static int snd_cs46xx_front_dup_get(struct snd_kcontrol *kcontrol, 
+				    struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 	unsigned short val;
 	val = snd_ac97_read(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], AC97_CSR_ACMODE);
 	ucontrol->value.integer.value[0] = (val & 0x200) ? 0 : 1;
 	return 0;
 }
 
-static int snd_cs46xx_front_dup_put(snd_kcontrol_t *kcontrol, 
-				    snd_ctl_elem_value_t *ucontrol)
+static int snd_cs46xx_front_dup_put(struct snd_kcontrol *kcontrol, 
+				    struct snd_ctl_elem_value *ucontrol)
 {
-	cs46xx_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
 	return snd_ac97_update_bits(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX],
 				    AC97_CSR_ACMODE, 0x200,
 				    ucontrol->value.integer.value[0] ? 0 : 0x200);
 }
 
-static snd_kcontrol_new_t snd_cs46xx_front_dup_ctl = {
+static struct snd_kcontrol_new snd_cs46xx_front_dup_ctl = {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "Duplicate Front",
 	.info = snd_mixer_boolean_info,
@@ -2315,7 +2315,7 @@ static snd_kcontrol_new_t snd_cs46xx_front_dup_ctl = {
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
 /* Only available on the Hercules Game Theater XP soundcard */
-static snd_kcontrol_new_t snd_hercules_controls[] __devinitdata = {
+static struct snd_kcontrol_new snd_hercules_controls[] __devinitdata = {
 {
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name = "Optical/Coaxial SPDIF Input Switch",
@@ -2326,7 +2326,7 @@ static snd_kcontrol_new_t snd_hercules_controls[] __devinitdata = {
 };
 
 
-static void snd_cs46xx_codec_reset (ac97_t * ac97)
+static void snd_cs46xx_codec_reset (struct snd_ac97 * ac97)
 {
 	unsigned long end_time;
 	int err;
@@ -2375,10 +2375,10 @@ static void snd_cs46xx_codec_reset (ac97_t * ac97)
 }
 #endif
 
-static int __devinit cs46xx_detect_codec(cs46xx_t *chip, int codec)
+static int __devinit cs46xx_detect_codec(struct snd_cs46xx *chip, int codec)
 {
 	int idx, err;
-	ac97_template_t ac97;
+	struct snd_ac97_template ac97;
 
 	memset(&ac97, 0, sizeof(ac97));
 	ac97.private_data = chip;
@@ -2408,13 +2408,13 @@ static int __devinit cs46xx_detect_codec(cs46xx_t *chip, int codec)
 	return -ENXIO;
 }
 
-int __devinit snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device)
+int __devinit snd_cs46xx_mixer(struct snd_cs46xx *chip, int spdif_device)
 {
-	snd_card_t *card = chip->card;
-	snd_ctl_elem_id_t id;
+	struct snd_card *card = chip->card;
+	struct snd_ctl_elem_id id;
 	int err;
 	unsigned int idx;
-	static ac97_bus_ops_t ops = {
+	static struct snd_ac97_bus_ops ops = {
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
 		.reset = snd_cs46xx_codec_reset,
 #endif
@@ -2442,7 +2442,7 @@ int __devinit snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device)
 
 	/* add cs4630 mixer controls */
 	for (idx = 0; idx < ARRAY_SIZE(snd_cs46xx_controls); idx++) {
-		snd_kcontrol_t *kctl;
+		struct snd_kcontrol *kctl;
 		kctl = snd_ctl_new1(&snd_cs46xx_controls[idx], chip);
 		if (kctl && kctl->id.iface == SNDRV_CTL_ELEM_IFACE_PCM)
 			kctl->id.device = spdif_device;
@@ -2484,16 +2484,16 @@ int __devinit snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device)
  *  RawMIDI interface
  */
 
-static void snd_cs46xx_midi_reset(cs46xx_t *chip)
+static void snd_cs46xx_midi_reset(struct snd_cs46xx *chip)
 {
 	snd_cs46xx_pokeBA0(chip, BA0_MIDCR, MIDCR_MRST);
 	udelay(100);
 	snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr);
 }
 
-static int snd_cs46xx_midi_input_open(snd_rawmidi_substream_t * substream)
+static int snd_cs46xx_midi_input_open(struct snd_rawmidi_substream *substream)
 {
-	cs46xx_t *chip = substream->rmidi->private_data;
+	struct snd_cs46xx *chip = substream->rmidi->private_data;
 
 	chip->active_ctrl(chip, 1);
 	spin_lock_irq(&chip->reg_lock);
@@ -2509,9 +2509,9 @@ static int snd_cs46xx_midi_input_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_cs46xx_midi_input_close(snd_rawmidi_substream_t * substream)
+static int snd_cs46xx_midi_input_close(struct snd_rawmidi_substream *substream)
 {
-	cs46xx_t *chip = substream->rmidi->private_data;
+	struct snd_cs46xx *chip = substream->rmidi->private_data;
 
 	spin_lock_irq(&chip->reg_lock);
 	chip->midcr &= ~(MIDCR_RXE | MIDCR_RIE);
@@ -2527,9 +2527,9 @@ static int snd_cs46xx_midi_input_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_cs46xx_midi_output_open(snd_rawmidi_substream_t * substream)
+static int snd_cs46xx_midi_output_open(struct snd_rawmidi_substream *substream)
 {
-	cs46xx_t *chip = substream->rmidi->private_data;
+	struct snd_cs46xx *chip = substream->rmidi->private_data;
 
 	chip->active_ctrl(chip, 1);
 
@@ -2546,9 +2546,9 @@ static int snd_cs46xx_midi_output_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_cs46xx_midi_output_close(snd_rawmidi_substream_t * substream)
+static int snd_cs46xx_midi_output_close(struct snd_rawmidi_substream *substream)
 {
-	cs46xx_t *chip = substream->rmidi->private_data;
+	struct snd_cs46xx *chip = substream->rmidi->private_data;
 
 	spin_lock_irq(&chip->reg_lock);
 	chip->midcr &= ~(MIDCR_TXE | MIDCR_TIE);
@@ -2564,10 +2564,10 @@ static int snd_cs46xx_midi_output_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static void snd_cs46xx_midi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_cs46xx_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
 {
 	unsigned long flags;
-	cs46xx_t *chip = substream->rmidi->private_data;
+	struct snd_cs46xx *chip = substream->rmidi->private_data;
 
 	spin_lock_irqsave(&chip->reg_lock, flags);
 	if (up) {
@@ -2584,10 +2584,10 @@ static void snd_cs46xx_midi_input_trigger(snd_rawmidi_substream_t * substream, i
 	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
-static void snd_cs46xx_midi_output_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_cs46xx_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
 {
 	unsigned long flags;
-	cs46xx_t *chip = substream->rmidi->private_data;
+	struct snd_cs46xx *chip = substream->rmidi->private_data;
 	unsigned char byte;
 
 	spin_lock_irqsave(&chip->reg_lock, flags);
@@ -2614,23 +2614,23 @@ static void snd_cs46xx_midi_output_trigger(snd_rawmidi_substream_t * substream,
 	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
-static snd_rawmidi_ops_t snd_cs46xx_midi_output =
+static struct snd_rawmidi_ops snd_cs46xx_midi_output =
 {
 	.open =		snd_cs46xx_midi_output_open,
 	.close =	snd_cs46xx_midi_output_close,
 	.trigger =	snd_cs46xx_midi_output_trigger,
 };
 
-static snd_rawmidi_ops_t snd_cs46xx_midi_input =
+static struct snd_rawmidi_ops snd_cs46xx_midi_input =
 {
 	.open =		snd_cs46xx_midi_input_open,
 	.close =	snd_cs46xx_midi_input_close,
 	.trigger =	snd_cs46xx_midi_input_trigger,
 };
 
-int __devinit snd_cs46xx_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rrawmidi)
+int __devinit snd_cs46xx_midi(struct snd_cs46xx *chip, int device, struct snd_rawmidi **rrawmidi)
 {
-	snd_rawmidi_t *rmidi;
+	struct snd_rawmidi *rmidi;
 	int err;
 
 	if (rrawmidi)
@@ -2657,7 +2657,7 @@ int __devinit snd_cs46xx_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rrawmi
 
 static void snd_cs46xx_gameport_trigger(struct gameport *gameport)
 {
-	cs46xx_t *chip = gameport_get_port_data(gameport);
+	struct snd_cs46xx *chip = gameport_get_port_data(gameport);
 
 	snd_assert(chip, return);
 	snd_cs46xx_pokeBA0(chip, BA0_JSPT, 0xFF);  //outb(gameport->io, 0xFF);
@@ -2665,7 +2665,7 @@ static void snd_cs46xx_gameport_trigger(struct gameport *gameport)
 
 static unsigned char snd_cs46xx_gameport_read(struct gameport *gameport)
 {
-	cs46xx_t *chip = gameport_get_port_data(gameport);
+	struct snd_cs46xx *chip = gameport_get_port_data(gameport);
 
 	snd_assert(chip, return 0);
 	return snd_cs46xx_peekBA0(chip, BA0_JSPT); //inb(gameport->io);
@@ -2673,7 +2673,7 @@ static unsigned char snd_cs46xx_gameport_read(struct gameport *gameport)
 
 static int snd_cs46xx_gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons)
 {
-	cs46xx_t *chip = gameport_get_port_data(gameport);
+	struct snd_cs46xx *chip = gameport_get_port_data(gameport);
 	unsigned js1, js2, jst;
 
 	snd_assert(chip, return 0);
@@ -2707,7 +2707,7 @@ static int snd_cs46xx_gameport_open(struct gameport *gameport, int mode)
 	return 0;
 }
 
-int __devinit snd_cs46xx_gameport(cs46xx_t *chip)
+int __devinit snd_cs46xx_gameport(struct snd_cs46xx *chip)
 {
 	struct gameport *gp;
 
@@ -2735,7 +2735,7 @@ int __devinit snd_cs46xx_gameport(cs46xx_t *chip)
 	return 0;
 }
 
-static inline void snd_cs46xx_remove_gameport(cs46xx_t *chip)
+static inline void snd_cs46xx_remove_gameport(struct snd_cs46xx *chip)
 {
 	if (chip->gameport) {
 		gameport_unregister_port(chip->gameport);
@@ -2743,20 +2743,20 @@ static inline void snd_cs46xx_remove_gameport(cs46xx_t *chip)
 	}
 }
 #else
-int __devinit snd_cs46xx_gameport(cs46xx_t *chip) { return -ENOSYS; }
-static inline void snd_cs46xx_remove_gameport(cs46xx_t *chip) { }
+int __devinit snd_cs46xx_gameport(struct snd_cs46xx *chip) { return -ENOSYS; }
+static inline void snd_cs46xx_remove_gameport(struct snd_cs46xx *chip) { }
 #endif /* CONFIG_GAMEPORT */
 
 /*
  *  proc interface
  */
 
-static long snd_cs46xx_io_read(snd_info_entry_t *entry, void *file_private_data,
+static long snd_cs46xx_io_read(struct snd_info_entry *entry, void *file_private_data,
 			       struct file *file, char __user *buf,
 			       unsigned long count, unsigned long pos)
 {
 	long size;
-	snd_cs46xx_region_t *region = (snd_cs46xx_region_t *)entry->private_data;
+	struct snd_cs46xx_region *region = entry->private_data;
 	
 	size = count;
 	if (pos + (size_t)size > region->size)
@@ -2772,13 +2772,13 @@ static struct snd_info_entry_ops snd_cs46xx_proc_io_ops = {
 	.read = snd_cs46xx_io_read,
 };
 
-static int __devinit snd_cs46xx_proc_init(snd_card_t * card, cs46xx_t *chip)
+static int __devinit snd_cs46xx_proc_init(struct snd_card *card, struct snd_cs46xx *chip)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 	int idx;
 	
 	for (idx = 0; idx < 5; idx++) {
-		snd_cs46xx_region_t *region = &chip->region.idx[idx];
+		struct snd_cs46xx_region *region = &chip->region.idx[idx];
 		if (! snd_card_proc_new(card, region->name, &entry)) {
 			entry->content = SNDRV_INFO_CONTENT_DATA;
 			entry->private_data = chip;
@@ -2793,7 +2793,7 @@ static int __devinit snd_cs46xx_proc_init(snd_card_t * card, cs46xx_t *chip)
 	return 0;
 }
 
-static int snd_cs46xx_proc_done(cs46xx_t *chip)
+static int snd_cs46xx_proc_done(struct snd_cs46xx *chip)
 {
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
 	cs46xx_dsp_proc_done(chip);
@@ -2804,7 +2804,7 @@ static int snd_cs46xx_proc_done(cs46xx_t *chip)
 /*
  * stop the h/w
  */
-static void snd_cs46xx_hw_stop(cs46xx_t *chip)
+static void snd_cs46xx_hw_stop(struct snd_cs46xx *chip)
 {
 	unsigned int tmp;
 
@@ -2851,7 +2851,7 @@ static void snd_cs46xx_hw_stop(cs46xx_t *chip)
 }
 
 
-static int snd_cs46xx_free(cs46xx_t *chip)
+static int snd_cs46xx_free(struct snd_cs46xx *chip)
 {
 	int idx;
 
@@ -2871,13 +2871,13 @@ static int snd_cs46xx_free(cs46xx_t *chip)
 		snd_cs46xx_hw_stop(chip);
 
 	for (idx = 0; idx < 5; idx++) {
-		snd_cs46xx_region_t *region = &chip->region.idx[idx];
+		struct snd_cs46xx_region *region = &chip->region.idx[idx];
 		if (region->remap_addr)
 			iounmap(region->remap_addr);
 		release_and_free_resource(region->resource);
 	}
 	if (chip->irq >= 0)
-		free_irq(chip->irq, (void *)chip);
+		free_irq(chip->irq, chip);
 
 	if (chip->active_ctrl)
 		chip->active_ctrl(chip, -chip->amplifier);
@@ -2894,16 +2894,16 @@ static int snd_cs46xx_free(cs46xx_t *chip)
 	return 0;
 }
 
-static int snd_cs46xx_dev_free(snd_device_t *device)
+static int snd_cs46xx_dev_free(struct snd_device *device)
 {
-	cs46xx_t *chip = device->device_data;
+	struct snd_cs46xx *chip = device->device_data;
 	return snd_cs46xx_free(chip);
 }
 
 /*
  *  initialize chip
  */
-static int snd_cs46xx_chip_init(cs46xx_t *chip)
+static int snd_cs46xx_chip_init(struct snd_cs46xx *chip)
 {
 	int timeout;
 
@@ -3132,7 +3132,7 @@ static int snd_cs46xx_chip_init(cs46xx_t *chip)
 /*
  *  start and load DSP 
  */
-int __devinit snd_cs46xx_start_dsp(cs46xx_t *chip)
+int __devinit snd_cs46xx_start_dsp(struct snd_cs46xx *chip)
 {	
 	unsigned int tmp;
 	/*
@@ -3234,12 +3234,12 @@ int __devinit snd_cs46xx_start_dsp(cs46xx_t *chip)
  *	AMP control - null AMP
  */
  
-static void amp_none(cs46xx_t *chip, int change)
+static void amp_none(struct snd_cs46xx *chip, int change)
 {	
 }
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
-static int voyetra_setup_eapd_slot(cs46xx_t *chip)
+static int voyetra_setup_eapd_slot(struct snd_cs46xx *chip)
 {
 	
 	u32 idx, valid_slots,tmp,powerdown = 0;
@@ -3359,7 +3359,7 @@ static int voyetra_setup_eapd_slot(cs46xx_t *chip)
  *	Crystal EAPD mode
  */
  
-static void amp_voyetra(cs46xx_t *chip, int change)
+static void amp_voyetra(struct snd_cs46xx *chip, int change)
 {
 	/* Manage the EAPD bit on the Crystal 4297 
 	   and the Analog AD1885 */
@@ -3395,7 +3395,7 @@ static void amp_voyetra(cs46xx_t *chip, int change)
 #endif
 }
 
-static void hercules_init(cs46xx_t *chip) 
+static void hercules_init(struct snd_cs46xx *chip) 
 {
 	/* default: AMP off, and SPDIF input optical */
 	snd_cs46xx_pokeBA0(chip, BA0_EGPIODR, EGPIODR_GPOE0);
@@ -3406,7 +3406,7 @@ static void hercules_init(cs46xx_t *chip)
 /*
  *	Game Theatre XP card - EGPIO[2] is used to enable the external amp.
  */ 
-static void amp_hercules(cs46xx_t *chip, int change)
+static void amp_hercules(struct snd_cs46xx *chip, int change)
 {
 	int old = chip->amplifier;
 	int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR);
@@ -3427,7 +3427,7 @@ static void amp_hercules(cs46xx_t *chip, int change)
 	}
 }
 
-static void voyetra_mixer_init (cs46xx_t *chip)
+static void voyetra_mixer_init (struct snd_cs46xx *chip)
 {
 	snd_printdd ("initializing Voyetra mixer\n");
 
@@ -3436,12 +3436,12 @@ static void voyetra_mixer_init (cs46xx_t *chip)
 	snd_cs46xx_pokeBA0(chip, BA0_EGPIOPTR, EGPIODR_GPOE0);
 }
 
-static void hercules_mixer_init (cs46xx_t *chip)
+static void hercules_mixer_init (struct snd_cs46xx *chip)
 {
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
 	unsigned int idx;
 	int err;
-	snd_card_t *card = chip->card;
+	struct snd_card *card = chip->card;
 #endif
 
 	/* set EGPIO to default */
@@ -3451,7 +3451,7 @@ static void hercules_mixer_init (cs46xx_t *chip)
 
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
 	for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) {
-		snd_kcontrol_t *kctl;
+		struct snd_kcontrol *kctl;
 
 		kctl = snd_ctl_new1(&snd_hercules_controls[idx], chip);
 		if ((err = snd_ctl_add(card, kctl)) < 0) {
@@ -3468,7 +3468,7 @@ static void hercules_mixer_init (cs46xx_t *chip)
  *	Untested
  */
  
-static void amp_voyetra_4294(cs46xx_t *chip, int change)
+static void amp_voyetra_4294(struct snd_cs46xx *chip, int change)
 {
 	chip->amplifier += change;
 
@@ -3498,7 +3498,7 @@ static void amp_voyetra_4294(cs46xx_t *chip, int change)
  *	enough to make them useful.
  */
  
-static void clkrun_hack(cs46xx_t *chip, int change)
+static void clkrun_hack(struct snd_cs46xx *chip, int change)
 {
 	u16 control, nval;
 	
@@ -3523,7 +3523,7 @@ static void clkrun_hack(cs46xx_t *chip, int change)
 /*
  * detect intel piix4
  */
-static void clkrun_init(cs46xx_t *chip)
+static void clkrun_init(struct snd_cs46xx *chip)
 {
 	struct pci_dev *pdev;
 	u8 pp;
@@ -3551,10 +3551,10 @@ struct cs_card_type
 	u16 vendor;
 	u16 id;
 	char *name;
-	void (*init)(cs46xx_t *);
-	void (*amp)(cs46xx_t *, int);
-	void (*active)(cs46xx_t *, int);
-	void (*mixer_init)(cs46xx_t *);
+	void (*init)(struct snd_cs46xx *);
+	void (*amp)(struct snd_cs46xx *, int);
+	void (*active)(struct snd_cs46xx *, int);
+	void (*mixer_init)(struct snd_cs46xx *);
 };
 
 static struct cs_card_type __devinitdata cards[] = {
@@ -3654,9 +3654,9 @@ static struct cs_card_type __devinitdata cards[] = {
  * APM support
  */
 #ifdef CONFIG_PM
-static int snd_cs46xx_suspend(snd_card_t *card, pm_message_t state)
+static int snd_cs46xx_suspend(struct snd_card *card, pm_message_t state)
 {
-	cs46xx_t *chip = card->pm_private_data;
+	struct snd_cs46xx *chip = card->pm_private_data;
 	int amp_saved;
 
 	snd_pcm_suspend_all(chip->pcm);
@@ -3678,9 +3678,9 @@ static int snd_cs46xx_suspend(snd_card_t *card, pm_message_t state)
 	return 0;
 }
 
-static int snd_cs46xx_resume(snd_card_t *card)
+static int snd_cs46xx_resume(struct snd_card *card)
 {
-	cs46xx_t *chip = card->pm_private_data;
+	struct snd_cs46xx *chip = card->pm_private_data;
 	int amp_saved;
 
 	pci_enable_device(chip->pci);
@@ -3719,17 +3719,17 @@ static int snd_cs46xx_resume(snd_card_t *card)
 /*
  */
 
-int __devinit snd_cs46xx_create(snd_card_t * card,
+int __devinit snd_cs46xx_create(struct snd_card *card,
 		      struct pci_dev * pci,
 		      int external_amp, int thinkpad,
-		      cs46xx_t ** rchip)
+		      struct snd_cs46xx ** rchip)
 {
-	cs46xx_t *chip;
+	struct snd_cs46xx *chip;
 	int err, idx;
-	snd_cs46xx_region_t *region;
+	struct snd_cs46xx_region *region;
 	struct cs_card_type *cp;
 	u16 ss_card, ss_vendor;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_cs46xx_dev_free,
 	};
 	
@@ -3755,7 +3755,8 @@ int __devinit snd_cs46xx_create(snd_card_t * card,
 	chip->ba1_addr = pci_resource_start(pci, 1);
 	if (chip->ba0_addr == 0 || chip->ba0_addr == (unsigned long)~0 ||
 	    chip->ba1_addr == 0 || chip->ba1_addr == (unsigned long)~0) {
-	    	snd_printk(KERN_ERR "wrong address(es) - ba0 = 0x%lx, ba1 = 0x%lx\n", chip->ba0_addr, chip->ba1_addr);
+	    	snd_printk(KERN_ERR "wrong address(es) - ba0 = 0x%lx, ba1 = 0x%lx\n",
+			   chip->ba0_addr, chip->ba1_addr);
 	    	snd_cs46xx_free(chip);
 	    	return -ENOMEM;
 	}
@@ -3825,8 +3826,10 @@ int __devinit snd_cs46xx_create(snd_card_t * card,
 
 	for (idx = 0; idx < 5; idx++) {
 		region = &chip->region.idx[idx];
-		if ((region->resource = request_mem_region(region->base, region->size, region->name)) == NULL) {
-			snd_printk(KERN_ERR "unable to request memory region 0x%lx-0x%lx\n", region->base, region->base + region->size - 1);
+		if ((region->resource = request_mem_region(region->base, region->size,
+							   region->name)) == NULL) {
+			snd_printk(KERN_ERR "unable to request memory region 0x%lx-0x%lx\n",
+				   region->base, region->base + region->size - 1);
 			snd_cs46xx_free(chip);
 			return -EBUSY;
 		}
@@ -3838,7 +3841,8 @@ int __devinit snd_cs46xx_create(snd_card_t * card,
 		}
 	}
 
-	if (request_irq(pci->irq, snd_cs46xx_interrupt, SA_INTERRUPT|SA_SHIRQ, "CS46XX", (void *) chip)) {
+	if (request_irq(pci->irq, snd_cs46xx_interrupt, SA_INTERRUPT|SA_SHIRQ,
+			"CS46XX", chip)) {
 		snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
 		snd_cs46xx_free(chip);
 		return -EBUSY;
diff --git a/sound/pci/cs46xx/cs46xx_lib.h b/sound/pci/cs46xx/cs46xx_lib.h
index d7bec096d24..8b4a4aeaf85 100644
--- a/sound/pci/cs46xx/cs46xx_lib.h
+++ b/sound/pci/cs46xx/cs46xx_lib.h
@@ -57,7 +57,7 @@
  *  common I/O routines
  */
 
-static inline void snd_cs46xx_poke(cs46xx_t *chip, unsigned long reg, unsigned int val)
+static inline void snd_cs46xx_poke(struct snd_cs46xx *chip, unsigned long reg, unsigned int val)
 {
 	unsigned int bank = reg >> 16;
 	unsigned int offset = reg & 0xffff;
@@ -66,117 +66,128 @@ static inline void snd_cs46xx_poke(cs46xx_t *chip, unsigned long reg, unsigned i
 	writel(val, chip->region.idx[bank+1].remap_addr + offset);
 }
 
-static inline unsigned int snd_cs46xx_peek(cs46xx_t *chip, unsigned long reg)
+static inline unsigned int snd_cs46xx_peek(struct snd_cs46xx *chip, unsigned long reg)
 {
 	unsigned int bank = reg >> 16;
 	unsigned int offset = reg & 0xffff;
 	return readl(chip->region.idx[bank+1].remap_addr + offset);
 }
 
-static inline void snd_cs46xx_pokeBA0(cs46xx_t *chip, unsigned long offset, unsigned int val)
+static inline void snd_cs46xx_pokeBA0(struct snd_cs46xx *chip, unsigned long offset, unsigned int val)
 {
 	writel(val, chip->region.name.ba0.remap_addr + offset);
 }
 
-static inline unsigned int snd_cs46xx_peekBA0(cs46xx_t *chip, unsigned long offset)
+static inline unsigned int snd_cs46xx_peekBA0(struct snd_cs46xx *chip, unsigned long offset)
 {
 	return readl(chip->region.name.ba0.remap_addr + offset);
 }
 
-dsp_spos_instance_t *  cs46xx_dsp_spos_create (cs46xx_t * chip);
-void                   cs46xx_dsp_spos_destroy (cs46xx_t * chip);
-int                    cs46xx_dsp_load_module (cs46xx_t * chip,dsp_module_desc_t * module);
-symbol_entry_t *       cs46xx_dsp_lookup_symbol (cs46xx_t * chip,char * symbol_name,int symbol_type);
-int                    cs46xx_dsp_proc_init (snd_card_t * card, cs46xx_t *chip);
-int                    cs46xx_dsp_proc_done (cs46xx_t *chip);
-int                    cs46xx_dsp_scb_and_task_init (cs46xx_t *chip);
-int                    snd_cs46xx_download (cs46xx_t *chip,u32 *src,unsigned long offset,
-                                            unsigned long len);
-int                    snd_cs46xx_clear_BA1(cs46xx_t *chip,unsigned long offset,unsigned long len);
-int                    cs46xx_dsp_enable_spdif_out (cs46xx_t *chip);
-int                    cs46xx_dsp_enable_spdif_hw (cs46xx_t *chip);
-int                    cs46xx_dsp_disable_spdif_out (cs46xx_t *chip);
-int                    cs46xx_dsp_enable_spdif_in (cs46xx_t *chip);
-int                    cs46xx_dsp_disable_spdif_in (cs46xx_t *chip);
-int                    cs46xx_dsp_enable_pcm_capture (cs46xx_t *chip);
-int                    cs46xx_dsp_disable_pcm_capture (cs46xx_t *chip);
-int                    cs46xx_dsp_enable_adc_capture (cs46xx_t *chip);
-int                    cs46xx_dsp_disable_adc_capture (cs46xx_t *chip);
-int                    cs46xx_poke_via_dsp (cs46xx_t *chip,u32 address,u32 data);
-dsp_scb_descriptor_t * cs46xx_dsp_create_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest);
-void                   cs46xx_dsp_proc_free_scb_desc (dsp_scb_descriptor_t * scb);
-void                   cs46xx_dsp_proc_register_scb_desc (cs46xx_t *chip,dsp_scb_descriptor_t * scb);
-dsp_scb_descriptor_t * cs46xx_dsp_create_timing_master_scb (cs46xx_t *chip);
-dsp_scb_descriptor_t * cs46xx_dsp_create_codec_out_scb(cs46xx_t * chip,char * codec_name,
-                                                       u16 channel_disp,u16 fifo_addr,
-                                                       u16 child_scb_addr,
-                                                       u32 dest,
-                                                       dsp_scb_descriptor_t * parent_scb,
-                                                       int scb_child_type);
-dsp_scb_descriptor_t * cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name,
-                                                      u16 channel_disp,u16 fifo_addr,
-                                                      u16 sample_buffer_addr,
-                                                      u32 dest,
-                                                      dsp_scb_descriptor_t * parent_scb,
-                                                      int scb_child_type);
-void                   cs46xx_dsp_remove_scb (cs46xx_t *chip,dsp_scb_descriptor_t * scb);
-dsp_scb_descriptor_t *  cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name,
-                                                       u16 channel_disp,u16 fifo_addr,
-                                                       u16 sample_buffer_addr,
-                                                       u32 dest,dsp_scb_descriptor_t * parent_scb,
-                                                       int scb_child_type);
-dsp_scb_descriptor_t *  cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name,
-						       int sample_rate,
-                                                       u16 src_buffer_addr,
-                                                       u16 src_delay_buffer_addr,u32 dest,
-                                                       dsp_scb_descriptor_t * parent_scb,
-                                                       int scb_child_type,
-						       int pass_through);
-dsp_scb_descriptor_t *  cs46xx_dsp_create_mix_only_scb(cs46xx_t * chip,char * scb_name,
-                                                       u16 mix_buffer_addr,u32 dest,
-                                                       dsp_scb_descriptor_t * parent_scb,
-                                                       int scb_child_type);
-
-dsp_scb_descriptor_t *  cs46xx_dsp_create_vari_decimate_scb(cs46xx_t * chip,char * scb_name,
-                                                            u16 vari_buffer_addr0,
-                                                            u16 vari_buffer_addr1,
-                                                            u32 dest,
-                                                            dsp_scb_descriptor_t * parent_scb,
-                                                            int scb_child_type);
-dsp_scb_descriptor_t * cs46xx_dsp_create_asynch_fg_rx_scb(cs46xx_t * chip,char * scb_name,u32 dest,
-                                                          u16 hfg_scb_address,
-                                                          u16 asynch_buffer_address,
-                                                          dsp_scb_descriptor_t * parent_scb,
-                                                          int scb_child_type);
-dsp_scb_descriptor_t *  cs46xx_dsp_create_spio_write_scb(cs46xx_t * chip,char * scb_name,u32 dest,
-                                                         dsp_scb_descriptor_t * parent_scb,
-                                                         int scb_child_type);
-dsp_scb_descriptor_t *  cs46xx_dsp_create_mix_to_ostream_scb(cs46xx_t * chip,char * scb_name,
-                                                             u16 mix_buffer_addr,u16 writeback_spb,u32 dest,
-                                                             dsp_scb_descriptor_t * parent_scb,
-                                                             int scb_child_type);
-dsp_scb_descriptor_t *  cs46xx_dsp_create_magic_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest,
-                                                          u16 snoop_buffer_address,
-                                                          dsp_scb_descriptor_t * snoop_scb,
-                                                          dsp_scb_descriptor_t * parent_scb,
-                                                          int scb_child_type);
-pcm_channel_descriptor_t * cs46xx_dsp_create_pcm_channel (cs46xx_t * chip,u32 sample_rate, void * private_data, u32 hw_dma_addr,
-                                                          int pcm_channel_id);
-void                       cs46xx_dsp_destroy_pcm_channel (cs46xx_t * chip,
-                                                           pcm_channel_descriptor_t * pcm_channel);
-int                        cs46xx_dsp_pcm_unlink (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel);
-int                        cs46xx_dsp_pcm_link (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel);
-dsp_scb_descriptor_t *     cs46xx_add_record_source (cs46xx_t *chip,dsp_scb_descriptor_t * source,
-                                                     u16 addr,char * scb_name);
-int                        cs46xx_src_unlink(cs46xx_t *chip,dsp_scb_descriptor_t * src);
-int                        cs46xx_src_link(cs46xx_t *chip,dsp_scb_descriptor_t * src);
-int                        cs46xx_iec958_pre_open (cs46xx_t *chip);
-int                        cs46xx_iec958_post_close (cs46xx_t *chip);
-int                        cs46xx_dsp_pcm_channel_set_period (cs46xx_t * chip,
-							       pcm_channel_descriptor_t * pcm_channel,
-							       int period_size);
-int                        cs46xx_dsp_pcm_ostream_set_period (cs46xx_t * chip,
-							      int period_size);
-int                        cs46xx_dsp_set_dac_volume (cs46xx_t * chip,u16 left,u16 right);
-int                        cs46xx_dsp_set_iec958_volume (cs46xx_t * chip,u16 left,u16 right);
+struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip);
+void cs46xx_dsp_spos_destroy (struct snd_cs46xx * chip);
+int cs46xx_dsp_load_module (struct snd_cs46xx * chip, struct dsp_module_desc * module);
+struct dsp_symbol_entry *cs46xx_dsp_lookup_symbol (struct snd_cs46xx * chip, char * symbol_name,
+						   int symbol_type);
+int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip);
+int cs46xx_dsp_proc_done (struct snd_cs46xx *chip);
+int cs46xx_dsp_scb_and_task_init (struct snd_cs46xx *chip);
+int snd_cs46xx_download (struct snd_cs46xx *chip, u32 *src, unsigned long offset,
+			 unsigned long len);
+int snd_cs46xx_clear_BA1(struct snd_cs46xx *chip, unsigned long offset, unsigned long len);
+int cs46xx_dsp_enable_spdif_out (struct snd_cs46xx *chip);
+int cs46xx_dsp_enable_spdif_hw (struct snd_cs46xx *chip);
+int cs46xx_dsp_disable_spdif_out (struct snd_cs46xx *chip);
+int cs46xx_dsp_enable_spdif_in (struct snd_cs46xx *chip);
+int cs46xx_dsp_disable_spdif_in (struct snd_cs46xx *chip);
+int cs46xx_dsp_enable_pcm_capture (struct snd_cs46xx *chip);
+int cs46xx_dsp_disable_pcm_capture (struct snd_cs46xx *chip);
+int cs46xx_dsp_enable_adc_capture (struct snd_cs46xx *chip);
+int cs46xx_dsp_disable_adc_capture (struct snd_cs46xx *chip);
+int cs46xx_poke_via_dsp (struct snd_cs46xx *chip, u32 address, u32 data);
+struct dsp_scb_descriptor * cs46xx_dsp_create_scb (struct snd_cs46xx *chip, char * name,
+						   u32 * scb_data, u32 dest);
+void cs46xx_dsp_proc_free_scb_desc (struct dsp_scb_descriptor * scb);
+void cs46xx_dsp_proc_register_scb_desc (struct snd_cs46xx *chip,
+					struct dsp_scb_descriptor * scb);
+struct dsp_scb_descriptor * cs46xx_dsp_create_timing_master_scb (struct snd_cs46xx *chip);
+struct dsp_scb_descriptor *
+cs46xx_dsp_create_codec_out_scb(struct snd_cs46xx * chip,
+				char * codec_name, u16 channel_disp, u16 fifo_addr,
+				u16 child_scb_addr, u32 dest,
+				struct dsp_scb_descriptor * parent_scb,
+				int scb_child_type);
+struct dsp_scb_descriptor *
+cs46xx_dsp_create_codec_in_scb(struct snd_cs46xx * chip, char * codec_name,
+			       u16 channel_disp, u16 fifo_addr,
+			       u16 sample_buffer_addr, u32 dest,
+			       struct dsp_scb_descriptor * parent_scb,
+			       int scb_child_type);
+void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip,
+			    struct dsp_scb_descriptor * scb);
+struct dsp_scb_descriptor *
+cs46xx_dsp_create_codec_in_scb(struct snd_cs46xx * chip, char * codec_name,
+			       u16 channel_disp, u16 fifo_addr,
+			       u16 sample_buffer_addr, u32 dest,
+			       struct dsp_scb_descriptor * parent_scb,
+			       int scb_child_type);
+struct dsp_scb_descriptor *
+cs46xx_dsp_create_src_task_scb(struct snd_cs46xx * chip, char * scb_name,
+			       int sample_rate, u16 src_buffer_addr,
+			       u16 src_delay_buffer_addr, u32 dest,
+			       struct dsp_scb_descriptor * parent_scb,
+			       int scb_child_type, int pass_through);
+struct dsp_scb_descriptor *
+cs46xx_dsp_create_mix_only_scb(struct snd_cs46xx * chip, char * scb_name,
+			       u16 mix_buffer_addr, u32 dest,
+			       struct dsp_scb_descriptor * parent_scb,
+			       int scb_child_type);
+
+struct dsp_scb_descriptor *
+cs46xx_dsp_create_vari_decimate_scb(struct snd_cs46xx * chip, char * scb_name,
+				    u16 vari_buffer_addr0, u16 vari_buffer_addr1, u32 dest,
+				    struct dsp_scb_descriptor * parent_scb,
+				    int scb_child_type);
+struct dsp_scb_descriptor *
+cs46xx_dsp_create_asynch_fg_rx_scb(struct snd_cs46xx * chip, char * scb_name,
+				   u32 dest, u16 hfg_scb_address, u16 asynch_buffer_address,
+				   struct dsp_scb_descriptor * parent_scb,
+				   int scb_child_type);
+struct dsp_scb_descriptor *
+cs46xx_dsp_create_spio_write_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest,
+				 struct dsp_scb_descriptor * parent_scb,
+				 int scb_child_type);
+struct dsp_scb_descriptor *
+cs46xx_dsp_create_mix_to_ostream_scb(struct snd_cs46xx * chip, char * scb_name,
+				     u16 mix_buffer_addr, u16 writeback_spb, u32 dest,
+				     struct dsp_scb_descriptor * parent_scb,
+				     int scb_child_type);
+struct dsp_scb_descriptor *
+cs46xx_dsp_create_magic_snoop_scb(struct snd_cs46xx * chip, char * scb_name,
+				  u32 dest, u16 snoop_buffer_address,
+				  struct dsp_scb_descriptor * snoop_scb,
+				  struct dsp_scb_descriptor * parent_scb,
+				  int scb_child_type);
+struct dsp_pcm_channel_descriptor *
+cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip, u32 sample_rate,
+			       void * private_data, u32 hw_dma_addr,
+			       int pcm_channel_id);
+void cs46xx_dsp_destroy_pcm_channel (struct snd_cs46xx * chip,
+				     struct dsp_pcm_channel_descriptor * pcm_channel);
+int cs46xx_dsp_pcm_unlink (struct snd_cs46xx * chip,
+			   struct dsp_pcm_channel_descriptor * pcm_channel);
+int cs46xx_dsp_pcm_link (struct snd_cs46xx * chip,
+			 struct dsp_pcm_channel_descriptor * pcm_channel);
+struct dsp_scb_descriptor *
+cs46xx_add_record_source (struct snd_cs46xx *chip, struct dsp_scb_descriptor * source,
+			  u16 addr, char * scb_name);
+int cs46xx_src_unlink(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src);
+int cs46xx_src_link(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src);
+int cs46xx_iec958_pre_open (struct snd_cs46xx *chip);
+int cs46xx_iec958_post_close (struct snd_cs46xx *chip);
+int cs46xx_dsp_pcm_channel_set_period (struct snd_cs46xx * chip,
+				       struct dsp_pcm_channel_descriptor * pcm_channel,
+				       int period_size);
+int cs46xx_dsp_pcm_ostream_set_period (struct snd_cs46xx * chip, int period_size);
+int cs46xx_dsp_set_dac_volume (struct snd_cs46xx * chip, u16 left, u16 right);
+int cs46xx_dsp_set_iec958_volume (struct snd_cs46xx * chip, u16 left, u16 right);
 #endif /* __CS46XX_LIB_H__ */
diff --git a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c
index b66304fc4e4..ac98917a147 100644
--- a/sound/pci/cs46xx/dsp_spos.c
+++ b/sound/pci/cs46xx/dsp_spos.c
@@ -37,9 +37,10 @@
 #include "cs46xx_lib.h"
 #include "dsp_spos.h"
 
-static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entry);
+static int cs46xx_dsp_async_init (struct snd_cs46xx *chip,
+				  struct dsp_scb_descriptor * fg_entry);
 
-static wide_opcode_t wide_opcodes[] = { 
+static enum wide_opcode wide_opcodes[] = { 
 	WIDE_FOR_BEGIN_LOOP,
 	WIDE_FOR_BEGIN_LOOP2,
 	WIDE_COND_GOTO_ADDR,
@@ -54,12 +55,13 @@ static wide_opcode_t wide_opcodes[] = {
 	WIDE_TBEQ_NCOND_CALL1_ADDR
 };
 
-static int shadow_and_reallocate_code (cs46xx_t * chip,u32 * data,u32 size, u32 overlay_begin_address)
+static int shadow_and_reallocate_code (struct snd_cs46xx * chip, u32 * data, u32 size,
+				       u32 overlay_begin_address)
 {
 	unsigned int i = 0, j, nreallocated = 0;
 	u32 hival,loval,address;
 	u32 mop_operands,mop_type,wide_op;
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	snd_assert( ((size % 2) == 0), return -EINVAL);
   
@@ -114,7 +116,7 @@ static int shadow_and_reallocate_code (cs46xx_t * chip,u32 * data,u32 size, u32
 	return nreallocated;
 }
 
-static segment_desc_t * get_segment_desc (dsp_module_desc_t * module, int seg_type)
+static struct dsp_segment_desc * get_segment_desc (struct dsp_module_desc * module, int seg_type)
 {
 	int i;
 	for (i = 0;i < module->nsegments; ++i) {
@@ -126,7 +128,7 @@ static segment_desc_t * get_segment_desc (dsp_module_desc_t * module, int seg_ty
 	return NULL;
 };
 
-static int find_free_symbol_index (dsp_spos_instance_t * ins)
+static int find_free_symbol_index (struct dsp_spos_instance * ins)
 {
 	int index = ins->symbol_table.nsymbols,i;
 
@@ -140,10 +142,10 @@ static int find_free_symbol_index (dsp_spos_instance_t * ins)
 	return index;
 }
 
-static int add_symbols (cs46xx_t * chip, dsp_module_desc_t * module)
+static int add_symbols (struct snd_cs46xx * chip, struct dsp_module_desc * module)
 {
 	int i;
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	if (module->symbol_table.nsymbols > 0) {
 		if (!strcmp(module->symbol_table.symbols[0].symbol_name, "OVERLAYBEGINADDRESS") &&
@@ -181,10 +183,11 @@ static int add_symbols (cs46xx_t * chip, dsp_module_desc_t * module)
 	return 0;
 }
 
-static symbol_entry_t * add_symbol (cs46xx_t * chip, char * symbol_name, u32 address, int type)
+static struct dsp_symbol_entry *
+add_symbol (struct snd_cs46xx * chip, char * symbol_name, u32 address, int type)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	symbol_entry_t * symbol = NULL;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_symbol_entry * symbol = NULL;
 	int index;
 
 	if (ins->symbol_table.nsymbols == (DSP_MAX_SYMBOLS - 1)) {
@@ -217,17 +220,17 @@ static symbol_entry_t * add_symbol (cs46xx_t * chip, char * symbol_name, u32 add
 	return symbol;
 }
 
-dsp_spos_instance_t *  cs46xx_dsp_spos_create (cs46xx_t * chip)
+struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip)
 {
-	dsp_spos_instance_t * ins = kmalloc(sizeof(dsp_spos_instance_t), GFP_KERNEL);
+	struct dsp_spos_instance * ins = kzalloc(sizeof(struct dsp_spos_instance), GFP_KERNEL);
 
 	if (ins == NULL) 
 		return NULL;
-	memset(ins, 0, sizeof(*ins));
 
 	/* better to use vmalloc for this big table */
 	ins->symbol_table.nsymbols = 0;
-	ins->symbol_table.symbols = vmalloc(sizeof(symbol_entry_t) * DSP_MAX_SYMBOLS);
+	ins->symbol_table.symbols = vmalloc(sizeof(struct dsp_symbol_entry) *
+					    DSP_MAX_SYMBOLS);
 	ins->symbol_table.highest_frag_index = 0;
 
 	if (ins->symbol_table.symbols == NULL) {
@@ -248,7 +251,7 @@ dsp_spos_instance_t *  cs46xx_dsp_spos_create (cs46xx_t * chip)
 	ins->ntask = 0;
 
 	ins->nmodules = 0;
-	ins->modules = kmalloc(sizeof(dsp_module_desc_t) * DSP_MAX_MODULES, GFP_KERNEL);
+	ins->modules = kmalloc(sizeof(struct dsp_module_desc) * DSP_MAX_MODULES, GFP_KERNEL);
 
 	if (ins->modules == NULL) {
 		cs46xx_dsp_spos_destroy(chip);
@@ -277,10 +280,10 @@ dsp_spos_instance_t *  cs46xx_dsp_spos_create (cs46xx_t * chip)
 	return ins;
 }
 
-void  cs46xx_dsp_spos_destroy (cs46xx_t * chip)
+void  cs46xx_dsp_spos_destroy (struct snd_cs46xx * chip)
 {
 	int i;
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	snd_assert(ins != NULL, return);
 
@@ -298,12 +301,12 @@ void  cs46xx_dsp_spos_destroy (cs46xx_t * chip)
 	up(&chip->spos_mutex);
 }
 
-int cs46xx_dsp_load_module (cs46xx_t * chip, dsp_module_desc_t * module)
+int cs46xx_dsp_load_module (struct snd_cs46xx * chip, struct dsp_module_desc * module)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	segment_desc_t * code = get_segment_desc (module,SEGTYPE_SP_PROGRAM);
-	segment_desc_t * parameter = get_segment_desc (module,SEGTYPE_SP_PARAMETER);
-	segment_desc_t * sample = get_segment_desc (module,SEGTYPE_SP_SAMPLE);
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_segment_desc * code = get_segment_desc (module,SEGTYPE_SP_PROGRAM);
+	struct dsp_segment_desc * parameter = get_segment_desc (module,SEGTYPE_SP_PARAMETER);
+	struct dsp_segment_desc * sample = get_segment_desc (module,SEGTYPE_SP_SAMPLE);
 	u32 doffset, dsize;
 
 	if (ins->nmodules == DSP_MAX_MODULES - 1) {
@@ -410,10 +413,11 @@ int cs46xx_dsp_load_module (cs46xx_t * chip, dsp_module_desc_t * module)
 	return 0;
 }
 
-symbol_entry_t * cs46xx_dsp_lookup_symbol (cs46xx_t * chip, char * symbol_name, int symbol_type)
+struct dsp_symbol_entry *
+cs46xx_dsp_lookup_symbol (struct snd_cs46xx * chip, char * symbol_name, int symbol_type)
 {
 	int i;
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	for ( i = 0; i < ins->symbol_table.nsymbols; ++i ) {
 
@@ -435,10 +439,11 @@ symbol_entry_t * cs46xx_dsp_lookup_symbol (cs46xx_t * chip, char * symbol_name,
 }
 
 
-static symbol_entry_t * cs46xx_dsp_lookup_symbol_addr (cs46xx_t * chip, u32 address, int symbol_type)
+static struct dsp_symbol_entry *
+cs46xx_dsp_lookup_symbol_addr (struct snd_cs46xx * chip, u32 address, int symbol_type)
 {
 	int i;
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	for ( i = 0; i < ins->symbol_table.nsymbols; ++i ) {
 
@@ -456,10 +461,11 @@ static symbol_entry_t * cs46xx_dsp_lookup_symbol_addr (cs46xx_t * chip, u32 addr
 }
 
 
-static void cs46xx_dsp_proc_symbol_table_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void cs46xx_dsp_proc_symbol_table_read (struct snd_info_entry *entry,
+					       struct snd_info_buffer *buffer)
 {
-	cs46xx_t *chip = entry->private_data;
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct snd_cs46xx *chip = entry->private_data;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	int i;
 
 	snd_iprintf(buffer, "SYMBOLS:\n");
@@ -483,10 +489,11 @@ static void cs46xx_dsp_proc_symbol_table_read (snd_info_entry_t *entry, snd_info
 }
 
 
-static void cs46xx_dsp_proc_modules_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void cs46xx_dsp_proc_modules_read (struct snd_info_entry *entry,
+					  struct snd_info_buffer *buffer)
 {
-	cs46xx_t *chip = entry->private_data;
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct snd_cs46xx *chip = entry->private_data;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	int i,j;
 
 	down(&chip->spos_mutex);
@@ -497,7 +504,7 @@ static void cs46xx_dsp_proc_modules_read (snd_info_entry_t *entry, snd_info_buff
 		snd_iprintf(buffer, "   %d fixups\n", ins->modules[i].nfixups);
 
 		for (j = 0; j < ins->modules[i].nsegments; ++ j) {
-			segment_desc_t * desc = (ins->modules[i].segments + j);
+			struct dsp_segment_desc * desc = (ins->modules[i].segments + j);
 			snd_iprintf(buffer, "   segment %02x offset %08x size %08x\n",
 				    desc->segment_type,desc->offset, desc->size);
 		}
@@ -505,11 +512,12 @@ static void cs46xx_dsp_proc_modules_read (snd_info_entry_t *entry, snd_info_buff
 	up(&chip->spos_mutex);
 }
 
-static void cs46xx_dsp_proc_task_tree_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void cs46xx_dsp_proc_task_tree_read (struct snd_info_entry *entry,
+					    struct snd_info_buffer *buffer)
 {
-	cs46xx_t *chip = entry->private_data;
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	int i,j,col;
+	struct snd_cs46xx *chip = entry->private_data;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	int i, j, col;
 	void __iomem *dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET;
 
 	down(&chip->spos_mutex);
@@ -532,10 +540,11 @@ static void cs46xx_dsp_proc_task_tree_read (snd_info_entry_t *entry, snd_info_bu
 	up(&chip->spos_mutex);
 }
 
-static void cs46xx_dsp_proc_scb_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void cs46xx_dsp_proc_scb_read (struct snd_info_entry *entry,
+				      struct snd_info_buffer *buffer)
 {
-	cs46xx_t *chip = entry->private_data;
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct snd_cs46xx *chip = entry->private_data;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	int i;
 
 	down(&chip->spos_mutex);
@@ -564,13 +573,14 @@ static void cs46xx_dsp_proc_scb_read (snd_info_entry_t *entry, snd_info_buffer_t
 	up(&chip->spos_mutex);
 }
 
-static void cs46xx_dsp_proc_parameter_dump_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void cs46xx_dsp_proc_parameter_dump_read (struct snd_info_entry *entry,
+						 struct snd_info_buffer *buffer)
 {
-	cs46xx_t *chip = entry->private_data;
-	/*dsp_spos_instance_t * ins = chip->dsp_spos_instance; */
-	unsigned int i,col = 0;
+	struct snd_cs46xx *chip = entry->private_data;
+	/*struct dsp_spos_instance * ins = chip->dsp_spos_instance; */
+	unsigned int i, col = 0;
 	void __iomem *dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET;
-	symbol_entry_t * symbol; 
+	struct dsp_symbol_entry * symbol; 
 
 	for (i = 0;i < DSP_PARAMETER_BYTE_SIZE; i += sizeof(u32),col ++) {
 		if (col == 4) {
@@ -591,9 +601,10 @@ static void cs46xx_dsp_proc_parameter_dump_read (snd_info_entry_t *entry, snd_in
 	}
 }
 
-static void cs46xx_dsp_proc_sample_dump_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void cs46xx_dsp_proc_sample_dump_read (struct snd_info_entry *entry,
+					      struct snd_info_buffer *buffer)
 {
-	cs46xx_t *chip = entry->private_data;
+	struct snd_cs46xx *chip = entry->private_data;
 	int i,col = 0;
 	void __iomem *dst = chip->region.idx[2].remap_addr;
 
@@ -738,10 +749,10 @@ static void cs46xx_dsp_proc_sample_dump_read (snd_info_entry_t *entry, snd_info_
 	snd_iprintf(buffer,"\n");
 }
 
-int cs46xx_dsp_proc_init (snd_card_t * card, cs46xx_t *chip)
+int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip)
 {
-	snd_info_entry_t *entry;
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct snd_info_entry *entry;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	int i;
 
 	ins->snd_card = card;
@@ -852,9 +863,9 @@ int cs46xx_dsp_proc_init (snd_card_t * card, cs46xx_t *chip)
 	return 0;
 }
 
-int cs46xx_dsp_proc_done (cs46xx_t *chip)
+int cs46xx_dsp_proc_done (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	int i;
 
 	if (ins->proc_sym_info_entry) {
@@ -903,7 +914,8 @@ int cs46xx_dsp_proc_done (cs46xx_t *chip)
 }
 
 static int debug_tree;
-static void _dsp_create_task_tree (cs46xx_t *chip,u32 * task_data, u32  dest, int size)
+static void _dsp_create_task_tree (struct snd_cs46xx *chip, u32 * task_data,
+				   u32  dest, int size)
 {
 	void __iomem *spdst = chip->region.idx[1].remap_addr + 
 		DSP_PARAMETER_BYTE_OFFSET + dest * sizeof(u32);
@@ -917,7 +929,7 @@ static void _dsp_create_task_tree (cs46xx_t *chip,u32 * task_data, u32  dest, in
 }
 
 static int debug_scb;
-static void _dsp_create_scb (cs46xx_t *chip,u32 * scb_data, u32  dest)
+static void _dsp_create_scb (struct snd_cs46xx *chip, u32 * scb_data, u32 dest)
 {
 	void __iomem *spdst = chip->region.idx[1].remap_addr + 
 		DSP_PARAMETER_BYTE_OFFSET + dest * sizeof(u32);
@@ -930,7 +942,7 @@ static void _dsp_create_scb (cs46xx_t *chip,u32 * scb_data, u32  dest)
 	}
 }
 
-static int find_free_scb_index (dsp_spos_instance_t * ins)
+static int find_free_scb_index (struct dsp_spos_instance * ins)
 {
 	int index = ins->nscb, i;
 
@@ -944,10 +956,10 @@ static int find_free_scb_index (dsp_spos_instance_t * ins)
 	return index;
 }
 
-static dsp_scb_descriptor_t * _map_scb (cs46xx_t *chip,char * name,u32 dest)
+static struct dsp_scb_descriptor * _map_scb (struct snd_cs46xx *chip, char * name, u32 dest)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	dsp_scb_descriptor_t * desc = NULL;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_scb_descriptor * desc = NULL;
 	int index;
 
 	if (ins->nscb == DSP_MAX_SCB_DESC - 1) {
@@ -977,10 +989,11 @@ static dsp_scb_descriptor_t * _map_scb (cs46xx_t *chip,char * name,u32 dest)
 	return desc;
 }
 
-static dsp_task_descriptor_t * _map_task_tree (cs46xx_t *chip,char * name,u32 dest,u32 size)
+static struct dsp_task_descriptor *
+_map_task_tree (struct snd_cs46xx *chip, char * name, u32 dest, u32 size)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	dsp_task_descriptor_t * desc = NULL;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_task_descriptor * desc = NULL;
 
 	if (ins->ntask == DSP_MAX_TASK_DESC - 1) {
 		snd_printk(KERN_ERR "dsp_spos: got no place for other TASK\n");
@@ -1000,9 +1013,10 @@ static dsp_task_descriptor_t * _map_task_tree (cs46xx_t *chip,char * name,u32 de
 	return desc;
 }
 
-dsp_scb_descriptor_t * cs46xx_dsp_create_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest)
+struct dsp_scb_descriptor *
+cs46xx_dsp_create_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u32 dest)
 {
-	dsp_scb_descriptor_t * desc;
+	struct dsp_scb_descriptor * desc;
 
 	desc = _map_scb (chip,name,dest);
 	if (desc) {
@@ -1015,9 +1029,11 @@ dsp_scb_descriptor_t * cs46xx_dsp_create_scb (cs46xx_t *chip,char * name, u32 *
 }
 
 
-static dsp_task_descriptor_t *  cs46xx_dsp_create_task_tree (cs46xx_t *chip,char * name, u32 * task_data,u32 dest,int size)
+static struct dsp_task_descriptor *
+cs46xx_dsp_create_task_tree (struct snd_cs46xx *chip, char * name, u32 * task_data,
+			     u32 dest, int size)
 {
-	dsp_task_descriptor_t * desc;
+	struct dsp_task_descriptor * desc;
 
 	desc = _map_task_tree (chip,name,dest,size);
 	if (desc) {
@@ -1029,31 +1045,31 @@ static dsp_task_descriptor_t *  cs46xx_dsp_create_task_tree (cs46xx_t *chip,char
 	return desc;
 }
 
-int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip)
+int cs46xx_dsp_scb_and_task_init (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	symbol_entry_t * fg_task_tree_header_code;
-	symbol_entry_t * task_tree_header_code;
-	symbol_entry_t * task_tree_thread;
-	symbol_entry_t * null_algorithm;
-	symbol_entry_t * magic_snoop_task;
-
-	dsp_scb_descriptor_t * timing_master_scb;
-	dsp_scb_descriptor_t * codec_out_scb;
-	dsp_scb_descriptor_t * codec_in_scb;
-	dsp_scb_descriptor_t * src_task_scb;
-	dsp_scb_descriptor_t * master_mix_scb;
-	dsp_scb_descriptor_t * rear_mix_scb;
-	dsp_scb_descriptor_t * record_mix_scb;
-	dsp_scb_descriptor_t * write_back_scb;
-	dsp_scb_descriptor_t * vari_decimate_scb;
-	dsp_scb_descriptor_t * rear_codec_out_scb;
-	dsp_scb_descriptor_t * clfe_codec_out_scb;
-	dsp_scb_descriptor_t * magic_snoop_scb;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_symbol_entry * fg_task_tree_header_code;
+	struct dsp_symbol_entry * task_tree_header_code;
+	struct dsp_symbol_entry * task_tree_thread;
+	struct dsp_symbol_entry * null_algorithm;
+	struct dsp_symbol_entry * magic_snoop_task;
+
+	struct dsp_scb_descriptor * timing_master_scb;
+	struct dsp_scb_descriptor * codec_out_scb;
+	struct dsp_scb_descriptor * codec_in_scb;
+	struct dsp_scb_descriptor * src_task_scb;
+	struct dsp_scb_descriptor * master_mix_scb;
+	struct dsp_scb_descriptor * rear_mix_scb;
+	struct dsp_scb_descriptor * record_mix_scb;
+	struct dsp_scb_descriptor * write_back_scb;
+	struct dsp_scb_descriptor * vari_decimate_scb;
+	struct dsp_scb_descriptor * rear_codec_out_scb;
+	struct dsp_scb_descriptor * clfe_codec_out_scb;
+	struct dsp_scb_descriptor * magic_snoop_scb;
 	
-	int fifo_addr,fifo_span,valid_slots;
+	int fifo_addr, fifo_span, valid_slots;
 
-	static spos_control_block_t sposcb = {
+	static struct dsp_spos_control_block sposcb = {
 		/* 0 */ HFG_TREE_SCB,HFG_STACK,
 		/* 1 */ SPOSCB_ADDR,BG_TREE_SCB_ADDR,
 		/* 2 */ DSP_SPOS_DC,0,
@@ -1106,7 +1122,7 @@ int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip)
   
 	{
 		/* create the null SCB */
-		static generic_scb_t null_scb = {
+		static struct dsp_generic_scb null_scb = {
 			{ 0, 0, 0, 0 },
 			{ 0, 0, 0, 0, 0 },
 			NULL_SCB_ADDR, NULL_SCB_ADDR,
@@ -1128,7 +1144,7 @@ int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip)
 
 	{
 		/* setup foreground task tree */
-		static task_tree_control_block_t fg_task_tree_hdr =  {
+		static struct dsp_task_tree_control_block fg_task_tree_hdr =  {
 			{ FG_TASK_HEADER_ADDR | (DSP_SPOS_DC << 0x10),
 			  DSP_SPOS_DC_DC,
 			  DSP_SPOS_DC_DC,
@@ -1204,7 +1220,7 @@ int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip)
 
 	{
 		/* setup foreground task tree */
-		static task_tree_control_block_t bg_task_tree_hdr =  {
+		static struct dsp_task_tree_control_block bg_task_tree_hdr =  {
 			{ DSP_SPOS_DC_DC,
 			  DSP_SPOS_DC_DC,
 			  DSP_SPOS_DC_DC,
@@ -1313,7 +1329,7 @@ int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip)
 	if (!write_back_scb) goto _fail_end;
 
 	{
-		static mix2_ostream_spb_t mix2_ostream_spb = {
+		static struct dsp_mix2_ostream_spb mix2_ostream_spb = {
 			0x00020000,
 			0x0000ffff
 		};
@@ -1448,13 +1464,14 @@ int cs46xx_dsp_scb_and_task_init (cs46xx_t *chip)
 	return -EINVAL;
 }
 
-static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entry)
+static int cs46xx_dsp_async_init (struct snd_cs46xx *chip,
+				  struct dsp_scb_descriptor * fg_entry)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	symbol_entry_t * s16_async_codec_input_task;
-	symbol_entry_t * spdifo_task;
-	symbol_entry_t * spdifi_task;
-	dsp_scb_descriptor_t * spdifi_scb_desc,* spdifo_scb_desc,* async_codec_scb_desc;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_symbol_entry * s16_async_codec_input_task;
+	struct dsp_symbol_entry * spdifo_task;
+	struct dsp_symbol_entry * spdifi_task;
+	struct dsp_scb_descriptor * spdifi_scb_desc, * spdifo_scb_desc, * async_codec_scb_desc;
 
 	s16_async_codec_input_task = cs46xx_dsp_lookup_symbol(chip, "S16_ASYNCCODECINPUTTASK", SYMBOL_CODE);
 	if (s16_async_codec_input_task == NULL) {
@@ -1475,7 +1492,7 @@ static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entr
 
 	{
 		/* 0xBC0 */
-		spdifoscb_t spdifo_scb = {
+		struct dsp_spdifoscb spdifo_scb = {
 			/* 0 */ DSP_SPOS_UUUU,
 			{
 				/* 1 */ 0xb0, 
@@ -1504,7 +1521,7 @@ static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entr
 		};
 
 		/* 0xBB0 */
-		spdifiscb_t spdifi_scb = {
+		struct dsp_spdifiscb spdifi_scb = {
 			/* 0 */ DSP_SPOS_UULO,DSP_SPOS_UUHI,
 			/* 1 */ 0,
 			/* 2 */ 0,
@@ -1529,7 +1546,7 @@ static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entr
 		};
 
 		/* 0xBA0 */
-		async_codec_input_scb_t async_codec_input_scb = {
+		struct dsp_async_codec_input_scb async_codec_input_scb = {
 			/* 0 */ DSP_SPOS_UUUU,
 			/* 1 */ 0,
 			/* 2 */ 0,
@@ -1620,9 +1637,9 @@ static int cs46xx_dsp_async_init (cs46xx_t *chip, dsp_scb_descriptor_t * fg_entr
 }
 
 
-static void cs46xx_dsp_disable_spdif_hw (cs46xx_t *chip)
+static void cs46xx_dsp_disable_spdif_hw (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	/* set SPDIF output FIFO slot */
 	snd_cs46xx_pokeBA0(chip, BA0_ASER_FADDR, 0);
@@ -1641,9 +1658,9 @@ static void cs46xx_dsp_disable_spdif_hw (cs46xx_t *chip)
 	ins->spdif_status_out &= ~DSP_SPDIF_STATUS_HW_ENABLED;
 }
 
-int cs46xx_dsp_enable_spdif_hw (cs46xx_t *chip)
+int cs46xx_dsp_enable_spdif_hw (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	/* if hw-ctrl already enabled, turn off to reset logic ... */
 	cs46xx_dsp_disable_spdif_hw (chip);
@@ -1664,9 +1681,9 @@ int cs46xx_dsp_enable_spdif_hw (cs46xx_t *chip)
 	return 0;
 }
 
-int cs46xx_dsp_enable_spdif_in (cs46xx_t *chip)
+int cs46xx_dsp_enable_spdif_in (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	/* turn on amplifier */
 	chip->active_ctrl(chip, 1);
@@ -1724,9 +1741,9 @@ int cs46xx_dsp_enable_spdif_in (cs46xx_t *chip)
 	return 0;
 }
 
-int cs46xx_dsp_disable_spdif_in (cs46xx_t *chip)
+int cs46xx_dsp_disable_spdif_in (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	snd_assert (ins->asynch_rx_scb != NULL, return -EINVAL);
 	snd_assert (ins->spdif_in_src != NULL,return -EINVAL);	
@@ -1750,9 +1767,9 @@ int cs46xx_dsp_disable_spdif_in (cs46xx_t *chip)
 	return 0;
 }
 
-int cs46xx_dsp_enable_pcm_capture (cs46xx_t *chip)
+int cs46xx_dsp_enable_pcm_capture (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	snd_assert (ins->pcm_input == NULL,return -EINVAL);
 	snd_assert (ins->ref_snoop_scb != NULL,return -EINVAL);
@@ -1765,9 +1782,9 @@ int cs46xx_dsp_enable_pcm_capture (cs46xx_t *chip)
 	return 0;
 }
 
-int cs46xx_dsp_disable_pcm_capture (cs46xx_t *chip)
+int cs46xx_dsp_disable_pcm_capture (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	snd_assert (ins->pcm_input != NULL,return -EINVAL);
 
@@ -1779,9 +1796,9 @@ int cs46xx_dsp_disable_pcm_capture (cs46xx_t *chip)
 	return 0;
 }
 
-int cs46xx_dsp_enable_adc_capture (cs46xx_t *chip)
+int cs46xx_dsp_enable_adc_capture (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	snd_assert (ins->adc_input == NULL,return -EINVAL);
 	snd_assert (ins->codec_in_scb != NULL,return -EINVAL);
@@ -1794,9 +1811,9 @@ int cs46xx_dsp_enable_adc_capture (cs46xx_t *chip)
 	return 0;
 }
 
-int cs46xx_dsp_disable_adc_capture (cs46xx_t *chip)
+int cs46xx_dsp_disable_adc_capture (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	snd_assert (ins->adc_input != NULL,return -EINVAL);
 
@@ -1808,7 +1825,7 @@ int cs46xx_dsp_disable_adc_capture (cs46xx_t *chip)
 	return 0;
 }
 
-int cs46xx_poke_via_dsp (cs46xx_t *chip,u32 address,u32 data)
+int cs46xx_poke_via_dsp (struct snd_cs46xx *chip, u32 address, u32 data)
 {
 	u32 temp;
 	int  i;
@@ -1845,10 +1862,10 @@ int cs46xx_poke_via_dsp (cs46xx_t *chip,u32 address,u32 data)
 	return 0;
 }
 
-int cs46xx_dsp_set_dac_volume (cs46xx_t * chip,u16 left,u16 right)
+int cs46xx_dsp_set_dac_volume (struct snd_cs46xx * chip, u16 left, u16 right)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	dsp_scb_descriptor_t * scb; 
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_scb_descriptor * scb; 
 
 	down(&chip->spos_mutex);
 	
@@ -1874,8 +1891,9 @@ int cs46xx_dsp_set_dac_volume (cs46xx_t * chip,u16 left,u16 right)
 	return 0;
 }
 
-int cs46xx_dsp_set_iec958_volume (cs46xx_t * chip,u16 left,u16 right) {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+int cs46xx_dsp_set_iec958_volume (struct snd_cs46xx * chip, u16 left, u16 right)
+{
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	down(&chip->spos_mutex);
 
diff --git a/sound/pci/cs46xx/dsp_spos.h b/sound/pci/cs46xx/dsp_spos.h
index 90871bf9762..0d246bca418 100644
--- a/sound/pci/cs46xx/dsp_spos.h
+++ b/sound/pci/cs46xx/dsp_spos.h
@@ -43,7 +43,7 @@
 /* this instruction types
    needs to be reallocated when load
    code into DSP */
-typedef enum  {
+enum wide_opcode {
 	WIDE_FOR_BEGIN_LOOP = 0x20,
 	WIDE_FOR_BEGIN_LOOP2,
 
@@ -58,7 +58,7 @@ typedef enum  {
 	WIDE_TBEQ_COND_CALL1_ADDR,
 	WIDE_TBEQ_NCOND_GOTOI_ADDR,
 	WIDE_TBEQ_NCOND_CALL1_ADDR,
-} wide_opcode_t;
+};
 
 /* SAMPLE segment */
 #define VARI_DECIMATE_BUF1       0x0000
@@ -186,7 +186,8 @@ typedef enum  {
 #define SP_SPDOUT_CONTROL 0x804D
 #define SP_SPDOUT_CSUV    0x808E
 
-static inline u8 _wrap_all_bits (u8 val) {
+static inline u8 _wrap_all_bits (u8 val)
+{
 	u8 wrapped;
 	
 	/* wrap all 8 bits */
@@ -201,11 +202,10 @@ static inline u8 _wrap_all_bits (u8 val) {
 		((val & 0x80) >> 7);
 
 	return wrapped;
-
 }
 
-
-static inline void cs46xx_dsp_spos_update_scb (cs46xx_t * chip,dsp_scb_descriptor_t * scb) 
+static inline void cs46xx_dsp_spos_update_scb (struct snd_cs46xx * chip,
+					       struct dsp_scb_descriptor * scb) 
 {
 	/* update nextSCB and subListPtr in SCB */
 	snd_cs46xx_poke(chip,
@@ -214,8 +214,10 @@ static inline void cs46xx_dsp_spos_update_scb (cs46xx_t * chip,dsp_scb_descripto
 			(scb->next_scb_ptr->address));	
 }
 
-static inline void cs46xx_dsp_scb_set_volume (cs46xx_t * chip,dsp_scb_descriptor_t * scb,
-					      u16 left,u16 right) {
+static inline void cs46xx_dsp_scb_set_volume (struct snd_cs46xx * chip,
+					      struct dsp_scb_descriptor * scb,
+					      u16 left, u16 right)
+{
 	unsigned int val = ((0xffff - left) << 16 | (0xffff - right));
 
 	snd_cs46xx_poke(chip, (scb->address + SCBVolumeCtrl) << 2, val);
diff --git a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c
index 92849e1340b..6e865005b26 100644
--- a/sound/pci/cs46xx/dsp_spos_scb_lib.c
+++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c
@@ -36,14 +36,14 @@
 #include "cs46xx_lib.h"
 #include "dsp_spos.h"
 
-typedef struct _proc_scb_info_t {
-	dsp_scb_descriptor_t * scb_desc;
-	cs46xx_t *chip;
-} proc_scb_info_t;
+struct proc_scb_info {
+	struct dsp_scb_descriptor * scb_desc;
+	struct snd_cs46xx *chip;
+};
 
-static void remove_symbol (cs46xx_t * chip,symbol_entry_t * symbol)
+static void remove_symbol (struct snd_cs46xx * chip, struct dsp_symbol_entry * symbol)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	int symbol_index = (int)(symbol - ins->symbol_table.symbols);
 
 	snd_assert(ins->symbol_table.nsymbols > 0,return);
@@ -64,12 +64,13 @@ static void remove_symbol (cs46xx_t * chip,symbol_entry_t * symbol)
 
 }
 
-static void cs46xx_dsp_proc_scb_info_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer)
+static void cs46xx_dsp_proc_scb_info_read (struct snd_info_entry *entry,
+					   struct snd_info_buffer *buffer)
 {
-	proc_scb_info_t * scb_info  = (proc_scb_info_t *)entry->private_data;
-	dsp_scb_descriptor_t * scb = scb_info->scb_desc;
-	dsp_spos_instance_t * ins;
-	cs46xx_t *chip = scb_info->chip;
+	struct proc_scb_info * scb_info  = entry->private_data;
+	struct dsp_scb_descriptor * scb = scb_info->scb_desc;
+	struct dsp_spos_instance * ins;
+	struct snd_cs46xx *chip = scb_info->chip;
 	int j,col;
 	void __iomem *dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET;
 
@@ -106,9 +107,9 @@ static void cs46xx_dsp_proc_scb_info_read (snd_info_entry_t *entry, snd_info_buf
 	up(&chip->spos_mutex);
 }
 
-static void _dsp_unlink_scb (cs46xx_t *chip,dsp_scb_descriptor_t * scb)
+static void _dsp_unlink_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor * scb)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	unsigned long flags;
 
 	if ( scb->parent_scb_ptr ) {
@@ -160,7 +161,8 @@ static void _dsp_unlink_scb (cs46xx_t *chip,dsp_scb_descriptor_t * scb)
 	}
 }
 
-static void _dsp_clear_sample_buffer (cs46xx_t *chip, u32 sample_buffer_addr, int dword_count) 
+static void _dsp_clear_sample_buffer (struct snd_cs46xx *chip, u32 sample_buffer_addr,
+				      int dword_count) 
 {
 	void __iomem *dst = chip->region.idx[2].remap_addr + sample_buffer_addr;
 	int i;
@@ -171,9 +173,9 @@ static void _dsp_clear_sample_buffer (cs46xx_t *chip, u32 sample_buffer_addr, in
 	}  
 }
 
-void cs46xx_dsp_remove_scb (cs46xx_t *chip, dsp_scb_descriptor_t * scb)
+void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor * scb)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	/* check integrety */
 	snd_assert ( (scb->index >= 0 && 
@@ -218,10 +220,10 @@ void cs46xx_dsp_remove_scb (cs46xx_t *chip, dsp_scb_descriptor_t * scb)
 }
 
 
-void cs46xx_dsp_proc_free_scb_desc (dsp_scb_descriptor_t * scb)
+void cs46xx_dsp_proc_free_scb_desc (struct dsp_scb_descriptor * scb)
 {
 	if (scb->proc_info) {
-		proc_scb_info_t * scb_info  = (proc_scb_info_t *)scb->proc_info->private_data;
+		struct proc_scb_info * scb_info = scb->proc_info->private_data;
 
 		snd_printdd("cs46xx_dsp_proc_free_scb_desc: freeing %s\n",scb->scb_name);
 
@@ -233,11 +235,12 @@ void cs46xx_dsp_proc_free_scb_desc (dsp_scb_descriptor_t * scb)
 	}
 }
 
-void cs46xx_dsp_proc_register_scb_desc (cs46xx_t *chip,dsp_scb_descriptor_t * scb)
+void cs46xx_dsp_proc_register_scb_desc (struct snd_cs46xx *chip,
+					struct dsp_scb_descriptor * scb)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	snd_info_entry_t * entry;
-	proc_scb_info_t * scb_info;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct snd_info_entry * entry;
+	struct proc_scb_info * scb_info;
 
 	/* register to proc */
 	if (ins->snd_card != NULL && ins->proc_dsp_dir != NULL &&
@@ -245,7 +248,7 @@ void cs46xx_dsp_proc_register_scb_desc (cs46xx_t *chip,dsp_scb_descriptor_t * sc
   
 		if ((entry = snd_info_create_card_entry(ins->snd_card, scb->scb_name, 
 							ins->proc_dsp_dir)) != NULL) {
-			scb_info = kmalloc(sizeof(proc_scb_info_t), GFP_KERNEL);
+			scb_info = kmalloc(sizeof(struct proc_scb_info), GFP_KERNEL);
 			if (!scb_info) {
 				snd_info_free_entry(entry);
 				entry = NULL;
@@ -273,14 +276,14 @@ out:
 	}
 }
 
-static dsp_scb_descriptor_t * 
-_dsp_create_generic_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest,
-                         symbol_entry_t * task_entry,
-                         dsp_scb_descriptor_t * parent_scb,
+static struct dsp_scb_descriptor * 
+_dsp_create_generic_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u32 dest,
+                         struct dsp_symbol_entry * task_entry,
+                         struct dsp_scb_descriptor * parent_scb,
                          int scb_child_type)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	dsp_scb_descriptor_t * scb;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_scb_descriptor * scb;
   
 	unsigned long flags;
 
@@ -342,13 +345,13 @@ _dsp_create_generic_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest,
 	return scb;
 }
 
-static dsp_scb_descriptor_t * 
-cs46xx_dsp_create_generic_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 dest,
-                               char * task_entry_name,
-                               dsp_scb_descriptor_t * parent_scb,
+static struct dsp_scb_descriptor * 
+cs46xx_dsp_create_generic_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data,
+			       u32 dest, char * task_entry_name,
+                               struct dsp_scb_descriptor * parent_scb,
                                int scb_child_type)
 {
-	symbol_entry_t * task_entry;
+	struct dsp_symbol_entry * task_entry;
 
 	task_entry = cs46xx_dsp_lookup_symbol (chip,task_entry_name,
 					       SYMBOL_CODE);
@@ -362,12 +365,12 @@ cs46xx_dsp_create_generic_scb (cs46xx_t *chip,char * name, u32 * scb_data,u32 de
 					parent_scb,scb_child_type);
 }
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_timing_master_scb (cs46xx_t *chip)
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_timing_master_scb (struct snd_cs46xx *chip)
 {
-	dsp_scb_descriptor_t * scb;
+	struct dsp_scb_descriptor * scb;
   
-	timing_master_scb_t timing_master_scb = {
+	struct dsp_timing_master_scb timing_master_scb = {
 		{ 0,
 		  0,
 		  0,
@@ -396,16 +399,15 @@ cs46xx_dsp_create_timing_master_scb (cs46xx_t *chip)
 }
 
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_codec_out_scb(cs46xx_t * chip,char * codec_name,
-                                u16 channel_disp,u16 fifo_addr,
-                                u16 child_scb_addr,
-                                u32 dest,dsp_scb_descriptor_t * parent_scb,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_codec_out_scb(struct snd_cs46xx * chip, char * codec_name,
+                                u16 channel_disp, u16 fifo_addr, u16 child_scb_addr,
+                                u32 dest, struct dsp_scb_descriptor * parent_scb,
                                 int scb_child_type)
 {
-	dsp_scb_descriptor_t * scb;
+	struct dsp_scb_descriptor * scb;
   
-	codec_output_scb_t codec_out_scb = {
+	struct dsp_codec_output_scb codec_out_scb = {
 		{ 0,
 		  0,
 		  0,
@@ -435,16 +437,15 @@ cs46xx_dsp_create_codec_out_scb(cs46xx_t * chip,char * codec_name,
 	return scb;
 }
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name,
-                                u16 channel_disp,u16 fifo_addr,
-                                u16 sample_buffer_addr,
-                                u32 dest,dsp_scb_descriptor_t * parent_scb,
-                                int scb_child_type)
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_codec_in_scb(struct snd_cs46xx * chip, char * codec_name,
+			       u16 channel_disp, u16 fifo_addr, u16 sample_buffer_addr,
+			       u32 dest, struct dsp_scb_descriptor * parent_scb,
+			       int scb_child_type)
 {
 
-	dsp_scb_descriptor_t * scb;
-	codec_input_scb_t codec_input_scb = {
+	struct dsp_scb_descriptor * scb;
+	struct dsp_codec_input_scb codec_input_scb = {
 		{ 0,
 		  0,
 		  0,
@@ -481,17 +482,17 @@ cs46xx_dsp_create_codec_in_scb(cs46xx_t * chip,char * codec_name,
 }
 
 
-static dsp_scb_descriptor_t * 
-cs46xx_dsp_create_pcm_reader_scb(cs46xx_t * chip,char * scb_name,
-                                 u16 sample_buffer_addr,u32 dest,
+static struct dsp_scb_descriptor * 
+cs46xx_dsp_create_pcm_reader_scb(struct snd_cs46xx * chip, char * scb_name,
+                                 u16 sample_buffer_addr, u32 dest,
                                  int virtual_channel, u32 playback_hw_addr,
-                                 dsp_scb_descriptor_t * parent_scb,
+                                 struct dsp_scb_descriptor * parent_scb,
                                  int scb_child_type)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	dsp_scb_descriptor_t * scb;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_scb_descriptor * scb;
   
-	generic_scb_t pcm_reader_scb = {
+	struct dsp_generic_scb pcm_reader_scb = {
     
 		/*
 		  Play DMA Task xfers data from host buffer to SP buffer
@@ -584,18 +585,18 @@ cs46xx_dsp_create_pcm_reader_scb(cs46xx_t * chip,char * scb_name,
 
 #define GOF_PER_SEC 200
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_src_task_scb(struct snd_cs46xx * chip, char * scb_name,
 			       int rate,
                                u16 src_buffer_addr,
-                               u16 src_delay_buffer_addr,u32 dest,
-                               dsp_scb_descriptor_t * parent_scb,
+                               u16 src_delay_buffer_addr, u32 dest,
+                               struct dsp_scb_descriptor * parent_scb,
                                int scb_child_type,
 	                       int pass_through)
 {
 
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	dsp_scb_descriptor_t * scb;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_scb_descriptor * scb;
 	unsigned int tmp1, tmp2;
 	unsigned int phiIncr;
 	unsigned int correctionPerGOF, correctionPerSec;
@@ -632,7 +633,7 @@ cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name,
 	correctionPerSec = tmp1;
 
 	{
-		src_task_scb_t src_task_scb = {
+		struct dsp_src_task_scb src_task_scb = {
 			0x0028,0x00c8,
 			0x5555,0x0000,
 			0x0000,0x0000,
@@ -688,14 +689,14 @@ cs46xx_dsp_create_src_task_scb(cs46xx_t * chip,char * scb_name,
 }
 
 #if 0 /* not used */
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_filter_scb(cs46xx_t * chip,char * scb_name,
-			     u16 buffer_addr,u32 dest,
-			     dsp_scb_descriptor_t * parent_scb,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_filter_scb(struct snd_cs46xx * chip, char * scb_name,
+			     u16 buffer_addr, u32 dest,
+			     struct dsp_scb_descriptor * parent_scb,
 			     int scb_child_type) {
-	dsp_scb_descriptor_t * scb;
+	struct dsp_scb_descriptor * scb;
 	
-	filter_scb_t filter_scb = {
+	struct dsp_filter_scb filter_scb = {
 		.a0_right            = 0x41a9,
 		.a0_left             = 0x41a9,
 		.a1_right            = 0xb8e4,
@@ -738,15 +739,15 @@ cs46xx_dsp_create_filter_scb(cs46xx_t * chip,char * scb_name,
 }
 #endif /* not used */
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_mix_only_scb(cs46xx_t * chip,char * scb_name,
-                               u16 mix_buffer_addr,u32 dest,
-                               dsp_scb_descriptor_t * parent_scb,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_mix_only_scb(struct snd_cs46xx * chip, char * scb_name,
+                               u16 mix_buffer_addr, u32 dest,
+                               struct dsp_scb_descriptor * parent_scb,
                                int scb_child_type)
 {
-	dsp_scb_descriptor_t * scb;
+	struct dsp_scb_descriptor * scb;
   
-	mix_only_scb_t master_mix_scb = {
+	struct dsp_mix_only_scb master_mix_scb = {
 		/* 0 */ { 0,
 			  /* 1 */   0,
 			  /* 2 */  mix_buffer_addr,
@@ -778,15 +779,15 @@ cs46xx_dsp_create_mix_only_scb(cs46xx_t * chip,char * scb_name,
 }
 
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_mix_to_ostream_scb(cs46xx_t * chip,char * scb_name,
-                                     u16 mix_buffer_addr,u16 writeback_spb,u32 dest,
-                                     dsp_scb_descriptor_t * parent_scb,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_mix_to_ostream_scb(struct snd_cs46xx * chip, char * scb_name,
+                                     u16 mix_buffer_addr, u16 writeback_spb, u32 dest,
+                                     struct dsp_scb_descriptor * parent_scb,
                                      int scb_child_type)
 {
-	dsp_scb_descriptor_t * scb;
+	struct dsp_scb_descriptor * scb;
 
-	mix2_ostream_scb_t mix2_ostream_scb = {
+	struct dsp_mix2_ostream_scb mix2_ostream_scb = {
 		/* Basic (non scatter/gather) DMA requestor (4 ints) */
 		{ 
 			DMA_RQ_C1_SOURCE_MOD64 +
@@ -832,18 +833,18 @@ cs46xx_dsp_create_mix_to_ostream_scb(cs46xx_t * chip,char * scb_name,
 }
 
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_vari_decimate_scb(cs46xx_t * chip,char * scb_name,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_vari_decimate_scb(struct snd_cs46xx * chip,char * scb_name,
                                     u16 vari_buffer_addr0,
                                     u16 vari_buffer_addr1,
                                     u32 dest,
-                                    dsp_scb_descriptor_t * parent_scb,
+                                    struct dsp_scb_descriptor * parent_scb,
                                     int scb_child_type)
 {
 
-	dsp_scb_descriptor_t * scb;
+	struct dsp_scb_descriptor * scb;
   
-	vari_decimate_scb_t vari_decimate_scb = {
+	struct dsp_vari_decimate_scb vari_decimate_scb = {
 		0x0028,0x00c8,
 		0x5555,0x0000,
 		0x0000,0x0000,
@@ -876,17 +877,17 @@ cs46xx_dsp_create_vari_decimate_scb(cs46xx_t * chip,char * scb_name,
 }
 
 
-static dsp_scb_descriptor_t * 
-cs46xx_dsp_create_pcm_serial_input_scb(cs46xx_t * chip,char * scb_name,u32 dest,
-                                       dsp_scb_descriptor_t * input_scb,
-                                       dsp_scb_descriptor_t * parent_scb,
+static struct dsp_scb_descriptor * 
+cs46xx_dsp_create_pcm_serial_input_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest,
+                                       struct dsp_scb_descriptor * input_scb,
+                                       struct dsp_scb_descriptor * parent_scb,
                                        int scb_child_type)
 {
 
-	dsp_scb_descriptor_t * scb;
+	struct dsp_scb_descriptor * scb;
 
 
-	pcm_serial_input_scb_t pcm_serial_input_scb = {
+	struct dsp_pcm_serial_input_scb pcm_serial_input_scb = {
 		{ 0,
 		  0,
 		  0,
@@ -919,17 +920,17 @@ cs46xx_dsp_create_pcm_serial_input_scb(cs46xx_t * chip,char * scb_name,u32 dest,
 }
 
 
-static dsp_scb_descriptor_t * 
-cs46xx_dsp_create_asynch_fg_tx_scb(cs46xx_t * chip,char * scb_name,u32 dest,
+static struct dsp_scb_descriptor * 
+cs46xx_dsp_create_asynch_fg_tx_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest,
                                    u16 hfg_scb_address,
                                    u16 asynch_buffer_address,
-                                   dsp_scb_descriptor_t * parent_scb,
+                                   struct dsp_scb_descriptor * parent_scb,
                                    int scb_child_type)
 {
 
-	dsp_scb_descriptor_t * scb;
+	struct dsp_scb_descriptor * scb;
 
-	asynch_fg_tx_scb_t asynch_fg_tx_scb = {
+	struct dsp_asynch_fg_tx_scb asynch_fg_tx_scb = {
 		0xfc00,0x03ff,      /*  Prototype sample buffer size of 256 dwords */
 		0x0058,0x0028,      /* Min Delta 7 dwords == 28 bytes */
 		/* : Max delta 25 dwords == 100 bytes */
@@ -966,17 +967,17 @@ cs46xx_dsp_create_asynch_fg_tx_scb(cs46xx_t * chip,char * scb_name,u32 dest,
 }
 
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_asynch_fg_rx_scb(cs46xx_t * chip,char * scb_name,u32 dest,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_asynch_fg_rx_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest,
                                    u16 hfg_scb_address,
                                    u16 asynch_buffer_address,
-                                   dsp_scb_descriptor_t * parent_scb,
+                                   struct dsp_scb_descriptor * parent_scb,
                                    int scb_child_type)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	dsp_scb_descriptor_t * scb;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_scb_descriptor * scb;
 
-	asynch_fg_rx_scb_t asynch_fg_rx_scb = {
+	struct dsp_asynch_fg_rx_scb asynch_fg_rx_scb = {
 		0xfe00,0x01ff,      /*  Prototype sample buffer size of 128 dwords */
 		0x0064,0x001c,      /* Min Delta 7 dwords == 28 bytes */
 		                    /* : Max delta 25 dwords == 100 bytes */
@@ -1016,17 +1017,17 @@ cs46xx_dsp_create_asynch_fg_rx_scb(cs46xx_t * chip,char * scb_name,u32 dest,
 
 
 #if 0 /* not used */
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_output_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_output_snoop_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest,
                                    u16 snoop_buffer_address,
-                                   dsp_scb_descriptor_t * snoop_scb,
-                                   dsp_scb_descriptor_t * parent_scb,
+                                   struct dsp_scb_descriptor * snoop_scb,
+                                   struct dsp_scb_descriptor * parent_scb,
                                    int scb_child_type)
 {
 
-	dsp_scb_descriptor_t * scb;
+	struct dsp_scb_descriptor * scb;
   
-	output_snoop_scb_t output_snoop_scb = {
+	struct dsp_output_snoop_scb output_snoop_scb = {
 		{ 0,	/*  not used.  Zero */
 		  0,
 		  0,
@@ -1058,14 +1059,14 @@ cs46xx_dsp_create_output_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest,
 #endif /* not used */
 
 
-dsp_scb_descriptor_t * 
-cs46xx_dsp_create_spio_write_scb(cs46xx_t * chip,char * scb_name,u32 dest,
-                                 dsp_scb_descriptor_t * parent_scb,
+struct dsp_scb_descriptor * 
+cs46xx_dsp_create_spio_write_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest,
+                                 struct dsp_scb_descriptor * parent_scb,
                                  int scb_child_type)
 {
-	dsp_scb_descriptor_t * scb;
+	struct dsp_scb_descriptor * scb;
   
-	spio_write_scb_t spio_write_scb = {
+	struct dsp_spio_write_scb spio_write_scb = {
 		0,0,         /*   SPIOWAddress2:SPIOWAddress1; */
 		0,           /*   SPIOWData1; */
 		0,           /*   SPIOWData2; */
@@ -1094,15 +1095,16 @@ cs46xx_dsp_create_spio_write_scb(cs46xx_t * chip,char * scb_name,u32 dest,
 	return scb;
 }
 
-dsp_scb_descriptor_t *  cs46xx_dsp_create_magic_snoop_scb(cs46xx_t * chip,char * scb_name,u32 dest,
-                                                          u16 snoop_buffer_address,
-                                                          dsp_scb_descriptor_t * snoop_scb,
-                                                          dsp_scb_descriptor_t * parent_scb,
-                                                          int scb_child_type)
+struct dsp_scb_descriptor *
+cs46xx_dsp_create_magic_snoop_scb(struct snd_cs46xx * chip, char * scb_name, u32 dest,
+				  u16 snoop_buffer_address,
+				  struct dsp_scb_descriptor * snoop_scb,
+				  struct dsp_scb_descriptor * parent_scb,
+				  int scb_child_type)
 {
-	dsp_scb_descriptor_t * scb;
+	struct dsp_scb_descriptor * scb;
   
-	magic_snoop_task_t magic_snoop_scb = {
+	struct dsp_magic_snoop_task magic_snoop_scb = {
 		/* 0 */ 0, /* i0 */
 		/* 1 */ 0, /* i1 */
 		/* 2 */ snoop_buffer_address << 0x10,
@@ -1129,10 +1131,11 @@ dsp_scb_descriptor_t *  cs46xx_dsp_create_magic_snoop_scb(cs46xx_t * chip,char *
 	return scb;
 }
 
-static dsp_scb_descriptor_t * find_next_free_scb (cs46xx_t * chip,dsp_scb_descriptor_t * from)
+static struct dsp_scb_descriptor *
+find_next_free_scb (struct snd_cs46xx * chip, struct dsp_scb_descriptor * from)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	dsp_scb_descriptor_t * scb = from;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_scb_descriptor * scb = from;
 
 	while (scb->next_scb_ptr != ins->the_null_scb) {
 		snd_assert (scb->next_scb_ptr != NULL, return NULL);
@@ -1212,18 +1215,19 @@ static u32 src_delay_buffer_addr[DSP_MAX_SRC_NR] = {
 	0x2B00
 };
 
-pcm_channel_descriptor_t * cs46xx_dsp_create_pcm_channel (cs46xx_t * chip,
-                                                          u32 sample_rate, void * private_data, 
-                                                          u32 hw_dma_addr,
-                                                          int pcm_channel_id)
+struct dsp_pcm_channel_descriptor *
+cs46xx_dsp_create_pcm_channel (struct snd_cs46xx * chip,
+			       u32 sample_rate, void * private_data, 
+			       u32 hw_dma_addr,
+			       int pcm_channel_id)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	dsp_scb_descriptor_t * src_scb = NULL,* pcm_scb, * mixer_scb = NULL;
-	dsp_scb_descriptor_t * src_parent_scb = NULL;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_scb_descriptor * src_scb = NULL, * pcm_scb, * mixer_scb = NULL;
+	struct dsp_scb_descriptor * src_parent_scb = NULL;
 
-	/* dsp_scb_descriptor_t * pcm_parent_scb; */
+	/* struct dsp_scb_descriptor * pcm_parent_scb; */
 	char scb_name[DSP_MAX_SCB_NAME];
-	int i,pcm_index = -1, insert_point, src_index = -1,pass_through = 0;
+	int i, pcm_index = -1, insert_point, src_index = -1, pass_through = 0;
 	unsigned long flags;
 
 	switch (pcm_channel_id) {
@@ -1371,8 +1375,8 @@ pcm_channel_descriptor_t * cs46xx_dsp_create_pcm_channel (cs46xx_t * chip,
 	return (ins->pcm_channels + pcm_index);
 }
 
-int cs46xx_dsp_pcm_channel_set_period (cs46xx_t * chip,
-				       pcm_channel_descriptor_t * pcm_channel,
+int cs46xx_dsp_pcm_channel_set_period (struct snd_cs46xx * chip,
+				       struct dsp_pcm_channel_descriptor * pcm_channel,
 				       int period_size)
 {
 	u32 temp = snd_cs46xx_peek (chip,pcm_channel->pcm_reader_scb->address << 2);
@@ -1410,7 +1414,7 @@ int cs46xx_dsp_pcm_channel_set_period (cs46xx_t * chip,
 	return 0;
 }
 
-int cs46xx_dsp_pcm_ostream_set_period (cs46xx_t * chip,
+int cs46xx_dsp_pcm_ostream_set_period (struct snd_cs46xx * chip,
 				       int period_size)
 {
 	u32 temp = snd_cs46xx_peek (chip,WRITEBACK_SCB_ADDR << 2);
@@ -1448,9 +1452,10 @@ int cs46xx_dsp_pcm_ostream_set_period (cs46xx_t * chip,
 	return 0;
 }
 
-void cs46xx_dsp_destroy_pcm_channel (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel)
+void cs46xx_dsp_destroy_pcm_channel (struct snd_cs46xx * chip,
+				     struct dsp_pcm_channel_descriptor * pcm_channel)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	unsigned long flags;
 
 	snd_assert(pcm_channel->active, return );
@@ -1478,9 +1483,10 @@ void cs46xx_dsp_destroy_pcm_channel (cs46xx_t * chip,pcm_channel_descriptor_t *
 	}
 }
 
-int cs46xx_dsp_pcm_unlink (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel)
+int cs46xx_dsp_pcm_unlink (struct snd_cs46xx * chip,
+			   struct dsp_pcm_channel_descriptor * pcm_channel)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 	unsigned long flags;
 
 	snd_assert(pcm_channel->active,return -EIO);
@@ -1503,11 +1509,12 @@ int cs46xx_dsp_pcm_unlink (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channe
 	return 0;
 }
 
-int cs46xx_dsp_pcm_link (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel)
+int cs46xx_dsp_pcm_link (struct snd_cs46xx * chip,
+			 struct dsp_pcm_channel_descriptor * pcm_channel)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	dsp_scb_descriptor_t * parent_scb;
-	dsp_scb_descriptor_t * src_scb = pcm_channel->src_scb;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_scb_descriptor * parent_scb;
+	struct dsp_scb_descriptor * src_scb = pcm_channel->src_scb;
 	unsigned long flags;
 
 	spin_lock(&pcm_channel->src_scb->lock);
@@ -1544,12 +1551,13 @@ int cs46xx_dsp_pcm_link (cs46xx_t * chip,pcm_channel_descriptor_t * pcm_channel)
 	return 0;
 }
 
-dsp_scb_descriptor_t * cs46xx_add_record_source (cs46xx_t *chip,dsp_scb_descriptor_t * source,
-                                                 u16 addr,char * scb_name)
+struct dsp_scb_descriptor *
+cs46xx_add_record_source (struct snd_cs46xx *chip, struct dsp_scb_descriptor * source,
+			  u16 addr, char * scb_name)
 {
-  	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	dsp_scb_descriptor_t * parent;
-	dsp_scb_descriptor_t * pcm_input;
+  	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_scb_descriptor * parent;
+	struct dsp_scb_descriptor * pcm_input;
 	int insert_point;
 
 	snd_assert (ins->record_mixer_scb != NULL,return NULL);
@@ -1569,7 +1577,7 @@ dsp_scb_descriptor_t * cs46xx_add_record_source (cs46xx_t *chip,dsp_scb_descript
 	return pcm_input;
 }
 
-int cs46xx_src_unlink(cs46xx_t *chip,dsp_scb_descriptor_t * src)
+int cs46xx_src_unlink(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src)
 {
 	snd_assert (src->parent_scb_ptr != NULL,  return -EINVAL );
 
@@ -1581,10 +1589,10 @@ int cs46xx_src_unlink(cs46xx_t *chip,dsp_scb_descriptor_t * src)
 	return 0;
 }
 
-int cs46xx_src_link(cs46xx_t *chip,dsp_scb_descriptor_t * src)
+int cs46xx_src_link(struct snd_cs46xx *chip, struct dsp_scb_descriptor * src)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
-	dsp_scb_descriptor_t * parent_scb;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
+	struct dsp_scb_descriptor * parent_scb;
 
 	snd_assert (src->parent_scb_ptr == NULL,   return -EINVAL );
 	snd_assert(ins->master_mix_scb !=NULL,   return -EINVAL );
@@ -1605,9 +1613,9 @@ int cs46xx_src_link(cs46xx_t *chip,dsp_scb_descriptor_t * src)
 	return 0;
 }
 
-int cs46xx_dsp_enable_spdif_out (cs46xx_t *chip)
+int cs46xx_dsp_enable_spdif_out (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	if ( ! (ins->spdif_status_out & DSP_SPDIF_STATUS_HW_ENABLED) ) {
 		cs46xx_dsp_enable_spdif_hw (chip);
@@ -1653,9 +1661,9 @@ int cs46xx_dsp_enable_spdif_out (cs46xx_t *chip)
 	return 0;
 }
 
-int  cs46xx_dsp_disable_spdif_out (cs46xx_t *chip)
+int  cs46xx_dsp_disable_spdif_out (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	/* dont touch anything if SPDIF is open */
 	if ( ins->spdif_status_out & DSP_SPDIF_STATUS_PLAYBACK_OPEN) {
@@ -1685,9 +1693,9 @@ int  cs46xx_dsp_disable_spdif_out (cs46xx_t *chip)
 	return 0;
 }
 
-int cs46xx_iec958_pre_open (cs46xx_t *chip)
+int cs46xx_iec958_pre_open (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	if ( ins->spdif_status_out & DSP_SPDIF_STATUS_OUTPUT_ENABLED ) {
 		/* remove AsynchFGTxSCB and and PCMSerialInput_II */
@@ -1718,9 +1726,9 @@ int cs46xx_iec958_pre_open (cs46xx_t *chip)
 	return 0;
 }
 
-int cs46xx_iec958_post_close (cs46xx_t *chip)
+int cs46xx_iec958_post_close (struct snd_cs46xx *chip)
 {
-	dsp_spos_instance_t * ins = chip->dsp_spos_instance;
+	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
 
 	snd_assert (ins->asynch_tx_scb != NULL, return -EINVAL);
 
diff --git a/sound/pci/cs46xx/imgs/cwc4630.h b/sound/pci/cs46xx/imgs/cwc4630.h
index 8bed07f9996..37c4f1318dc 100644
--- a/sound/pci/cs46xx/imgs/cwc4630.h
+++ b/sound/pci/cs46xx/imgs/cwc4630.h
@@ -3,7 +3,7 @@
 #ifndef __HEADER_cwc4630_H__
 #define __HEADER_cwc4630_H__
 
-static symbol_entry_t cwc4630_symbols[] = {
+static struct dsp_symbol_entry cwc4630_symbols[] = {
   { 0x0000, "BEGINADDRESS",0x00 },
   { 0x8000, "EXECCHILD",0x03 },
   { 0x8001, "EXECCHILD_98",0x03 },
@@ -302,12 +302,12 @@ static u32 cwc4630_parameter[] = {
 }; /* #PARAMETER_END */
 
 
-static segment_desc_t cwc4630_segments[] = {
+static struct dsp_segment_desc cwc4630_segments[] = {
   { SEGTYPE_SP_PROGRAM, 0x00000000, 0x00000328, cwc4630_code },
   { SEGTYPE_SP_PARAMETER, 0x00000000, 0x00000080, cwc4630_parameter },
 };
 
-static dsp_module_desc_t cwc4630_module = {
+static struct dsp_module_desc cwc4630_module = {
   "cwc4630",
   {
     38,
diff --git a/sound/pci/cs46xx/imgs/cwcasync.h b/sound/pci/cs46xx/imgs/cwcasync.h
index e01a7b66c4f..70e63e13c2b 100644
--- a/sound/pci/cs46xx/imgs/cwcasync.h
+++ b/sound/pci/cs46xx/imgs/cwcasync.h
@@ -3,7 +3,7 @@
 #ifndef __HEADER_cwcasync_H__
 #define __HEADER_cwcasync_H__
 
-static symbol_entry_t cwcasync_symbols[] = {
+static struct dsp_symbol_entry cwcasync_symbols[] = {
   { 0x8000, "EXECCHILD",0x03 },
   { 0x8001, "EXECCHILD_98",0x03 },
   { 0x8003, "EXECCHILD_PUSH1IND",0x03 },
@@ -159,11 +159,11 @@ static u32 cwcasync_code[] = {
 };
 /* #CODE_END */
 
-static segment_desc_t cwcasync_segments[] = {
+static struct dsp_segment_desc cwcasync_segments[] = {
   { SEGTYPE_SP_PROGRAM, 0x00000000, 0x000001b6, cwcasync_code },
 };
 
-static dsp_module_desc_t cwcasync_module = {
+static struct dsp_module_desc cwcasync_module = {
   "cwcasync",
   {
     32,
diff --git a/sound/pci/cs46xx/imgs/cwcbinhack.h b/sound/pci/cs46xx/imgs/cwcbinhack.h
index 436b38bd246..f4d93689cd4 100644
--- a/sound/pci/cs46xx/imgs/cwcbinhack.h
+++ b/sound/pci/cs46xx/imgs/cwcbinhack.h
@@ -4,7 +4,7 @@
 #ifndef __HEADER_cwcbinhack_H__
 #define __HEADER_cwcbinhack_H__
 
-static symbol_entry_t cwcbinhack_symbols[] = {
+static struct dsp_symbol_entry cwcbinhack_symbols[] = {
   { 0x02c8, "OVERLAYBEGINADDRESS",0x00 },
   { 0x02c8, "MAGICSNOOPTASK",0x03 },
   { 0x0308, "#CODE_END",0x00 },
@@ -31,11 +31,11 @@ static u32 cwcbinhack_code[] = {
 };
 /* #CODE_END */
 
-static segment_desc_t cwcbinhack_segments[] = {
+static struct dsp_segment_desc cwcbinhack_segments[] = {
   { SEGTYPE_SP_PROGRAM, 0x00000000, 64, cwcbinhack_code },
 };
 
-static dsp_module_desc_t cwcbinhack_module = {
+static struct dsp_module_desc cwcbinhack_module = {
   "cwcbinhack",
   {
     3,
diff --git a/sound/pci/cs46xx/imgs/cwcdma.h b/sound/pci/cs46xx/imgs/cwcdma.h
index 92860435bee..7ff0d458716 100644
--- a/sound/pci/cs46xx/imgs/cwcdma.h
+++ b/sound/pci/cs46xx/imgs/cwcdma.h
@@ -3,7 +3,7 @@
 #ifndef __HEADER_cwcdma_H__
 #define __HEADER_cwcdma_H__
 
-static symbol_entry_t cwcdma_symbols[] = {
+static struct dsp_symbol_entry cwcdma_symbols[] = {
   { 0x8000, "EXECCHILD",0x03 },
   { 0x8001, "EXECCHILD_98",0x03 },
   { 0x8003, "EXECCHILD_PUSH1IND",0x03 },
@@ -51,11 +51,11 @@ static u32 cwcdma_code[] = {
 
 /* #CODE_END */
 
-static segment_desc_t cwcdma_segments[] = {
+static struct dsp_segment_desc cwcdma_segments[] = {
   { SEGTYPE_SP_PROGRAM, 0x00000000, 0x00000030, cwcdma_code },
 };
 
-static dsp_module_desc_t cwcdma_module = {
+static struct dsp_module_desc cwcdma_module = {
   "cwcdma",
   {
     27,
diff --git a/sound/pci/cs46xx/imgs/cwcemb80.h b/sound/pci/cs46xx/imgs/cwcemb80.h
index 4b13551eae4..a64c6ff9983 100644
--- a/sound/pci/cs46xx/imgs/cwcemb80.h
+++ b/sound/pci/cs46xx/imgs/cwcemb80.h
@@ -3,7 +3,7 @@
 #ifndef __HEADER_cwcemb80_H__
 #define __HEADER_cwcemb80_H__
 
-static symbol_entry_t cwcemb80_symbols[] = {
+static struct dsp_symbol_entry cwcemb80_symbols[] = {
   { 0x0000, "BEGINADDRESS",0x00 },
   { 0x8000, "EXECCHILD",0x03 },
   { 0x8001, "EXECCHILD_98",0x03 },
@@ -1588,13 +1588,13 @@ static u32 cwcemb80_sample[] = {
 }; /* #SAMPLE_END */
 
 
-static segment_desc_t cwcemb80_segments[] = {
+static struct dsp_segment_desc cwcemb80_segments[] = {
   { SEGTYPE_SP_PROGRAM, 0x00000000, 0x0000031c, cwcemb80_code },
   { SEGTYPE_SP_PARAMETER, 0x00000000, 0x00000697, cwcemb80_parameter },
   { SEGTYPE_SP_SAMPLE, 0x00000000, 0x00000e00, cwcemb80_sample },
 };
 
-static dsp_module_desc_t cwcemb80_module = {
+static struct dsp_module_desc cwcemb80_module = {
   "cwcemb80",
   {
     38,
diff --git a/sound/pci/cs46xx/imgs/cwcsnoop.h b/sound/pci/cs46xx/imgs/cwcsnoop.h
index be1162bbcb4..6929d0a5a3f 100644
--- a/sound/pci/cs46xx/imgs/cwcsnoop.h
+++ b/sound/pci/cs46xx/imgs/cwcsnoop.h
@@ -3,7 +3,7 @@
 #ifndef __HEADER_cwcsnoop_H__
 #define __HEADER_cwcsnoop_H__
 
-static symbol_entry_t cwcsnoop_symbols[] = {
+static struct dsp_symbol_entry cwcsnoop_symbols[] = {
   { 0x0500, "OVERLAYBEGINADDRESS",0x00 },
   { 0x0500, "OUTPUTSNOOP",0x03 },
   { 0x051f, "#CODE_END",0x00 },
@@ -29,11 +29,11 @@ static u32 cwcsnoop_code[] = {
 };
 /* #CODE_END */
 
-static segment_desc_t cwcsnoop_segments[] = {
+static struct dsp_segment_desc cwcsnoop_segments[] = {
   { SEGTYPE_SP_PROGRAM, 0x00000000, 0x0000003e, cwcsnoop_code },
 };
 
-static dsp_module_desc_t cwcsnoop_module = {
+static struct dsp_module_desc cwcsnoop_module = {
   "cwcsnoop",
   {
     3,
-- 
cgit v1.2.3-70-g09d2


From eb4698f347ec908c365504c4edddadd1acd406ea Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:50:13 +0100
Subject: [ALSA] Remove xxx_t typedefs: PCI emu10k1

Modules: EMU10K1/EMU10K2 driver

Remove xxx_t typedefs from the PCI emu10k1 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/emu10k1.h                 | 336 +++++++++++++++---------------
 include/sound/emu10k1_synth.h           |   6 +-
 sound/pci/emu10k1/emu10k1.c             |  10 +-
 sound/pci/emu10k1/emu10k1_callback.c    | 105 +++++-----
 sound/pci/emu10k1/emu10k1_main.c        |  39 ++--
 sound/pci/emu10k1/emu10k1_patch.c       |  13 +-
 sound/pci/emu10k1/emu10k1_synth.c       |  19 +-
 sound/pci/emu10k1/emu10k1_synth_local.h |  15 +-
 sound/pci/emu10k1/emufx.c               | 244 ++++++++++++----------
 sound/pci/emu10k1/emumixer.c            | 229 +++++++++++----------
 sound/pci/emu10k1/emumpu401.c           |  72 +++----
 sound/pci/emu10k1/emupcm.c              | 354 ++++++++++++++++----------------
 sound/pci/emu10k1/emuproc.c             | 101 ++++-----
 sound/pci/emu10k1/io.c                  |  38 ++--
 sound/pci/emu10k1/irq.c                 |   8 +-
 sound/pci/emu10k1/memory.c              |  94 +++++----
 sound/pci/emu10k1/p16v.c                | 254 +++++++++++------------
 sound/pci/emu10k1/timer.c               |  18 +-
 sound/pci/emu10k1/voice.c               |  13 +-
 19 files changed, 1022 insertions(+), 946 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 8411c7ef6f1..d14c543b160 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -887,47 +887,45 @@
 
 /* ------------------- STRUCTURES -------------------- */
 
-typedef struct _snd_emu10k1 emu10k1_t;
-typedef struct _snd_emu10k1_voice emu10k1_voice_t;
-typedef struct _snd_emu10k1_pcm emu10k1_pcm_t;
-
-typedef enum {
+enum {
 	EMU10K1_EFX,
 	EMU10K1_PCM,
 	EMU10K1_SYNTH,
 	EMU10K1_MIDI
-} emu10k1_voice_type_t;
+};
+
+struct snd_emu10k1;
 
-struct _snd_emu10k1_voice {
-	emu10k1_t *emu;
+struct snd_emu10k1_voice {
+	struct snd_emu10k1 *emu;
 	int number;
 	unsigned int use: 1,
 	    pcm: 1,
 	    efx: 1,
 	    synth: 1,
 	    midi: 1;
-	void (*interrupt)(emu10k1_t *emu, emu10k1_voice_t *pvoice);
+	void (*interrupt)(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *pvoice);
 
-	emu10k1_pcm_t *epcm;
+	struct snd_emu10k1_pcm *epcm;
 };
 
-typedef enum {
+enum {
 	PLAYBACK_EMUVOICE,
 	PLAYBACK_EFX,
 	CAPTURE_AC97ADC,
 	CAPTURE_AC97MIC,
 	CAPTURE_EFX
-} snd_emu10k1_pcm_type_t;
-
-struct _snd_emu10k1_pcm {
-	emu10k1_t *emu;
-	snd_emu10k1_pcm_type_t type;
-	snd_pcm_substream_t *substream;
-	emu10k1_voice_t *voices[NUM_EFX_PLAYBACK];
-	emu10k1_voice_t *extra;
+};
+
+struct snd_emu10k1_pcm {
+	struct snd_emu10k1 *emu;
+	int type;
+	struct snd_pcm_substream *substream;
+	struct snd_emu10k1_voice *voices[NUM_EFX_PLAYBACK];
+	struct snd_emu10k1_voice *extra;
 	unsigned short running;
 	unsigned short first_ptr;
-	snd_util_memblk_t *memblk;
+	struct snd_util_memblk *memblk;
 	unsigned int start_addr;
 	unsigned int ccca_start_addr;
 	unsigned int capture_ipr;	/* interrupt acknowledge mask */
@@ -941,13 +939,13 @@ struct _snd_emu10k1_pcm {
 	unsigned int capture_bufsize;	/* buffer size in bytes */
 };
 
-typedef struct {
+struct snd_emu10k1_pcm_mixer {
 	/* mono, left, right x 8 sends (4 on emu10k1) */
 	unsigned char send_routing[3][8];
 	unsigned char send_volume[3][8];
 	unsigned short attn[3];
-	emu10k1_pcm_t *epcm;
-} emu10k1_pcm_mixer_t;
+	struct snd_emu10k1_pcm *epcm;
+};
 
 #define snd_emu10k1_compose_send_routing(route) \
 ((route[0] | (route[1] << 4) | (route[2] << 8) | (route[3] << 12)) << 16)
@@ -958,20 +956,20 @@ typedef struct {
 #define snd_emu10k1_compose_audigy_fxrt2(route) \
 ((unsigned int)route[4] | ((unsigned int)route[5] << 8) | ((unsigned int)route[6] << 16) | ((unsigned int)route[7] << 24))
 
-typedef struct snd_emu10k1_memblk {
-	snd_util_memblk_t mem;
+struct snd_emu10k1_memblk {
+	struct snd_util_memblk mem;
 	/* private part */
 	int first_page, last_page, pages, mapped_page;
 	unsigned int map_locked;
 	struct list_head mapped_link;
 	struct list_head mapped_order_link;
-} emu10k1_memblk_t;
+};
 
 #define snd_emu10k1_memblk_offset(blk)	(((blk)->mapped_page << PAGE_SHIFT) | ((blk)->mem.offset & (PAGE_SIZE - 1)))
 
 #define EMU10K1_MAX_TRAM_BLOCKS_PER_CODE	16
 
-typedef struct {
+struct snd_emu10k1_fx8010_ctl {
 	struct list_head list;		/* list link container */
 	unsigned int vcount;
 	unsigned int count;		/* count of GPR (1..16) */
@@ -980,19 +978,19 @@ typedef struct {
 	unsigned int min;		/* minimum range */
 	unsigned int max;		/* maximum range */
 	unsigned int translation;	/* translation type (EMU10K1_GPR_TRANSLATION*) */
-	snd_kcontrol_t *kcontrol;
-} snd_emu10k1_fx8010_ctl_t;
+	struct snd_kcontrol *kcontrol;
+};
 
-typedef void (snd_fx8010_irq_handler_t)(emu10k1_t *emu, void *private_data);
+typedef void (snd_fx8010_irq_handler_t)(struct snd_emu10k1 *emu, void *private_data);
 
-typedef struct _snd_emu10k1_fx8010_irq {
-	struct _snd_emu10k1_fx8010_irq *next;
+struct snd_emu10k1_fx8010_irq {
+	struct snd_emu10k1_fx8010_irq *next;
 	snd_fx8010_irq_handler_t *handler;
 	unsigned short gpr_running;
 	void *private_data;
-} snd_emu10k1_fx8010_irq_t;
+};
 
-typedef struct {
+struct snd_emu10k1_fx8010_pcm {
 	unsigned int valid: 1,
 		     opened: 1,
 		     active: 1;
@@ -1006,13 +1004,13 @@ typedef struct {
 	unsigned short gpr_trigger;	/* GPR containing trigger (activate) information (host) */
 	unsigned short gpr_running;	/* GPR containing info if PCM is running (FX8010) */
 	unsigned char etram[32];	/* external TRAM address & data */
-	snd_pcm_indirect_t pcm_rec;
+	struct snd_pcm_indirect pcm_rec;
 	unsigned int tram_pos;
 	unsigned int tram_shift;
-	snd_emu10k1_fx8010_irq_t *irq;
-} snd_emu10k1_fx8010_pcm_t;
+	struct snd_emu10k1_fx8010_irq *irq;
+};
 
-typedef struct {
+struct snd_emu10k1_fx8010 {
 	unsigned short fxbus_mask;	/* used FX buses (bitmask) */
 	unsigned short extin_mask;	/* used external inputs (bitmask) */
 	unsigned short extout_mask;	/* used external outputs (bitmask) */
@@ -1025,18 +1023,18 @@ typedef struct {
 	int gpr_count;			/* count of used kcontrols */
 	struct list_head gpr_ctl;	/* GPR controls */
 	struct semaphore lock;
-	snd_emu10k1_fx8010_pcm_t pcm[8];
+	struct snd_emu10k1_fx8010_pcm pcm[8];
 	spinlock_t irq_lock;
-	snd_emu10k1_fx8010_irq_t *irq_handlers;
-} snd_emu10k1_fx8010_t;
+	struct snd_emu10k1_fx8010_irq *irq_handlers;
+};
 
-#define emu10k1_gpr_ctl(n) list_entry(n, snd_emu10k1_fx8010_ctl_t, list)
+#define emu10k1_gpr_ctl(n) list_entry(n, struct snd_emu10k1_fx8010_ctl, list)
 
-typedef struct {
-	struct _snd_emu10k1 *emu;
-	snd_rawmidi_t *rmidi;
-	snd_rawmidi_substream_t *substream_input;
-	snd_rawmidi_substream_t *substream_output;
+struct snd_emu10k1_midi {
+	struct snd_emu10k1 *emu;
+	struct snd_rawmidi *rmidi;
+	struct snd_rawmidi_substream *substream_input;
+	struct snd_rawmidi_substream *substream_output;
 	unsigned int midi_mode;
 	spinlock_t input_lock;
 	spinlock_t output_lock;
@@ -1044,10 +1042,10 @@ typedef struct {
 	int tx_enable, rx_enable;
 	int port;
 	int ipr_tx, ipr_rx;
-	void (*interrupt)(emu10k1_t *emu, unsigned int status);
-} emu10k1_midi_t;
+	void (*interrupt)(struct snd_emu10k1 *emu, unsigned int status);
+};
 
-typedef struct {
+struct snd_emu_chip_details {
 	u32 vendor;
 	u32 device;
 	u32 subsystem;
@@ -1066,15 +1064,16 @@ typedef struct {
 	const char *driver;
 	const char *name;
 	const char *id;		/* for backward compatibility - can be NULL if not needed */
-} emu_chip_details_t;
+};
 
-struct _snd_emu10k1 {
+struct snd_emu10k1 {
 	int irq;
 
 	unsigned long port;			/* I/O port number */
 	unsigned int tos_link: 1,		/* tos link detected */
 	    rear_ac97: 1;			/* rear channels are on AC'97 */
-	const emu_chip_details_t *card_capabilities;	/* Contains profile of card capabilities */
+	/* Contains profile of card capabilities */
+	const struct snd_emu_chip_details *card_capabilities;
 	unsigned int audigy;			/* is Audigy? */
 	unsigned int revision;			/* chip revision */
 	unsigned int serial;			/* serial number */
@@ -1088,8 +1087,8 @@ struct _snd_emu10k1 {
 	struct snd_dma_device p16v_dma_dev;
 	struct snd_dma_buffer p16v_buffer;
 
-	snd_util_memhdr_t *memhdr;		/* page allocation list */
-	emu10k1_memblk_t *reserved_page;	/* reserved page */
+	struct snd_util_memhdr *memhdr;		/* page allocation list */
+	struct snd_emu10k1_memblk *reserved_page;	/* reserved page */
 
 	struct list_head mapped_link_head;
 	struct list_head mapped_order_link_head;
@@ -1099,142 +1098,142 @@ struct _snd_emu10k1 {
 
 	unsigned int spdif_bits[3];		/* s/pdif out setup */
 
-	snd_emu10k1_fx8010_t fx8010;		/* FX8010 info */
+	struct snd_emu10k1_fx8010 fx8010;		/* FX8010 info */
 	int gpr_base;
 	
-	ac97_t *ac97;
+	struct snd_ac97 *ac97;
 
 	struct pci_dev *pci;
-	snd_card_t *card;
-	snd_pcm_t *pcm;
-	snd_pcm_t *pcm_mic;
-	snd_pcm_t *pcm_efx;
-	snd_pcm_t *pcm_p16v;
+	struct snd_card *card;
+	struct snd_pcm *pcm;
+	struct snd_pcm *pcm_mic;
+	struct snd_pcm *pcm_efx;
+	struct snd_pcm *pcm_p16v;
 
 	spinlock_t synth_lock;
 	void *synth;
-	int (*get_synth_voice)(emu10k1_t *emu);
+	int (*get_synth_voice)(struct snd_emu10k1 *emu);
 
 	spinlock_t reg_lock;
 	spinlock_t emu_lock;
 	spinlock_t voice_lock;
 	struct semaphore ptb_lock;
 
-	emu10k1_voice_t voices[NUM_G];
-	emu10k1_voice_t p16v_voices[4];
-	emu10k1_voice_t p16v_capture_voice;
+	struct snd_emu10k1_voice voices[NUM_G];
+	struct snd_emu10k1_voice p16v_voices[4];
+	struct snd_emu10k1_voice p16v_capture_voice;
 	int p16v_device_offset;
 	u32 p16v_capture_source;
 	u32 p16v_capture_channel;
-	emu10k1_pcm_mixer_t pcm_mixer[32];
-	emu10k1_pcm_mixer_t efx_pcm_mixer[NUM_EFX_PLAYBACK];
-	snd_kcontrol_t *ctl_send_routing;
-	snd_kcontrol_t *ctl_send_volume;
-	snd_kcontrol_t *ctl_attn;
-	snd_kcontrol_t *ctl_efx_send_routing;
-	snd_kcontrol_t *ctl_efx_send_volume;
-	snd_kcontrol_t *ctl_efx_attn;
-
-	void (*hwvol_interrupt)(emu10k1_t *emu, unsigned int status);
-	void (*capture_interrupt)(emu10k1_t *emu, unsigned int status);
-	void (*capture_mic_interrupt)(emu10k1_t *emu, unsigned int status);
-	void (*capture_efx_interrupt)(emu10k1_t *emu, unsigned int status);
-	void (*spdif_interrupt)(emu10k1_t *emu, unsigned int status);
-	void (*dsp_interrupt)(emu10k1_t *emu);
-
-	snd_pcm_substream_t *pcm_capture_substream;
-	snd_pcm_substream_t *pcm_capture_mic_substream;
-	snd_pcm_substream_t *pcm_capture_efx_substream;
-	snd_pcm_substream_t *pcm_playback_efx_substream;
-
-	snd_timer_t *timer;
-
-	emu10k1_midi_t midi;
-	emu10k1_midi_t midi2; /* for audigy */
+	struct snd_emu10k1_pcm_mixer pcm_mixer[32];
+	struct snd_emu10k1_pcm_mixer efx_pcm_mixer[NUM_EFX_PLAYBACK];
+	struct snd_kcontrol *ctl_send_routing;
+	struct snd_kcontrol *ctl_send_volume;
+	struct snd_kcontrol *ctl_attn;
+	struct snd_kcontrol *ctl_efx_send_routing;
+	struct snd_kcontrol *ctl_efx_send_volume;
+	struct snd_kcontrol *ctl_efx_attn;
+
+	void (*hwvol_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
+	void (*capture_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
+	void (*capture_mic_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
+	void (*capture_efx_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
+	void (*spdif_interrupt)(struct snd_emu10k1 *emu, unsigned int status);
+	void (*dsp_interrupt)(struct snd_emu10k1 *emu);
+
+	struct snd_pcm_substream *pcm_capture_substream;
+	struct snd_pcm_substream *pcm_capture_mic_substream;
+	struct snd_pcm_substream *pcm_capture_efx_substream;
+	struct snd_pcm_substream *pcm_playback_efx_substream;
+
+	struct snd_timer *timer;
+
+	struct snd_emu10k1_midi midi;
+	struct snd_emu10k1_midi midi2; /* for audigy */
 
 	unsigned int efx_voices_mask[2];
 	unsigned int next_free_voice;
 };
 
-int snd_emu10k1_create(snd_card_t * card,
+int snd_emu10k1_create(struct snd_card *card,
 		       struct pci_dev *pci,
 		       unsigned short extin_mask,
 		       unsigned short extout_mask,
 		       long max_cache_bytes,
 		       int enable_ir,
 		       uint subsystem,
-		       emu10k1_t ** remu);
-
-int snd_emu10k1_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm);
-int snd_emu10k1_pcm_mic(emu10k1_t * emu, int device, snd_pcm_t ** rpcm);
-int snd_emu10k1_pcm_efx(emu10k1_t * emu, int device, snd_pcm_t ** rpcm);
-int snd_p16v_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm);
-int snd_p16v_free(emu10k1_t * emu);
-int snd_p16v_mixer(emu10k1_t * emu);
-int snd_emu10k1_pcm_multi(emu10k1_t * emu, int device, snd_pcm_t ** rpcm);
-int snd_emu10k1_fx8010_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm);
-int snd_emu10k1_mixer(emu10k1_t * emu, int pcm_device, int multi_device);
-int snd_emu10k1_timer(emu10k1_t * emu, int device);
-int snd_emu10k1_fx8010_new(emu10k1_t *emu, int device, snd_hwdep_t ** rhwdep);
+		       struct snd_emu10k1 ** remu);
+
+int snd_emu10k1_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm);
+int snd_emu10k1_pcm_mic(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm);
+int snd_emu10k1_pcm_efx(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm);
+int snd_p16v_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm);
+int snd_p16v_free(struct snd_emu10k1 * emu);
+int snd_p16v_mixer(struct snd_emu10k1 * emu);
+int snd_emu10k1_pcm_multi(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm);
+int snd_emu10k1_fx8010_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm);
+int snd_emu10k1_mixer(struct snd_emu10k1 * emu, int pcm_device, int multi_device);
+int snd_emu10k1_timer(struct snd_emu10k1 * emu, int device);
+int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep ** rhwdep);
 
 irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
 /* initialization */
-void snd_emu10k1_voice_init(emu10k1_t * emu, int voice);
-int snd_emu10k1_init_efx(emu10k1_t *emu);
-void snd_emu10k1_free_efx(emu10k1_t *emu);
-int snd_emu10k1_fx8010_tram_setup(emu10k1_t *emu, u32 size);
+void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int voice);
+int snd_emu10k1_init_efx(struct snd_emu10k1 *emu);
+void snd_emu10k1_free_efx(struct snd_emu10k1 *emu);
+int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size);
 
 /* I/O functions */
-unsigned int snd_emu10k1_ptr_read(emu10k1_t * emu, unsigned int reg, unsigned int chn);
-void snd_emu10k1_ptr_write(emu10k1_t *emu, unsigned int reg, unsigned int chn, unsigned int data);
-unsigned int snd_emu10k1_ptr20_read(emu10k1_t * emu, unsigned int reg, unsigned int chn);
-void snd_emu10k1_ptr20_write(emu10k1_t *emu, unsigned int reg, unsigned int chn, unsigned int data);
-unsigned int snd_emu10k1_efx_read(emu10k1_t *emu, unsigned int pc);
-void snd_emu10k1_intr_enable(emu10k1_t *emu, unsigned int intrenb);
-void snd_emu10k1_intr_disable(emu10k1_t *emu, unsigned int intrenb);
-void snd_emu10k1_voice_intr_enable(emu10k1_t *emu, unsigned int voicenum);
-void snd_emu10k1_voice_intr_disable(emu10k1_t *emu, unsigned int voicenum);
-void snd_emu10k1_voice_intr_ack(emu10k1_t *emu, unsigned int voicenum);
-void snd_emu10k1_voice_half_loop_intr_enable(emu10k1_t *emu, unsigned int voicenum);
-void snd_emu10k1_voice_half_loop_intr_disable(emu10k1_t *emu, unsigned int voicenum);
-void snd_emu10k1_voice_half_loop_intr_ack(emu10k1_t *emu, unsigned int voicenum);
-void snd_emu10k1_voice_set_loop_stop(emu10k1_t *emu, unsigned int voicenum);
-void snd_emu10k1_voice_clear_loop_stop(emu10k1_t *emu, unsigned int voicenum);
-void snd_emu10k1_wait(emu10k1_t *emu, unsigned int wait);
-static inline unsigned int snd_emu10k1_wc(emu10k1_t *emu) { return (inl(emu->port + WC) >> 6) & 0xfffff; }
-unsigned short snd_emu10k1_ac97_read(ac97_t *ac97, unsigned short reg);
-void snd_emu10k1_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short data);
+unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn);
+void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data);
+unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn);
+void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data);
+unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc);
+void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb);
+void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb);
+void snd_emu10k1_voice_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum);
+void snd_emu10k1_voice_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum);
+void snd_emu10k1_voice_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum);
+void snd_emu10k1_voice_half_loop_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum);
+void snd_emu10k1_voice_half_loop_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum);
+void snd_emu10k1_voice_half_loop_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum);
+void snd_emu10k1_voice_set_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum);
+void snd_emu10k1_voice_clear_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum);
+void snd_emu10k1_wait(struct snd_emu10k1 *emu, unsigned int wait);
+static inline unsigned int snd_emu10k1_wc(struct snd_emu10k1 *emu) { return (inl(emu->port + WC) >> 6) & 0xfffff; }
+unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg);
+void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data);
 unsigned int snd_emu10k1_rate_to_pitch(unsigned int rate);
 
 /* memory allocation */
-snd_util_memblk_t *snd_emu10k1_alloc_pages(emu10k1_t *emu, snd_pcm_substream_t *substream);
-int snd_emu10k1_free_pages(emu10k1_t *emu, snd_util_memblk_t *blk);
-snd_util_memblk_t *snd_emu10k1_synth_alloc(emu10k1_t *emu, unsigned int size);
-int snd_emu10k1_synth_free(emu10k1_t *emu, snd_util_memblk_t *blk);
-int snd_emu10k1_synth_bzero(emu10k1_t *emu, snd_util_memblk_t *blk, int offset, int size);
-int snd_emu10k1_synth_copy_from_user(emu10k1_t *emu, snd_util_memblk_t *blk, int offset, const char __user *data, int size);
-int snd_emu10k1_memblk_map(emu10k1_t *emu, emu10k1_memblk_t *blk);
+struct snd_util_memblk *snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substream);
+int snd_emu10k1_free_pages(struct snd_emu10k1 *emu, struct snd_util_memblk *blk);
+struct snd_util_memblk *snd_emu10k1_synth_alloc(struct snd_emu10k1 *emu, unsigned int size);
+int snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *blk);
+int snd_emu10k1_synth_bzero(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, int size);
+int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, const char __user *data, int size);
+int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk);
 
 /* voice allocation */
-int snd_emu10k1_voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int pair, emu10k1_voice_t **rvoice);
-int snd_emu10k1_voice_free(emu10k1_t *emu, emu10k1_voice_t *pvoice);
+int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int pair, struct snd_emu10k1_voice **rvoice);
+int snd_emu10k1_voice_free(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *pvoice);
 
 /* MIDI uart */
-int snd_emu10k1_midi(emu10k1_t * emu);
-int snd_emu10k1_audigy_midi(emu10k1_t * emu);
+int snd_emu10k1_midi(struct snd_emu10k1 * emu);
+int snd_emu10k1_audigy_midi(struct snd_emu10k1 * emu);
 
 /* proc interface */
-int snd_emu10k1_proc_init(emu10k1_t * emu);
+int snd_emu10k1_proc_init(struct snd_emu10k1 * emu);
 
 /* fx8010 irq handler */
-int snd_emu10k1_fx8010_register_irq_handler(emu10k1_t *emu,
+int snd_emu10k1_fx8010_register_irq_handler(struct snd_emu10k1 *emu,
 					    snd_fx8010_irq_handler_t *handler,
 					    unsigned char gpr_running,
 					    void *private_data,
-					    snd_emu10k1_fx8010_irq_t **r_irq);
-int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu,
-					      snd_emu10k1_fx8010_irq_t *irq);
+					    struct snd_emu10k1_fx8010_irq **r_irq);
+int snd_emu10k1_fx8010_unregister_irq_handler(struct snd_emu10k1 *emu,
+					      struct snd_emu10k1_fx8010_irq *irq);
 
 #endif /* __KERNEL__ */
 
@@ -1469,14 +1468,14 @@ int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu,
 #define TANKMEMADDRREG_READ	 0x00100000	/* Read from tank memory			*/
 #endif
 
-typedef struct {
+struct snd_emu10k1_fx8010_info {
 	unsigned int internal_tram_size;	/* in samples */
 	unsigned int external_tram_size;	/* in samples */
 	char fxbus_names[16][32];		/* names of FXBUSes */
 	char extin_names[16][32];		/* names of external inputs */
 	char extout_names[32][32];		/* names of external outputs */
 	unsigned int gpr_controls;		/* count of GPR controls */
-} emu10k1_fx8010_info_t;
+};
 
 #define EMU10K1_GPR_TRANSLATION_NONE		0
 #define EMU10K1_GPR_TRANSLATION_TABLE100	1
@@ -1484,8 +1483,8 @@ typedef struct {
 #define EMU10K1_GPR_TRANSLATION_TREBLE		3
 #define EMU10K1_GPR_TRANSLATION_ONOFF		4
 
-typedef struct {
-	snd_ctl_elem_id_t id;		/* full control ID definition */
+struct snd_emu10k1_fx8010_control_gpr {
+	struct snd_ctl_elem_id id;		/* full control ID definition */
 	unsigned int vcount;		/* visible count */
 	unsigned int count;		/* count of GPR (1..16) */
 	unsigned short gpr[32];		/* GPR number(s) */
@@ -1493,23 +1492,23 @@ typedef struct {
 	unsigned int min;		/* minimum range */
 	unsigned int max;		/* maximum range */
 	unsigned int translation;	/* translation type (EMU10K1_GPR_TRANSLATION*) */
-} emu10k1_fx8010_control_gpr_t;
+};
 
-typedef struct {
+struct snd_emu10k1_fx8010_code {
 	char name[128];
 
 	DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */
 	u_int32_t __user *gpr_map;	  /* initializers */
 
 	unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */
-	emu10k1_fx8010_control_gpr_t __user *gpr_add_controls; /* GPR controls to add/replace */
+	struct snd_emu10k1_fx8010_control_gpr __user *gpr_add_controls; /* GPR controls to add/replace */
 
 	unsigned int gpr_del_control_count; /* count of GPR controls to remove */
-	snd_ctl_elem_id_t __user *gpr_del_controls; /* IDs of GPR controls to remove */
+	struct snd_ctl_elem_id __user *gpr_del_controls; /* IDs of GPR controls to remove */
 
 	unsigned int gpr_list_control_count; /* count of GPR controls to list */
 	unsigned int gpr_list_control_total; /* total count of GPR controls */
-	emu10k1_fx8010_control_gpr_t __user *gpr_list_controls; /* listed GPR controls */
+	struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */
 
 	DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */
 	u_int32_t __user *tram_data_map;  /* data initializers */
@@ -1517,16 +1516,16 @@ typedef struct {
 
 	DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */
 	u_int32_t __user *code;		  /* one instruction - 64 bits */
-} emu10k1_fx8010_code_t;
+};
 
-typedef struct {
+struct snd_emu10k1_fx8010_tram {
 	unsigned int address;		/* 31.bit == 1 -> external TRAM */
 	unsigned int size;		/* size in samples (4 bytes) */
 	unsigned int *samples;		/* pointer to samples (20-bit) */
 					/* NULL->clear memory */
-} emu10k1_fx8010_tram_t;
+};
 
-typedef struct {
+struct snd_emu10k1_fx8010_pcm_rec {
 	unsigned int substream;		/* substream number */
 	unsigned int res1;		/* reserved */
 	unsigned int channels;		/* 16-bit channels count, zero = remove this substream */
@@ -1541,20 +1540,27 @@ typedef struct {
 	unsigned char pad;		/* reserved */
 	unsigned char etram[32];	/* external TRAM address & data (one per channel) */
 	unsigned int res2;		/* reserved */
-} emu10k1_fx8010_pcm_t;
+};
 
-#define SNDRV_EMU10K1_IOCTL_INFO	_IOR ('H', 0x10, emu10k1_fx8010_info_t)
-#define SNDRV_EMU10K1_IOCTL_CODE_POKE	_IOW ('H', 0x11, emu10k1_fx8010_code_t)
-#define SNDRV_EMU10K1_IOCTL_CODE_PEEK	_IOWR('H', 0x12, emu10k1_fx8010_code_t)
+#define SNDRV_EMU10K1_IOCTL_INFO	_IOR ('H', 0x10, struct snd_emu10k1_fx8010_info)
+#define SNDRV_EMU10K1_IOCTL_CODE_POKE	_IOW ('H', 0x11, struct snd_emu10k1_fx8010_code)
+#define SNDRV_EMU10K1_IOCTL_CODE_PEEK	_IOWR('H', 0x12, struct snd_emu10k1_fx8010_code)
 #define SNDRV_EMU10K1_IOCTL_TRAM_SETUP	_IOW ('H', 0x20, int)
-#define SNDRV_EMU10K1_IOCTL_TRAM_POKE	_IOW ('H', 0x21, emu10k1_fx8010_tram_t)
-#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK	_IOWR('H', 0x22, emu10k1_fx8010_tram_t)
-#define SNDRV_EMU10K1_IOCTL_PCM_POKE	_IOW ('H', 0x30, emu10k1_fx8010_pcm_t)
-#define SNDRV_EMU10K1_IOCTL_PCM_PEEK	_IOWR('H', 0x31, emu10k1_fx8010_pcm_t)
+#define SNDRV_EMU10K1_IOCTL_TRAM_POKE	_IOW ('H', 0x21, struct snd_emu10k1_fx8010_tram)
+#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK	_IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram)
+#define SNDRV_EMU10K1_IOCTL_PCM_POKE	_IOW ('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec)
+#define SNDRV_EMU10K1_IOCTL_PCM_PEEK	_IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec)
 #define SNDRV_EMU10K1_IOCTL_STOP	_IO  ('H', 0x80)
 #define SNDRV_EMU10K1_IOCTL_CONTINUE	_IO  ('H', 0x81)
 #define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82)
 #define SNDRV_EMU10K1_IOCTL_SINGLE_STEP	_IOW ('H', 0x83, int)
 #define SNDRV_EMU10K1_IOCTL_DBG_READ	_IOR ('H', 0x84, int)
 
+/* typedefs for compatibility to user-space */
+typedef struct snd_emu10k1_fx8010_info emu10k1_fx8010_info_t;
+typedef struct snd_emu10k1_fx8010_control_gpr emu10k1_fx8010_control_gpr_t;
+typedef struct snd_emu10k1_fx8010_code emu10k1_fx8010_code_t;
+typedef struct snd_emu10k1_fx8010_tram emu10k1_fx8010_tram_t;
+typedef struct snd_emu10k1_fx8010_pcm_rec emu10k1_fx8010_pcm_t;
+
 #endif	/* __SOUND_EMU10K1_H */
diff --git a/include/sound/emu10k1_synth.h b/include/sound/emu10k1_synth.h
index df0df1d0955..6ef61c42093 100644
--- a/include/sound/emu10k1_synth.h
+++ b/include/sound/emu10k1_synth.h
@@ -27,12 +27,12 @@
 #define SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH	"emu10k1-synth"
 
 /* argument for snd_seq_device_new */
-typedef struct snd_emu10k1_synth_arg {
-	emu10k1_t *hwptr;	/* chip */
+struct snd_emu10k1_synth_arg {
+	struct snd_emu10k1 *hwptr;	/* chip */
 	int index;		/* sequencer client index */
 	int seq_ports;		/* number of sequencer ports to be created */
 	int max_voices;		/* maximum number of voices for wavetable */
-} snd_emu10k1_synth_arg_t;
+};
 
 #define EMU10K1_MAX_MEMSIZE	(32 * 1024 * 1024) /* 32MB */
 
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c
index 78270f8710f..9be90022477 100644
--- a/sound/pci/emu10k1/emu10k1.c
+++ b/sound/pci/emu10k1/emu10k1.c
@@ -101,10 +101,10 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci,
 					    const struct pci_device_id *pci_id)
 {
 	static int dev;
-	snd_card_t *card;
-	emu10k1_t *emu;
+	struct snd_card *card;
+	struct snd_emu10k1 *emu;
 #ifdef ENABLE_SYNTH
-	snd_seq_device_t *wave = NULL;
+	struct snd_seq_device *wave = NULL;
 #endif
 	int err;
 
@@ -186,11 +186,11 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci,
 	}
 #ifdef ENABLE_SYNTH
 	if (snd_seq_device_new(card, 1, SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH,
-			       sizeof(snd_emu10k1_synth_arg_t), &wave) < 0 ||
+			       sizeof(struct snd_emu10k1_synth_arg), &wave) < 0 ||
 	    wave == NULL) {
 		snd_printk(KERN_WARNING "can't initialize Emu10k1 wavetable synth\n");
 	} else {
-		snd_emu10k1_synth_arg_t *arg;
+		struct snd_emu10k1_synth_arg *arg;
 		arg = SNDRV_SEQ_DEVICE_ARGPTR(wave);
 		strcpy(wave->name, "Emu-10k1 Synth");
 		arg->hwptr = emu;
diff --git a/sound/pci/emu10k1/emu10k1_callback.c b/sound/pci/emu10k1/emu10k1_callback.c
index 6589bf24abc..01965bd9996 100644
--- a/sound/pci/emu10k1/emu10k1_callback.c
+++ b/sound/pci/emu10k1/emu10k1_callback.c
@@ -27,26 +27,28 @@ enum {
 };
 
 /* Keeps track of what we are finding */
-typedef struct best_voice {
+struct best_voice {
 	unsigned int time;
 	int voice;
-} best_voice_t;
+};
 
 /*
  * prototypes
  */
-static void lookup_voices(snd_emux_t *emu, emu10k1_t *hw, best_voice_t *best, int active_only);
-static snd_emux_voice_t *get_voice(snd_emux_t *emu, snd_emux_port_t *port);
-static int start_voice(snd_emux_voice_t *vp);
-static void trigger_voice(snd_emux_voice_t *vp);
-static void release_voice(snd_emux_voice_t *vp);
-static void update_voice(snd_emux_voice_t *vp, int update);
-static void terminate_voice(snd_emux_voice_t *vp);
-static void free_voice(snd_emux_voice_t *vp);
-
-static void set_fmmod(emu10k1_t *hw, snd_emux_voice_t *vp);
-static void set_fm2frq2(emu10k1_t *hw, snd_emux_voice_t *vp);
-static void set_filterQ(emu10k1_t *hw, snd_emux_voice_t *vp);
+static void lookup_voices(struct snd_emux *emu, struct snd_emu10k1 *hw,
+			  struct best_voice *best, int active_only);
+static struct snd_emux_voice *get_voice(struct snd_emux *emu,
+					struct snd_emux_port *port);
+static int start_voice(struct snd_emux_voice *vp);
+static void trigger_voice(struct snd_emux_voice *vp);
+static void release_voice(struct snd_emux_voice *vp);
+static void update_voice(struct snd_emux_voice *vp, int update);
+static void terminate_voice(struct snd_emux_voice *vp);
+static void free_voice(struct snd_emux_voice *vp);
+
+static void set_fmmod(struct snd_emu10k1 *hw, struct snd_emux_voice *vp);
+static void set_fm2frq2(struct snd_emu10k1 *hw, struct snd_emux_voice *vp);
+static void set_filterQ(struct snd_emu10k1 *hw, struct snd_emux_voice *vp);
 
 /*
  * Ensure a value is between two points
@@ -59,7 +61,7 @@ static void set_filterQ(emu10k1_t *hw, snd_emux_voice_t *vp);
 /*
  * set up operators
  */
-static snd_emux_operators_t emu10k1_ops = {
+static struct snd_emux_operators emu10k1_ops = {
 	.owner =	THIS_MODULE,
 	.get_voice =	get_voice,
 	.prepare =	start_voice,
@@ -73,7 +75,7 @@ static snd_emux_operators_t emu10k1_ops = {
 };
 
 void
-snd_emu10k1_ops_setup(snd_emux_t *emu)
+snd_emu10k1_ops_setup(struct snd_emux *emu)
 {
 	emu->ops = emu10k1_ops;
 }
@@ -85,11 +87,11 @@ snd_emu10k1_ops_setup(snd_emux_t *emu)
  * terminate most inactive voice and give it as a pcm voice.
  */
 int
-snd_emu10k1_synth_get_voice(emu10k1_t *hw)
+snd_emu10k1_synth_get_voice(struct snd_emu10k1 *hw)
 {
-	snd_emux_t *emu;
-	snd_emux_voice_t *vp;
-	best_voice_t best[V_END];
+	struct snd_emux *emu;
+	struct snd_emux_voice *vp;
+	struct best_voice best[V_END];
 	unsigned long flags;
 	int i;
 
@@ -123,10 +125,10 @@ snd_emu10k1_synth_get_voice(emu10k1_t *hw)
  * turn off the voice (not terminated)
  */
 static void
-release_voice(snd_emux_voice_t *vp)
+release_voice(struct snd_emux_voice *vp)
 {
 	int dcysusv;
-	emu10k1_t *hw;
+	struct snd_emu10k1 *hw;
 	
 	hw = vp->hw;
 	dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease;
@@ -140,16 +142,16 @@ release_voice(snd_emux_voice_t *vp)
  * terminate the voice
  */
 static void
-terminate_voice(snd_emux_voice_t *vp)
+terminate_voice(struct snd_emux_voice *vp)
 {
-	emu10k1_t *hw;
+	struct snd_emu10k1 *hw;
 	
 	snd_assert(vp, return);
 	hw = vp->hw;
 	snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0x807f | DCYSUSV_CHANNELENABLE_MASK);
 	if (vp->block) {
-		emu10k1_memblk_t *emem;
-		emem = (emu10k1_memblk_t *)vp->block;
+		struct snd_emu10k1_memblk *emem;
+		emem = (struct snd_emu10k1_memblk *)vp->block;
 		if (emem->map_locked > 0)
 			emem->map_locked--;
 	}
@@ -159,9 +161,9 @@ terminate_voice(snd_emux_voice_t *vp)
  * release the voice to system
  */
 static void
-free_voice(snd_emux_voice_t *vp)
+free_voice(struct snd_emux_voice *vp)
 {
-	emu10k1_t *hw;
+	struct snd_emu10k1 *hw;
 	
 	hw = vp->hw;
 	if (vp->ch >= 0) {
@@ -181,9 +183,9 @@ free_voice(snd_emux_voice_t *vp)
  * update registers
  */
 static void
-update_voice(snd_emux_voice_t *vp, int update)
+update_voice(struct snd_emux_voice *vp, int update)
 {
-	emu10k1_t *hw;
+	struct snd_emu10k1 *hw;
 	
 	hw = vp->hw;
 	if (update & SNDRV_EMUX_UPDATE_VOLUME)
@@ -210,10 +212,11 @@ update_voice(snd_emux_voice_t *vp, int update)
  */
 /* spinlock held! */
 static void
-lookup_voices(snd_emux_t *emu, emu10k1_t *hw, best_voice_t *best, int active_only)
+lookup_voices(struct snd_emux *emu, struct snd_emu10k1 *hw,
+	      struct best_voice *best, int active_only)
 {
-	snd_emux_voice_t *vp;
-	best_voice_t *bp;
+	struct snd_emux_voice *vp;
+	struct best_voice *bp;
 	int  i;
 
 	for (i = 0; i < V_END; i++) {
@@ -274,12 +277,12 @@ lookup_voices(snd_emux_t *emu, emu10k1_t *hw, best_voice_t *best, int active_onl
  *
  * emu->voice_lock is already held.
  */
-static snd_emux_voice_t *
-get_voice(snd_emux_t *emu, snd_emux_port_t *port)
+static struct snd_emux_voice *
+get_voice(struct snd_emux *emu, struct snd_emux_port *port)
 {
-	emu10k1_t *hw;
-	snd_emux_voice_t *vp;
-	best_voice_t best[V_END];
+	struct snd_emu10k1 *hw;
+	struct snd_emux_voice *vp;
+	struct best_voice best[V_END];
 	int i;
 
 	hw = emu->hw;
@@ -290,7 +293,7 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port)
 			vp = &emu->voices[best[i].voice];
 			if (vp->ch < 0) {
 				/* allocate a voice */
-				emu10k1_voice_t *hwvoice;
+				struct snd_emu10k1_voice *hwvoice;
 				if (snd_emu10k1_voice_alloc(hw, EMU10K1_SYNTH, 1, &hwvoice) < 0 || hwvoice == NULL)
 					continue;
 				vp->ch = hwvoice->number;
@@ -308,21 +311,21 @@ get_voice(snd_emux_t *emu, snd_emux_port_t *port)
  * prepare envelopes and LFOs
  */
 static int
-start_voice(snd_emux_voice_t *vp)
+start_voice(struct snd_emux_voice *vp)
 {
 	unsigned int temp;
 	int ch;
 	unsigned int addr, mapped_offset;
-	snd_midi_channel_t *chan;
-	emu10k1_t *hw;
-	emu10k1_memblk_t *emem;
+	struct snd_midi_channel *chan;
+	struct snd_emu10k1 *hw;
+	struct snd_emu10k1_memblk *emem;
 	
 	hw = vp->hw;
 	ch = vp->ch;
 	snd_assert(ch >= 0, return -EINVAL);
 	chan = vp->chan;
 
-	emem = (emu10k1_memblk_t *)vp->block;
+	emem = (struct snd_emu10k1_memblk *)vp->block;
 	if (emem == NULL)
 		return -EINVAL;
 	emem->map_locked++;
@@ -463,15 +466,15 @@ start_voice(snd_emux_voice_t *vp)
  * Start envelope
  */
 static void
-trigger_voice(snd_emux_voice_t *vp)
+trigger_voice(struct snd_emux_voice *vp)
 {
 	unsigned int temp, ptarget;
-	emu10k1_t *hw;
-	emu10k1_memblk_t *emem;
+	struct snd_emu10k1 *hw;
+	struct snd_emu10k1_memblk *emem;
 	
 	hw = vp->hw;
 
-	emem = (emu10k1_memblk_t *)vp->block;
+	emem = (struct snd_emu10k1_memblk *)vp->block;
 	if (! emem || emem->mapped_page < 0)
 		return; /* not mapped */
 
@@ -495,7 +498,7 @@ trigger_voice(snd_emux_voice_t *vp)
 
 /* set lfo1 modulation height and cutoff */
 static void
-set_fmmod(emu10k1_t *hw, snd_emux_voice_t *vp)
+set_fmmod(struct snd_emu10k1 *hw, struct snd_emux_voice *vp)
 {
 	unsigned short fmmod;
 	short pitch;
@@ -513,7 +516,7 @@ set_fmmod(emu10k1_t *hw, snd_emux_voice_t *vp)
 
 /* set lfo2 pitch & frequency */
 static void
-set_fm2frq2(emu10k1_t *hw, snd_emux_voice_t *vp)
+set_fm2frq2(struct snd_emu10k1 *hw, struct snd_emux_voice *vp)
 {
 	unsigned short fm2frq2;
 	short pitch;
@@ -531,7 +534,7 @@ set_fm2frq2(emu10k1_t *hw, snd_emux_voice_t *vp)
 
 /* set filterQ */
 static void
-set_filterQ(emu10k1_t *hw, snd_emux_voice_t *vp)
+set_filterQ(struct snd_emu10k1 *hw, struct snd_emux_voice *vp)
 {
 	unsigned int val;
 	val = snd_emu10k1_ptr_read(hw, CCCA, vp->ch) & ~CCCA_RESONANCE;
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index 2d1ebe8c6b4..f9855073a0a 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -52,7 +52,7 @@ MODULE_LICENSE("GPL");
  * EMU10K1 init / done
  *************************************************************************/
 
-void snd_emu10k1_voice_init(emu10k1_t * emu, int ch)
+void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int ch)
 {
 	snd_emu10k1_ptr_write(emu, DCYSUSV, ch, 0);
 	snd_emu10k1_ptr_write(emu, IP, ch, 0);
@@ -97,7 +97,7 @@ void snd_emu10k1_voice_init(emu10k1_t * emu, int ch)
 	}
 }
 
-static int __devinit snd_emu10k1_init(emu10k1_t * emu, int enable_ir)
+static int __devinit snd_emu10k1_init(struct snd_emu10k1 * emu, int enable_ir)
 {
 	int ch, idx, err;
 	unsigned int silent_page;
@@ -336,14 +336,14 @@ static int __devinit snd_emu10k1_init(emu10k1_t * emu, int enable_ir)
 
 	snd_emu10k1_intr_enable(emu, INTE_PCIERRORENABLE);
 
-	emu->reserved_page = (emu10k1_memblk_t *)snd_emu10k1_synth_alloc(emu, 4096);
+	emu->reserved_page = (struct snd_emu10k1_memblk *)snd_emu10k1_synth_alloc(emu, 4096);
 	if (emu->reserved_page)
 		emu->reserved_page->map_locked = 1;
 	
 	return 0;
 }
 
-static int snd_emu10k1_done(emu10k1_t * emu)
+static int snd_emu10k1_done(struct snd_emu10k1 * emu)
 {
 	int ch;
 
@@ -384,7 +384,7 @@ static int snd_emu10k1_done(emu10k1_t * emu)
 
 	/* remove reserved page */
 	if (emu->reserved_page != NULL) {
-		snd_emu10k1_synth_free(emu, (snd_util_memblk_t *)emu->reserved_page);
+		snd_emu10k1_synth_free(emu, (struct snd_util_memblk *)emu->reserved_page);
 		emu->reserved_page = NULL;
 	}
 
@@ -474,7 +474,7 @@ static int snd_emu10k1_done(emu10k1_t * emu)
  *  register.
  */
 
-static void snd_emu10k1_ecard_write(emu10k1_t * emu, unsigned int value)
+static void snd_emu10k1_ecard_write(struct snd_emu10k1 * emu, unsigned int value)
 {
 	unsigned short count;
 	unsigned int data;
@@ -512,7 +512,7 @@ static void snd_emu10k1_ecard_write(emu10k1_t * emu, unsigned int value)
  * channel.
  */
 
-static void snd_emu10k1_ecard_setadcgain(emu10k1_t * emu,
+static void snd_emu10k1_ecard_setadcgain(struct snd_emu10k1 * emu,
 					 unsigned short gain)
 {
 	unsigned int bit;
@@ -540,7 +540,7 @@ static void snd_emu10k1_ecard_setadcgain(emu10k1_t * emu,
 	snd_emu10k1_ecard_write(emu, emu->ecard_ctrl);
 }
 
-static int __devinit snd_emu10k1_ecard_init(emu10k1_t * emu)
+static int __devinit snd_emu10k1_ecard_init(struct snd_emu10k1 * emu)
 {
 	unsigned int hc_value;
 
@@ -580,7 +580,7 @@ static int __devinit snd_emu10k1_ecard_init(emu10k1_t * emu)
 	return 0;
 }
 
-static int __devinit snd_emu10k1_cardbus_init(emu10k1_t * emu)
+static int __devinit snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu)
 {
 	unsigned long special_port;
 	unsigned int value;
@@ -609,7 +609,7 @@ static int __devinit snd_emu10k1_cardbus_init(emu10k1_t * emu)
  *  Create the EMU10K1 instance
  */
 
-static int snd_emu10k1_free(emu10k1_t *emu)
+static int snd_emu10k1_free(struct snd_emu10k1 *emu)
 {
 	if (emu->port) {	/* avoid access to already used hardware */
 	       	snd_emu10k1_fx8010_tram_setup(emu, 0);
@@ -634,13 +634,13 @@ static int snd_emu10k1_free(emu10k1_t *emu)
 	return 0;
 }
 
-static int snd_emu10k1_dev_free(snd_device_t *device)
+static int snd_emu10k1_dev_free(struct snd_device *device)
 {
-	emu10k1_t *emu = device->device_data;
+	struct snd_emu10k1 *emu = device->device_data;
 	return snd_emu10k1_free(emu);
 }
 
-static emu_chip_details_t emu_chip_details[] = {
+static struct snd_emu_chip_details emu_chip_details[] = {
 	/* Audigy 2 Value AC3 out does not work yet. Need to find out how to turn off interpolators.*/
 	/* Tested by James@superbug.co.uk 3rd July 2005 */
 	{.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10011102,
@@ -890,21 +890,21 @@ static emu_chip_details_t emu_chip_details[] = {
 	{ } /* terminator */
 };
 
-int __devinit snd_emu10k1_create(snd_card_t * card,
+int __devinit snd_emu10k1_create(struct snd_card *card,
 		       struct pci_dev * pci,
 		       unsigned short extin_mask,
 		       unsigned short extout_mask,
 		       long max_cache_bytes,
 		       int enable_ir,
 		       uint subsystem,
-		       emu10k1_t ** remu)
+		       struct snd_emu10k1 ** remu)
 {
-	emu10k1_t *emu;
+	struct snd_emu10k1 *emu;
 	int err;
 	int is_audigy;
 	unsigned char revision;
-	const emu_chip_details_t *c;
-	static snd_device_ops_t ops = {
+	const struct snd_emu_chip_details *c;
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_emu10k1_dev_free,
 	};
 	
@@ -1041,7 +1041,8 @@ int __devinit snd_emu10k1_create(snd_card_t * card,
 		snd_emu10k1_free(emu);
 		return -ENOMEM;
 	}
-	emu->memhdr->block_extra_size = sizeof(emu10k1_memblk_t) - sizeof(snd_util_memblk_t);
+	emu->memhdr->block_extra_size = sizeof(struct snd_emu10k1_memblk) -
+		sizeof(struct snd_util_memblk);
 
 	pci_set_master(pci);
 
diff --git a/sound/pci/emu10k1/emu10k1_patch.c b/sound/pci/emu10k1/emu10k1_patch.c
index 4df668eb32b..42bae6f7e9a 100644
--- a/sound/pci/emu10k1/emu10k1_patch.c
+++ b/sound/pci/emu10k1/emu10k1_patch.c
@@ -35,14 +35,15 @@
  * allocate a sample block and copy data from userspace
  */
 int
-snd_emu10k1_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp,
-		       snd_util_memhdr_t *hdr, const void __user *data, long count)
+snd_emu10k1_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,
+		       struct snd_util_memhdr *hdr,
+		       const void __user *data, long count)
 {
 	int offset;
 	int truesize, size, loopsize, blocksize;
 	int loopend, sampleend;
 	unsigned int start_addr;
-	emu10k1_t *emu;
+	struct snd_emu10k1 *emu;
 
 	emu = rec->hw;
 	snd_assert(sp != NULL, return -EINVAL);
@@ -205,10 +206,10 @@ snd_emu10k1_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp,
  * free a sample block
  */
 int
-snd_emu10k1_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp,
-			snd_util_memhdr_t *hdr)
+snd_emu10k1_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp,
+			struct snd_util_memhdr *hdr)
 {
-	emu10k1_t *emu;
+	struct snd_emu10k1 *emu;
 
 	emu = rec->hw;
 	snd_assert(sp != NULL, return -EINVAL);
diff --git a/sound/pci/emu10k1/emu10k1_synth.c b/sound/pci/emu10k1/emu10k1_synth.c
index 8bd58d1dcc2..1fa393f22a9 100644
--- a/sound/pci/emu10k1/emu10k1_synth.c
+++ b/sound/pci/emu10k1/emu10k1_synth.c
@@ -28,11 +28,11 @@ MODULE_LICENSE("GPL");
 /*
  * create a new hardware dependent device for Emu10k1
  */
-static int snd_emu10k1_synth_new_device(snd_seq_device_t *dev)
+static int snd_emu10k1_synth_new_device(struct snd_seq_device *dev)
 {
-	snd_emux_t *emu;
-	emu10k1_t *hw;
-	snd_emu10k1_synth_arg_t *arg;
+	struct snd_emux *emu;
+	struct snd_emu10k1 *hw;
+	struct snd_emu10k1_synth_arg *arg;
 	unsigned long flags;
 
 	arg = SNDRV_SEQ_DEVICE_ARGPTR(dev);
@@ -76,10 +76,10 @@ static int snd_emu10k1_synth_new_device(snd_seq_device_t *dev)
 	return 0;
 }
 
-static int snd_emu10k1_synth_delete_device(snd_seq_device_t *dev)
+static int snd_emu10k1_synth_delete_device(struct snd_seq_device *dev)
 {
-	snd_emux_t *emu;
-	emu10k1_t *hw;
+	struct snd_emux *emu;
+	struct snd_emu10k1 *hw;
 	unsigned long flags;
 
 	if (dev->driver_data == NULL)
@@ -104,11 +104,12 @@ static int snd_emu10k1_synth_delete_device(snd_seq_device_t *dev)
 static int __init alsa_emu10k1_synth_init(void)
 {
 	
-	static snd_seq_dev_ops_t ops = {
+	static struct snd_seq_dev_ops ops = {
 		snd_emu10k1_synth_new_device,
 		snd_emu10k1_synth_delete_device,
 	};
-	return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, &ops, sizeof(snd_emu10k1_synth_arg_t));
+	return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, &ops,
+					      sizeof(struct snd_emu10k1_synth_arg));
 }
 
 static void __exit alsa_emu10k1_synth_exit(void)
diff --git a/sound/pci/emu10k1/emu10k1_synth_local.h b/sound/pci/emu10k1/emu10k1_synth_local.h
index 7f50b01ddb7..308ddc84bb4 100644
--- a/sound/pci/emu10k1/emu10k1_synth_local.h
+++ b/sound/pci/emu10k1/emu10k1_synth_local.h
@@ -26,13 +26,18 @@
 #include <sound/emu10k1_synth.h>
 
 /* emu10k1_patch.c */
-int snd_emu10k1_sample_new(snd_emux_t *private_data, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void __user *_data, long count);
-int snd_emu10k1_sample_free(snd_emux_t *private_data, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr);
-int snd_emu10k1_memhdr_init(snd_emux_t *emu);
+int snd_emu10k1_sample_new(struct snd_emux *private_data,
+			   struct snd_sf_sample *sp,
+			   struct snd_util_memhdr *hdr,
+			   const void __user *_data, long count);
+int snd_emu10k1_sample_free(struct snd_emux *private_data,
+			    struct snd_sf_sample *sp,
+			    struct snd_util_memhdr *hdr);
+int snd_emu10k1_memhdr_init(struct snd_emux *emu);
 
 /* emu10k1_callback.c */
-void snd_emu10k1_ops_setup(snd_emux_t *emu);
-int snd_emu10k1_synth_get_voice(emu10k1_t *hw);
+void snd_emu10k1_ops_setup(struct snd_emux *emu);
+int snd_emu10k1_synth_get_voice(struct snd_emu10k1 *hw);
 
 
 #endif	/* __EMU10K1_SYNTH_LOCAL_H */
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index 03e8c167895..f4452c5cb4c 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -309,9 +309,10 @@ static inline void snd_leave_user(mm_segment_t fs)
  *   controls
  */
 
-static int snd_emu10k1_gpr_ctl_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_gpr_ctl_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
-	snd_emu10k1_fx8010_ctl_t *ctl = (snd_emu10k1_fx8010_ctl_t *)kcontrol->private_value;
+	struct snd_emu10k1_fx8010_ctl *ctl =
+		(struct snd_emu10k1_fx8010_ctl *) kcontrol->private_value;
 
 	if (ctl->min == 0 && ctl->max == 1)
 		uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
@@ -323,10 +324,11 @@ static int snd_emu10k1_gpr_ctl_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
 	return 0;
 }
 
-static int snd_emu10k1_gpr_ctl_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_gpr_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
-	snd_emu10k1_fx8010_ctl_t *ctl = (snd_emu10k1_fx8010_ctl_t *)kcontrol->private_value;
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1_fx8010_ctl *ctl =
+		(struct snd_emu10k1_fx8010_ctl *) kcontrol->private_value;
 	unsigned long flags;
 	unsigned int i;
 	
@@ -337,10 +339,11 @@ static int snd_emu10k1_gpr_ctl_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
 	return 0;
 }
 
-static int snd_emu10k1_gpr_ctl_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_gpr_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
-	snd_emu10k1_fx8010_ctl_t *ctl = (snd_emu10k1_fx8010_ctl_t *)kcontrol->private_value;
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1_fx8010_ctl *ctl =
+		(struct snd_emu10k1_fx8010_ctl *) kcontrol->private_value;
 	unsigned long flags;
 	unsigned int nval, val;
 	unsigned int i, j;
@@ -393,9 +396,9 @@ static int snd_emu10k1_gpr_ctl_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
  *   Interrupt handler
  */
 
-static void snd_emu10k1_fx8010_interrupt(emu10k1_t *emu)
+static void snd_emu10k1_fx8010_interrupt(struct snd_emu10k1 *emu)
 {
-	snd_emu10k1_fx8010_irq_t *irq, *nirq;
+	struct snd_emu10k1_fx8010_irq *irq, *nirq;
 
 	irq = emu->fx8010.irq_handlers;
 	while (irq) {
@@ -409,13 +412,13 @@ static void snd_emu10k1_fx8010_interrupt(emu10k1_t *emu)
 	}
 }
 
-int snd_emu10k1_fx8010_register_irq_handler(emu10k1_t *emu,
-						   snd_fx8010_irq_handler_t *handler,
-						   unsigned char gpr_running,
-						   void *private_data,
-						   snd_emu10k1_fx8010_irq_t **r_irq)
+int snd_emu10k1_fx8010_register_irq_handler(struct snd_emu10k1 *emu,
+					    snd_fx8010_irq_handler_t *handler,
+					    unsigned char gpr_running,
+					    void *private_data,
+					    struct snd_emu10k1_fx8010_irq **r_irq)
 {
-	snd_emu10k1_fx8010_irq_t *irq;
+	struct snd_emu10k1_fx8010_irq *irq;
 	unsigned long flags;
 	
 	irq = kmalloc(sizeof(*irq), GFP_ATOMIC);
@@ -440,10 +443,10 @@ int snd_emu10k1_fx8010_register_irq_handler(emu10k1_t *emu,
 	return 0;
 }
 
-int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu,
-					      snd_emu10k1_fx8010_irq_t *irq)
+int snd_emu10k1_fx8010_unregister_irq_handler(struct snd_emu10k1 *emu,
+					      struct snd_emu10k1_fx8010_irq *irq)
 {
-	snd_emu10k1_fx8010_irq_t *tmp;
+	struct snd_emu10k1_fx8010_irq *tmp;
 	unsigned long flags;
 	
 	spin_lock_irqsave(&emu->fx8010.irq_lock, flags);
@@ -468,7 +471,8 @@ int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu,
  * EMU10K1 effect manager
  *************************************************************************/
 
-static void snd_emu10k1_write_op(emu10k1_fx8010_code_t *icode, unsigned int *ptr,
+static void snd_emu10k1_write_op(struct snd_emu10k1_fx8010_code *icode,
+				 unsigned int *ptr,
 				 u32 op, u32 r, u32 a, u32 x, u32 y)
 {
 	u_int32_t *code;
@@ -483,7 +487,8 @@ static void snd_emu10k1_write_op(emu10k1_fx8010_code_t *icode, unsigned int *ptr
 #define OP(icode, ptr, op, r, a, x, y) \
 	snd_emu10k1_write_op(icode, ptr, op, r, a, x, y)
 
-static void snd_emu10k1_audigy_write_op(emu10k1_fx8010_code_t *icode, unsigned int *ptr,
+static void snd_emu10k1_audigy_write_op(struct snd_emu10k1_fx8010_code *icode,
+					unsigned int *ptr,
 					u32 op, u32 r, u32 a, u32 x, u32 y)
 {
 	u_int32_t *code;
@@ -498,19 +503,20 @@ static void snd_emu10k1_audigy_write_op(emu10k1_fx8010_code_t *icode, unsigned i
 #define A_OP(icode, ptr, op, r, a, x, y) \
 	snd_emu10k1_audigy_write_op(icode, ptr, op, r, a, x, y)
 
-static void snd_emu10k1_efx_write(emu10k1_t *emu, unsigned int pc, unsigned int data)
+static void snd_emu10k1_efx_write(struct snd_emu10k1 *emu, unsigned int pc, unsigned int data)
 {
 	pc += emu->audigy ? A_MICROCODEBASE : MICROCODEBASE;
 	snd_emu10k1_ptr_write(emu, pc, 0, data);
 }
 
-unsigned int snd_emu10k1_efx_read(emu10k1_t *emu, unsigned int pc)
+unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc)
 {
 	pc += emu->audigy ? A_MICROCODEBASE : MICROCODEBASE;
 	return snd_emu10k1_ptr_read(emu, pc, 0);
 }
 
-static int snd_emu10k1_gpr_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_gpr_poke(struct snd_emu10k1 *emu,
+				struct snd_emu10k1_fx8010_code *icode)
 {
 	int gpr;
 	u32 val;
@@ -525,7 +531,8 @@ static int snd_emu10k1_gpr_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 	return 0;
 }
 
-static int snd_emu10k1_gpr_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_gpr_peek(struct snd_emu10k1 *emu,
+				struct snd_emu10k1_fx8010_code *icode)
 {
 	int gpr;
 	u32 val;
@@ -539,7 +546,8 @@ static int snd_emu10k1_gpr_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 	return 0;
 }
 
-static int snd_emu10k1_tram_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_tram_poke(struct snd_emu10k1 *emu,
+				 struct snd_emu10k1_fx8010_code *icode)
 {
 	int tram;
 	u32 addr, val;
@@ -561,7 +569,8 @@ static int snd_emu10k1_tram_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 	return 0;
 }
 
-static int snd_emu10k1_tram_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_tram_peek(struct snd_emu10k1 *emu,
+				 struct snd_emu10k1_fx8010_code *icode)
 {
 	int tram;
 	u32 val, addr;
@@ -583,7 +592,8 @@ static int snd_emu10k1_tram_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 	return 0;
 }
 
-static int snd_emu10k1_code_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_code_poke(struct snd_emu10k1 *emu,
+				 struct snd_emu10k1_fx8010_code *icode)
 {
 	u32 pc, lo, hi;
 
@@ -599,7 +609,8 @@ static int snd_emu10k1_code_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 	return 0;
 }
 
-static int snd_emu10k1_code_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_code_peek(struct snd_emu10k1 *emu,
+				 struct snd_emu10k1_fx8010_code *icode)
 {
 	u32 pc;
 
@@ -614,10 +625,11 @@ static int snd_emu10k1_code_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 	return 0;
 }
 
-static snd_emu10k1_fx8010_ctl_t *snd_emu10k1_look_for_ctl(emu10k1_t *emu, snd_ctl_elem_id_t *id)
+static struct snd_emu10k1_fx8010_ctl *
+snd_emu10k1_look_for_ctl(struct snd_emu10k1 *emu, struct snd_ctl_elem_id *id)
 {
-	snd_emu10k1_fx8010_ctl_t *ctl;
-	snd_kcontrol_t *kcontrol;
+	struct snd_emu10k1_fx8010_ctl *ctl;
+	struct snd_kcontrol *kcontrol;
 	struct list_head *list;
 	
 	list_for_each(list, &emu->fx8010.gpr_ctl) {
@@ -631,13 +643,14 @@ static snd_emu10k1_fx8010_ctl_t *snd_emu10k1_look_for_ctl(emu10k1_t *emu, snd_ct
 	return NULL;
 }
 
-static int snd_emu10k1_verify_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_verify_controls(struct snd_emu10k1 *emu,
+				       struct snd_emu10k1_fx8010_code *icode)
 {
 	unsigned int i;
-	snd_ctl_elem_id_t __user *_id;
-	snd_ctl_elem_id_t id;
-	emu10k1_fx8010_control_gpr_t __user *_gctl;
-	emu10k1_fx8010_control_gpr_t *gctl;
+	struct snd_ctl_elem_id __user *_id;
+	struct snd_ctl_elem_id id;
+	struct snd_emu10k1_fx8010_control_gpr __user *_gctl;
+	struct snd_emu10k1_fx8010_control_gpr *gctl;
 	int err;
 	
 	for (i = 0, _id = icode->gpr_del_controls;
@@ -685,28 +698,29 @@ static int snd_emu10k1_verify_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *ic
 	return err;
 }
 
-static void snd_emu10k1_ctl_private_free(snd_kcontrol_t *kctl)
+static void snd_emu10k1_ctl_private_free(struct snd_kcontrol *kctl)
 {
-	snd_emu10k1_fx8010_ctl_t *ctl;
+	struct snd_emu10k1_fx8010_ctl *ctl;
 	
-	ctl = (snd_emu10k1_fx8010_ctl_t *)kctl->private_value;
+	ctl = (struct snd_emu10k1_fx8010_ctl *) kctl->private_value;
 	kctl->private_value = 0;
 	list_del(&ctl->list);
 	kfree(ctl);
 }
 
-static int snd_emu10k1_add_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_add_controls(struct snd_emu10k1 *emu,
+				    struct snd_emu10k1_fx8010_code *icode)
 {
 	unsigned int i, j;
-	emu10k1_fx8010_control_gpr_t __user *_gctl;
-	emu10k1_fx8010_control_gpr_t *gctl;
-	snd_emu10k1_fx8010_ctl_t *ctl, *nctl;
-	snd_kcontrol_new_t knew;
-	snd_kcontrol_t *kctl;
-	snd_ctl_elem_value_t *val;
+	struct snd_emu10k1_fx8010_control_gpr __user *_gctl;
+	struct snd_emu10k1_fx8010_control_gpr *gctl;
+	struct snd_emu10k1_fx8010_ctl *ctl, *nctl;
+	struct snd_kcontrol_new knew;
+	struct snd_kcontrol *kctl;
+	struct snd_ctl_elem_value *val;
 	int err = 0;
 
-	val = (snd_ctl_elem_value_t *)kmalloc(sizeof(*val), GFP_KERNEL);
+	val = kmalloc(sizeof(*val), GFP_KERNEL);
 	gctl = kmalloc(sizeof(*gctl), GFP_KERNEL);
 	nctl = kmalloc(sizeof(*nctl), GFP_KERNEL);
 	if (!val || !gctl || !nctl) {
@@ -751,7 +765,7 @@ static int snd_emu10k1_add_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode
 		nctl->max = gctl->max;
 		nctl->translation = gctl->translation;
 		if (ctl == NULL) {
-			ctl = (snd_emu10k1_fx8010_ctl_t *)kmalloc(sizeof(*ctl), GFP_KERNEL);
+			ctl = kmalloc(sizeof(*ctl), GFP_KERNEL);
 			if (ctl == NULL) {
 				err = -ENOMEM;
 				goto __error;
@@ -782,13 +796,14 @@ static int snd_emu10k1_add_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode
 	return err;
 }
 
-static int snd_emu10k1_del_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_del_controls(struct snd_emu10k1 *emu,
+				    struct snd_emu10k1_fx8010_code *icode)
 {
 	unsigned int i;
-	snd_ctl_elem_id_t id;
-	snd_ctl_elem_id_t __user *_id;
-	snd_emu10k1_fx8010_ctl_t *ctl;
-	snd_card_t *card = emu->card;
+	struct snd_ctl_elem_id id;
+	struct snd_ctl_elem_id __user *_id;
+	struct snd_emu10k1_fx8010_ctl *ctl;
+	struct snd_card *card = emu->card;
 	
 	for (i = 0, _id = icode->gpr_del_controls;
 	     i < icode->gpr_del_control_count; i++, _id++) {
@@ -803,14 +818,15 @@ static int snd_emu10k1_del_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode
 	return 0;
 }
 
-static int snd_emu10k1_list_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_list_controls(struct snd_emu10k1 *emu,
+				     struct snd_emu10k1_fx8010_code *icode)
 {
 	unsigned int i = 0, j;
 	unsigned int total = 0;
-	emu10k1_fx8010_control_gpr_t *gctl;
-	emu10k1_fx8010_control_gpr_t __user *_gctl;
-	snd_emu10k1_fx8010_ctl_t *ctl;
-	snd_ctl_elem_id_t *id;
+	struct snd_emu10k1_fx8010_control_gpr *gctl;
+	struct snd_emu10k1_fx8010_control_gpr __user *_gctl;
+	struct snd_emu10k1_fx8010_ctl *ctl;
+	struct snd_ctl_elem_id *id;
 	struct list_head *list;
 
 	gctl = kmalloc(sizeof(*gctl), GFP_KERNEL);
@@ -851,7 +867,8 @@ static int snd_emu10k1_list_controls(emu10k1_t *emu, emu10k1_fx8010_code_t *icod
 	return 0;
 }
 
-static int snd_emu10k1_icode_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_icode_poke(struct snd_emu10k1 *emu,
+				  struct snd_emu10k1_fx8010_code *icode)
 {
 	int err = 0;
 
@@ -882,7 +899,8 @@ static int snd_emu10k1_icode_poke(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 	return err;
 }
 
-static int snd_emu10k1_icode_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
+static int snd_emu10k1_icode_peek(struct snd_emu10k1 *emu,
+				  struct snd_emu10k1_fx8010_code *icode)
 {
 	int err;
 
@@ -900,11 +918,12 @@ static int snd_emu10k1_icode_peek(emu10k1_t *emu, emu10k1_fx8010_code_t *icode)
 	return err;
 }
 
-static int snd_emu10k1_ipcm_poke(emu10k1_t *emu, emu10k1_fx8010_pcm_t *ipcm)
+static int snd_emu10k1_ipcm_poke(struct snd_emu10k1 *emu,
+				 struct snd_emu10k1_fx8010_pcm_rec *ipcm)
 {
 	unsigned int i;
 	int err = 0;
-	snd_emu10k1_fx8010_pcm_t *pcm;
+	struct snd_emu10k1_fx8010_pcm *pcm;
 
 	if (ipcm->substream >= EMU10K1_FX8010_PCM_COUNT)
 		return -EINVAL;
@@ -945,11 +964,12 @@ static int snd_emu10k1_ipcm_poke(emu10k1_t *emu, emu10k1_fx8010_pcm_t *ipcm)
 	return err;
 }
 
-static int snd_emu10k1_ipcm_peek(emu10k1_t *emu, emu10k1_fx8010_pcm_t *ipcm)
+static int snd_emu10k1_ipcm_peek(struct snd_emu10k1 *emu,
+				 struct snd_emu10k1_fx8010_pcm_rec *ipcm)
 {
 	unsigned int i;
 	int err = 0;
-	snd_emu10k1_fx8010_pcm_t *pcm;
+	struct snd_emu10k1_fx8010_pcm *pcm;
 
 	if (ipcm->substream >= EMU10K1_FX8010_PCM_COUNT)
 		return -EINVAL;
@@ -979,7 +999,9 @@ static int snd_emu10k1_ipcm_peek(emu10k1_t *emu, emu10k1_fx8010_pcm_t *ipcm)
 #define SND_EMU10K1_PLAYBACK_CHANNELS	8
 #define SND_EMU10K1_CAPTURE_CHANNELS	4
 
-static void __devinit snd_emu10k1_init_mono_control(emu10k1_fx8010_control_gpr_t *ctl, const char *name, int gpr, int defval)
+static void __devinit
+snd_emu10k1_init_mono_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
+			      const char *name, int gpr, int defval)
 {
 	ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
 	strcpy(ctl->id.name, name);
@@ -990,7 +1012,9 @@ static void __devinit snd_emu10k1_init_mono_control(emu10k1_fx8010_control_gpr_t
 	ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100;	
 }
 
-static void __devinit snd_emu10k1_init_stereo_control(emu10k1_fx8010_control_gpr_t *ctl, const char *name, int gpr, int defval)
+static void __devinit
+snd_emu10k1_init_stereo_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
+				const char *name, int gpr, int defval)
 {
 	ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
 	strcpy(ctl->id.name, name);
@@ -1002,7 +1026,9 @@ static void __devinit snd_emu10k1_init_stereo_control(emu10k1_fx8010_control_gpr
 	ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100;
 }
 
-static void __devinit snd_emu10k1_init_mono_onoff_control(emu10k1_fx8010_control_gpr_t *ctl, const char *name, int gpr, int defval)
+static void __devinit
+snd_emu10k1_init_mono_onoff_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
+				    const char *name, int gpr, int defval)
 {
 	ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
 	strcpy(ctl->id.name, name);
@@ -1013,7 +1039,9 @@ static void __devinit snd_emu10k1_init_mono_onoff_control(emu10k1_fx8010_control
 	ctl->translation = EMU10K1_GPR_TRANSLATION_ONOFF;
 }
 
-static void __devinit snd_emu10k1_init_stereo_onoff_control(emu10k1_fx8010_control_gpr_t *ctl, const char *name, int gpr, int defval)
+static void __devinit
+snd_emu10k1_init_stereo_onoff_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
+				      const char *name, int gpr, int defval)
 {
 	ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
 	strcpy(ctl->id.name, name);
@@ -1030,7 +1058,7 @@ static void __devinit snd_emu10k1_init_stereo_onoff_control(emu10k1_fx8010_contr
  * initial DSP configuration for Audigy
  */
 
-static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu)
+static int __devinit _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu)
 {
 	int err, i, z, gpr, nctl;
 	const int playback = 10;
@@ -1038,8 +1066,8 @@ static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu)
 	const int stereo_mix = capture + 2;
 	const int tmp = 0x88;
 	u32 ptr;
-	emu10k1_fx8010_code_t *icode = NULL;
-	emu10k1_fx8010_control_gpr_t *controls = NULL, *ctl;
+	struct snd_emu10k1_fx8010_code *icode = NULL;
+	struct snd_emu10k1_fx8010_control_gpr *controls = NULL, *ctl;
 	u32 *gpr_map;
 	mm_segment_t seg;
 
@@ -1047,8 +1075,11 @@ static int __devinit _snd_emu10k1_audigy_init_efx(emu10k1_t *emu)
 	INIT_LIST_HEAD(&emu->fx8010.gpr_ctl);
 
 	if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL ||
-	    (icode->gpr_map = (u_int32_t __user *)kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
-	    (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(*controls), GFP_KERNEL)) == NULL) {
+	    (icode->gpr_map = (u_int32_t __user *)
+	     kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t),
+		     GFP_KERNEL)) == NULL ||
+	    (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS,
+				sizeof(*controls), GFP_KERNEL)) == NULL) {
 		err = -ENOMEM;
 		goto __err;
 	}
@@ -1434,7 +1465,7 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
 
 	seg = snd_enter_user();
 	icode->gpr_add_control_count = nctl;
-	icode->gpr_add_controls = (emu10k1_fx8010_control_gpr_t __user *)controls;
+	icode->gpr_add_controls = (struct snd_emu10k1_fx8010_control_gpr __user *)controls;
 	err = snd_emu10k1_icode_poke(emu, icode);
 	snd_leave_user(seg);
 
@@ -1454,14 +1485,14 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
 
 /* when volume = max, then copy only to avoid volume modification */
 /* with iMAC0 (negative values) */
-static void __devinit _volume(emu10k1_fx8010_code_t *icode, u32 *ptr, u32 dst, u32 src, u32 vol)
+static void __devinit _volume(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol)
 {
 	OP(icode, ptr, iMAC0, dst, C_00000000, src, vol);
 	OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff);
 	OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000001);
 	OP(icode, ptr, iACC3, dst, src, C_00000000, C_00000000);
 }
-static void __devinit _volume_add(emu10k1_fx8010_code_t *icode, u32 *ptr, u32 dst, u32 src, u32 vol)
+static void __devinit _volume_add(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol)
 {
 	OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff);
 	OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002);
@@ -1469,7 +1500,7 @@ static void __devinit _volume_add(emu10k1_fx8010_code_t *icode, u32 *ptr, u32 ds
 	OP(icode, ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000001);
 	OP(icode, ptr, iMAC0, dst, dst, src, vol);
 }
-static void __devinit _volume_out(emu10k1_fx8010_code_t *icode, u32 *ptr, u32 dst, u32 src, u32 vol)
+static void __devinit _volume_out(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol)
 {
 	OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff);
 	OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002);
@@ -1500,13 +1531,13 @@ static void __devinit _volume_out(emu10k1_fx8010_code_t *icode, u32 *ptr, u32 ds
 		_SWITCH_NEG(icode, ptr, GPR(dst), GPR(src))
 
 
-static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
+static int __devinit _snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
 {
 	int err, i, z, gpr, tmp, playback, capture;
 	u32 ptr;
-	emu10k1_fx8010_code_t *icode;
-	emu10k1_fx8010_pcm_t *ipcm = NULL;
-	emu10k1_fx8010_control_gpr_t *controls = NULL, *ctl;
+	struct snd_emu10k1_fx8010_code *icode;
+	struct snd_emu10k1_fx8010_pcm_rec *ipcm = NULL;
+	struct snd_emu10k1_fx8010_control_gpr *controls = NULL, *ctl;
 	u32 *gpr_map;
 	mm_segment_t seg;
 
@@ -1515,8 +1546,12 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
 
 	if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL)
 		return -ENOMEM;
-	if ((icode->gpr_map = (u_int32_t __user *)kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
-            (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(emu10k1_fx8010_control_gpr_t), GFP_KERNEL)) == NULL ||
+	if ((icode->gpr_map = (u_int32_t __user *)
+	     kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t),
+		     GFP_KERNEL)) == NULL ||
+            (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS,
+				sizeof(struct snd_emu10k1_fx8010_control_gpr),
+				GFP_KERNEL)) == NULL ||
 	    (ipcm = kzalloc(sizeof(*ipcm), GFP_KERNEL)) == NULL) {
 		err = -ENOMEM;
 		goto __err;
@@ -2050,7 +2085,7 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
 		goto __err;
 	seg = snd_enter_user();
 	icode->gpr_add_control_count = i;
-	icode->gpr_add_controls = (emu10k1_fx8010_control_gpr_t __user *)controls;
+	icode->gpr_add_controls = (struct snd_emu10k1_fx8010_control_gpr __user *)controls;
 	err = snd_emu10k1_icode_poke(emu, icode);
 	snd_leave_user(seg);
 	if (err >= 0)
@@ -2065,7 +2100,7 @@ static int __devinit _snd_emu10k1_init_efx(emu10k1_t *emu)
 	return err;
 }
 
-int __devinit snd_emu10k1_init_efx(emu10k1_t *emu)
+int __devinit snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
 {
 	if (emu->audigy)
 		return _snd_emu10k1_audigy_init_efx(emu);
@@ -2073,7 +2108,7 @@ int __devinit snd_emu10k1_init_efx(emu10k1_t *emu)
 		return _snd_emu10k1_init_efx(emu);
 }
 
-void snd_emu10k1_free_efx(emu10k1_t *emu)
+void snd_emu10k1_free_efx(struct snd_emu10k1 *emu)
 {
 	/* stop processor */
 	if (emu->audigy)
@@ -2083,7 +2118,7 @@ void snd_emu10k1_free_efx(emu10k1_t *emu)
 }
 
 #if 0 // FIXME: who use them?
-int snd_emu10k1_fx8010_tone_control_activate(emu10k1_t *emu, int output)
+int snd_emu10k1_fx8010_tone_control_activate(struct snd_emu10k1 *emu, int output)
 {
 	if (output < 0 || output >= 6)
 		return -EINVAL;
@@ -2091,7 +2126,7 @@ int snd_emu10k1_fx8010_tone_control_activate(emu10k1_t *emu, int output)
 	return 0;
 }
 
-int snd_emu10k1_fx8010_tone_control_deactivate(emu10k1_t *emu, int output)
+int snd_emu10k1_fx8010_tone_control_deactivate(struct snd_emu10k1 *emu, int output)
 {
 	if (output < 0 || output >= 6)
 		return -EINVAL;
@@ -2100,7 +2135,7 @@ int snd_emu10k1_fx8010_tone_control_deactivate(emu10k1_t *emu, int output)
 }
 #endif
 
-int snd_emu10k1_fx8010_tram_setup(emu10k1_t *emu, u32 size)
+int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size)
 {
 	u8 size_reg = 0;
 
@@ -2142,7 +2177,7 @@ int snd_emu10k1_fx8010_tram_setup(emu10k1_t *emu, u32 size)
 	return 0;
 }
 
-static int snd_emu10k1_fx8010_open(snd_hwdep_t * hw, struct file *file)
+static int snd_emu10k1_fx8010_open(struct snd_hwdep * hw, struct file *file)
 {
 	return 0;
 }
@@ -2155,7 +2190,8 @@ static void copy_string(char *dst, char *src, char *null, int idx)
 		strcpy(dst, src);
 }
 
-static int snd_emu10k1_fx8010_info(emu10k1_t *emu, emu10k1_fx8010_info_t *info)
+static int snd_emu10k1_fx8010_info(struct snd_emu10k1 *emu,
+				   struct snd_emu10k1_fx8010_info *info)
 {
 	char **fxbus, **extin, **extout;
 	unsigned short fxbus_mask, extin_mask, extout_mask;
@@ -2181,19 +2217,19 @@ static int snd_emu10k1_fx8010_info(emu10k1_t *emu, emu10k1_fx8010_info_t *info)
 	return 0;
 }
 
-static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg)
+static int snd_emu10k1_fx8010_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg)
 {
-	emu10k1_t *emu = hw->private_data;
-	emu10k1_fx8010_info_t *info;
-	emu10k1_fx8010_code_t *icode;
-	emu10k1_fx8010_pcm_t *ipcm;
+	struct snd_emu10k1 *emu = hw->private_data;
+	struct snd_emu10k1_fx8010_info *info;
+	struct snd_emu10k1_fx8010_code *icode;
+	struct snd_emu10k1_fx8010_pcm_rec *ipcm;
 	unsigned int addr;
 	void __user *argp = (void __user *)arg;
 	int res;
 	
 	switch (cmd) {
 	case SNDRV_EMU10K1_IOCTL_INFO:
-		info = (emu10k1_fx8010_info_t *)kmalloc(sizeof(*info), GFP_KERNEL);
+		info = kmalloc(sizeof(*info), GFP_KERNEL);
 		if (!info)
 			return -ENOMEM;
 		if ((res = snd_emu10k1_fx8010_info(emu, info)) < 0) {
@@ -2209,7 +2245,7 @@ static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigne
 	case SNDRV_EMU10K1_IOCTL_CODE_POKE:
 		if (!capable(CAP_SYS_ADMIN))
 			return -EPERM;
-		icode = (emu10k1_fx8010_code_t *)kmalloc(sizeof(*icode), GFP_KERNEL);
+		icode = kmalloc(sizeof(*icode), GFP_KERNEL);
 		if (icode == NULL)
 			return -ENOMEM;
 		if (copy_from_user(icode, argp, sizeof(*icode))) {
@@ -2220,7 +2256,7 @@ static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigne
 		kfree(icode);
 		return res;
 	case SNDRV_EMU10K1_IOCTL_CODE_PEEK:
-		icode = (emu10k1_fx8010_code_t *)kmalloc(sizeof(*icode), GFP_KERNEL);
+		icode = kmalloc(sizeof(*icode), GFP_KERNEL);
 		if (icode == NULL)
 			return -ENOMEM;
 		if (copy_from_user(icode, argp, sizeof(*icode))) {
@@ -2235,7 +2271,7 @@ static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigne
 		kfree(icode);
 		return res;
 	case SNDRV_EMU10K1_IOCTL_PCM_POKE:
-		ipcm = (emu10k1_fx8010_pcm_t *)kmalloc(sizeof(*ipcm), GFP_KERNEL);
+		ipcm = kmalloc(sizeof(*ipcm), GFP_KERNEL);
 		if (ipcm == NULL)
 			return -ENOMEM;
 		if (copy_from_user(ipcm, argp, sizeof(*ipcm))) {
@@ -2327,14 +2363,14 @@ static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigne
 	return -ENOTTY;
 }
 
-static int snd_emu10k1_fx8010_release(snd_hwdep_t * hw, struct file *file)
+static int snd_emu10k1_fx8010_release(struct snd_hwdep * hw, struct file *file)
 {
 	return 0;
 }
 
-int __devinit snd_emu10k1_fx8010_new(emu10k1_t *emu, int device, snd_hwdep_t ** rhwdep)
+int __devinit snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep ** rhwdep)
 {
-	snd_hwdep_t *hw;
+	struct snd_hwdep *hw;
 	int err;
 	
 	if (rhwdep)
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c
index 7cc831ccd0c..98fb8139427 100644
--- a/sound/pci/emu10k1/emumixer.c
+++ b/sound/pci/emu10k1/emumixer.c
@@ -35,17 +35,17 @@
 
 #define AC97_ID_STAC9758	0x83847658
 
-static int snd_emu10k1_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_emu10k1_spdif_get(snd_kcontrol_t * kcontrol,
-                                 snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_spdif_get(struct snd_kcontrol *kcontrol,
+                                 struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
 	unsigned long flags;
 
@@ -58,8 +58,8 @@ static int snd_emu10k1_spdif_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_emu10k1_spdif_get_mask(snd_kcontrol_t * kcontrol,
-				      snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_spdif_get_mask(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_value *ucontrol)
 {
 	ucontrol->value.iec958.status[0] = 0xff;
 	ucontrol->value.iec958.status[1] = 0xff;
@@ -69,7 +69,7 @@ static int snd_emu10k1_spdif_get_mask(snd_kcontrol_t * kcontrol,
 }
 
 #if 0
-static int snd_audigy_spdif_output_rate_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_audigy_spdif_output_rate_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = {"44100", "48000", "96000"};
 
@@ -82,10 +82,10 @@ static int snd_audigy_spdif_output_rate_info(snd_kcontrol_t *kcontrol, snd_ctl_e
 	return 0;
 }
 
-static int snd_audigy_spdif_output_rate_get(snd_kcontrol_t * kcontrol,
-                                 snd_ctl_elem_value_t * ucontrol)
+static int snd_audigy_spdif_output_rate_get(struct snd_kcontrol *kcontrol,
+                                 struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	unsigned int tmp;
 	unsigned long flags;
 	
@@ -109,10 +109,10 @@ static int snd_audigy_spdif_output_rate_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_audigy_spdif_output_rate_put(snd_kcontrol_t * kcontrol,
-                                 snd_ctl_elem_value_t * ucontrol)
+static int snd_audigy_spdif_output_rate_put(struct snd_kcontrol *kcontrol,
+                                 struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int reg, val, tmp;
 	unsigned long flags;
@@ -143,7 +143,7 @@ static int snd_audigy_spdif_output_rate_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_audigy_spdif_output_rate =
+static struct snd_kcontrol_new snd_audigy_spdif_output_rate =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READWRITE,
 	.iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -155,10 +155,10 @@ static snd_kcontrol_new_t snd_audigy_spdif_output_rate =
 };
 #endif
 
-static int snd_emu10k1_spdif_put(snd_kcontrol_t * kcontrol,
-                                 snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_spdif_put(struct snd_kcontrol *kcontrol,
+                                 struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
 	int change;
 	unsigned int val;
@@ -178,7 +178,7 @@ static int snd_emu10k1_spdif_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_emu10k1_spdif_mask_control =
+static struct snd_kcontrol_new snd_emu10k1_spdif_mask_control =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ,
 	.iface =        SNDRV_CTL_ELEM_IFACE_PCM,
@@ -188,7 +188,7 @@ static snd_kcontrol_new_t snd_emu10k1_spdif_mask_control =
 	.get =          snd_emu10k1_spdif_get_mask
 };
 
-static snd_kcontrol_new_t snd_emu10k1_spdif_control =
+static struct snd_kcontrol_new snd_emu10k1_spdif_control =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
 	.name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
@@ -199,7 +199,7 @@ static snd_kcontrol_new_t snd_emu10k1_spdif_control =
 };
 
 
-static void update_emu10k1_fxrt(emu10k1_t *emu, int voice, unsigned char *route)
+static void update_emu10k1_fxrt(struct snd_emu10k1 *emu, int voice, unsigned char *route)
 {
 	if (emu->audigy) {
 		snd_emu10k1_ptr_write(emu, A_FXRT1, voice,
@@ -212,7 +212,7 @@ static void update_emu10k1_fxrt(emu10k1_t *emu, int voice, unsigned char *route)
 	}
 }
 
-static void update_emu10k1_send_volume(emu10k1_t *emu, int voice, unsigned char *volume)
+static void update_emu10k1_send_volume(struct snd_emu10k1 *emu, int voice, unsigned char *volume)
 {
 	snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_A, voice, volume[0]);
 	snd_emu10k1_ptr_write(emu, PTRX_FXSENDAMOUNT_B, voice, volume[1]);
@@ -229,9 +229,9 @@ static void update_emu10k1_send_volume(emu10k1_t *emu, int voice, unsigned char
 
 /* PCM stream controls */
 
-static int snd_emu10k1_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_send_routing_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = emu->audigy ? 3*8 : 3*4;
 	uinfo->value.integer.min = 0;
@@ -239,12 +239,13 @@ static int snd_emu10k1_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_
 	return 0;
 }
 
-static int snd_emu10k1_send_routing_get(snd_kcontrol_t * kcontrol,
-                                        snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_send_routing_get(struct snd_kcontrol *kcontrol,
+                                        struct snd_ctl_elem_value *ucontrol)
 {
 	unsigned long flags;
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
-	emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1_pcm_mixer *mix =
+		&emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
 	int voice, idx;
 	int num_efx = emu->audigy ? 8 : 4;
 	int mask = emu->audigy ? 0x3f : 0x0f;
@@ -258,12 +259,13 @@ static int snd_emu10k1_send_routing_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_emu10k1_send_routing_put(snd_kcontrol_t * kcontrol,
-                                        snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_send_routing_put(struct snd_kcontrol *kcontrol,
+                                        struct snd_ctl_elem_value *ucontrol)
 {
 	unsigned long flags;
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
-	emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1_pcm_mixer *mix =
+		&emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
 	int change = 0, voice, idx, val;
 	int num_efx = emu->audigy ? 8 : 4;
 	int mask = emu->audigy ? 0x3f : 0x0f;
@@ -292,7 +294,7 @@ static int snd_emu10k1_send_routing_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_emu10k1_send_routing_control =
+static struct snd_kcontrol_new snd_emu10k1_send_routing_control =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
 	.iface =        SNDRV_CTL_ELEM_IFACE_PCM,
@@ -303,9 +305,9 @@ static snd_kcontrol_new_t snd_emu10k1_send_routing_control =
 	.put =          snd_emu10k1_send_routing_put
 };
 
-static int snd_emu10k1_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_send_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = emu->audigy ? 3*8 : 3*4;
 	uinfo->value.integer.min = 0;
@@ -313,12 +315,13 @@ static int snd_emu10k1_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i
 	return 0;
 }
 
-static int snd_emu10k1_send_volume_get(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_send_volume_get(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	unsigned long flags;
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
-	emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1_pcm_mixer *mix =
+		&emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
 	int idx;
 	int num_efx = emu->audigy ? 8 : 4;
 
@@ -329,12 +332,13 @@ static int snd_emu10k1_send_volume_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_emu10k1_send_volume_put(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_send_volume_put(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	unsigned long flags;
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
-	emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1_pcm_mixer *mix =
+		&emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
 	int change = 0, idx, val;
 	int num_efx = emu->audigy ? 8 : 4;
 
@@ -361,7 +365,7 @@ static int snd_emu10k1_send_volume_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_emu10k1_send_volume_control =
+static struct snd_kcontrol_new snd_emu10k1_send_volume_control =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
 	.iface =        SNDRV_CTL_ELEM_IFACE_PCM,
@@ -372,7 +376,7 @@ static snd_kcontrol_new_t snd_emu10k1_send_volume_control =
 	.put =          snd_emu10k1_send_volume_put
 };
 
-static int snd_emu10k1_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_attn_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 3;
@@ -381,11 +385,12 @@ static int snd_emu10k1_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
 	return 0;
 }
 
-static int snd_emu10k1_attn_get(snd_kcontrol_t * kcontrol,
-                                snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_attn_get(struct snd_kcontrol *kcontrol,
+                                struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
-	emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1_pcm_mixer *mix =
+		&emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
 	unsigned long flags;
 	int idx;
 
@@ -396,12 +401,13 @@ static int snd_emu10k1_attn_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_emu10k1_attn_put(snd_kcontrol_t * kcontrol,
-				snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_attn_put(struct snd_kcontrol *kcontrol,
+				struct snd_ctl_elem_value *ucontrol)
 {
 	unsigned long flags;
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
-	emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1_pcm_mixer *mix =
+		&emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
 	int change = 0, idx, val;
 
 	spin_lock_irqsave(&emu->reg_lock, flags);
@@ -424,7 +430,7 @@ static int snd_emu10k1_attn_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_emu10k1_attn_control =
+static struct snd_kcontrol_new snd_emu10k1_attn_control =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
 	.iface =        SNDRV_CTL_ELEM_IFACE_PCM,
@@ -437,9 +443,9 @@ static snd_kcontrol_new_t snd_emu10k1_attn_control =
 
 /* Mutichannel PCM stream controls */
 
-static int snd_emu10k1_efx_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_efx_send_routing_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = emu->audigy ? 8 : 4;
 	uinfo->value.integer.min = 0;
@@ -447,12 +453,13 @@ static int snd_emu10k1_efx_send_routing_info(snd_kcontrol_t *kcontrol, snd_ctl_e
 	return 0;
 }
 
-static int snd_emu10k1_efx_send_routing_get(snd_kcontrol_t * kcontrol,
-                                        snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_efx_send_routing_get(struct snd_kcontrol *kcontrol,
+                                        struct snd_ctl_elem_value *ucontrol)
 {
 	unsigned long flags;
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
-	emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1_pcm_mixer *mix =
+		&emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
 	int idx;
 	int num_efx = emu->audigy ? 8 : 4;
 	int mask = emu->audigy ? 0x3f : 0x0f;
@@ -465,13 +472,13 @@ static int snd_emu10k1_efx_send_routing_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_emu10k1_efx_send_routing_put(snd_kcontrol_t * kcontrol,
-                                        snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_efx_send_routing_put(struct snd_kcontrol *kcontrol,
+                                        struct snd_ctl_elem_value *ucontrol)
 {
 	unsigned long flags;
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
-	emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[ch];
+	struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
 	int change = 0, idx, val;
 	int num_efx = emu->audigy ? 8 : 4;
 	int mask = emu->audigy ? 0x3f : 0x0f;
@@ -495,7 +502,7 @@ static int snd_emu10k1_efx_send_routing_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_emu10k1_efx_send_routing_control =
+static struct snd_kcontrol_new snd_emu10k1_efx_send_routing_control =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
 	.iface =        SNDRV_CTL_ELEM_IFACE_PCM,
@@ -506,9 +513,9 @@ static snd_kcontrol_new_t snd_emu10k1_efx_send_routing_control =
 	.put =          snd_emu10k1_efx_send_routing_put
 };
 
-static int snd_emu10k1_efx_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_efx_send_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = emu->audigy ? 8 : 4;
 	uinfo->value.integer.min = 0;
@@ -516,12 +523,13 @@ static int snd_emu10k1_efx_send_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_el
 	return 0;
 }
 
-static int snd_emu10k1_efx_send_volume_get(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_efx_send_volume_get(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	unsigned long flags;
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
-	emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1_pcm_mixer *mix =
+		&emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
 	int idx;
 	int num_efx = emu->audigy ? 8 : 4;
 
@@ -532,13 +540,13 @@ static int snd_emu10k1_efx_send_volume_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_emu10k1_efx_send_volume_put(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_efx_send_volume_put(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	unsigned long flags;
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
-	emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[ch];
+	struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
 	int change = 0, idx, val;
 	int num_efx = emu->audigy ? 8 : 4;
 
@@ -561,7 +569,7 @@ static int snd_emu10k1_efx_send_volume_put(snd_kcontrol_t * kcontrol,
 }
 
 
-static snd_kcontrol_new_t snd_emu10k1_efx_send_volume_control =
+static struct snd_kcontrol_new snd_emu10k1_efx_send_volume_control =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
 	.iface =        SNDRV_CTL_ELEM_IFACE_PCM,
@@ -572,7 +580,7 @@ static snd_kcontrol_new_t snd_emu10k1_efx_send_volume_control =
 	.put =          snd_emu10k1_efx_send_volume_put
 };
 
-static int snd_emu10k1_efx_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_efx_attn_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -581,11 +589,12 @@ static int snd_emu10k1_efx_attn_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info
 	return 0;
 }
 
-static int snd_emu10k1_efx_attn_get(snd_kcontrol_t * kcontrol,
-                                snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_efx_attn_get(struct snd_kcontrol *kcontrol,
+                                struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
-	emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1_pcm_mixer *mix =
+		&emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
 	unsigned long flags;
 
 	spin_lock_irqsave(&emu->reg_lock, flags);
@@ -594,13 +603,13 @@ static int snd_emu10k1_efx_attn_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_emu10k1_efx_attn_put(snd_kcontrol_t * kcontrol,
-				snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_efx_attn_put(struct snd_kcontrol *kcontrol,
+				struct snd_ctl_elem_value *ucontrol)
 {
 	unsigned long flags;
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
-	emu10k1_pcm_mixer_t *mix = &emu->efx_pcm_mixer[ch];
+	struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
 	int change = 0, val;
 
 	spin_lock_irqsave(&emu->reg_lock, flags);
@@ -618,7 +627,7 @@ static int snd_emu10k1_efx_attn_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_emu10k1_efx_attn_control =
+static struct snd_kcontrol_new snd_emu10k1_efx_attn_control =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
 	.iface =        SNDRV_CTL_ELEM_IFACE_PCM,
@@ -629,7 +638,7 @@ static snd_kcontrol_new_t snd_emu10k1_efx_attn_control =
 	.put =          snd_emu10k1_efx_attn_put
 };
 
-static int snd_emu10k1_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_shared_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -638,10 +647,10 @@ static int snd_emu10k1_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_
 	return 0;
 }
 
-static int snd_emu10k1_shared_spdif_get(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_shared_spdif_get(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 
 	if (emu->audigy)
 		ucontrol->value.integer.value[0] = inl(emu->port + A_IOCFG) & A_IOCFG_GPOUT0 ? 1 : 0;
@@ -650,11 +659,11 @@ static int snd_emu10k1_shared_spdif_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_emu10k1_shared_spdif_put(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_shared_spdif_put(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
 	unsigned long flags;
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	unsigned int reg, val;
 	int change = 0;
 
@@ -681,7 +690,7 @@ static int snd_emu10k1_shared_spdif_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_emu10k1_shared_spdif __devinitdata =
+static struct snd_kcontrol_new snd_emu10k1_shared_spdif __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =		"SB Live Analog/Digital Output Jack",
@@ -690,7 +699,7 @@ static snd_kcontrol_new_t snd_emu10k1_shared_spdif __devinitdata =
 	.put =		snd_emu10k1_shared_spdif_put
 };
 
-static snd_kcontrol_new_t snd_audigy_shared_spdif __devinitdata =
+static struct snd_kcontrol_new snd_audigy_shared_spdif __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =		"Audigy Analog/Digital Output Jack",
@@ -701,35 +710,35 @@ static snd_kcontrol_new_t snd_audigy_shared_spdif __devinitdata =
 
 /*
  */
-static void snd_emu10k1_mixer_free_ac97(ac97_t *ac97)
+static void snd_emu10k1_mixer_free_ac97(struct snd_ac97 *ac97)
 {
-	emu10k1_t *emu = ac97->private_data;
+	struct snd_emu10k1 *emu = ac97->private_data;
 	emu->ac97 = NULL;
 }
 
 /*
  */
-static int remove_ctl(snd_card_t *card, const char *name)
+static int remove_ctl(struct snd_card *card, const char *name)
 {
-	snd_ctl_elem_id_t id;
+	struct snd_ctl_elem_id id;
 	memset(&id, 0, sizeof(id));
 	strcpy(id.name, name);
 	id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
 	return snd_ctl_remove_id(card, &id);
 }
 
-static snd_kcontrol_t *ctl_find(snd_card_t *card, const char *name)
+static struct snd_kcontrol *ctl_find(struct snd_card *card, const char *name)
 {
-	snd_ctl_elem_id_t sid;
+	struct snd_ctl_elem_id sid;
 	memset(&sid, 0, sizeof(sid));
 	strcpy(sid.name, name);
 	sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
 	return snd_ctl_find_id(card, &sid);
 }
 
-static int rename_ctl(snd_card_t *card, const char *src, const char *dst)
+static int rename_ctl(struct snd_card *card, const char *src, const char *dst)
 {
-	snd_kcontrol_t *kctl = ctl_find(card, src);
+	struct snd_kcontrol *kctl = ctl_find(card, src);
 	if (kctl) {
 		strcpy(kctl->id.name, dst);
 		return 0;
@@ -737,12 +746,12 @@ static int rename_ctl(snd_card_t *card, const char *src, const char *dst)
 	return -ENOENT;
 }
 
-int __devinit snd_emu10k1_mixer(emu10k1_t *emu,
+int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
 				int pcm_device, int multi_device)
 {
 	int err, pcm;
-	snd_kcontrol_t *kctl;
-	snd_card_t *card = emu->card;
+	struct snd_kcontrol *kctl;
+	struct snd_card *card = emu->card;
 	char **c;
 	static char *emu10k1_remove_ctls[] = {
 		/* no AC97 mono, surround, center/lfe */
@@ -795,9 +804,9 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu,
 	};
 
 	if (emu->card_capabilities->ac97_chip) {
-		ac97_bus_t *pbus;
-		ac97_template_t ac97;
-		static ac97_bus_ops_t ops = {
+		struct snd_ac97_bus *pbus;
+		struct snd_ac97_template ac97;
+		static struct snd_ac97_bus_ops ops = {
 			.write = snd_emu10k1_ac97_write,
 			.read = snd_emu10k1_ac97_read,
 		};
@@ -894,7 +903,7 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu,
 
 	/* initialize the routing and volume table for each pcm playback stream */
 	for (pcm = 0; pcm < 32; pcm++) {
-		emu10k1_pcm_mixer_t *mix;
+		struct snd_emu10k1_pcm_mixer *mix;
 		int v;
 		
 		mix = &emu->pcm_mixer[pcm];
@@ -914,7 +923,7 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu,
 	
 	/* initialize the routing and volume table for the multichannel playback stream */
 	for (pcm = 0; pcm < NUM_EFX_PLAYBACK; pcm++) {
-		emu10k1_pcm_mixer_t *mix;
+		struct snd_emu10k1_pcm_mixer *mix;
 		int v;
 		
 		mix = &emu->efx_pcm_mixer[pcm];
diff --git a/sound/pci/emu10k1/emumpu401.c b/sound/pci/emu10k1/emumpu401.c
index eb57458a966..d96eb455103 100644
--- a/sound/pci/emu10k1/emumpu401.c
+++ b/sound/pci/emu10k1/emumpu401.c
@@ -28,7 +28,8 @@
 #define EMU10K1_MIDI_MODE_INPUT		(1<<0)
 #define EMU10K1_MIDI_MODE_OUTPUT	(1<<1)
 
-static inline unsigned char mpu401_read(emu10k1_t *emu, emu10k1_midi_t *mpu, int idx)
+static inline unsigned char mpu401_read(struct snd_emu10k1 *emu,
+					struct snd_emu10k1_midi *mpu, int idx)
 {
 	if (emu->audigy)
 		return (unsigned char)snd_emu10k1_ptr_read(emu, mpu->port + idx, 0);
@@ -36,7 +37,8 @@ static inline unsigned char mpu401_read(emu10k1_t *emu, emu10k1_midi_t *mpu, int
 		return inb(emu->port + mpu->port + idx);
 }
 
-static inline void mpu401_write(emu10k1_t *emu, emu10k1_midi_t *mpu, int data, int idx)
+static inline void mpu401_write(struct snd_emu10k1 *emu,
+				struct snd_emu10k1_midi *mpu, int data, int idx)
 {
 	if (emu->audigy)
 		snd_emu10k1_ptr_write(emu, mpu->port + idx, 0, data);
@@ -56,7 +58,7 @@ static inline void mpu401_write(emu10k1_t *emu, emu10k1_midi_t *mpu, int data, i
 #define MPU401_ENTER_UART	0x3f
 #define MPU401_ACK		0xfe
 
-static void mpu401_clear_rx(emu10k1_t *emu, emu10k1_midi_t *mpu)
+static void mpu401_clear_rx(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *mpu)
 {
 	int timeout = 100000;
 	for (; timeout > 0 && mpu401_input_avail(emu, mpu); timeout--)
@@ -71,7 +73,7 @@ static void mpu401_clear_rx(emu10k1_t *emu, emu10k1_midi_t *mpu)
 
  */
 
-static void do_emu10k1_midi_interrupt(emu10k1_t *emu, emu10k1_midi_t *midi, unsigned int status)
+static void do_emu10k1_midi_interrupt(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *midi, unsigned int status)
 {
 	unsigned char byte;
 
@@ -104,17 +106,17 @@ static void do_emu10k1_midi_interrupt(emu10k1_t *emu, emu10k1_midi_t *midi, unsi
 	spin_unlock(&midi->output_lock);
 }
 
-static void snd_emu10k1_midi_interrupt(emu10k1_t *emu, unsigned int status)
+static void snd_emu10k1_midi_interrupt(struct snd_emu10k1 *emu, unsigned int status)
 {
 	do_emu10k1_midi_interrupt(emu, &emu->midi, status);
 }
 
-static void snd_emu10k1_midi_interrupt2(emu10k1_t *emu, unsigned int status)
+static void snd_emu10k1_midi_interrupt2(struct snd_emu10k1 *emu, unsigned int status)
 {
 	do_emu10k1_midi_interrupt(emu, &emu->midi2, status);
 }
 
-static void snd_emu10k1_midi_cmd(emu10k1_t * emu, emu10k1_midi_t *midi, unsigned char cmd, int ack)
+static void snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack)
 {
 	unsigned long flags;
 	int timeout, ok;
@@ -146,10 +148,10 @@ static void snd_emu10k1_midi_cmd(emu10k1_t * emu, emu10k1_midi_t *midi, unsigned
 			   mpu401_read_data(emu, midi));
 }
 
-static int snd_emu10k1_midi_input_open(snd_rawmidi_substream_t * substream)
+static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream)
 {
-	emu10k1_t *emu;
-	emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+	struct snd_emu10k1 *emu;
+	struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
 	unsigned long flags;
 
 	emu = midi->emu;
@@ -167,10 +169,10 @@ static int snd_emu10k1_midi_input_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_midi_output_open(snd_rawmidi_substream_t * substream)
+static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream)
 {
-	emu10k1_t *emu;
-	emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+	struct snd_emu10k1 *emu;
+	struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
 	unsigned long flags;
 
 	emu = midi->emu;
@@ -188,10 +190,10 @@ static int snd_emu10k1_midi_output_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_midi_input_close(snd_rawmidi_substream_t * substream)
+static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream)
 {
-	emu10k1_t *emu;
-	emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+	struct snd_emu10k1 *emu;
+	struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
 	unsigned long flags;
 
 	emu = midi->emu;
@@ -209,10 +211,10 @@ static int snd_emu10k1_midi_input_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_midi_output_close(snd_rawmidi_substream_t * substream)
+static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream)
 {
-	emu10k1_t *emu;
-	emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+	struct snd_emu10k1 *emu;
+	struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
 	unsigned long flags;
 
 	emu = midi->emu;
@@ -230,10 +232,10 @@ static int snd_emu10k1_midi_output_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static void snd_emu10k1_midi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_emu10k1_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
 {
-	emu10k1_t *emu;
-	emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+	struct snd_emu10k1 *emu;
+	struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
 	emu = midi->emu;
 	snd_assert(emu, return);
 
@@ -243,10 +245,10 @@ static void snd_emu10k1_midi_input_trigger(snd_rawmidi_substream_t * substream,
 		snd_emu10k1_intr_disable(emu, midi->rx_enable);
 }
 
-static void snd_emu10k1_midi_output_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_emu10k1_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
 {
-	emu10k1_t *emu;
-	emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+	struct snd_emu10k1 *emu;
+	struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
 	unsigned long flags;
 
 	emu = midi->emu;
@@ -283,30 +285,30 @@ static void snd_emu10k1_midi_output_trigger(snd_rawmidi_substream_t * substream,
 
  */
 
-static snd_rawmidi_ops_t snd_emu10k1_midi_output =
+static struct snd_rawmidi_ops snd_emu10k1_midi_output =
 {
 	.open =		snd_emu10k1_midi_output_open,
 	.close =	snd_emu10k1_midi_output_close,
 	.trigger =	snd_emu10k1_midi_output_trigger,
 };
 
-static snd_rawmidi_ops_t snd_emu10k1_midi_input =
+static struct snd_rawmidi_ops snd_emu10k1_midi_input =
 {
 	.open =		snd_emu10k1_midi_input_open,
 	.close =	snd_emu10k1_midi_input_close,
 	.trigger =	snd_emu10k1_midi_input_trigger,
 };
 
-static void snd_emu10k1_midi_free(snd_rawmidi_t *rmidi)
+static void snd_emu10k1_midi_free(struct snd_rawmidi *rmidi)
 {
-	emu10k1_midi_t *midi = (emu10k1_midi_t *)rmidi->private_data;
+	struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)rmidi->private_data;
 	midi->interrupt = NULL;
 	midi->rmidi = NULL;
 }
 
-static int __devinit emu10k1_midi_init(emu10k1_t *emu, emu10k1_midi_t *midi, int device, char *name)
+static int __devinit emu10k1_midi_init(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *midi, int device, char *name)
 {
-	snd_rawmidi_t *rmidi;
+	struct snd_rawmidi *rmidi;
 	int err;
 
 	if ((err = snd_rawmidi_new(emu->card, name, device, 1, 1, &rmidi)) < 0)
@@ -327,9 +329,9 @@ static int __devinit emu10k1_midi_init(emu10k1_t *emu, emu10k1_midi_t *midi, int
 	return 0;
 }
 
-int __devinit snd_emu10k1_midi(emu10k1_t *emu)
+int __devinit snd_emu10k1_midi(struct snd_emu10k1 *emu)
 {
-	emu10k1_midi_t *midi = &emu->midi;
+	struct snd_emu10k1_midi *midi = &emu->midi;
 	int err;
 
 	if ((err = emu10k1_midi_init(emu, midi, 0, "EMU10K1 MPU-401 (UART)")) < 0)
@@ -344,9 +346,9 @@ int __devinit snd_emu10k1_midi(emu10k1_t *emu)
 	return 0;
 }
 
-int __devinit snd_emu10k1_audigy_midi(emu10k1_t *emu)
+int __devinit snd_emu10k1_audigy_midi(struct snd_emu10k1 *emu)
 {
-	emu10k1_midi_t *midi;
+	struct snd_emu10k1_midi *midi;
 	int err;
 
 	midi = &emu->midi;
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c
index 166f7c4d28c..8e6caf581c0 100644
--- a/sound/pci/emu10k1/emupcm.c
+++ b/sound/pci/emu10k1/emupcm.c
@@ -35,9 +35,10 @@
 #include <sound/core.h>
 #include <sound/emu10k1.h>
 
-static void snd_emu10k1_pcm_interrupt(emu10k1_t *emu, emu10k1_voice_t *voice)
+static void snd_emu10k1_pcm_interrupt(struct snd_emu10k1 *emu,
+				      struct snd_emu10k1_voice *voice)
 {
-	emu10k1_pcm_t *epcm;
+	struct snd_emu10k1_pcm *epcm;
 
 	if ((epcm = voice->epcm) == NULL)
 		return;
@@ -52,7 +53,8 @@ static void snd_emu10k1_pcm_interrupt(emu10k1_t *emu, emu10k1_voice_t *voice)
 	snd_pcm_period_elapsed(epcm->substream);
 }
 
-static void snd_emu10k1_pcm_ac97adc_interrupt(emu10k1_t *emu, unsigned int status)
+static void snd_emu10k1_pcm_ac97adc_interrupt(struct snd_emu10k1 *emu,
+					      unsigned int status)
 {
 #if 0
 	if (status & IPR_ADCBUFHALFFULL) {
@@ -63,7 +65,8 @@ static void snd_emu10k1_pcm_ac97adc_interrupt(emu10k1_t *emu, unsigned int statu
 	snd_pcm_period_elapsed(emu->pcm_capture_substream);
 }
 
-static void snd_emu10k1_pcm_ac97mic_interrupt(emu10k1_t *emu, unsigned int status)
+static void snd_emu10k1_pcm_ac97mic_interrupt(struct snd_emu10k1 *emu,
+					      unsigned int status)
 {
 #if 0
 	if (status & IPR_MICBUFHALFFULL) {
@@ -74,7 +77,8 @@ static void snd_emu10k1_pcm_ac97mic_interrupt(emu10k1_t *emu, unsigned int statu
 	snd_pcm_period_elapsed(emu->pcm_capture_mic_substream);
 }
 
-static void snd_emu10k1_pcm_efx_interrupt(emu10k1_t *emu, unsigned int status)
+static void snd_emu10k1_pcm_efx_interrupt(struct snd_emu10k1 *emu,
+					  unsigned int status)
 {
 #if 0
 	if (status & IPR_EFXBUFHALFFULL) {
@@ -85,11 +89,11 @@ static void snd_emu10k1_pcm_efx_interrupt(emu10k1_t *emu, unsigned int status)
 	snd_pcm_period_elapsed(emu->pcm_capture_efx_substream);
 }	 
 
-static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	unsigned int ptr;
 
 	if (!epcm->running)
@@ -102,7 +106,7 @@ static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(snd_pcm_substream_t *
 	return ptr;
 }
 
-static int snd_emu10k1_pcm_channel_alloc(emu10k1_pcm_t * epcm, int voices)
+static int snd_emu10k1_pcm_channel_alloc(struct snd_emu10k1_pcm * epcm, int voices)
 {
 	int err, i;
 
@@ -167,7 +171,7 @@ static unsigned int capture_period_sizes[31] = {
 	384*128,448*128,512*128
 };
 
-static snd_pcm_hw_constraint_list_t hw_constraints_capture_period_sizes = {
+static struct snd_pcm_hw_constraint_list hw_constraints_capture_period_sizes = {
 	.count = 31,
 	.list = capture_period_sizes,
 	.mask = 0
@@ -177,7 +181,7 @@ static unsigned int capture_rates[8] = {
 	8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000
 };
 
-static snd_pcm_hw_constraint_list_t hw_constraints_capture_rates = {
+static struct snd_pcm_hw_constraint_list hw_constraints_capture_rates = {
 	.count = 8,
 	.list = capture_rates,
 	.mask = 0
@@ -271,15 +275,15 @@ static inline int emu10k1_ccis(int stereo, int w_16)
 	}
 }
 
-static void snd_emu10k1_pcm_init_voice(emu10k1_t *emu,
+static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu,
 				       int master, int extra,
-				       emu10k1_voice_t *evoice,
+				       struct snd_emu10k1_voice *evoice,
 				       unsigned int start_addr,
 				       unsigned int end_addr,
-				       emu10k1_pcm_mixer_t *mix)
+				       struct snd_emu10k1_pcm_mixer *mix)
 {
-	snd_pcm_substream_t *substream = evoice->epcm->substream;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_substream *substream = evoice->epcm->substream;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned int silent_page, tmp;
 	int voice, stereo, w_16;
 	unsigned char attn, send_amount[8];
@@ -392,12 +396,12 @@ static void snd_emu10k1_pcm_init_voice(emu10k1_t *emu,
 	spin_unlock_irqrestore(&emu->reg_lock, flags);
 }
 
-static int snd_emu10k1_playback_hw_params(snd_pcm_substream_t * substream,
-					  snd_pcm_hw_params_t * hw_params)
+static int snd_emu10k1_playback_hw_params(struct snd_pcm_substream *substream,
+					  struct snd_pcm_hw_params *hw_params)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	int err;
 
 	if ((err = snd_emu10k1_pcm_channel_alloc(epcm, params_channels(hw_params))) < 0)
@@ -412,7 +416,7 @@ static int snd_emu10k1_playback_hw_params(snd_pcm_substream_t * substream,
 		epcm->start_addr = 0;
 		if (! epcm->memblk)
 			return -ENOMEM;
-		mapped = ((emu10k1_memblk_t *)epcm->memblk)->mapped_page;
+		mapped = ((struct snd_emu10k1_memblk *)epcm->memblk)->mapped_page;
 		if (mapped < 0)
 			return -ENOMEM;
 		epcm->start_addr = mapped << PAGE_SHIFT;
@@ -420,11 +424,11 @@ static int snd_emu10k1_playback_hw_params(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_emu10k1_playback_hw_free(snd_pcm_substream_t * substream)
+static int snd_emu10k1_playback_hw_free(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm;
 
 	if (runtime->private_data == NULL)
 		return 0;
@@ -450,11 +454,11 @@ static int snd_emu10k1_playback_hw_free(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_efx_playback_hw_free(snd_pcm_substream_t * substream)
+static int snd_emu10k1_efx_playback_hw_free(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm;
 	int i;
 
 	if (runtime->private_data == NULL)
@@ -479,11 +483,11 @@ static int snd_emu10k1_efx_playback_hw_free(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_emu10k1_playback_prepare(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	unsigned int start_addr, end_addr;
 
 	start_addr = epcm->start_addr;
@@ -507,11 +511,11 @@ static int snd_emu10k1_playback_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_efx_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_emu10k1_efx_playback_prepare(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	unsigned int start_addr, end_addr;
 	unsigned int channel_size;
 	int i;
@@ -543,7 +547,7 @@ static int snd_emu10k1_efx_playback_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static snd_pcm_hardware_t snd_emu10k1_efx_playback =
+static struct snd_pcm_hardware snd_emu10k1_efx_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_NONINTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -562,22 +566,22 @@ static snd_pcm_hardware_t snd_emu10k1_efx_playback =
 	.fifo_size =		0,
 };
 
-static int snd_emu10k1_capture_hw_params(snd_pcm_substream_t * substream,
-					 snd_pcm_hw_params_t * hw_params)
+static int snd_emu10k1_capture_hw_params(struct snd_pcm_substream *substream,
+					 struct snd_pcm_hw_params *hw_params)
 {
 	return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
 }
 
-static int snd_emu10k1_capture_hw_free(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_hw_free(struct snd_pcm_substream *substream)
 {
 	return snd_pcm_lib_free_pages(substream);
 }
 
-static int snd_emu10k1_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_prepare(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	int idx;
 
 	/* zeroing the buffer size will stop capture */
@@ -620,9 +624,9 @@ static int snd_emu10k1_capture_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static void snd_emu10k1_playback_invalidate_cache(emu10k1_t *emu, int extra, emu10k1_voice_t *evoice)
+static void snd_emu10k1_playback_invalidate_cache(struct snd_emu10k1 *emu, int extra, struct snd_emu10k1_voice *evoice)
 {
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_runtime *runtime;
 	unsigned int voice, stereo, i, ccis, cra = 64, cs, sample;
 
 	if (evoice == NULL)
@@ -655,12 +659,12 @@ static void snd_emu10k1_playback_invalidate_cache(emu10k1_t *emu, int extra, emu
 	}
 }
 
-static void snd_emu10k1_playback_prepare_voice(emu10k1_t *emu, emu10k1_voice_t *evoice,
+static void snd_emu10k1_playback_prepare_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice,
 					       int master, int extra,
-					       emu10k1_pcm_mixer_t *mix)
+					       struct snd_emu10k1_pcm_mixer *mix)
 {
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
 	unsigned int attn, vattn;
 	unsigned int voice, tmp;
 
@@ -680,10 +684,10 @@ static void snd_emu10k1_playback_prepare_voice(emu10k1_t *emu, emu10k1_voice_t *
 	snd_emu10k1_voice_clear_loop_stop(emu, voice);
 }	
 
-static void snd_emu10k1_playback_trigger_voice(emu10k1_t *emu, emu10k1_voice_t *evoice, int master, int extra)
+static void snd_emu10k1_playback_trigger_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice, int master, int extra)
 {
-	snd_pcm_substream_t *substream;
-	snd_pcm_runtime_t *runtime;
+	struct snd_pcm_substream *substream;
+	struct snd_pcm_runtime *runtime;
 	unsigned int voice, pitch, pitch_target;
 
 	if (evoice == NULL)	/* skip second voice for mono */
@@ -702,7 +706,7 @@ static void snd_emu10k1_playback_trigger_voice(emu10k1_t *emu, emu10k1_voice_t *
 		snd_emu10k1_voice_intr_enable(emu, voice);
 }
 
-static void snd_emu10k1_playback_stop_voice(emu10k1_t *emu, emu10k1_voice_t *evoice)
+static void snd_emu10k1_playback_stop_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice)
 {
 	unsigned int voice;
 
@@ -718,13 +722,13 @@ static void snd_emu10k1_playback_stop_voice(emu10k1_t *emu, emu10k1_voice_t *evo
 	snd_emu10k1_ptr_write(emu, IP, voice, 0);
 }
 
-static int snd_emu10k1_playback_trigger(snd_pcm_substream_t * substream,
+static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream,
 				        int cmd)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm = runtime->private_data;
-	emu10k1_pcm_mixer_t *mix;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
+	struct snd_emu10k1_pcm_mixer *mix;
 	int result = 0;
 
 	// printk("trigger - emu10k1 = 0x%x, cmd = %i, pointer = %i\n", (int)emu, cmd, substream->ops->pointer(substream));
@@ -759,12 +763,12 @@ static int snd_emu10k1_playback_trigger(snd_pcm_substream_t * substream,
 	return result;
 }
 
-static int snd_emu10k1_capture_trigger(snd_pcm_substream_t * substream,
+static int snd_emu10k1_capture_trigger(struct snd_pcm_substream *substream,
 				       int cmd)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	int result = 0;
 
 	spin_lock(&emu->reg_lock);
@@ -819,11 +823,11 @@ static int snd_emu10k1_capture_trigger(snd_pcm_substream_t * substream,
 	return result;
 }
 
-static snd_pcm_uframes_t snd_emu10k1_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_emu10k1_playback_pointer(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	unsigned int ptr;
 
 	if (!epcm->running)
@@ -847,12 +851,12 @@ static snd_pcm_uframes_t snd_emu10k1_playback_pointer(snd_pcm_substream_t * subs
 }
 
 
-static int snd_emu10k1_efx_playback_trigger(snd_pcm_substream_t * substream,
+static int snd_emu10k1_efx_playback_trigger(struct snd_pcm_substream *substream,
 				        int cmd)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	int i;
 	int result = 0;
 
@@ -896,11 +900,11 @@ static int snd_emu10k1_efx_playback_trigger(snd_pcm_substream_t * substream,
 }
 
 
-static snd_pcm_uframes_t snd_emu10k1_capture_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_emu10k1_capture_pointer(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	unsigned int ptr;
 
 	if (!epcm->running)
@@ -917,7 +921,7 @@ static snd_pcm_uframes_t snd_emu10k1_capture_pointer(snd_pcm_substream_t * subst
  *  Playback support device description
  */
 
-static snd_pcm_hardware_t snd_emu10k1_playback =
+static struct snd_pcm_hardware snd_emu10k1_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -940,7 +944,7 @@ static snd_pcm_hardware_t snd_emu10k1_playback =
  *  Capture support device description
  */
 
-static snd_pcm_hardware_t snd_emu10k1_capture =
+static struct snd_pcm_hardware snd_emu10k1_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -963,9 +967,9 @@ static snd_pcm_hardware_t snd_emu10k1_capture =
  *
  */
 
-static void snd_emu10k1_pcm_mixer_notify1(emu10k1_t *emu, snd_kcontrol_t *kctl, int idx, int activate)
+static void snd_emu10k1_pcm_mixer_notify1(struct snd_emu10k1 *emu, struct snd_kcontrol *kctl, int idx, int activate)
 {
-	snd_ctl_elem_id_t id;
+	struct snd_ctl_elem_id id;
 
 	if (! kctl)
 		return;
@@ -978,29 +982,29 @@ static void snd_emu10k1_pcm_mixer_notify1(emu10k1_t *emu, snd_kcontrol_t *kctl,
 		       snd_ctl_build_ioff(&id, kctl, idx));
 }
 
-static void snd_emu10k1_pcm_mixer_notify(emu10k1_t *emu, int idx, int activate)
+static void snd_emu10k1_pcm_mixer_notify(struct snd_emu10k1 *emu, int idx, int activate)
 {
 	snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_routing, idx, activate);
 	snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_volume, idx, activate);
 	snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_attn, idx, activate);
 }
 
-static void snd_emu10k1_pcm_efx_mixer_notify(emu10k1_t *emu, int idx, int activate)
+static void snd_emu10k1_pcm_efx_mixer_notify(struct snd_emu10k1 *emu, int idx, int activate)
 {
 	snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_routing, idx, activate);
 	snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_volume, idx, activate);
 	snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_attn, idx, activate);
 }
 
-static void snd_emu10k1_pcm_free_substream(snd_pcm_runtime_t *runtime)
+static void snd_emu10k1_pcm_free_substream(struct snd_pcm_runtime *runtime)
 {
 	kfree(runtime->private_data);
 }
 
-static int snd_emu10k1_efx_playback_close(snd_pcm_substream_t * substream)
+static int snd_emu10k1_efx_playback_close(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	emu10k1_pcm_mixer_t *mix;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1_pcm_mixer *mix;
 	int i;
 
 	for (i=0; i < NUM_EFX_PLAYBACK; i++) {
@@ -1011,12 +1015,12 @@ static int snd_emu10k1_efx_playback_close(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_efx_playback_open(snd_pcm_substream_t * substream)
+static int snd_emu10k1_efx_playback_open(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	emu10k1_pcm_t *epcm;
-	emu10k1_pcm_mixer_t *mix;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1_pcm *epcm;
+	struct snd_emu10k1_pcm_mixer *mix;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int i;
 
 	epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
@@ -1044,12 +1048,12 @@ static int snd_emu10k1_efx_playback_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_playback_open(snd_pcm_substream_t * substream)
+static int snd_emu10k1_playback_open(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	emu10k1_pcm_t *epcm;
-	emu10k1_pcm_mixer_t *mix;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1_pcm *epcm;
+	struct snd_emu10k1_pcm_mixer *mix;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int i, err;
 
 	epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
@@ -1081,21 +1085,21 @@ static int snd_emu10k1_playback_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_playback_close(snd_pcm_substream_t * substream)
+static int snd_emu10k1_playback_close(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	emu10k1_pcm_mixer_t *mix = &emu->pcm_mixer[substream->number];
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1_pcm_mixer *mix = &emu->pcm_mixer[substream->number];
 
 	mix->epcm = NULL;
 	snd_emu10k1_pcm_mixer_notify(emu, substream->number, 0);
 	return 0;
 }
 
-static int snd_emu10k1_capture_open(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_open(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm;
 
 	epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
 	if (epcm == NULL)
@@ -1118,20 +1122,20 @@ static int snd_emu10k1_capture_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_capture_close(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_close(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
 
 	emu->capture_interrupt = NULL;
 	emu->pcm_capture_substream = NULL;
 	return 0;
 }
 
-static int snd_emu10k1_capture_mic_open(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_mic_open(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	emu10k1_pcm_t *epcm;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1_pcm *epcm;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
 	if (epcm == NULL)
@@ -1156,20 +1160,20 @@ static int snd_emu10k1_capture_mic_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_capture_mic_close(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_mic_close(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
 
 	emu->capture_interrupt = NULL;
 	emu->pcm_capture_mic_substream = NULL;
 	return 0;
 }
 
-static int snd_emu10k1_capture_efx_open(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_efx_open(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	emu10k1_pcm_t *epcm;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1_pcm *epcm;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int nefx = emu->audigy ? 64 : 32;
 	int idx;
 
@@ -1206,16 +1210,16 @@ static int snd_emu10k1_capture_efx_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_capture_efx_close(snd_pcm_substream_t * substream)
+static int snd_emu10k1_capture_efx_close(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
 
 	emu->capture_interrupt = NULL;
 	emu->pcm_capture_efx_substream = NULL;
 	return 0;
 }
 
-static snd_pcm_ops_t snd_emu10k1_playback_ops = {
+static struct snd_pcm_ops snd_emu10k1_playback_ops = {
 	.open =			snd_emu10k1_playback_open,
 	.close =		snd_emu10k1_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1227,7 +1231,7 @@ static snd_pcm_ops_t snd_emu10k1_playback_ops = {
 	.page =			snd_pcm_sgbuf_ops_page,
 };
 
-static snd_pcm_ops_t snd_emu10k1_capture_ops = {
+static struct snd_pcm_ops snd_emu10k1_capture_ops = {
 	.open =			snd_emu10k1_capture_open,
 	.close =		snd_emu10k1_capture_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1239,7 +1243,7 @@ static snd_pcm_ops_t snd_emu10k1_capture_ops = {
 };
 
 /* EFX playback */
-static snd_pcm_ops_t snd_emu10k1_efx_playback_ops = {
+static struct snd_pcm_ops snd_emu10k1_efx_playback_ops = {
 	.open =			snd_emu10k1_efx_playback_open,
 	.close =		snd_emu10k1_efx_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1251,10 +1255,10 @@ static snd_pcm_ops_t snd_emu10k1_efx_playback_ops = {
 	.page =			snd_pcm_sgbuf_ops_page,
 };
 
-int __devinit snd_emu10k1_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm)
+int __devinit snd_emu10k1_pcm(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm *pcm;
+	struct snd_pcm_substream *substream;
 	int err;
 
 	if (rpcm)
@@ -1286,10 +1290,10 @@ int __devinit snd_emu10k1_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm)
 	return 0;
 }
 
-int __devinit snd_emu10k1_pcm_multi(emu10k1_t * emu, int device, snd_pcm_t ** rpcm)
+int __devinit snd_emu10k1_pcm_multi(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm *pcm;
+	struct snd_pcm_substream *substream;
 	int err;
 
 	if (rpcm)
@@ -1318,7 +1322,7 @@ int __devinit snd_emu10k1_pcm_multi(emu10k1_t * emu, int device, snd_pcm_t ** rp
 }
 
 
-static snd_pcm_ops_t snd_emu10k1_capture_mic_ops = {
+static struct snd_pcm_ops snd_emu10k1_capture_mic_ops = {
 	.open =			snd_emu10k1_capture_mic_open,
 	.close =		snd_emu10k1_capture_mic_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1329,9 +1333,9 @@ static snd_pcm_ops_t snd_emu10k1_capture_mic_ops = {
 	.pointer =		snd_emu10k1_capture_pointer,
 };
 
-int __devinit snd_emu10k1_pcm_mic(emu10k1_t * emu, int device, snd_pcm_t ** rpcm)
+int __devinit snd_emu10k1_pcm_mic(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if (rpcm)
@@ -1355,9 +1359,9 @@ int __devinit snd_emu10k1_pcm_mic(emu10k1_t * emu, int device, snd_pcm_t ** rpcm
 	return 0;
 }
 
-static int snd_emu10k1_pcm_efx_voices_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_emu10k1_pcm_efx_voices_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	int nefx = emu->audigy ? 64 : 32;
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = nefx;
@@ -1366,9 +1370,9 @@ static int snd_emu10k1_pcm_efx_voices_mask_info(snd_kcontrol_t *kcontrol, snd_ct
 	return 0;
 }
 
-static int snd_emu10k1_pcm_efx_voices_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_pcm_efx_voices_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	int nefx = emu->audigy ? 64 : 32;
 	int idx;
 	
@@ -1379,9 +1383,9 @@ static int snd_emu10k1_pcm_efx_voices_mask_get(snd_kcontrol_t * kcontrol, snd_ct
 	return 0;
 }
 
-static int snd_emu10k1_pcm_efx_voices_mask_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_emu10k1_pcm_efx_voices_mask_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	unsigned int nval[2], bits;
 	int nefx = emu->audigy ? 64 : 32;
 	int nefxb = emu->audigy ? 7 : 6;
@@ -1410,7 +1414,7 @@ static int snd_emu10k1_pcm_efx_voices_mask_put(snd_kcontrol_t * kcontrol, snd_ct
 	return change;
 }
 
-static snd_kcontrol_new_t snd_emu10k1_pcm_efx_voices_mask = {
+static struct snd_kcontrol_new snd_emu10k1_pcm_efx_voices_mask = {
 	.iface = SNDRV_CTL_ELEM_IFACE_PCM,
 	.name = "Captured FX8010 Outputs",
 	.info = snd_emu10k1_pcm_efx_voices_mask_info,
@@ -1418,7 +1422,7 @@ static snd_kcontrol_new_t snd_emu10k1_pcm_efx_voices_mask = {
 	.put = snd_emu10k1_pcm_efx_voices_mask_put
 };
 
-static snd_pcm_ops_t snd_emu10k1_capture_efx_ops = {
+static struct snd_pcm_ops snd_emu10k1_capture_efx_ops = {
 	.open =			snd_emu10k1_capture_efx_open,
 	.close =		snd_emu10k1_capture_efx_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1435,9 +1439,9 @@ static snd_pcm_ops_t snd_emu10k1_capture_efx_ops = {
 #define INITIAL_TRAM_SHIFT     14
 #define INITIAL_TRAM_POS(size) ((((size) / 2) - INITIAL_TRAM_SHIFT) - 1)
 
-static void snd_emu10k1_fx8010_playback_irq(emu10k1_t *emu, void *private_data)
+static void snd_emu10k1_fx8010_playback_irq(struct snd_emu10k1 *emu, void *private_data)
 {
-	snd_pcm_substream_t *substream = private_data;
+	struct snd_pcm_substream *substream = private_data;
 	snd_pcm_period_elapsed(substream);
 }
 
@@ -1461,11 +1465,11 @@ static void snd_emu10k1_fx8010_playback_tram_poke1(unsigned short *dst_left,
 	}
 }
 
-static void fx8010_pb_trans_copy(snd_pcm_substream_t *substream,
-				 snd_pcm_indirect_t *rec, size_t bytes)
+static void fx8010_pb_trans_copy(struct snd_pcm_substream *substream,
+				 struct snd_pcm_indirect *rec, size_t bytes)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
 	unsigned int tram_size = pcm->buffer_size;
 	unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data);
 	unsigned int frames = bytes >> 2, count;
@@ -1490,25 +1494,25 @@ static void fx8010_pb_trans_copy(snd_pcm_substream_t *substream,
 	pcm->tram_shift = tram_shift;
 }
 
-static int snd_emu10k1_fx8010_playback_transfer(snd_pcm_substream_t *substream)
+static int snd_emu10k1_fx8010_playback_transfer(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
 
 	snd_pcm_indirect_playback_transfer(substream, &pcm->pcm_rec, fx8010_pb_trans_copy);
 	return 0;
 }
 
-static int snd_emu10k1_fx8010_playback_hw_params(snd_pcm_substream_t * substream,
-						 snd_pcm_hw_params_t * hw_params)
+static int snd_emu10k1_fx8010_playback_hw_params(struct snd_pcm_substream *substream,
+						 struct snd_pcm_hw_params *hw_params)
 {
 	return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
 }
 
-static int snd_emu10k1_fx8010_playback_hw_free(snd_pcm_substream_t * substream)
+static int snd_emu10k1_fx8010_playback_hw_free(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
 	unsigned int i;
 
 	for (i = 0; i < pcm->channels; i++)
@@ -1517,11 +1521,11 @@ static int snd_emu10k1_fx8010_playback_hw_free(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_fx8010_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_emu10k1_fx8010_playback_prepare(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
 	unsigned int i;
 	
 	// printk("prepare: etram_pages = 0x%p, dma_area = 0x%x, buffer_size = 0x%x (0x%x)\n", emu->fx8010.etram_pages, runtime->dma_area, runtime->buffer_size, runtime->buffer_size << 2);
@@ -1541,10 +1545,10 @@ static int snd_emu10k1_fx8010_playback_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_fx8010_playback_trigger(snd_pcm_substream_t * substream, int cmd)
+static int snd_emu10k1_fx8010_playback_trigger(struct snd_pcm_substream *substream, int cmd)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
 	int result = 0;
 
 	spin_lock(&emu->reg_lock);
@@ -1586,10 +1590,10 @@ static int snd_emu10k1_fx8010_playback_trigger(snd_pcm_substream_t * substream,
 	return result;
 }
 
-static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
 	size_t ptr; /* byte pointer */
 
 	if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0))
@@ -1598,7 +1602,7 @@ static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(snd_pcm_substream_t
 	return snd_pcm_indirect_playback_pointer(substream, &pcm->pcm_rec, ptr);
 }
 
-static snd_pcm_hardware_t snd_emu10k1_fx8010_playback =
+static struct snd_pcm_hardware snd_emu10k1_fx8010_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 /* SNDRV_PCM_INFO_MMAP_VALID | */ SNDRV_PCM_INFO_PAUSE),
@@ -1616,11 +1620,11 @@ static snd_pcm_hardware_t snd_emu10k1_fx8010_playback =
 	.fifo_size =		0,
 };
 
-static int snd_emu10k1_fx8010_playback_open(snd_pcm_substream_t * substream)
+static int snd_emu10k1_fx8010_playback_open(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
 
 	runtime->hw = snd_emu10k1_fx8010_playback;
 	runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels;
@@ -1635,10 +1639,10 @@ static int snd_emu10k1_fx8010_playback_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_emu10k1_fx8010_playback_close(snd_pcm_substream_t * substream)
+static int snd_emu10k1_fx8010_playback_close(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number];
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
 
 	spin_lock_irq(&emu->reg_lock);
 	pcm->opened = 0;
@@ -1646,7 +1650,7 @@ static int snd_emu10k1_fx8010_playback_close(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static snd_pcm_ops_t snd_emu10k1_fx8010_playback_ops = {
+static struct snd_pcm_ops snd_emu10k1_fx8010_playback_ops = {
 	.open =			snd_emu10k1_fx8010_playback_open,
 	.close =		snd_emu10k1_fx8010_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1658,10 +1662,10 @@ static snd_pcm_ops_t snd_emu10k1_fx8010_playback_ops = {
 	.ack =			snd_emu10k1_fx8010_playback_transfer,
 };
 
-int __devinit snd_emu10k1_pcm_efx(emu10k1_t * emu, int device, snd_pcm_t ** rpcm)
+int __devinit snd_emu10k1_pcm_efx(struct snd_emu10k1 * emu, int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
-	snd_kcontrol_t *kctl;
+	struct snd_pcm *pcm;
+	struct snd_kcontrol *kctl;
 	int err;
 
 	if (rpcm)
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c
index 6cdee588d35..b88137f9165 100644
--- a/sound/pci/emu10k1/emuproc.c
+++ b/sound/pci/emu10k1/emuproc.c
@@ -32,8 +32,8 @@
 #include <sound/emu10k1.h>
 #include "p16v.h"
 
-static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu,
-					  snd_info_buffer_t * buffer,
+static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu,
+					  struct snd_info_buffer *buffer,
 					  char *title,
 					  int status_reg,
 					  int rate_reg)
@@ -75,8 +75,8 @@ static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu,
 
 }
 
-static void snd_emu10k1_proc_read(snd_info_entry_t *entry, 
-				  snd_info_buffer_t * buffer)
+static void snd_emu10k1_proc_read(struct snd_info_entry *entry, 
+				  struct snd_info_buffer *buffer)
 {
 	/* FIXME - output names are in emufx.c too */
 	static char *creative_outs[32] = {
@@ -181,7 +181,7 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry,
 		/* 63 */ "FXBUS2_31"
 	};
 
-	emu10k1_t *emu = entry->private_data;
+	struct snd_emu10k1 *emu = entry->private_data;
 	unsigned int val, val1;
 	int nefx = emu->audigy ? 64 : 32;
 	char **outputs = emu->audigy ? audigy_outs : creative_outs;
@@ -232,10 +232,10 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry,
 		snd_iprintf(buffer, "  Output %02i [%s]\n", idx, outputs[idx]);
 }
 
-static void snd_emu10k1_proc_spdif_read(snd_info_entry_t *entry, 
-				  snd_info_buffer_t * buffer)
+static void snd_emu10k1_proc_spdif_read(struct snd_info_entry *entry, 
+				  struct snd_info_buffer *buffer)
 {
-	emu10k1_t *emu = entry->private_data;
+	struct snd_emu10k1 *emu = entry->private_data;
 	snd_emu10k1_proc_spdif_status(emu, buffer, "CD-ROM S/PDIF In", CDCS, CDSRCS);
 	snd_emu10k1_proc_spdif_status(emu, buffer, "Optical or Coax S/PDIF In", GPSCS, GPSRCS);
 #if 0
@@ -246,11 +246,11 @@ static void snd_emu10k1_proc_spdif_read(snd_info_entry_t *entry,
 #endif
 }
 
-static void snd_emu10k1_proc_rates_read(snd_info_entry_t *entry, 
-				  snd_info_buffer_t * buffer)
+static void snd_emu10k1_proc_rates_read(struct snd_info_entry *entry, 
+				  struct snd_info_buffer *buffer)
 {
 	static int samplerate[8] = { 44100, 48000, 96000, 192000, 4, 5, 6, 7 };
-	emu10k1_t *emu = entry->private_data;
+	struct snd_emu10k1 *emu = entry->private_data;
 	unsigned int val, tmp, n;
 	val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0);
 	tmp = (val >> 16) & 0x8;
@@ -261,11 +261,11 @@ static void snd_emu10k1_proc_rates_read(snd_info_entry_t *entry,
 	}
 }
 
-static void snd_emu10k1_proc_acode_read(snd_info_entry_t *entry, 
-				        snd_info_buffer_t * buffer)
+static void snd_emu10k1_proc_acode_read(struct snd_info_entry *entry, 
+				        struct snd_info_buffer *buffer)
 {
 	u32 pc;
-	emu10k1_t *emu = entry->private_data;
+	struct snd_emu10k1 *emu = entry->private_data;
 
 	snd_iprintf(buffer, "FX8010 Instruction List '%s'\n", emu->fx8010.name);
 	snd_iprintf(buffer, "  Code dump      :\n");
@@ -304,12 +304,13 @@ static void snd_emu10k1_proc_acode_read(snd_info_entry_t *entry,
 #define TOTAL_SIZE_CODE		(0x200*8)
 #define A_TOTAL_SIZE_CODE	(0x400*8)
 
-static long snd_emu10k1_fx8010_read(snd_info_entry_t *entry, void *file_private_data,
+static long snd_emu10k1_fx8010_read(struct snd_info_entry *entry,
+				    void *file_private_data,
 				    struct file *file, char __user *buf,
 				    unsigned long count, unsigned long pos)
 {
 	long size;
-	emu10k1_t *emu = entry->private_data;
+	struct snd_emu10k1 *emu = entry->private_data;
 	unsigned int offset;
 	int tram_addr = 0;
 	
@@ -349,11 +350,11 @@ static long snd_emu10k1_fx8010_read(snd_info_entry_t *entry, void *file_private_
 	return 0;
 }
 
-static void snd_emu10k1_proc_voices_read(snd_info_entry_t *entry, 
-				  snd_info_buffer_t * buffer)
+static void snd_emu10k1_proc_voices_read(struct snd_info_entry *entry, 
+				  struct snd_info_buffer *buffer)
 {
-	emu10k1_t *emu = entry->private_data;
-	emu10k1_voice_t *voice;
+	struct snd_emu10k1 *emu = entry->private_data;
+	struct snd_emu10k1_voice *voice;
 	int idx;
 	
 	snd_iprintf(buffer, "ch\tuse\tpcm\tefx\tsynth\tmidi\n");
@@ -370,10 +371,10 @@ static void snd_emu10k1_proc_voices_read(snd_info_entry_t *entry,
 }
 
 #ifdef CONFIG_SND_DEBUG
-static void snd_emu_proc_io_reg_read(snd_info_entry_t *entry,
-				     snd_info_buffer_t * buffer)
+static void snd_emu_proc_io_reg_read(struct snd_info_entry *entry,
+				     struct snd_info_buffer *buffer)
 {
-	emu10k1_t *emu = entry->private_data;
+	struct snd_emu10k1 *emu = entry->private_data;
 	unsigned long value;
 	unsigned long flags;
 	int i;
@@ -386,10 +387,10 @@ static void snd_emu_proc_io_reg_read(snd_info_entry_t *entry,
 	}
 }
 
-static void snd_emu_proc_io_reg_write(snd_info_entry_t *entry,
-                                      snd_info_buffer_t * buffer)
+static void snd_emu_proc_io_reg_write(struct snd_info_entry *entry,
+                                      struct snd_info_buffer *buffer)
 {
-	emu10k1_t *emu = entry->private_data;
+	struct snd_emu10k1 *emu = entry->private_data;
 	unsigned long flags;
 	char line[64];
 	u32 reg, val;
@@ -404,7 +405,7 @@ static void snd_emu_proc_io_reg_write(snd_info_entry_t *entry,
 	}
 }
 
-static unsigned int snd_ptr_read(emu10k1_t * emu,
+static unsigned int snd_ptr_read(struct snd_emu10k1 * emu,
 				 unsigned int iobase,
 				 unsigned int reg,
 				 unsigned int chn)
@@ -421,7 +422,7 @@ static unsigned int snd_ptr_read(emu10k1_t * emu,
 	return val;
 }
 
-static void snd_ptr_write(emu10k1_t *emu,
+static void snd_ptr_write(struct snd_emu10k1 *emu,
 			  unsigned int iobase,
 			  unsigned int reg,
 			  unsigned int chn,
@@ -439,10 +440,10 @@ static void snd_ptr_write(emu10k1_t *emu,
 }
 
 
-static void snd_emu_proc_ptr_reg_read(snd_info_entry_t *entry,
-				      snd_info_buffer_t * buffer, int iobase, int offset, int length, int voices)
+static void snd_emu_proc_ptr_reg_read(struct snd_info_entry *entry,
+				      struct snd_info_buffer *buffer, int iobase, int offset, int length, int voices)
 {
-	emu10k1_t *emu = entry->private_data;
+	struct snd_emu10k1 *emu = entry->private_data;
 	unsigned long value;
 	int i,j;
 	if (offset+length > 0xa0) {
@@ -463,10 +464,10 @@ static void snd_emu_proc_ptr_reg_read(snd_info_entry_t *entry,
 	}
 }
 
-static void snd_emu_proc_ptr_reg_write(snd_info_entry_t *entry,
-				       snd_info_buffer_t * buffer, int iobase)
+static void snd_emu_proc_ptr_reg_write(struct snd_info_entry *entry,
+				       struct snd_info_buffer *buffer, int iobase)
 {
-	emu10k1_t *emu = entry->private_data;
+	struct snd_emu10k1 *emu = entry->private_data;
 	char line[64];
 	unsigned int reg, channel_id , val;
 	while (!snd_info_get_line(buffer, line, sizeof(line))) {
@@ -477,45 +478,45 @@ static void snd_emu_proc_ptr_reg_write(snd_info_entry_t *entry,
 	}
 }
 
-static void snd_emu_proc_ptr_reg_write00(snd_info_entry_t *entry,
-					 snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_write00(struct snd_info_entry *entry,
+					 struct snd_info_buffer *buffer)
 {
 	snd_emu_proc_ptr_reg_write(entry, buffer, 0);
 }
 
-static void snd_emu_proc_ptr_reg_write20(snd_info_entry_t *entry,
-					 snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_write20(struct snd_info_entry *entry,
+					 struct snd_info_buffer *buffer)
 {
 	snd_emu_proc_ptr_reg_write(entry, buffer, 0x20);
 }
 	
 
-static void snd_emu_proc_ptr_reg_read00a(snd_info_entry_t *entry,
-					 snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_read00a(struct snd_info_entry *entry,
+					 struct snd_info_buffer *buffer)
 {
 	snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0, 0x40, 64);
 }
 
-static void snd_emu_proc_ptr_reg_read00b(snd_info_entry_t *entry,
-					 snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_read00b(struct snd_info_entry *entry,
+					 struct snd_info_buffer *buffer)
 {
 	snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0x40, 0x40, 64);
 }
 
-static void snd_emu_proc_ptr_reg_read20a(snd_info_entry_t *entry,
-					 snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_read20a(struct snd_info_entry *entry,
+					 struct snd_info_buffer *buffer)
 {
 	snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0, 0x40, 4);
 }
 
-static void snd_emu_proc_ptr_reg_read20b(snd_info_entry_t *entry,
-					 snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_read20b(struct snd_info_entry *entry,
+					 struct snd_info_buffer *buffer)
 {
 	snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x40, 0x40, 4);
 }
 
-static void snd_emu_proc_ptr_reg_read20c(snd_info_entry_t *entry,
-					 snd_info_buffer_t * buffer)
+static void snd_emu_proc_ptr_reg_read20c(struct snd_info_entry *entry,
+					 struct snd_info_buffer * buffer)
 {
 	snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x80, 0x20, 4);
 }
@@ -525,9 +526,9 @@ static struct snd_info_entry_ops snd_emu10k1_proc_ops_fx8010 = {
 	.read = snd_emu10k1_fx8010_read,
 };
 
-int __devinit snd_emu10k1_proc_init(emu10k1_t * emu)
+int __devinit snd_emu10k1_proc_init(struct snd_emu10k1 * emu)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 #ifdef CONFIG_SND_DEBUG
 	if (! snd_card_proc_new(emu->card, "io_regs", &entry)) {
 		snd_info_set_text_ops(entry, emu, 1024, snd_emu_proc_io_reg_read);
diff --git a/sound/pci/emu10k1/io.c b/sound/pci/emu10k1/io.c
index b9d3ae0dcab..5d116dd7403 100644
--- a/sound/pci/emu10k1/io.c
+++ b/sound/pci/emu10k1/io.c
@@ -30,7 +30,7 @@
 #include <sound/core.h>
 #include <sound/emu10k1.h>
 
-unsigned int snd_emu10k1_ptr_read(emu10k1_t * emu, unsigned int reg, unsigned int chn)
+unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn)
 {
 	unsigned long flags;
 	unsigned int regptr, val;
@@ -61,7 +61,7 @@ unsigned int snd_emu10k1_ptr_read(emu10k1_t * emu, unsigned int reg, unsigned in
 	}
 }
 
-void snd_emu10k1_ptr_write(emu10k1_t *emu, unsigned int reg, unsigned int chn, unsigned int data)
+void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data)
 {
 	unsigned int regptr;
 	unsigned long flags;
@@ -91,7 +91,7 @@ void snd_emu10k1_ptr_write(emu10k1_t *emu, unsigned int reg, unsigned int chn, u
 	}
 }
 
-unsigned int snd_emu10k1_ptr20_read(emu10k1_t * emu, 
+unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, 
 					  unsigned int reg, 
 					  unsigned int chn)
 {
@@ -107,7 +107,7 @@ unsigned int snd_emu10k1_ptr20_read(emu10k1_t * emu,
 	return val;
 }
 
-void snd_emu10k1_ptr20_write(emu10k1_t *emu, 
+void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, 
 				   unsigned int reg, 
 				   unsigned int chn, 
 				   unsigned int data)
@@ -123,7 +123,7 @@ void snd_emu10k1_ptr20_write(emu10k1_t *emu,
 	spin_unlock_irqrestore(&emu->emu_lock, flags);
 }
 
-void snd_emu10k1_intr_enable(emu10k1_t *emu, unsigned int intrenb)
+void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb)
 {
 	unsigned long flags;
 	unsigned int enable;
@@ -134,7 +134,7 @@ void snd_emu10k1_intr_enable(emu10k1_t *emu, unsigned int intrenb)
 	spin_unlock_irqrestore(&emu->emu_lock, flags);
 }
 
-void snd_emu10k1_intr_disable(emu10k1_t *emu, unsigned int intrenb)
+void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb)
 {
 	unsigned long flags;
 	unsigned int enable;
@@ -145,7 +145,7 @@ void snd_emu10k1_intr_disable(emu10k1_t *emu, unsigned int intrenb)
 	spin_unlock_irqrestore(&emu->emu_lock, flags);
 }
 
-void snd_emu10k1_voice_intr_enable(emu10k1_t *emu, unsigned int voicenum)
+void snd_emu10k1_voice_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum)
 {
 	unsigned long flags;
 	unsigned int val;
@@ -165,7 +165,7 @@ void snd_emu10k1_voice_intr_enable(emu10k1_t *emu, unsigned int voicenum)
 	spin_unlock_irqrestore(&emu->emu_lock, flags);
 }
 
-void snd_emu10k1_voice_intr_disable(emu10k1_t *emu, unsigned int voicenum)
+void snd_emu10k1_voice_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum)
 {
 	unsigned long flags;
 	unsigned int val;
@@ -185,7 +185,7 @@ void snd_emu10k1_voice_intr_disable(emu10k1_t *emu, unsigned int voicenum)
 	spin_unlock_irqrestore(&emu->emu_lock, flags);
 }
 
-void snd_emu10k1_voice_intr_ack(emu10k1_t *emu, unsigned int voicenum)
+void snd_emu10k1_voice_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum)
 {
 	unsigned long flags;
 
@@ -202,7 +202,7 @@ void snd_emu10k1_voice_intr_ack(emu10k1_t *emu, unsigned int voicenum)
 	spin_unlock_irqrestore(&emu->emu_lock, flags);
 }
 
-void snd_emu10k1_voice_half_loop_intr_enable(emu10k1_t *emu, unsigned int voicenum)
+void snd_emu10k1_voice_half_loop_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum)
 {
 	unsigned long flags;
 	unsigned int val;
@@ -222,7 +222,7 @@ void snd_emu10k1_voice_half_loop_intr_enable(emu10k1_t *emu, unsigned int voicen
 	spin_unlock_irqrestore(&emu->emu_lock, flags);
 }
 
-void snd_emu10k1_voice_half_loop_intr_disable(emu10k1_t *emu, unsigned int voicenum)
+void snd_emu10k1_voice_half_loop_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum)
 {
 	unsigned long flags;
 	unsigned int val;
@@ -242,7 +242,7 @@ void snd_emu10k1_voice_half_loop_intr_disable(emu10k1_t *emu, unsigned int voice
 	spin_unlock_irqrestore(&emu->emu_lock, flags);
 }
 
-void snd_emu10k1_voice_half_loop_intr_ack(emu10k1_t *emu, unsigned int voicenum)
+void snd_emu10k1_voice_half_loop_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum)
 {
 	unsigned long flags;
 
@@ -259,7 +259,7 @@ void snd_emu10k1_voice_half_loop_intr_ack(emu10k1_t *emu, unsigned int voicenum)
 	spin_unlock_irqrestore(&emu->emu_lock, flags);
 }
 
-void snd_emu10k1_voice_set_loop_stop(emu10k1_t *emu, unsigned int voicenum)
+void snd_emu10k1_voice_set_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum)
 {
 	unsigned long flags;
 	unsigned int sol;
@@ -279,7 +279,7 @@ void snd_emu10k1_voice_set_loop_stop(emu10k1_t *emu, unsigned int voicenum)
 	spin_unlock_irqrestore(&emu->emu_lock, flags);
 }
 
-void snd_emu10k1_voice_clear_loop_stop(emu10k1_t *emu, unsigned int voicenum)
+void snd_emu10k1_voice_clear_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum)
 {
 	unsigned long flags;
 	unsigned int sol;
@@ -299,7 +299,7 @@ void snd_emu10k1_voice_clear_loop_stop(emu10k1_t *emu, unsigned int voicenum)
 	spin_unlock_irqrestore(&emu->emu_lock, flags);
 }
 
-void snd_emu10k1_wait(emu10k1_t *emu, unsigned int wait)
+void snd_emu10k1_wait(struct snd_emu10k1 *emu, unsigned int wait)
 {
 	volatile unsigned count;
 	unsigned int newtime = 0, curtime;
@@ -318,9 +318,9 @@ void snd_emu10k1_wait(emu10k1_t *emu, unsigned int wait)
 	}
 }
 
-unsigned short snd_emu10k1_ac97_read(ac97_t *ac97, unsigned short reg)
+unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
 {
-	emu10k1_t *emu = ac97->private_data;
+	struct snd_emu10k1 *emu = ac97->private_data;
 	unsigned long flags;
 	unsigned short val;
 
@@ -331,9 +331,9 @@ unsigned short snd_emu10k1_ac97_read(ac97_t *ac97, unsigned short reg)
 	return val;
 }
 
-void snd_emu10k1_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short data)
+void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data)
 {
-	emu10k1_t *emu = ac97->private_data;
+	struct snd_emu10k1 *emu = ac97->private_data;
 	unsigned long flags;
 
 	spin_lock_irqsave(&emu->emu_lock, flags);
diff --git a/sound/pci/emu10k1/irq.c b/sound/pci/emu10k1/irq.c
index 594ea063b14..a8b31286b6d 100644
--- a/sound/pci/emu10k1/irq.c
+++ b/sound/pci/emu10k1/irq.c
@@ -32,7 +32,7 @@
 
 irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	emu10k1_t *emu = dev_id;
+	struct snd_emu10k1 *emu = dev_id;
 	unsigned int status, status2, orig_status, orig_status2;
 	int handled = 0;
 
@@ -56,7 +56,7 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 			int voice;
 			int voice_max = status & IPR_CHANNELNUMBERMASK;
 			u32 val;
-			emu10k1_voice_t *pvoice = emu->voices;
+			struct snd_emu10k1_voice *pvoice = emu->voices;
 
 			val = snd_emu10k1_ptr_read(emu, CLIPL, 0);
 			for (voice = 0; voice <= voice_max; voice++) {
@@ -150,8 +150,8 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 		if (status & IPR_P16V) {
 			while ((status2 = inl(emu->port + IPR2)) != 0) {
 				u32 mask = INTE2_PLAYBACK_CH_0_LOOP;  /* Full Loop */
-				emu10k1_voice_t *pvoice = &(emu->p16v_voices[0]);
-				emu10k1_voice_t *cvoice = &(emu->p16v_capture_voice);
+				struct snd_emu10k1_voice *pvoice = &(emu->p16v_voices[0]);
+				struct snd_emu10k1_voice *cvoice = &(emu->p16v_capture_voice);
 
 				//printk(KERN_INFO "status2=0x%x\n", status2);
 				orig_status2 = status2;
diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c
index d42e4aeaa73..68c795c0310 100644
--- a/sound/pci/emu10k1/memory.c
+++ b/sound/pci/emu10k1/memory.c
@@ -48,7 +48,7 @@
 #define set_silent_ptb(emu,page)	__set_ptb_entry(emu,page,emu->silent_page.addr)
 #else
 /* fill PTB entries -- we need to fill UNIT_PAGES entries */
-static inline void set_ptb_entry(emu10k1_t *emu, int page, dma_addr_t addr)
+static inline void set_ptb_entry(struct snd_emu10k1 *emu, int page, dma_addr_t addr)
 {
 	int i;
 	page *= UNIT_PAGES;
@@ -57,7 +57,7 @@ static inline void set_ptb_entry(emu10k1_t *emu, int page, dma_addr_t addr)
 		addr += EMUPAGESIZE;
 	}
 }
-static inline void set_silent_ptb(emu10k1_t *emu, int page)
+static inline void set_silent_ptb(struct snd_emu10k1 *emu, int page)
 {
 	int i;
 	page *= UNIT_PAGES;
@@ -70,14 +70,14 @@ static inline void set_silent_ptb(emu10k1_t *emu, int page)
 
 /*
  */
-static int synth_alloc_pages(emu10k1_t *hw, emu10k1_memblk_t *blk);
-static int synth_free_pages(emu10k1_t *hw, emu10k1_memblk_t *blk);
+static int synth_alloc_pages(struct snd_emu10k1 *hw, struct snd_emu10k1_memblk *blk);
+static int synth_free_pages(struct snd_emu10k1 *hw, struct snd_emu10k1_memblk *blk);
 
-#define get_emu10k1_memblk(l,member)	list_entry(l, emu10k1_memblk_t, member)
+#define get_emu10k1_memblk(l,member)	list_entry(l, struct snd_emu10k1_memblk, member)
 
 
 /* initialize emu10k1 part */
-static void emu10k1_memblk_init(emu10k1_memblk_t *blk)
+static void emu10k1_memblk_init(struct snd_emu10k1_memblk *blk)
 {
 	blk->mapped_page = -1;
 	INIT_LIST_HEAD(&blk->mapped_link);
@@ -96,7 +96,7 @@ static void emu10k1_memblk_init(emu10k1_memblk_t *blk)
  * in nextp
  * if not found, return a negative error code.
  */
-static int search_empty_map_area(emu10k1_t *emu, int npages, struct list_head **nextp)
+static int search_empty_map_area(struct snd_emu10k1 *emu, int npages, struct list_head **nextp)
 {
 	int page = 0, found_page = -ENOMEM;
 	int max_size = npages;
@@ -105,7 +105,7 @@ static int search_empty_map_area(emu10k1_t *emu, int npages, struct list_head **
 	struct list_head *pos;
 
 	list_for_each (pos, &emu->mapped_link_head) {
-		emu10k1_memblk_t *blk = get_emu10k1_memblk(pos, mapped_link);
+		struct snd_emu10k1_memblk *blk = get_emu10k1_memblk(pos, mapped_link);
 		snd_assert(blk->mapped_page >= 0, continue);
 		size = blk->mapped_page - page;
 		if (size == npages) {
@@ -134,7 +134,7 @@ static int search_empty_map_area(emu10k1_t *emu, int npages, struct list_head **
  *
  * call with memblk_lock held
  */
-static int map_memblk(emu10k1_t *emu, emu10k1_memblk_t *blk)
+static int map_memblk(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
 {
 	int page, pg;
 	struct list_head *next;
@@ -161,11 +161,11 @@ static int map_memblk(emu10k1_t *emu, emu10k1_memblk_t *blk)
  *
  * call with memblk_lock held
  */
-static int unmap_memblk(emu10k1_t *emu, emu10k1_memblk_t *blk)
+static int unmap_memblk(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
 {
 	int start_page, end_page, mpage, pg;
 	struct list_head *p;
-	emu10k1_memblk_t *q;
+	struct snd_emu10k1_memblk *q;
 
 	/* calculate the expected size of empty region */
 	if ((p = blk->mapped_link.prev) != &emu->mapped_link_head) {
@@ -197,11 +197,11 @@ static int unmap_memblk(emu10k1_t *emu, emu10k1_memblk_t *blk)
  *
  * unlike synth_alloc the memory block is aligned to the page start
  */
-static emu10k1_memblk_t *
-search_empty(emu10k1_t *emu, int size)
+static struct snd_emu10k1_memblk *
+search_empty(struct snd_emu10k1 *emu, int size)
 {
 	struct list_head *p;
-	emu10k1_memblk_t *blk;
+	struct snd_emu10k1_memblk *blk;
 	int page, psize;
 
 	psize = get_aligned_page(size + PAGE_SIZE -1);
@@ -217,7 +217,7 @@ search_empty(emu10k1_t *emu, int size)
 
 __found_pages:
 	/* create a new memory block */
-	blk = (emu10k1_memblk_t *)__snd_util_memblk_new(emu->memhdr, psize << PAGE_SHIFT, p->prev);
+	blk = (struct snd_emu10k1_memblk *)__snd_util_memblk_new(emu->memhdr, psize << PAGE_SHIFT, p->prev);
 	if (blk == NULL)
 		return NULL;
 	blk->mem.offset = aligned_page_offset(page); /* set aligned offset */
@@ -229,7 +229,7 @@ __found_pages:
 /*
  * check if the given pointer is valid for pages
  */
-static int is_valid_page(emu10k1_t *emu, dma_addr_t addr)
+static int is_valid_page(struct snd_emu10k1 *emu, dma_addr_t addr)
 {
 	if (addr & ~emu->dma_mask) {
 		snd_printk(KERN_ERR "max memory size is 0x%lx (addr = 0x%lx)!!\n", emu->dma_mask, (unsigned long)addr);
@@ -248,12 +248,12 @@ static int is_valid_page(emu10k1_t *emu, dma_addr_t addr)
  * if no empty pages are found, tries to release unsed memory blocks
  * and retry the mapping.
  */
-int snd_emu10k1_memblk_map(emu10k1_t *emu, emu10k1_memblk_t *blk)
+int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
 {
 	int err;
 	int size;
 	struct list_head *p, *nextp;
-	emu10k1_memblk_t *deleted;
+	struct snd_emu10k1_memblk *deleted;
 	unsigned long flags;
 
 	spin_lock_irqsave(&emu->memblk_lock, flags);
@@ -288,13 +288,13 @@ int snd_emu10k1_memblk_map(emu10k1_t *emu, emu10k1_memblk_t *blk)
 /*
  * page allocation for DMA
  */
-snd_util_memblk_t *
-snd_emu10k1_alloc_pages(emu10k1_t *emu, snd_pcm_substream_t *substream)
+struct snd_util_memblk *
+snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
-	snd_util_memhdr_t *hdr;
-	emu10k1_memblk_t *blk;
+	struct snd_util_memhdr *hdr;
+	struct snd_emu10k1_memblk *blk;
 	int page, err, idx;
 
 	snd_assert(emu, return NULL);
@@ -336,19 +336,19 @@ snd_emu10k1_alloc_pages(emu10k1_t *emu, snd_pcm_substream_t *substream)
 	blk->map_locked = 1; /* do not unmap this block! */
 	err = snd_emu10k1_memblk_map(emu, blk);
 	if (err < 0) {
-		__snd_util_mem_free(hdr, (snd_util_memblk_t *)blk);
+		__snd_util_mem_free(hdr, (struct snd_util_memblk *)blk);
 		up(&hdr->block_mutex);
 		return NULL;
 	}
 	up(&hdr->block_mutex);
-	return (snd_util_memblk_t *)blk;
+	return (struct snd_util_memblk *)blk;
 }
 
 
 /*
  * release DMA buffer from page table
  */
-int snd_emu10k1_free_pages(emu10k1_t *emu, snd_util_memblk_t *blk)
+int snd_emu10k1_free_pages(struct snd_emu10k1 *emu, struct snd_util_memblk *blk)
 {
 	snd_assert(emu && blk, return -EINVAL);
 	return snd_emu10k1_synth_free(emu, blk);
@@ -363,26 +363,26 @@ int snd_emu10k1_free_pages(emu10k1_t *emu, snd_util_memblk_t *blk)
 /*
  * allocate a synth sample area
  */
-snd_util_memblk_t *
-snd_emu10k1_synth_alloc(emu10k1_t *hw, unsigned int size)
+struct snd_util_memblk *
+snd_emu10k1_synth_alloc(struct snd_emu10k1 *hw, unsigned int size)
 {
-	emu10k1_memblk_t *blk;
-	snd_util_memhdr_t *hdr = hw->memhdr; 
+	struct snd_emu10k1_memblk *blk;
+	struct snd_util_memhdr *hdr = hw->memhdr; 
 
 	down(&hdr->block_mutex);
-	blk = (emu10k1_memblk_t *)__snd_util_mem_alloc(hdr, size);
+	blk = (struct snd_emu10k1_memblk *)__snd_util_mem_alloc(hdr, size);
 	if (blk == NULL) {
 		up(&hdr->block_mutex);
 		return NULL;
 	}
 	if (synth_alloc_pages(hw, blk)) {
-		__snd_util_mem_free(hdr, (snd_util_memblk_t *)blk);
+		__snd_util_mem_free(hdr, (struct snd_util_memblk *)blk);
 		up(&hdr->block_mutex);
 		return NULL;
 	}
 	snd_emu10k1_memblk_map(hw, blk);
 	up(&hdr->block_mutex);
-	return (snd_util_memblk_t *)blk;
+	return (struct snd_util_memblk *)blk;
 }
 
 
@@ -390,10 +390,10 @@ snd_emu10k1_synth_alloc(emu10k1_t *hw, unsigned int size)
  * free a synth sample area
  */
 int
-snd_emu10k1_synth_free(emu10k1_t *emu, snd_util_memblk_t *memblk)
+snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *memblk)
 {
-	snd_util_memhdr_t *hdr = emu->memhdr; 
-	emu10k1_memblk_t *blk = (emu10k1_memblk_t *)memblk;
+	struct snd_util_memhdr *hdr = emu->memhdr; 
+	struct snd_emu10k1_memblk *blk = (struct snd_emu10k1_memblk *)memblk;
 	unsigned long flags;
 
 	down(&hdr->block_mutex);
@@ -409,10 +409,12 @@ snd_emu10k1_synth_free(emu10k1_t *emu, snd_util_memblk_t *memblk)
 
 
 /* check new allocation range */
-static void get_single_page_range(snd_util_memhdr_t *hdr, emu10k1_memblk_t *blk, int *first_page_ret, int *last_page_ret)
+static void get_single_page_range(struct snd_util_memhdr *hdr,
+				  struct snd_emu10k1_memblk *blk,
+				  int *first_page_ret, int *last_page_ret)
 {
 	struct list_head *p;
-	emu10k1_memblk_t *q;
+	struct snd_emu10k1_memblk *q;
 	int first_page, last_page;
 	first_page = blk->first_page;
 	if ((p = blk->mem.list.prev) != &hdr->block) {
@@ -433,7 +435,7 @@ static void get_single_page_range(snd_util_memhdr_t *hdr, emu10k1_memblk_t *blk,
 /*
  * allocate kernel pages
  */
-static int synth_alloc_pages(emu10k1_t *emu, emu10k1_memblk_t *blk)
+static int synth_alloc_pages(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
 {
 	int page, first_page, last_page;
 	struct snd_dma_buffer dmab;
@@ -472,7 +474,7 @@ __fail:
 /*
  * free pages
  */
-static int synth_free_pages(emu10k1_t *emu, emu10k1_memblk_t *blk)
+static int synth_free_pages(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk)
 {
 	int page, first_page, last_page;
 	struct snd_dma_buffer dmab;
@@ -495,7 +497,7 @@ static int synth_free_pages(emu10k1_t *emu, emu10k1_memblk_t *blk)
 }
 
 /* calculate buffer pointer from offset address */
-static inline void *offset_ptr(emu10k1_t *emu, int page, int offset)
+static inline void *offset_ptr(struct snd_emu10k1 *emu, int page, int offset)
 {
 	char *ptr;
 	snd_assert(page >= 0 && page < emu->max_cache_pages, return NULL);
@@ -511,11 +513,12 @@ static inline void *offset_ptr(emu10k1_t *emu, int page, int offset)
 /*
  * bzero(blk + offset, size)
  */
-int snd_emu10k1_synth_bzero(emu10k1_t *emu, snd_util_memblk_t *blk, int offset, int size)
+int snd_emu10k1_synth_bzero(struct snd_emu10k1 *emu, struct snd_util_memblk *blk,
+			    int offset, int size)
 {
 	int page, nextofs, end_offset, temp, temp1;
 	void *ptr;
-	emu10k1_memblk_t *p = (emu10k1_memblk_t *)blk;
+	struct snd_emu10k1_memblk *p = (struct snd_emu10k1_memblk *)blk;
 
 	offset += blk->offset & (PAGE_SIZE - 1);
 	end_offset = offset + size;
@@ -538,11 +541,12 @@ int snd_emu10k1_synth_bzero(emu10k1_t *emu, snd_util_memblk_t *blk, int offset,
 /*
  * copy_from_user(blk + offset, data, size)
  */
-int snd_emu10k1_synth_copy_from_user(emu10k1_t *emu, snd_util_memblk_t *blk, int offset, const char __user *data, int size)
+int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, struct snd_util_memblk *blk,
+				     int offset, const char __user *data, int size)
 {
 	int page, nextofs, end_offset, temp, temp1;
 	void *ptr;
-	emu10k1_memblk_t *p = (emu10k1_memblk_t *)blk;
+	struct snd_emu10k1_memblk *p = (struct snd_emu10k1_memblk *)blk;
 
 	offset += blk->offset & (PAGE_SIZE - 1);
 	end_offset = offset + size;
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c
index 3b456007ba2..90470de8bb8 100644
--- a/sound/pci/emu10k1/p16v.c
+++ b/sound/pci/emu10k1/p16v.c
@@ -121,7 +121,7 @@
  */
 
  /* hardware definition */
-static snd_pcm_hardware_t snd_p16v_playback_hw = {
+static struct snd_pcm_hardware snd_p16v_playback_hw = {
 	.info =			(SNDRV_PCM_INFO_MMAP | 
 				 SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -140,7 +140,7 @@ static snd_pcm_hardware_t snd_p16v_playback_hw = {
 	.fifo_size =		0,
 };
 
-static snd_pcm_hardware_t snd_p16v_capture_hw = {
+static struct snd_pcm_hardware snd_p16v_capture_hw = {
 	.info =			(SNDRV_PCM_INFO_MMAP |
 				 SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -159,9 +159,9 @@ static snd_pcm_hardware_t snd_p16v_capture_hw = {
 	.fifo_size =		0,
 };
 
-static void snd_p16v_pcm_free_substream(snd_pcm_runtime_t *runtime)
+static void snd_p16v_pcm_free_substream(struct snd_pcm_runtime *runtime)
 {
-	emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
   
 	if (epcm) {
         	//snd_printk("epcm free: %p\n", epcm);
@@ -170,12 +170,12 @@ static void snd_p16v_pcm_free_substream(snd_pcm_runtime_t *runtime)
 }
 
 /* open_playback callback */
-static int snd_p16v_pcm_open_playback_channel(snd_pcm_substream_t *substream, int channel_id)
+static int snd_p16v_pcm_open_playback_channel(struct snd_pcm_substream *substream, int channel_id)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-        emu10k1_voice_t *channel = &(emu->p16v_voices[channel_id]);
-	emu10k1_pcm_t *epcm;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+        struct snd_emu10k1_voice *channel = &(emu->p16v_voices[channel_id]);
+	struct snd_emu10k1_pcm *epcm;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 
 	epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
@@ -206,12 +206,12 @@ static int snd_p16v_pcm_open_playback_channel(snd_pcm_substream_t *substream, in
 	return 0;
 }
 /* open_capture callback */
-static int snd_p16v_pcm_open_capture_channel(snd_pcm_substream_t *substream, int channel_id)
+static int snd_p16v_pcm_open_capture_channel(struct snd_pcm_substream *substream, int channel_id)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	emu10k1_voice_t *channel = &(emu->p16v_capture_voice);
-	emu10k1_pcm_t *epcm;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_emu10k1_voice *channel = &(emu->p16v_capture_voice);
+	struct snd_emu10k1_pcm *epcm;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int err;
 
 	epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
@@ -244,41 +244,41 @@ static int snd_p16v_pcm_open_capture_channel(snd_pcm_substream_t *substream, int
 
 
 /* close callback */
-static int snd_p16v_pcm_close_playback(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_close_playback(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	//snd_pcm_runtime_t *runtime = substream->runtime;
-	//emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	//struct snd_pcm_runtime *runtime = substream->runtime;
+	//struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	emu->p16v_voices[substream->pcm->device - emu->p16v_device_offset].use=0;
 	/* FIXME: maybe zero others */
 	return 0;
 }
 
 /* close callback */
-static int snd_p16v_pcm_close_capture(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_close_capture(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	//snd_pcm_runtime_t *runtime = substream->runtime;
-	//emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	//struct snd_pcm_runtime *runtime = substream->runtime;
+	//struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	emu->p16v_capture_voice.use=0;
 	/* FIXME: maybe zero others */
 	return 0;
 }
 
-static int snd_p16v_pcm_open_playback_front(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_open_playback_front(struct snd_pcm_substream *substream)
 {
 	return snd_p16v_pcm_open_playback_channel(substream, PCM_FRONT_CHANNEL);
 }
 
-static int snd_p16v_pcm_open_capture(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_open_capture(struct snd_pcm_substream *substream)
 {
 	// Only using channel 0 for now, but the card has 2 channels.
 	return snd_p16v_pcm_open_capture_channel(substream, 0);
 }
 
 /* hw_params callback */
-static int snd_p16v_pcm_hw_params_playback(snd_pcm_substream_t *substream,
-				      snd_pcm_hw_params_t * hw_params)
+static int snd_p16v_pcm_hw_params_playback(struct snd_pcm_substream *substream,
+				      struct snd_pcm_hw_params *hw_params)
 {
 	int result;
 	result = snd_pcm_lib_malloc_pages(substream,
@@ -287,8 +287,8 @@ static int snd_p16v_pcm_hw_params_playback(snd_pcm_substream_t *substream,
 }
 
 /* hw_params callback */
-static int snd_p16v_pcm_hw_params_capture(snd_pcm_substream_t *substream,
-				      snd_pcm_hw_params_t * hw_params)
+static int snd_p16v_pcm_hw_params_capture(struct snd_pcm_substream *substream,
+				      struct snd_pcm_hw_params *hw_params)
 {
 	int result;
 	result = snd_pcm_lib_malloc_pages(substream,
@@ -298,7 +298,7 @@ static int snd_p16v_pcm_hw_params_capture(snd_pcm_substream_t *substream,
 
 
 /* hw_free callback */
-static int snd_p16v_pcm_hw_free_playback(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_hw_free_playback(struct snd_pcm_substream *substream)
 {
 	int result;
 	result = snd_pcm_lib_free_pages(substream);
@@ -306,7 +306,7 @@ static int snd_p16v_pcm_hw_free_playback(snd_pcm_substream_t *substream)
 }
 
 /* hw_free callback */
-static int snd_p16v_pcm_hw_free_capture(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_hw_free_capture(struct snd_pcm_substream *substream)
 {
 	int result;
 	result = snd_pcm_lib_free_pages(substream);
@@ -315,10 +315,10 @@ static int snd_p16v_pcm_hw_free_capture(snd_pcm_substream_t *substream)
 
 
 /* prepare playback callback */
-static int snd_p16v_pcm_prepare_playback(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_prepare_playback(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int channel = substream->pcm->device - emu->p16v_device_offset;
 	u32 *table_base = (u32 *)(emu->p16v_buffer.area+(8*16*channel));
 	u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size);
@@ -364,10 +364,10 @@ static int snd_p16v_pcm_prepare_playback(snd_pcm_substream_t *substream)
 }
 
 /* prepare capture callback */
-static int snd_p16v_pcm_prepare_capture(snd_pcm_substream_t *substream)
+static int snd_p16v_pcm_prepare_capture(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int channel = substream->pcm->device - emu->p16v_device_offset;
 	u32 tmp;
 	//printk("prepare capture:channel_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, frames_to_bytes=%d\n",channel, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size,  frames_to_bytes(runtime, 1));
@@ -398,7 +398,7 @@ static int snd_p16v_pcm_prepare_capture(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-static void snd_p16v_intr_enable(emu10k1_t *emu, unsigned int intrenb)
+static void snd_p16v_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb)
 {
 	unsigned long flags;
 	unsigned int enable;
@@ -409,7 +409,7 @@ static void snd_p16v_intr_enable(emu10k1_t *emu, unsigned int intrenb)
 	spin_unlock_irqrestore(&emu->emu_lock, flags);
 }
 
-static void snd_p16v_intr_disable(emu10k1_t *emu, unsigned int intrenb)
+static void snd_p16v_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb)
 {
 	unsigned long flags;
 	unsigned int disable;
@@ -421,16 +421,16 @@ static void snd_p16v_intr_disable(emu10k1_t *emu, unsigned int intrenb)
 }
 
 /* trigger_playback callback */
-static int snd_p16v_pcm_trigger_playback(snd_pcm_substream_t *substream,
+static int snd_p16v_pcm_trigger_playback(struct snd_pcm_substream *substream,
 				    int cmd)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime;
-	emu10k1_pcm_t *epcm;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime;
+	struct snd_emu10k1_pcm *epcm;
 	int channel;
 	int result = 0;
 	struct list_head *pos;
-        snd_pcm_substream_t *s;
+        struct snd_pcm_substream *s;
 	u32 basic = 0;
 	u32 inte = 0;
 	int running=0;
@@ -474,12 +474,12 @@ static int snd_p16v_pcm_trigger_playback(snd_pcm_substream_t *substream,
 }
 
 /* trigger_capture callback */
-static int snd_p16v_pcm_trigger_capture(snd_pcm_substream_t *substream,
+static int snd_p16v_pcm_trigger_capture(struct snd_pcm_substream *substream,
                                    int cmd)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	int channel = 0;
 	int result = 0;
 	u32 inte = INTE2_CAPTURE_CH_0_LOOP | INTE2_CAPTURE_CH_0_HALF_LOOP;
@@ -505,11 +505,11 @@ static int snd_p16v_pcm_trigger_capture(snd_pcm_substream_t *substream,
 
 /* pointer_playback callback */
 static snd_pcm_uframes_t
-snd_p16v_pcm_pointer_playback(snd_pcm_substream_t *substream)
+snd_p16v_pcm_pointer_playback(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	snd_pcm_uframes_t ptr, ptr1, ptr2,ptr3,ptr4 = 0;
 	int channel = substream->pcm->device - emu->p16v_device_offset;
 	if (!epcm->running)
@@ -530,11 +530,11 @@ snd_p16v_pcm_pointer_playback(snd_pcm_substream_t *substream)
 
 /* pointer_capture callback */
 static snd_pcm_uframes_t
-snd_p16v_pcm_pointer_capture(snd_pcm_substream_t *substream)
+snd_p16v_pcm_pointer_capture(struct snd_pcm_substream *substream)
 {
-	emu10k1_t *emu = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	emu10k1_pcm_t *epcm = runtime->private_data;
+	struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_emu10k1_pcm *epcm = runtime->private_data;
 	snd_pcm_uframes_t ptr, ptr1, ptr2 = 0;
 	int channel = 0;
 
@@ -554,7 +554,7 @@ snd_p16v_pcm_pointer_capture(snd_pcm_substream_t *substream)
 }
 
 /* operators */
-static snd_pcm_ops_t snd_p16v_playback_front_ops = {
+static struct snd_pcm_ops snd_p16v_playback_front_ops = {
 	.open =        snd_p16v_pcm_open_playback_front,
 	.close =       snd_p16v_pcm_close_playback,
 	.ioctl =       snd_pcm_lib_ioctl,
@@ -565,7 +565,7 @@ static snd_pcm_ops_t snd_p16v_playback_front_ops = {
 	.pointer =     snd_p16v_pcm_pointer_playback,
 };
 
-static snd_pcm_ops_t snd_p16v_capture_ops = {
+static struct snd_pcm_ops snd_p16v_capture_ops = {
 	.open =        snd_p16v_pcm_open_capture,
 	.close =       snd_p16v_pcm_close_capture,
 	.ioctl =       snd_pcm_lib_ioctl,
@@ -577,7 +577,7 @@ static snd_pcm_ops_t snd_p16v_capture_ops = {
 };
 
 
-int snd_p16v_free(emu10k1_t *chip)
+int snd_p16v_free(struct snd_emu10k1 *chip)
 {
 	// release the data
 	if (chip->p16v_buffer.area) {
@@ -587,10 +587,10 @@ int snd_p16v_free(emu10k1_t *chip)
 	return 0;
 }
 
-int snd_p16v_pcm(emu10k1_t *emu, int device, snd_pcm_t **rpcm)
+int snd_p16v_pcm(struct snd_emu10k1 *emu, int device, struct snd_pcm **rpcm)
 {
-	snd_pcm_t *pcm;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm *pcm;
+	struct snd_pcm_substream *substream;
 	int err;
         int capture=1;
   
@@ -641,7 +641,7 @@ int snd_p16v_pcm(emu10k1_t *emu, int device, snd_pcm_t **rpcm)
 	return 0;
 }
 
-static int snd_p16v_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_p16v_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
         uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
         uinfo->count = 2;
@@ -650,10 +650,10 @@ static int snd_p16v_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
         return 0;
 }
 
-static int snd_p16v_volume_get(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol, int reg, int high_low)
+static int snd_p16v_volume_get(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol, int reg, int high_low)
 {
-        emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+        struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
         u32 value;
 
         value = snd_emu10k1_ptr20_read(emu, reg, high_low);
@@ -667,71 +667,71 @@ static int snd_p16v_volume_get(snd_kcontrol_t * kcontrol,
         return 0;
 }
 
-static int snd_p16v_volume_get_spdif_front(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_spdif_front(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 0;
 	int reg = PLAYBACK_VOLUME_MIXER7;
         return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
 }
 
-static int snd_p16v_volume_get_spdif_center_lfe(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_spdif_center_lfe(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 1;
 	int reg = PLAYBACK_VOLUME_MIXER7;
         return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
 }
-static int snd_p16v_volume_get_spdif_unknown(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_spdif_unknown(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 0;
 	int reg = PLAYBACK_VOLUME_MIXER8;
         return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
 }
-static int snd_p16v_volume_get_spdif_rear(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_spdif_rear(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 1;
 	int reg = PLAYBACK_VOLUME_MIXER8;
         return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
 }
 
-static int snd_p16v_volume_get_analog_front(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_analog_front(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 0;
 	int reg = PLAYBACK_VOLUME_MIXER9;
         return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
 }
 
-static int snd_p16v_volume_get_analog_center_lfe(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_analog_center_lfe(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 1;
 	int reg = PLAYBACK_VOLUME_MIXER9;
         return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
 }
-static int snd_p16v_volume_get_analog_rear(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_analog_rear(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 1;
 	int reg = PLAYBACK_VOLUME_MIXER10;
         return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
 }
 
-static int snd_p16v_volume_get_analog_unknown(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_get_analog_unknown(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 0;
 	int reg = PLAYBACK_VOLUME_MIXER10;
         return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low);
 }
 
-static int snd_p16v_volume_put(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol, int reg, int high_low)
+static int snd_p16v_volume_put(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol, int reg, int high_low)
 {
-        emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+        struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
         u32 value;
         value = snd_emu10k1_ptr20_read(emu, reg, 0);
         //value = value & 0xffff;
@@ -746,71 +746,71 @@ static int snd_p16v_volume_put(snd_kcontrol_t * kcontrol,
         return 1;
 }
 
-static int snd_p16v_volume_put_spdif_front(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_spdif_front(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 0;
 	int reg = PLAYBACK_VOLUME_MIXER7;
         return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
 }
 
-static int snd_p16v_volume_put_spdif_center_lfe(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_spdif_center_lfe(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 1;
 	int reg = PLAYBACK_VOLUME_MIXER7;
         return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
 }
 
-static int snd_p16v_volume_put_spdif_unknown(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_spdif_unknown(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 0;
 	int reg = PLAYBACK_VOLUME_MIXER8;
         return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
 }
 
-static int snd_p16v_volume_put_spdif_rear(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_spdif_rear(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 1;
 	int reg = PLAYBACK_VOLUME_MIXER8;
         return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
 }
 
-static int snd_p16v_volume_put_analog_front(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_analog_front(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 0;
 	int reg = PLAYBACK_VOLUME_MIXER9;
         return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
 }
 
-static int snd_p16v_volume_put_analog_center_lfe(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_analog_center_lfe(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 1;
 	int reg = PLAYBACK_VOLUME_MIXER9;
         return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
 }
 
-static int snd_p16v_volume_put_analog_rear(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_analog_rear(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 1;
 	int reg = PLAYBACK_VOLUME_MIXER10;
         return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
 }
 
-static int snd_p16v_volume_put_analog_unknown(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_volume_put_analog_unknown(struct snd_kcontrol *kcontrol,
+                                       struct snd_ctl_elem_value *ucontrol)
 {
 	int high_low = 0;
 	int reg = PLAYBACK_VOLUME_MIXER10;
         return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low);
 }
 
-static snd_kcontrol_new_t snd_p16v_volume_control_analog_front =
+static struct snd_kcontrol_new snd_p16v_volume_control_analog_front =
 {
         .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
         .name =         "HD Analog Front Playback Volume",
@@ -819,7 +819,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_analog_front =
         .put =          snd_p16v_volume_put_analog_front
 };
 
-static snd_kcontrol_new_t snd_p16v_volume_control_analog_center_lfe =
+static struct snd_kcontrol_new snd_p16v_volume_control_analog_center_lfe =
 {
         .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
         .name =         "HD Analog Center/LFE Playback Volume",
@@ -828,7 +828,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_analog_center_lfe =
         .put =          snd_p16v_volume_put_analog_center_lfe
 };
 
-static snd_kcontrol_new_t snd_p16v_volume_control_analog_unknown =
+static struct snd_kcontrol_new snd_p16v_volume_control_analog_unknown =
 {
         .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
         .name =         "HD Analog Unknown Playback Volume",
@@ -837,7 +837,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_analog_unknown =
         .put =          snd_p16v_volume_put_analog_unknown
 };
 
-static snd_kcontrol_new_t snd_p16v_volume_control_analog_rear =
+static struct snd_kcontrol_new snd_p16v_volume_control_analog_rear =
 {
         .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
         .name =         "HD Analog Rear Playback Volume",
@@ -846,7 +846,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_analog_rear =
         .put =          snd_p16v_volume_put_analog_rear
 };
 
-static snd_kcontrol_new_t snd_p16v_volume_control_spdif_front =
+static struct snd_kcontrol_new snd_p16v_volume_control_spdif_front =
 {
         .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
         .name =         "HD SPDIF Front Playback Volume",
@@ -855,7 +855,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_spdif_front =
         .put =          snd_p16v_volume_put_spdif_front
 };
 
-static snd_kcontrol_new_t snd_p16v_volume_control_spdif_center_lfe =
+static struct snd_kcontrol_new snd_p16v_volume_control_spdif_center_lfe =
 {
         .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
         .name =         "HD SPDIF Center/LFE Playback Volume",
@@ -864,7 +864,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_spdif_center_lfe =
         .put =          snd_p16v_volume_put_spdif_center_lfe
 };
 
-static snd_kcontrol_new_t snd_p16v_volume_control_spdif_unknown =
+static struct snd_kcontrol_new snd_p16v_volume_control_spdif_unknown =
 {
         .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
         .name =         "HD SPDIF Unknown Playback Volume",
@@ -873,7 +873,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_spdif_unknown =
         .put =          snd_p16v_volume_put_spdif_unknown
 };
 
-static snd_kcontrol_new_t snd_p16v_volume_control_spdif_rear =
+static struct snd_kcontrol_new snd_p16v_volume_control_spdif_rear =
 {
         .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
         .name =         "HD SPDIF Rear Playback Volume",
@@ -882,7 +882,7 @@ static snd_kcontrol_new_t snd_p16v_volume_control_spdif_rear =
         .put =          snd_p16v_volume_put_spdif_rear
 };
 
-static int snd_p16v_capture_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_p16v_capture_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[8] = { "SPDIF", "I2S", "SRC48", "SRCMulti_SPDIF", "SRCMulti_I2S", "CDIF", "FX", "AC97" };
 
@@ -895,19 +895,19 @@ static int snd_p16v_capture_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i
 	return 0;
 }
 
-static int snd_p16v_capture_source_get(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_capture_source_get(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] = emu->p16v_capture_source;
 	return 0;
 }
 
-static int snd_p16v_capture_source_put(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_capture_source_put(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	unsigned int val;
 	int change = 0;
 	u32 mask;
@@ -924,7 +924,7 @@ static int snd_p16v_capture_source_put(snd_kcontrol_t * kcontrol,
         return change;
 }
 
-static snd_kcontrol_new_t snd_p16v_capture_source __devinitdata =
+static struct snd_kcontrol_new snd_p16v_capture_source __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =		"HD source Capture",
@@ -933,7 +933,7 @@ static snd_kcontrol_new_t snd_p16v_capture_source __devinitdata =
 	.put =		snd_p16v_capture_source_put
 };
 
-static int snd_p16v_capture_channel_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_p16v_capture_channel_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[4] = { "0", "1", "2", "3",  };
 
@@ -946,19 +946,19 @@ static int snd_p16v_capture_channel_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_
 	return 0;
 }
 
-static int snd_p16v_capture_channel_get(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_capture_channel_get(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] = emu->p16v_capture_channel;
 	return 0;
 }
 
-static int snd_p16v_capture_channel_put(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_p16v_capture_channel_put(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
+	struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
 	unsigned int val;
 	int change = 0;
 	u32 tmp;
@@ -973,7 +973,7 @@ static int snd_p16v_capture_channel_put(snd_kcontrol_t * kcontrol,
         return change;
 }
 
-static snd_kcontrol_new_t snd_p16v_capture_channel __devinitdata =
+static struct snd_kcontrol_new snd_p16v_capture_channel __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =		"HD channel Capture",
@@ -982,11 +982,11 @@ static snd_kcontrol_new_t snd_p16v_capture_channel __devinitdata =
 	.put =		snd_p16v_capture_channel_put
 };
 
-int snd_p16v_mixer(emu10k1_t *emu)
+int snd_p16v_mixer(struct snd_emu10k1 *emu)
 {
         int err;
-        snd_kcontrol_t *kctl;
-        snd_card_t *card = emu->card;
+        struct snd_kcontrol *kctl;
+        struct snd_card *card = emu->card;
         if ((kctl = snd_ctl_new1(&snd_p16v_volume_control_analog_front, emu)) == NULL)
                 return -ENOMEM;
         if ((err = snd_ctl_add(card, kctl)))
diff --git a/sound/pci/emu10k1/timer.c b/sound/pci/emu10k1/timer.c
index d2e364607c1..6295b2dca78 100644
--- a/sound/pci/emu10k1/timer.c
+++ b/sound/pci/emu10k1/timer.c
@@ -30,9 +30,9 @@
 #include <sound/core.h>
 #include <sound/emu10k1.h>
 
-static int snd_emu10k1_timer_start(snd_timer_t *timer)
+static int snd_emu10k1_timer_start(struct snd_timer *timer)
 {
-	emu10k1_t *emu;
+	struct snd_emu10k1 *emu;
 	unsigned long flags;
 	unsigned int delay;
 
@@ -47,9 +47,9 @@ static int snd_emu10k1_timer_start(snd_timer_t *timer)
 	return 0;
 }
 
-static int snd_emu10k1_timer_stop(snd_timer_t *timer)
+static int snd_emu10k1_timer_stop(struct snd_timer *timer)
 {
-	emu10k1_t *emu;
+	struct snd_emu10k1 *emu;
 	unsigned long flags;
 
 	emu = snd_timer_chip(timer);
@@ -59,7 +59,7 @@ static int snd_emu10k1_timer_stop(snd_timer_t *timer)
 	return 0;
 }
 
-static int snd_emu10k1_timer_precise_resolution(snd_timer_t *timer,
+static int snd_emu10k1_timer_precise_resolution(struct snd_timer *timer,
 					       unsigned long *num, unsigned long *den)
 {
 	*num = 1;
@@ -67,7 +67,7 @@ static int snd_emu10k1_timer_precise_resolution(snd_timer_t *timer,
 	return 0;
 }
 
-static struct _snd_timer_hardware snd_emu10k1_timer_hw = {
+static struct snd_timer_hardware snd_emu10k1_timer_hw = {
 	.flags = SNDRV_TIMER_HW_AUTO,
 	.resolution = 20833, /* 1 sample @ 48KHZ = 20.833...us */
 	.ticks = 1024,
@@ -76,10 +76,10 @@ static struct _snd_timer_hardware snd_emu10k1_timer_hw = {
 	.precise_resolution = snd_emu10k1_timer_precise_resolution,
 };
 
-int __devinit snd_emu10k1_timer(emu10k1_t *emu, int device)
+int __devinit snd_emu10k1_timer(struct snd_emu10k1 *emu, int device)
 {
-	snd_timer_t *timer = NULL;
-	snd_timer_id_t tid;
+	struct snd_timer *timer = NULL;
+	struct snd_timer_id tid;
 	int err;
 
 	tid.dev_class = SNDRV_TIMER_CLASS_CARD;
diff --git a/sound/pci/emu10k1/voice.c b/sound/pci/emu10k1/voice.c
index d251d3440ee..56ffb7dc3ee 100644
--- a/sound/pci/emu10k1/voice.c
+++ b/sound/pci/emu10k1/voice.c
@@ -45,9 +45,10 @@
  *							--rlrevell
  */
 
-static int voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int number, emu10k1_voice_t **rvoice)
+static int voice_alloc(struct snd_emu10k1 *emu, int type, int number,
+		       struct snd_emu10k1_voice **rvoice)
 {
-	emu10k1_voice_t *voice;
+	struct snd_emu10k1_voice *voice;
 	int i, j, k, first_voice, last_voice, skip;
 
 	*rvoice = NULL;
@@ -105,7 +106,8 @@ static int voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int number, em
 	return 0;
 }
 
-int snd_emu10k1_voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int number, emu10k1_voice_t **rvoice)
+int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int number,
+			    struct snd_emu10k1_voice **rvoice)
 {
 	unsigned long flags;
 	int result;
@@ -123,7 +125,7 @@ int snd_emu10k1_voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int numbe
 		if (emu->get_synth_voice) {
 			result = emu->get_synth_voice(emu);
 			if (result >= 0) {
-				emu10k1_voice_t *pvoice = &emu->voices[result];
+				struct snd_emu10k1_voice *pvoice = &emu->voices[result];
 				pvoice->interrupt = NULL;
 				pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = pvoice->efx = 0;
 				pvoice->epcm = NULL;
@@ -137,7 +139,8 @@ int snd_emu10k1_voice_alloc(emu10k1_t *emu, emu10k1_voice_type_t type, int numbe
 	return result;
 }
 
-int snd_emu10k1_voice_free(emu10k1_t *emu, emu10k1_voice_t *pvoice)
+int snd_emu10k1_voice_free(struct snd_emu10k1 *emu,
+			   struct snd_emu10k1_voice *pvoice)
 {
 	unsigned long flags;
 
-- 
cgit v1.2.3-70-g09d2


From 55e957d8328ef1c75238b95033d8a61994b6adcc Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:52:13 +0100
Subject: [ALSA] Remove xxx_t typedefs: PCI HDSP

Modules: RME HDSP driver

Remove xxx_t typedefs from the PCI HDSP driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/hdsp.h     |  51 ++--
 sound/pci/rme9652/hdsp.c | 744 +++++++++++++++++++++++------------------------
 2 files changed, 394 insertions(+), 401 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/hdsp.h b/include/sound/hdsp.h
index 7ce3aa67e5d..25e1951a995 100644
--- a/include/sound/hdsp.h
+++ b/include/sound/hdsp.h
@@ -21,17 +21,15 @@
 
 #define HDSP_MATRIX_MIXER_SIZE 2048
 
-typedef enum {
+enum HDSP_IO_Type {
 	Digiface,
 	Multiface,
 	H9652,
 	H9632,
 	Undefined,
-} HDSP_IO_Type;
-
-typedef struct _snd_hdsp_peak_rms hdsp_peak_rms_t;
+};
 
-struct _snd_hdsp_peak_rms {
+struct hdsp_peak_rms {
 	u32 input_peaks[26];
 	u32 playback_peaks[26];
 	u32 output_peaks[28];
@@ -41,11 +39,9 @@ struct _snd_hdsp_peak_rms {
 	u64 output_rms[26];
 };
 
-#define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, hdsp_peak_rms_t)
+#define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms)
 
-typedef struct _snd_hdsp_config_info hdsp_config_info_t;
-
-struct _snd_hdsp_config_info {
+struct hdsp_config_info {
 	unsigned char pref_sync_ref;
 	unsigned char wordclock_sync_check;
 	unsigned char spdif_sync_check;
@@ -71,40 +67,41 @@ struct _snd_hdsp_config_info {
 	unsigned char analog_extension_board;
 };
 
-#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, hdsp_config_info_t)
-
-typedef struct _snd_hdsp_firmware hdsp_firmware_t;
+#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info)
 
-struct _snd_hdsp_firmware {
+struct hdsp_firmware {
 	void __user *firmware_data;	/* 24413 x 4 bytes */
 };
 
-#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, hdsp_firmware_t)
+#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware)
 
-typedef struct _snd_hdsp_version hdsp_version_t;
-
-struct _snd_hdsp_version {
-	HDSP_IO_Type io_type;
+struct hdsp_version {
+	enum HDSP_IO_Type io_type;
 	unsigned short firmware_rev;
 };
 
-#define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, hdsp_version_t)
-
-typedef struct _snd_hdsp_mixer hdsp_mixer_t;
+#define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version)
 
-struct _snd_hdsp_mixer {
+struct hdsp_mixer {
 	unsigned short matrix[HDSP_MATRIX_MIXER_SIZE];
 };
 
-#define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, hdsp_mixer_t)
+#define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer)
 
-typedef struct _snd_hdsp_9632_aeb hdsp_9632_aeb_t;
-
-struct _snd_hdsp_9632_aeb {
+struct hdsp_9632_aeb {
 	int aebi;
 	int aebo;
 };
 
-#define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, hdsp_9632_aeb_t)
+#define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb)
+
+/* typedefs for compatibility to user-space */
+typedef enum HDSP_IO_Type HDSP_IO_Type;
+typedef struct hdsp_peak_rms hdsp_peak_rms_t;
+typedef struct hdsp_config_info hdsp_config_info_t;
+typedef struct hdsp_firmware hdsp_firmware_t;
+typedef struct hdsp_version hdsp_version_t;
+typedef struct hdsp_mixer hdsp_mixer_t;
+typedef struct hdsp_9632_aeb hdsp_9632_aeb_t;
 
 #endif /* __SOUND_HDSP_H */
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index d15ffb3e9b0..ebf7a2b86c2 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -394,11 +394,7 @@ MODULE_SUPPORTED_DEVICE("{{RME Hammerfall-DSP},"
 #endif
 #endif
 
-typedef struct _hdsp             hdsp_t;
-typedef struct _hdsp_midi        hdsp_midi_t;
-typedef struct _hdsp_9632_meters hdsp_9632_meters_t;
-
-struct _hdsp_9632_meters {
+struct hdsp_9632_meters {
     u32 input_peak[16];
     u32 playback_peak[16];
     u32 output_peak[16];
@@ -414,23 +410,23 @@ struct _hdsp_9632_meters {
     u32 xxx_rms_high[16];
 };
 
-struct _hdsp_midi {
-    hdsp_t                  *hdsp;
+struct hdsp_midi {
+    struct hdsp             *hdsp;
     int                      id;
-    snd_rawmidi_t           *rmidi;
-    snd_rawmidi_substream_t *input;
-    snd_rawmidi_substream_t *output;
+    struct snd_rawmidi           *rmidi;
+    struct snd_rawmidi_substream *input;
+    struct snd_rawmidi_substream *output;
     char                     istimer; /* timer in use */
     struct timer_list	     timer;
     spinlock_t               lock;
     int			     pending;
 };
 
-struct _hdsp {
+struct hdsp {
 	spinlock_t            lock;
-	snd_pcm_substream_t  *capture_substream;
-	snd_pcm_substream_t  *playback_substream;
-        hdsp_midi_t           midi[2];
+	struct snd_pcm_substream *capture_substream;
+	struct snd_pcm_substream *playback_substream;
+        struct hdsp_midi      midi[2];
 	struct tasklet_struct midi_tasklet;
 	int		      use_midi_tasklet;
 	int                   precise_ptr;
@@ -440,7 +436,7 @@ struct _hdsp {
 	u32                   creg_spdif_stream;
 	int                   clock_source_locked;
 	char                 *card_name;	     /* digiface/multiface */
-	HDSP_IO_Type          io_type;               /* ditto, but for code use */
+	enum HDSP_IO_Type     io_type;               /* ditto, but for code use */
         unsigned short        firmware_rev;
 	unsigned short	      state;		     /* stores state bits */
 	u32		      firmware_cache[24413]; /* this helps recover from accidental iobox power failure */
@@ -467,11 +463,11 @@ struct _hdsp {
 	int                   irq;
 	unsigned long         port;
         void __iomem         *iobase;
-	snd_card_t           *card;
-	snd_pcm_t            *pcm;
-	snd_hwdep_t          *hwdep;
+	struct snd_card *card;
+	struct snd_pcm *pcm;
+	struct snd_hwdep          *hwdep;
 	struct pci_dev       *pci;
-	snd_kcontrol_t       *spdif_ctl;
+	struct snd_kcontrol *spdif_ctl;
         unsigned short        mixer_matrix[HDSP_MATRIX_MIXER_SIZE];
 };
 
@@ -585,17 +581,17 @@ static struct pci_device_id snd_hdsp_ids[] = {
 MODULE_DEVICE_TABLE(pci, snd_hdsp_ids);
 
 /* prototypes */
-static int snd_hdsp_create_alsa_devices(snd_card_t *card, hdsp_t *hdsp);
-static int snd_hdsp_create_pcm(snd_card_t *card, hdsp_t *hdsp);
-static int snd_hdsp_enable_io (hdsp_t *hdsp);
-static void snd_hdsp_initialize_midi_flush (hdsp_t *hdsp);
-static void snd_hdsp_initialize_channels (hdsp_t *hdsp);
-static int hdsp_fifo_wait(hdsp_t *hdsp, int count, int timeout);
-static int hdsp_autosync_ref(hdsp_t *hdsp);
-static int snd_hdsp_set_defaults(hdsp_t *hdsp);
-static void snd_hdsp_9652_enable_mixer (hdsp_t *hdsp);
-
-static int hdsp_playback_to_output_key (hdsp_t *hdsp, int in, int out)
+static int snd_hdsp_create_alsa_devices(struct snd_card *card, struct hdsp *hdsp);
+static int snd_hdsp_create_pcm(struct snd_card *card, struct hdsp *hdsp);
+static int snd_hdsp_enable_io (struct hdsp *hdsp);
+static void snd_hdsp_initialize_midi_flush (struct hdsp *hdsp);
+static void snd_hdsp_initialize_channels (struct hdsp *hdsp);
+static int hdsp_fifo_wait(struct hdsp *hdsp, int count, int timeout);
+static int hdsp_autosync_ref(struct hdsp *hdsp);
+static int snd_hdsp_set_defaults(struct hdsp *hdsp);
+static void snd_hdsp_9652_enable_mixer (struct hdsp *hdsp);
+
+static int hdsp_playback_to_output_key (struct hdsp *hdsp, int in, int out)
 {
 	switch (hdsp->firmware_rev) {
 	case 0xa:
@@ -608,7 +604,7 @@ static int hdsp_playback_to_output_key (hdsp_t *hdsp, int in, int out)
 	}
 }
 
-static int hdsp_input_to_output_key (hdsp_t *hdsp, int in, int out)
+static int hdsp_input_to_output_key (struct hdsp *hdsp, int in, int out)
 {
 	switch (hdsp->firmware_rev) {
 	case 0xa:
@@ -621,17 +617,17 @@ static int hdsp_input_to_output_key (hdsp_t *hdsp, int in, int out)
 	}
 }
 
-static void hdsp_write(hdsp_t *hdsp, int reg, int val)
+static void hdsp_write(struct hdsp *hdsp, int reg, int val)
 {
 	writel(val, hdsp->iobase + reg);
 }
 
-static unsigned int hdsp_read(hdsp_t *hdsp, int reg)
+static unsigned int hdsp_read(struct hdsp *hdsp, int reg)
 {
 	return readl (hdsp->iobase + reg);
 }
 
-static int hdsp_check_for_iobox (hdsp_t *hdsp)
+static int hdsp_check_for_iobox (struct hdsp *hdsp)
 {
 
 	if (hdsp->io_type == H9652 || hdsp->io_type == H9632) return 0;
@@ -644,7 +640,7 @@ static int hdsp_check_for_iobox (hdsp_t *hdsp)
 
 }
 
-static int snd_hdsp_load_firmware_from_cache(hdsp_t *hdsp) {
+static int snd_hdsp_load_firmware_from_cache(struct hdsp *hdsp) {
 
 	int i;
 	unsigned long flags;
@@ -699,7 +695,7 @@ static int snd_hdsp_load_firmware_from_cache(hdsp_t *hdsp) {
 	return 0;
 }
 
-static int hdsp_get_iobox_version (hdsp_t *hdsp)
+static int hdsp_get_iobox_version (struct hdsp *hdsp)
 {
 	if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) {
 	
@@ -730,7 +726,7 @@ static int hdsp_get_iobox_version (hdsp_t *hdsp)
 }
 
 
-static int hdsp_check_for_firmware (hdsp_t *hdsp, int show_err)
+static int hdsp_check_for_firmware (struct hdsp *hdsp, int show_err)
 {
 	if (hdsp->io_type == H9652 || hdsp->io_type == H9632) return 0;
 	if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) {
@@ -751,7 +747,7 @@ static int hdsp_check_for_firmware (hdsp_t *hdsp, int show_err)
 }
 
 
-static int hdsp_fifo_wait(hdsp_t *hdsp, int count, int timeout)
+static int hdsp_fifo_wait(struct hdsp *hdsp, int count, int timeout)
 {    
 	int i;
 
@@ -776,7 +772,7 @@ static int hdsp_fifo_wait(hdsp_t *hdsp, int count, int timeout)
 	return -1;
 }
 
-static int hdsp_read_gain (hdsp_t *hdsp, unsigned int addr)
+static int hdsp_read_gain (struct hdsp *hdsp, unsigned int addr)
 {
 	if (addr >= HDSP_MATRIX_MIXER_SIZE)
 		return 0;
@@ -784,7 +780,7 @@ static int hdsp_read_gain (hdsp_t *hdsp, unsigned int addr)
 	return hdsp->mixer_matrix[addr];
 }
 
-static int hdsp_write_gain(hdsp_t *hdsp, unsigned int addr, unsigned short data)
+static int hdsp_write_gain(struct hdsp *hdsp, unsigned int addr, unsigned short data)
 {
 	unsigned int ad;
 
@@ -844,7 +840,7 @@ static int hdsp_write_gain(hdsp_t *hdsp, unsigned int addr, unsigned short data)
 	return 0;
 }
 
-static int snd_hdsp_use_is_exclusive(hdsp_t *hdsp)
+static int snd_hdsp_use_is_exclusive(struct hdsp *hdsp)
 {
 	unsigned long flags;
 	int ret = 1;
@@ -857,7 +853,7 @@ static int snd_hdsp_use_is_exclusive(hdsp_t *hdsp)
 	return ret;
 }
 
-static int hdsp_external_sample_rate (hdsp_t *hdsp)
+static int hdsp_external_sample_rate (struct hdsp *hdsp)
 {
 	unsigned int status2 = hdsp_read(hdsp, HDSP_status2Register);
 	unsigned int rate_bits = status2 & HDSP_systemFrequencyMask;
@@ -874,7 +870,7 @@ static int hdsp_external_sample_rate (hdsp_t *hdsp)
 	}
 }
 
-static int hdsp_spdif_sample_rate(hdsp_t *hdsp)
+static int hdsp_spdif_sample_rate(struct hdsp *hdsp)
 {
 	unsigned int status = hdsp_read(hdsp, HDSP_statusRegister);
 	unsigned int rate_bits = (status & HDSP_spdifFrequencyMask);
@@ -905,12 +901,12 @@ static int hdsp_spdif_sample_rate(hdsp_t *hdsp)
 	return 0;
 }
 
-static void hdsp_compute_period_size(hdsp_t *hdsp)
+static void hdsp_compute_period_size(struct hdsp *hdsp)
 {
 	hdsp->period_bytes = 1 << ((hdsp_decode_latency(hdsp->control_register) + 8));
 }
 
-static snd_pcm_uframes_t hdsp_hw_pointer(hdsp_t *hdsp)
+static snd_pcm_uframes_t hdsp_hw_pointer(struct hdsp *hdsp)
 {
 	int position;
 
@@ -925,29 +921,29 @@ static snd_pcm_uframes_t hdsp_hw_pointer(hdsp_t *hdsp)
 	return position;
 }
 
-static void hdsp_reset_hw_pointer(hdsp_t *hdsp)
+static void hdsp_reset_hw_pointer(struct hdsp *hdsp)
 {
 	hdsp_write (hdsp, HDSP_resetPointer, 0);
 }
 
-static void hdsp_start_audio(hdsp_t *s)
+static void hdsp_start_audio(struct hdsp *s)
 {
 	s->control_register |= (HDSP_AudioInterruptEnable | HDSP_Start);
 	hdsp_write(s, HDSP_controlRegister, s->control_register);
 }
 
-static void hdsp_stop_audio(hdsp_t *s)
+static void hdsp_stop_audio(struct hdsp *s)
 {
 	s->control_register &= ~(HDSP_Start | HDSP_AudioInterruptEnable);
 	hdsp_write(s, HDSP_controlRegister, s->control_register);
 }
 
-static void hdsp_silence_playback(hdsp_t *hdsp)
+static void hdsp_silence_playback(struct hdsp *hdsp)
 {
 	memset(hdsp->playback_buffer, 0, HDSP_DMA_AREA_BYTES);
 }
 
-static int hdsp_set_interrupt_interval(hdsp_t *s, unsigned int frames)
+static int hdsp_set_interrupt_interval(struct hdsp *s, unsigned int frames)
 {
 	int n;
 
@@ -972,7 +968,7 @@ static int hdsp_set_interrupt_interval(hdsp_t *s, unsigned int frames)
 	return 0;
 }
 
-static int hdsp_set_rate(hdsp_t *hdsp, int rate, int called_internally)
+static int hdsp_set_rate(struct hdsp *hdsp, int rate, int called_internally)
 {
 	int reject_if_open = 0;
 	int current_rate;
@@ -1114,7 +1110,7 @@ static int hdsp_set_rate(hdsp_t *hdsp, int rate, int called_internally)
    MIDI
   ----------------------------------------------------------------------------*/
 
-static unsigned char snd_hdsp_midi_read_byte (hdsp_t *hdsp, int id)
+static unsigned char snd_hdsp_midi_read_byte (struct hdsp *hdsp, int id)
 {
 	/* the hardware already does the relevant bit-mask with 0xff */
 	if (id)
@@ -1123,7 +1119,7 @@ static unsigned char snd_hdsp_midi_read_byte (hdsp_t *hdsp, int id)
 		return hdsp_read(hdsp, HDSP_midiDataIn0);
 }
 
-static void snd_hdsp_midi_write_byte (hdsp_t *hdsp, int id, int val)
+static void snd_hdsp_midi_write_byte (struct hdsp *hdsp, int id, int val)
 {
 	/* the hardware already does the relevant bit-mask with 0xff */
 	if (id)
@@ -1132,7 +1128,7 @@ static void snd_hdsp_midi_write_byte (hdsp_t *hdsp, int id, int val)
 		hdsp_write(hdsp, HDSP_midiDataOut0, val);
 }
 
-static int snd_hdsp_midi_input_available (hdsp_t *hdsp, int id)
+static int snd_hdsp_midi_input_available (struct hdsp *hdsp, int id)
 {
 	if (id)
 		return (hdsp_read(hdsp, HDSP_midiStatusIn1) & 0xff);
@@ -1140,7 +1136,7 @@ static int snd_hdsp_midi_input_available (hdsp_t *hdsp, int id)
 		return (hdsp_read(hdsp, HDSP_midiStatusIn0) & 0xff);
 }
 
-static int snd_hdsp_midi_output_possible (hdsp_t *hdsp, int id)
+static int snd_hdsp_midi_output_possible (struct hdsp *hdsp, int id)
 {
 	int fifo_bytes_used;
 
@@ -1155,13 +1151,13 @@ static int snd_hdsp_midi_output_possible (hdsp_t *hdsp, int id)
 		return 0;
 }
 
-static void snd_hdsp_flush_midi_input (hdsp_t *hdsp, int id)
+static void snd_hdsp_flush_midi_input (struct hdsp *hdsp, int id)
 {
 	while (snd_hdsp_midi_input_available (hdsp, id))
 		snd_hdsp_midi_read_byte (hdsp, id);
 }
 
-static int snd_hdsp_midi_output_write (hdsp_midi_t *hmidi)
+static int snd_hdsp_midi_output_write (struct hdsp_midi *hmidi)
 {
 	unsigned long flags;
 	int n_pending;
@@ -1189,7 +1185,7 @@ static int snd_hdsp_midi_output_write (hdsp_midi_t *hmidi)
 	return 0;
 }
 
-static int snd_hdsp_midi_input_read (hdsp_midi_t *hmidi)
+static int snd_hdsp_midi_input_read (struct hdsp_midi *hmidi)
 {
 	unsigned char buf[128]; /* this buffer is designed to match the MIDI input FIFO size */
 	unsigned long flags;
@@ -1221,14 +1217,14 @@ static int snd_hdsp_midi_input_read (hdsp_midi_t *hmidi)
 	return snd_hdsp_midi_output_write (hmidi);
 }
 
-static void snd_hdsp_midi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_hdsp_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
 {
-	hdsp_t *hdsp;
-	hdsp_midi_t *hmidi;
+	struct hdsp *hdsp;
+	struct hdsp_midi *hmidi;
 	unsigned long flags;
 	u32 ie;
 
-	hmidi = (hdsp_midi_t *) substream->rmidi->private_data;
+	hmidi = (struct hdsp_midi *) substream->rmidi->private_data;
 	hdsp = hmidi->hdsp;
 	ie = hmidi->id ? HDSP_Midi1InterruptEnable : HDSP_Midi0InterruptEnable;
 	spin_lock_irqsave (&hdsp->lock, flags);
@@ -1248,7 +1244,7 @@ static void snd_hdsp_midi_input_trigger(snd_rawmidi_substream_t * substream, int
 
 static void snd_hdsp_midi_output_timer(unsigned long data)
 {
-	hdsp_midi_t *hmidi = (hdsp_midi_t *) data;
+	struct hdsp_midi *hmidi = (struct hdsp_midi *) data;
 	unsigned long flags;
 	
 	snd_hdsp_midi_output_write(hmidi);
@@ -1268,12 +1264,12 @@ static void snd_hdsp_midi_output_timer(unsigned long data)
 	spin_unlock_irqrestore (&hmidi->lock, flags);
 }
 
-static void snd_hdsp_midi_output_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_hdsp_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
 {
-	hdsp_midi_t *hmidi;
+	struct hdsp_midi *hmidi;
 	unsigned long flags;
 
-	hmidi = (hdsp_midi_t *) substream->rmidi->private_data;
+	hmidi = (struct hdsp_midi *) substream->rmidi->private_data;
 	spin_lock_irqsave (&hmidi->lock, flags);
 	if (up) {
 		if (!hmidi->istimer) {
@@ -1293,11 +1289,11 @@ static void snd_hdsp_midi_output_trigger(snd_rawmidi_substream_t * substream, in
 		snd_hdsp_midi_output_write(hmidi);
 }
 
-static int snd_hdsp_midi_input_open(snd_rawmidi_substream_t * substream)
+static int snd_hdsp_midi_input_open(struct snd_rawmidi_substream *substream)
 {
-	hdsp_midi_t *hmidi;
+	struct hdsp_midi *hmidi;
 
-	hmidi = (hdsp_midi_t *) substream->rmidi->private_data;
+	hmidi = (struct hdsp_midi *) substream->rmidi->private_data;
 	spin_lock_irq (&hmidi->lock);
 	snd_hdsp_flush_midi_input (hmidi->hdsp, hmidi->id);
 	hmidi->input = substream;
@@ -1306,11 +1302,11 @@ static int snd_hdsp_midi_input_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_hdsp_midi_output_open(snd_rawmidi_substream_t * substream)
+static int snd_hdsp_midi_output_open(struct snd_rawmidi_substream *substream)
 {
-	hdsp_midi_t *hmidi;
+	struct hdsp_midi *hmidi;
 
-	hmidi = (hdsp_midi_t *) substream->rmidi->private_data;
+	hmidi = (struct hdsp_midi *) substream->rmidi->private_data;
 	spin_lock_irq (&hmidi->lock);
 	hmidi->output = substream;
 	spin_unlock_irq (&hmidi->lock);
@@ -1318,13 +1314,13 @@ static int snd_hdsp_midi_output_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_hdsp_midi_input_close(snd_rawmidi_substream_t * substream)
+static int snd_hdsp_midi_input_close(struct snd_rawmidi_substream *substream)
 {
-	hdsp_midi_t *hmidi;
+	struct hdsp_midi *hmidi;
 
 	snd_hdsp_midi_input_trigger (substream, 0);
 
-	hmidi = (hdsp_midi_t *) substream->rmidi->private_data;
+	hmidi = (struct hdsp_midi *) substream->rmidi->private_data;
 	spin_lock_irq (&hmidi->lock);
 	hmidi->input = NULL;
 	spin_unlock_irq (&hmidi->lock);
@@ -1332,13 +1328,13 @@ static int snd_hdsp_midi_input_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_hdsp_midi_output_close(snd_rawmidi_substream_t * substream)
+static int snd_hdsp_midi_output_close(struct snd_rawmidi_substream *substream)
 {
-	hdsp_midi_t *hmidi;
+	struct hdsp_midi *hmidi;
 
 	snd_hdsp_midi_output_trigger (substream, 0);
 
-	hmidi = (hdsp_midi_t *) substream->rmidi->private_data;
+	hmidi = (struct hdsp_midi *) substream->rmidi->private_data;
 	spin_lock_irq (&hmidi->lock);
 	hmidi->output = NULL;
 	spin_unlock_irq (&hmidi->lock);
@@ -1346,21 +1342,21 @@ static int snd_hdsp_midi_output_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static snd_rawmidi_ops_t snd_hdsp_midi_output =
+static struct snd_rawmidi_ops snd_hdsp_midi_output =
 {
 	.open =		snd_hdsp_midi_output_open,
 	.close =	snd_hdsp_midi_output_close,
 	.trigger =	snd_hdsp_midi_output_trigger,
 };
 
-static snd_rawmidi_ops_t snd_hdsp_midi_input =
+static struct snd_rawmidi_ops snd_hdsp_midi_input =
 {
 	.open =		snd_hdsp_midi_input_open,
 	.close =	snd_hdsp_midi_input_close,
 	.trigger =	snd_hdsp_midi_input_trigger,
 };
 
-static int __devinit snd_hdsp_create_midi (snd_card_t *card, hdsp_t *hdsp, int id)
+static int __devinit snd_hdsp_create_midi (struct snd_card *card, struct hdsp *hdsp, int id)
 {
 	char buf[32];
 
@@ -1394,7 +1390,7 @@ static int __devinit snd_hdsp_create_midi (snd_card_t *card, hdsp_t *hdsp, int i
   Control Interface
   ----------------------------------------------------------------------------*/
 
-static u32 snd_hdsp_convert_from_aes(snd_aes_iec958_t *aes)
+static u32 snd_hdsp_convert_from_aes(struct snd_aes_iec958 *aes)
 {
 	u32 val = 0;
 	val |= (aes->status[0] & IEC958_AES0_PROFESSIONAL) ? HDSP_SPDIFProfessional : 0;
@@ -1406,7 +1402,7 @@ static u32 snd_hdsp_convert_from_aes(snd_aes_iec958_t *aes)
 	return val;
 }
 
-static void snd_hdsp_convert_to_aes(snd_aes_iec958_t *aes, u32 val)
+static void snd_hdsp_convert_to_aes(struct snd_aes_iec958 *aes, u32 val)
 {
 	aes->status[0] = ((val & HDSP_SPDIFProfessional) ? IEC958_AES0_PROFESSIONAL : 0) |
 			 ((val & HDSP_SPDIFNonAudio) ? IEC958_AES0_NONAUDIO : 0);
@@ -1416,24 +1412,24 @@ static void snd_hdsp_convert_to_aes(snd_aes_iec958_t *aes, u32 val)
 		aes->status[0] |= (val & HDSP_SPDIFEmphasis) ? IEC958_AES0_CON_EMPHASIS_5015 : 0;
 }
 
-static int snd_hdsp_control_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_control_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_hdsp_control_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_control_spdif_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	snd_hdsp_convert_to_aes(&ucontrol->value.iec958, hdsp->creg_spdif);
 	return 0;
 }
 
-static int snd_hdsp_control_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_control_spdif_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	u32 val;
 	
@@ -1445,24 +1441,24 @@ static int snd_hdsp_control_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
 	return change;
 }
 
-static int snd_hdsp_control_spdif_stream_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_control_spdif_stream_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_hdsp_control_spdif_stream_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_control_spdif_stream_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	snd_hdsp_convert_to_aes(&ucontrol->value.iec958, hdsp->creg_spdif_stream);
 	return 0;
 }
 
-static int snd_hdsp_control_spdif_stream_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_control_spdif_stream_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	u32 val;
 	
@@ -1476,14 +1472,14 @@ static int snd_hdsp_control_spdif_stream_put(snd_kcontrol_t * kcontrol, snd_ctl_
 	return change;
 }
 
-static int snd_hdsp_control_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_control_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_hdsp_control_spdif_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_control_spdif_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
 	ucontrol->value.iec958.status[0] = kcontrol->private_value;
 	return 0;
@@ -1497,12 +1493,12 @@ static int snd_hdsp_control_spdif_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_el
   .get = snd_hdsp_get_spdif_in, \
   .put = snd_hdsp_put_spdif_in }
 
-static unsigned int hdsp_spdif_in(hdsp_t *hdsp)
+static unsigned int hdsp_spdif_in(struct hdsp *hdsp)
 {
 	return hdsp_decode_spdif_in(hdsp->control_register & HDSP_SPDIFInputMask);
 }
 
-static int hdsp_set_spdif_input(hdsp_t *hdsp, int in)
+static int hdsp_set_spdif_input(struct hdsp *hdsp, int in)
 {
 	hdsp->control_register &= ~HDSP_SPDIFInputMask;
 	hdsp->control_register |= hdsp_encode_spdif_in(in);
@@ -1510,10 +1506,10 @@ static int hdsp_set_spdif_input(hdsp_t *hdsp, int in)
 	return 0;
 }
 
-static int snd_hdsp_info_spdif_in(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_spdif_in(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[4] = {"Optical", "Coaxial", "Internal", "AES"};
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
 	uinfo->count = 1;
@@ -1524,17 +1520,17 @@ static int snd_hdsp_info_spdif_in(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_hdsp_get_spdif_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_spdif_in(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.enumerated.item[0] = hdsp_spdif_in(hdsp);
 	return 0;
 }
 
-static int snd_hdsp_put_spdif_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_spdif_in(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int val;
 	
@@ -1554,12 +1550,12 @@ static int snd_hdsp_put_spdif_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
   .info = snd_hdsp_info_spdif_bits, \
   .get = snd_hdsp_get_spdif_out, .put = snd_hdsp_put_spdif_out }
 
-static int hdsp_spdif_out(hdsp_t *hdsp)
+static int hdsp_spdif_out(struct hdsp *hdsp)
 {
 	return (hdsp->control_register & HDSP_SPDIFOpticalOut) ? 1 : 0;
 }
 
-static int hdsp_set_spdif_output(hdsp_t *hdsp, int out)
+static int hdsp_set_spdif_output(struct hdsp *hdsp, int out)
 {
 	if (out)
 		hdsp->control_register |= HDSP_SPDIFOpticalOut;
@@ -1569,7 +1565,7 @@ static int hdsp_set_spdif_output(hdsp_t *hdsp, int out)
 	return 0;
 }
 
-static int snd_hdsp_info_spdif_bits(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_spdif_bits(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -1578,17 +1574,17 @@ static int snd_hdsp_info_spdif_bits(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
 	return 0;
 }
 
-static int snd_hdsp_get_spdif_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_spdif_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.integer.value[0] = hdsp_spdif_out(hdsp);
 	return 0;
 }
 
-static int snd_hdsp_put_spdif_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_spdif_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int val;
 	
@@ -1607,12 +1603,12 @@ static int snd_hdsp_put_spdif_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
   .info = snd_hdsp_info_spdif_bits, \
   .get = snd_hdsp_get_spdif_professional, .put = snd_hdsp_put_spdif_professional }
 
-static int hdsp_spdif_professional(hdsp_t *hdsp)
+static int hdsp_spdif_professional(struct hdsp *hdsp)
 {
 	return (hdsp->control_register & HDSP_SPDIFProfessional) ? 1 : 0;
 }
 
-static int hdsp_set_spdif_professional(hdsp_t *hdsp, int val)
+static int hdsp_set_spdif_professional(struct hdsp *hdsp, int val)
 {
 	if (val)
 		hdsp->control_register |= HDSP_SPDIFProfessional;
@@ -1622,17 +1618,17 @@ static int hdsp_set_spdif_professional(hdsp_t *hdsp, int val)
 	return 0;
 }
 
-static int snd_hdsp_get_spdif_professional(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_spdif_professional(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.integer.value[0] = hdsp_spdif_professional(hdsp);
 	return 0;
 }
 
-static int snd_hdsp_put_spdif_professional(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_spdif_professional(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int val;
 	
@@ -1651,12 +1647,12 @@ static int snd_hdsp_put_spdif_professional(snd_kcontrol_t * kcontrol, snd_ctl_el
   .info = snd_hdsp_info_spdif_bits, \
   .get = snd_hdsp_get_spdif_emphasis, .put = snd_hdsp_put_spdif_emphasis }
 
-static int hdsp_spdif_emphasis(hdsp_t *hdsp)
+static int hdsp_spdif_emphasis(struct hdsp *hdsp)
 {
 	return (hdsp->control_register & HDSP_SPDIFEmphasis) ? 1 : 0;
 }
 
-static int hdsp_set_spdif_emphasis(hdsp_t *hdsp, int val)
+static int hdsp_set_spdif_emphasis(struct hdsp *hdsp, int val)
 {
 	if (val)
 		hdsp->control_register |= HDSP_SPDIFEmphasis;
@@ -1666,17 +1662,17 @@ static int hdsp_set_spdif_emphasis(hdsp_t *hdsp, int val)
 	return 0;
 }
 
-static int snd_hdsp_get_spdif_emphasis(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_spdif_emphasis(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.integer.value[0] = hdsp_spdif_emphasis(hdsp);
 	return 0;
 }
 
-static int snd_hdsp_put_spdif_emphasis(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_spdif_emphasis(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int val;
 	
@@ -1695,12 +1691,12 @@ static int snd_hdsp_put_spdif_emphasis(snd_kcontrol_t * kcontrol, snd_ctl_elem_v
   .info = snd_hdsp_info_spdif_bits, \
   .get = snd_hdsp_get_spdif_nonaudio, .put = snd_hdsp_put_spdif_nonaudio }
 
-static int hdsp_spdif_nonaudio(hdsp_t *hdsp)
+static int hdsp_spdif_nonaudio(struct hdsp *hdsp)
 {
 	return (hdsp->control_register & HDSP_SPDIFNonAudio) ? 1 : 0;
 }
 
-static int hdsp_set_spdif_nonaudio(hdsp_t *hdsp, int val)
+static int hdsp_set_spdif_nonaudio(struct hdsp *hdsp, int val)
 {
 	if (val)
 		hdsp->control_register |= HDSP_SPDIFNonAudio;
@@ -1710,17 +1706,17 @@ static int hdsp_set_spdif_nonaudio(hdsp_t *hdsp, int val)
 	return 0;
 }
 
-static int snd_hdsp_get_spdif_nonaudio(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_spdif_nonaudio(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.integer.value[0] = hdsp_spdif_nonaudio(hdsp);
 	return 0;
 }
 
-static int snd_hdsp_put_spdif_nonaudio(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_spdif_nonaudio(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int val;
 	
@@ -1743,10 +1739,10 @@ static int snd_hdsp_put_spdif_nonaudio(snd_kcontrol_t * kcontrol, snd_ctl_elem_v
   .get = snd_hdsp_get_spdif_sample_rate \
 }
 
-static int snd_hdsp_info_spdif_sample_rate(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_spdif_sample_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = {"32000", "44100", "48000", "64000", "88200", "96000", "None", "128000", "176400", "192000"};
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
 	uinfo->count = 1;
@@ -1757,9 +1753,9 @@ static int snd_hdsp_info_spdif_sample_rate(snd_kcontrol_t *kcontrol, snd_ctl_ele
 	return 0;
 }
 
-static int snd_hdsp_get_spdif_sample_rate(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_spdif_sample_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	switch (hdsp_spdif_sample_rate(hdsp)) {
 	case 32000:
@@ -1804,16 +1800,16 @@ static int snd_hdsp_get_spdif_sample_rate(snd_kcontrol_t * kcontrol, snd_ctl_ele
   .get = snd_hdsp_get_system_sample_rate \
 }
 
-static int snd_hdsp_info_system_sample_rate(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_system_sample_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_hdsp_get_system_sample_rate(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_system_sample_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.enumerated.item[0] = hdsp->system_sample_rate;
 	return 0;
@@ -1828,9 +1824,9 @@ static int snd_hdsp_get_system_sample_rate(snd_kcontrol_t * kcontrol, snd_ctl_el
   .get = snd_hdsp_get_autosync_sample_rate \
 }
 
-static int snd_hdsp_info_autosync_sample_rate(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_autosync_sample_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	static char *texts[] = {"32000", "44100", "48000", "64000", "88200", "96000", "None", "128000", "176400", "192000"};	
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
 	uinfo->count = 1;
@@ -1841,9 +1837,9 @@ static int snd_hdsp_info_autosync_sample_rate(snd_kcontrol_t *kcontrol, snd_ctl_
 	return 0;
 }
 
-static int snd_hdsp_get_autosync_sample_rate(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_autosync_sample_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	switch (hdsp_external_sample_rate(hdsp)) {
 	case 32000:
@@ -1888,7 +1884,7 @@ static int snd_hdsp_get_autosync_sample_rate(snd_kcontrol_t * kcontrol, snd_ctl_
   .get = snd_hdsp_get_system_clock_mode \
 }
 
-static int hdsp_system_clock_mode(hdsp_t *hdsp)
+static int hdsp_system_clock_mode(struct hdsp *hdsp)
 {
 	if (hdsp->control_register & HDSP_ClockModeMaster)
 		return 0;
@@ -1897,7 +1893,7 @@ static int hdsp_system_clock_mode(hdsp_t *hdsp)
 	return 1;
 }
 
-static int snd_hdsp_info_system_clock_mode(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_system_clock_mode(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = {"Master", "Slave" };
 	
@@ -1910,9 +1906,9 @@ static int snd_hdsp_info_system_clock_mode(snd_kcontrol_t *kcontrol, snd_ctl_ele
 	return 0;
 }
 
-static int snd_hdsp_get_system_clock_mode(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_system_clock_mode(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.enumerated.item[0] = hdsp_system_clock_mode(hdsp);
 	return 0;
@@ -1927,7 +1923,7 @@ static int snd_hdsp_get_system_clock_mode(snd_kcontrol_t * kcontrol, snd_ctl_ele
   .put = snd_hdsp_put_clock_source \
 }
 
-static int hdsp_clock_source(hdsp_t *hdsp)
+static int hdsp_clock_source(struct hdsp *hdsp)
 {
 	if (hdsp->control_register & HDSP_ClockModeMaster) {
 		switch (hdsp->system_sample_rate) {
@@ -1957,7 +1953,7 @@ static int hdsp_clock_source(hdsp_t *hdsp)
 	}
 }
 
-static int hdsp_set_clock_source(hdsp_t *hdsp, int mode)
+static int hdsp_set_clock_source(struct hdsp *hdsp, int mode)
 {
 	int rate;
 	switch (mode) {
@@ -2006,10 +2002,10 @@ static int hdsp_set_clock_source(hdsp_t *hdsp, int mode)
 	return 0;
 }
 
-static int snd_hdsp_info_clock_source(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_clock_source(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = {"AutoSync", "Internal 32.0 kHz", "Internal 44.1 kHz", "Internal 48.0 kHz", "Internal 64.0 kHz", "Internal 88.2 kHz", "Internal 96.0 kHz", "Internal 128 kHz", "Internal 176.4 kHz", "Internal 192.0 KHz" };
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
 	uinfo->count = 1;
@@ -2023,17 +2019,17 @@ static int snd_hdsp_info_clock_source(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf
 	return 0;
 }
 
-static int snd_hdsp_get_clock_source(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_clock_source(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.enumerated.item[0] = hdsp_clock_source(hdsp);
 	return 0;
 }
 
-static int snd_hdsp_put_clock_source(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_clock_source(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	int val;
 	
@@ -2057,7 +2053,7 @@ static int snd_hdsp_put_clock_source(snd_kcontrol_t * kcontrol, snd_ctl_elem_val
 	return change;
 }
 
-static int snd_hdsp_info_clock_source_lock(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_clock_source_lock(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -2066,17 +2062,17 @@ static int snd_hdsp_info_clock_source_lock(snd_kcontrol_t *kcontrol, snd_ctl_ele
 	return 0;
 }
 
-static int snd_hdsp_get_clock_source_lock(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_clock_source_lock(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.integer.value[0] = hdsp->clock_source_locked;
 	return 0;
 }
 
-static int snd_hdsp_put_clock_source_lock(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_clock_source_lock(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 
 	change = (int)ucontrol->value.integer.value[0] != hdsp->clock_source_locked;
@@ -2094,7 +2090,7 @@ static int snd_hdsp_put_clock_source_lock(snd_kcontrol_t * kcontrol, snd_ctl_ele
   .put = snd_hdsp_put_da_gain \
 }
 
-static int hdsp_da_gain(hdsp_t *hdsp)
+static int hdsp_da_gain(struct hdsp *hdsp)
 {
 	switch (hdsp->control_register & HDSP_DAGainMask) {
 	case HDSP_DAGainHighGain:
@@ -2108,7 +2104,7 @@ static int hdsp_da_gain(hdsp_t *hdsp)
 	}
 }
 
-static int hdsp_set_da_gain(hdsp_t *hdsp, int mode)
+static int hdsp_set_da_gain(struct hdsp *hdsp, int mode)
 {
 	hdsp->control_register &= ~HDSP_DAGainMask;
 	switch (mode) {
@@ -2129,7 +2125,7 @@ static int hdsp_set_da_gain(hdsp_t *hdsp, int mode)
 	return 0;
 }
 
-static int snd_hdsp_info_da_gain(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_da_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = {"Hi Gain", "+4 dBu", "-10 dbV"};
 	
@@ -2142,17 +2138,17 @@ static int snd_hdsp_info_da_gain(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
 	return 0;
 }
 
-static int snd_hdsp_get_da_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_da_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.enumerated.item[0] = hdsp_da_gain(hdsp);
 	return 0;
 }
 
-static int snd_hdsp_put_da_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_da_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	int val;
 	
@@ -2179,7 +2175,7 @@ static int snd_hdsp_put_da_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
   .put = snd_hdsp_put_ad_gain \
 }
 
-static int hdsp_ad_gain(hdsp_t *hdsp)
+static int hdsp_ad_gain(struct hdsp *hdsp)
 {
 	switch (hdsp->control_register & HDSP_ADGainMask) {
 	case HDSP_ADGainMinus10dBV:
@@ -2193,7 +2189,7 @@ static int hdsp_ad_gain(hdsp_t *hdsp)
 	}
 }
 
-static int hdsp_set_ad_gain(hdsp_t *hdsp, int mode)
+static int hdsp_set_ad_gain(struct hdsp *hdsp, int mode)
 {
 	hdsp->control_register &= ~HDSP_ADGainMask;
 	switch (mode) {
@@ -2214,7 +2210,7 @@ static int hdsp_set_ad_gain(hdsp_t *hdsp, int mode)
 	return 0;
 }
 
-static int snd_hdsp_info_ad_gain(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_ad_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = {"-10 dBV", "+4 dBu", "Lo Gain"};
 	
@@ -2227,17 +2223,17 @@ static int snd_hdsp_info_ad_gain(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
 	return 0;
 }
 
-static int snd_hdsp_get_ad_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_ad_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.enumerated.item[0] = hdsp_ad_gain(hdsp);
 	return 0;
 }
 
-static int snd_hdsp_put_ad_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_ad_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	int val;
 	
@@ -2264,7 +2260,7 @@ static int snd_hdsp_put_ad_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
   .put = snd_hdsp_put_phone_gain \
 }
 
-static int hdsp_phone_gain(hdsp_t *hdsp)
+static int hdsp_phone_gain(struct hdsp *hdsp)
 {
 	switch (hdsp->control_register & HDSP_PhoneGainMask) {
 	case HDSP_PhoneGain0dB:
@@ -2278,7 +2274,7 @@ static int hdsp_phone_gain(hdsp_t *hdsp)
 	}
 }
 
-static int hdsp_set_phone_gain(hdsp_t *hdsp, int mode)
+static int hdsp_set_phone_gain(struct hdsp *hdsp, int mode)
 {
 	hdsp->control_register &= ~HDSP_PhoneGainMask;
 	switch (mode) {
@@ -2299,7 +2295,7 @@ static int hdsp_set_phone_gain(hdsp_t *hdsp, int mode)
 	return 0;
 }
 
-static int snd_hdsp_info_phone_gain(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_phone_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = {"0 dB", "-6 dB", "-12 dB"};
 	
@@ -2312,17 +2308,17 @@ static int snd_hdsp_info_phone_gain(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
 	return 0;
 }
 
-static int snd_hdsp_get_phone_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_phone_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.enumerated.item[0] = hdsp_phone_gain(hdsp);
 	return 0;
 }
 
-static int snd_hdsp_put_phone_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_phone_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	int val;
 	
@@ -2349,14 +2345,14 @@ static int snd_hdsp_put_phone_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
   .put = snd_hdsp_put_xlr_breakout_cable \
 }
 
-static int hdsp_xlr_breakout_cable(hdsp_t *hdsp)
+static int hdsp_xlr_breakout_cable(struct hdsp *hdsp)
 {
 	if (hdsp->control_register & HDSP_XLRBreakoutCable)
 		return 1;
 	return 0;
 }
 
-static int hdsp_set_xlr_breakout_cable(hdsp_t *hdsp, int mode)
+static int hdsp_set_xlr_breakout_cable(struct hdsp *hdsp, int mode)
 {
 	if (mode)
 		hdsp->control_register |= HDSP_XLRBreakoutCable;
@@ -2366,7 +2362,7 @@ static int hdsp_set_xlr_breakout_cable(hdsp_t *hdsp, int mode)
 	return 0;
 }
 
-static int snd_hdsp_info_xlr_breakout_cable(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_xlr_breakout_cable(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -2375,17 +2371,17 @@ static int snd_hdsp_info_xlr_breakout_cable(snd_kcontrol_t *kcontrol, snd_ctl_el
 	return 0;
 }
 
-static int snd_hdsp_get_xlr_breakout_cable(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_xlr_breakout_cable(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.enumerated.item[0] = hdsp_xlr_breakout_cable(hdsp);
 	return 0;
 }
 
-static int snd_hdsp_put_xlr_breakout_cable(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_xlr_breakout_cable(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	int val;
 	
@@ -2412,14 +2408,14 @@ static int snd_hdsp_put_xlr_breakout_cable(snd_kcontrol_t * kcontrol, snd_ctl_el
   .put = snd_hdsp_put_aeb \
 }
 
-static int hdsp_aeb(hdsp_t *hdsp)
+static int hdsp_aeb(struct hdsp *hdsp)
 {
 	if (hdsp->control_register & HDSP_AnalogExtensionBoard)
 		return 1;
 	return 0;
 }
 
-static int hdsp_set_aeb(hdsp_t *hdsp, int mode)
+static int hdsp_set_aeb(struct hdsp *hdsp, int mode)
 {
 	if (mode)
 		hdsp->control_register |= HDSP_AnalogExtensionBoard;
@@ -2429,7 +2425,7 @@ static int hdsp_set_aeb(hdsp_t *hdsp, int mode)
 	return 0;
 }
 
-static int snd_hdsp_info_aeb(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_aeb(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -2438,17 +2434,17 @@ static int snd_hdsp_info_aeb(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uin
 	return 0;
 }
 
-static int snd_hdsp_get_aeb(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_aeb(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.enumerated.item[0] = hdsp_aeb(hdsp);
 	return 0;
 }
 
-static int snd_hdsp_put_aeb(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_aeb(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	int val;
 	
@@ -2471,7 +2467,7 @@ static int snd_hdsp_put_aeb(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * uc
   .put = snd_hdsp_put_pref_sync_ref \
 }
 
-static int hdsp_pref_sync_ref(hdsp_t *hdsp)
+static int hdsp_pref_sync_ref(struct hdsp *hdsp)
 {
 	/* Notice that this looks at the requested sync source,
 	   not the one actually in use.
@@ -2496,7 +2492,7 @@ static int hdsp_pref_sync_ref(hdsp_t *hdsp)
 	return 0;
 }
 
-static int hdsp_set_pref_sync_ref(hdsp_t *hdsp, int pref)
+static int hdsp_set_pref_sync_ref(struct hdsp *hdsp, int pref)
 {
 	hdsp->control_register &= ~HDSP_SyncRefMask;
 	switch (pref) {
@@ -2525,10 +2521,10 @@ static int hdsp_set_pref_sync_ref(hdsp_t *hdsp, int pref)
 	return 0;
 }
 
-static int snd_hdsp_info_pref_sync_ref(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_pref_sync_ref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = {"Word", "IEC958", "ADAT1", "ADAT Sync", "ADAT2", "ADAT3" };
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
 	uinfo->count = 1;
@@ -2555,17 +2551,17 @@ static int snd_hdsp_info_pref_sync_ref(snd_kcontrol_t *kcontrol, snd_ctl_elem_in
 	return 0;
 }
 
-static int snd_hdsp_get_pref_sync_ref(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_pref_sync_ref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.enumerated.item[0] = hdsp_pref_sync_ref(hdsp);
 	return 0;
 }
 
-static int snd_hdsp_put_pref_sync_ref(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_pref_sync_ref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change, max;
 	unsigned int val;
 	
@@ -2604,7 +2600,7 @@ static int snd_hdsp_put_pref_sync_ref(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
   .get = snd_hdsp_get_autosync_ref, \
 }
 
-static int hdsp_autosync_ref(hdsp_t *hdsp)
+static int hdsp_autosync_ref(struct hdsp *hdsp)
 {
 	/* This looks at the autosync selected sync reference */
 	unsigned int status2 = hdsp_read(hdsp, HDSP_status2Register);
@@ -2630,7 +2626,7 @@ static int hdsp_autosync_ref(hdsp_t *hdsp)
 	return 0;
 }
 
-static int snd_hdsp_info_autosync_ref(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_autosync_ref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = {"Word", "ADAT Sync", "IEC958", "None", "ADAT1", "ADAT2", "ADAT3" };
 	
@@ -2643,9 +2639,9 @@ static int snd_hdsp_info_autosync_ref(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf
 	return 0;
 }
 
-static int snd_hdsp_get_autosync_ref(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_autosync_ref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	ucontrol->value.enumerated.item[0] = hdsp_autosync_ref(hdsp);
 	return 0;
@@ -2660,12 +2656,12 @@ static int snd_hdsp_get_autosync_ref(snd_kcontrol_t * kcontrol, snd_ctl_elem_val
   .put = snd_hdsp_put_line_out \
 }
 
-static int hdsp_line_out(hdsp_t *hdsp)
+static int hdsp_line_out(struct hdsp *hdsp)
 {
 	return (hdsp->control_register & HDSP_LineOut) ? 1 : 0;
 }
 
-static int hdsp_set_line_output(hdsp_t *hdsp, int out)
+static int hdsp_set_line_output(struct hdsp *hdsp, int out)
 {
 	if (out)
 		hdsp->control_register |= HDSP_LineOut;
@@ -2675,7 +2671,7 @@ static int hdsp_set_line_output(hdsp_t *hdsp, int out)
 	return 0;
 }
 
-static int snd_hdsp_info_line_out(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_line_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -2684,9 +2680,9 @@ static int snd_hdsp_info_line_out(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_hdsp_get_line_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_line_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	spin_lock_irq(&hdsp->lock);
 	ucontrol->value.integer.value[0] = hdsp_line_out(hdsp);
@@ -2694,9 +2690,9 @@ static int snd_hdsp_get_line_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_hdsp_put_line_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_line_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int val;
 	
@@ -2719,7 +2715,7 @@ static int snd_hdsp_put_line_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
   .put = snd_hdsp_put_precise_pointer \
 }
 
-static int hdsp_set_precise_pointer(hdsp_t *hdsp, int precise)
+static int hdsp_set_precise_pointer(struct hdsp *hdsp, int precise)
 {
 	if (precise)
 		hdsp->precise_ptr = 1;
@@ -2728,7 +2724,7 @@ static int hdsp_set_precise_pointer(hdsp_t *hdsp, int precise)
 	return 0;
 }
 
-static int snd_hdsp_info_precise_pointer(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_precise_pointer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -2737,9 +2733,9 @@ static int snd_hdsp_info_precise_pointer(snd_kcontrol_t *kcontrol, snd_ctl_elem_
 	return 0;
 }
 
-static int snd_hdsp_get_precise_pointer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_precise_pointer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	spin_lock_irq(&hdsp->lock);
 	ucontrol->value.integer.value[0] = hdsp->precise_ptr;
@@ -2747,9 +2743,9 @@ static int snd_hdsp_get_precise_pointer(snd_kcontrol_t * kcontrol, snd_ctl_elem_
 	return 0;
 }
 
-static int snd_hdsp_put_precise_pointer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_precise_pointer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int val;
 	
@@ -2772,7 +2768,7 @@ static int snd_hdsp_put_precise_pointer(snd_kcontrol_t * kcontrol, snd_ctl_elem_
   .put = snd_hdsp_put_use_midi_tasklet \
 }
 
-static int hdsp_set_use_midi_tasklet(hdsp_t *hdsp, int use_tasklet)
+static int hdsp_set_use_midi_tasklet(struct hdsp *hdsp, int use_tasklet)
 {
 	if (use_tasklet)
 		hdsp->use_midi_tasklet = 1;
@@ -2781,7 +2777,7 @@ static int hdsp_set_use_midi_tasklet(hdsp_t *hdsp, int use_tasklet)
 	return 0;
 }
 
-static int snd_hdsp_info_use_midi_tasklet(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_use_midi_tasklet(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -2790,9 +2786,9 @@ static int snd_hdsp_info_use_midi_tasklet(snd_kcontrol_t *kcontrol, snd_ctl_elem
 	return 0;
 }
 
-static int snd_hdsp_get_use_midi_tasklet(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_use_midi_tasklet(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	
 	spin_lock_irq(&hdsp->lock);
 	ucontrol->value.integer.value[0] = hdsp->use_midi_tasklet;
@@ -2800,9 +2796,9 @@ static int snd_hdsp_get_use_midi_tasklet(snd_kcontrol_t * kcontrol, snd_ctl_elem
 	return 0;
 }
 
-static int snd_hdsp_put_use_midi_tasklet(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_use_midi_tasklet(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int val;
 	
@@ -2828,7 +2824,7 @@ static int snd_hdsp_put_use_midi_tasklet(snd_kcontrol_t * kcontrol, snd_ctl_elem
   .put = snd_hdsp_put_mixer \
 }
 
-static int snd_hdsp_info_mixer(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_mixer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 3;
@@ -2838,9 +2834,9 @@ static int snd_hdsp_info_mixer(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u
 	return 0;
 }
 
-static int snd_hdsp_get_mixer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_mixer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int source;
 	int destination;
 	int addr;
@@ -2859,9 +2855,9 @@ static int snd_hdsp_get_mixer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
 	return 0;
 }
 
-static int snd_hdsp_put_mixer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_put_mixer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 	int change;
 	int source;
 	int destination;
@@ -2898,7 +2894,7 @@ static int snd_hdsp_put_mixer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
   .get = snd_hdsp_get_wc_sync_check \
 }
 
-static int snd_hdsp_info_sync_check(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_hdsp_info_sync_check(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = {"No Lock", "Lock", "Sync" };	
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
@@ -2910,7 +2906,7 @@ static int snd_hdsp_info_sync_check(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
 	return 0;
 }
 
-static int hdsp_wc_sync_check(hdsp_t *hdsp)
+static int hdsp_wc_sync_check(struct hdsp *hdsp)
 {
 	int status2 = hdsp_read(hdsp, HDSP_status2Register);
 	if (status2 & HDSP_wc_lock) {
@@ -2923,9 +2919,9 @@ static int hdsp_wc_sync_check(hdsp_t *hdsp)
 	return 0;
 }
 
-static int snd_hdsp_get_wc_sync_check(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_wc_sync_check(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] = hdsp_wc_sync_check(hdsp);
 	return 0;
@@ -2940,7 +2936,7 @@ static int snd_hdsp_get_wc_sync_check(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
   .get = snd_hdsp_get_spdif_sync_check \
 }
 
-static int hdsp_spdif_sync_check(hdsp_t *hdsp)
+static int hdsp_spdif_sync_check(struct hdsp *hdsp)
 {
 	int status = hdsp_read(hdsp, HDSP_statusRegister);
 	if (status & HDSP_SPDIFErrorFlag)
@@ -2954,9 +2950,9 @@ static int hdsp_spdif_sync_check(hdsp_t *hdsp)
 	return 0;
 }
 
-static int snd_hdsp_get_spdif_sync_check(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_spdif_sync_check(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] = hdsp_spdif_sync_check(hdsp);
 	return 0;
@@ -2971,7 +2967,7 @@ static int snd_hdsp_get_spdif_sync_check(snd_kcontrol_t * kcontrol, snd_ctl_elem
   .get = snd_hdsp_get_adatsync_sync_check \
 }
 
-static int hdsp_adatsync_sync_check(hdsp_t *hdsp)
+static int hdsp_adatsync_sync_check(struct hdsp *hdsp)
 {
 	int status = hdsp_read(hdsp, HDSP_statusRegister);
 	if (status & HDSP_TimecodeLock) {
@@ -2983,9 +2979,9 @@ static int hdsp_adatsync_sync_check(hdsp_t *hdsp)
 		return 0;
 }	
 
-static int snd_hdsp_get_adatsync_sync_check(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_adatsync_sync_check(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] = hdsp_adatsync_sync_check(hdsp);
 	return 0;
@@ -2998,7 +2994,7 @@ static int snd_hdsp_get_adatsync_sync_check(snd_kcontrol_t * kcontrol, snd_ctl_e
   .get = snd_hdsp_get_adat_sync_check \
 }
 
-static int hdsp_adat_sync_check(hdsp_t *hdsp, int idx)
+static int hdsp_adat_sync_check(struct hdsp *hdsp, int idx)
 {	
 	int status = hdsp_read(hdsp, HDSP_statusRegister);
 	
@@ -3011,10 +3007,10 @@ static int hdsp_adat_sync_check(hdsp_t *hdsp, int idx)
 		return 0;
 } 
 
-static int snd_hdsp_get_adat_sync_check(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_hdsp_get_adat_sync_check(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
 	int offset;
-	hdsp_t *hdsp = snd_kcontrol_chip(kcontrol);
+	struct hdsp *hdsp = snd_kcontrol_chip(kcontrol);
 
 	offset = ucontrol->id.index - 1;
 	snd_assert(offset >= 0);
@@ -3038,14 +3034,14 @@ static int snd_hdsp_get_adat_sync_check(snd_kcontrol_t * kcontrol, snd_ctl_elem_
 	return 0;
 }
 
-static snd_kcontrol_new_t snd_hdsp_9632_controls[] = {
+static struct snd_kcontrol_new snd_hdsp_9632_controls[] = {
 HDSP_DA_GAIN("DA Gain", 0),
 HDSP_AD_GAIN("AD Gain", 0),
 HDSP_PHONE_GAIN("Phones Gain", 0),
 HDSP_XLR_BREAKOUT_CABLE("XLR Breakout Cable", 0)
 };
 
-static snd_kcontrol_new_t snd_hdsp_controls[] = {
+static struct snd_kcontrol_new snd_hdsp_controls[] = {
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
 	.name =		SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
@@ -3111,14 +3107,14 @@ HDSP_PRECISE_POINTER("Precise Pointer", 0),
 HDSP_USE_MIDI_TASKLET("Use Midi Tasklet", 0),
 };
 
-static snd_kcontrol_new_t snd_hdsp_96xx_aeb = HDSP_AEB("Analog Extension Board", 0);
-static snd_kcontrol_new_t snd_hdsp_adat_sync_check = HDSP_ADAT_SYNC_CHECK;
+static struct snd_kcontrol_new snd_hdsp_96xx_aeb = HDSP_AEB("Analog Extension Board", 0);
+static struct snd_kcontrol_new snd_hdsp_adat_sync_check = HDSP_ADAT_SYNC_CHECK;
 
-static int snd_hdsp_create_controls(snd_card_t *card, hdsp_t *hdsp)
+static int snd_hdsp_create_controls(struct snd_card *card, struct hdsp *hdsp)
 {
 	unsigned int idx;
 	int err;
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 
 	for (idx = 0; idx < ARRAY_SIZE(snd_hdsp_controls); idx++) {
 		if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_hdsp_controls[idx], hdsp))) < 0)
@@ -3162,9 +3158,9 @@ static int snd_hdsp_create_controls(snd_card_t *card, hdsp_t *hdsp)
  ------------------------------------------------------------*/
 
 static void
-snd_hdsp_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
+snd_hdsp_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
 {
-	hdsp_t *hdsp = (hdsp_t *) entry->private_data;
+	struct hdsp *hdsp = (struct hdsp *) entry->private_data;
 	unsigned int status;
 	unsigned int status2;
 	char *pref_sync_ref;
@@ -3469,21 +3465,21 @@ snd_hdsp_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
 
 }
 
-static void __devinit snd_hdsp_proc_init(hdsp_t *hdsp)
+static void __devinit snd_hdsp_proc_init(struct hdsp *hdsp)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	if (! snd_card_proc_new(hdsp->card, "hdsp", &entry))
 		snd_info_set_text_ops(entry, hdsp, 1024, snd_hdsp_proc_read);
 }
 
-static void snd_hdsp_free_buffers(hdsp_t *hdsp)
+static void snd_hdsp_free_buffers(struct hdsp *hdsp)
 {
 	snd_hammerfall_free_buffer(&hdsp->capture_dma_buf, hdsp->pci);
 	snd_hammerfall_free_buffer(&hdsp->playback_dma_buf, hdsp->pci);
 }
 
-static int __devinit snd_hdsp_initialize_memory(hdsp_t *hdsp)
+static int __devinit snd_hdsp_initialize_memory(struct hdsp *hdsp)
 {
 	unsigned long pb_bus, cb_bus;
 
@@ -3511,7 +3507,7 @@ static int __devinit snd_hdsp_initialize_memory(hdsp_t *hdsp)
 	return 0;
 }
 
-static int snd_hdsp_set_defaults(hdsp_t *hdsp)
+static int snd_hdsp_set_defaults(struct hdsp *hdsp)
 {
 	unsigned int i;
 
@@ -3576,7 +3572,7 @@ static int snd_hdsp_set_defaults(hdsp_t *hdsp)
 
 static void hdsp_midi_tasklet(unsigned long arg)
 {
-	hdsp_t *hdsp = (hdsp_t *)arg;
+	struct hdsp *hdsp = (struct hdsp *)arg;
 	
 	if (hdsp->midi[0].pending)
 		snd_hdsp_midi_input_read (&hdsp->midi[0]);
@@ -3586,7 +3582,7 @@ static void hdsp_midi_tasklet(unsigned long arg)
 
 static irqreturn_t snd_hdsp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	hdsp_t *hdsp = (hdsp_t *) dev_id;
+	struct hdsp *hdsp = (struct hdsp *) dev_id;
 	unsigned int status;
 	int audio;
 	int midi0;
@@ -3644,13 +3640,13 @@ static irqreturn_t snd_hdsp_interrupt(int irq, void *dev_id, struct pt_regs *reg
 	return IRQ_HANDLED;
 }
 
-static snd_pcm_uframes_t snd_hdsp_hw_pointer(snd_pcm_substream_t *substream)
+static snd_pcm_uframes_t snd_hdsp_hw_pointer(struct snd_pcm_substream *substream)
 {
-	hdsp_t *hdsp = snd_pcm_substream_chip(substream);
+	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
 	return hdsp_hw_pointer(hdsp);
 }
 
-static char *hdsp_channel_buffer_location(hdsp_t *hdsp,
+static char *hdsp_channel_buffer_location(struct hdsp *hdsp,
 					     int stream,
 					     int channel)
 
@@ -3668,10 +3664,10 @@ static char *hdsp_channel_buffer_location(hdsp_t *hdsp,
 		return hdsp->playback_buffer + (mapped_channel * HDSP_CHANNEL_BUFFER_BYTES);
 }
 
-static int snd_hdsp_playback_copy(snd_pcm_substream_t *substream, int channel,
+static int snd_hdsp_playback_copy(struct snd_pcm_substream *substream, int channel,
 				  snd_pcm_uframes_t pos, void __user *src, snd_pcm_uframes_t count)
 {
-	hdsp_t *hdsp = snd_pcm_substream_chip(substream);
+	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
 	char *channel_buf;
 
 	snd_assert(pos + count <= HDSP_CHANNEL_BUFFER_BYTES / 4, return -EINVAL);
@@ -3683,10 +3679,10 @@ static int snd_hdsp_playback_copy(snd_pcm_substream_t *substream, int channel,
 	return count;
 }
 
-static int snd_hdsp_capture_copy(snd_pcm_substream_t *substream, int channel,
+static int snd_hdsp_capture_copy(struct snd_pcm_substream *substream, int channel,
 				 snd_pcm_uframes_t pos, void __user *dst, snd_pcm_uframes_t count)
 {
-	hdsp_t *hdsp = snd_pcm_substream_chip(substream);
+	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
 	char *channel_buf;
 
 	snd_assert(pos + count <= HDSP_CHANNEL_BUFFER_BYTES / 4, return -EINVAL);
@@ -3698,10 +3694,10 @@ static int snd_hdsp_capture_copy(snd_pcm_substream_t *substream, int channel,
 	return count;
 }
 
-static int snd_hdsp_hw_silence(snd_pcm_substream_t *substream, int channel,
+static int snd_hdsp_hw_silence(struct snd_pcm_substream *substream, int channel,
 				  snd_pcm_uframes_t pos, snd_pcm_uframes_t count)
 {
-	hdsp_t *hdsp = snd_pcm_substream_chip(substream);
+	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
 	char *channel_buf;
 
 	channel_buf = hdsp_channel_buffer_location (hdsp, substream->pstr->stream, channel);
@@ -3710,11 +3706,11 @@ static int snd_hdsp_hw_silence(snd_pcm_substream_t *substream, int channel,
 	return count;
 }
 
-static int snd_hdsp_reset(snd_pcm_substream_t *substream)
+static int snd_hdsp_reset(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	hdsp_t *hdsp = snd_pcm_substream_chip(substream);
-	snd_pcm_substream_t *other;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
+	struct snd_pcm_substream *other;
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
 		other = hdsp->capture_substream;
 	else
@@ -3725,8 +3721,8 @@ static int snd_hdsp_reset(snd_pcm_substream_t *substream)
 		runtime->status->hw_ptr = 0;
 	if (other) {
 		struct list_head *pos;
-		snd_pcm_substream_t *s;
-		snd_pcm_runtime_t *oruntime = other->runtime;
+		struct snd_pcm_substream *s;
+		struct snd_pcm_runtime *oruntime = other->runtime;
 		snd_pcm_group_for_each(pos, substream) {
 			s = snd_pcm_group_substream_entry(pos);
 			if (s == other) {
@@ -3738,10 +3734,10 @@ static int snd_hdsp_reset(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-static int snd_hdsp_hw_params(snd_pcm_substream_t *substream,
-				 snd_pcm_hw_params_t *params)
+static int snd_hdsp_hw_params(struct snd_pcm_substream *substream,
+				 struct snd_pcm_hw_params *params)
 {
-	hdsp_t *hdsp = snd_pcm_substream_chip(substream);
+	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
 	int err;
 	pid_t this_pid;
 	pid_t other_pid;
@@ -3813,10 +3809,10 @@ static int snd_hdsp_hw_params(snd_pcm_substream_t *substream,
 	return 0;
 }
 
-static int snd_hdsp_channel_info(snd_pcm_substream_t *substream,
-				    snd_pcm_channel_info_t *info)
+static int snd_hdsp_channel_info(struct snd_pcm_substream *substream,
+				    struct snd_pcm_channel_info *info)
 {
-	hdsp_t *hdsp = snd_pcm_substream_chip(substream);
+	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
 	int mapped_channel;
 
 	snd_assert(info->channel < hdsp->max_channels, return -EINVAL);
@@ -3830,7 +3826,7 @@ static int snd_hdsp_channel_info(snd_pcm_substream_t *substream,
 	return 0;
 }
 
-static int snd_hdsp_ioctl(snd_pcm_substream_t *substream,
+static int snd_hdsp_ioctl(struct snd_pcm_substream *substream,
 			     unsigned int cmd, void *arg)
 {
 	switch (cmd) {
@@ -3845,10 +3841,10 @@ static int snd_hdsp_ioctl(snd_pcm_substream_t *substream,
 	return snd_pcm_lib_ioctl(substream, cmd, arg);
 }
 
-static int snd_hdsp_trigger(snd_pcm_substream_t *substream, int cmd)
+static int snd_hdsp_trigger(struct snd_pcm_substream *substream, int cmd)
 {
-	hdsp_t *hdsp = snd_pcm_substream_chip(substream);
-	snd_pcm_substream_t *other;
+	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
+	struct snd_pcm_substream *other;
 	int running;
 	
 	if (hdsp_check_for_iobox (hdsp))
@@ -3878,7 +3874,7 @@ static int snd_hdsp_trigger(snd_pcm_substream_t *substream, int cmd)
 
 	if (other) {
 		struct list_head *pos;
-		snd_pcm_substream_t *s;
+		struct snd_pcm_substream *s;
 		snd_pcm_group_for_each(pos, substream) {
 			s = snd_pcm_group_substream_entry(pos);
 			if (s == other) {
@@ -3915,9 +3911,9 @@ static int snd_hdsp_trigger(snd_pcm_substream_t *substream, int cmd)
 	return 0;
 }
 
-static int snd_hdsp_prepare(snd_pcm_substream_t *substream)
+static int snd_hdsp_prepare(struct snd_pcm_substream *substream)
 {
-	hdsp_t *hdsp = snd_pcm_substream_chip(substream);
+	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
 	int result = 0;
 
 	if (hdsp_check_for_iobox (hdsp))
@@ -3933,7 +3929,7 @@ static int snd_hdsp_prepare(snd_pcm_substream_t *substream)
 	return result;
 }
 
-static snd_pcm_hardware_t snd_hdsp_playback_subinfo =
+static struct snd_pcm_hardware snd_hdsp_playback_subinfo =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP |
 				 SNDRV_PCM_INFO_MMAP_VALID |
@@ -3963,7 +3959,7 @@ static snd_pcm_hardware_t snd_hdsp_playback_subinfo =
 	.fifo_size =		0
 };
 
-static snd_pcm_hardware_t snd_hdsp_capture_subinfo =
+static struct snd_pcm_hardware snd_hdsp_capture_subinfo =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP |
 				 SNDRV_PCM_INFO_MMAP_VALID |
@@ -3994,7 +3990,7 @@ static snd_pcm_hardware_t snd_hdsp_capture_subinfo =
 
 static unsigned int hdsp_period_sizes[] = { 64, 128, 256, 512, 1024, 2048, 4096, 8192 };
 
-static snd_pcm_hw_constraint_list_t hdsp_hw_constraints_period_sizes = {
+static struct snd_pcm_hw_constraint_list hdsp_hw_constraints_period_sizes = {
 	.count = ARRAY_SIZE(hdsp_period_sizes),
 	.list = hdsp_period_sizes,
 	.mask = 0
@@ -4002,17 +3998,17 @@ static snd_pcm_hw_constraint_list_t hdsp_hw_constraints_period_sizes = {
 
 static unsigned int hdsp_9632_sample_rates[] = { 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000 };
 
-static snd_pcm_hw_constraint_list_t hdsp_hw_constraints_9632_sample_rates = {
+static struct snd_pcm_hw_constraint_list hdsp_hw_constraints_9632_sample_rates = {
 	.count = ARRAY_SIZE(hdsp_9632_sample_rates),
 	.list = hdsp_9632_sample_rates,
 	.mask = 0
 };
 
-static int snd_hdsp_hw_rule_in_channels(snd_pcm_hw_params_t *params,
-					snd_pcm_hw_rule_t *rule)
+static int snd_hdsp_hw_rule_in_channels(struct snd_pcm_hw_params *params,
+					struct snd_pcm_hw_rule *rule)
 {
-	hdsp_t *hdsp = rule->private;
-	snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
+	struct hdsp *hdsp = rule->private;
+	struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
 	if (hdsp->io_type == H9632) {
 		unsigned int list[3];
 		list[0] = hdsp->qs_in_channels;
@@ -4027,12 +4023,12 @@ static int snd_hdsp_hw_rule_in_channels(snd_pcm_hw_params_t *params,
 	}
 }
 
-static int snd_hdsp_hw_rule_out_channels(snd_pcm_hw_params_t *params,
-					snd_pcm_hw_rule_t *rule)
+static int snd_hdsp_hw_rule_out_channels(struct snd_pcm_hw_params *params,
+					struct snd_pcm_hw_rule *rule)
 {
 	unsigned int list[3];
-	hdsp_t *hdsp = rule->private;
-	snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
+	struct hdsp *hdsp = rule->private;
+	struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
 	if (hdsp->io_type == H9632) {
 		list[0] = hdsp->qs_out_channels;
 		list[1] = hdsp->ds_out_channels;
@@ -4045,28 +4041,28 @@ static int snd_hdsp_hw_rule_out_channels(snd_pcm_hw_params_t *params,
 	return snd_interval_list(c, 2, list, 0);
 }
 
-static int snd_hdsp_hw_rule_in_channels_rate(snd_pcm_hw_params_t *params,
-					     snd_pcm_hw_rule_t *rule)
+static int snd_hdsp_hw_rule_in_channels_rate(struct snd_pcm_hw_params *params,
+					     struct snd_pcm_hw_rule *rule)
 {
-	hdsp_t *hdsp = rule->private;
-	snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
-	snd_interval_t *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
+	struct hdsp *hdsp = rule->private;
+	struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
+	struct snd_interval *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
 	if (r->min > 96000 && hdsp->io_type == H9632) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = hdsp->qs_in_channels,
 			.max = hdsp->qs_in_channels,
 			.integer = 1,
 		};
 		return snd_interval_refine(c, &t);	
 	} else if (r->min > 48000 && r->max <= 96000) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = hdsp->ds_in_channels,
 			.max = hdsp->ds_in_channels,
 			.integer = 1,
 		};
 		return snd_interval_refine(c, &t);
 	} else if (r->max < 64000) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = hdsp->ss_in_channels,
 			.max = hdsp->ss_in_channels,
 			.integer = 1,
@@ -4076,28 +4072,28 @@ static int snd_hdsp_hw_rule_in_channels_rate(snd_pcm_hw_params_t *params,
 	return 0;
 }
 
-static int snd_hdsp_hw_rule_out_channels_rate(snd_pcm_hw_params_t *params,
-					     snd_pcm_hw_rule_t *rule)
+static int snd_hdsp_hw_rule_out_channels_rate(struct snd_pcm_hw_params *params,
+					     struct snd_pcm_hw_rule *rule)
 {
-	hdsp_t *hdsp = rule->private;
-	snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
-	snd_interval_t *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
+	struct hdsp *hdsp = rule->private;
+	struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
+	struct snd_interval *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
 	if (r->min > 96000 && hdsp->io_type == H9632) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = hdsp->qs_out_channels,
 			.max = hdsp->qs_out_channels,
 			.integer = 1,
 		};
 		return snd_interval_refine(c, &t);	
 	} else if (r->min > 48000 && r->max <= 96000) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = hdsp->ds_out_channels,
 			.max = hdsp->ds_out_channels,
 			.integer = 1,
 		};
 		return snd_interval_refine(c, &t);
 	} else if (r->max < 64000) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = hdsp->ss_out_channels,
 			.max = hdsp->ss_out_channels,
 			.integer = 1,
@@ -4107,28 +4103,28 @@ static int snd_hdsp_hw_rule_out_channels_rate(snd_pcm_hw_params_t *params,
 	return 0;
 }
 
-static int snd_hdsp_hw_rule_rate_out_channels(snd_pcm_hw_params_t *params,
-					     snd_pcm_hw_rule_t *rule)
+static int snd_hdsp_hw_rule_rate_out_channels(struct snd_pcm_hw_params *params,
+					     struct snd_pcm_hw_rule *rule)
 {
-	hdsp_t *hdsp = rule->private;
-	snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
-	snd_interval_t *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
+	struct hdsp *hdsp = rule->private;
+	struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
+	struct snd_interval *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
 	if (c->min >= hdsp->ss_out_channels) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = 32000,
 			.max = 48000,
 			.integer = 1,
 		};
 		return snd_interval_refine(r, &t);
 	} else if (c->max <= hdsp->qs_out_channels && hdsp->io_type == H9632) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = 128000,
 			.max = 192000,
 			.integer = 1,
 		};
 		return snd_interval_refine(r, &t);
 	} else if (c->max <= hdsp->ds_out_channels) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = 64000,
 			.max = 96000,
 			.integer = 1,
@@ -4138,28 +4134,28 @@ static int snd_hdsp_hw_rule_rate_out_channels(snd_pcm_hw_params_t *params,
 	return 0;
 }
 
-static int snd_hdsp_hw_rule_rate_in_channels(snd_pcm_hw_params_t *params,
-					     snd_pcm_hw_rule_t *rule)
+static int snd_hdsp_hw_rule_rate_in_channels(struct snd_pcm_hw_params *params,
+					     struct snd_pcm_hw_rule *rule)
 {
-	hdsp_t *hdsp = rule->private;
-	snd_interval_t *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
-	snd_interval_t *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
+	struct hdsp *hdsp = rule->private;
+	struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
+	struct snd_interval *r = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
 	if (c->min >= hdsp->ss_in_channels) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = 32000,
 			.max = 48000,
 			.integer = 1,
 		};
 		return snd_interval_refine(r, &t);
 	} else if (c->max <= hdsp->qs_in_channels && hdsp->io_type == H9632) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = 128000,
 			.max = 192000,
 			.integer = 1,
 		};
 		return snd_interval_refine(r, &t);
 	} else if (c->max <= hdsp->ds_in_channels) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = 64000,
 			.max = 96000,
 			.integer = 1,
@@ -4169,10 +4165,10 @@ static int snd_hdsp_hw_rule_rate_in_channels(snd_pcm_hw_params_t *params,
 	return 0;
 }
 
-static int snd_hdsp_playback_open(snd_pcm_substream_t *substream)
+static int snd_hdsp_playback_open(struct snd_pcm_substream *substream)
 {
-	hdsp_t *hdsp = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	if (hdsp_check_for_iobox (hdsp))
 		return -EIO;
@@ -4224,9 +4220,9 @@ static int snd_hdsp_playback_open(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-static int snd_hdsp_playback_release(snd_pcm_substream_t *substream)
+static int snd_hdsp_playback_release(struct snd_pcm_substream *substream)
 {
-	hdsp_t *hdsp = snd_pcm_substream_chip(substream);
+	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
 
 	spin_lock_irq(&hdsp->lock);
 
@@ -4242,10 +4238,10 @@ static int snd_hdsp_playback_release(snd_pcm_substream_t *substream)
 }
 
 
-static int snd_hdsp_capture_open(snd_pcm_substream_t *substream)
+static int snd_hdsp_capture_open(struct snd_pcm_substream *substream)
 {
-	hdsp_t *hdsp = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	if (hdsp_check_for_iobox (hdsp))
 		return -EIO;
@@ -4287,9 +4283,9 @@ static int snd_hdsp_capture_open(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-static int snd_hdsp_capture_release(snd_pcm_substream_t *substream)
+static int snd_hdsp_capture_release(struct snd_pcm_substream *substream)
 {
-	hdsp_t *hdsp = snd_pcm_substream_chip(substream);
+	struct hdsp *hdsp = snd_pcm_substream_chip(substream);
 
 	spin_lock_irq(&hdsp->lock);
 
@@ -4300,7 +4296,7 @@ static int snd_hdsp_capture_release(snd_pcm_substream_t *substream)
 	return 0;
 }
 
-static int snd_hdsp_hwdep_dummy_op(snd_hwdep_t *hw, struct file *file)
+static int snd_hdsp_hwdep_dummy_op(struct snd_hwdep *hw, struct file *file)
 {
 	/* we have nothing to initialize but the call is required */
 	return 0;
@@ -4334,7 +4330,7 @@ static inline int copy_u48_le(void __user *dest, void __iomem *src_low, void __i
 	return copy_to_user(dest, &rms, 8);
 }
 
-static int hdsp_9652_get_peak(hdsp_t *hdsp, hdsp_peak_rms_t __user *peak_rms)
+static int hdsp_9652_get_peak(struct hdsp *hdsp, struct hdsp_peak_rms __user *peak_rms)
 {
 	int doublespeed = 0;
 	int i, j, channels, ofs;
@@ -4371,15 +4367,15 @@ static int hdsp_9652_get_peak(hdsp_t *hdsp, hdsp_peak_rms_t __user *peak_rms)
 	return 0;
 }
 
-static int hdsp_9632_get_peak(hdsp_t *hdsp, hdsp_peak_rms_t __user *peak_rms)
+static int hdsp_9632_get_peak(struct hdsp *hdsp, struct hdsp_peak_rms __user *peak_rms)
 {
 	int i, j;
-	hdsp_9632_meters_t __iomem *m;
+	struct hdsp_9632_meters __iomem *m;
 	int doublespeed = 0;
 
 	if (hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DoubleSpeedStatus)
 		doublespeed = 1;
-	m = (hdsp_9632_meters_t __iomem *)(hdsp->iobase+HDSP_9632_metersBase);
+	m = (struct hdsp_9632_meters __iomem *)(hdsp->iobase+HDSP_9632_metersBase);
 	for (i = 0, j = 0; i < 16; ++i, ++j) {
 		if (copy_u32_le(&peak_rms->input_peaks[i], &m->input_peak[j]))
 			return -EFAULT;
@@ -4401,7 +4397,7 @@ static int hdsp_9632_get_peak(hdsp_t *hdsp, hdsp_peak_rms_t __user *peak_rms)
 	return 0;
 }
 
-static int hdsp_get_peak(hdsp_t *hdsp, hdsp_peak_rms_t __user *peak_rms)
+static int hdsp_get_peak(struct hdsp *hdsp, struct hdsp_peak_rms __user *peak_rms)
 {
 	int i;
 
@@ -4431,14 +4427,14 @@ static int hdsp_get_peak(hdsp_t *hdsp, hdsp_peak_rms_t __user *peak_rms)
 	return 0;
 }
 
-static int snd_hdsp_hwdep_ioctl(snd_hwdep_t *hw, struct file *file, unsigned int cmd, unsigned long arg)
+static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigned int cmd, unsigned long arg)
 {
-	hdsp_t *hdsp = (hdsp_t *)hw->private_data;	
+	struct hdsp *hdsp = (struct hdsp *)hw->private_data;	
 	void __user *argp = (void __user *)arg;
 
 	switch (cmd) {
 	case SNDRV_HDSP_IOCTL_GET_PEAK_RMS: {
-		hdsp_peak_rms_t __user *peak_rms = (hdsp_peak_rms_t __user *)arg;
+		struct hdsp_peak_rms __user *peak_rms = (struct hdsp_peak_rms __user *)arg;
 
 		if (!(hdsp->state & HDSP_FirmwareLoaded)) {
 			snd_printk(KERN_ERR "Hammerfall-DSP: firmware needs to be uploaded to the card.\n");
@@ -4455,7 +4451,7 @@ static int snd_hdsp_hwdep_ioctl(snd_hwdep_t *hw, struct file *file, unsigned int
 		}
 	}
 	case SNDRV_HDSP_IOCTL_GET_CONFIG_INFO: {
-		hdsp_config_info_t info;
+		struct hdsp_config_info info;
 		unsigned long flags;
 		int i;
 		
@@ -4498,7 +4494,7 @@ static int snd_hdsp_hwdep_ioctl(snd_hwdep_t *hw, struct file *file, unsigned int
 		break;
 	}
 	case SNDRV_HDSP_IOCTL_GET_9632_AEB: {
-		hdsp_9632_aeb_t h9632_aeb;
+		struct hdsp_9632_aeb h9632_aeb;
 		
 		if (hdsp->io_type != H9632) return -EINVAL;
 		h9632_aeb.aebi = hdsp->ss_in_channels - H9632_SS_CHANNELS;
@@ -4508,7 +4504,7 @@ static int snd_hdsp_hwdep_ioctl(snd_hwdep_t *hw, struct file *file, unsigned int
 		break;
 	}
 	case SNDRV_HDSP_IOCTL_GET_VERSION: {
-		hdsp_version_t hdsp_version;
+		struct hdsp_version hdsp_version;
 		int err;
 		
 		if (hdsp->io_type == H9652 || hdsp->io_type == H9632) return -EINVAL;
@@ -4523,7 +4519,7 @@ static int snd_hdsp_hwdep_ioctl(snd_hwdep_t *hw, struct file *file, unsigned int
 		break;
 	}
 	case SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE: {
-		hdsp_firmware_t __user *firmware;
+		struct hdsp_firmware __user *firmware;
 		u32 __user *firmware_data;
 		int err;
 		
@@ -4535,7 +4531,7 @@ static int snd_hdsp_hwdep_ioctl(snd_hwdep_t *hw, struct file *file, unsigned int
 			return -EBUSY;
 
 		snd_printk(KERN_INFO "Hammerfall-DSP: initializing firmware upload\n");
-		firmware = (hdsp_firmware_t __user *)argp;
+		firmware = (struct hdsp_firmware __user *)argp;
 
 		if (get_user(firmware_data, &firmware->firmware_data))
 			return -EFAULT;
@@ -4566,7 +4562,7 @@ static int snd_hdsp_hwdep_ioctl(snd_hwdep_t *hw, struct file *file, unsigned int
 		break;
 	}
 	case SNDRV_HDSP_IOCTL_GET_MIXER: {
-		hdsp_mixer_t __user *mixer = (hdsp_mixer_t __user *)argp;
+		struct hdsp_mixer __user *mixer = (struct hdsp_mixer __user *)argp;
 		if (copy_to_user(mixer->matrix, hdsp->mixer_matrix, sizeof(unsigned short)*HDSP_MATRIX_MIXER_SIZE))
 			return -EFAULT;
 		break;
@@ -4577,7 +4573,7 @@ static int snd_hdsp_hwdep_ioctl(snd_hwdep_t *hw, struct file *file, unsigned int
 	return 0;
 }
 
-static snd_pcm_ops_t snd_hdsp_playback_ops = {
+static struct snd_pcm_ops snd_hdsp_playback_ops = {
 	.open =		snd_hdsp_playback_open,
 	.close =	snd_hdsp_playback_release,
 	.ioctl =	snd_hdsp_ioctl,
@@ -4589,7 +4585,7 @@ static snd_pcm_ops_t snd_hdsp_playback_ops = {
 	.silence =	snd_hdsp_hw_silence,
 };
 
-static snd_pcm_ops_t snd_hdsp_capture_ops = {
+static struct snd_pcm_ops snd_hdsp_capture_ops = {
 	.open =		snd_hdsp_capture_open,
 	.close =	snd_hdsp_capture_release,
 	.ioctl =	snd_hdsp_ioctl,
@@ -4600,10 +4596,10 @@ static snd_pcm_ops_t snd_hdsp_capture_ops = {
 	.copy =		snd_hdsp_capture_copy,
 };
 
-static int __devinit snd_hdsp_create_hwdep(snd_card_t *card,
-					   hdsp_t *hdsp)
+static int __devinit snd_hdsp_create_hwdep(struct snd_card *card,
+					   struct hdsp *hdsp)
 {
-	snd_hwdep_t *hw;
+	struct snd_hwdep *hw;
 	int err;
 	
 	if ((err = snd_hwdep_new(card, "HDSP hwdep", 0, &hw)) < 0)
@@ -4620,9 +4616,9 @@ static int __devinit snd_hdsp_create_hwdep(snd_card_t *card,
 	return 0;
 }
 
-static int snd_hdsp_create_pcm(snd_card_t *card, hdsp_t *hdsp)
+static int snd_hdsp_create_pcm(struct snd_card *card, struct hdsp *hdsp)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if ((err = snd_pcm_new(card, hdsp->card_name, 0, 1, 1, &pcm)) < 0)
@@ -4640,13 +4636,13 @@ static int snd_hdsp_create_pcm(snd_card_t *card, hdsp_t *hdsp)
 	return 0;
 }
 
-static void snd_hdsp_9652_enable_mixer (hdsp_t *hdsp)
+static void snd_hdsp_9652_enable_mixer (struct hdsp *hdsp)
 {
         hdsp->control2_register |= HDSP_9652_ENABLE_MIXER;
 	hdsp_write (hdsp, HDSP_control2Reg, hdsp->control2_register);
 }
 
-static int snd_hdsp_enable_io (hdsp_t *hdsp)
+static int snd_hdsp_enable_io (struct hdsp *hdsp)
 {
 	int i;
 	
@@ -4663,7 +4659,7 @@ static int snd_hdsp_enable_io (hdsp_t *hdsp)
 	return 0;
 }
 
-static void snd_hdsp_initialize_channels(hdsp_t *hdsp)
+static void snd_hdsp_initialize_channels(struct hdsp *hdsp)
 {
 	int status, aebi_channels, aebo_channels;
 	
@@ -4706,13 +4702,13 @@ static void snd_hdsp_initialize_channels(hdsp_t *hdsp)
 	}
 }
 
-static void snd_hdsp_initialize_midi_flush (hdsp_t *hdsp)
+static void snd_hdsp_initialize_midi_flush (struct hdsp *hdsp)
 {
 	snd_hdsp_flush_midi_input (hdsp, 0);
 	snd_hdsp_flush_midi_input (hdsp, 1);
 }
 
-static int snd_hdsp_create_alsa_devices(snd_card_t *card, hdsp_t *hdsp)
+static int snd_hdsp_create_alsa_devices(struct snd_card *card, struct hdsp *hdsp)
 {
 	int err;
 	
@@ -4769,7 +4765,7 @@ static int snd_hdsp_create_alsa_devices(snd_card_t *card, hdsp_t *hdsp)
 
 #ifdef HDSP_FW_LOADER
 /* load firmware via hotplug fw loader */
-static int __devinit hdsp_request_fw_loader(hdsp_t *hdsp)
+static int __devinit hdsp_request_fw_loader(struct hdsp *hdsp)
 {
 	const char *fwfile;
 	const struct firmware *fw;
@@ -4842,8 +4838,8 @@ static int __devinit hdsp_request_fw_loader(hdsp_t *hdsp)
 }
 #endif
 
-static int __devinit snd_hdsp_create(snd_card_t *card,
-				     hdsp_t *hdsp)
+static int __devinit snd_hdsp_create(struct snd_card *card,
+				     struct hdsp *hdsp)
 {
 	struct pci_dev *pci = hdsp->pci;
 	int err;
@@ -4980,7 +4976,7 @@ static int __devinit snd_hdsp_create(snd_card_t *card,
 	return 0;	
 }
 
-static int snd_hdsp_free(hdsp_t *hdsp)
+static int snd_hdsp_free(struct hdsp *hdsp)
 {
 	if (hdsp->port) {
 		/* stop the audio, and cancel all interrupts */
@@ -5004,9 +5000,9 @@ static int snd_hdsp_free(hdsp_t *hdsp)
 	return 0;
 }
 
-static void snd_hdsp_card_free(snd_card_t *card)
+static void snd_hdsp_card_free(struct snd_card *card)
 {
-	hdsp_t *hdsp = (hdsp_t *) card->private_data;
+	struct hdsp *hdsp = (struct hdsp *) card->private_data;
 
 	if (hdsp)
 		snd_hdsp_free(hdsp);
@@ -5016,8 +5012,8 @@ static int __devinit snd_hdsp_probe(struct pci_dev *pci,
 				    const struct pci_device_id *pci_id)
 {
 	static int dev;
-	hdsp_t *hdsp;
-	snd_card_t *card;
+	struct hdsp *hdsp;
+	struct snd_card *card;
 	int err;
 
 	if (dev >= SNDRV_CARDS)
@@ -5027,10 +5023,10 @@ static int __devinit snd_hdsp_probe(struct pci_dev *pci,
 		return -ENOENT;
 	}
 
-	if (!(card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(hdsp_t))))
+	if (!(card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(struct hdsp))))
 		return -ENOMEM;
 
-	hdsp = (hdsp_t *) card->private_data;
+	hdsp = (struct hdsp *) card->private_data;
 	card->private_free = snd_hdsp_card_free;
 	hdsp->dev = dev;
 	hdsp->pci = pci;
-- 
cgit v1.2.3-70-g09d2


From 98274f0701f9e6579ae493ac190227fe93d11e20 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:52:34 +0100
Subject: [ALSA] Remove xxx_t typedefs: PCI HDSP-MADI

Modules: HDSPM driver,RME9652 driver

Remove xxx_t typedefs from the PCI HDSP-MADI driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/hdspm.h     |  45 ++--
 sound/pci/rme9652/hdspm.c | 592 +++++++++++++++++++++++-----------------------
 2 files changed, 315 insertions(+), 322 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/hdspm.h b/include/sound/hdspm.h
index c34427ccd0b..c3c854d99c2 100644
--- a/include/sound/hdspm.h
+++ b/include/sound/hdspm.h
@@ -25,8 +25,6 @@
 
 /* -------------------- IOCTL Peak/RMS Meters -------------------- */
 
-typedef struct _snd_hdspm_peak_rms hdspm_peak_rms_t;
-
 /* peam rms level structure like we get from hardware 
   
    maybe in future we can memory map it so I just copy it
@@ -36,7 +34,7 @@ typedef struct _snd_hdspm_peak_rms hdspm_peak_rms_t;
    (i asume so from the code)
 */
 
-struct _snd_hdspm_peak_rms {
+struct hdspm_peak_rms {
 
 	unsigned int level_offset[1024];
 
@@ -58,18 +56,16 @@ struct _snd_hdspm_peak_rms {
 	unsigned int xxx_rms_h[64];	/* not used */
 };
 
-struct sndrv_hdspm_peak_rms_ioctl {
-	hdspm_peak_rms_t *peak;
+struct hdspm_peak_rms_ioctl {
+	struct hdspm_peak_rms *peak;
 };
 
 /* use indirect access due to the limit of ioctl bit size */
-#define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct sndrv_hdspm_peak_rms_ioctl)
+#define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdspm_peak_rms_ioctl)
 
 /* ------------ CONFIG block IOCTL ---------------------- */
 
-typedef struct _snd_hdspm_config_info hdspm_config_info_t;
-
-struct _snd_hdspm_config_info {
+struct hdspm_config_info {
 	unsigned char pref_sync_ref;
 	unsigned char wordclock_sync_check;
 	unsigned char madi_sync_check;
@@ -83,18 +79,16 @@ struct _snd_hdspm_config_info {
 	unsigned int analog_out;
 };
 
-#define SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, hdspm_config_info_t)
+#define SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdspm_config_info)
 
 
 /* get Soundcard Version */
 
-typedef struct _snd_hdspm_version hdspm_version_t;
-
-struct _snd_hdspm_version {
+struct hdspm_version {
 	unsigned short firmware_rev;
 };
 
-#define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x43, hdspm_version_t)
+#define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdspm_version)
 
 
 /* ------------- get Matrix Mixer IOCTL --------------- */
@@ -108,24 +102,27 @@ struct _snd_hdspm_version {
 
 #define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS
 
-typedef struct _snd_hdspm_channelfader snd_hdspm_channelfader_t;
-
-struct _snd_hdspm_channelfader {
+struct hdspm_channelfader {
 	unsigned int in[HDSPM_MIXER_CHANNELS];
 	unsigned int pb[HDSPM_MIXER_CHANNELS];
 };
 
-typedef struct _snd_hdspm_mixer hdspm_mixer_t;
-
-struct _snd_hdspm_mixer {
-	snd_hdspm_channelfader_t ch[HDSPM_MIXER_CHANNELS];
+struct hdspm_mixer {
+	struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS];
 };
 
-struct sndrv_hdspm_mixer_ioctl {
-	hdspm_mixer_t *mixer;
+struct hdspm_mixer_ioctl {
+	struct hdspm_mixer *mixer;
 };
 
 /* use indirect access due to the limit of ioctl bit size */
-#define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct sndrv_hdspm_mixer_ioctl)
+#define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl)
+
+/* typedefs for compatibility to user-space */
+typedef struct hdspm_peak_rms hdspm_peak_rms_t;
+typedef struct hdspm_config_info hdspm_config_info_t;
+typedef struct hdspm_version hdspm_version_t;
+typedef struct hdspm_channelfader snd_hdspm_channelfader_t;
+typedef struct hdspm_mixer hdspm_mixer_t;
 
 #endif				/* __SOUND_HDSPM_H */
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index ae2013a8492..3dec616bad6 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -318,25 +318,22 @@ MODULE_SUPPORTED_DEVICE("{{RME HDSPM-MADI}}");
 #define HDSPM_DMA_AREA_BYTES (HDSPM_MAX_CHANNELS * HDSPM_CHANNEL_BUFFER_BYTES)
 #define HDSPM_DMA_AREA_KILOBYTES (HDSPM_DMA_AREA_BYTES/1024)
 
-typedef struct _hdspm hdspm_t;
-typedef struct _hdspm_midi hdspm_midi_t;
-
-struct _hdspm_midi {
-	hdspm_t *hdspm;
+struct hdspm_midi {
+	struct hdspm *hdspm;
 	int id;
-	snd_rawmidi_t *rmidi;
-	snd_rawmidi_substream_t *input;
-	snd_rawmidi_substream_t *output;
+	struct snd_rawmidi *rmidi;
+	struct snd_rawmidi_substream *input;
+	struct snd_rawmidi_substream *output;
 	char istimer;		/* timer in use */
 	struct timer_list timer;
 	spinlock_t lock;
 	int pending;
 };
 
-struct _hdspm {
+struct hdspm {
         spinlock_t lock;
-        snd_pcm_substream_t *capture_substream;	 /* only one playback */
-        snd_pcm_substream_t *playback_substream; /* and/or capture stream */
+        struct snd_pcm_substream *capture_substream;	 /* only one playback */
+        struct snd_pcm_substream *playback_substream; /* and/or capture stream */
 
 	char *card_name;	     /* for procinfo */
 	unsigned short firmware_rev; /* dont know if relevant */
@@ -347,7 +344,7 @@ struct _hdspm {
 	u32 control_register;	/* cached value */
 	u32 control2_register;	/* cached value */
 
-	hdspm_midi_t midi[2];
+	struct hdspm_midi midi[2];
 	struct tasklet_struct midi_tasklet;
 
 	size_t period_bytes;
@@ -375,15 +372,15 @@ struct _hdspm {
 
 	int irq_count;		/* for debug */
 
-	snd_card_t *card;	/* one card */
-	snd_pcm_t *pcm;		/* has one pcm */
-	snd_hwdep_t *hwdep;	/* and a hwdep for additional ioctl */
+	struct snd_card *card;	/* one card */
+	struct snd_pcm *pcm;		/* has one pcm */
+	struct snd_hwdep *hwdep;	/* and a hwdep for additional ioctl */
 	struct pci_dev *pci;	/* and an pci info */
 
 	/* Mixer vars */
-	snd_kcontrol_t *playback_mixer_ctls[HDSPM_MAX_CHANNELS];	/* fast alsa mixer */
-	snd_kcontrol_t *input_mixer_ctls[HDSPM_MAX_CHANNELS];	/* but input to much, so not used */
-	hdspm_mixer_t *mixer;	/* full mixer accessable over mixer ioctl or hwdep-device */
+	struct snd_kcontrol *playback_mixer_ctls[HDSPM_MAX_CHANNELS];	/* fast alsa mixer */
+	struct snd_kcontrol *input_mixer_ctls[HDSPM_MAX_CHANNELS];	/* but input to much, so not used */
+	struct hdspm_mixer *mixer;	/* full mixer accessable over mixer ioctl or hwdep-device */
 
 };
 
@@ -444,28 +441,28 @@ static struct pci_device_id snd_hdspm_ids[] = {
 MODULE_DEVICE_TABLE(pci, snd_hdspm_ids);
 
 /* prototypes */
-static int __devinit snd_hdspm_create_alsa_devices(snd_card_t * card,
-						   hdspm_t * hdspm);
-static int __devinit snd_hdspm_create_pcm(snd_card_t * card,
-					  hdspm_t * hdspm);
-
-static inline void snd_hdspm_initialize_midi_flush(hdspm_t * hdspm);
-static int hdspm_update_simple_mixer_controls(hdspm_t * hdspm);
-static int hdspm_autosync_ref(hdspm_t * hdspm);
-static int snd_hdspm_set_defaults(hdspm_t * hdspm);
-static void hdspm_set_sgbuf(hdspm_t * hdspm, struct snd_sg_buf *sgbuf,
+static int __devinit snd_hdspm_create_alsa_devices(struct snd_card *card,
+						   struct hdspm * hdspm);
+static int __devinit snd_hdspm_create_pcm(struct snd_card *card,
+					  struct hdspm * hdspm);
+
+static inline void snd_hdspm_initialize_midi_flush(struct hdspm * hdspm);
+static int hdspm_update_simple_mixer_controls(struct hdspm * hdspm);
+static int hdspm_autosync_ref(struct hdspm * hdspm);
+static int snd_hdspm_set_defaults(struct hdspm * hdspm);
+static void hdspm_set_sgbuf(struct hdspm * hdspm, struct snd_sg_buf *sgbuf,
 			     unsigned int reg, int channels);
 
 /* Write/read to/from HDSPM with Adresses in Bytes
    not words but only 32Bit writes are allowed */
 
-static inline void hdspm_write(hdspm_t * hdspm, unsigned int reg,
+static inline void hdspm_write(struct hdspm * hdspm, unsigned int reg,
 			       unsigned int val)
 {
 	writel(val, hdspm->iobase + reg);
 }
 
-static inline unsigned int hdspm_read(hdspm_t * hdspm, unsigned int reg)
+static inline unsigned int hdspm_read(struct hdspm * hdspm, unsigned int reg)
 {
 	return readl(hdspm->iobase + reg);
 }
@@ -474,7 +471,7 @@ static inline unsigned int hdspm_read(hdspm_t * hdspm, unsigned int reg)
    mixer is write only on hardware so we have to cache him for read 
    each fader is a u32, but uses only the first 16 bit */
 
-static inline int hdspm_read_in_gain(hdspm_t * hdspm, unsigned int chan,
+static inline int hdspm_read_in_gain(struct hdspm * hdspm, unsigned int chan,
 				     unsigned int in)
 {
 	if (chan > HDSPM_MIXER_CHANNELS || in > HDSPM_MIXER_CHANNELS)
@@ -483,7 +480,7 @@ static inline int hdspm_read_in_gain(hdspm_t * hdspm, unsigned int chan,
 	return hdspm->mixer->ch[chan].in[in];
 }
 
-static inline int hdspm_read_pb_gain(hdspm_t * hdspm, unsigned int chan,
+static inline int hdspm_read_pb_gain(struct hdspm * hdspm, unsigned int chan,
 				     unsigned int pb)
 {
 	if (chan > HDSPM_MIXER_CHANNELS || pb > HDSPM_MIXER_CHANNELS)
@@ -491,7 +488,7 @@ static inline int hdspm_read_pb_gain(hdspm_t * hdspm, unsigned int chan,
 	return hdspm->mixer->ch[chan].pb[pb];
 }
 
-static inline int hdspm_write_in_gain(hdspm_t * hdspm, unsigned int chan,
+static inline int hdspm_write_in_gain(struct hdspm * hdspm, unsigned int chan,
 				      unsigned int in, unsigned short data)
 {
 	if (chan >= HDSPM_MIXER_CHANNELS || in >= HDSPM_MIXER_CHANNELS)
@@ -504,7 +501,7 @@ static inline int hdspm_write_in_gain(hdspm_t * hdspm, unsigned int chan,
 	return 0;
 }
 
-static inline int hdspm_write_pb_gain(hdspm_t * hdspm, unsigned int chan,
+static inline int hdspm_write_pb_gain(struct hdspm * hdspm, unsigned int chan,
 				      unsigned int pb, unsigned short data)
 {
 	if (chan >= HDSPM_MIXER_CHANNELS || pb >= HDSPM_MIXER_CHANNELS)
@@ -519,18 +516,18 @@ static inline int hdspm_write_pb_gain(hdspm_t * hdspm, unsigned int chan,
 
 
 /* enable DMA for specific channels, now available for DSP-MADI */
-static inline void snd_hdspm_enable_in(hdspm_t * hdspm, int i, int v)
+static inline void snd_hdspm_enable_in(struct hdspm * hdspm, int i, int v)
 {
 	hdspm_write(hdspm, HDSPM_inputEnableBase + (4 * i), v);
 }
 
-static inline void snd_hdspm_enable_out(hdspm_t * hdspm, int i, int v)
+static inline void snd_hdspm_enable_out(struct hdspm * hdspm, int i, int v)
 {
 	hdspm_write(hdspm, HDSPM_outputEnableBase + (4 * i), v);
 }
 
 /* check if same process is writing and reading */
-static inline int snd_hdspm_use_is_exclusive(hdspm_t * hdspm)
+static inline int snd_hdspm_use_is_exclusive(struct hdspm * hdspm)
 {
 	unsigned long flags;
 	int ret = 1;
@@ -545,7 +542,7 @@ static inline int snd_hdspm_use_is_exclusive(hdspm_t * hdspm)
 }
 
 /* check for external sample rate */
-static inline int hdspm_external_sample_rate(hdspm_t * hdspm)
+static inline int hdspm_external_sample_rate(struct hdspm * hdspm)
 {
 	unsigned int status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
 	unsigned int status = hdspm_read(hdspm, HDSPM_statusRegister);
@@ -630,13 +627,13 @@ static inline int hdspm_external_sample_rate(hdspm_t * hdspm)
 }
 
 /* Latency function */
-static inline void hdspm_compute_period_size(hdspm_t * hdspm)
+static inline void hdspm_compute_period_size(struct hdspm * hdspm)
 {
 	hdspm->period_bytes =
 	    1 << ((hdspm_decode_latency(hdspm->control_register) + 8));
 }
 
-static snd_pcm_uframes_t hdspm_hw_pointer(hdspm_t * hdspm)
+static snd_pcm_uframes_t hdspm_hw_pointer(struct hdspm * hdspm)
 {
 	int position;
 
@@ -660,20 +657,20 @@ static snd_pcm_uframes_t hdspm_hw_pointer(hdspm_t * hdspm)
 }
 
 
-static inline void hdspm_start_audio(hdspm_t * s)
+static inline void hdspm_start_audio(struct hdspm * s)
 {
 	s->control_register |= (HDSPM_AudioInterruptEnable | HDSPM_Start);
 	hdspm_write(s, HDSPM_controlRegister, s->control_register);
 }
 
-static inline void hdspm_stop_audio(hdspm_t * s)
+static inline void hdspm_stop_audio(struct hdspm * s)
 {
 	s->control_register &= ~(HDSPM_Start | HDSPM_AudioInterruptEnable);
 	hdspm_write(s, HDSPM_controlRegister, s->control_register);
 }
 
 /* should I silence all or only opened ones ? doit all for first even is 4MB*/
-static inline void hdspm_silence_playback(hdspm_t * hdspm)
+static inline void hdspm_silence_playback(struct hdspm * hdspm)
 {
 	int i;
 	int n = hdspm->period_bytes;
@@ -687,7 +684,7 @@ static inline void hdspm_silence_playback(hdspm_t * hdspm)
 	}
 }
 
-static int hdspm_set_interrupt_interval(hdspm_t * s, unsigned int frames)
+static int hdspm_set_interrupt_interval(struct hdspm * s, unsigned int frames)
 {
 	int n;
 
@@ -713,7 +710,7 @@ static int hdspm_set_interrupt_interval(hdspm_t * s, unsigned int frames)
 
 
 /* dummy set rate lets see what happens */
-static int hdspm_set_rate(hdspm_t * hdspm, int rate, int called_internally)
+static int hdspm_set_rate(struct hdspm * hdspm, int rate, int called_internally)
 {
 	int reject_if_open = 0;
 	int current_rate;
@@ -838,7 +835,7 @@ static int hdspm_set_rate(hdspm_t * hdspm, int rate, int called_internally)
 }
 
 /* mainly for init to 0 on load */
-static void all_in_all_mixer(hdspm_t * hdspm, int sgain)
+static void all_in_all_mixer(struct hdspm * hdspm, int sgain)
 {
 	int i, j;
 	unsigned int gain =
@@ -855,7 +852,7 @@ static void all_in_all_mixer(hdspm_t * hdspm, int sgain)
    MIDI
   ----------------------------------------------------------------------------*/
 
-static inline unsigned char snd_hdspm_midi_read_byte (hdspm_t *hdspm, int id)
+static inline unsigned char snd_hdspm_midi_read_byte (struct hdspm *hdspm, int id)
 {
 	/* the hardware already does the relevant bit-mask with 0xff */
 	if (id)
@@ -864,7 +861,7 @@ static inline unsigned char snd_hdspm_midi_read_byte (hdspm_t *hdspm, int id)
 		return hdspm_read(hdspm, HDSPM_midiDataIn0);
 }
 
-static inline void snd_hdspm_midi_write_byte (hdspm_t *hdspm, int id, int val)
+static inline void snd_hdspm_midi_write_byte (struct hdspm *hdspm, int id, int val)
 {
 	/* the hardware already does the relevant bit-mask with 0xff */
 	if (id)
@@ -873,7 +870,7 @@ static inline void snd_hdspm_midi_write_byte (hdspm_t *hdspm, int id, int val)
 		return hdspm_write(hdspm, HDSPM_midiDataOut0, val);
 }
 
-static inline int snd_hdspm_midi_input_available (hdspm_t *hdspm, int id)
+static inline int snd_hdspm_midi_input_available (struct hdspm *hdspm, int id)
 {
 	if (id)
 		return (hdspm_read(hdspm, HDSPM_midiStatusIn1) & 0xff);
@@ -881,7 +878,7 @@ static inline int snd_hdspm_midi_input_available (hdspm_t *hdspm, int id)
 		return (hdspm_read(hdspm, HDSPM_midiStatusIn0) & 0xff);
 }
 
-static inline int snd_hdspm_midi_output_possible (hdspm_t *hdspm, int id)
+static inline int snd_hdspm_midi_output_possible (struct hdspm *hdspm, int id)
 {
 	int fifo_bytes_used;
 
@@ -896,13 +893,13 @@ static inline int snd_hdspm_midi_output_possible (hdspm_t *hdspm, int id)
 		return 0;
 }
 
-static inline void snd_hdspm_flush_midi_input (hdspm_t *hdspm, int id)
+static inline void snd_hdspm_flush_midi_input (struct hdspm *hdspm, int id)
 {
 	while (snd_hdspm_midi_input_available (hdspm, id))
 		snd_hdspm_midi_read_byte (hdspm, id);
 }
 
-static int snd_hdspm_midi_output_write (hdspm_midi_t *hmidi)
+static int snd_hdspm_midi_output_write (struct hdspm_midi *hmidi)
 {
 	unsigned long flags;
 	int n_pending;
@@ -930,7 +927,7 @@ static int snd_hdspm_midi_output_write (hdspm_midi_t *hmidi)
 	return 0;
 }
 
-static int snd_hdspm_midi_input_read (hdspm_midi_t *hmidi)
+static int snd_hdspm_midi_input_read (struct hdspm_midi *hmidi)
 {
 	unsigned char buf[128]; /* this buffer is designed to match the MIDI input FIFO size */
 	unsigned long flags;
@@ -967,14 +964,14 @@ static int snd_hdspm_midi_input_read (hdspm_midi_t *hmidi)
 	return snd_hdspm_midi_output_write (hmidi);
 }
 
-static void snd_hdspm_midi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_hdspm_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
 {
-	hdspm_t *hdspm;
-	hdspm_midi_t *hmidi;
+	struct hdspm *hdspm;
+	struct hdspm_midi *hmidi;
 	unsigned long flags;
 	u32 ie;
 
-	hmidi = (hdspm_midi_t *) substream->rmidi->private_data;
+	hmidi = (struct hdspm_midi *) substream->rmidi->private_data;
 	hdspm = hmidi->hdspm;
 	ie = hmidi->id ? HDSPM_Midi1InterruptEnable : HDSPM_Midi0InterruptEnable;
 	spin_lock_irqsave (&hdspm->lock, flags);
@@ -993,7 +990,7 @@ static void snd_hdspm_midi_input_trigger(snd_rawmidi_substream_t * substream, in
 
 static void snd_hdspm_midi_output_timer(unsigned long data)
 {
-	hdspm_midi_t *hmidi = (hdspm_midi_t *) data;
+	struct hdspm_midi *hmidi = (struct hdspm_midi *) data;
 	unsigned long flags;
 	
 	snd_hdspm_midi_output_write(hmidi);
@@ -1013,12 +1010,12 @@ static void snd_hdspm_midi_output_timer(unsigned long data)
 	spin_unlock_irqrestore (&hmidi->lock, flags);
 }
 
-static void snd_hdspm_midi_output_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_hdspm_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
 {
-	hdspm_midi_t *hmidi;
+	struct hdspm_midi *hmidi;
 	unsigned long flags;
 
-	hmidi = (hdspm_midi_t *) substream->rmidi->private_data;
+	hmidi = (struct hdspm_midi *) substream->rmidi->private_data;
 	spin_lock_irqsave (&hmidi->lock, flags);
 	if (up) {
 		if (!hmidi->istimer) {
@@ -1039,11 +1036,11 @@ static void snd_hdspm_midi_output_trigger(snd_rawmidi_substream_t * substream, i
 		snd_hdspm_midi_output_write(hmidi);
 }
 
-static int snd_hdspm_midi_input_open(snd_rawmidi_substream_t * substream)
+static int snd_hdspm_midi_input_open(struct snd_rawmidi_substream *substream)
 {
-	hdspm_midi_t *hmidi;
+	struct hdspm_midi *hmidi;
 
-	hmidi = (hdspm_midi_t *) substream->rmidi->private_data;
+	hmidi = (struct hdspm_midi *) substream->rmidi->private_data;
 	spin_lock_irq (&hmidi->lock);
 	snd_hdspm_flush_midi_input (hmidi->hdspm, hmidi->id);
 	hmidi->input = substream;
@@ -1052,11 +1049,11 @@ static int snd_hdspm_midi_input_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_hdspm_midi_output_open(snd_rawmidi_substream_t * substream)
+static int snd_hdspm_midi_output_open(struct snd_rawmidi_substream *substream)
 {
-	hdspm_midi_t *hmidi;
+	struct hdspm_midi *hmidi;
 
-	hmidi = (hdspm_midi_t *) substream->rmidi->private_data;
+	hmidi = (struct hdspm_midi *) substream->rmidi->private_data;
 	spin_lock_irq (&hmidi->lock);
 	hmidi->output = substream;
 	spin_unlock_irq (&hmidi->lock);
@@ -1064,13 +1061,13 @@ static int snd_hdspm_midi_output_open(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_hdspm_midi_input_close(snd_rawmidi_substream_t * substream)
+static int snd_hdspm_midi_input_close(struct snd_rawmidi_substream *substream)
 {
-	hdspm_midi_t *hmidi;
+	struct hdspm_midi *hmidi;
 
 	snd_hdspm_midi_input_trigger (substream, 0);
 
-	hmidi = (hdspm_midi_t *) substream->rmidi->private_data;
+	hmidi = (struct hdspm_midi *) substream->rmidi->private_data;
 	spin_lock_irq (&hmidi->lock);
 	hmidi->input = NULL;
 	spin_unlock_irq (&hmidi->lock);
@@ -1078,13 +1075,13 @@ static int snd_hdspm_midi_input_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static int snd_hdspm_midi_output_close(snd_rawmidi_substream_t * substream)
+static int snd_hdspm_midi_output_close(struct snd_rawmidi_substream *substream)
 {
-	hdspm_midi_t *hmidi;
+	struct hdspm_midi *hmidi;
 
 	snd_hdspm_midi_output_trigger (substream, 0);
 
-	hmidi = (hdspm_midi_t *) substream->rmidi->private_data;
+	hmidi = (struct hdspm_midi *) substream->rmidi->private_data;
 	spin_lock_irq (&hmidi->lock);
 	hmidi->output = NULL;
 	spin_unlock_irq (&hmidi->lock);
@@ -1092,21 +1089,21 @@ static int snd_hdspm_midi_output_close(snd_rawmidi_substream_t * substream)
 	return 0;
 }
 
-static snd_rawmidi_ops_t snd_hdspm_midi_output =
+static struct snd_rawmidi_ops snd_hdspm_midi_output =
 {
 	.open =		snd_hdspm_midi_output_open,
 	.close =	snd_hdspm_midi_output_close,
 	.trigger =	snd_hdspm_midi_output_trigger,
 };
 
-static snd_rawmidi_ops_t snd_hdspm_midi_input =
+static struct snd_rawmidi_ops snd_hdspm_midi_input =
 {
 	.open =		snd_hdspm_midi_input_open,
 	.close =	snd_hdspm_midi_input_close,
 	.trigger =	snd_hdspm_midi_input_trigger,
 };
 
-static int __devinit snd_hdspm_create_midi (snd_card_t *card, hdspm_t *hdspm, int id)
+static int __devinit snd_hdspm_create_midi (struct snd_card *card, struct hdspm *hdspm, int id)
 {
 	int err;
 	char buf[32];
@@ -1140,7 +1137,7 @@ static int __devinit snd_hdspm_create_midi (snd_card_t *card, hdspm_t *hdspm, in
 
 static void hdspm_midi_tasklet(unsigned long arg)
 {
-	hdspm_t *hdspm = (hdspm_t *)arg;
+	struct hdspm *hdspm = (struct hdspm *)arg;
 	
 	if (hdspm->midi[0].pending)
 		snd_hdspm_midi_input_read (&hdspm->midi[0]);
@@ -1164,19 +1161,19 @@ static void hdspm_midi_tasklet(unsigned long arg)
   .get = snd_hdspm_get_system_sample_rate \
 }
 
-static int snd_hdspm_info_system_sample_rate(snd_kcontrol_t * kcontrol,
-					     snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_system_sample_rate(struct snd_kcontrol *kcontrol,
+					     struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_hdspm_get_system_sample_rate(snd_kcontrol_t * kcontrol,
-					    snd_ctl_elem_value_t *
+static int snd_hdspm_get_system_sample_rate(struct snd_kcontrol *kcontrol,
+					    struct snd_ctl_elem_value *
 					    ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] = hdspm->system_sample_rate;
 	return 0;
@@ -1191,8 +1188,8 @@ static int snd_hdspm_get_system_sample_rate(snd_kcontrol_t * kcontrol,
   .get = snd_hdspm_get_autosync_sample_rate \
 }
 
-static int snd_hdspm_info_autosync_sample_rate(snd_kcontrol_t * kcontrol,
-					       snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_autosync_sample_rate(struct snd_kcontrol *kcontrol,
+					       struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = { "32000", "44100", "48000",
 		"64000", "88200", "96000",
@@ -1210,11 +1207,11 @@ static int snd_hdspm_info_autosync_sample_rate(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_get_autosync_sample_rate(snd_kcontrol_t * kcontrol,
-					      snd_ctl_elem_value_t *
+static int snd_hdspm_get_autosync_sample_rate(struct snd_kcontrol *kcontrol,
+					      struct snd_ctl_elem_value *
 					      ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 
 	switch (hdspm_external_sample_rate(hdspm)) {
 	case 32000:
@@ -1262,7 +1259,7 @@ static int snd_hdspm_get_autosync_sample_rate(snd_kcontrol_t * kcontrol,
 
 
 
-static int hdspm_system_clock_mode(hdspm_t * hdspm)
+static int hdspm_system_clock_mode(struct hdspm * hdspm)
 {
         /* Always reflect the hardware info, rme is never wrong !!!! */
 
@@ -1271,8 +1268,8 @@ static int hdspm_system_clock_mode(hdspm_t * hdspm)
 	return 1;
 }
 
-static int snd_hdspm_info_system_clock_mode(snd_kcontrol_t * kcontrol,
-					    snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_system_clock_mode(struct snd_kcontrol *kcontrol,
+					    struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = { "Master", "Slave" };
 
@@ -1287,10 +1284,10 @@ static int snd_hdspm_info_system_clock_mode(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_get_system_clock_mode(snd_kcontrol_t * kcontrol,
-					   snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_get_system_clock_mode(struct snd_kcontrol *kcontrol,
+					   struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] =
 	    hdspm_system_clock_mode(hdspm);
@@ -1306,7 +1303,7 @@ static int snd_hdspm_get_system_clock_mode(snd_kcontrol_t * kcontrol,
   .put = snd_hdspm_put_clock_source \
 }
 
-static int hdspm_clock_source(hdspm_t * hdspm)
+static int hdspm_clock_source(struct hdspm * hdspm)
 {
 	if (hdspm->control_register & HDSPM_ClockModeMaster) {
 		switch (hdspm->system_sample_rate) {
@@ -1336,7 +1333,7 @@ static int hdspm_clock_source(hdspm_t * hdspm)
 	}
 }
 
-static int hdspm_set_clock_source(hdspm_t * hdspm, int mode)
+static int hdspm_set_clock_source(struct hdspm * hdspm, int mode)
 {
 	int rate;
 	switch (mode) {
@@ -1386,8 +1383,8 @@ static int hdspm_set_clock_source(hdspm_t * hdspm, int mode)
 	return 0;
 }
 
-static int snd_hdspm_info_clock_source(snd_kcontrol_t * kcontrol,
-				       snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_clock_source(struct snd_kcontrol *kcontrol,
+				       struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = { "AutoSync",
 		"Internal 32.0 kHz", "Internal 44.1 kHz",
@@ -1412,19 +1409,19 @@ static int snd_hdspm_info_clock_source(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_get_clock_source(snd_kcontrol_t * kcontrol,
-				      snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_get_clock_source(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] = hdspm_clock_source(hdspm);
 	return 0;
 }
 
-static int snd_hdspm_put_clock_source(snd_kcontrol_t * kcontrol,
-				      snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_put_clock_source(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 	int change;
 	int val;
 
@@ -1453,7 +1450,7 @@ static int snd_hdspm_put_clock_source(snd_kcontrol_t * kcontrol,
   .put = snd_hdspm_put_pref_sync_ref \
 }
 
-static int hdspm_pref_sync_ref(hdspm_t * hdspm)
+static int hdspm_pref_sync_ref(struct hdspm * hdspm)
 {
 	/* Notice that this looks at the requested sync source,
 	   not the one actually in use.
@@ -1468,7 +1465,7 @@ static int hdspm_pref_sync_ref(hdspm_t * hdspm)
 	return HDSPM_SYNC_FROM_WORD;
 }
 
-static int hdspm_set_pref_sync_ref(hdspm_t * hdspm, int pref)
+static int hdspm_set_pref_sync_ref(struct hdspm * hdspm, int pref)
 {
 	hdspm->control_register &= ~HDSPM_SyncRefMask;
 
@@ -1486,8 +1483,8 @@ static int hdspm_set_pref_sync_ref(hdspm_t * hdspm, int pref)
 	return 0;
 }
 
-static int snd_hdspm_info_pref_sync_ref(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_pref_sync_ref(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = { "Word", "MADI" };
 
@@ -1504,19 +1501,19 @@ static int snd_hdspm_info_pref_sync_ref(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_get_pref_sync_ref(snd_kcontrol_t * kcontrol,
-				       snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_get_pref_sync_ref(struct snd_kcontrol *kcontrol,
+				       struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] = hdspm_pref_sync_ref(hdspm);
 	return 0;
 }
 
-static int snd_hdspm_put_pref_sync_ref(snd_kcontrol_t * kcontrol,
-				       snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_put_pref_sync_ref(struct snd_kcontrol *kcontrol,
+				       struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 	int change, max;
 	unsigned int val;
 
@@ -1543,7 +1540,7 @@ static int snd_hdspm_put_pref_sync_ref(snd_kcontrol_t * kcontrol,
   .get = snd_hdspm_get_autosync_ref, \
 }
 
-static int hdspm_autosync_ref(hdspm_t * hdspm)
+static int hdspm_autosync_ref(struct hdspm * hdspm)
 {
 	/* This looks at the autosync selected sync reference */
 	unsigned int status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
@@ -1566,8 +1563,8 @@ static int hdspm_autosync_ref(hdspm_t * hdspm)
 	return 0;
 }
 
-static int snd_hdspm_info_autosync_ref(snd_kcontrol_t * kcontrol,
-				       snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_autosync_ref(struct snd_kcontrol *kcontrol,
+				       struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = { "WordClock", "MADI", "None" };
 
@@ -1582,10 +1579,10 @@ static int snd_hdspm_info_autosync_ref(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_get_autosync_ref(snd_kcontrol_t * kcontrol,
-				      snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_get_autosync_ref(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] = hdspm_pref_sync_ref(hdspm);
 	return 0;
@@ -1600,13 +1597,13 @@ static int snd_hdspm_get_autosync_ref(snd_kcontrol_t * kcontrol,
   .put = snd_hdspm_put_line_out \
 }
 
-static int hdspm_line_out(hdspm_t * hdspm)
+static int hdspm_line_out(struct hdspm * hdspm)
 {
 	return (hdspm->control_register & HDSPM_LineOut) ? 1 : 0;
 }
 
 
-static int hdspm_set_line_output(hdspm_t * hdspm, int out)
+static int hdspm_set_line_output(struct hdspm * hdspm, int out)
 {
 	if (out)
 		hdspm->control_register |= HDSPM_LineOut;
@@ -1617,8 +1614,8 @@ static int hdspm_set_line_output(hdspm_t * hdspm, int out)
 	return 0;
 }
 
-static int snd_hdspm_info_line_out(snd_kcontrol_t * kcontrol,
-				   snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_line_out(struct snd_kcontrol *kcontrol,
+				   struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -1627,10 +1624,10 @@ static int snd_hdspm_info_line_out(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_get_line_out(snd_kcontrol_t * kcontrol,
-				  snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_get_line_out(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 
 	spin_lock_irq(&hdspm->lock);
 	ucontrol->value.integer.value[0] = hdspm_line_out(hdspm);
@@ -1638,10 +1635,10 @@ static int snd_hdspm_get_line_out(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_put_line_out(snd_kcontrol_t * kcontrol,
-				  snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_put_line_out(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int val;
 
@@ -1664,12 +1661,12 @@ static int snd_hdspm_put_line_out(snd_kcontrol_t * kcontrol,
   .put = snd_hdspm_put_tx_64 \
 }
 
-static int hdspm_tx_64(hdspm_t * hdspm)
+static int hdspm_tx_64(struct hdspm * hdspm)
 {
 	return (hdspm->control_register & HDSPM_TX_64ch) ? 1 : 0;
 }
 
-static int hdspm_set_tx_64(hdspm_t * hdspm, int out)
+static int hdspm_set_tx_64(struct hdspm * hdspm, int out)
 {
 	if (out)
 		hdspm->control_register |= HDSPM_TX_64ch;
@@ -1680,8 +1677,8 @@ static int hdspm_set_tx_64(hdspm_t * hdspm, int out)
 	return 0;
 }
 
-static int snd_hdspm_info_tx_64(snd_kcontrol_t * kcontrol,
-				snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_tx_64(struct snd_kcontrol *kcontrol,
+				struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -1690,10 +1687,10 @@ static int snd_hdspm_info_tx_64(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_get_tx_64(snd_kcontrol_t * kcontrol,
-			       snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_get_tx_64(struct snd_kcontrol *kcontrol,
+			       struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 
 	spin_lock_irq(&hdspm->lock);
 	ucontrol->value.integer.value[0] = hdspm_tx_64(hdspm);
@@ -1701,10 +1698,10 @@ static int snd_hdspm_get_tx_64(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_put_tx_64(snd_kcontrol_t * kcontrol,
-			       snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_put_tx_64(struct snd_kcontrol *kcontrol,
+			       struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int val;
 
@@ -1727,12 +1724,12 @@ static int snd_hdspm_put_tx_64(snd_kcontrol_t * kcontrol,
   .put = snd_hdspm_put_c_tms \
 }
 
-static int hdspm_c_tms(hdspm_t * hdspm)
+static int hdspm_c_tms(struct hdspm * hdspm)
 {
 	return (hdspm->control_register & HDSPM_clr_tms) ? 1 : 0;
 }
 
-static int hdspm_set_c_tms(hdspm_t * hdspm, int out)
+static int hdspm_set_c_tms(struct hdspm * hdspm, int out)
 {
 	if (out)
 		hdspm->control_register |= HDSPM_clr_tms;
@@ -1743,8 +1740,8 @@ static int hdspm_set_c_tms(hdspm_t * hdspm, int out)
 	return 0;
 }
 
-static int snd_hdspm_info_c_tms(snd_kcontrol_t * kcontrol,
-				snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_c_tms(struct snd_kcontrol *kcontrol,
+				struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -1753,10 +1750,10 @@ static int snd_hdspm_info_c_tms(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_get_c_tms(snd_kcontrol_t * kcontrol,
-			       snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_get_c_tms(struct snd_kcontrol *kcontrol,
+			       struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 
 	spin_lock_irq(&hdspm->lock);
 	ucontrol->value.integer.value[0] = hdspm_c_tms(hdspm);
@@ -1764,10 +1761,10 @@ static int snd_hdspm_get_c_tms(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_put_c_tms(snd_kcontrol_t * kcontrol,
-			       snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_put_c_tms(struct snd_kcontrol *kcontrol,
+			       struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int val;
 
@@ -1790,12 +1787,12 @@ static int snd_hdspm_put_c_tms(snd_kcontrol_t * kcontrol,
   .put = snd_hdspm_put_safe_mode \
 }
 
-static int hdspm_safe_mode(hdspm_t * hdspm)
+static int hdspm_safe_mode(struct hdspm * hdspm)
 {
 	return (hdspm->control_register & HDSPM_AutoInp) ? 1 : 0;
 }
 
-static int hdspm_set_safe_mode(hdspm_t * hdspm, int out)
+static int hdspm_set_safe_mode(struct hdspm * hdspm, int out)
 {
 	if (out)
 		hdspm->control_register |= HDSPM_AutoInp;
@@ -1806,8 +1803,8 @@ static int hdspm_set_safe_mode(hdspm_t * hdspm, int out)
 	return 0;
 }
 
-static int snd_hdspm_info_safe_mode(snd_kcontrol_t * kcontrol,
-				    snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_safe_mode(struct snd_kcontrol *kcontrol,
+				    struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -1816,10 +1813,10 @@ static int snd_hdspm_info_safe_mode(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_get_safe_mode(snd_kcontrol_t * kcontrol,
-				   snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_get_safe_mode(struct snd_kcontrol *kcontrol,
+				   struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 
 	spin_lock_irq(&hdspm->lock);
 	ucontrol->value.integer.value[0] = hdspm_safe_mode(hdspm);
@@ -1827,10 +1824,10 @@ static int snd_hdspm_get_safe_mode(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_put_safe_mode(snd_kcontrol_t * kcontrol,
-				   snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_put_safe_mode(struct snd_kcontrol *kcontrol,
+				   struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int val;
 
@@ -1853,12 +1850,12 @@ static int snd_hdspm_put_safe_mode(snd_kcontrol_t * kcontrol,
   .put = snd_hdspm_put_input_select \
 }
 
-static int hdspm_input_select(hdspm_t * hdspm)
+static int hdspm_input_select(struct hdspm * hdspm)
 {
 	return (hdspm->control_register & HDSPM_InputSelect0) ? 1 : 0;
 }
 
-static int hdspm_set_input_select(hdspm_t * hdspm, int out)
+static int hdspm_set_input_select(struct hdspm * hdspm, int out)
 {
 	if (out)
 		hdspm->control_register |= HDSPM_InputSelect0;
@@ -1869,8 +1866,8 @@ static int hdspm_set_input_select(hdspm_t * hdspm, int out)
 	return 0;
 }
 
-static int snd_hdspm_info_input_select(snd_kcontrol_t * kcontrol,
-				       snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_input_select(struct snd_kcontrol *kcontrol,
+				       struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = { "optical", "coaxial" };
 
@@ -1887,10 +1884,10 @@ static int snd_hdspm_info_input_select(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_get_input_select(snd_kcontrol_t * kcontrol,
-				      snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_get_input_select(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 
 	spin_lock_irq(&hdspm->lock);
 	ucontrol->value.enumerated.item[0] = hdspm_input_select(hdspm);
@@ -1898,10 +1895,10 @@ static int snd_hdspm_get_input_select(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_put_input_select(snd_kcontrol_t * kcontrol,
-				      snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_put_input_select(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 	int change;
 	unsigned int val;
 
@@ -1937,8 +1934,8 @@ static int snd_hdspm_put_input_select(snd_kcontrol_t * kcontrol,
   .put = snd_hdspm_put_mixer \
 }
 
-static int snd_hdspm_info_mixer(snd_kcontrol_t * kcontrol,
-				snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_mixer(struct snd_kcontrol *kcontrol,
+				struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 3;
@@ -1948,10 +1945,10 @@ static int snd_hdspm_info_mixer(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_get_mixer(snd_kcontrol_t * kcontrol,
-			       snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_get_mixer(struct snd_kcontrol *kcontrol,
+			       struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 	int source;
 	int destination;
 
@@ -1981,10 +1978,10 @@ static int snd_hdspm_get_mixer(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_put_mixer(snd_kcontrol_t * kcontrol,
-			       snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_put_mixer(struct snd_kcontrol *kcontrol,
+			       struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 	int change;
 	int source;
 	int destination;
@@ -2041,8 +2038,8 @@ static int snd_hdspm_put_mixer(snd_kcontrol_t * kcontrol,
   .put = snd_hdspm_put_playback_mixer \
 }
 
-static int snd_hdspm_info_playback_mixer(snd_kcontrol_t * kcontrol,
-					 snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_playback_mixer(struct snd_kcontrol *kcontrol,
+					 struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -2052,10 +2049,10 @@ static int snd_hdspm_info_playback_mixer(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_get_playback_mixer(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_get_playback_mixer(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 	int channel;
 	int mapped_channel;
 
@@ -2079,10 +2076,10 @@ static int snd_hdspm_get_playback_mixer(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_hdspm_put_playback_mixer(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_put_playback_mixer(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 	int change;
 	int channel;
 	int mapped_channel;
@@ -2121,8 +2118,8 @@ static int snd_hdspm_put_playback_mixer(snd_kcontrol_t * kcontrol,
   .get = snd_hdspm_get_wc_sync_check \
 }
 
-static int snd_hdspm_info_sync_check(snd_kcontrol_t * kcontrol,
-				     snd_ctl_elem_info_t * uinfo)
+static int snd_hdspm_info_sync_check(struct snd_kcontrol *kcontrol,
+				     struct snd_ctl_elem_info *uinfo)
 {
 	static char *texts[] = { "No Lock", "Lock", "Sync" };
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
@@ -2136,7 +2133,7 @@ static int snd_hdspm_info_sync_check(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int hdspm_wc_sync_check(hdspm_t * hdspm)
+static int hdspm_wc_sync_check(struct hdspm * hdspm)
 {
 	int status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
 	if (status2 & HDSPM_wcLock) {
@@ -2148,10 +2145,10 @@ static int hdspm_wc_sync_check(hdspm_t * hdspm)
 	return 0;
 }
 
-static int snd_hdspm_get_wc_sync_check(snd_kcontrol_t * kcontrol,
-				       snd_ctl_elem_value_t * ucontrol)
+static int snd_hdspm_get_wc_sync_check(struct snd_kcontrol *kcontrol,
+				       struct snd_ctl_elem_value *ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] = hdspm_wc_sync_check(hdspm);
 	return 0;
@@ -2167,7 +2164,7 @@ static int snd_hdspm_get_wc_sync_check(snd_kcontrol_t * kcontrol,
   .get = snd_hdspm_get_madisync_sync_check \
 }
 
-static int hdspm_madisync_sync_check(hdspm_t * hdspm)
+static int hdspm_madisync_sync_check(struct hdspm * hdspm)
 {
 	int status = hdspm_read(hdspm, HDSPM_statusRegister);
 	if (status & HDSPM_madiLock) {
@@ -2179,11 +2176,11 @@ static int hdspm_madisync_sync_check(hdspm_t * hdspm)
 	return 0;
 }
 
-static int snd_hdspm_get_madisync_sync_check(snd_kcontrol_t * kcontrol,
-					     snd_ctl_elem_value_t *
+static int snd_hdspm_get_madisync_sync_check(struct snd_kcontrol *kcontrol,
+					     struct snd_ctl_elem_value *
 					     ucontrol)
 {
-	hdspm_t *hdspm = snd_kcontrol_chip(kcontrol);
+	struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
 
 	ucontrol->value.enumerated.item[0] =
 	    hdspm_madisync_sync_check(hdspm);
@@ -2193,7 +2190,7 @@ static int snd_hdspm_get_madisync_sync_check(snd_kcontrol_t * kcontrol,
 
 
 
-static snd_kcontrol_new_t snd_hdspm_controls[] = {
+static struct snd_kcontrol_new snd_hdspm_controls[] = {
 
 	HDSPM_MIXER("Mixer", 0),
 /* 'Sample Clock Source' complies with the alsa control naming scheme */
@@ -2214,10 +2211,10 @@ static snd_kcontrol_new_t snd_hdspm_controls[] = {
 	HDSPM_INPUT_SELECT("Input Select", 0),
 };
 
-static snd_kcontrol_new_t snd_hdspm_playback_mixer = HDSPM_PLAYBACK_MIXER;
+static struct snd_kcontrol_new snd_hdspm_playback_mixer = HDSPM_PLAYBACK_MIXER;
 
 
-static int hdspm_update_simple_mixer_controls(hdspm_t * hdspm)
+static int hdspm_update_simple_mixer_controls(struct hdspm * hdspm)
 {
 	int i;
 
@@ -2241,11 +2238,11 @@ static int hdspm_update_simple_mixer_controls(hdspm_t * hdspm)
 }
 
 
-static int snd_hdspm_create_controls(snd_card_t * card, hdspm_t * hdspm)
+static int snd_hdspm_create_controls(struct snd_card *card, struct hdspm * hdspm)
 {
 	unsigned int idx, limit;
 	int err;
-	snd_kcontrol_t *kctl;
+	struct snd_kcontrol *kctl;
 
 	/* add control list first */
 
@@ -2292,9 +2289,9 @@ static int snd_hdspm_create_controls(snd_card_t * card, hdspm_t * hdspm)
  ------------------------------------------------------------*/
 
 static void
-snd_hdspm_proc_read(snd_info_entry_t * entry, snd_info_buffer_t * buffer)
+snd_hdspm_proc_read(struct snd_info_entry * entry, struct snd_info_buffer *buffer)
 {
-	hdspm_t *hdspm = (hdspm_t *) entry->private_data;
+	struct hdspm *hdspm = (struct hdspm *) entry->private_data;
 	unsigned int status;
 	unsigned int status2;
 	char *pref_sync_ref;
@@ -2487,9 +2484,9 @@ snd_hdspm_proc_read(snd_info_entry_t * entry, snd_info_buffer_t * buffer)
 	snd_iprintf(buffer, "\n");
 }
 
-static void __devinit snd_hdspm_proc_init(hdspm_t * hdspm)
+static void __devinit snd_hdspm_proc_init(struct hdspm * hdspm)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 
 	if (!snd_card_proc_new(hdspm->card, "hdspm", &entry))
 		snd_info_set_text_ops(entry, hdspm, 1024,
@@ -2500,7 +2497,7 @@ static void __devinit snd_hdspm_proc_init(hdspm_t * hdspm)
    hdspm intitialize 
  ------------------------------------------------------------*/
 
-static int snd_hdspm_set_defaults(hdspm_t * hdspm)
+static int snd_hdspm_set_defaults(struct hdspm * hdspm)
 {
 	unsigned int i;
 
@@ -2562,7 +2559,7 @@ static int snd_hdspm_set_defaults(hdspm_t * hdspm)
 static irqreturn_t snd_hdspm_interrupt(int irq, void *dev_id,
 				       struct pt_regs *regs)
 {
-	hdspm_t *hdspm = (hdspm_t *) dev_id;
+	struct hdspm *hdspm = (struct hdspm *) dev_id;
 	unsigned int status;
 	int audio;
 	int midi0;
@@ -2627,14 +2624,14 @@ static irqreturn_t snd_hdspm_interrupt(int irq, void *dev_id,
   ------------------------------------------------------------*/
 
 
-static snd_pcm_uframes_t snd_hdspm_hw_pointer(snd_pcm_substream_t *
+static snd_pcm_uframes_t snd_hdspm_hw_pointer(struct snd_pcm_substream *
 					      substream)
 {
-	hdspm_t *hdspm = snd_pcm_substream_chip(substream);
+	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
 	return hdspm_hw_pointer(hdspm);
 }
 
-static char *hdspm_channel_buffer_location(hdspm_t * hdspm,
+static char *hdspm_channel_buffer_location(struct hdspm * hdspm,
 					   int stream, int channel)
 {
 	int mapped_channel;
@@ -2656,11 +2653,11 @@ static char *hdspm_channel_buffer_location(hdspm_t * hdspm,
 
 
 /* dont know why need it ??? */
-static int snd_hdspm_playback_copy(snd_pcm_substream_t * substream,
+static int snd_hdspm_playback_copy(struct snd_pcm_substream *substream,
 				   int channel, snd_pcm_uframes_t pos,
 				   void __user *src, snd_pcm_uframes_t count)
 {
-	hdspm_t *hdspm = snd_pcm_substream_chip(substream);
+	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
 	char *channel_buf;
 
 	snd_assert(pos + count <= HDSPM_CHANNEL_BUFFER_BYTES / 4,
@@ -2675,11 +2672,11 @@ static int snd_hdspm_playback_copy(snd_pcm_substream_t * substream,
 	return copy_from_user(channel_buf + pos * 4, src, count * 4);
 }
 
-static int snd_hdspm_capture_copy(snd_pcm_substream_t * substream,
+static int snd_hdspm_capture_copy(struct snd_pcm_substream *substream,
 				  int channel, snd_pcm_uframes_t pos,
 				  void __user *dst, snd_pcm_uframes_t count)
 {
-	hdspm_t *hdspm = snd_pcm_substream_chip(substream);
+	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
 	char *channel_buf;
 
 	snd_assert(pos + count <= HDSPM_CHANNEL_BUFFER_BYTES / 4,
@@ -2692,11 +2689,11 @@ static int snd_hdspm_capture_copy(snd_pcm_substream_t * substream,
 	return copy_to_user(dst, channel_buf + pos * 4, count * 4);
 }
 
-static int snd_hdspm_hw_silence(snd_pcm_substream_t * substream,
+static int snd_hdspm_hw_silence(struct snd_pcm_substream *substream,
 				int channel, snd_pcm_uframes_t pos,
 				snd_pcm_uframes_t count)
 {
-	hdspm_t *hdspm = snd_pcm_substream_chip(substream);
+	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
 	char *channel_buf;
 
 	channel_buf =
@@ -2707,11 +2704,11 @@ static int snd_hdspm_hw_silence(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_hdspm_reset(snd_pcm_substream_t * substream)
+static int snd_hdspm_reset(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	hdspm_t *hdspm = snd_pcm_substream_chip(substream);
-	snd_pcm_substream_t *other;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
+	struct snd_pcm_substream *other;
 
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
 		other = hdspm->capture_substream;
@@ -2724,8 +2721,8 @@ static int snd_hdspm_reset(snd_pcm_substream_t * substream)
 		runtime->status->hw_ptr = 0;
 	if (other) {
 		struct list_head *pos;
-		snd_pcm_substream_t *s;
-		snd_pcm_runtime_t *oruntime = other->runtime;
+		struct snd_pcm_substream *s;
+		struct snd_pcm_runtime *oruntime = other->runtime;
 		snd_pcm_group_for_each(pos, substream) {
 			s = snd_pcm_group_substream_entry(pos);
 			if (s == other) {
@@ -2738,10 +2735,10 @@ static int snd_hdspm_reset(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_hdspm_hw_params(snd_pcm_substream_t * substream,
-			       snd_pcm_hw_params_t * params)
+static int snd_hdspm_hw_params(struct snd_pcm_substream *substream,
+			       struct snd_pcm_hw_params *params)
 {
-	hdspm_t *hdspm = snd_pcm_substream_chip(substream);
+	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
 	int err;
 	int i;
 	pid_t this_pid;
@@ -2839,10 +2836,10 @@ static int snd_hdspm_hw_params(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_hdspm_hw_free(snd_pcm_substream_t * substream)
+static int snd_hdspm_hw_free(struct snd_pcm_substream *substream)
 {
 	int i;
-	hdspm_t *hdspm = snd_pcm_substream_chip(substream);
+	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
 
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
 
@@ -2865,10 +2862,10 @@ static int snd_hdspm_hw_free(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_hdspm_channel_info(snd_pcm_substream_t * substream,
-				  snd_pcm_channel_info_t * info)
+static int snd_hdspm_channel_info(struct snd_pcm_substream *substream,
+				  struct snd_pcm_channel_info * info)
 {
-	hdspm_t *hdspm = snd_pcm_substream_chip(substream);
+	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
 	int mapped_channel;
 
 	snd_assert(info->channel < HDSPM_MAX_CHANNELS, return -EINVAL);
@@ -2882,7 +2879,7 @@ static int snd_hdspm_channel_info(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_hdspm_ioctl(snd_pcm_substream_t * substream,
+static int snd_hdspm_ioctl(struct snd_pcm_substream *substream,
 			   unsigned int cmd, void *arg)
 {
 	switch (cmd) {
@@ -2893,7 +2890,7 @@ static int snd_hdspm_ioctl(snd_pcm_substream_t * substream,
 
 	case SNDRV_PCM_IOCTL1_CHANNEL_INFO:
 		{
-			snd_pcm_channel_info_t *info = arg;
+			struct snd_pcm_channel_info *info = arg;
 			return snd_hdspm_channel_info(substream, info);
 		}
 	default:
@@ -2903,10 +2900,10 @@ static int snd_hdspm_ioctl(snd_pcm_substream_t * substream,
 	return snd_pcm_lib_ioctl(substream, cmd, arg);
 }
 
-static int snd_hdspm_trigger(snd_pcm_substream_t * substream, int cmd)
+static int snd_hdspm_trigger(struct snd_pcm_substream *substream, int cmd)
 {
-	hdspm_t *hdspm = snd_pcm_substream_chip(substream);
-	snd_pcm_substream_t *other;
+	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
+	struct snd_pcm_substream *other;
 	int running;
 
 	spin_lock(&hdspm->lock);
@@ -2930,7 +2927,7 @@ static int snd_hdspm_trigger(snd_pcm_substream_t * substream, int cmd)
 
 	if (other) {
 		struct list_head *pos;
-		snd_pcm_substream_t *s;
+		struct snd_pcm_substream *s;
 		snd_pcm_group_for_each(pos, substream) {
 			s = snd_pcm_group_substream_entry(pos);
 			if (s == other) {
@@ -2968,7 +2965,7 @@ static int snd_hdspm_trigger(snd_pcm_substream_t * substream, int cmd)
 	return 0;
 }
 
-static int snd_hdspm_prepare(snd_pcm_substream_t * substream)
+static int snd_hdspm_prepare(struct snd_pcm_substream *substream)
 {
 	return 0;
 }
@@ -2976,7 +2973,7 @@ static int snd_hdspm_prepare(snd_pcm_substream_t * substream)
 static unsigned int period_sizes[] =
     { 64, 128, 256, 512, 1024, 2048, 4096, 8192 };
 
-static snd_pcm_hardware_t snd_hdspm_playback_subinfo = {
+static struct snd_pcm_hardware snd_hdspm_playback_subinfo = {
 	.info = (SNDRV_PCM_INFO_MMAP |
 		 SNDRV_PCM_INFO_MMAP_VALID |
 		 SNDRV_PCM_INFO_NONINTERLEAVED |
@@ -3000,7 +2997,7 @@ static snd_pcm_hardware_t snd_hdspm_playback_subinfo = {
 	.fifo_size = 0
 };
 
-static snd_pcm_hardware_t snd_hdspm_capture_subinfo = {
+static struct snd_pcm_hardware snd_hdspm_capture_subinfo = {
 	.info = (SNDRV_PCM_INFO_MMAP |
 		 SNDRV_PCM_INFO_MMAP_VALID |
 		 SNDRV_PCM_INFO_NONINTERLEAVED |
@@ -3024,31 +3021,31 @@ static snd_pcm_hardware_t snd_hdspm_capture_subinfo = {
 	.fifo_size = 0
 };
 
-static snd_pcm_hw_constraint_list_t hw_constraints_period_sizes = {
+static struct snd_pcm_hw_constraint_list hw_constraints_period_sizes = {
 	.count = ARRAY_SIZE(period_sizes),
 	.list = period_sizes,
 	.mask = 0
 };
 
 
-static int snd_hdspm_hw_rule_channels_rate(snd_pcm_hw_params_t * params,
-					   snd_pcm_hw_rule_t * rule)
+static int snd_hdspm_hw_rule_channels_rate(struct snd_pcm_hw_params *params,
+					   struct snd_pcm_hw_rule * rule)
 {
-	hdspm_t *hdspm = rule->private;
-	snd_interval_t *c =
+	struct hdspm *hdspm = rule->private;
+	struct snd_interval *c =
 	    hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
-	snd_interval_t *r =
+	struct snd_interval *r =
 	    hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
 
 	if (r->min > 48000) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = 1,
 			.max = hdspm->ds_channels,
 			.integer = 1,
 		};
 		return snd_interval_refine(c, &t);
 	} else if (r->max < 64000) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = 1,
 			.max = hdspm->ss_channels,
 			.integer = 1,
@@ -3058,24 +3055,24 @@ static int snd_hdspm_hw_rule_channels_rate(snd_pcm_hw_params_t * params,
 	return 0;
 }
 
-static int snd_hdspm_hw_rule_rate_channels(snd_pcm_hw_params_t * params,
-					   snd_pcm_hw_rule_t * rule)
+static int snd_hdspm_hw_rule_rate_channels(struct snd_pcm_hw_params *params,
+					   struct snd_pcm_hw_rule * rule)
 {
-	hdspm_t *hdspm = rule->private;
-	snd_interval_t *c =
+	struct hdspm *hdspm = rule->private;
+	struct snd_interval *c =
 	    hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
-	snd_interval_t *r =
+	struct snd_interval *r =
 	    hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
 
 	if (c->min <= hdspm->ss_channels) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = 32000,
 			.max = 48000,
 			.integer = 1,
 		};
 		return snd_interval_refine(r, &t);
 	} else if (c->max > hdspm->ss_channels) {
-		snd_interval_t t = {
+		struct snd_interval t = {
 			.min = 64000,
 			.max = 96000,
 			.integer = 1,
@@ -3086,10 +3083,10 @@ static int snd_hdspm_hw_rule_rate_channels(snd_pcm_hw_params_t * params,
 	return 0;
 }
 
-static int snd_hdspm_playback_open(snd_pcm_substream_t * substream)
+static int snd_hdspm_playback_open(struct snd_pcm_substream *substream)
 {
-	hdspm_t *hdspm = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	snd_printdd("Open device substream %d\n", substream->stream);
 
@@ -3124,9 +3121,9 @@ static int snd_hdspm_playback_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_hdspm_playback_release(snd_pcm_substream_t * substream)
+static int snd_hdspm_playback_release(struct snd_pcm_substream *substream)
 {
-	hdspm_t *hdspm = snd_pcm_substream_chip(substream);
+	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
 
 	spin_lock_irq(&hdspm->lock);
 
@@ -3139,10 +3136,10 @@ static int snd_hdspm_playback_release(snd_pcm_substream_t * substream)
 }
 
 
-static int snd_hdspm_capture_open(snd_pcm_substream_t * substream)
+static int snd_hdspm_capture_open(struct snd_pcm_substream *substream)
 {
-	hdspm_t *hdspm = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	spin_lock_irq(&hdspm->lock);
 	snd_pcm_set_sync(substream);
@@ -3171,9 +3168,9 @@ static int snd_hdspm_capture_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_hdspm_capture_release(snd_pcm_substream_t * substream)
+static int snd_hdspm_capture_release(struct snd_pcm_substream *substream)
 {
-	hdspm_t *hdspm = snd_pcm_substream_chip(substream);
+	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
 
 	spin_lock_irq(&hdspm->lock);
 
@@ -3184,21 +3181,21 @@ static int snd_hdspm_capture_release(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_hdspm_hwdep_dummy_op(snd_hwdep_t * hw, struct file *file)
+static int snd_hdspm_hwdep_dummy_op(struct snd_hwdep * hw, struct file *file)
 {
 	/* we have nothing to initialize but the call is required */
 	return 0;
 }
 
 
-static int snd_hdspm_hwdep_ioctl(snd_hwdep_t * hw, struct file *file,
+static int snd_hdspm_hwdep_ioctl(struct snd_hwdep * hw, struct file *file,
 				 unsigned int cmd, unsigned long arg)
 {
-	hdspm_t *hdspm = (hdspm_t *) hw->private_data;
-	struct sndrv_hdspm_mixer_ioctl mixer;
-	hdspm_config_info_t info;
-	hdspm_version_t hdspm_version;
-	struct sndrv_hdspm_peak_rms_ioctl rms;
+	struct hdspm *hdspm = (struct hdspm *) hw->private_data;
+	struct hdspm_mixer_ioctl mixer;
+	struct hdspm_config_info info;
+	struct hdspm_version hdspm_version;
+	struct hdspm_peak_rms_ioctl rms;
 
 	switch (cmd) {
 
@@ -3209,7 +3206,7 @@ static int snd_hdspm_hwdep_ioctl(snd_hwdep_t * hw, struct file *file,
 		/* maybe there is a chance to memorymap in future so dont touch just copy */
 		if(copy_to_user_fromio((void __user *)rms.peak,
 				       hdspm->iobase+HDSPM_MADI_peakrmsbase,
-				       sizeof(hdspm_peak_rms_t)) != 0 )
+				       sizeof(struct hdspm_peak_rms)) != 0 )
 			return -EFAULT;
 
 		break;
@@ -3250,7 +3247,7 @@ static int snd_hdspm_hwdep_ioctl(snd_hwdep_t * hw, struct file *file,
 		if (copy_from_user(&mixer, (void __user *)arg, sizeof(mixer)))
 			return -EFAULT;
 		if (copy_to_user
-		    ((void __user *)mixer.mixer, hdspm->mixer, sizeof(hdspm_mixer_t)))
+		    ((void __user *)mixer.mixer, hdspm->mixer, sizeof(struct hdspm_mixer)))
 			return -EFAULT;
 		break;
 
@@ -3260,7 +3257,7 @@ static int snd_hdspm_hwdep_ioctl(snd_hwdep_t * hw, struct file *file,
 	return 0;
 }
 
-static snd_pcm_ops_t snd_hdspm_playback_ops = {
+static struct snd_pcm_ops snd_hdspm_playback_ops = {
 	.open = snd_hdspm_playback_open,
 	.close = snd_hdspm_playback_release,
 	.ioctl = snd_hdspm_ioctl,
@@ -3274,7 +3271,7 @@ static snd_pcm_ops_t snd_hdspm_playback_ops = {
 	.page = snd_pcm_sgbuf_ops_page,
 };
 
-static snd_pcm_ops_t snd_hdspm_capture_ops = {
+static struct snd_pcm_ops snd_hdspm_capture_ops = {
 	.open = snd_hdspm_capture_open,
 	.close = snd_hdspm_capture_release,
 	.ioctl = snd_hdspm_ioctl,
@@ -3287,10 +3284,10 @@ static snd_pcm_ops_t snd_hdspm_capture_ops = {
 	.page = snd_pcm_sgbuf_ops_page,
 };
 
-static int __devinit snd_hdspm_create_hwdep(snd_card_t * card,
-					    hdspm_t * hdspm)
+static int __devinit snd_hdspm_create_hwdep(struct snd_card *card,
+					    struct hdspm * hdspm)
 {
-	snd_hwdep_t *hw;
+	struct snd_hwdep *hw;
 	int err;
 
 	if ((err = snd_hwdep_new(card, "HDSPM hwdep", 0, &hw)) < 0)
@@ -3311,10 +3308,10 @@ static int __devinit snd_hdspm_create_hwdep(snd_card_t * card,
 /*------------------------------------------------------------
    memory interface 
  ------------------------------------------------------------*/
-static int __devinit snd_hdspm_preallocate_memory(hdspm_t * hdspm)
+static int __devinit snd_hdspm_preallocate_memory(struct hdspm * hdspm)
 {
 	int err;
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	size_t wanted;
 
 	pcm = hdspm->pcm;
@@ -3336,7 +3333,7 @@ static int __devinit snd_hdspm_preallocate_memory(hdspm_t * hdspm)
 	return 0;
 }
 
-static void hdspm_set_sgbuf(hdspm_t * hdspm, struct snd_sg_buf *sgbuf,
+static void hdspm_set_sgbuf(struct hdspm * hdspm, struct snd_sg_buf *sgbuf,
 			     unsigned int reg, int channels)
 {
 	int i;
@@ -3347,10 +3344,10 @@ static void hdspm_set_sgbuf(hdspm_t * hdspm, struct snd_sg_buf *sgbuf,
 }
 
 /* ------------- ALSA Devices ---------------------------- */
-static int __devinit snd_hdspm_create_pcm(snd_card_t * card,
-					  hdspm_t * hdspm)
+static int __devinit snd_hdspm_create_pcm(struct snd_card *card,
+					  struct hdspm * hdspm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if ((err = snd_pcm_new(card, hdspm->card_name, 0, 1, 1, &pcm)) < 0)
@@ -3373,14 +3370,14 @@ static int __devinit snd_hdspm_create_pcm(snd_card_t * card,
 	return 0;
 }
 
-static inline void snd_hdspm_initialize_midi_flush(hdspm_t * hdspm)
+static inline void snd_hdspm_initialize_midi_flush(struct hdspm * hdspm)
 {
 	snd_hdspm_flush_midi_input(hdspm, 0);
 	snd_hdspm_flush_midi_input(hdspm, 1);
 }
 
-static int __devinit snd_hdspm_create_alsa_devices(snd_card_t * card,
-						   hdspm_t * hdspm)
+static int __devinit snd_hdspm_create_alsa_devices(struct snd_card *card,
+						   struct hdspm * hdspm)
 {
 	int err;
 
@@ -3430,7 +3427,7 @@ static int __devinit snd_hdspm_create_alsa_devices(snd_card_t * card,
 	return 0;
 }
 
-static int __devinit snd_hdspm_create(snd_card_t * card, hdspm_t * hdspm,
+static int __devinit snd_hdspm_create(struct snd_card *card, struct hdspm * hdspm,
 				      int precise_ptr, int enable_monitor)
 {
 	struct pci_dev *pci = hdspm->pci;
@@ -3514,12 +3511,11 @@ static int __devinit snd_hdspm_create(snd_card_t * card, hdspm_t * hdspm,
 	hdspm->monitor_outs = enable_monitor;
 
 	snd_printdd("kmalloc Mixer memory of %d Bytes\n",
-		   sizeof(hdspm_mixer_t));
-	if ((hdspm->mixer =
-	     (hdspm_mixer_t *) kmalloc(sizeof(hdspm_mixer_t), GFP_KERNEL))
+		   sizeof(struct hdspm_mixer));
+	if ((hdspm->mixer = kmalloc(sizeof(struct hdspm_mixer), GFP_KERNEL))
 	    == NULL) {
 		snd_printk(KERN_ERR "HDSPM: unable to kmalloc Mixer memory of %d Bytes\n",
-			   (int)sizeof(hdspm_mixer_t));
+			   (int)sizeof(struct hdspm_mixer));
 		return err;
 	}
 
@@ -3536,7 +3532,7 @@ static int __devinit snd_hdspm_create(snd_card_t * card, hdspm_t * hdspm,
 	return 0;
 }
 
-static int snd_hdspm_free(hdspm_t * hdspm)
+static int snd_hdspm_free(struct hdspm * hdspm)
 {
 
 	if (hdspm->port) {
@@ -3566,9 +3562,9 @@ static int snd_hdspm_free(hdspm_t * hdspm)
 	return 0;
 }
 
-static void snd_hdspm_card_free(snd_card_t * card)
+static void snd_hdspm_card_free(struct snd_card *card)
 {
-	hdspm_t *hdspm = (hdspm_t *) card->private_data;
+	struct hdspm *hdspm = (struct hdspm *) card->private_data;
 
 	if (hdspm)
 		snd_hdspm_free(hdspm);
@@ -3578,8 +3574,8 @@ static int __devinit snd_hdspm_probe(struct pci_dev *pci,
 				     const struct pci_device_id *pci_id)
 {
 	static int dev;
-	hdspm_t *hdspm;
-	snd_card_t *card;
+	struct hdspm *hdspm;
+	struct snd_card *card;
 	int err;
 
 	if (dev >= SNDRV_CARDS)
@@ -3590,10 +3586,10 @@ static int __devinit snd_hdspm_probe(struct pci_dev *pci,
 	}
 
 	if (!(card = snd_card_new(index[dev], id[dev],
-				  THIS_MODULE, sizeof(hdspm_t))))
+				  THIS_MODULE, sizeof(struct hdspm))))
 		return -ENOMEM;
 
-	hdspm = (hdspm_t *) card->private_data;
+	hdspm = (struct hdspm *) card->private_data;
 	card->private_free = snd_hdspm_card_free;
 	hdspm->dev = dev;
 	hdspm->pci = pci;
-- 
cgit v1.2.3-70-g09d2


From bee1a5be8b6210a0a4e27e38d0f76847b0a014ae Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:53:15 +0100
Subject: [ALSA] Remove xxx_t typedefs: PCI Trident

Modules: Trident driver

Remove xxx_t typedefs from the PCI Trident driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/trident.h            | 151 ++++----
 sound/pci/trident/trident.c        |   4 +-
 sound/pci/trident/trident_main.c   | 708 ++++++++++++++++++++-----------------
 sound/pci/trident/trident_memory.c |  92 ++---
 sound/pci/trident/trident_synth.c  | 159 +++++----
 5 files changed, 592 insertions(+), 522 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/trident.h b/include/sound/trident.h
index a408d392505..2c54569fc60 100644
--- a/include/sound/trident.h
+++ b/include/sound/trident.h
@@ -253,43 +253,43 @@ enum serial_intf_ctrl_bits {
 #define T4D_DEFAULT_PCM_RVOL	127	/* 0 - 127 */
 #define T4D_DEFAULT_PCM_CVOL	127	/* 0 - 127 */
 
-typedef struct _snd_trident trident_t;
-typedef struct _snd_trident_voice snd_trident_voice_t;
-typedef struct _snd_trident_pcm_mixer snd_trident_pcm_mixer_t;
-
-typedef struct {
-	void (*sample_start)(trident_t *gus, snd_trident_voice_t *voice, snd_seq_position_t position);
-	void (*sample_stop)(trident_t *gus, snd_trident_voice_t *voice, snd_seq_stop_mode_t mode);
-	void (*sample_freq)(trident_t *gus, snd_trident_voice_t *voice, snd_seq_frequency_t freq);
-	void (*sample_volume)(trident_t *gus, snd_trident_voice_t *voice, snd_seq_ev_volume_t *volume);
-	void (*sample_loop)(trident_t *card, snd_trident_voice_t *voice, snd_seq_ev_loop_t *loop);
-	void (*sample_pos)(trident_t *card, snd_trident_voice_t *voice, snd_seq_position_t position);
-	void (*sample_private1)(trident_t *card, snd_trident_voice_t *voice, unsigned char *data);
-} snd_trident_sample_ops_t;
-
-typedef struct {
-	snd_midi_channel_set_t * chset;
-	trident_t * trident;
+struct snd_trident;
+struct snd_trident_voice;
+struct snd_trident_pcm_mixer;
+
+struct snd_trident_sample_ops {
+	void (*sample_start)(struct snd_trident *gus, struct snd_trident_voice *voice, snd_seq_position_t position);
+	void (*sample_stop)(struct snd_trident *gus, struct snd_trident_voice *voice, int mode);
+	void (*sample_freq)(struct snd_trident *gus, struct snd_trident_voice *voice, snd_seq_frequency_t freq);
+	void (*sample_volume)(struct snd_trident *gus, struct snd_trident_voice *voice, struct snd_seq_ev_volume *volume);
+	void (*sample_loop)(struct snd_trident *card, struct snd_trident_voice *voice, struct snd_seq_ev_loop *loop);
+	void (*sample_pos)(struct snd_trident *card, struct snd_trident_voice *voice, snd_seq_position_t position);
+	void (*sample_private1)(struct snd_trident *card, struct snd_trident_voice *voice, unsigned char *data);
+};
+
+struct snd_trident_port {
+	struct snd_midi_channel_set * chset;
+	struct snd_trident * trident;
 	int mode;		/* operation mode */
 	int client;		/* sequencer client number */
 	int port;		/* sequencer port number */
 	unsigned int midi_has_voices: 1;
-} snd_trident_port_t;
+};
 
-typedef struct snd_trident_memblk_arg {
+struct snd_trident_memblk_arg {
 	short first_page, last_page;
-} snd_trident_memblk_arg_t;
+};
 
-typedef struct {
+struct snd_trident_tlb {
 	unsigned int * entries;		/* 16k-aligned TLB table */
 	dma_addr_t entries_dmaaddr;	/* 16k-aligned PCI address to TLB table */
 	unsigned long * shadow_entries;	/* shadow entries with virtual addresses */
 	struct snd_dma_buffer buffer;
-	snd_util_memhdr_t * memhdr;	/* page allocation list */
+	struct snd_util_memhdr * memhdr;	/* page allocation list */
 	struct snd_dma_buffer silent_page;
-} snd_trident_tlb_t;
+};
 
-struct _snd_trident_voice {
+struct snd_trident_voice {
 	unsigned int number;
 	unsigned int use: 1,
 	    pcm: 1,
@@ -300,8 +300,8 @@ struct _snd_trident_voice {
 	unsigned char port;
 	unsigned char index;
 
-	snd_seq_instr_t instr;
-	snd_trident_sample_ops_t *sample_ops;
+	struct snd_seq_instr instr;
+	struct snd_trident_sample_ops *sample_ops;
 
 	/* channel parameters */
 	unsigned int CSO;		/* 24 bits (16 on DX) */
@@ -323,13 +323,13 @@ struct _snd_trident_voice {
 
 	unsigned int negCSO;	/* nonzero - use negative CSO */
 
-	snd_util_memblk_t *memblk;	/* memory block if TLB enabled */
+	struct snd_util_memblk *memblk;	/* memory block if TLB enabled */
 
 	/* PCM data */
 
-	trident_t *trident;
-	snd_pcm_substream_t *substream;
-	snd_trident_voice_t *extra;	/* extra PCM voice (acts as interrupt generator) */
+	struct snd_trident *trident;
+	struct snd_pcm_substream *substream;
+	struct snd_trident_voice *extra;	/* extra PCM voice (acts as interrupt generator) */
 	unsigned int running: 1,
             capture: 1,
             spdif: 1,
@@ -347,25 +347,25 @@ struct _snd_trident_voice {
 	/* --- */
 
 	void *private_data;
-	void (*private_free)(snd_trident_voice_t *voice);
+	void (*private_free)(struct snd_trident_voice *voice);
 };
 
-struct _snd_4dwave {
+struct snd_4dwave {
 	int seq_client;
 
-	snd_trident_port_t seq_ports[4];
-	snd_simple_ops_t simple_ops;
-	snd_seq_kinstr_list_t *ilist;
+	struct snd_trident_port seq_ports[4];
+	struct snd_simple_ops simple_ops;
+	struct snd_seq_kinstr_list *ilist;
 
-	snd_trident_voice_t voices[64];	
+	struct snd_trident_voice voices[64];	
 
 	int ChanSynthCount;		/* number of allocated synth channels */
 	int max_size;			/* maximum synth memory size in bytes */
 	int current_size;		/* current allocated synth mem in bytes */
 };
 
-struct _snd_trident_pcm_mixer {
-	snd_trident_voice_t *voice;	/* active voice */
+struct snd_trident_pcm_mixer {
+	struct snd_trident_voice *voice;	/* active voice */
 	unsigned short vol;		/* front volume */
 	unsigned char pan;		/* pan control */
 	unsigned char rvol;		/* rear volume */
@@ -373,7 +373,7 @@ struct _snd_trident_pcm_mixer {
 	unsigned char pad;
 };
 
-struct _snd_trident {
+struct snd_trident {
 	int irq;
 
 	unsigned int device;	/* device ID */
@@ -386,13 +386,13 @@ struct _snd_trident {
 	unsigned int spurious_irq_count;
 	unsigned int spurious_irq_max_delta;
 
-        snd_trident_tlb_t tlb;	/* TLB entries for NX cards */
+        struct snd_trident_tlb tlb;	/* TLB entries for NX cards */
 
 	unsigned char spdif_ctrl;
 	unsigned char spdif_pcm_ctrl;
 	unsigned int spdif_bits;
 	unsigned int spdif_pcm_bits;
-	snd_kcontrol_t *spdif_pcm_ctl;	/* S/PDIF settings */
+	struct snd_kcontrol *spdif_pcm_ctl;	/* S/PDIF settings */
 	unsigned int ac97_ctrl;
         
         unsigned int ChanMap[2];	/* allocation map for hardware channels */
@@ -403,7 +403,7 @@ struct _snd_trident {
 	unsigned int ac97_detect: 1;	/* 1 = AC97 in detection phase */
 	unsigned int in_suspend: 1;	/* 1 during suspend/resume */
 
-	struct _snd_4dwave synth;	/* synth specific variables */
+	struct snd_4dwave synth;	/* synth specific variables */
 
 	spinlock_t event_lock;
 	spinlock_t voice_alloc;
@@ -411,52 +411,55 @@ struct _snd_trident {
 	struct snd_dma_device dma_dev;
 
 	struct pci_dev *pci;
-	snd_card_t *card;
-	snd_pcm_t *pcm;		/* ADC/DAC PCM */
-	snd_pcm_t *foldback;	/* Foldback PCM */
-	snd_pcm_t *spdif;	/* SPDIF PCM */
-	snd_rawmidi_t *rmidi;
-	snd_seq_device_t *seq_dev;
+	struct snd_card *card;
+	struct snd_pcm *pcm;		/* ADC/DAC PCM */
+	struct snd_pcm *foldback;	/* Foldback PCM */
+	struct snd_pcm *spdif;	/* SPDIF PCM */
+	struct snd_rawmidi *rmidi;
+	struct snd_seq_device *seq_dev;
 
-	ac97_bus_t *ac97_bus;
-	ac97_t *ac97;
-	ac97_t *ac97_sec;
+	struct snd_ac97_bus *ac97_bus;
+	struct snd_ac97 *ac97;
+	struct snd_ac97 *ac97_sec;
 
 	unsigned int musicvol_wavevol;
-	snd_trident_pcm_mixer_t pcm_mixer[32];
-	snd_kcontrol_t *ctl_vol;	/* front volume */
-	snd_kcontrol_t *ctl_pan;	/* pan */
-	snd_kcontrol_t *ctl_rvol;	/* rear volume */
-	snd_kcontrol_t *ctl_cvol;	/* center volume */
+	struct snd_trident_pcm_mixer pcm_mixer[32];
+	struct snd_kcontrol *ctl_vol;	/* front volume */
+	struct snd_kcontrol *ctl_pan;	/* pan */
+	struct snd_kcontrol *ctl_rvol;	/* rear volume */
+	struct snd_kcontrol *ctl_cvol;	/* center volume */
 
 	spinlock_t reg_lock;
 
 	struct gameport *gameport;
 };
 
-int snd_trident_create(snd_card_t * card,
+int snd_trident_create(struct snd_card *card,
 		       struct pci_dev *pci,
 		       int pcm_streams,
 		       int pcm_spdif_device,
 		       int max_wavetable_size,
-		       trident_t ** rtrident);
-int snd_trident_create_gameport(trident_t *trident);
-
-int snd_trident_pcm(trident_t * trident, int device, snd_pcm_t **rpcm);
-int snd_trident_foldback_pcm(trident_t * trident, int device, snd_pcm_t **rpcm);
-int snd_trident_spdif_pcm(trident_t * trident, int device, snd_pcm_t **rpcm);
-int snd_trident_attach_synthesizer(trident_t * trident);
-snd_trident_voice_t *snd_trident_alloc_voice(trident_t * trident, int type, int client, int port);
-void snd_trident_free_voice(trident_t * trident, snd_trident_voice_t *voice);
-void snd_trident_start_voice(trident_t * trident, unsigned int voice);
-void snd_trident_stop_voice(trident_t * trident, unsigned int voice);
-void snd_trident_write_voice_regs(trident_t * trident, snd_trident_voice_t *voice);
+		       struct snd_trident ** rtrident);
+int snd_trident_create_gameport(struct snd_trident *trident);
+
+int snd_trident_pcm(struct snd_trident * trident, int device, struct snd_pcm **rpcm);
+int snd_trident_foldback_pcm(struct snd_trident * trident, int device, struct snd_pcm **rpcm);
+int snd_trident_spdif_pcm(struct snd_trident * trident, int device, struct snd_pcm **rpcm);
+int snd_trident_attach_synthesizer(struct snd_trident * trident);
+struct snd_trident_voice *snd_trident_alloc_voice(struct snd_trident * trident, int type,
+					     int client, int port);
+void snd_trident_free_voice(struct snd_trident * trident, struct snd_trident_voice *voice);
+void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice);
+void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice);
+void snd_trident_write_voice_regs(struct snd_trident * trident, struct snd_trident_voice *voice);
 
 /* TLB memory allocation */
-snd_util_memblk_t *snd_trident_alloc_pages(trident_t *trident, snd_pcm_substream_t *substream);
-int snd_trident_free_pages(trident_t *trident, snd_util_memblk_t *blk);
-snd_util_memblk_t *snd_trident_synth_alloc(trident_t *trident, unsigned int size);
-int snd_trident_synth_free(trident_t *trident, snd_util_memblk_t *blk);
-int snd_trident_synth_copy_from_user(trident_t *trident, snd_util_memblk_t *blk, int offset, const char __user *data, int size);
+struct snd_util_memblk *snd_trident_alloc_pages(struct snd_trident *trident,
+						struct snd_pcm_substream *substream);
+int snd_trident_free_pages(struct snd_trident *trident, struct snd_util_memblk *blk);
+struct snd_util_memblk *snd_trident_synth_alloc(struct snd_trident *trident, unsigned int size);
+int snd_trident_synth_free(struct snd_trident *trident, struct snd_util_memblk *blk);
+int snd_trident_synth_copy_from_user(struct snd_trident *trident, struct snd_util_memblk *blk,
+				     int offset, const char __user *data, int size);
 
 #endif /* __SOUND_TRIDENT_H */
diff --git a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c
index 940d531575c..0999f1f83a9 100644
--- a/sound/pci/trident/trident.c
+++ b/sound/pci/trident/trident.c
@@ -76,8 +76,8 @@ static int __devinit snd_trident_probe(struct pci_dev *pci,
 				       const struct pci_device_id *pci_id)
 {
 	static int dev;
-	snd_card_t *card;
-	trident_t *trident;
+	struct snd_card *card;
+	struct snd_trident *trident;
 	const char *str;
 	int err, pcm_dev = 0;
 
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
index 62f109f020a..6277dccebf6 100644
--- a/sound/pci/trident/trident_main.c
+++ b/sound/pci/trident/trident_main.c
@@ -44,17 +44,23 @@
 
 #include <asm/io.h>
 
-static int snd_trident_pcm_mixer_build(trident_t *trident, snd_trident_voice_t * voice, snd_pcm_substream_t *substream);
-static int snd_trident_pcm_mixer_free(trident_t *trident, snd_trident_voice_t * voice, snd_pcm_substream_t *substream);
-static irqreturn_t snd_trident_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+static int snd_trident_pcm_mixer_build(struct snd_trident *trident,
+				       struct snd_trident_voice * voice,
+				       struct snd_pcm_substream *substream);
+static int snd_trident_pcm_mixer_free(struct snd_trident *trident,
+				      struct snd_trident_voice * voice,
+				      struct snd_pcm_substream *substream);
+static irqreturn_t snd_trident_interrupt(int irq, void *dev_id,
+					 struct pt_regs *regs);
 #ifdef CONFIG_PM
-static int snd_trident_suspend(snd_card_t *card, pm_message_t state);
-static int snd_trident_resume(snd_card_t *card);
+static int snd_trident_suspend(struct snd_card *card, pm_message_t state);
+static int snd_trident_resume(struct snd_card *card);
 #endif
-static int snd_trident_sis_reset(trident_t *trident);
+static int snd_trident_sis_reset(struct snd_trident *trident);
 
-static void snd_trident_clear_voices(trident_t * trident, unsigned short v_min, unsigned short v_max);
-static int snd_trident_free(trident_t *trident);
+static void snd_trident_clear_voices(struct snd_trident * trident,
+				     unsigned short v_min, unsigned short v_max);
+static int snd_trident_free(struct snd_trident *trident);
 
 /*
  *  common I/O routines
@@ -62,7 +68,7 @@ static int snd_trident_free(trident_t *trident);
 
 
 #if 0
-static void snd_trident_print_voice_regs(trident_t *trident, int voice)
+static void snd_trident_print_voice_regs(struct snd_trident *trident, int voice)
 {
 	unsigned int val, tmp;
 
@@ -104,7 +110,7 @@ static void snd_trident_print_voice_regs(trident_t *trident, int voice)
 #endif
 
 /*---------------------------------------------------------------------------
-   unsigned short snd_trident_codec_read(ac97_t *ac97, unsigned short reg)
+   unsigned short snd_trident_codec_read(struct snd_ac97 *ac97, unsigned short reg)
   
    Description: This routine will do all of the reading from the external
                 CODEC (AC97).
@@ -115,12 +121,12 @@ static void snd_trident_print_voice_regs(trident_t *trident, int voice)
    returns:     16 bit value read from the AC97.
   
   ---------------------------------------------------------------------------*/
-static unsigned short snd_trident_codec_read(ac97_t *ac97, unsigned short reg)
+static unsigned short snd_trident_codec_read(struct snd_ac97 *ac97, unsigned short reg)
 {
 	unsigned int data = 0, treg;
 	unsigned short count = 0xffff;
 	unsigned long flags;
-	trident_t *trident = ac97->private_data;
+	struct snd_trident *trident = ac97->private_data;
 
 	spin_lock_irqsave(&trident->reg_lock, flags);
 	if (trident->device == TRIDENT_DEVICE_ID_DX) {
@@ -153,7 +159,8 @@ static unsigned short snd_trident_codec_read(ac97_t *ac97, unsigned short reg)
 	}
 
 	if (count == 0 && !trident->ac97_detect) {
-		snd_printk(KERN_ERR "ac97 codec read TIMEOUT [0x%x/0x%x]!!!\n", reg, data);
+		snd_printk(KERN_ERR "ac97 codec read TIMEOUT [0x%x/0x%x]!!!\n",
+			   reg, data);
 		data = 0;
 	}
 
@@ -162,7 +169,8 @@ static unsigned short snd_trident_codec_read(ac97_t *ac97, unsigned short reg)
 }
 
 /*---------------------------------------------------------------------------
-   void snd_trident_codec_write(ac97_t *ac97, unsigned short reg, unsigned short wdata)
+   void snd_trident_codec_write(struct snd_ac97 *ac97, unsigned short reg,
+   unsigned short wdata)
   
    Description: This routine will do all of the writing to the external
                 CODEC (AC97).
@@ -174,12 +182,13 @@ static unsigned short snd_trident_codec_read(ac97_t *ac97, unsigned short reg)
    returns:     TRUE if everything went ok, else FALSE.
   
   ---------------------------------------------------------------------------*/
-static void snd_trident_codec_write(ac97_t *ac97, unsigned short reg, unsigned short wdata)
+static void snd_trident_codec_write(struct snd_ac97 *ac97, unsigned short reg,
+				    unsigned short wdata)
 {
 	unsigned int address, data;
 	unsigned short count = 0xffff;
 	unsigned long flags;
-	trident_t *trident = ac97->private_data;
+	struct snd_trident *trident = ac97->private_data;
 
 	data = ((unsigned long) wdata) << 16;
 
@@ -230,7 +239,7 @@ static void snd_trident_codec_write(ac97_t *ac97, unsigned short reg, unsigned s
 }
 
 /*---------------------------------------------------------------------------
-   void snd_trident_enable_eso(trident_t *trident)
+   void snd_trident_enable_eso(struct snd_trident *trident)
   
    Description: This routine will enable end of loop interrupts.
                 End of loop interrupts will occur when a running
@@ -241,7 +250,7 @@ static void snd_trident_codec_write(ac97_t *ac97, unsigned short reg, unsigned s
   
   ---------------------------------------------------------------------------*/
 
-static void snd_trident_enable_eso(trident_t * trident)
+static void snd_trident_enable_eso(struct snd_trident * trident)
 {
 	unsigned int val;
 
@@ -254,7 +263,7 @@ static void snd_trident_enable_eso(trident_t * trident)
 }
 
 /*---------------------------------------------------------------------------
-   void snd_trident_disable_eso(trident_t *trident)
+   void snd_trident_disable_eso(struct snd_trident *trident)
   
    Description: This routine will disable end of loop interrupts.
                 End of loop interrupts will occur when a running
@@ -268,7 +277,7 @@ static void snd_trident_enable_eso(trident_t * trident)
   
   ---------------------------------------------------------------------------*/
 
-static void snd_trident_disable_eso(trident_t * trident)
+static void snd_trident_disable_eso(struct snd_trident * trident)
 {
 	unsigned int tmp;
 
@@ -279,7 +288,7 @@ static void snd_trident_disable_eso(trident_t * trident)
 }
 
 /*---------------------------------------------------------------------------
-   void snd_trident_start_voice(trident_t * trident, unsigned int voice)
+   void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice)
 
     Description: Start a voice, any channel 0 thru 63.
                  This routine automatically handles the fact that there are
@@ -292,7 +301,7 @@ static void snd_trident_disable_eso(trident_t * trident)
 
   ---------------------------------------------------------------------------*/
 
-void snd_trident_start_voice(trident_t * trident, unsigned int voice)
+void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice)
 {
 	unsigned int mask = 1 << (voice & 0x1f);
 	unsigned int reg = (voice & 0x20) ? T4D_START_B : T4D_START_A;
@@ -301,7 +310,7 @@ void snd_trident_start_voice(trident_t * trident, unsigned int voice)
 }
 
 /*---------------------------------------------------------------------------
-   void snd_trident_stop_voice(trident_t * trident, unsigned int voice)
+   void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice)
 
     Description: Stop a voice, any channel 0 thru 63.
                  This routine automatically handles the fact that there are
@@ -314,7 +323,7 @@ void snd_trident_start_voice(trident_t * trident, unsigned int voice)
 
   ---------------------------------------------------------------------------*/
 
-void snd_trident_stop_voice(trident_t * trident, unsigned int voice)
+void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice)
 {
 	unsigned int mask = 1 << (voice & 0x1f);
 	unsigned int reg = (voice & 0x20) ? T4D_STOP_B : T4D_STOP_A;
@@ -323,7 +332,7 @@ void snd_trident_stop_voice(trident_t * trident, unsigned int voice)
 }
 
 /*---------------------------------------------------------------------------
-    int snd_trident_allocate_pcm_channel(trident_t *trident)
+    int snd_trident_allocate_pcm_channel(struct snd_trident *trident)
   
     Description: Allocate hardware channel in Bank B (32-63).
   
@@ -333,7 +342,7 @@ void snd_trident_stop_voice(trident_t * trident, unsigned int voice)
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_allocate_pcm_channel(trident_t * trident)
+static int snd_trident_allocate_pcm_channel(struct snd_trident * trident)
 {
 	int idx;
 
@@ -361,7 +370,7 @@ static int snd_trident_allocate_pcm_channel(trident_t * trident)
   
   ---------------------------------------------------------------------------*/
 
-static void snd_trident_free_pcm_channel(trident_t *trident, int channel)
+static void snd_trident_free_pcm_channel(struct snd_trident *trident, int channel)
 {
 	if (channel < 32 || channel > 63)
 		return;
@@ -383,7 +392,7 @@ static void snd_trident_free_pcm_channel(trident_t *trident, int channel)
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_allocate_synth_channel(trident_t * trident)
+static int snd_trident_allocate_synth_channel(struct snd_trident * trident)
 {
 	int idx;
 
@@ -409,7 +418,7 @@ static int snd_trident_allocate_synth_channel(trident_t * trident)
   
   ---------------------------------------------------------------------------*/
 
-static void snd_trident_free_synth_channel(trident_t *trident, int channel)
+static void snd_trident_free_synth_channel(struct snd_trident *trident, int channel)
 {
 	if (channel < 0 || channel > 31)
 		return;
@@ -432,8 +441,8 @@ static void snd_trident_free_synth_channel(trident_t *trident, int channel)
   
   ---------------------------------------------------------------------------*/
 
-void snd_trident_write_voice_regs(trident_t * trident,
-				  snd_trident_voice_t * voice)
+void snd_trident_write_voice_regs(struct snd_trident * trident,
+				  struct snd_trident_voice * voice)
 {
 	unsigned int FmcRvolCvol;
 	unsigned int regs[5];
@@ -452,14 +461,16 @@ void snd_trident_write_voice_regs(trident_t * trident,
 				(voice->Vol & 0x000003ff) :
 				((voice->Vol & 0x00003fc) << (16-2)) |
 				(voice->EC & 0x00000fff);
-		regs[0] = (voice->CSO << 16) | ((voice->Alpha & 0x00000fff) << 4) | (voice->FMS & 0x0000000f);
+		regs[0] = (voice->CSO << 16) | ((voice->Alpha & 0x00000fff) << 4) |
+			(voice->FMS & 0x0000000f);
 		regs[2] = (voice->ESO << 16) | (voice->Delta & 0x0ffff);
 		regs[3] = (voice->Attribute << 16) | FmcRvolCvol;
 		break;
 	case TRIDENT_DEVICE_ID_DX:
 		regs[4] |= ((voice->Vol & 0x000003fc) << (16-2)) |
 			   (voice->EC & 0x00000fff);
-		regs[0] = (voice->CSO << 16) | ((voice->Alpha & 0x00000fff) << 4) | (voice->FMS & 0x0000000f);
+		regs[0] = (voice->CSO << 16) | ((voice->Alpha & 0x00000fff) << 4) |
+			(voice->FMS & 0x0000000f);
 		regs[2] = (voice->ESO << 16) | (voice->Delta & 0x0ffff);
 		regs[3] = FmcRvolCvol;
 		break;
@@ -467,8 +478,10 @@ void snd_trident_write_voice_regs(trident_t * trident,
 		regs[4] |= ((voice->Vol & 0x000003fc) << (16-2)) |
 			   (voice->EC & 0x00000fff);
 		regs[0] = (voice->Delta << 24) | (voice->CSO & 0x00ffffff);
-		regs[2] = ((voice->Delta << 16) & 0xff000000) | (voice->ESO & 0x00ffffff);
-		regs[3] = (voice->Alpha << 20) | ((voice->FMS & 0x0000000f) << 16) | FmcRvolCvol;
+		regs[2] = ((voice->Delta << 16) & 0xff000000) |
+			(voice->ESO & 0x00ffffff);
+		regs[3] = (voice->Alpha << 20) |
+			((voice->FMS & 0x0000000f) << 16) | FmcRvolCvol;
 		break;
 	default:
 		snd_BUG();
@@ -504,14 +517,17 @@ void snd_trident_write_voice_regs(trident_t * trident,
   
   ---------------------------------------------------------------------------*/
 
-static void snd_trident_write_cso_reg(trident_t * trident, snd_trident_voice_t * voice, unsigned int CSO)
+static void snd_trident_write_cso_reg(struct snd_trident * trident,
+				      struct snd_trident_voice * voice,
+				      unsigned int CSO)
 {
 	voice->CSO = CSO;
 	outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR));
 	if (trident->device != TRIDENT_DEVICE_ID_NX) {
 		outw(voice->CSO, TRID_REG(trident, CH_DX_CSO_ALPHA_FMS) + 2);
 	} else {
-		outl((voice->Delta << 24) | (voice->CSO & 0x00ffffff), TRID_REG(trident, CH_NX_DELTA_CSO));
+		outl((voice->Delta << 24) |
+		     (voice->CSO & 0x00ffffff), TRID_REG(trident, CH_NX_DELTA_CSO));
 	}
 }
 
@@ -527,14 +543,17 @@ static void snd_trident_write_cso_reg(trident_t * trident, snd_trident_voice_t *
   
   ---------------------------------------------------------------------------*/
 
-static void snd_trident_write_eso_reg(trident_t * trident, snd_trident_voice_t * voice, unsigned int ESO)
+static void snd_trident_write_eso_reg(struct snd_trident * trident,
+				      struct snd_trident_voice * voice,
+				      unsigned int ESO)
 {
 	voice->ESO = ESO;
 	outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR));
 	if (trident->device != TRIDENT_DEVICE_ID_NX) {
 		outw(voice->ESO, TRID_REG(trident, CH_DX_ESO_DELTA) + 2);
 	} else {
-		outl(((voice->Delta << 16) & 0xff000000) | (voice->ESO & 0x00ffffff), TRID_REG(trident, CH_NX_DELTA_ESO));
+		outl(((voice->Delta << 16) & 0xff000000) | (voice->ESO & 0x00ffffff),
+		     TRID_REG(trident, CH_NX_DELTA_ESO));
 	}
 }
 
@@ -550,7 +569,9 @@ static void snd_trident_write_eso_reg(trident_t * trident, snd_trident_voice_t *
   
   ---------------------------------------------------------------------------*/
 
-static void snd_trident_write_vol_reg(trident_t * trident, snd_trident_voice_t * voice, unsigned int Vol)
+static void snd_trident_write_vol_reg(struct snd_trident * trident,
+				      struct snd_trident_voice * voice,
+				      unsigned int Vol)
 {
 	voice->Vol = Vol;
 	outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR));
@@ -561,7 +582,8 @@ static void snd_trident_write_vol_reg(trident_t * trident, snd_trident_voice_t *
 		break;
 	case TRIDENT_DEVICE_ID_SI7018:
 		// printk("voice->Vol = 0x%x\n", voice->Vol);
-		outw((voice->CTRL << 12) | voice->Vol, TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC));
+		outw((voice->CTRL << 12) | voice->Vol,
+		     TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC));
 		break;
 	}
 }
@@ -578,11 +600,14 @@ static void snd_trident_write_vol_reg(trident_t * trident, snd_trident_voice_t *
   
   ---------------------------------------------------------------------------*/
 
-static void snd_trident_write_pan_reg(trident_t * trident, snd_trident_voice_t * voice, unsigned int Pan)
+static void snd_trident_write_pan_reg(struct snd_trident * trident,
+				      struct snd_trident_voice * voice,
+				      unsigned int Pan)
 {
 	voice->Pan = Pan;
 	outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR));
-	outb(((voice->GVSel & 0x01) << 7) | (voice->Pan & 0x7f), TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC + 3));
+	outb(((voice->GVSel & 0x01) << 7) | (voice->Pan & 0x7f),
+	     TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC + 3));
 }
 
 /*---------------------------------------------------------------------------
@@ -597,12 +622,16 @@ static void snd_trident_write_pan_reg(trident_t * trident, snd_trident_voice_t *
   
   ---------------------------------------------------------------------------*/
 
-static void snd_trident_write_rvol_reg(trident_t * trident, snd_trident_voice_t * voice, unsigned int RVol)
+static void snd_trident_write_rvol_reg(struct snd_trident * trident,
+				       struct snd_trident_voice * voice,
+				       unsigned int RVol)
 {
 	voice->RVol = RVol;
 	outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR));
-	outw(((voice->FMC & 0x0003) << 14) | ((voice->RVol & 0x007f) << 7) | (voice->CVol & 0x007f),
-	     TRID_REG(trident, trident->device == TRIDENT_DEVICE_ID_NX ? CH_NX_ALPHA_FMS_FMC_RVOL_CVOL : CH_DX_FMC_RVOL_CVOL));
+	outw(((voice->FMC & 0x0003) << 14) | ((voice->RVol & 0x007f) << 7) |
+	     (voice->CVol & 0x007f),
+	     TRID_REG(trident, trident->device == TRIDENT_DEVICE_ID_NX ?
+		      CH_NX_ALPHA_FMS_FMC_RVOL_CVOL : CH_DX_FMC_RVOL_CVOL));
 }
 
 /*---------------------------------------------------------------------------
@@ -617,12 +646,16 @@ static void snd_trident_write_rvol_reg(trident_t * trident, snd_trident_voice_t
   
   ---------------------------------------------------------------------------*/
 
-static void snd_trident_write_cvol_reg(trident_t * trident, snd_trident_voice_t * voice, unsigned int CVol)
+static void snd_trident_write_cvol_reg(struct snd_trident * trident,
+				       struct snd_trident_voice * voice,
+				       unsigned int CVol)
 {
 	voice->CVol = CVol;
 	outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR));
-	outw(((voice->FMC & 0x0003) << 14) | ((voice->RVol & 0x007f) << 7) | (voice->CVol & 0x007f),
-	     TRID_REG(trident, trident->device == TRIDENT_DEVICE_ID_NX ? CH_NX_ALPHA_FMS_FMC_RVOL_CVOL : CH_DX_FMC_RVOL_CVOL));
+	outw(((voice->FMC & 0x0003) << 14) | ((voice->RVol & 0x007f) << 7) |
+	     (voice->CVol & 0x007f),
+	     TRID_REG(trident, trident->device == TRIDENT_DEVICE_ID_NX ?
+		      CH_NX_ALPHA_FMS_FMC_RVOL_CVOL : CH_DX_FMC_RVOL_CVOL));
 }
 
 /*---------------------------------------------------------------------------
@@ -696,7 +729,8 @@ static unsigned int snd_trident_convert_adc_rate(unsigned int rate)
    Returns:     Delta value.
   
   ---------------------------------------------------------------------------*/
-static unsigned int snd_trident_spurious_threshold(unsigned int rate, unsigned int period_size)
+static unsigned int snd_trident_spurious_threshold(unsigned int rate,
+						   unsigned int period_size)
 {
 	unsigned int res = (rate * period_size) / 48000;
 	if (res < 64)
@@ -717,10 +751,10 @@ static unsigned int snd_trident_spurious_threshold(unsigned int rate, unsigned i
    Returns:     Control value.
   
   ---------------------------------------------------------------------------*/
-static unsigned int snd_trident_control_mode(snd_pcm_substream_t *substream)
+static unsigned int snd_trident_control_mode(struct snd_pcm_substream *substream)
 {
 	unsigned int CTRL;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	/* set ctrl mode
 	   CTRL default: 8-bit (unsigned) mono, loop mode enabled
@@ -752,7 +786,7 @@ static unsigned int snd_trident_control_mode(snd_pcm_substream_t *substream)
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_ioctl(snd_pcm_substream_t * substream,
+static int snd_trident_ioctl(struct snd_pcm_substream *substream,
 			     unsigned int cmd,
 			     void *arg)
 {
@@ -774,12 +808,12 @@ static int snd_trident_ioctl(snd_pcm_substream_t * substream,
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_allocate_pcm_mem(snd_pcm_substream_t * substream,
-					snd_pcm_hw_params_t * hw_params)
+static int snd_trident_allocate_pcm_mem(struct snd_pcm_substream *substream,
+					struct snd_pcm_hw_params *hw_params)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice = runtime->private_data;
 	int err;
 
 	if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0)
@@ -808,13 +842,13 @@ static int snd_trident_allocate_pcm_mem(snd_pcm_substream_t * substream,
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_allocate_evoice(snd_pcm_substream_t * substream,
-				       snd_pcm_hw_params_t * hw_params)
+static int snd_trident_allocate_evoice(struct snd_pcm_substream *substream,
+				       struct snd_pcm_hw_params *hw_params)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
-	snd_trident_voice_t *evoice = voice->extra;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice = runtime->private_data;
+	struct snd_trident_voice *evoice = voice->extra;
 
 	/* voice management */
 
@@ -848,8 +882,8 @@ static int snd_trident_allocate_evoice(snd_pcm_substream_t * substream,
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_hw_params(snd_pcm_substream_t * substream,
-				 snd_pcm_hw_params_t * hw_params)
+static int snd_trident_hw_params(struct snd_pcm_substream *substream,
+				 struct snd_pcm_hw_params *hw_params)
 {
 	int err;
 
@@ -870,12 +904,12 @@ static int snd_trident_hw_params(snd_pcm_substream_t * substream,
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_hw_free(snd_pcm_substream_t * substream)
+static int snd_trident_hw_free(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
-	snd_trident_voice_t *evoice = voice ? voice->extra : NULL;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice = runtime->private_data;
+	struct snd_trident_voice *evoice = voice ? voice->extra : NULL;
 
 	if (trident->tlb.entries) {
 		if (voice && voice->memblk) {
@@ -902,13 +936,13 @@ static int snd_trident_hw_free(snd_pcm_substream_t * substream)
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_trident_playback_prepare(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
-	snd_trident_voice_t *evoice = voice->extra;
-	snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[substream->number];
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice = runtime->private_data;
+	struct snd_trident_voice *evoice = voice->extra;
+	struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[substream->number];
 
 	spin_lock_irq(&trident->reg_lock);	
 
@@ -988,8 +1022,8 @@ static int snd_trident_playback_prepare(snd_pcm_substream_t * substream)
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_capture_hw_params(snd_pcm_substream_t * substream,
-					 snd_pcm_hw_params_t * hw_params)
+static int snd_trident_capture_hw_params(struct snd_pcm_substream *substream,
+					 struct snd_pcm_hw_params *hw_params)
 {
 	return snd_trident_allocate_pcm_mem(substream, hw_params);
 }
@@ -1005,11 +1039,11 @@ static int snd_trident_capture_hw_params(snd_pcm_substream_t * substream,
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_trident_capture_prepare(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice = runtime->private_data;
 	unsigned int val, ESO_bytes;
 
 	spin_lock_irq(&trident->reg_lock);
@@ -1097,8 +1131,8 @@ static int snd_trident_capture_prepare(snd_pcm_substream_t * substream)
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_si7018_capture_hw_params(snd_pcm_substream_t * substream,
-						snd_pcm_hw_params_t * hw_params)
+static int snd_trident_si7018_capture_hw_params(struct snd_pcm_substream *substream,
+						struct snd_pcm_hw_params *hw_params)
 {
 	int err;
 
@@ -1119,12 +1153,12 @@ static int snd_trident_si7018_capture_hw_params(snd_pcm_substream_t * substream,
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_si7018_capture_hw_free(snd_pcm_substream_t * substream)
+static int snd_trident_si7018_capture_hw_free(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
-	snd_trident_voice_t *evoice = voice ? voice->extra : NULL;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice = runtime->private_data;
+	struct snd_trident_voice *evoice = voice ? voice->extra : NULL;
 
 	snd_pcm_lib_free_pages(substream);
 	if (evoice != NULL) {
@@ -1145,12 +1179,12 @@ static int snd_trident_si7018_capture_hw_free(snd_pcm_substream_t * substream)
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_si7018_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_trident_si7018_capture_prepare(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
-	snd_trident_voice_t *evoice = voice->extra;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice = runtime->private_data;
+	struct snd_trident_voice *evoice = voice->extra;
 
 	spin_lock_irq(&trident->reg_lock);
 
@@ -1216,12 +1250,12 @@ static int snd_trident_si7018_capture_prepare(snd_pcm_substream_t * substream)
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_foldback_prepare(snd_pcm_substream_t * substream)
+static int snd_trident_foldback_prepare(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
-	snd_trident_voice_t *evoice = voice->extra;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice = runtime->private_data;
+	struct snd_trident_voice *evoice = voice->extra;
 
 	spin_lock_irq(&trident->reg_lock);
 
@@ -1294,10 +1328,10 @@ static int snd_trident_foldback_prepare(snd_pcm_substream_t * substream)
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_spdif_hw_params(snd_pcm_substream_t * substream,
-				       snd_pcm_hw_params_t * hw_params)
+static int snd_trident_spdif_hw_params(struct snd_pcm_substream *substream,
+				       struct snd_pcm_hw_params *hw_params)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
 	unsigned int old_bits = 0, change = 0;
 	int err;
 
@@ -1359,13 +1393,13 @@ static int snd_trident_spdif_hw_params(snd_pcm_substream_t * substream,
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_spdif_prepare(snd_pcm_substream_t * substream)
+static int snd_trident_spdif_prepare(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
-	snd_trident_voice_t *evoice = voice->extra;
-	snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[substream->number];
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice = runtime->private_data;
+	struct snd_trident_voice *evoice = voice->extra;
+	struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[substream->number];
 	unsigned int RESO, LBAO;
 	unsigned int temp;
 
@@ -1498,15 +1532,15 @@ static int snd_trident_spdif_prepare(snd_pcm_substream_t * substream)
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_trigger(snd_pcm_substream_t *substream,
+static int snd_trident_trigger(struct snd_pcm_substream *substream,
 			       int cmd)
 				    
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
 	struct list_head *pos;
-	snd_pcm_substream_t *s;
+	struct snd_pcm_substream *s;
 	unsigned int what, whati, capture_flag, spdif_flag;
-	snd_trident_voice_t *voice, *evoice;
+	struct snd_trident_voice *voice, *evoice;
 	unsigned int val, go;
 
 	switch (cmd) {
@@ -1528,8 +1562,8 @@ static int snd_trident_trigger(snd_pcm_substream_t *substream,
 	val = inl(TRID_REG(trident, T4D_STIMER)) & 0x00ffffff;
 	snd_pcm_group_for_each(pos, substream) {
 		s = snd_pcm_group_substream_entry(pos);
-		if ((trident_t *) snd_pcm_substream_chip(s) == trident) {
-			voice = (snd_trident_voice_t *) s->runtime->private_data;
+		if ((struct snd_trident *) snd_pcm_substream_chip(s) == trident) {
+			voice = s->runtime->private_data;
 			evoice = voice->extra;
 			what |= 1 << (voice->number & 0x1f);
 			if (evoice == NULL) {
@@ -1596,11 +1630,11 @@ static int snd_trident_trigger(snd_pcm_substream_t *substream,
   
   ---------------------------------------------------------------------------*/
 
-static snd_pcm_uframes_t snd_trident_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_trident_playback_pointer(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice = runtime->private_data;
 	unsigned int cso;
 
 	if (!voice->running)
@@ -1635,11 +1669,11 @@ static snd_pcm_uframes_t snd_trident_playback_pointer(snd_pcm_substream_t * subs
   
   ---------------------------------------------------------------------------*/
 
-static snd_pcm_uframes_t snd_trident_capture_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_trident_capture_pointer(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice = runtime->private_data;
 	unsigned int result;
 
 	if (!voice->running)
@@ -1665,11 +1699,11 @@ static snd_pcm_uframes_t snd_trident_capture_pointer(snd_pcm_substream_t * subst
   
   ---------------------------------------------------------------------------*/
 
-static snd_pcm_uframes_t snd_trident_spdif_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_trident_spdif_pointer(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice = runtime->private_data;
 	unsigned int result;
 
 	if (!voice->running)
@@ -1684,7 +1718,7 @@ static snd_pcm_uframes_t snd_trident_spdif_pointer(snd_pcm_substream_t * substre
  *  Playback support device description
  */
 
-static snd_pcm_hardware_t snd_trident_playback =
+static struct snd_pcm_hardware snd_trident_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -1709,7 +1743,7 @@ static snd_pcm_hardware_t snd_trident_playback =
  *  Capture support device description
  */
 
-static snd_pcm_hardware_t snd_trident_capture =
+static struct snd_pcm_hardware snd_trident_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -1734,7 +1768,7 @@ static snd_pcm_hardware_t snd_trident_capture =
  *  Foldback capture support device description
  */
 
-static snd_pcm_hardware_t snd_trident_foldback =
+static struct snd_pcm_hardware snd_trident_foldback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -1758,7 +1792,7 @@ static snd_pcm_hardware_t snd_trident_foldback =
  *  SPDIF playback support device description
  */
 
-static snd_pcm_hardware_t snd_trident_spdif =
+static struct snd_pcm_hardware snd_trident_spdif =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -1779,7 +1813,7 @@ static snd_pcm_hardware_t snd_trident_spdif =
 	.fifo_size =		0,
 };
 
-static snd_pcm_hardware_t snd_trident_spdif_7018 =
+static struct snd_pcm_hardware snd_trident_spdif_7018 =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -1799,10 +1833,10 @@ static snd_pcm_hardware_t snd_trident_spdif_7018 =
 	.fifo_size =		0,
 };
 
-static void snd_trident_pcm_free_substream(snd_pcm_runtime_t *runtime)
+static void snd_trident_pcm_free_substream(struct snd_pcm_runtime *runtime)
 {
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
-	trident_t *trident;
+	struct snd_trident_voice *voice = runtime->private_data;
+	struct snd_trident *trident;
 
 	if (voice) {
 		trident = voice->trident;
@@ -1810,11 +1844,11 @@ static void snd_trident_pcm_free_substream(snd_pcm_runtime_t *runtime)
 	}
 }
 
-static int snd_trident_playback_open(snd_pcm_substream_t * substream)
+static int snd_trident_playback_open(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice;
 
 	voice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0);
 	if (voice == NULL)
@@ -1838,11 +1872,11 @@ static int snd_trident_playback_open(snd_pcm_substream_t * substream)
    Parameters:	substream  - PCM substream class
 
   ---------------------------------------------------------------------------*/
-static int snd_trident_playback_close(snd_pcm_substream_t * substream)
+static int snd_trident_playback_close(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_trident_voice *voice = runtime->private_data;
 
 	snd_trident_pcm_mixer_free(trident, voice, substream);
 	return 0;
@@ -1859,11 +1893,11 @@ static int snd_trident_playback_close(snd_pcm_substream_t * substream)
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_spdif_open(snd_pcm_substream_t * substream)
+static int snd_trident_spdif_open(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_trident_voice_t *voice;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_trident_voice *voice;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	
 	voice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0);
 	if (voice == NULL)
@@ -1900,9 +1934,9 @@ static int snd_trident_spdif_open(snd_pcm_substream_t * substream)
 
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_spdif_close(snd_pcm_substream_t * substream)
+static int snd_trident_spdif_close(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
 	unsigned int temp;
 
 	spin_lock_irq(&trident->reg_lock);
@@ -1938,11 +1972,11 @@ static int snd_trident_spdif_close(snd_pcm_substream_t * substream)
 
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_capture_open(snd_pcm_substream_t * substream)
+static int snd_trident_capture_open(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_trident_voice_t *voice;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_trident_voice *voice;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	voice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0);
 	if (voice == NULL)
@@ -1966,7 +2000,7 @@ static int snd_trident_capture_open(snd_pcm_substream_t * substream)
    Parameters:	substream  - PCM substream class
 
   ---------------------------------------------------------------------------*/
-static int snd_trident_capture_close(snd_pcm_substream_t * substream)
+static int snd_trident_capture_close(struct snd_pcm_substream *substream)
 {
 	return 0;
 }
@@ -1982,11 +2016,11 @@ static int snd_trident_capture_close(snd_pcm_substream_t * substream)
 
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_foldback_open(snd_pcm_substream_t * substream)
+static int snd_trident_foldback_open(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_trident_voice_t *voice;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_trident_voice *voice;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	voice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0);
 	if (voice == NULL)
@@ -2009,12 +2043,12 @@ static int snd_trident_foldback_open(snd_pcm_substream_t * substream)
    Parameters:	substream  - PCM substream class
 
   ---------------------------------------------------------------------------*/
-static int snd_trident_foldback_close(snd_pcm_substream_t * substream)
+static int snd_trident_foldback_close(struct snd_pcm_substream *substream)
 {
-	trident_t *trident = snd_pcm_substream_chip(substream);
-	snd_trident_voice_t *voice;
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	voice = (snd_trident_voice_t *) runtime->private_data;
+	struct snd_trident *trident = snd_pcm_substream_chip(substream);
+	struct snd_trident_voice *voice;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	voice = runtime->private_data;
 	
 	/* stop capture channel */
 	spin_lock_irq(&trident->reg_lock);
@@ -2027,7 +2061,7 @@ static int snd_trident_foldback_close(snd_pcm_substream_t * substream)
    PCM operations
   ---------------------------------------------------------------------------*/
 
-static snd_pcm_ops_t snd_trident_playback_ops = {
+static struct snd_pcm_ops snd_trident_playback_ops = {
 	.open =		snd_trident_playback_open,
 	.close =	snd_trident_playback_close,
 	.ioctl =	snd_trident_ioctl,
@@ -2038,7 +2072,7 @@ static snd_pcm_ops_t snd_trident_playback_ops = {
 	.pointer =	snd_trident_playback_pointer,
 };
 
-static snd_pcm_ops_t snd_trident_nx_playback_ops = {
+static struct snd_pcm_ops snd_trident_nx_playback_ops = {
 	.open =		snd_trident_playback_open,
 	.close =	snd_trident_playback_close,
 	.ioctl =	snd_trident_ioctl,
@@ -2050,7 +2084,7 @@ static snd_pcm_ops_t snd_trident_nx_playback_ops = {
 	.page =		snd_pcm_sgbuf_ops_page,
 };
 
-static snd_pcm_ops_t snd_trident_capture_ops = {
+static struct snd_pcm_ops snd_trident_capture_ops = {
 	.open =		snd_trident_capture_open,
 	.close =	snd_trident_capture_close,
 	.ioctl =	snd_trident_ioctl,
@@ -2061,7 +2095,7 @@ static snd_pcm_ops_t snd_trident_capture_ops = {
 	.pointer =	snd_trident_capture_pointer,
 };
 
-static snd_pcm_ops_t snd_trident_si7018_capture_ops = {
+static struct snd_pcm_ops snd_trident_si7018_capture_ops = {
 	.open =		snd_trident_capture_open,
 	.close =	snd_trident_capture_close,
 	.ioctl =	snd_trident_ioctl,
@@ -2072,7 +2106,7 @@ static snd_pcm_ops_t snd_trident_si7018_capture_ops = {
 	.pointer =	snd_trident_playback_pointer,
 };
 
-static snd_pcm_ops_t snd_trident_foldback_ops = {
+static struct snd_pcm_ops snd_trident_foldback_ops = {
 	.open =		snd_trident_foldback_open,
 	.close =	snd_trident_foldback_close,
 	.ioctl =	snd_trident_ioctl,
@@ -2083,7 +2117,7 @@ static snd_pcm_ops_t snd_trident_foldback_ops = {
 	.pointer =	snd_trident_playback_pointer,
 };
 
-static snd_pcm_ops_t snd_trident_nx_foldback_ops = {
+static struct snd_pcm_ops snd_trident_nx_foldback_ops = {
 	.open =		snd_trident_foldback_open,
 	.close =	snd_trident_foldback_close,
 	.ioctl =	snd_trident_ioctl,
@@ -2095,7 +2129,7 @@ static snd_pcm_ops_t snd_trident_nx_foldback_ops = {
 	.page =		snd_pcm_sgbuf_ops_page,
 };
 
-static snd_pcm_ops_t snd_trident_spdif_ops = {
+static struct snd_pcm_ops snd_trident_spdif_ops = {
 	.open =		snd_trident_spdif_open,
 	.close =	snd_trident_spdif_close,
 	.ioctl =	snd_trident_ioctl,
@@ -2106,7 +2140,7 @@ static snd_pcm_ops_t snd_trident_spdif_ops = {
 	.pointer =	snd_trident_spdif_pointer,
 };
 
-static snd_pcm_ops_t snd_trident_spdif_7018_ops = {
+static struct snd_pcm_ops snd_trident_spdif_7018_ops = {
 	.open =		snd_trident_spdif_open,
 	.close =	snd_trident_spdif_close,
 	.ioctl =	snd_trident_ioctl,
@@ -2128,9 +2162,10 @@ static snd_pcm_ops_t snd_trident_spdif_7018_ops = {
   
   ---------------------------------------------------------------------------*/
 
-int __devinit snd_trident_pcm(trident_t * trident, int device, snd_pcm_t ** rpcm)
+int __devinit snd_trident_pcm(struct snd_trident * trident,
+			      int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if (rpcm)
@@ -2156,7 +2191,7 @@ int __devinit snd_trident_pcm(trident_t * trident, int device, snd_pcm_t ** rpcm
 	trident->pcm = pcm;
 
 	if (trident->tlb.entries) {
-		snd_pcm_substream_t *substream;
+		struct snd_pcm_substream *substream;
 		for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next)
 			snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG,
 						      snd_dma_pci_data(trident->pci),
@@ -2185,12 +2220,13 @@ int __devinit snd_trident_pcm(trident_t * trident, int device, snd_pcm_t ** rpcm
   
   ---------------------------------------------------------------------------*/
 
-int __devinit snd_trident_foldback_pcm(trident_t * trident, int device, snd_pcm_t ** rpcm)
+int __devinit snd_trident_foldback_pcm(struct snd_trident * trident,
+				       int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *foldback;
+	struct snd_pcm *foldback;
 	int err;
 	int num_chan = 3;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 
 	if (rpcm)
 		*rpcm = NULL;
@@ -2241,9 +2277,10 @@ int __devinit snd_trident_foldback_pcm(trident_t * trident, int device, snd_pcm_
   
   ---------------------------------------------------------------------------*/
 
-int __devinit snd_trident_spdif_pcm(trident_t * trident, int device, snd_pcm_t ** rpcm)
+int __devinit snd_trident_spdif_pcm(struct snd_trident * trident,
+				    int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *spdif;
+	struct snd_pcm *spdif;
 	int err;
 
 	if (rpcm)
@@ -2279,7 +2316,8 @@ int __devinit snd_trident_spdif_pcm(trident_t * trident, int device, snd_pcm_t *
     Description: enable/disable S/PDIF out from ac97 mixer
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_spdif_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_trident_spdif_control_info(struct snd_kcontrol *kcontrol,
+					  struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -2288,10 +2326,10 @@ static int snd_trident_spdif_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem
 	return 0;
 }
 
-static int snd_trident_spdif_control_get(snd_kcontrol_t * kcontrol,
-					 snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_spdif_control_get(struct snd_kcontrol *kcontrol,
+					 struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
 	unsigned char val;
 
 	spin_lock_irq(&trident->reg_lock);
@@ -2301,10 +2339,10 @@ static int snd_trident_spdif_control_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_trident_spdif_control_put(snd_kcontrol_t * kcontrol,
-					 snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_spdif_control_put(struct snd_kcontrol *kcontrol,
+					 struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
 	unsigned char val;
 	int change;
 
@@ -2332,7 +2370,7 @@ static int snd_trident_spdif_control_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_trident_spdif_control __devinitdata =
+static struct snd_kcontrol_new snd_trident_spdif_control __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH),
@@ -2348,17 +2386,18 @@ static snd_kcontrol_new_t snd_trident_spdif_control __devinitdata =
     Description: put/get the S/PDIF default settings
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_spdif_default_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_trident_spdif_default_info(struct snd_kcontrol *kcontrol,
+					  struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_trident_spdif_default_get(snd_kcontrol_t * kcontrol,
-					 snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_spdif_default_get(struct snd_kcontrol *kcontrol,
+					 struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
 
 	spin_lock_irq(&trident->reg_lock);
 	ucontrol->value.iec958.status[0] = (trident->spdif_bits >> 0) & 0xff;
@@ -2369,10 +2408,10 @@ static int snd_trident_spdif_default_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_trident_spdif_default_put(snd_kcontrol_t * kcontrol,
-					 snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_spdif_default_put(struct snd_kcontrol *kcontrol,
+					 struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
 	unsigned int val;
 	int change;
 
@@ -2394,7 +2433,7 @@ static int snd_trident_spdif_default_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_trident_spdif_default __devinitdata =
+static struct snd_kcontrol_new snd_trident_spdif_default __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
 	.name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
@@ -2409,15 +2448,16 @@ static snd_kcontrol_new_t snd_trident_spdif_default __devinitdata =
     Description: put/get the S/PDIF mask
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_trident_spdif_mask_info(struct snd_kcontrol *kcontrol,
+				       struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_trident_spdif_mask_get(snd_kcontrol_t * kcontrol,
-				      snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_spdif_mask_get(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_value *ucontrol)
 {
 	ucontrol->value.iec958.status[0] = 0xff;
 	ucontrol->value.iec958.status[1] = 0xff;
@@ -2426,7 +2466,7 @@ static int snd_trident_spdif_mask_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static snd_kcontrol_new_t snd_trident_spdif_mask __devinitdata =
+static struct snd_kcontrol_new snd_trident_spdif_mask __devinitdata =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ,
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
@@ -2441,17 +2481,18 @@ static snd_kcontrol_new_t snd_trident_spdif_mask __devinitdata =
     Description: put/get the S/PDIF stream settings
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_spdif_stream_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_trident_spdif_stream_info(struct snd_kcontrol *kcontrol,
+					 struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_trident_spdif_stream_get(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_spdif_stream_get(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
 
 	spin_lock_irq(&trident->reg_lock);
 	ucontrol->value.iec958.status[0] = (trident->spdif_pcm_bits >> 0) & 0xff;
@@ -2462,10 +2503,10 @@ static int snd_trident_spdif_stream_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_trident_spdif_stream_put(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_spdif_stream_put(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
 	unsigned int val;
 	int change;
 
@@ -2487,7 +2528,7 @@ static int snd_trident_spdif_stream_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_trident_spdif_stream __devinitdata =
+static struct snd_kcontrol_new snd_trident_spdif_stream __devinitdata =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
@@ -2503,7 +2544,8 @@ static snd_kcontrol_new_t snd_trident_spdif_stream __devinitdata =
     Description: enable/disable rear path for ac97
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_ac97_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_trident_ac97_control_info(struct snd_kcontrol *kcontrol,
+					 struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -2512,10 +2554,10 @@ static int snd_trident_ac97_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_
 	return 0;
 }
 
-static int snd_trident_ac97_control_get(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_ac97_control_get(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
 	unsigned char val;
 
 	spin_lock_irq(&trident->reg_lock);
@@ -2525,10 +2567,10 @@ static int snd_trident_ac97_control_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_trident_ac97_control_put(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_ac97_control_put(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
 	unsigned char val;
 	int change = 0;
 
@@ -2544,7 +2586,7 @@ static int snd_trident_ac97_control_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_trident_ac97_rear_control __devinitdata =
+static struct snd_kcontrol_new snd_trident_ac97_rear_control __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "Rear Path",
@@ -2560,7 +2602,8 @@ static snd_kcontrol_new_t snd_trident_ac97_rear_control __devinitdata =
     Description: wave & music volume control
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_vol_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_trident_vol_control_info(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
@@ -2569,10 +2612,10 @@ static int snd_trident_vol_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i
 	return 0;
 }
 
-static int snd_trident_vol_control_get(snd_kcontrol_t * kcontrol,
-				       snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_vol_control_get(struct snd_kcontrol *kcontrol,
+				       struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
 	unsigned int val;
 
 	val = trident->musicvol_wavevol;
@@ -2581,10 +2624,10 @@ static int snd_trident_vol_control_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_trident_vol_control_put(snd_kcontrol_t * kcontrol,
-				       snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_vol_control_put(struct snd_kcontrol *kcontrol,
+				       struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
 	unsigned int val;
 	int change = 0;
 
@@ -2599,7 +2642,7 @@ static int snd_trident_vol_control_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_trident_vol_music_control __devinitdata =
+static struct snd_kcontrol_new snd_trident_vol_music_control __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "Music Playback Volume",
@@ -2609,7 +2652,7 @@ static snd_kcontrol_new_t snd_trident_vol_music_control __devinitdata =
 	.private_value = 16,
 };
 
-static snd_kcontrol_new_t snd_trident_vol_wave_control __devinitdata =
+static struct snd_kcontrol_new snd_trident_vol_wave_control __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "Wave Playback Volume",
@@ -2625,9 +2668,10 @@ static snd_kcontrol_new_t snd_trident_vol_wave_control __devinitdata =
     Description: PCM front volume control
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_pcm_vol_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_trident_pcm_vol_control_info(struct snd_kcontrol *kcontrol,
+					    struct snd_ctl_elem_info *uinfo)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
 
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -2638,11 +2682,11 @@ static int snd_trident_pcm_vol_control_info(snd_kcontrol_t *kcontrol, snd_ctl_el
 	return 0;
 }
 
-static int snd_trident_pcm_vol_control_get(snd_kcontrol_t * kcontrol,
-					   snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_pcm_vol_control_get(struct snd_kcontrol *kcontrol,
+					   struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
-	snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
 
 	if (trident->device == TRIDENT_DEVICE_ID_SI7018) {
 		ucontrol->value.integer.value[0] = 1023 - mix->vol;
@@ -2652,11 +2696,11 @@ static int snd_trident_pcm_vol_control_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_trident_pcm_vol_control_put(snd_kcontrol_t * kcontrol,
-					   snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_pcm_vol_control_put(struct snd_kcontrol *kcontrol,
+					   struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
-	snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
 	unsigned int val;
 	int change = 0;
 
@@ -2674,7 +2718,7 @@ static int snd_trident_pcm_vol_control_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_trident_pcm_vol_control __devinitdata =
+static struct snd_kcontrol_new snd_trident_pcm_vol_control __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "PCM Front Playback Volume",
@@ -2691,7 +2735,8 @@ static snd_kcontrol_new_t snd_trident_pcm_vol_control __devinitdata =
     Description: PCM front pan control
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_pcm_pan_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_trident_pcm_pan_control_info(struct snd_kcontrol *kcontrol,
+					    struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -2700,11 +2745,11 @@ static int snd_trident_pcm_pan_control_info(snd_kcontrol_t *kcontrol, snd_ctl_el
 	return 0;
 }
 
-static int snd_trident_pcm_pan_control_get(snd_kcontrol_t * kcontrol,
-					   snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_pcm_pan_control_get(struct snd_kcontrol *kcontrol,
+					   struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
-	snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
 
 	ucontrol->value.integer.value[0] = mix->pan;
 	if (ucontrol->value.integer.value[0] & 0x40) {
@@ -2715,11 +2760,11 @@ static int snd_trident_pcm_pan_control_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_trident_pcm_pan_control_put(snd_kcontrol_t * kcontrol,
-					   snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_pcm_pan_control_put(struct snd_kcontrol *kcontrol,
+					   struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
-	snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
 	unsigned char val;
 	int change = 0;
 
@@ -2736,7 +2781,7 @@ static int snd_trident_pcm_pan_control_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_trident_pcm_pan_control __devinitdata =
+static struct snd_kcontrol_new snd_trident_pcm_pan_control __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "PCM Pan Playback Control",
@@ -2753,7 +2798,8 @@ static snd_kcontrol_new_t snd_trident_pcm_pan_control __devinitdata =
     Description: PCM reverb volume control
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_pcm_rvol_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_trident_pcm_rvol_control_info(struct snd_kcontrol *kcontrol,
+					     struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -2762,21 +2808,21 @@ static int snd_trident_pcm_rvol_control_info(snd_kcontrol_t *kcontrol, snd_ctl_e
 	return 0;
 }
 
-static int snd_trident_pcm_rvol_control_get(snd_kcontrol_t * kcontrol,
-					    snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_pcm_rvol_control_get(struct snd_kcontrol *kcontrol,
+					    struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
-	snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
 
 	ucontrol->value.integer.value[0] = 127 - mix->rvol;
 	return 0;
 }
 
-static int snd_trident_pcm_rvol_control_put(snd_kcontrol_t * kcontrol,
-					    snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_pcm_rvol_control_put(struct snd_kcontrol *kcontrol,
+					    struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
-	snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
 	unsigned short val;
 	int change = 0;
 
@@ -2790,7 +2836,7 @@ static int snd_trident_pcm_rvol_control_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_trident_pcm_rvol_control __devinitdata =
+static struct snd_kcontrol_new snd_trident_pcm_rvol_control __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "PCM Reverb Playback Volume",
@@ -2807,7 +2853,8 @@ static snd_kcontrol_new_t snd_trident_pcm_rvol_control __devinitdata =
     Description: PCM chorus volume control
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_pcm_cvol_control_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_trident_pcm_cvol_control_info(struct snd_kcontrol *kcontrol,
+					     struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
@@ -2816,21 +2863,21 @@ static int snd_trident_pcm_cvol_control_info(snd_kcontrol_t *kcontrol, snd_ctl_e
 	return 0;
 }
 
-static int snd_trident_pcm_cvol_control_get(snd_kcontrol_t * kcontrol,
-					    snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_pcm_cvol_control_get(struct snd_kcontrol *kcontrol,
+					    struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
-	snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
 
 	ucontrol->value.integer.value[0] = 127 - mix->cvol;
 	return 0;
 }
 
-static int snd_trident_pcm_cvol_control_put(snd_kcontrol_t * kcontrol,
-					    snd_ctl_elem_value_t * ucontrol)
+static int snd_trident_pcm_cvol_control_put(struct snd_kcontrol *kcontrol,
+					    struct snd_ctl_elem_value *ucontrol)
 {
-	trident_t *trident = snd_kcontrol_chip(kcontrol);
-	snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
+	struct snd_trident *trident = snd_kcontrol_chip(kcontrol);
+	struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)];
 	unsigned short val;
 	int change = 0;
 
@@ -2844,7 +2891,7 @@ static int snd_trident_pcm_cvol_control_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_trident_pcm_cvol_control __devinitdata =
+static struct snd_kcontrol_new snd_trident_pcm_cvol_control __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =         "PCM Chorus Playback Volume",
@@ -2855,9 +2902,11 @@ static snd_kcontrol_new_t snd_trident_pcm_cvol_control __devinitdata =
 	.put =		snd_trident_pcm_cvol_control_put,
 };
 
-static void snd_trident_notify_pcm_change1(snd_card_t * card, snd_kcontrol_t *kctl, int num, int activate)
+static void snd_trident_notify_pcm_change1(struct snd_card *card,
+					   struct snd_kcontrol *kctl,
+					   int num, int activate)
 {
-	snd_ctl_elem_id_t id;
+	struct snd_ctl_elem_id id;
 
 	if (! kctl)
 		return;
@@ -2870,7 +2919,9 @@ static void snd_trident_notify_pcm_change1(snd_card_t * card, snd_kcontrol_t *kc
 		       snd_ctl_build_ioff(&id, kctl, num));
 }
 
-static void snd_trident_notify_pcm_change(trident_t *trident, snd_trident_pcm_mixer_t *tmix, int num, int activate)
+static void snd_trident_notify_pcm_change(struct snd_trident *trident,
+					  struct snd_trident_pcm_mixer *tmix,
+					  int num, int activate)
 {
 	snd_trident_notify_pcm_change1(trident->card, trident->ctl_vol, num, activate);
 	snd_trident_notify_pcm_change1(trident->card, trident->ctl_pan, num, activate);
@@ -2878,9 +2929,11 @@ static void snd_trident_notify_pcm_change(trident_t *trident, snd_trident_pcm_mi
 	snd_trident_notify_pcm_change1(trident->card, trident->ctl_cvol, num, activate);
 }
 
-static int snd_trident_pcm_mixer_build(trident_t *trident, snd_trident_voice_t *voice, snd_pcm_substream_t *substream)
+static int snd_trident_pcm_mixer_build(struct snd_trident *trident,
+				       struct snd_trident_voice *voice,
+				       struct snd_pcm_substream *substream)
 {
-	snd_trident_pcm_mixer_t *tmix;
+	struct snd_trident_pcm_mixer *tmix;
 
 	snd_assert(trident != NULL && voice != NULL && substream != NULL, return -EINVAL);
 	tmix = &trident->pcm_mixer[substream->number];
@@ -2893,9 +2946,9 @@ static int snd_trident_pcm_mixer_build(trident_t *trident, snd_trident_voice_t *
 	return 0;
 }
 
-static int snd_trident_pcm_mixer_free(trident_t *trident, snd_trident_voice_t *voice, snd_pcm_substream_t *substream)
+static int snd_trident_pcm_mixer_free(struct snd_trident *trident, struct snd_trident_voice *voice, struct snd_pcm_substream *substream)
 {
-	snd_trident_pcm_mixer_t *tmix;
+	struct snd_trident_pcm_mixer *tmix;
 
 	snd_assert(trident != NULL && substream != NULL, return -EINVAL);
 	tmix = &trident->pcm_mixer[substream->number];
@@ -2915,14 +2968,14 @@ static int snd_trident_pcm_mixer_free(trident_t *trident, snd_trident_voice_t *v
   
   ---------------------------------------------------------------------------*/
 
-static int __devinit snd_trident_mixer(trident_t * trident, int pcm_spdif_device)
+static int __devinit snd_trident_mixer(struct snd_trident * trident, int pcm_spdif_device)
 {
-	ac97_template_t _ac97;
-	snd_card_t * card = trident->card;
-	snd_kcontrol_t *kctl;
-	snd_ctl_elem_value_t *uctl;
+	struct snd_ac97_template _ac97;
+	struct snd_card *card = trident->card;
+	struct snd_kcontrol *kctl;
+	struct snd_ctl_elem_value *uctl;
 	int idx, err, retries = 2;
-	static ac97_bus_ops_t ops = {
+	static struct snd_ac97_bus_ops ops = {
 		.write = snd_trident_codec_write,
 		.read = snd_trident_codec_read,
 	};
@@ -2959,7 +3012,7 @@ static int __devinit snd_trident_mixer(trident_t * trident, int pcm_spdif_device
 			snd_printk(KERN_ERR "SI7018: the secondary codec - invalid access\n");
 #if 0	// only for my testing purpose --jk
 		{
-			ac97_t *mc97;
+			struct snd_ac97 *mc97;
 			err = snd_ac97_modem(trident->card, &_ac97, &mc97);
 			if (err < 0)
 				snd_printk(KERN_ERR "snd_ac97_modem returned error %i\n", err);
@@ -2982,7 +3035,7 @@ static int __devinit snd_trident_mixer(trident_t * trident, int pcm_spdif_device
 	}
 
 	for (idx = 0; idx < 32; idx++) {
-		snd_trident_pcm_mixer_t *tmix;
+		struct snd_trident_pcm_mixer *tmix;
 		
 		tmix = &trident->pcm_mixer[idx];
 		tmix->voice = NULL;
@@ -3080,7 +3133,7 @@ static int __devinit snd_trident_mixer(trident_t * trident, int pcm_spdif_device
 
 static unsigned char snd_trident_gameport_read(struct gameport *gameport)
 {
-	trident_t *chip = gameport_get_port_data(gameport);
+	struct snd_trident *chip = gameport_get_port_data(gameport);
 
 	snd_assert(chip, return 0);
 	return inb(TRID_REG(chip, GAMEPORT_LEGACY));
@@ -3088,7 +3141,7 @@ static unsigned char snd_trident_gameport_read(struct gameport *gameport)
 
 static void snd_trident_gameport_trigger(struct gameport *gameport)
 {
-	trident_t *chip = gameport_get_port_data(gameport);
+	struct snd_trident *chip = gameport_get_port_data(gameport);
 
 	snd_assert(chip, return);
 	outb(0xff, TRID_REG(chip, GAMEPORT_LEGACY));
@@ -3096,7 +3149,7 @@ static void snd_trident_gameport_trigger(struct gameport *gameport)
 
 static int snd_trident_gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons)
 {
-	trident_t *chip = gameport_get_port_data(gameport);
+	struct snd_trident *chip = gameport_get_port_data(gameport);
 	int i;
 
 	snd_assert(chip, return 0);
@@ -3113,7 +3166,7 @@ static int snd_trident_gameport_cooked_read(struct gameport *gameport, int *axes
 
 static int snd_trident_gameport_open(struct gameport *gameport, int mode)
 {
-	trident_t *chip = gameport_get_port_data(gameport);
+	struct snd_trident *chip = gameport_get_port_data(gameport);
 
 	snd_assert(chip, return 0);
 
@@ -3130,7 +3183,7 @@ static int snd_trident_gameport_open(struct gameport *gameport, int mode)
 	}
 }
 
-int __devinit snd_trident_create_gameport(trident_t *chip)
+int __devinit snd_trident_create_gameport(struct snd_trident *chip)
 {
 	struct gameport *gp;
 
@@ -3156,7 +3209,7 @@ int __devinit snd_trident_create_gameport(trident_t *chip)
 	return 0;
 }
 
-static inline void snd_trident_free_gameport(trident_t *chip)
+static inline void snd_trident_free_gameport(struct snd_trident *chip)
 {
 	if (chip->gameport) {
 		gameport_unregister_port(chip->gameport);
@@ -3164,14 +3217,14 @@ static inline void snd_trident_free_gameport(trident_t *chip)
 	}
 }
 #else
-int __devinit snd_trident_create_gameport(trident_t *chip) { return -ENOSYS; }
-static inline void snd_trident_free_gameport(trident_t *chip) { }
+int __devinit snd_trident_create_gameport(struct snd_trident *chip) { return -ENOSYS; }
+static inline void snd_trident_free_gameport(struct snd_trident *chip) { }
 #endif /* CONFIG_GAMEPORT */
 
 /*
  * delay for 1 tick
  */
-static inline void do_delay(trident_t *chip)
+static inline void do_delay(struct snd_trident *chip)
 {
 	schedule_timeout_uninterruptible(1);
 }
@@ -3180,7 +3233,7 @@ static inline void do_delay(trident_t *chip)
  *  SiS reset routine
  */
 
-static int snd_trident_sis_reset(trident_t *trident)
+static int snd_trident_sis_reset(struct snd_trident *trident)
 {
 	unsigned long end_time;
 	unsigned int i;
@@ -3233,10 +3286,10 @@ static int snd_trident_sis_reset(trident_t *trident)
  *  /proc interface
  */
 
-static void snd_trident_proc_read(snd_info_entry_t *entry, 
-				  snd_info_buffer_t * buffer)
+static void snd_trident_proc_read(struct snd_info_entry *entry, 
+				  struct snd_info_buffer *buffer)
 {
-	trident_t *trident = entry->private_data;
+	struct snd_trident *trident = entry->private_data;
 	char *s;
 
 	switch (trident->device) {
@@ -3274,9 +3327,9 @@ static void snd_trident_proc_read(snd_info_entry_t *entry,
 #endif
 }
 
-static void __devinit snd_trident_proc_init(trident_t * trident)
+static void __devinit snd_trident_proc_init(struct snd_trident * trident)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 	const char *s = "trident";
 	
 	if (trident->device == TRIDENT_DEVICE_ID_SI7018)
@@ -3285,9 +3338,9 @@ static void __devinit snd_trident_proc_init(trident_t * trident)
 		snd_info_set_text_ops(entry, trident, 1024, snd_trident_proc_read);
 }
 
-static int snd_trident_dev_free(snd_device_t *device)
+static int snd_trident_dev_free(struct snd_device *device)
 {
-	trident_t *trident = device->device_data;
+	struct snd_trident *trident = device->device_data;
 	return snd_trident_free(trident);
 }
 
@@ -3303,7 +3356,7 @@ static int snd_trident_dev_free(snd_device_t *device)
   
   ---------------------------------------------------------------------------*/
 
-static int __devinit snd_trident_tlb_alloc(trident_t *trident)
+static int __devinit snd_trident_tlb_alloc(struct snd_trident *trident)
 {
 	int i;
 
@@ -3318,7 +3371,7 @@ static int __devinit snd_trident_tlb_alloc(trident_t *trident)
 	trident->tlb.entries = (unsigned int*)(((unsigned long)trident->tlb.buffer.area + SNDRV_TRIDENT_MAX_PAGES * 4 - 1) & ~(SNDRV_TRIDENT_MAX_PAGES * 4 - 1));
 	trident->tlb.entries_dmaaddr = (trident->tlb.buffer.addr + SNDRV_TRIDENT_MAX_PAGES * 4 - 1) & ~(SNDRV_TRIDENT_MAX_PAGES * 4 - 1);
 	/* allocate shadow TLB page table (virtual addresses) */
-	trident->tlb.shadow_entries = (unsigned long *)vmalloc(SNDRV_TRIDENT_MAX_PAGES*sizeof(unsigned long));
+	trident->tlb.shadow_entries = vmalloc(SNDRV_TRIDENT_MAX_PAGES*sizeof(unsigned long));
 	if (trident->tlb.shadow_entries == NULL) {
 		snd_printk(KERN_ERR "trident: unable to allocate shadow TLB entries\n");
 		return -ENOMEM;
@@ -3340,7 +3393,7 @@ static int __devinit snd_trident_tlb_alloc(trident_t *trident)
 	if (trident->tlb.memhdr == NULL)
 		return -ENOMEM;
 
-	trident->tlb.memhdr->block_extra_size = sizeof(snd_trident_memblk_arg_t);
+	trident->tlb.memhdr->block_extra_size = sizeof(struct snd_trident_memblk_arg);
 	return 0;
 }
 
@@ -3348,7 +3401,7 @@ static int __devinit snd_trident_tlb_alloc(trident_t *trident)
  * initialize 4D DX chip
  */
 
-static void snd_trident_stop_all_voices(trident_t *trident)
+static void snd_trident_stop_all_voices(struct snd_trident *trident)
 {
 	outl(0xffffffff, TRID_REG(trident, T4D_STOP_A));
 	outl(0xffffffff, TRID_REG(trident, T4D_STOP_B));
@@ -3356,7 +3409,7 @@ static void snd_trident_stop_all_voices(trident_t *trident)
 	outl(0, TRID_REG(trident, T4D_AINTEN_B));
 }
 
-static int snd_trident_4d_dx_init(trident_t *trident)
+static int snd_trident_4d_dx_init(struct snd_trident *trident)
 {
 	struct pci_dev *pci = trident->pci;
 	unsigned long end_time;
@@ -3396,7 +3449,7 @@ static int snd_trident_4d_dx_init(trident_t *trident)
 /*
  * initialize 4D NX chip
  */
-static int snd_trident_4d_nx_init(trident_t *trident)
+static int snd_trident_4d_nx_init(struct snd_trident *trident)
 {
 	struct pci_dev *pci = trident->pci;
 	unsigned long end_time;
@@ -3453,7 +3506,7 @@ static int snd_trident_4d_nx_init(trident_t *trident)
 /*
  * initialize sis7018 chip
  */
-static int snd_trident_sis_init(trident_t *trident)
+static int snd_trident_sis_init(struct snd_trident *trident)
 {
 	int err;
 
@@ -3484,18 +3537,18 @@ static int snd_trident_sis_init(trident_t *trident)
   
   ---------------------------------------------------------------------------*/
 
-int __devinit snd_trident_create(snd_card_t * card,
+int __devinit snd_trident_create(struct snd_card *card,
 		       struct pci_dev *pci,
 		       int pcm_streams,
 		       int pcm_spdif_device,
 		       int max_wavetable_size,
-		       trident_t ** rtrident)
+		       struct snd_trident ** rtrident)
 {
-	trident_t *trident;
+	struct snd_trident *trident;
 	int i, err;
-	snd_trident_voice_t *voice;
-	snd_trident_pcm_mixer_t *tmix;
-	static snd_device_ops_t ops = {
+	struct snd_trident_voice *voice;
+	struct snd_trident_pcm_mixer *tmix;
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_trident_dev_free,
 	};
 
@@ -3543,7 +3596,8 @@ int __devinit snd_trident_create(snd_card_t * card,
 	}
 	trident->port = pci_resource_start(pci, 0);
 
-	if (request_irq(pci->irq, snd_trident_interrupt, SA_INTERRUPT|SA_SHIRQ, "Trident Audio", (void *) trident)) {
+	if (request_irq(pci->irq, snd_trident_interrupt, SA_INTERRUPT|SA_SHIRQ,
+			"Trident Audio", trident)) {
 		snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
 		snd_trident_free(trident);
 		return -EBUSY;
@@ -3627,7 +3681,7 @@ int __devinit snd_trident_create(snd_card_t * card,
   
   ---------------------------------------------------------------------------*/
 
-static int snd_trident_free(trident_t *trident)
+static int snd_trident_free(struct snd_trident *trident)
 {
 	snd_trident_free_gameport(trident);
 	snd_trident_disable_eso(trident);
@@ -3647,7 +3701,7 @@ static int snd_trident_free(trident_t *trident)
 		snd_dma_free_pages(&trident->tlb.buffer);
 	}
 	if (trident->irq >= 0)
-		free_irq(trident->irq, (void *)trident);
+		free_irq(trident->irq, trident);
 	pci_release_regions(trident->pci);
 	pci_disable_device(trident->pci);
 	kfree(trident);
@@ -3674,10 +3728,10 @@ static int snd_trident_free(trident_t *trident)
 
 static irqreturn_t snd_trident_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	trident_t *trident = dev_id;
+	struct snd_trident *trident = dev_id;
 	unsigned int audio_int, chn_int, stimer, channel, mask, tmp;
 	int delta;
-	snd_trident_voice_t *voice;
+	struct snd_trident_voice *voice;
 
 	audio_int = inl(TRID_REG(trident, T4D_MISCINT));
 	if ((audio_int & (ADDRESS_IRQ|MPU401_IRQ)) == 0)
@@ -3779,21 +3833,21 @@ static irqreturn_t snd_trident_interrupt(int irq, void *dev_id, struct pt_regs *
    Returns:     None.
   
   ---------------------------------------------------------------------------*/
-int snd_trident_attach_synthesizer(trident_t *trident)
+int snd_trident_attach_synthesizer(struct snd_trident *trident)
 {	
 #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
 	if (snd_seq_device_new(trident->card, 1, SNDRV_SEQ_DEV_ID_TRIDENT,
-			       sizeof(trident_t*), &trident->seq_dev) >= 0) {
+			       sizeof(struct snd_trident *), &trident->seq_dev) >= 0) {
 		strcpy(trident->seq_dev->name, "4DWave");
-		*(trident_t**)SNDRV_SEQ_DEVICE_ARGPTR(trident->seq_dev) = trident;
+		*(struct snd_trident **)SNDRV_SEQ_DEVICE_ARGPTR(trident->seq_dev) = trident;
 	}
 #endif
 	return 0;
 }
 
-snd_trident_voice_t *snd_trident_alloc_voice(trident_t * trident, int type, int client, int port)
+struct snd_trident_voice *snd_trident_alloc_voice(struct snd_trident * trident, int type, int client, int port)
 {
-	snd_trident_voice_t *pvoice;
+	struct snd_trident_voice *pvoice;
 	unsigned long flags;
 	int idx;
 
@@ -3835,10 +3889,10 @@ snd_trident_voice_t *snd_trident_alloc_voice(trident_t * trident, int type, int
 	return NULL;
 }
 
-void snd_trident_free_voice(trident_t * trident, snd_trident_voice_t *voice)
+void snd_trident_free_voice(struct snd_trident * trident, struct snd_trident_voice *voice)
 {
 	unsigned long flags;
-	void (*private_free)(snd_trident_voice_t *);
+	void (*private_free)(struct snd_trident_voice *);
 	void *private_data;
 
 	if (voice == NULL || !voice->use)
@@ -3863,7 +3917,7 @@ void snd_trident_free_voice(trident_t * trident, snd_trident_voice_t *voice)
 		private_free(voice);
 }
 
-static void snd_trident_clear_voices(trident_t * trident, unsigned short v_min, unsigned short v_max)
+static void snd_trident_clear_voices(struct snd_trident * trident, unsigned short v_min, unsigned short v_max)
 {
 	unsigned int i, val, mask[2] = { 0, 0 };
 
@@ -3884,9 +3938,9 @@ static void snd_trident_clear_voices(trident_t * trident, unsigned short v_min,
 }
 
 #ifdef CONFIG_PM
-static int snd_trident_suspend(snd_card_t *card, pm_message_t state)
+static int snd_trident_suspend(struct snd_card *card, pm_message_t state)
 {
-	trident_t *trident = card->pm_private_data;
+	struct snd_trident *trident = card->pm_private_data;
 
 	trident->in_suspend = 1;
 	snd_pcm_suspend_all(trident->pcm);
@@ -3910,9 +3964,9 @@ static int snd_trident_suspend(snd_card_t *card, pm_message_t state)
 	return 0;
 }
 
-static int snd_trident_resume(snd_card_t *card)
+static int snd_trident_resume(struct snd_card *card)
 {
-	trident_t *trident = card->pm_private_data;
+	struct snd_trident *trident = card->pm_private_data;
 
 	pci_enable_device(trident->pci);
 	if (pci_set_dma_mask(trident->pci, 0x3fffffff) < 0 ||
diff --git a/sound/pci/trident/trident_memory.c b/sound/pci/trident/trident_memory.c
index f3e6c546af7..cf09ea99755 100644
--- a/sound/pci/trident/trident_memory.c
+++ b/sound/pci/trident/trident_memory.c
@@ -68,13 +68,14 @@
 #define page_to_addr(trident,page)	__tlb_to_addr(trident, (page) << 1)
 
 /* fill TLB entries -- we need to fill two entries */
-static inline void set_tlb_bus(trident_t *trident, int page, unsigned long ptr, dma_addr_t addr)
+static inline void set_tlb_bus(struct snd_trident *trident, int page,
+			       unsigned long ptr, dma_addr_t addr)
 {
 	page <<= 1;
 	__set_tlb_bus(trident, page, ptr, addr);
 	__set_tlb_bus(trident, page+1, ptr + SNDRV_TRIDENT_PAGE_SIZE, addr + SNDRV_TRIDENT_PAGE_SIZE);
 }
-static inline void set_silent_tlb(trident_t *trident, int page)
+static inline void set_silent_tlb(struct snd_trident *trident, int page)
 {
 	page <<= 1;
 	__set_tlb_bus(trident, page, (unsigned long)trident->tlb.silent_page.area, trident->tlb.silent_page.addr);
@@ -97,7 +98,8 @@ static inline void set_silent_tlb(trident_t *trident, int page)
 #define page_to_addr(trident,page)	__tlb_to_addr(trident, (page) * UNIT_PAGES)
 
 /* fill TLB entries -- UNIT_PAGES entries must be filled */
-static inline void set_tlb_bus(trident_t *trident, int page, unsigned long ptr, dma_addr_t addr)
+static inline void set_tlb_bus(struct snd_trident *trident, int page,
+			       unsigned long ptr, dma_addr_t addr)
 {
 	int i;
 	page *= UNIT_PAGES;
@@ -107,7 +109,7 @@ static inline void set_tlb_bus(trident_t *trident, int page, unsigned long ptr,
 		addr += SNDRV_TRIDENT_PAGE_SIZE;
 	}
 }
-static inline void set_silent_tlb(trident_t *trident, int page)
+static inline void set_silent_tlb(struct snd_trident *trident, int page)
 {
 	int i;
 	page *= UNIT_PAGES;
@@ -118,7 +120,7 @@ static inline void set_silent_tlb(trident_t *trident, int page)
 #endif /* PAGE_SIZE */
 
 /* calculate buffer pointer from offset address */
-static inline void *offset_ptr(trident_t *trident, int offset)
+static inline void *offset_ptr(struct snd_trident *trident, int offset)
 {
 	char *ptr;
 	ptr = page_to_ptr(trident, get_aligned_page(offset));
@@ -127,16 +129,16 @@ static inline void *offset_ptr(trident_t *trident, int offset)
 }
 
 /* first and last (aligned) pages of memory block */
-#define firstpg(blk)	(((snd_trident_memblk_arg_t*)snd_util_memblk_argptr(blk))->first_page)
-#define lastpg(blk)	(((snd_trident_memblk_arg_t*)snd_util_memblk_argptr(blk))->last_page)
+#define firstpg(blk)	(((struct snd_trident_memblk_arg *)snd_util_memblk_argptr(blk))->first_page)
+#define lastpg(blk)	(((struct snd_trident_memblk_arg *)snd_util_memblk_argptr(blk))->last_page)
 
 /*
  * search empty pages which may contain given size
  */
-static snd_util_memblk_t *
-search_empty(snd_util_memhdr_t *hdr, int size)
+static struct snd_util_memblk *
+search_empty(struct snd_util_memhdr *hdr, int size)
 {
-	snd_util_memblk_t *blk, *prev;
+	struct snd_util_memblk *blk, *prev;
 	int page, psize;
 	struct list_head *p;
 
@@ -144,7 +146,7 @@ search_empty(snd_util_memhdr_t *hdr, int size)
 	prev = NULL;
 	page = 0;
 	list_for_each(p, &hdr->block) {
-		blk = list_entry(p, snd_util_memblk_t, list);
+		blk = list_entry(p, struct snd_util_memblk, list);
 		if (page + psize <= firstpg(blk))
 			goto __found_pages;
 		page = lastpg(blk) + 1;
@@ -183,12 +185,13 @@ static int is_valid_page(unsigned long ptr)
 /*
  * page allocation for DMA (Scatter-Gather version)
  */
-static snd_util_memblk_t *
-snd_trident_alloc_sg_pages(trident_t *trident, snd_pcm_substream_t *substream)
+static struct snd_util_memblk *
+snd_trident_alloc_sg_pages(struct snd_trident *trident,
+			   struct snd_pcm_substream *substream)
 {
-	snd_util_memhdr_t *hdr;
-	snd_util_memblk_t *blk;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_util_memhdr *hdr;
+	struct snd_util_memblk *blk;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	int idx, page;
 	struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
 
@@ -230,13 +233,14 @@ snd_trident_alloc_sg_pages(trident_t *trident, snd_pcm_substream_t *substream)
 /*
  * page allocation for DMA (contiguous version)
  */
-static snd_util_memblk_t *
-snd_trident_alloc_cont_pages(trident_t *trident, snd_pcm_substream_t *substream)
+static struct snd_util_memblk *
+snd_trident_alloc_cont_pages(struct snd_trident *trident,
+			     struct snd_pcm_substream *substream)
 {
-	snd_util_memhdr_t *hdr;
-	snd_util_memblk_t *blk;
+	struct snd_util_memhdr *hdr;
+	struct snd_util_memblk *blk;
 	int page;
-	snd_pcm_runtime_t *runtime = substream->runtime;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 	dma_addr_t addr;
 	unsigned long ptr;
 
@@ -270,8 +274,9 @@ snd_trident_alloc_cont_pages(trident_t *trident, snd_pcm_substream_t *substream)
 /*
  * page allocation for DMA
  */
-snd_util_memblk_t *
-snd_trident_alloc_pages(trident_t *trident, snd_pcm_substream_t *substream)
+struct snd_util_memblk *
+snd_trident_alloc_pages(struct snd_trident *trident,
+			struct snd_pcm_substream *substream)
 {
 	snd_assert(trident != NULL, return NULL);
 	snd_assert(substream != NULL, return NULL);
@@ -285,9 +290,10 @@ snd_trident_alloc_pages(trident_t *trident, snd_pcm_substream_t *substream)
 /*
  * release DMA buffer from page table
  */
-int snd_trident_free_pages(trident_t *trident, snd_util_memblk_t *blk)
+int snd_trident_free_pages(struct snd_trident *trident,
+			   struct snd_util_memblk *blk)
 {
-	snd_util_memhdr_t *hdr;
+	struct snd_util_memhdr *hdr;
 	int page;
 
 	snd_assert(trident != NULL, return -EINVAL);
@@ -314,17 +320,17 @@ int snd_trident_free_pages(trident_t *trident, snd_util_memblk_t *blk)
 
 /*
  */
-static int synth_alloc_pages(trident_t *hw, snd_util_memblk_t *blk);
-static int synth_free_pages(trident_t *hw, snd_util_memblk_t *blk);
+static int synth_alloc_pages(struct snd_trident *hw, struct snd_util_memblk *blk);
+static int synth_free_pages(struct snd_trident *hw, struct snd_util_memblk *blk);
 
 /*
  * allocate a synth sample area
  */
-snd_util_memblk_t *
-snd_trident_synth_alloc(trident_t *hw, unsigned int size)
+struct snd_util_memblk *
+snd_trident_synth_alloc(struct snd_trident *hw, unsigned int size)
 {
-	snd_util_memblk_t *blk;
-	snd_util_memhdr_t *hdr = hw->tlb.memhdr; 
+	struct snd_util_memblk *blk;
+	struct snd_util_memhdr *hdr = hw->tlb.memhdr; 
 
 	down(&hdr->block_mutex);
 	blk = __snd_util_mem_alloc(hdr, size);
@@ -346,9 +352,9 @@ snd_trident_synth_alloc(trident_t *hw, unsigned int size)
  * free a synth sample area
  */
 int
-snd_trident_synth_free(trident_t *hw, snd_util_memblk_t *blk)
+snd_trident_synth_free(struct snd_trident *hw, struct snd_util_memblk *blk)
 {
-	snd_util_memhdr_t *hdr = hw->tlb.memhdr; 
+	struct snd_util_memhdr *hdr = hw->tlb.memhdr; 
 
 	down(&hdr->block_mutex);
 	synth_free_pages(hw, blk);
@@ -361,7 +367,7 @@ snd_trident_synth_free(trident_t *hw, snd_util_memblk_t *blk)
 /*
  * reset TLB entry and free kernel page
  */
-static void clear_tlb(trident_t *trident, int page)
+static void clear_tlb(struct snd_trident *trident, int page)
 {
 	void *ptr = page_to_ptr(trident, page);
 	dma_addr_t addr = page_to_addr(trident, page);
@@ -378,20 +384,22 @@ static void clear_tlb(trident_t *trident, int page)
 }
 
 /* check new allocation range */
-static void get_single_page_range(snd_util_memhdr_t *hdr, snd_util_memblk_t *blk, int *first_page_ret, int *last_page_ret)
+static void get_single_page_range(struct snd_util_memhdr *hdr,
+				  struct snd_util_memblk *blk,
+				  int *first_page_ret, int *last_page_ret)
 {
 	struct list_head *p;
-	snd_util_memblk_t *q;
+	struct snd_util_memblk *q;
 	int first_page, last_page;
 	first_page = firstpg(blk);
 	if ((p = blk->list.prev) != &hdr->block) {
-		q = list_entry(p, snd_util_memblk_t, list);
+		q = list_entry(p, struct snd_util_memblk, list);
 		if (lastpg(q) == first_page)
 			first_page++;  /* first page was already allocated */
 	}
 	last_page = lastpg(blk);
 	if ((p = blk->list.next) != &hdr->block) {
-		q = list_entry(p, snd_util_memblk_t, list);
+		q = list_entry(p, struct snd_util_memblk, list);
 		if (firstpg(q) == last_page)
 			last_page--; /* last page was already allocated */
 	}
@@ -402,7 +410,7 @@ static void get_single_page_range(snd_util_memhdr_t *hdr, snd_util_memblk_t *blk
 /*
  * allocate kernel pages and assign them to TLB
  */
-static int synth_alloc_pages(trident_t *hw, snd_util_memblk_t *blk)
+static int synth_alloc_pages(struct snd_trident *hw, struct snd_util_memblk *blk)
 {
 	int page, first_page, last_page;
 	struct snd_dma_buffer dmab;
@@ -438,7 +446,7 @@ __fail:
 /*
  * free pages
  */
-static int synth_free_pages(trident_t *trident, snd_util_memblk_t *blk)
+static int synth_free_pages(struct snd_trident *trident, struct snd_util_memblk *blk)
 {
 	int page, first_page, last_page;
 
@@ -452,7 +460,9 @@ static int synth_free_pages(trident_t *trident, snd_util_memblk_t *blk)
 /*
  * copy_from_user(blk + offset, data, size)
  */
-int snd_trident_synth_copy_from_user(trident_t *trident, snd_util_memblk_t *blk, int offset, const char __user *data, int size)
+int snd_trident_synth_copy_from_user(struct snd_trident *trident,
+				     struct snd_util_memblk *blk,
+				     int offset, const char __user *data, int size)
 {
 	int page, nextofs, end_offset, temp, temp1;
 
diff --git a/sound/pci/trident/trident_synth.c b/sound/pci/trident/trident_synth.c
index 5d5a719b058..a49682ef3e3 100644
--- a/sound/pci/trident/trident_synth.c
+++ b/sound/pci/trident/trident_synth.c
@@ -192,15 +192,15 @@ static unsigned short log_from_linear( unsigned short value )
  * Sample handling operations
  */
 
-static void sample_start(trident_t * trident, snd_trident_voice_t * voice, snd_seq_position_t position);
-static void sample_stop(trident_t * trident, snd_trident_voice_t * voice, snd_seq_stop_mode_t mode);
-static void sample_freq(trident_t * trident, snd_trident_voice_t * voice, snd_seq_frequency_t freq);
-static void sample_volume(trident_t * trident, snd_trident_voice_t * voice, snd_seq_ev_volume_t * volume);
-static void sample_loop(trident_t * trident, snd_trident_voice_t * voice, snd_seq_ev_loop_t * loop);
-static void sample_pos(trident_t * trident, snd_trident_voice_t * voice, snd_seq_position_t position);
-static void sample_private1(trident_t * trident, snd_trident_voice_t * voice, unsigned char *data);
-
-static snd_trident_sample_ops_t sample_ops =
+static void sample_start(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_position_t position);
+static void sample_stop(struct snd_trident * trident, struct snd_trident_voice * voice, int mode);
+static void sample_freq(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_frequency_t freq);
+static void sample_volume(struct snd_trident * trident, struct snd_trident_voice * voice, struct snd_seq_ev_volume * volume);
+static void sample_loop(struct snd_trident * trident, struct snd_trident_voice * voice, struct snd_seq_ev_loop * loop);
+static void sample_pos(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_position_t position);
+static void sample_private1(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned char *data);
+
+static struct snd_trident_sample_ops sample_ops =
 {
 	sample_start,
 	sample_stop,
@@ -211,7 +211,7 @@ static snd_trident_sample_ops_t sample_ops =
 	sample_private1
 };
 
-static void snd_trident_simple_init(snd_trident_voice_t * voice)
+static void snd_trident_simple_init(struct snd_trident_voice * voice)
 {
 	//voice->handler_wave = interrupt_wave;
 	//voice->handler_volume = interrupt_volume;
@@ -220,10 +220,10 @@ static void snd_trident_simple_init(snd_trident_voice_t * voice)
 	voice->sample_ops = &sample_ops;
 }
 
-static void sample_start(trident_t * trident, snd_trident_voice_t * voice, snd_seq_position_t position)
+static void sample_start(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_position_t position)
 {
-	simple_instrument_t *simple;
-	snd_seq_kinstr_t *instr;
+	struct simple_instrument *simple;
+	struct snd_seq_kinstr *instr;
 	unsigned long flags;
 	unsigned int loop_start, loop_end, sample_start, sample_end, start_offset;
 	unsigned int value;
@@ -305,7 +305,7 @@ static void sample_start(trident_t * trident, snd_trident_voice_t * voice, snd_s
 	snd_seq_instr_free_use(trident->synth.ilist, instr);
 }
 
-static void sample_stop(trident_t * trident, snd_trident_voice_t * voice, snd_seq_stop_mode_t mode)
+static void sample_stop(struct snd_trident * trident, struct snd_trident_voice * voice, int mode)
 {
 	unsigned long flags;
 
@@ -329,7 +329,7 @@ static void sample_stop(trident_t * trident, snd_trident_voice_t * voice, snd_se
 	}
 }
 
-static void sample_freq(trident_t * trident, snd_trident_voice_t * voice, snd_seq_frequency_t freq)
+static void sample_freq(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_frequency_t freq)
 {
 	unsigned long flags;
 	freq >>= 4;
@@ -355,7 +355,7 @@ static void sample_freq(trident_t * trident, snd_trident_voice_t * voice, snd_se
 	spin_unlock_irqrestore(&trident->reg_lock, flags);
 }
 
-static void sample_volume(trident_t * trident, snd_trident_voice_t * voice, snd_seq_ev_volume_t * volume)
+static void sample_volume(struct snd_trident * trident, struct snd_trident_voice * voice, struct snd_seq_ev_volume * volume)
 {
 	unsigned long flags;
 	unsigned short value;
@@ -407,11 +407,11 @@ static void sample_volume(trident_t * trident, snd_trident_voice_t * voice, snd_
 	spin_unlock_irqrestore(&trident->reg_lock, flags);
 }
 
-static void sample_loop(trident_t * trident, snd_trident_voice_t * voice, snd_seq_ev_loop_t * loop)
+static void sample_loop(struct snd_trident * trident, struct snd_trident_voice * voice, struct snd_seq_ev_loop * loop)
 {
 	unsigned long flags;
-	simple_instrument_t *simple;
-	snd_seq_kinstr_t *instr;
+	struct simple_instrument *simple;
+	struct snd_seq_kinstr *instr;
 	unsigned int loop_start, loop_end;
 
 	instr = snd_seq_instr_find(trident->synth.ilist, &voice->instr, 0, 1);
@@ -446,11 +446,11 @@ static void sample_loop(trident_t * trident, snd_trident_voice_t * voice, snd_se
 	snd_seq_instr_free_use(trident->synth.ilist, instr);
 }
 
-static void sample_pos(trident_t * trident, snd_trident_voice_t * voice, snd_seq_position_t position)
+static void sample_pos(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_position_t position)
 {
 	unsigned long flags;
-	simple_instrument_t *simple;
-	snd_seq_kinstr_t *instr;
+	struct simple_instrument *simple;
+	struct snd_seq_kinstr *instr;
 	unsigned int value;
 
 	instr = snd_seq_instr_find(trident->synth.ilist, &voice->instr, 0, 1);
@@ -496,7 +496,7 @@ static void sample_pos(trident_t * trident, snd_trident_voice_t * voice, snd_seq
 	snd_seq_instr_free_use(trident->synth.ilist, instr);
 }
 
-static void sample_private1(trident_t * trident, snd_trident_voice_t * voice, unsigned char *data)
+static void sample_private1(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned char *data)
 {
 }
 
@@ -504,10 +504,11 @@ static void sample_private1(trident_t * trident, snd_trident_voice_t * voice, un
  * Memory management / sample loading
  */
 
-static int snd_trident_simple_put_sample(void *private_data, simple_instrument_t * instr,
+static int snd_trident_simple_put_sample(void *private_data,
+					 struct simple_instrument * instr,
 					 char __user *data, long len, int atomic)
 {
-	trident_t *trident = private_data;
+	struct snd_trident *trident = private_data;
 	int size = instr->size;
 	int shift = 0;
 
@@ -529,7 +530,7 @@ static int snd_trident_simple_put_sample(void *private_data, simple_instrument_t
 		return -EFAULT;
 
 	if (trident->tlb.entries) {
-		snd_util_memblk_t *memblk;
+		struct snd_util_memblk *memblk;
 		memblk = snd_trident_synth_alloc(trident, size); 
 		if (memblk == NULL)
 			return -ENOMEM;
@@ -557,10 +558,11 @@ static int snd_trident_simple_put_sample(void *private_data, simple_instrument_t
 	return 0;
 }
 
-static int snd_trident_simple_get_sample(void *private_data, simple_instrument_t * instr,
+static int snd_trident_simple_get_sample(void *private_data,
+					 struct simple_instrument * instr,
 					 char __user *data, long len, int atomic)
 {
-	//trident_t *trident = private_data;
+	//struct snd_trident *trident = private_data;
 	int size = instr->size;
 	int shift = 0;
 
@@ -578,10 +580,11 @@ static int snd_trident_simple_get_sample(void *private_data, simple_instrument_t
 	return -EBUSY;
 }
 
-static int snd_trident_simple_remove_sample(void *private_data, simple_instrument_t * instr,
+static int snd_trident_simple_remove_sample(void *private_data,
+					    struct simple_instrument * instr,
 					    int atomic)
 {
-	trident_t *trident = private_data;
+	struct snd_trident *trident = private_data;
 	int size = instr->size;
 
 	if (instr->format & SIMPLE_WAVE_16BIT)
@@ -590,7 +593,7 @@ static int snd_trident_simple_remove_sample(void *private_data, simple_instrumen
 		size <<= 1;
 
 	if (trident->tlb.entries) {
-		snd_util_memblk_t *memblk = (snd_util_memblk_t*)instr->address.ptr;
+		struct snd_util_memblk *memblk = (struct snd_util_memblk *)instr->address.ptr;
 		if (memblk)
 			snd_trident_synth_free(trident, memblk);
 		else
@@ -612,9 +615,9 @@ static int snd_trident_simple_remove_sample(void *private_data, simple_instrumen
 	return 0;
 }
 
-static void select_instrument(trident_t * trident, snd_trident_voice_t * v)
+static void select_instrument(struct snd_trident * trident, struct snd_trident_voice * v)
 {
-	snd_seq_kinstr_t *instr;
+	struct snd_seq_kinstr *instr;
 	instr = snd_seq_instr_find(trident->synth.ilist, &v->instr, 0, 1);
 	if (instr != NULL) {
 		if (instr->ops) {
@@ -629,7 +632,7 @@ static void select_instrument(trident_t * trident, snd_trident_voice_t * v)
 
  */
 
-static void event_sample(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
+static void event_sample(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
 {
 	if (v->sample_ops && v->sample_ops->sample_stop)
 		v->sample_ops->sample_stop(p->trident, v, SAMPLE_STOP_IMMEDIATELY);
@@ -643,7 +646,7 @@ static void event_sample(snd_seq_event_t * ev, snd_trident_port_t * p, snd_tride
 	select_instrument(p->trident, v);
 }
 
-static void event_cluster(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
+static void event_cluster(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
 {
 	if (v->sample_ops && v->sample_ops->sample_stop)
 		v->sample_ops->sample_stop(p->trident, v, SAMPLE_STOP_IMMEDIATELY);
@@ -651,49 +654,49 @@ static void event_cluster(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trid
 	select_instrument(p->trident, v);
 }
 
-static void event_start(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
+static void event_start(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
 {
 	if (v->sample_ops && v->sample_ops->sample_start)
 		v->sample_ops->sample_start(p->trident, v, ev->data.sample.param.position);
 }
 
-static void event_stop(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
+static void event_stop(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
 {
 	if (v->sample_ops && v->sample_ops->sample_stop)
 		v->sample_ops->sample_stop(p->trident, v, ev->data.sample.param.stop_mode);
 }
 
-static void event_freq(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
+static void event_freq(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
 {
 	if (v->sample_ops && v->sample_ops->sample_freq)
 		v->sample_ops->sample_freq(p->trident, v, ev->data.sample.param.frequency);
 }
 
-static void event_volume(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
+static void event_volume(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
 {
 	if (v->sample_ops && v->sample_ops->sample_volume)
 		v->sample_ops->sample_volume(p->trident, v, &ev->data.sample.param.volume);
 }
 
-static void event_loop(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
+static void event_loop(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
 {
 	if (v->sample_ops && v->sample_ops->sample_loop)
 		v->sample_ops->sample_loop(p->trident, v, &ev->data.sample.param.loop);
 }
 
-static void event_position(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
+static void event_position(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
 {
 	if (v->sample_ops && v->sample_ops->sample_pos)
 		v->sample_ops->sample_pos(p->trident, v, ev->data.sample.param.position);
 }
 
-static void event_private1(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v)
+static void event_private1(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
 {
 	if (v->sample_ops && v->sample_ops->sample_private1)
 		v->sample_ops->sample_private1(p->trident, v, (unsigned char *) &ev->data.sample.param.raw8);
 }
 
-typedef void (trident_sample_event_handler_t) (snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v);
+typedef void (trident_sample_event_handler_t) (struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v);
 
 static trident_sample_event_handler_t *trident_sample_event_handlers[9] =
 {
@@ -708,11 +711,11 @@ static trident_sample_event_handler_t *trident_sample_event_handlers[9] =
 	event_private1
 };
 
-static void snd_trident_sample_event(snd_seq_event_t * ev, snd_trident_port_t * p)
+static void snd_trident_sample_event(struct snd_seq_event * ev, struct snd_trident_port * p)
 {
 	int idx, voice;
-	trident_t *trident = p->trident;
-	snd_trident_voice_t *v;
+	struct snd_trident *trident = p->trident;
+	struct snd_trident_voice *v;
 	unsigned long flags;
 
 	idx = ev->type - SNDRV_SEQ_EVENT_SAMPLE;
@@ -735,10 +738,10 @@ static void snd_trident_sample_event(snd_seq_event_t * ev, snd_trident_port_t *
 
  */
 
-static void snd_trident_synth_free_voices(trident_t * trident, int client, int port)
+static void snd_trident_synth_free_voices(struct snd_trident * trident, int client, int port)
 {
 	int idx;
-	snd_trident_voice_t *voice;
+	struct snd_trident_voice *voice;
 
 	for (idx = 0; idx < 32; idx++) {
 		voice = &trident->synth.voices[idx];
@@ -747,11 +750,11 @@ static void snd_trident_synth_free_voices(trident_t * trident, int client, int p
 	}
 }
 
-static int snd_trident_synth_use(void *private_data, snd_seq_port_subscribe_t * info)
+static int snd_trident_synth_use(void *private_data, struct snd_seq_port_subscribe * info)
 {
-	snd_trident_port_t *port = (snd_trident_port_t *) private_data;
-	trident_t *trident = port->trident;
-	snd_trident_voice_t *voice;
+	struct snd_trident_port *port = private_data;
+	struct snd_trident *trident = port->trident;
+	struct snd_trident_voice *voice;
 	unsigned int idx;
 	unsigned long flags;
 
@@ -786,10 +789,10 @@ static int snd_trident_synth_use(void *private_data, snd_seq_port_subscribe_t *
 	return 0;
 }
 
-static int snd_trident_synth_unuse(void *private_data, snd_seq_port_subscribe_t * info)
+static int snd_trident_synth_unuse(void *private_data, struct snd_seq_port_subscribe * info)
 {
-	snd_trident_port_t *port = (snd_trident_port_t *) private_data;
-	trident_t *trident = port->trident;
+	struct snd_trident_port *port = private_data;
+	struct snd_trident *trident = port->trident;
 	unsigned long flags;
 
 	spin_lock_irqsave(&trident->reg_lock, flags);
@@ -802,18 +805,18 @@ static int snd_trident_synth_unuse(void *private_data, snd_seq_port_subscribe_t
 
  */
 
-static void snd_trident_synth_free_private_instruments(snd_trident_port_t * p, int client)
+static void snd_trident_synth_free_private_instruments(struct snd_trident_port * p, int client)
 {
-	snd_seq_instr_header_t ifree;
+	struct snd_seq_instr_header ifree;
 
 	memset(&ifree, 0, sizeof(ifree));
 	ifree.cmd = SNDRV_SEQ_INSTR_FREE_CMD_PRIVATE;
 	snd_seq_instr_list_free_cond(p->trident->synth.ilist, &ifree, client, 0);
 }
 
-static int snd_trident_synth_event_input(snd_seq_event_t * ev, int direct, void *private_data, int atomic, int hop)
+static int snd_trident_synth_event_input(struct snd_seq_event * ev, int direct, void *private_data, int atomic, int hop)
 {
-	snd_trident_port_t *p = (snd_trident_port_t *) private_data;
+	struct snd_trident_port *p = (struct snd_trident_port *) private_data;
 
 	if (p == NULL)
 		return -EINVAL;
@@ -841,12 +844,12 @@ static int snd_trident_synth_event_input(snd_seq_event_t * ev, int direct, void
 }
 
 static void snd_trident_synth_instr_notify(void *private_data,
-					   snd_seq_kinstr_t * instr,
+					   struct snd_seq_kinstr * instr,
 					   int what)
 {
 	int idx;
-	trident_t *trident = private_data;
-	snd_trident_voice_t *pvoice;
+	struct snd_trident *trident = private_data;
+	struct snd_trident_voice *pvoice;
 	unsigned long flags;
 
 	spin_lock_irqsave(&trident->event_lock, flags);
@@ -870,16 +873,16 @@ static void snd_trident_synth_instr_notify(void *private_data,
 
 static void snd_trident_synth_free_port(void *private_data)
 {
-	snd_trident_port_t *p = (snd_trident_port_t *) private_data;
+	struct snd_trident_port *p = (struct snd_trident_port *) private_data;
 
 	if (p)
 		snd_midi_channel_free_set(p->chset);
 }
 
-static int snd_trident_synth_create_port(trident_t * trident, int idx)
+static int snd_trident_synth_create_port(struct snd_trident * trident, int idx)
 {
-	snd_trident_port_t *p;
-	snd_seq_port_callback_t callbacks;
+	struct snd_trident_port *p;
+	struct snd_seq_port_callback callbacks;
 	char name[32];
 	char *str;
 	int result;
@@ -927,17 +930,17 @@ static int snd_trident_synth_create_port(trident_t * trident, int idx)
 
  */
 
-static int snd_trident_synth_new_device(snd_seq_device_t *dev)
+static int snd_trident_synth_new_device(struct snd_seq_device *dev)
 {
-	trident_t *trident;
+	struct snd_trident *trident;
 	int client, i;
-	snd_seq_client_callback_t callbacks;
-	snd_seq_client_info_t cinfo;
-	snd_seq_port_subscribe_t sub;
-	snd_simple_ops_t *simpleops;
+	struct snd_seq_client_callback callbacks;
+	struct snd_seq_client_info cinfo;
+	struct snd_seq_port_subscribe sub;
+	struct snd_simple_ops *simpleops;
 	char *str;
 
-	trident = *(trident_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
+	trident = *(struct snd_trident **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
 	if (trident == NULL)
 		return -EINVAL;
 
@@ -993,11 +996,11 @@ static int snd_trident_synth_new_device(snd_seq_device_t *dev)
 	return 0;
 }
 
-static int snd_trident_synth_delete_device(snd_seq_device_t *dev)
+static int snd_trident_synth_delete_device(struct snd_seq_device *dev)
 {
-	trident_t *trident;
+	struct snd_trident *trident;
 
-	trident = *(trident_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
+	trident = *(struct snd_trident **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
 	if (trident == NULL)
 		return -EINVAL;
 
@@ -1012,14 +1015,14 @@ static int snd_trident_synth_delete_device(snd_seq_device_t *dev)
 
 static int __init alsa_trident_synth_init(void)
 {
-	static snd_seq_dev_ops_t ops =
+	static struct snd_seq_dev_ops ops =
 	{
 		snd_trident_synth_new_device,
 		snd_trident_synth_delete_device
 	};
 
 	return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_TRIDENT, &ops,
-					      sizeof(trident_t*));
+					      sizeof(struct snd_trident *));
 }
 
 static void __exit alsa_trident_synth_exit(void)
-- 
cgit v1.2.3-70-g09d2


From 208a1b4cb5ad97510aa9cbe51d09e55656691cb4 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 14:53:41 +0100
Subject: [ALSA] Remove xxx_t typedefs: PCI YMFPCI

Modules: YMFPCI driver

Remove xxx_t typedefs from the PCI YMFPCI driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/ymfpci.h         | 109 +++++-----
 sound/pci/ymfpci/ymfpci.c      |  14 +-
 sound/pci/ymfpci/ymfpci_main.c | 470 +++++++++++++++++++++--------------------
 3 files changed, 298 insertions(+), 295 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h
index c3bccbfd8d4..ec790a9c496 100644
--- a/include/sound/ymfpci.h
+++ b/include/sound/ymfpci.h
@@ -184,7 +184,7 @@
  *
  */
 
-typedef struct _snd_ymfpci_playback_bank {
+struct snd_ymfpci_playback_bank {
 	u32 format;
 	u32 loop_default;
 	u32 base;			/* 32-bit address */
@@ -215,46 +215,45 @@ typedef struct _snd_ymfpci_playback_bank {
 	u32 eff3_gain;
 	u32 lpfD1;
 	u32 lpfD2;
-} snd_ymfpci_playback_bank_t;
+ };
 
-typedef struct _snd_ymfpci_capture_bank {
+struct snd_ymfpci_capture_bank {
 	u32 base;			/* 32-bit address */
 	u32 loop_end;			/* 32-bit offset */
 	u32 start;			/* 32-bit offset */
 	u32 num_of_loops;		/* counter */
-} snd_ymfpci_capture_bank_t;
+};
 
-typedef struct _snd_ymfpci_effect_bank {
+struct snd_ymfpci_effect_bank {
 	u32 base;			/* 32-bit address */
 	u32 loop_end;			/* 32-bit offset */
 	u32 start;			/* 32-bit offset */
 	u32 temp;
-} snd_ymfpci_effect_bank_t;
+};
 
-typedef struct _snd_ymfpci_voice ymfpci_voice_t;
-typedef struct _snd_ymfpci_pcm ymfpci_pcm_t;
-typedef struct _snd_ymfpci ymfpci_t;
+struct snd_ymfpci_pcm;
+struct snd_ymfpci;
 
-typedef enum {
+enum snd_ymfpci_voice_type {
 	YMFPCI_PCM,
 	YMFPCI_SYNTH,
 	YMFPCI_MIDI
-} ymfpci_voice_type_t;
+};
 
-struct _snd_ymfpci_voice {
-	ymfpci_t *chip;
+struct snd_ymfpci_voice {
+	struct snd_ymfpci *chip;
 	int number;
 	unsigned int use: 1,
 	    pcm: 1,
 	    synth: 1,
 	    midi: 1;
-	snd_ymfpci_playback_bank_t *bank;
+	struct snd_ymfpci_playback_bank *bank;
 	dma_addr_t bank_addr;
-	void (*interrupt)(ymfpci_t *chip, ymfpci_voice_t *voice);
-	ymfpci_pcm_t *ypcm;
+	void (*interrupt)(struct snd_ymfpci *chip, struct snd_ymfpci_voice *voice);
+	struct snd_ymfpci_pcm *ypcm;
 };
 
-typedef enum {
+enum snd_ymfpci_pcm_type {
 	PLAYBACK_VOICE,
 	CAPTURE_REC,
 	CAPTURE_AC97,
@@ -263,13 +262,13 @@ typedef enum {
 	EFFECT_EFF1,
 	EFFECT_EFF2,
 	EFFECT_EFF3
-} snd_ymfpci_pcm_type_t;
+};
 
-struct _snd_ymfpci_pcm {
-	ymfpci_t *chip;
-	snd_ymfpci_pcm_type_t type;
-	snd_pcm_substream_t *substream;
-	ymfpci_voice_t *voices[2];	/* playback only */
+struct snd_ymfpci_pcm {
+	struct snd_ymfpci *chip;
+	enum snd_ymfpci_pcm_type type;
+	struct snd_pcm_substream *substream;
+	struct snd_ymfpci_voice *voices[2];	/* playback only */
 	unsigned int running: 1;
 	unsigned int output_front: 1;
 	unsigned int output_rear: 1;
@@ -282,7 +281,7 @@ struct _snd_ymfpci_pcm {
 	u32 shift;
 };
 
-struct _snd_ymfpci {
+struct snd_ymfpci {
 	int irq;
 
 	unsigned int device_id;	/* PCI device ID */
@@ -316,47 +315,47 @@ struct _snd_ymfpci {
 	struct snd_dma_buffer ac3_tmp_base;
 
 	u32 *ctrl_playback;
-	snd_ymfpci_playback_bank_t *bank_playback[YDSXG_PLAYBACK_VOICES][2];
-	snd_ymfpci_capture_bank_t *bank_capture[YDSXG_CAPTURE_VOICES][2];
-	snd_ymfpci_effect_bank_t *bank_effect[YDSXG_EFFECT_VOICES][2];
+	struct snd_ymfpci_playback_bank *bank_playback[YDSXG_PLAYBACK_VOICES][2];
+	struct snd_ymfpci_capture_bank *bank_capture[YDSXG_CAPTURE_VOICES][2];
+	struct snd_ymfpci_effect_bank *bank_effect[YDSXG_EFFECT_VOICES][2];
 
 	int start_count;
 
 	u32 active_bank;
-	ymfpci_voice_t voices[64];
+	struct snd_ymfpci_voice voices[64];
 
-	ac97_bus_t *ac97_bus;
-	ac97_t *ac97;
-	snd_rawmidi_t *rawmidi;
-	snd_timer_t *timer;
+	struct snd_ac97_bus *ac97_bus;
+	struct snd_ac97 *ac97;
+	struct snd_rawmidi *rawmidi;
+	struct snd_timer *timer;
 
 	struct pci_dev *pci;
-	snd_card_t *card;
-	snd_pcm_t *pcm;
-	snd_pcm_t *pcm2;
-	snd_pcm_t *pcm_spdif;
-	snd_pcm_t *pcm_4ch;
-	snd_pcm_substream_t *capture_substream[YDSXG_CAPTURE_VOICES];
-	snd_pcm_substream_t *effect_substream[YDSXG_EFFECT_VOICES];
-	snd_kcontrol_t *ctl_vol_recsrc;
-	snd_kcontrol_t *ctl_vol_adcrec;
-	snd_kcontrol_t *ctl_vol_spdifrec;
+	struct snd_card *card;
+	struct snd_pcm *pcm;
+	struct snd_pcm *pcm2;
+	struct snd_pcm *pcm_spdif;
+	struct snd_pcm *pcm_4ch;
+	struct snd_pcm_substream *capture_substream[YDSXG_CAPTURE_VOICES];
+	struct snd_pcm_substream *effect_substream[YDSXG_EFFECT_VOICES];
+	struct snd_kcontrol *ctl_vol_recsrc;
+	struct snd_kcontrol *ctl_vol_adcrec;
+	struct snd_kcontrol *ctl_vol_spdifrec;
 	unsigned short spdif_bits, spdif_pcm_bits;
-	snd_kcontrol_t *spdif_pcm_ctl;
+	struct snd_kcontrol *spdif_pcm_ctl;
 	int mode_dup4ch;
 	int rear_opened;
 	int spdif_opened;
 	struct {
 		u16 left;
 		u16 right;
-		snd_kcontrol_t *ctl;
+		struct snd_kcontrol *ctl;
 	} pcm_mixer[32];
 
 	spinlock_t reg_lock;
 	spinlock_t voice_lock;
 	wait_queue_head_t interrupt_sleep;
 	atomic_t interrupt_sleep_count;
-	snd_info_entry_t *proc_entry;
+	struct snd_info_entry *proc_entry;
 
 #ifdef CONFIG_PM
 	u32 *saved_regs;
@@ -364,17 +363,17 @@ struct _snd_ymfpci {
 #endif
 };
 
-int snd_ymfpci_create(snd_card_t * card,
+int snd_ymfpci_create(struct snd_card *card,
 		      struct pci_dev *pci,
 		      unsigned short old_legacy_ctrl,
-		      ymfpci_t ** rcodec);
-void snd_ymfpci_free_gameport(ymfpci_t *chip);
-
-int snd_ymfpci_pcm(ymfpci_t *chip, int device, snd_pcm_t **rpcm);
-int snd_ymfpci_pcm2(ymfpci_t *chip, int device, snd_pcm_t **rpcm);
-int snd_ymfpci_pcm_spdif(ymfpci_t *chip, int device, snd_pcm_t **rpcm);
-int snd_ymfpci_pcm_4ch(ymfpci_t *chip, int device, snd_pcm_t **rpcm);
-int snd_ymfpci_mixer(ymfpci_t *chip, int rear_switch);
-int snd_ymfpci_timer(ymfpci_t *chip, int device);
+		      struct snd_ymfpci ** rcodec);
+void snd_ymfpci_free_gameport(struct snd_ymfpci *chip);
+
+int snd_ymfpci_pcm(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
+int snd_ymfpci_pcm2(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
+int snd_ymfpci_pcm_spdif(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
+int snd_ymfpci_pcm_4ch(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
+int snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch);
+int snd_ymfpci_timer(struct snd_ymfpci *chip, int device);
 
 #endif /* __SOUND_YMFPCI_H */
diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c
index d013237205d..42499a94df4 100644
--- a/sound/pci/ymfpci/ymfpci.c
+++ b/sound/pci/ymfpci/ymfpci.c
@@ -80,7 +80,7 @@ static struct pci_device_id snd_ymfpci_ids[] = {
 MODULE_DEVICE_TABLE(pci, snd_ymfpci_ids);
 
 #ifdef SUPPORT_JOYSTICK
-static int __devinit snd_ymfpci_create_gameport(ymfpci_t *chip, int dev,
+static int __devinit snd_ymfpci_create_gameport(struct snd_ymfpci *chip, int dev,
 						int legacy_ctrl, int legacy_ctrl2)
 {
 	struct gameport *gp;
@@ -152,7 +152,7 @@ static int __devinit snd_ymfpci_create_gameport(ymfpci_t *chip, int dev,
 	return 0;
 }
 
-void snd_ymfpci_free_gameport(ymfpci_t *chip)
+void snd_ymfpci_free_gameport(struct snd_ymfpci *chip)
 {
 	if (chip->gameport) {
 		struct resource *r = gameport_get_port_data(chip->gameport);
@@ -164,19 +164,19 @@ void snd_ymfpci_free_gameport(ymfpci_t *chip)
 	}
 }
 #else
-static inline int snd_ymfpci_create_gameport(ymfpci_t *chip, int dev, int l, int l2) { return -ENOSYS; }
-void snd_ymfpci_free_gameport(ymfpci_t *chip) { }
+static inline int snd_ymfpci_create_gameport(struct snd_ymfpci *chip, int dev, int l, int l2) { return -ENOSYS; }
+void snd_ymfpci_free_gameport(struct snd_ymfpci *chip) { }
 #endif /* SUPPORT_JOYSTICK */
 
 static int __devinit snd_card_ymfpci_probe(struct pci_dev *pci,
 					   const struct pci_device_id *pci_id)
 {
 	static int dev;
-	snd_card_t *card;
+	struct snd_card *card;
 	struct resource *fm_res = NULL;
 	struct resource *mpu_res = NULL;
-	ymfpci_t *chip;
-	opl3_t *opl3;
+	struct snd_ymfpci *chip;
+	struct snd_opl3 *opl3;
 	char *str;
 	int err;
 	u16 legacy_ctrl, legacy_ctrl2, old_legacy_ctrl;
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 8229703c80c..62c9f25e8e7 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -50,39 +50,39 @@
  *  common I/O routines
  */
 
-static void snd_ymfpci_irq_wait(ymfpci_t *chip);
+static void snd_ymfpci_irq_wait(struct snd_ymfpci *chip);
 
-static inline u8 snd_ymfpci_readb(ymfpci_t *chip, u32 offset)
+static inline u8 snd_ymfpci_readb(struct snd_ymfpci *chip, u32 offset)
 {
 	return readb(chip->reg_area_virt + offset);
 }
 
-static inline void snd_ymfpci_writeb(ymfpci_t *chip, u32 offset, u8 val)
+static inline void snd_ymfpci_writeb(struct snd_ymfpci *chip, u32 offset, u8 val)
 {
 	writeb(val, chip->reg_area_virt + offset);
 }
 
-static inline u16 snd_ymfpci_readw(ymfpci_t *chip, u32 offset)
+static inline u16 snd_ymfpci_readw(struct snd_ymfpci *chip, u32 offset)
 {
 	return readw(chip->reg_area_virt + offset);
 }
 
-static inline void snd_ymfpci_writew(ymfpci_t *chip, u32 offset, u16 val)
+static inline void snd_ymfpci_writew(struct snd_ymfpci *chip, u32 offset, u16 val)
 {
 	writew(val, chip->reg_area_virt + offset);
 }
 
-static inline u32 snd_ymfpci_readl(ymfpci_t *chip, u32 offset)
+static inline u32 snd_ymfpci_readl(struct snd_ymfpci *chip, u32 offset)
 {
 	return readl(chip->reg_area_virt + offset);
 }
 
-static inline void snd_ymfpci_writel(ymfpci_t *chip, u32 offset, u32 val)
+static inline void snd_ymfpci_writel(struct snd_ymfpci *chip, u32 offset, u32 val)
 {
 	writel(val, chip->reg_area_virt + offset);
 }
 
-static int snd_ymfpci_codec_ready(ymfpci_t *chip, int secondary)
+static int snd_ymfpci_codec_ready(struct snd_ymfpci *chip, int secondary)
 {
 	unsigned long end_time;
 	u32 reg = secondary ? YDSXGR_SECSTATUSADR : YDSXGR_PRISTATUSADR;
@@ -98,9 +98,9 @@ static int snd_ymfpci_codec_ready(ymfpci_t *chip, int secondary)
 	return -EBUSY;
 }
 
-static void snd_ymfpci_codec_write(ac97_t *ac97, u16 reg, u16 val)
+static void snd_ymfpci_codec_write(struct snd_ac97 *ac97, u16 reg, u16 val)
 {
-	ymfpci_t *chip = ac97->private_data;
+	struct snd_ymfpci *chip = ac97->private_data;
 	u32 cmd;
 	
 	snd_ymfpci_codec_ready(chip, 0);
@@ -108,9 +108,9 @@ static void snd_ymfpci_codec_write(ac97_t *ac97, u16 reg, u16 val)
 	snd_ymfpci_writel(chip, YDSXGR_AC97CMDDATA, cmd);
 }
 
-static u16 snd_ymfpci_codec_read(ac97_t *ac97, u16 reg)
+static u16 snd_ymfpci_codec_read(struct snd_ac97 *ac97, u16 reg)
 {
-	ymfpci_t *chip = ac97->private_data;
+	struct snd_ymfpci *chip = ac97->private_data;
 
 	if (snd_ymfpci_codec_ready(chip, 0))
 		return ~0;
@@ -182,7 +182,7 @@ static u32 snd_ymfpci_calc_lpfQ(u32 rate)
  *  Hardware start management
  */
 
-static void snd_ymfpci_hw_start(ymfpci_t *chip)
+static void snd_ymfpci_hw_start(struct snd_ymfpci *chip)
 {
 	unsigned long flags;
 
@@ -196,7 +196,7 @@ static void snd_ymfpci_hw_start(ymfpci_t *chip)
       	spin_unlock_irqrestore(&chip->reg_lock, flags);
 }
 
-static void snd_ymfpci_hw_stop(ymfpci_t *chip)
+static void snd_ymfpci_hw_stop(struct snd_ymfpci *chip)
 {
 	unsigned long flags;
 	long timeout = 1000;
@@ -222,9 +222,11 @@ static void snd_ymfpci_hw_stop(ymfpci_t *chip)
  *  Playback voice management
  */
 
-static int voice_alloc(ymfpci_t *chip, ymfpci_voice_type_t type, int pair, ymfpci_voice_t **rvoice)
+static int voice_alloc(struct snd_ymfpci *chip,
+		       enum snd_ymfpci_voice_type type, int pair,
+		       struct snd_ymfpci_voice **rvoice)
 {
-	ymfpci_voice_t *voice, *voice2;
+	struct snd_ymfpci_voice *voice, *voice2;
 	int idx;
 	
 	*rvoice = NULL;
@@ -258,7 +260,9 @@ static int voice_alloc(ymfpci_t *chip, ymfpci_voice_type_t type, int pair, ymfpc
 	return -ENOMEM;
 }
 
-static int snd_ymfpci_voice_alloc(ymfpci_t *chip, ymfpci_voice_type_t type, int pair, ymfpci_voice_t **rvoice)
+static int snd_ymfpci_voice_alloc(struct snd_ymfpci *chip,
+				  enum snd_ymfpci_voice_type type, int pair,
+				  struct snd_ymfpci_voice **rvoice)
 {
 	unsigned long flags;
 	int result;
@@ -278,7 +282,7 @@ static int snd_ymfpci_voice_alloc(ymfpci_t *chip, ymfpci_voice_type_t type, int
 	return result;		
 }
 
-static int snd_ymfpci_voice_free(ymfpci_t *chip, ymfpci_voice_t *pvoice)
+static int snd_ymfpci_voice_free(struct snd_ymfpci *chip, struct snd_ymfpci_voice *pvoice)
 {
 	unsigned long flags;
 	
@@ -296,9 +300,9 @@ static int snd_ymfpci_voice_free(ymfpci_t *chip, ymfpci_voice_t *pvoice)
  *  PCM part
  */
 
-static void snd_ymfpci_pcm_interrupt(ymfpci_t *chip, ymfpci_voice_t *voice)
+static void snd_ymfpci_pcm_interrupt(struct snd_ymfpci *chip, struct snd_ymfpci_voice *voice)
 {
-	ymfpci_pcm_t *ypcm;
+	struct snd_ymfpci_pcm *ypcm;
 	u32 pos, delta;
 	
 	if ((ypcm = voice->ypcm) == NULL)
@@ -325,7 +329,7 @@ static void snd_ymfpci_pcm_interrupt(ymfpci_t *chip, ymfpci_voice_t *voice)
 		if (unlikely(ypcm->update_pcm_vol)) {
 			unsigned int subs = ypcm->substream->number;
 			unsigned int next_bank = 1 - chip->active_bank;
-			snd_ymfpci_playback_bank_t *bank;
+			struct snd_ymfpci_playback_bank *bank;
 			u32 volume;
 			
 			bank = &voice->bank[next_bank];
@@ -345,11 +349,11 @@ static void snd_ymfpci_pcm_interrupt(ymfpci_t *chip, ymfpci_voice_t *voice)
 	spin_unlock(&chip->reg_lock);
 }
 
-static void snd_ymfpci_pcm_capture_interrupt(snd_pcm_substream_t *substream)
+static void snd_ymfpci_pcm_capture_interrupt(struct snd_pcm_substream *substream)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	ymfpci_pcm_t *ypcm = runtime->private_data;
-	ymfpci_t *chip = ypcm->chip;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_ymfpci_pcm *ypcm = runtime->private_data;
+	struct snd_ymfpci *chip = ypcm->chip;
 	u32 pos, delta;
 	
 	spin_lock(&chip->reg_lock);
@@ -372,11 +376,11 @@ static void snd_ymfpci_pcm_capture_interrupt(snd_pcm_substream_t *substream)
 	spin_unlock(&chip->reg_lock);
 }
 
-static int snd_ymfpci_playback_trigger(snd_pcm_substream_t * substream,
+static int snd_ymfpci_playback_trigger(struct snd_pcm_substream *substream,
 				       int cmd)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	ymfpci_pcm_t *ypcm = substream->runtime->private_data;
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_ymfpci_pcm *ypcm = substream->runtime->private_data;
 	int result = 0;
 
 	spin_lock(&chip->reg_lock);
@@ -409,11 +413,11 @@ static int snd_ymfpci_playback_trigger(snd_pcm_substream_t * substream,
 	spin_unlock(&chip->reg_lock);
 	return result;
 }
-static int snd_ymfpci_capture_trigger(snd_pcm_substream_t * substream,
+static int snd_ymfpci_capture_trigger(struct snd_pcm_substream *substream,
 				      int cmd)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	ymfpci_pcm_t *ypcm = substream->runtime->private_data;
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_ymfpci_pcm *ypcm = substream->runtime->private_data;
 	int result = 0;
 	u32 tmp;
 
@@ -441,7 +445,7 @@ static int snd_ymfpci_capture_trigger(snd_pcm_substream_t * substream,
 	return result;
 }
 
-static int snd_ymfpci_pcm_voice_alloc(ymfpci_pcm_t *ypcm, int voices)
+static int snd_ymfpci_pcm_voice_alloc(struct snd_ymfpci_pcm *ypcm, int voices)
 {
 	int err;
 
@@ -471,16 +475,16 @@ static int snd_ymfpci_pcm_voice_alloc(ymfpci_pcm_t *ypcm, int voices)
 	return 0;
 }
 
-static void snd_ymfpci_pcm_init_voice(ymfpci_pcm_t *ypcm, unsigned int voiceidx,
-				      snd_pcm_runtime_t *runtime,
+static void snd_ymfpci_pcm_init_voice(struct snd_ymfpci_pcm *ypcm, unsigned int voiceidx,
+				      struct snd_pcm_runtime *runtime,
 				      int has_pcm_volume)
 {
-	ymfpci_voice_t *voice = ypcm->voices[voiceidx];
+	struct snd_ymfpci_voice *voice = ypcm->voices[voiceidx];
 	u32 format;
 	u32 delta = snd_ymfpci_calc_delta(runtime->rate);
 	u32 lpfQ = snd_ymfpci_calc_lpfQ(runtime->rate);
 	u32 lpfK = snd_ymfpci_calc_lpfK(runtime->rate);
-	snd_ymfpci_playback_bank_t *bank;
+	struct snd_ymfpci_playback_bank *bank;
 	unsigned int nbank;
 	u32 vol_left, vol_right;
 	u8 use_left, use_right;
@@ -544,7 +548,7 @@ static void snd_ymfpci_pcm_init_voice(ymfpci_pcm_t *ypcm, unsigned int voiceidx,
 	}
 }
 
-static int __devinit snd_ymfpci_ac3_init(ymfpci_t *chip)
+static int __devinit snd_ymfpci_ac3_init(struct snd_ymfpci *chip)
 {
 	if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
 				4096, &chip->ac3_tmp_base) < 0)
@@ -566,7 +570,7 @@ static int __devinit snd_ymfpci_ac3_init(ymfpci_t *chip)
 	return 0;
 }
 
-static int snd_ymfpci_ac3_done(ymfpci_t *chip)
+static int snd_ymfpci_ac3_done(struct snd_ymfpci *chip)
 {
 	spin_lock_irq(&chip->reg_lock);
 	snd_ymfpci_writel(chip, YDSXGR_MAPOFEFFECT,
@@ -580,11 +584,11 @@ static int snd_ymfpci_ac3_done(ymfpci_t *chip)
 	return 0;
 }
 
-static int snd_ymfpci_playback_hw_params(snd_pcm_substream_t * substream,
-					 snd_pcm_hw_params_t * hw_params)
+static int snd_ymfpci_playback_hw_params(struct snd_pcm_substream *substream,
+					 struct snd_pcm_hw_params *hw_params)
 {
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	ymfpci_pcm_t *ypcm = runtime->private_data;
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_ymfpci_pcm *ypcm = runtime->private_data;
 	int err;
 
 	if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0)
@@ -594,11 +598,11 @@ static int snd_ymfpci_playback_hw_params(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_ymfpci_playback_hw_free(snd_pcm_substream_t * substream)
+static int snd_ymfpci_playback_hw_free(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	ymfpci_pcm_t *ypcm;
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_ymfpci_pcm *ypcm;
 	
 	if (runtime->private_data == NULL)
 		return 0;
@@ -618,11 +622,11 @@ static int snd_ymfpci_playback_hw_free(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_ymfpci_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_ymfpci_playback_prepare(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	ymfpci_pcm_t *ypcm = runtime->private_data;
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_ymfpci_pcm *ypcm = runtime->private_data;
 	unsigned int nvoice;
 
 	ypcm->period_size = runtime->period_size;
@@ -635,27 +639,27 @@ static int snd_ymfpci_playback_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_ymfpci_capture_hw_params(snd_pcm_substream_t * substream,
-					snd_pcm_hw_params_t * hw_params)
+static int snd_ymfpci_capture_hw_params(struct snd_pcm_substream *substream,
+					struct snd_pcm_hw_params *hw_params)
 {
 	return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
 }
 
-static int snd_ymfpci_capture_hw_free(snd_pcm_substream_t * substream)
+static int snd_ymfpci_capture_hw_free(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
 
 	/* wait, until the PCI operations are not finished */
 	snd_ymfpci_irq_wait(chip);
 	return snd_pcm_lib_free_pages(substream);
 }
 
-static int snd_ymfpci_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_ymfpci_capture_prepare(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	ymfpci_pcm_t *ypcm = runtime->private_data;
-	snd_ymfpci_capture_bank_t * bank;
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_ymfpci_pcm *ypcm = runtime->private_data;
+	struct snd_ymfpci_capture_bank * bank;
 	int nbank;
 	u32 rate, format;
 
@@ -694,30 +698,30 @@ static int snd_ymfpci_capture_prepare(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static snd_pcm_uframes_t snd_ymfpci_playback_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_ymfpci_playback_pointer(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	ymfpci_pcm_t *ypcm = runtime->private_data;
-	ymfpci_voice_t *voice = ypcm->voices[0];
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_ymfpci_pcm *ypcm = runtime->private_data;
+	struct snd_ymfpci_voice *voice = ypcm->voices[0];
 
 	if (!(ypcm->running && voice))
 		return 0;
 	return le32_to_cpu(voice->bank[chip->active_bank].start);
 }
 
-static snd_pcm_uframes_t snd_ymfpci_capture_pointer(snd_pcm_substream_t * substream)
+static snd_pcm_uframes_t snd_ymfpci_capture_pointer(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	ymfpci_pcm_t *ypcm = runtime->private_data;
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_ymfpci_pcm *ypcm = runtime->private_data;
 
 	if (!ypcm->running)
 		return 0;
 	return le32_to_cpu(chip->bank_capture[ypcm->capture_bank_number][chip->active_bank]->start) >> ypcm->shift;
 }
 
-static void snd_ymfpci_irq_wait(ymfpci_t *chip)
+static void snd_ymfpci_irq_wait(struct snd_ymfpci *chip)
 {
 	wait_queue_t wait;
 	int loops = 4;
@@ -735,9 +739,9 @@ static void snd_ymfpci_irq_wait(ymfpci_t *chip)
 
 static irqreturn_t snd_ymfpci_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	ymfpci_t *chip = dev_id;
+	struct snd_ymfpci *chip = dev_id;
 	u32 status, nvoice, mode;
-	ymfpci_voice_t *voice;
+	struct snd_ymfpci_voice *voice;
 
 	status = snd_ymfpci_readl(chip, YDSXGR_STATUS);
 	if (status & 0x80000000) {
@@ -783,7 +787,7 @@ static irqreturn_t snd_ymfpci_interrupt(int irq, void *dev_id, struct pt_regs *r
 	return IRQ_HANDLED;
 }
 
-static snd_pcm_hardware_t snd_ymfpci_playback =
+static struct snd_pcm_hardware snd_ymfpci_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP |
 				 SNDRV_PCM_INFO_MMAP_VALID | 
@@ -805,7 +809,7 @@ static snd_pcm_hardware_t snd_ymfpci_playback =
 	.fifo_size =		0,
 };
 
-static snd_pcm_hardware_t snd_ymfpci_capture =
+static struct snd_pcm_hardware snd_ymfpci_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP |
 				 SNDRV_PCM_INFO_MMAP_VALID |
@@ -827,16 +831,16 @@ static snd_pcm_hardware_t snd_ymfpci_capture =
 	.fifo_size =		0,
 };
 
-static void snd_ymfpci_pcm_free_substream(snd_pcm_runtime_t *runtime)
+static void snd_ymfpci_pcm_free_substream(struct snd_pcm_runtime *runtime)
 {
 	kfree(runtime->private_data);
 }
 
-static int snd_ymfpci_playback_open_1(snd_pcm_substream_t * substream)
+static int snd_ymfpci_playback_open_1(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	ymfpci_pcm_t *ypcm;
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_ymfpci_pcm *ypcm;
 
 	ypcm = kzalloc(sizeof(*ypcm), GFP_KERNEL);
 	if (ypcm == NULL)
@@ -853,7 +857,7 @@ static int snd_ymfpci_playback_open_1(snd_pcm_substream_t * substream)
 }
 
 /* call with spinlock held */
-static void ymfpci_open_extension(ymfpci_t *chip)
+static void ymfpci_open_extension(struct snd_ymfpci *chip)
 {
 	if (! chip->rear_opened) {
 		if (! chip->spdif_opened) /* set AC3 */
@@ -866,7 +870,7 @@ static void ymfpci_open_extension(ymfpci_t *chip)
 }
 
 /* call with spinlock held */
-static void ymfpci_close_extension(ymfpci_t *chip)
+static void ymfpci_close_extension(struct snd_ymfpci *chip)
 {
 	if (! chip->rear_opened) {
 		if (! chip->spdif_opened)
@@ -877,12 +881,12 @@ static void ymfpci_close_extension(ymfpci_t *chip)
 	}
 }
 
-static int snd_ymfpci_playback_open(snd_pcm_substream_t * substream)
+static int snd_ymfpci_playback_open(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	ymfpci_pcm_t *ypcm;
-	snd_kcontrol_t *kctl;
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_ymfpci_pcm *ypcm;
+	struct snd_kcontrol *kctl;
 	int err;
 	
 	if ((err = snd_ymfpci_playback_open_1(substream)) < 0)
@@ -903,11 +907,11 @@ static int snd_ymfpci_playback_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_ymfpci_playback_spdif_open(snd_pcm_substream_t * substream)
+static int snd_ymfpci_playback_spdif_open(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	ymfpci_pcm_t *ypcm;
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_ymfpci_pcm *ypcm;
 	int err;
 	
 	if ((err = snd_ymfpci_playback_open_1(substream)) < 0)
@@ -930,11 +934,11 @@ static int snd_ymfpci_playback_spdif_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_ymfpci_playback_4ch_open(snd_pcm_substream_t * substream)
+static int snd_ymfpci_playback_4ch_open(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	ymfpci_pcm_t *ypcm;
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_ymfpci_pcm *ypcm;
 	int err;
 	
 	if ((err = snd_ymfpci_playback_open_1(substream)) < 0)
@@ -949,12 +953,12 @@ static int snd_ymfpci_playback_4ch_open(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static int snd_ymfpci_capture_open(snd_pcm_substream_t * substream,
+static int snd_ymfpci_capture_open(struct snd_pcm_substream *substream,
 				   u32 capture_bank_number)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	ymfpci_pcm_t *ypcm;
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_ymfpci_pcm *ypcm;
 
 	ypcm = kzalloc(sizeof(*ypcm), GFP_KERNEL);
 	if (ypcm == NULL)
@@ -973,26 +977,26 @@ static int snd_ymfpci_capture_open(snd_pcm_substream_t * substream,
 	return 0;
 }
 
-static int snd_ymfpci_capture_rec_open(snd_pcm_substream_t * substream)
+static int snd_ymfpci_capture_rec_open(struct snd_pcm_substream *substream)
 {
 	return snd_ymfpci_capture_open(substream, 0);
 }
 
-static int snd_ymfpci_capture_ac97_open(snd_pcm_substream_t * substream)
+static int snd_ymfpci_capture_ac97_open(struct snd_pcm_substream *substream)
 {
 	return snd_ymfpci_capture_open(substream, 1);
 }
 
-static int snd_ymfpci_playback_close_1(snd_pcm_substream_t * substream)
+static int snd_ymfpci_playback_close_1(struct snd_pcm_substream *substream)
 {
 	return 0;
 }
 
-static int snd_ymfpci_playback_close(snd_pcm_substream_t * substream)
+static int snd_ymfpci_playback_close(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	ymfpci_pcm_t *ypcm = substream->runtime->private_data;
-	snd_kcontrol_t *kctl;
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_ymfpci_pcm *ypcm = substream->runtime->private_data;
+	struct snd_kcontrol *kctl;
 
 	spin_lock_irq(&chip->reg_lock);
 	if (ypcm->output_rear && chip->rear_opened > 0) {
@@ -1006,9 +1010,9 @@ static int snd_ymfpci_playback_close(snd_pcm_substream_t * substream)
 	return snd_ymfpci_playback_close_1(substream);
 }
 
-static int snd_ymfpci_playback_spdif_close(snd_pcm_substream_t * substream)
+static int snd_ymfpci_playback_spdif_close(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
 
 	spin_lock_irq(&chip->reg_lock);
 	chip->spdif_opened = 0;
@@ -1023,9 +1027,9 @@ static int snd_ymfpci_playback_spdif_close(snd_pcm_substream_t * substream)
 	return snd_ymfpci_playback_close_1(substream);
 }
 
-static int snd_ymfpci_playback_4ch_close(snd_pcm_substream_t * substream)
+static int snd_ymfpci_playback_4ch_close(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
 
 	spin_lock_irq(&chip->reg_lock);
 	if (chip->rear_opened > 0) {
@@ -1036,11 +1040,11 @@ static int snd_ymfpci_playback_4ch_close(snd_pcm_substream_t * substream)
 	return snd_ymfpci_playback_close_1(substream);
 }
 
-static int snd_ymfpci_capture_close(snd_pcm_substream_t * substream)
+static int snd_ymfpci_capture_close(struct snd_pcm_substream *substream)
 {
-	ymfpci_t *chip = snd_pcm_substream_chip(substream);
-	snd_pcm_runtime_t *runtime = substream->runtime;
-	ymfpci_pcm_t *ypcm = runtime->private_data;
+	struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
+	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct snd_ymfpci_pcm *ypcm = runtime->private_data;
 
 	if (ypcm != NULL) {
 		chip->capture_substream[ypcm->capture_bank_number] = NULL;
@@ -1049,7 +1053,7 @@ static int snd_ymfpci_capture_close(snd_pcm_substream_t * substream)
 	return 0;
 }
 
-static snd_pcm_ops_t snd_ymfpci_playback_ops = {
+static struct snd_pcm_ops snd_ymfpci_playback_ops = {
 	.open =			snd_ymfpci_playback_open,
 	.close =		snd_ymfpci_playback_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1060,7 +1064,7 @@ static snd_pcm_ops_t snd_ymfpci_playback_ops = {
 	.pointer =		snd_ymfpci_playback_pointer,
 };
 
-static snd_pcm_ops_t snd_ymfpci_capture_rec_ops = {
+static struct snd_pcm_ops snd_ymfpci_capture_rec_ops = {
 	.open =			snd_ymfpci_capture_rec_open,
 	.close =		snd_ymfpci_capture_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1071,9 +1075,9 @@ static snd_pcm_ops_t snd_ymfpci_capture_rec_ops = {
 	.pointer =		snd_ymfpci_capture_pointer,
 };
 
-int __devinit snd_ymfpci_pcm(ymfpci_t *chip, int device, snd_pcm_t ** rpcm)
+int __devinit snd_ymfpci_pcm(struct snd_ymfpci *chip, int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if (rpcm)
@@ -1098,7 +1102,7 @@ int __devinit snd_ymfpci_pcm(ymfpci_t *chip, int device, snd_pcm_t ** rpcm)
 	return 0;
 }
 
-static snd_pcm_ops_t snd_ymfpci_capture_ac97_ops = {
+static struct snd_pcm_ops snd_ymfpci_capture_ac97_ops = {
 	.open =			snd_ymfpci_capture_ac97_open,
 	.close =		snd_ymfpci_capture_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1109,9 +1113,9 @@ static snd_pcm_ops_t snd_ymfpci_capture_ac97_ops = {
 	.pointer =		snd_ymfpci_capture_pointer,
 };
 
-int __devinit snd_ymfpci_pcm2(ymfpci_t *chip, int device, snd_pcm_t ** rpcm)
+int __devinit snd_ymfpci_pcm2(struct snd_ymfpci *chip, int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if (rpcm)
@@ -1136,7 +1140,7 @@ int __devinit snd_ymfpci_pcm2(ymfpci_t *chip, int device, snd_pcm_t ** rpcm)
 	return 0;
 }
 
-static snd_pcm_ops_t snd_ymfpci_playback_spdif_ops = {
+static struct snd_pcm_ops snd_ymfpci_playback_spdif_ops = {
 	.open =			snd_ymfpci_playback_spdif_open,
 	.close =		snd_ymfpci_playback_spdif_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1147,9 +1151,9 @@ static snd_pcm_ops_t snd_ymfpci_playback_spdif_ops = {
 	.pointer =		snd_ymfpci_playback_pointer,
 };
 
-int __devinit snd_ymfpci_pcm_spdif(ymfpci_t *chip, int device, snd_pcm_t ** rpcm)
+int __devinit snd_ymfpci_pcm_spdif(struct snd_ymfpci *chip, int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if (rpcm)
@@ -1173,7 +1177,7 @@ int __devinit snd_ymfpci_pcm_spdif(ymfpci_t *chip, int device, snd_pcm_t ** rpcm
 	return 0;
 }
 
-static snd_pcm_ops_t snd_ymfpci_playback_4ch_ops = {
+static struct snd_pcm_ops snd_ymfpci_playback_4ch_ops = {
 	.open =			snd_ymfpci_playback_4ch_open,
 	.close =		snd_ymfpci_playback_4ch_close,
 	.ioctl =		snd_pcm_lib_ioctl,
@@ -1184,9 +1188,9 @@ static snd_pcm_ops_t snd_ymfpci_playback_4ch_ops = {
 	.pointer =		snd_ymfpci_playback_pointer,
 };
 
-int __devinit snd_ymfpci_pcm_4ch(ymfpci_t *chip, int device, snd_pcm_t ** rpcm)
+int __devinit snd_ymfpci_pcm_4ch(struct snd_ymfpci *chip, int device, struct snd_pcm ** rpcm)
 {
-	snd_pcm_t *pcm;
+	struct snd_pcm *pcm;
 	int err;
 
 	if (rpcm)
@@ -1210,17 +1214,17 @@ int __devinit snd_ymfpci_pcm_4ch(ymfpci_t *chip, int device, snd_pcm_t ** rpcm)
 	return 0;
 }
 
-static int snd_ymfpci_spdif_default_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ymfpci_spdif_default_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_ymfpci_spdif_default_get(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_ymfpci_spdif_default_get(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 
 	spin_lock_irq(&chip->reg_lock);
 	ucontrol->value.iec958.status[0] = (chip->spdif_bits >> 0) & 0xff;
@@ -1229,10 +1233,10 @@ static int snd_ymfpci_spdif_default_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_ymfpci_spdif_default_put(snd_kcontrol_t * kcontrol,
-					 snd_ctl_elem_value_t * ucontrol)
+static int snd_ymfpci_spdif_default_put(struct snd_kcontrol *kcontrol,
+					 struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	unsigned int val;
 	int change;
 
@@ -1247,7 +1251,7 @@ static int snd_ymfpci_spdif_default_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_ymfpci_spdif_default __devinitdata =
+static struct snd_kcontrol_new snd_ymfpci_spdif_default __devinitdata =
 {
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
 	.name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
@@ -1256,17 +1260,17 @@ static snd_kcontrol_new_t snd_ymfpci_spdif_default __devinitdata =
 	.put =		snd_ymfpci_spdif_default_put
 };
 
-static int snd_ymfpci_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ymfpci_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_ymfpci_spdif_mask_get(snd_kcontrol_t * kcontrol,
-				      snd_ctl_elem_value_t * ucontrol)
+static int snd_ymfpci_spdif_mask_get(struct snd_kcontrol *kcontrol,
+				      struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 
 	spin_lock_irq(&chip->reg_lock);
 	ucontrol->value.iec958.status[0] = 0x3e;
@@ -1275,7 +1279,7 @@ static int snd_ymfpci_spdif_mask_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static snd_kcontrol_new_t snd_ymfpci_spdif_mask __devinitdata =
+static struct snd_kcontrol_new snd_ymfpci_spdif_mask __devinitdata =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READ,
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
@@ -1284,17 +1288,17 @@ static snd_kcontrol_new_t snd_ymfpci_spdif_mask __devinitdata =
 	.get =		snd_ymfpci_spdif_mask_get,
 };
 
-static int snd_ymfpci_spdif_stream_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ymfpci_spdif_stream_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
 	uinfo->count = 1;
 	return 0;
 }
 
-static int snd_ymfpci_spdif_stream_get(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_ymfpci_spdif_stream_get(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 
 	spin_lock_irq(&chip->reg_lock);
 	ucontrol->value.iec958.status[0] = (chip->spdif_pcm_bits >> 0) & 0xff;
@@ -1303,10 +1307,10 @@ static int snd_ymfpci_spdif_stream_get(snd_kcontrol_t * kcontrol,
 	return 0;
 }
 
-static int snd_ymfpci_spdif_stream_put(snd_kcontrol_t * kcontrol,
-					snd_ctl_elem_value_t * ucontrol)
+static int snd_ymfpci_spdif_stream_put(struct snd_kcontrol *kcontrol,
+					struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	unsigned int val;
 	int change;
 
@@ -1321,7 +1325,7 @@ static int snd_ymfpci_spdif_stream_put(snd_kcontrol_t * kcontrol,
 	return change;
 }
 
-static snd_kcontrol_new_t snd_ymfpci_spdif_stream __devinitdata =
+static struct snd_kcontrol_new snd_ymfpci_spdif_stream __devinitdata =
 {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE,
 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
@@ -1331,7 +1335,7 @@ static snd_kcontrol_new_t snd_ymfpci_spdif_stream __devinitdata =
 	.put =		snd_ymfpci_spdif_stream_put
 };
 
-static int snd_ymfpci_drec_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *info)
+static int snd_ymfpci_drec_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *info)
 {
 	static char *texts[3] = {"AC'97", "IEC958", "ZV Port"};
 
@@ -1344,9 +1348,9 @@ static int snd_ymfpci_drec_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_in
 	return 0;
 }
 
-static int snd_ymfpci_drec_source_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value)
+static int snd_ymfpci_drec_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *value)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	u16 reg;
 
 	spin_lock_irq(&chip->reg_lock);
@@ -1359,9 +1363,9 @@ static int snd_ymfpci_drec_source_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_val
 	return 0;
 }
 
-static int snd_ymfpci_drec_source_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value)
+static int snd_ymfpci_drec_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *value)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	u16 reg, old_reg;
 
 	spin_lock_irq(&chip->reg_lock);
@@ -1375,7 +1379,7 @@ static int snd_ymfpci_drec_source_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_val
 	return reg != old_reg;
 }
 
-static snd_kcontrol_new_t snd_ymfpci_drec_source __devinitdata = {
+static struct snd_kcontrol_new snd_ymfpci_drec_source __devinitdata = {
 	.access =	SNDRV_CTL_ELEM_ACCESS_READWRITE,
 	.iface =	SNDRV_CTL_ELEM_IFACE_MIXER,
 	.name =		"Direct Recording Source",
@@ -1394,8 +1398,8 @@ static snd_kcontrol_new_t snd_ymfpci_drec_source __devinitdata = {
   .get = snd_ymfpci_get_single, .put = snd_ymfpci_put_single, \
   .private_value = ((reg) | ((shift) << 16)) }
 
-static int snd_ymfpci_info_single(snd_kcontrol_t *kcontrol,
-				  snd_ctl_elem_info_t *uinfo)
+static int snd_ymfpci_info_single(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_info *uinfo)
 {
 	int reg = kcontrol->private_value & 0xffff;
 
@@ -1411,10 +1415,10 @@ static int snd_ymfpci_info_single(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ymfpci_get_single(snd_kcontrol_t *kcontrol,
-				 snd_ctl_elem_value_t *ucontrol)
+static int snd_ymfpci_get_single(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value & 0xffff;
 	unsigned int shift = (kcontrol->private_value >> 16) & 0xff;
 	unsigned int mask = 1;
@@ -1429,10 +1433,10 @@ static int snd_ymfpci_get_single(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ymfpci_put_single(snd_kcontrol_t *kcontrol,
-				 snd_ctl_elem_value_t *ucontrol)
+static int snd_ymfpci_put_single(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	int reg = kcontrol->private_value & 0xffff;
 	unsigned int shift = (kcontrol->private_value >> 16) & 0xff;
  	unsigned int mask = 1;
@@ -1461,7 +1465,7 @@ static int snd_ymfpci_put_single(snd_kcontrol_t *kcontrol,
   .get = snd_ymfpci_get_double, .put = snd_ymfpci_put_double, \
   .private_value = reg }
 
-static int snd_ymfpci_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ymfpci_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	unsigned int reg = kcontrol->private_value;
 
@@ -1474,9 +1478,9 @@ static int snd_ymfpci_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_ymfpci_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ymfpci_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	unsigned int reg = kcontrol->private_value;
 	unsigned int shift_left = 0, shift_right = 16, mask = 16383;
 	unsigned int val;
@@ -1491,9 +1495,9 @@ static int snd_ymfpci_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static int snd_ymfpci_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ymfpci_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	unsigned int reg = kcontrol->private_value;
 	unsigned int shift_left = 0, shift_right = 16, mask = 16383;
 	int change;
@@ -1517,7 +1521,7 @@ static int snd_ymfpci_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 /*
  * 4ch duplication
  */
-static int snd_ymfpci_info_dup4ch(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
+static int snd_ymfpci_info_dup4ch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -1526,16 +1530,16 @@ static int snd_ymfpci_info_dup4ch(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_ymfpci_get_dup4ch(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ymfpci_get_dup4ch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	ucontrol->value.integer.value[0] = chip->mode_dup4ch;
 	return 0;
 }
 
-static int snd_ymfpci_put_dup4ch(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
+static int snd_ymfpci_put_dup4ch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	int change;
 	change = (ucontrol->value.integer.value[0] != chip->mode_dup4ch);
 	if (change)
@@ -1544,7 +1548,7 @@ static int snd_ymfpci_put_dup4ch(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
 }
 
 
-static snd_kcontrol_new_t snd_ymfpci_controls[] __devinitdata = {
+static struct snd_kcontrol_new snd_ymfpci_controls[] __devinitdata = {
 YMFPCI_DOUBLE("Wave Playback Volume", 0, YDSXGR_NATIVEDACOUTVOL),
 YMFPCI_DOUBLE("Wave Capture Volume", 0, YDSXGR_NATIVEDACLOOPVOL),
 YMFPCI_DOUBLE("Digital Capture Volume", 0, YDSXGR_NATIVEDACINVOL),
@@ -1575,7 +1579,7 @@ YMFPCI_SINGLE(SNDRV_CTL_NAME_IEC958("Loop",NONE,NONE), 0, YDSXGR_SPDIFINCTRL, 4)
  * GPIO
  */
 
-static int snd_ymfpci_get_gpio_out(ymfpci_t *chip, int pin)
+static int snd_ymfpci_get_gpio_out(struct snd_ymfpci *chip, int pin)
 {
 	u16 reg, mode;
 	unsigned long flags;
@@ -1595,7 +1599,7 @@ static int snd_ymfpci_get_gpio_out(ymfpci_t *chip, int pin)
 	return (mode >> pin) & 1;
 }
 
-static int snd_ymfpci_set_gpio_out(ymfpci_t *chip, int pin, int enable)
+static int snd_ymfpci_set_gpio_out(struct snd_ymfpci *chip, int pin, int enable)
 {
 	u16 reg;
 	unsigned long flags;
@@ -1612,7 +1616,7 @@ static int snd_ymfpci_set_gpio_out(ymfpci_t *chip, int pin, int enable)
 	return 0;
 }
 
-static int snd_ymfpci_gpio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
+static int snd_ymfpci_gpio_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
 	uinfo->count = 1;
@@ -1621,17 +1625,17 @@ static int snd_ymfpci_gpio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
 	return 0;
 }
 
-static int snd_ymfpci_gpio_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_ymfpci_gpio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	int pin = (int)kcontrol->private_value;
 	ucontrol->value.integer.value[0] = snd_ymfpci_get_gpio_out(chip, pin);
 	return 0;
 }
 
-static int snd_ymfpci_gpio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
+static int snd_ymfpci_gpio_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	int pin = (int)kcontrol->private_value;
 
 	if (snd_ymfpci_get_gpio_out(chip, pin) != ucontrol->value.integer.value[0]) {
@@ -1642,7 +1646,7 @@ static int snd_ymfpci_gpio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
 	return 0;
 }
 
-static snd_kcontrol_new_t snd_ymfpci_rear_shared __devinitdata = {
+static struct snd_kcontrol_new snd_ymfpci_rear_shared __devinitdata = {
 	.name = "Shared Rear/Line-In Switch",
 	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 	.info = snd_ymfpci_gpio_sw_info,
@@ -1655,8 +1659,8 @@ static snd_kcontrol_new_t snd_ymfpci_rear_shared __devinitdata = {
  * PCM voice volume
  */
 
-static int snd_ymfpci_pcm_vol_info(snd_kcontrol_t *kcontrol,
-				   snd_ctl_elem_info_t *uinfo)
+static int snd_ymfpci_pcm_vol_info(struct snd_kcontrol *kcontrol,
+				   struct snd_ctl_elem_info *uinfo)
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
@@ -1665,10 +1669,10 @@ static int snd_ymfpci_pcm_vol_info(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ymfpci_pcm_vol_get(snd_kcontrol_t *kcontrol,
-				  snd_ctl_elem_value_t *ucontrol)
+static int snd_ymfpci_pcm_vol_get(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	unsigned int subs = kcontrol->id.subdevice;
 
 	ucontrol->value.integer.value[0] = chip->pcm_mixer[subs].left;
@@ -1676,12 +1680,12 @@ static int snd_ymfpci_pcm_vol_get(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static int snd_ymfpci_pcm_vol_put(snd_kcontrol_t *kcontrol,
-				  snd_ctl_elem_value_t *ucontrol)
+static int snd_ymfpci_pcm_vol_put(struct snd_kcontrol *kcontrol,
+				  struct snd_ctl_elem_value *ucontrol)
 {
-	ymfpci_t *chip = snd_kcontrol_chip(kcontrol);
+	struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol);
 	unsigned int subs = kcontrol->id.subdevice;
-	snd_pcm_substream_t *substream;
+	struct snd_pcm_substream *substream;
 	unsigned long flags;
 
 	if (ucontrol->value.integer.value[0] != chip->pcm_mixer[subs].left ||
@@ -1689,10 +1693,10 @@ static int snd_ymfpci_pcm_vol_put(snd_kcontrol_t *kcontrol,
 		chip->pcm_mixer[subs].left = ucontrol->value.integer.value[0];
 		chip->pcm_mixer[subs].right = ucontrol->value.integer.value[1];
 
-		substream = (snd_pcm_substream_t *)kcontrol->private_value;
+		substream = (struct snd_pcm_substream *)kcontrol->private_value;
 		spin_lock_irqsave(&chip->voice_lock, flags);
 		if (substream->runtime && substream->runtime->private_data) {
-			ymfpci_pcm_t *ypcm = substream->runtime->private_data;
+			struct snd_ymfpci_pcm *ypcm = substream->runtime->private_data;
 			ypcm->update_pcm_vol = 2;
 		}
 		spin_unlock_irqrestore(&chip->voice_lock, flags);
@@ -1701,7 +1705,7 @@ static int snd_ymfpci_pcm_vol_put(snd_kcontrol_t *kcontrol,
 	return 0;
 }
 
-static snd_kcontrol_new_t snd_ymfpci_pcm_volume __devinitdata = {
+static struct snd_kcontrol_new snd_ymfpci_pcm_volume __devinitdata = {
 	.iface = SNDRV_CTL_ELEM_IFACE_PCM,
 	.name = "PCM Playback Volume",
 	.access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
@@ -1716,26 +1720,26 @@ static snd_kcontrol_new_t snd_ymfpci_pcm_volume __devinitdata = {
  *  Mixer routines
  */
 
-static void snd_ymfpci_mixer_free_ac97_bus(ac97_bus_t *bus)
+static void snd_ymfpci_mixer_free_ac97_bus(struct snd_ac97_bus *bus)
 {
-	ymfpci_t *chip = bus->private_data;
+	struct snd_ymfpci *chip = bus->private_data;
 	chip->ac97_bus = NULL;
 }
 
-static void snd_ymfpci_mixer_free_ac97(ac97_t *ac97)
+static void snd_ymfpci_mixer_free_ac97(struct snd_ac97 *ac97)
 {
-	ymfpci_t *chip = ac97->private_data;
+	struct snd_ymfpci *chip = ac97->private_data;
 	chip->ac97 = NULL;
 }
 
-int __devinit snd_ymfpci_mixer(ymfpci_t *chip, int rear_switch)
+int __devinit snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch)
 {
-	ac97_template_t ac97;
-	snd_kcontrol_t *kctl;
-	snd_pcm_substream_t *substream;
+	struct snd_ac97_template ac97;
+	struct snd_kcontrol *kctl;
+	struct snd_pcm_substream *substream;
 	unsigned int idx;
 	int err;
-	static ac97_bus_ops_t ops = {
+	static struct snd_ac97_bus_ops ops = {
 		.write = snd_ymfpci_codec_write,
 		.read = snd_ymfpci_codec_read,
 	};
@@ -1811,9 +1815,9 @@ int __devinit snd_ymfpci_mixer(ymfpci_t *chip, int rear_switch)
  * timer
  */
 
-static int snd_ymfpci_timer_start(snd_timer_t *timer)
+static int snd_ymfpci_timer_start(struct snd_timer *timer)
 {
-	ymfpci_t *chip;
+	struct snd_ymfpci *chip;
 	unsigned long flags;
 	unsigned int count;
 
@@ -1826,9 +1830,9 @@ static int snd_ymfpci_timer_start(snd_timer_t *timer)
 	return 0;
 }
 
-static int snd_ymfpci_timer_stop(snd_timer_t *timer)
+static int snd_ymfpci_timer_stop(struct snd_timer *timer)
 {
-	ymfpci_t *chip;
+	struct snd_ymfpci *chip;
 	unsigned long flags;
 
 	chip = snd_timer_chip(timer);
@@ -1838,7 +1842,7 @@ static int snd_ymfpci_timer_stop(snd_timer_t *timer)
 	return 0;
 }
 
-static int snd_ymfpci_timer_precise_resolution(snd_timer_t *timer,
+static int snd_ymfpci_timer_precise_resolution(struct snd_timer *timer,
 					       unsigned long *num, unsigned long *den)
 {
 	*num = 1;
@@ -1846,7 +1850,7 @@ static int snd_ymfpci_timer_precise_resolution(snd_timer_t *timer,
 	return 0;
 }
 
-static struct _snd_timer_hardware snd_ymfpci_timer_hw = {
+static struct snd_timer_hardware snd_ymfpci_timer_hw = {
 	.flags = SNDRV_TIMER_HW_AUTO,
 	.resolution = 20833, /* 1/fs = 20.8333...us */
 	.ticks = 0x8000,
@@ -1855,10 +1859,10 @@ static struct _snd_timer_hardware snd_ymfpci_timer_hw = {
 	.precise_resolution = snd_ymfpci_timer_precise_resolution,
 };
 
-int __devinit snd_ymfpci_timer(ymfpci_t *chip, int device)
+int __devinit snd_ymfpci_timer(struct snd_ymfpci *chip, int device)
 {
-	snd_timer_t *timer = NULL;
-	snd_timer_id_t tid;
+	struct snd_timer *timer = NULL;
+	struct snd_timer_id tid;
 	int err;
 
 	tid.dev_class = SNDRV_TIMER_CLASS_CARD;
@@ -1880,10 +1884,10 @@ int __devinit snd_ymfpci_timer(ymfpci_t *chip, int device)
  *  proc interface
  */
 
-static void snd_ymfpci_proc_read(snd_info_entry_t *entry, 
-				 snd_info_buffer_t * buffer)
+static void snd_ymfpci_proc_read(struct snd_info_entry *entry, 
+				 struct snd_info_buffer *buffer)
 {
-	ymfpci_t *chip = entry->private_data;
+	struct snd_ymfpci *chip = entry->private_data;
 	int i;
 	
 	snd_iprintf(buffer, "YMFPCI\n\n");
@@ -1891,9 +1895,9 @@ static void snd_ymfpci_proc_read(snd_info_entry_t *entry,
 		snd_iprintf(buffer, "%04x: %04x\n", i, snd_ymfpci_readl(chip, i));
 }
 
-static int __devinit snd_ymfpci_proc_init(snd_card_t * card, ymfpci_t *chip)
+static int __devinit snd_ymfpci_proc_init(struct snd_card *card, struct snd_ymfpci *chip)
 {
-	snd_info_entry_t *entry;
+	struct snd_info_entry *entry;
 	
 	if (! snd_card_proc_new(card, "ymfpci", &entry))
 		snd_info_set_text_ops(entry, chip, 1024, snd_ymfpci_proc_read);
@@ -1922,12 +1926,12 @@ static void snd_ymfpci_aclink_reset(struct pci_dev * pci)
 #endif
 }
 
-static void snd_ymfpci_enable_dsp(ymfpci_t *chip)
+static void snd_ymfpci_enable_dsp(struct snd_ymfpci *chip)
 {
 	snd_ymfpci_writel(chip, YDSXGR_CONFIG, 0x00000001);
 }
 
-static void snd_ymfpci_disable_dsp(ymfpci_t *chip)
+static void snd_ymfpci_disable_dsp(struct snd_ymfpci *chip)
 {
 	u32 val;
 	int timeout = 1000;
@@ -1944,7 +1948,7 @@ static void snd_ymfpci_disable_dsp(ymfpci_t *chip)
 
 #include "ymfpci_image.h"
 
-static void snd_ymfpci_download_image(ymfpci_t *chip)
+static void snd_ymfpci_download_image(struct snd_ymfpci *chip)
 {
 	int i;
 	u16 ctrl;
@@ -1984,7 +1988,7 @@ static void snd_ymfpci_download_image(ymfpci_t *chip)
 	snd_ymfpci_enable_dsp(chip);
 }
 
-static int __devinit snd_ymfpci_memalloc(ymfpci_t *chip)
+static int __devinit snd_ymfpci_memalloc(struct snd_ymfpci *chip)
 {
 	long size, playback_ctrl_size;
 	int voice, bank, reg;
@@ -2019,10 +2023,10 @@ static int __devinit snd_ymfpci_memalloc(ymfpci_t *chip)
 	ptr_addr += (playback_ctrl_size + 0x00ff) & ~0x00ff;
 	for (voice = 0; voice < YDSXG_PLAYBACK_VOICES; voice++) {
 		chip->voices[voice].number = voice;
-		chip->voices[voice].bank = (snd_ymfpci_playback_bank_t *)ptr;
+		chip->voices[voice].bank = (struct snd_ymfpci_playback_bank *)ptr;
 		chip->voices[voice].bank_addr = ptr_addr;
 		for (bank = 0; bank < 2; bank++) {
-			chip->bank_playback[voice][bank] = (snd_ymfpci_playback_bank_t *)ptr;
+			chip->bank_playback[voice][bank] = (struct snd_ymfpci_playback_bank *)ptr;
 			ptr += chip->bank_size_playback;
 			ptr_addr += chip->bank_size_playback;
 		}
@@ -2033,7 +2037,7 @@ static int __devinit snd_ymfpci_memalloc(ymfpci_t *chip)
 	chip->bank_base_capture_addr = ptr_addr;
 	for (voice = 0; voice < YDSXG_CAPTURE_VOICES; voice++)
 		for (bank = 0; bank < 2; bank++) {
-			chip->bank_capture[voice][bank] = (snd_ymfpci_capture_bank_t *)ptr;
+			chip->bank_capture[voice][bank] = (struct snd_ymfpci_capture_bank *)ptr;
 			ptr += chip->bank_size_capture;
 			ptr_addr += chip->bank_size_capture;
 		}
@@ -2043,7 +2047,7 @@ static int __devinit snd_ymfpci_memalloc(ymfpci_t *chip)
 	chip->bank_base_effect_addr = ptr_addr;
 	for (voice = 0; voice < YDSXG_EFFECT_VOICES; voice++)
 		for (bank = 0; bank < 2; bank++) {
-			chip->bank_effect[voice][bank] = (snd_ymfpci_effect_bank_t *)ptr;
+			chip->bank_effect[voice][bank] = (struct snd_ymfpci_effect_bank *)ptr;
 			ptr += chip->bank_size_effect;
 			ptr_addr += chip->bank_size_effect;
 		}
@@ -2082,7 +2086,7 @@ static int __devinit snd_ymfpci_memalloc(ymfpci_t *chip)
 	return 0;
 }
 
-static int snd_ymfpci_free(ymfpci_t *chip)
+static int snd_ymfpci_free(struct snd_ymfpci *chip)
 {
 	u16 ctrl;
 
@@ -2135,9 +2139,9 @@ static int snd_ymfpci_free(ymfpci_t *chip)
 	return 0;
 }
 
-static int snd_ymfpci_dev_free(snd_device_t *device)
+static int snd_ymfpci_dev_free(struct snd_device *device)
 {
-	ymfpci_t *chip = device->device_data;
+	struct snd_ymfpci *chip = device->device_data;
 	return snd_ymfpci_free(chip);
 }
 
@@ -2171,9 +2175,9 @@ static int saved_regs_index[] = {
 };
 #define YDSXGR_NUM_SAVED_REGS	ARRAY_SIZE(saved_regs_index)
 
-static int snd_ymfpci_suspend(snd_card_t *card, pm_message_t state)
+static int snd_ymfpci_suspend(struct snd_card *card, pm_message_t state)
 {
-	ymfpci_t *chip = card->pm_private_data;
+	struct snd_ymfpci *chip = card->pm_private_data;
 	unsigned int i;
 	
 	snd_pcm_suspend_all(chip->pcm);
@@ -2190,9 +2194,9 @@ static int snd_ymfpci_suspend(snd_card_t *card, pm_message_t state)
 	return 0;
 }
 
-static int snd_ymfpci_resume(snd_card_t *card)
+static int snd_ymfpci_resume(struct snd_card *card)
 {
-	ymfpci_t *chip = card->pm_private_data;
+	struct snd_ymfpci *chip = card->pm_private_data;
 	unsigned int i;
 
 	pci_enable_device(chip->pci);
@@ -2218,14 +2222,14 @@ static int snd_ymfpci_resume(snd_card_t *card)
 }
 #endif /* CONFIG_PM */
 
-int __devinit snd_ymfpci_create(snd_card_t * card,
+int __devinit snd_ymfpci_create(struct snd_card *card,
 				struct pci_dev * pci,
 				unsigned short old_legacy_ctrl,
-				ymfpci_t ** rchip)
+				struct snd_ymfpci ** rchip)
 {
-	ymfpci_t *chip;
+	struct snd_ymfpci *chip;
 	int err;
-	static snd_device_ops_t ops = {
+	static struct snd_device_ops ops = {
 		.dev_free =	snd_ymfpci_dev_free,
 	};
 	
-- 
cgit v1.2.3-70-g09d2


From a381a7a66486f11606eccb8866e29848f995278f Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 15:55:49 +0100
Subject: [ALSA] Decentralize PM control

Modules: ALSA Core,Control Midlevel,/oss/Makefile

Remove the centralized PM control in the sound core.
Each driver is responsible to get callbacks from bus/driver now.

SND_GENERIC_DRIVER is removed together with this action.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/core.h |  28 -------
 sound/core/Kconfig   |   4 -
 sound/core/control.c |  44 +----------
 sound/core/init.c    | 205 +--------------------------------------------------
 sound/core/sound.c   |  22 ------
 5 files changed, 3 insertions(+), 300 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/core.h b/include/sound/core.h
index f867433e65f..f00b9c9b567 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -134,14 +134,8 @@ struct snd_card {
 	wait_queue_head_t shutdown_sleep;
 	struct work_struct free_workq;	/* for free in workqueue */
 	struct device *dev;
-#ifdef CONFIG_SND_GENERIC_DRIVER
-	struct snd_generic_device *generic_dev;
-#endif
 
 #ifdef CONFIG_PM
-	int (*pm_suspend)(struct snd_card *card, pm_message_t state);
-	int (*pm_resume)(struct snd_card *card);
-	void *pm_private_data;
 	unsigned int power_state;	/* power state */
 	struct semaphore power_lock;	/* power lock */
 	wait_queue_head_t power_sleep;
@@ -178,22 +172,6 @@ static inline void snd_power_change_state(struct snd_card *card, unsigned int st
 /* init.c */
 int snd_power_wait(struct snd_card *card, unsigned int power_state, struct file *file);
 
-int snd_card_set_pm_callback(struct snd_card *card,
-			     int (*suspend)(struct snd_card *, pm_message_t),
-			     int (*resume)(struct snd_card *),
-			     void *private_data);
-int snd_card_set_generic_pm_callback(struct snd_card *card,
-				     int (*suspend)(struct snd_card *, pm_message_t),
-				     int (*resume)(struct snd_card *),
-				     void *private_data);
-#define snd_card_set_isa_pm_callback(card,suspend,resume,data) \
-	snd_card_set_generic_pm_callback(card, suspend, resume, data)
-struct pci_dev;
-int snd_card_pci_suspend(struct pci_dev *dev, pm_message_t state);
-int snd_card_pci_resume(struct pci_dev *dev);
-#define SND_PCI_PM_CALLBACKS \
-	.suspend = snd_card_pci_suspend,  .resume = snd_card_pci_resume
-
 #else /* ! CONFIG_PM */
 
 #define snd_power_lock(card)		do { (void)(card); } while (0)
@@ -201,10 +179,6 @@ int snd_card_pci_resume(struct pci_dev *dev);
 static inline int snd_power_wait(struct snd_card *card, unsigned int state, struct file *file) { return 0; }
 #define snd_power_get_state(card)	SNDRV_CTL_POWER_D0
 #define snd_power_change_state(card, state)	do { (void)(card); } while (0)
-#define snd_card_set_pm_callback(card,suspend,resume,data)
-#define snd_card_set_generic_pm_callback(card,suspend,resume,data)
-#define snd_card_set_isa_pm_callback(card,suspend,resume,data)
-#define SND_PCI_PM_CALLBACKS
 
 #endif /* CONFIG_PM */
 
@@ -280,8 +254,6 @@ int snd_card_file_remove(struct snd_card *card, struct file *file);
 #ifndef snd_card_set_dev
 #define snd_card_set_dev(card,devptr) ((card)->dev = (devptr))
 #endif
-/* register a generic device (for ISA, etc) */
-int snd_card_set_generic_dev(struct snd_card *card);
 
 /* device.c */
 
diff --git a/sound/core/Kconfig b/sound/core/Kconfig
index 82718836f93..b46efff2e4c 100644
--- a/sound/core/Kconfig
+++ b/sound/core/Kconfig
@@ -133,7 +133,3 @@ config SND_DEBUG_DETECT
 	help
 	  Say Y here to enable extra-verbose log messages printed when
 	  detecting devices.
-
-config SND_GENERIC_DRIVER
-	bool
-	depends on SND
diff --git a/sound/core/control.c b/sound/core/control.c
index 1a14338bd51..03ae9bb7d38 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -1023,36 +1023,6 @@ static int snd_ctl_subscribe_events(struct snd_ctl_file *file, int __user *ptr)
 	return 0;
 }
 
-#ifdef CONFIG_PM
-/*
- * change the power state
- */
-static int snd_ctl_set_power_state(struct snd_card *card, unsigned int power_state)
-{
-	switch (power_state) {
-	case SNDRV_CTL_POWER_D0:
-		if (card->power_state != power_state) {
-			card->pm_resume(card);
-			snd_power_change_state(card, power_state);
-		}
-		break;
-	case SNDRV_CTL_POWER_D3hot:
-		if (card->power_state != power_state) {
-			card->pm_suspend(card, PMSG_SUSPEND);
-			snd_power_change_state(card, power_state);
-		}
-		break;
-	case SNDRV_CTL_POWER_D1:
-	case SNDRV_CTL_POWER_D2:
-	case SNDRV_CTL_POWER_D3cold:
-		/* not supported yet */
-	default:
-		return -EINVAL;
-	}
-	return 0;
-}
-#endif
-
 static long snd_ctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
 	struct snd_ctl_file *ctl;
@@ -1092,19 +1062,7 @@ static long snd_ctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg
 	case SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS:
 		return snd_ctl_subscribe_events(ctl, ip);
 	case SNDRV_CTL_IOCTL_POWER:
-		if (get_user(err, ip))
-			return -EFAULT;
-		if (!capable(CAP_SYS_ADMIN))
-			return -EPERM;
-#ifdef CONFIG_PM
-		if (card->pm_suspend && card->pm_resume) {
-			snd_power_lock(card);
-			err = snd_ctl_set_power_state(card, err);
-			snd_power_unlock(card);
-		} else
-#endif
-			err = -ENOPROTOOPT;
-		return err;
+		return -ENOPROTOOPT;
 	case SNDRV_CTL_IOCTL_POWER_STATE:
 #ifdef CONFIG_PM
 		return put_user(card->power_state, ip) ? -EFAULT : 0;
diff --git a/sound/core/init.c b/sound/core/init.c
index dca64d199cb..728bb2ce0bc 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -28,7 +28,6 @@
 #include <linux/ctype.h>
 #include <linux/pci.h>
 #include <linux/pm.h>
-#include <linux/platform_device.h>
 
 #include <sound/core.h>
 #include <sound/control.h>
@@ -229,12 +228,6 @@ int snd_card_disconnect(struct snd_card *card)
 	return 0;	
 }
 
-#ifdef CONFIG_SND_GENERIC_DRIVER
-static void snd_generic_device_unregister(struct snd_card *card);
-#else
-#define snd_generic_device_unregister(x) /*NOP*/
-#endif
-
 /**
  *  snd_card_free - frees given soundcard structure
  *  @card: soundcard structure
@@ -286,7 +279,6 @@ int snd_card_free(struct snd_card *card)
 		snd_printk(KERN_WARNING "unable to free card info\n");
 		/* Not fatal error */
 	}
-	snd_generic_device_unregister(card);
 	while (card->s_f_ops) {
 		s_f_ops = card->s_f_ops;
 		card->s_f_ops = s_f_ops->next;
@@ -459,7 +451,8 @@ int snd_card_register(struct snd_card *card)
 
 static struct snd_info_entry *snd_card_info_entry = NULL;
 
-static void snd_card_info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
+static void snd_card_info_read(struct snd_info_entry *entry,
+			       struct snd_info_buffer *buffer)
 {
 	int idx, count;
 	struct snd_card *card;
@@ -666,97 +659,6 @@ int snd_card_file_remove(struct snd_card *card, struct file *file)
 	return 0;
 }
 
-#ifdef CONFIG_SND_GENERIC_DRIVER
-/*
- * generic device without a proper bus using platform_device
- * (e.g. ISA)
- */
-struct snd_generic_device {
-	struct platform_device pdev;
-	struct snd_card *card;
-};
-
-#define get_snd_generic_card(dev)	container_of(dev, struct snd_generic_device, pdev)->card
-
-#define SND_GENERIC_NAME	"snd_generic"
-
-#ifdef CONFIG_PM
-static int snd_generic_suspend(struct platform_device *dev, pm_message_t state);
-static int snd_generic_resume(struct platform_device *dev);
-#endif
-
-/* initialized in sound.c */
-struct platform_driver snd_generic_driver = {
-#ifdef CONFIG_PM
-	.suspend	= snd_generic_suspend,
-	.resume		= snd_generic_resume,
-#endif
-	.driver		= {
-		.name	= SND_GENERIC_NAME,
-	},
-};
-
-void snd_generic_device_release(struct device *dev)
-{
-}
-
-static int snd_generic_device_register(struct snd_card *card)
-{
-	struct snd_generic_device *dev;
-	int err;
-
-	if (card->generic_dev)
-		return 0; /* already registered */
-
-	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
-	if (! dev) {
-		snd_printk(KERN_ERR "can't allocate generic_device\n");
-		return -ENOMEM;
-	}
-
-	dev->pdev.name = SND_GENERIC_NAME;
-	dev->pdev.id = card->number;
-	dev->pdev.dev.release = snd_generic_device_release;
-	dev->card = card;
-	if ((err = platform_device_register(&dev->pdev)) < 0) {
-		kfree(dev);
-		return err;
-	}
-	card->generic_dev = dev;
-	return 0;
-}
-
-static void snd_generic_device_unregister(struct snd_card *card)
-{
-	struct snd_generic_device *dev = card->generic_dev;
-	if (dev) {
-		platform_device_unregister(&dev->pdev);
-		kfree(dev);
-		card->generic_dev = NULL;
-	}
-}
-
-/**
- * snd_card_set_generic_dev - assign the generic device to the card
- * @card: soundcard structure
- *
- * Assigns a generic device to the card.  This function is provided as the
- * last resort, for devices without any proper bus.  Thus this won't override
- * the device already assigned to the card.
- * 
- * Returns zero if successful, or a negative error code.
- */
-int snd_card_set_generic_dev(struct snd_card *card)
-{
-	int err;
-	if ((err = snd_generic_device_register(card)) < 0)
-		return err;
-	if (! card->dev)
-		snd_card_set_dev(card, &card->generic_dev->pdev.dev);
-	return 0;
-}
-#endif /* CONFIG_SND_GENERIC_DRIVER */
-
 #ifdef CONFIG_PM
 /**
  *  snd_power_wait - wait until the power-state is changed.
@@ -800,107 +702,4 @@ int snd_power_wait(struct snd_card *card, unsigned int power_state, struct file
 	return result;
 }
 
-/**
- * snd_card_set_pm_callback - set the PCI power-management callbacks
- * @card: soundcard structure
- * @suspend: suspend callback function
- * @resume: resume callback function
- * @private_data: private data to pass to the callback functions
- *
- * Sets the power-management callback functions of the card.
- * These callbacks are called from ALSA's common PCI suspend/resume
- * handler and from the control API.
- */
-int snd_card_set_pm_callback(struct snd_card *card,
-			     int (*suspend)(struct snd_card *, pm_message_t),
-			     int (*resume)(struct snd_card *),
-			     void *private_data)
-{
-	card->pm_suspend = suspend;
-	card->pm_resume = resume;
-	card->pm_private_data = private_data;
-	return 0;
-}
-
-#ifdef CONFIG_SND_GENERIC_DRIVER
-/* suspend/resume callbacks for snd_generic platform device */
-static int snd_generic_suspend(struct platform_device *dev, pm_message_t state)
-{
-	struct snd_card *card;
-
-	card = get_snd_generic_card(dev);
-	if (card->power_state == SNDRV_CTL_POWER_D3hot)
-		return 0;
-	if (card->pm_suspend)
-		card->pm_suspend(card, PMSG_SUSPEND);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
-	return 0;
-}
-
-static int snd_generic_resume(struct platform_device *dev)
-{
-	struct snd_card *card;
-
-	card = get_snd_generic_card(dev);
-	if (card->power_state == SNDRV_CTL_POWER_D0)
-		return 0;
-	if (card->pm_resume)
-		card->pm_resume(card);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
-	return 0;
-}
-
-/**
- * snd_card_set_generic_pm_callback - set the generic power-management callbacks
- * @card: soundcard structure
- * @suspend: suspend callback function
- * @resume: resume callback function
- * @private_data: private data to pass to the callback functions
- *
- * Registers the power-management and sets the lowlevel callbacks for
- * the given card.  These callbacks are called from the ALSA's common
- * PM handler and from the control API.
- */
-int snd_card_set_generic_pm_callback(struct snd_card *card,
-				 int (*suspend)(struct snd_card *, pm_message_t),
-				 int (*resume)(struct snd_card *),
-				 void *private_data)
-{
-	int err;
-	if ((err = snd_generic_device_register(card)) < 0)
-		return err;
-	return snd_card_set_pm_callback(card, suspend, resume, private_data);
-}
-#endif /* CONFIG_SND_GENERIC_DRIVER */
-
-#ifdef CONFIG_PCI
-int snd_card_pci_suspend(struct pci_dev *dev, pm_message_t state)
-{
-	struct snd_card *card = pci_get_drvdata(dev);
-	int err;
-	if (! card || ! card->pm_suspend)
-		return 0;
-	if (card->power_state == SNDRV_CTL_POWER_D3hot)
-		return 0;
-	err = card->pm_suspend(card, PMSG_SUSPEND);
-	pci_save_state(dev);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
-	return err;
-}
-
-int snd_card_pci_resume(struct pci_dev *dev)
-{
-	struct snd_card *card = pci_get_drvdata(dev);
-	if (! card || ! card->pm_resume)
-		return 0;
-	if (card->power_state == SNDRV_CTL_POWER_D0)
-		return 0;
-	/* restore the PCI config space */
-	pci_restore_state(dev);
-	card->pm_resume(card);
-	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
-	return 0;
-}
-#endif
-
 #endif /* CONFIG_PM */
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 04de0084e42..fb236a6b9c3 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -32,7 +32,6 @@
 #include <sound/initval.h>
 #include <linux/kmod.h>
 #include <linux/devfs_fs_kernel.h>
-#include <linux/platform_device.h>
 
 #define SNDRV_OS_MINORS 256
 
@@ -328,10 +327,6 @@ int __exit snd_minor_info_done(void)
  *  INIT PART
  */
 
-#ifdef CONFIG_SND_GENERIC_DRIVER
-extern struct platform_driver snd_generic_driver;
-#endif
-
 static int __init alsa_sound_init(void)
 {
 	short controlnum;
@@ -356,9 +351,6 @@ static int __init alsa_sound_init(void)
 		return -ENOMEM;
 	}
 	snd_info_minor_register();
-#ifdef CONFIG_SND_GENERIC_DRIVER
-	platform_driver_register(&snd_generic_driver);
-#endif
 	for (controlnum = 0; controlnum < cards_limit; controlnum++)
 		devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum);
 #ifndef MODULE
@@ -374,9 +366,6 @@ static void __exit alsa_sound_exit(void)
 	for (controlnum = 0; controlnum < cards_limit; controlnum++)
 		devfs_remove("snd/controlC%d", controlnum);
 
-#ifdef CONFIG_SND_GENERIC_DRIVER
-	platform_driver_unregister(&snd_generic_driver);
-#endif
 	snd_info_minor_unregister();
 	snd_info_done();
 	if (unregister_chrdev(major, "alsa") != 0)
@@ -415,19 +404,8 @@ EXPORT_SYMBOL(snd_card_register);
 EXPORT_SYMBOL(snd_component_add);
 EXPORT_SYMBOL(snd_card_file_add);
 EXPORT_SYMBOL(snd_card_file_remove);
-#ifdef CONFIG_SND_GENERIC_DRIVER
-EXPORT_SYMBOL(snd_card_set_generic_dev);
-#endif
 #ifdef CONFIG_PM
 EXPORT_SYMBOL(snd_power_wait);
-EXPORT_SYMBOL(snd_card_set_pm_callback);
-#ifdef CONFIG_SND_GENERIC_DRIVER
-EXPORT_SYMBOL(snd_card_set_generic_pm_callback);
-#endif
-#ifdef CONFIG_PCI
-EXPORT_SYMBOL(snd_card_pci_suspend);
-EXPORT_SYMBOL(snd_card_pci_resume);
-#endif
 #endif
   /* device.c */
 EXPORT_SYMBOL(snd_device_new);
-- 
cgit v1.2.3-70-g09d2


From 0ed1cad172176a4595f82e8cd9055938ad54bd4b Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 16:06:05 +0100
Subject: [ALSA] vx-driver - Fix PM support

Fix PM support on VX drivers (vxpocket and vx222).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/vx_core.h    |  6 ++++++
 sound/drivers/vx/vx_core.c | 18 ++++++++----------
 sound/pci/vx222/vx222.c    | 33 ++++++++++++++++++++++++++++++++-
 sound/pcmcia/vx/vxpocket.c |  9 +++++----
 4 files changed, 51 insertions(+), 15 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/vx_core.h b/include/sound/vx_core.h
index 0a85c37d1bc..5fd6f3305e0 100644
--- a/include/sound/vx_core.h
+++ b/include/sound/vx_core.h
@@ -346,6 +346,12 @@ void vx_set_internal_clock(struct vx_core *chip, unsigned int freq);
 int vx_change_frequency(struct vx_core *chip);
 
 
+/*
+ * PM
+ */
+int snd_vx_suspend(struct vx_core *card, pm_message_t state);
+int snd_vx_resume(struct vx_core *card);
+
 /*
  * hardware constants
  */
diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c
index 5abf4235177..43f615d7a54 100644
--- a/sound/drivers/vx/vx_core.c
+++ b/sound/drivers/vx/vx_core.c
@@ -709,13 +709,11 @@ int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp)
 /*
  * suspend
  */
-static int snd_vx_suspend(struct snd_card *card, pm_message_t state)
+int snd_vx_suspend(struct vx_core *chip, pm_message_t state)
 {
-	struct vx_core *chip = card->pm_private_data;
 	unsigned int i;
 
-	snd_assert(chip, return -EINVAL);
-
+	snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot);
 	chip->chip_status |= VX_STAT_IN_SUSPEND;
 	for (i = 0; i < chip->hw->num_codecs; i++)
 		snd_pcm_suspend_all(chip->pcm[i]);
@@ -726,13 +724,10 @@ static int snd_vx_suspend(struct snd_card *card, pm_message_t state)
 /*
  * resume
  */
-static int snd_vx_resume(struct snd_card *card)
+int snd_vx_resume(struct vx_core *chip)
 {
-	struct vx_core *chip = card->pm_private_data;
 	int i, err;
 
-	snd_assert(chip, return -EINVAL);
-
 	chip->chip_status &= ~VX_STAT_CHIP_INIT;
 
 	for (i = 0; i < 4; i++) {
@@ -748,6 +743,7 @@ static int snd_vx_resume(struct snd_card *card)
 	chip->chip_status |= VX_STAT_CHIP_INIT;
 	chip->chip_status &= ~VX_STAT_IN_SUSPEND;
 
+	snd_power_change_state(chip->card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 
@@ -789,8 +785,6 @@ struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw,
 	strcpy(card->driver, hw->name);
 	sprintf(card->shortname, "Digigram %s", hw->name);
 
-	snd_card_set_pm_callback(card, snd_vx_suspend, snd_vx_resume, chip);
-
 	vx_proc_init(chip);
 
 	return chip;
@@ -822,3 +816,7 @@ EXPORT_SYMBOL(snd_vx_irq_handler);
 EXPORT_SYMBOL(snd_vx_dsp_boot);
 EXPORT_SYMBOL(snd_vx_dsp_load);
 EXPORT_SYMBOL(snd_vx_load_boot_image);
+#ifdef CONFIG_PM
+EXPORT_SYMBOL(snd_vx_suspend);
+EXPORT_SYMBOL(snd_vx_resume);
+#endif
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c
index 4ebbabedb3c..c816ddf1b21 100644
--- a/sound/pci/vx222/vx222.c
+++ b/sound/pci/vx222/vx222.c
@@ -218,6 +218,7 @@ static int __devinit snd_vx222_probe(struct pci_dev *pci,
 		snd_card_free(card);
 		return err;
 	}
+	card->private_data = vx;
 	vx->core.ibl.size = ibl[dev];
 
 	sprintf(card->longname, "%s at 0x%lx & 0x%lx, irq %i",
@@ -250,12 +251,42 @@ static void __devexit snd_vx222_remove(struct pci_dev *pci)
 	pci_set_drvdata(pci, NULL);
 }
 
+#ifdef CONFIG_PM
+static int snd_vx222_suspend(struct pci_dev *pci, pm_message_t state)
+{
+	struct snd_card *card = pci_get_drvdata(pci);
+	struct snd_vx222 *vx = card->private_data;
+	int err;
+
+	err = snd_vx_suspend(&vx->core, state);
+	pci_set_power_state(pci, PCI_D3hot);
+	pci_disable_device(pci);
+	pci_save_state(pci);
+	return err;
+}
+
+static int snd_vx222_resume(struct pci_dev *pci)
+{
+	struct snd_card *card = pci_get_drvdata(pci);
+	struct snd_vx222 *vx = card->private_data;
+
+	pci_restore_state(pci);
+	pci_enable_device(pci);
+	pci_set_power_state(pci, PCI_D0);
+	pci_set_master(pci);
+	return snd_vx_resume(&vx->core);
+}
+#endif
+
 static struct pci_driver driver = {
 	.name = "Digigram VX222",
 	.id_table = snd_vx222_ids,
 	.probe = snd_vx222_probe,
 	.remove = __devexit_p(snd_vx222_remove),
-	SND_PCI_PM_CALLBACKS
+#ifdef CONFIG_PM
+	.suspend = snd_vx222_suspend,
+	.resume = snd_vx222_resume,
+#endif
 };
 
 static int __init alsa_card_vx222_init(void)
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 00962971414..5bb079d1795 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -342,9 +342,9 @@ static int vxpocket_event(event_t event, int priority, event_callback_args_t *ar
 	case CS_EVENT_PM_SUSPEND:
 		snd_printdd(KERN_DEBUG "SUSPEND\n");
 		link->state |= DEV_SUSPEND;
-		if (chip && chip->card->pm_suspend) {
+		if (chip) {
 			snd_printdd(KERN_DEBUG "snd_vx_suspend calling\n");
-			chip->card->pm_suspend(chip->card, PMSG_SUSPEND);
+			snd_vx_suspend(chip, PMSG_SUSPEND);
 		}
 		/* Fall through... */
 	case CS_EVENT_RESET_PHYSICAL:
@@ -362,9 +362,9 @@ static int vxpocket_event(event_t event, int priority, event_callback_args_t *ar
 			//struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
 			snd_printdd(KERN_DEBUG "requestconfig...\n");
 			pcmcia_request_configuration(link->handle, &link->conf);
-			if (chip && chip->card->pm_resume) {
+			if (chip) {
 				snd_printdd(KERN_DEBUG "calling snd_vx_resume\n");
-				chip->card->pm_resume(chip->card);
+				snd_vx_resume(chip);
 			}
 		}
 		snd_printdd(KERN_DEBUG "resume done!\n");
@@ -407,6 +407,7 @@ static dev_link_t *vxpocket_attach(void)
 		snd_card_free(card);
 		return NULL;
 	}
+	card->private_data = vxp;
 
 	vxp->index = i;
 	card_alloc |= 1 << i;
-- 
cgit v1.2.3-70-g09d2


From cb28e45ba2aa42393596a364d4f947027db8a1b5 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 16:09:04 +0100
Subject: [ALSA] cs46xx - Fix PM support

Modules: CS46xx driver

Fix PM support on CS46xx driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/cs46xx.h        |  2 ++
 sound/pci/cs46xx/cs46xx.c     |  6 +++++-
 sound/pci/cs46xx/cs46xx_lib.c | 28 +++++++++++++++-------------
 3 files changed, 22 insertions(+), 14 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/cs46xx.h b/include/sound/cs46xx.h
index b33ca2a3630..199b5098ff7 100644
--- a/include/sound/cs46xx.h
+++ b/include/sound/cs46xx.h
@@ -1728,6 +1728,8 @@ int snd_cs46xx_create(struct snd_card *card,
 		      struct pci_dev *pci,
 		      int external_amp, int thinkpad,
 		      struct snd_cs46xx **rcodec);
+int snd_cs46xx_suspend(struct pci_dev *pci, pm_message_t state);
+int snd_cs46xx_resume(struct pci_dev *pci);
 
 int snd_cs46xx_pcm(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm);
 int snd_cs46xx_pcm_rear(struct snd_cs46xx *chip, int device, struct snd_pcm **rpcm);
diff --git a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c
index 7d6b29e5433..c590602e20c 100644
--- a/sound/pci/cs46xx/cs46xx.c
+++ b/sound/pci/cs46xx/cs46xx.c
@@ -98,6 +98,7 @@ static int __devinit snd_card_cs46xx_probe(struct pci_dev *pci,
 		snd_card_free(card);
 		return err;
 	}
+	card->private_data = chip;
 	chip->accept_valid = mmap_valid[dev];
 	if ((err = snd_cs46xx_pcm(chip, 0, NULL)) < 0) {
 		snd_card_free(card);
@@ -166,7 +167,10 @@ static struct pci_driver driver = {
 	.id_table = snd_cs46xx_ids,
 	.probe = snd_card_cs46xx_probe,
 	.remove = __devexit_p(snd_card_cs46xx_remove),
-	SND_PCI_PM_CALLBACKS
+#ifdef CONFIG_PM
+	.suspend = snd_cs46xx_suspend,
+	.resume = snd_cs46xx_resume,
+#endif
 };
 
 static int __init alsa_card_cs46xx_init(void)
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index 11d91d08a14..0ec0592a6e6 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -3654,18 +3654,19 @@ static struct cs_card_type __devinitdata cards[] = {
  * APM support
  */
 #ifdef CONFIG_PM
-static int snd_cs46xx_suspend(struct snd_card *card, pm_message_t state)
+int snd_cs46xx_suspend(struct pci_dev *pci, pm_message_t state)
 {
-	struct snd_cs46xx *chip = card->pm_private_data;
+	struct snd_card *card = pci_get_drvdata(pci);
+	struct snd_cs46xx *chip = card->private_data;
 	int amp_saved;
 
+	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	snd_pcm_suspend_all(chip->pcm);
 	// chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL);
 	// chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE);
 
 	snd_ac97_suspend(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]);
-	if (chip->ac97[CS46XX_SECONDARY_CODEC_INDEX])
-		snd_ac97_suspend(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]);
+	snd_ac97_suspend(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]);
 
 	amp_saved = chip->amplifier;
 	/* turn off amp */
@@ -3674,17 +3675,20 @@ static int snd_cs46xx_suspend(struct snd_card *card, pm_message_t state)
 	/* disable CLKRUN */
 	chip->active_ctrl(chip, -chip->amplifier);
 	chip->amplifier = amp_saved; /* restore the status */
-	pci_disable_device(chip->pci);
+	pci_disable_device(pci);
+	pci_save_state(pci);
 	return 0;
 }
 
-static int snd_cs46xx_resume(struct snd_card *card)
+int snd_cs46xx_resume(struct pci_dev *pci)
 {
-	struct snd_cs46xx *chip = card->pm_private_data;
+	struct snd_card *card = pci_get_drvdata(pci);
+	struct snd_cs46xx *chip = card->private_data;
 	int amp_saved;
 
-	pci_enable_device(chip->pci);
-	pci_set_master(chip->pci);
+	pci_restore_state(pci);
+	pci_enable_device(pci);
+	pci_set_master(pci);
 	amp_saved = chip->amplifier;
 	chip->amplifier = 0;
 	chip->active_ctrl(chip, 1); /* force to on */
@@ -3703,14 +3707,14 @@ static int snd_cs46xx_resume(struct snd_card *card)
 #endif
 
 	snd_ac97_resume(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]);
-	if (chip->ac97[CS46XX_SECONDARY_CODEC_INDEX])
-		snd_ac97_resume(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]);
+	snd_ac97_resume(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]);
 
 	if (amp_saved)
 		chip->amplifier_ctrl(chip, 1); /* turn amp on */
 	else
 		chip->active_ctrl(chip, -1); /* disable CLKRUN */
 	chip->amplifier = amp_saved;
+	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -3870,8 +3874,6 @@ int __devinit snd_cs46xx_create(struct snd_card *card,
 	
 	snd_cs46xx_proc_init(card, chip);
 
-	snd_card_set_pm_callback(card, snd_cs46xx_suspend, snd_cs46xx_resume, chip);
-
 	chip->active_ctrl(chip, -1); /* disable CLKRUN */
 
 	snd_card_set_dev(card, &pci->dev);
-- 
cgit v1.2.3-70-g09d2


From fb0700b4debbf45fb0465b40188bdc5396947bda Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 16:09:25 +0100
Subject: [ALSA] trident - Fix PM support

Modules: Trident driver

Fix PM support on Trident driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/trident.h          |  2 ++
 sound/pci/trident/trident.c      |  6 +++++-
 sound/pci/trident/trident_main.c | 41 +++++++++++++++++-----------------------
 3 files changed, 24 insertions(+), 25 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/trident.h b/include/sound/trident.h
index 2c54569fc60..9752243241e 100644
--- a/include/sound/trident.h
+++ b/include/sound/trident.h
@@ -452,6 +452,8 @@ void snd_trident_free_voice(struct snd_trident * trident, struct snd_trident_voi
 void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice);
 void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice);
 void snd_trident_write_voice_regs(struct snd_trident * trident, struct snd_trident_voice *voice);
+int snd_trident_suspend(struct pci_dev *pci, pm_message_t state);
+int snd_trident_resume(struct pci_dev *pci);
 
 /* TLB memory allocation */
 struct snd_util_memblk *snd_trident_alloc_pages(struct snd_trident *trident,
diff --git a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c
index 0999f1f83a9..2b21df16ad6 100644
--- a/sound/pci/trident/trident.c
+++ b/sound/pci/trident/trident.c
@@ -100,6 +100,7 @@ static int __devinit snd_trident_probe(struct pci_dev *pci,
 		snd_card_free(card);
 		return err;
 	}
+	card->private_data = trident;
 
 	switch (trident->device) {
 	case TRIDENT_DEVICE_ID_DX:
@@ -180,7 +181,10 @@ static struct pci_driver driver = {
 	.id_table = snd_trident_ids,
 	.probe = snd_trident_probe,
 	.remove = __devexit_p(snd_trident_remove),
-	SND_PCI_PM_CALLBACKS
+#ifdef CONFIG_PM
+	.suspend = snd_trident_suspend,
+	.resume = snd_trident_resume,
+#endif
 };
 
 static int __init alsa_card_trident_init(void)
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
index 6277dccebf6..83b7d8aba9e 100644
--- a/sound/pci/trident/trident_main.c
+++ b/sound/pci/trident/trident_main.c
@@ -52,10 +52,6 @@ static int snd_trident_pcm_mixer_free(struct snd_trident *trident,
 				      struct snd_pcm_substream *substream);
 static irqreturn_t snd_trident_interrupt(int irq, void *dev_id,
 					 struct pt_regs *regs);
-#ifdef CONFIG_PM
-static int snd_trident_suspend(struct snd_card *card, pm_message_t state);
-static int snd_trident_resume(struct snd_card *card);
-#endif
 static int snd_trident_sis_reset(struct snd_trident *trident);
 
 static void snd_trident_clear_voices(struct snd_trident * trident,
@@ -3661,8 +3657,6 @@ int __devinit snd_trident_create(struct snd_card *card,
 
 	snd_trident_enable_eso(trident);
 
-	
-	snd_card_set_pm_callback(card, snd_trident_suspend, snd_trident_resume, trident);
 	snd_trident_proc_init(trident);
 	snd_card_set_dev(card, &pci->dev);
 	*rtrident = trident;
@@ -3938,20 +3932,19 @@ static void snd_trident_clear_voices(struct snd_trident * trident, unsigned shor
 }
 
 #ifdef CONFIG_PM
-static int snd_trident_suspend(struct snd_card *card, pm_message_t state)
+int snd_trident_suspend(struct pci_dev *pci, pm_message_t state)
 {
-	struct snd_trident *trident = card->pm_private_data;
+	struct snd_card *card = pci_get_drvdata(pci);
+	struct snd_trident *trident = card->private_data;
 
 	trident->in_suspend = 1;
+	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	snd_pcm_suspend_all(trident->pcm);
-	if (trident->foldback)
-		snd_pcm_suspend_all(trident->foldback);
-	if (trident->spdif)
-		snd_pcm_suspend_all(trident->spdif);
+	snd_pcm_suspend_all(trident->foldback);
+	snd_pcm_suspend_all(trident->spdif);
 
 	snd_ac97_suspend(trident->ac97);
-	if (trident->ac97_sec)
-		snd_ac97_suspend(trident->ac97_sec);
+	snd_ac97_suspend(trident->ac97_sec);
 
 	switch (trident->device) {
 	case TRIDENT_DEVICE_ID_DX:
@@ -3960,19 +3953,19 @@ static int snd_trident_suspend(struct snd_card *card, pm_message_t state)
 	case TRIDENT_DEVICE_ID_SI7018:
 		break;
 	}
-	pci_disable_device(trident->pci);
+	pci_disable_device(pci);
+	pci_save_state(pci);
 	return 0;
 }
 
-static int snd_trident_resume(struct snd_card *card)
+int snd_trident_resume(struct pci_dev *pci)
 {
-	struct snd_trident *trident = card->pm_private_data;
+	struct snd_card *card = pci_get_drvdata(pci);
+	struct snd_trident *trident = card->private_data;
 
-	pci_enable_device(trident->pci);
-	if (pci_set_dma_mask(trident->pci, 0x3fffffff) < 0 ||
-	    pci_set_consistent_dma_mask(trident->pci, 0x3fffffff) < 0)
-		snd_printk(KERN_WARNING "trident: can't set the proper DMA mask\n");
-	pci_set_master(trident->pci); /* to be sure */
+	pci_restore_state(pci);
+	pci_enable_device(pci);
+	pci_set_master(pci); /* to be sure */
 
 	switch (trident->device) {
 	case TRIDENT_DEVICE_ID_DX:
@@ -3987,14 +3980,14 @@ static int snd_trident_resume(struct snd_card *card)
 	}
 
 	snd_ac97_resume(trident->ac97);
-	if (trident->ac97_sec)
-		snd_ac97_resume(trident->ac97_sec);
+	snd_ac97_resume(trident->ac97_sec);
 
 	/* restore some registers */
 	outl(trident->musicvol_wavevol, TRID_REG(trident, T4D_MUSICVOL_WAVEVOL));
 
 	snd_trident_enable_eso(trident);
 
+	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	trident->in_suspend = 0;
 	return 0;
 }
-- 
cgit v1.2.3-70-g09d2


From ded462356886e5f80f6a20b227f7e5cf7cfc5159 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 16:09:43 +0100
Subject: [ALSA] ymfpci - Fix PM support

Modules: YMFPCI driver

Fix PM support on YMFPCI driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/ymfpci.h         |  3 +++
 sound/pci/ymfpci/ymfpci.c      |  7 ++++++-
 sound/pci/ymfpci/ymfpci_main.c | 23 ++++++++++++++---------
 3 files changed, 23 insertions(+), 10 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h
index ec790a9c496..d567bfdbf51 100644
--- a/include/sound/ymfpci.h
+++ b/include/sound/ymfpci.h
@@ -369,6 +369,9 @@ int snd_ymfpci_create(struct snd_card *card,
 		      struct snd_ymfpci ** rcodec);
 void snd_ymfpci_free_gameport(struct snd_ymfpci *chip);
 
+int snd_ymfpci_suspend(struct pci_dev *pci, pm_message_t state);
+int snd_ymfpci_resume(struct pci_dev *pci);
+
 int snd_ymfpci_pcm(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
 int snd_ymfpci_pcm2(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
 int snd_ymfpci_pcm_spdif(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c
index 42499a94df4..9e30e2c76c7 100644
--- a/sound/pci/ymfpci/ymfpci.c
+++ b/sound/pci/ymfpci/ymfpci.c
@@ -271,6 +271,8 @@ static int __devinit snd_card_ymfpci_probe(struct pci_dev *pci,
 	}
 	chip->fm_res = fm_res;
 	chip->mpu_res = mpu_res;
+	card->private_data = chip;
+
 	strcpy(card->driver, str);
 	sprintf(card->shortname, "Yamaha DS-XG (%s)", str);
 	sprintf(card->longname, "%s at 0x%lx, irq %i",
@@ -347,7 +349,10 @@ static struct pci_driver driver = {
 	.id_table = snd_ymfpci_ids,
 	.probe = snd_card_ymfpci_probe,
 	.remove = __devexit_p(snd_card_ymfpci_remove),
-	SND_PCI_PM_CALLBACKS
+#ifdef CONFIG_PM
+	.suspend = snd_ymfpci_suspend,
+	.resume = snd_ymfpci_resume,
+#endif
 };
 
 static int __init alsa_card_ymfpci_init(void)
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 62c9f25e8e7..1dfc7233c6a 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -2175,11 +2175,13 @@ static int saved_regs_index[] = {
 };
 #define YDSXGR_NUM_SAVED_REGS	ARRAY_SIZE(saved_regs_index)
 
-static int snd_ymfpci_suspend(struct snd_card *card, pm_message_t state)
+int snd_ymfpci_suspend(struct pci_dev *pci, pm_message_t state)
 {
-	struct snd_ymfpci *chip = card->pm_private_data;
+	struct snd_card *card = pci_get_drvdata(pci);
+	struct snd_ymfpci *chip = card->private_data;
 	unsigned int i;
 	
+	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	snd_pcm_suspend_all(chip->pcm);
 	snd_pcm_suspend_all(chip->pcm2);
 	snd_pcm_suspend_all(chip->pcm_spdif);
@@ -2190,18 +2192,21 @@ static int snd_ymfpci_suspend(struct snd_card *card, pm_message_t state)
 	chip->saved_ydsxgr_mode = snd_ymfpci_readl(chip, YDSXGR_MODE);
 	snd_ymfpci_writel(chip, YDSXGR_NATIVEDACOUTVOL, 0);
 	snd_ymfpci_disable_dsp(chip);
-	pci_disable_device(chip->pci);
+	pci_disable_device(pci);
+	pci_save_state(pci);
 	return 0;
 }
 
-static int snd_ymfpci_resume(struct snd_card *card)
+int snd_ymfpci_resume(struct pci_dev *pci)
 {
-	struct snd_ymfpci *chip = card->pm_private_data;
+	struct snd_card *card = pci_get_drvdata(pci);
+	struct snd_ymfpci *chip = card->private_data;
 	unsigned int i;
 
-	pci_enable_device(chip->pci);
-	pci_set_master(chip->pci);
-	snd_ymfpci_aclink_reset(chip->pci);
+	pci_restore_state(pci);
+	pci_enable_device(pci);
+	pci_set_master(pci);
+	snd_ymfpci_aclink_reset(pci);
 	snd_ymfpci_codec_ready(chip, 0);
 	snd_ymfpci_download_image(chip);
 	udelay(100);
@@ -2218,6 +2223,7 @@ static int snd_ymfpci_resume(struct snd_card *card)
 		chip->active_bank = snd_ymfpci_readl(chip, YDSXGR_CTRLSELECT);
 		spin_unlock_irq(&chip->reg_lock);
 	}
+	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -2296,7 +2302,6 @@ int __devinit snd_ymfpci_create(struct snd_card *card,
 		snd_ymfpci_free(chip);
 		return -ENOMEM;
 	}
-	snd_card_set_pm_callback(card, snd_ymfpci_suspend, snd_ymfpci_resume, chip);
 #endif
 
 	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
-- 
cgit v1.2.3-70-g09d2


From 11d3824ad7d6240d7ce44bdf1d9e81e62a903f72 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 16:13:05 +0100
Subject: [ALSA] ak4531 - Add PM support

Modules: AK4531 codec

Add PM support to AK4531 codec driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/ak4531_codec.h  |  5 +++++
 sound/pci/ac97/ak4531_codec.c | 36 +++++++++++++++++++++++++++++++++++-
 2 files changed, 40 insertions(+), 1 deletion(-)

(limited to 'include/sound')

diff --git a/include/sound/ak4531_codec.h b/include/sound/ak4531_codec.h
index 4e7c661af48..edf04070ce7 100644
--- a/include/sound/ak4531_codec.h
+++ b/include/sound/ak4531_codec.h
@@ -77,4 +77,9 @@ struct snd_ak4531 {
 int snd_ak4531_mixer(struct snd_card *card, struct snd_ak4531 *_ak4531,
 		     struct snd_ak4531 **rak4531);
 
+#ifdef CONFIG_PM
+void snd_ak4531_suspend(struct snd_ak4531 *ak4531);
+void snd_ak4531_resume(struct snd_ak4531 *ak4531);
+#endif
+
 #endif /* __SOUND_AK4531_CODEC_H */
diff --git a/sound/pci/ac97/ak4531_codec.c b/sound/pci/ac97/ak4531_codec.c
index 088d8dc336b..3eb885584e9 100644
--- a/sound/pci/ac97/ak4531_codec.c
+++ b/sound/pci/ac97/ak4531_codec.c
@@ -371,7 +371,7 @@ int snd_ak4531_mixer(struct snd_card *card, struct snd_ak4531 *_ak4531,
 	ak4531->write(ak4531, AK4531_RESET, 0x03);	/* no RST, PD */
 	udelay(100);
 	ak4531->write(ak4531, AK4531_CLOCK, 0x00);	/* CODEC ADC and CODEC DAC use {LR,B}CLK2 and run off LRCLK2 PLL */
-	for (idx = 0; idx < 0x19; idx++) {
+	for (idx = 0; idx <= 0x19; idx++) {
 		if (idx == AK4531_RESET || idx == AK4531_CLOCK)
 			continue;
 		ak4531->write(ak4531, idx, ak4531->regs[idx] = snd_ak4531_initial_map[idx]);	/* recording source is mixer */
@@ -395,6 +395,36 @@ int snd_ak4531_mixer(struct snd_card *card, struct snd_ak4531 *_ak4531,
 	return 0;
 }
 
+/*
+ * power management
+ */
+#ifdef CONFIG_PM
+void snd_ak4531_suspend(struct snd_ak4531 *ak4531)
+{
+	/* mute */
+	ak4531->write(ak4531, AK4531_LMASTER, 0x9f);
+	ak4531->write(ak4531, AK4531_RMASTER, 0x9f);
+	/* powerdown */
+	ak4531->write(ak4531, AK4531_RESET, 0x01);
+}
+
+void snd_ak4531_resume(struct snd_ak4531 *ak4531)
+{
+	int idx;
+
+	/* initialize */
+	ak4531->write(ak4531, AK4531_RESET, 0x03);
+	udelay(100);
+	ak4531->write(ak4531, AK4531_CLOCK, 0x00);
+	/* restore mixer registers */
+	for (idx = 0; idx <= 0x19; idx++) {
+		if (idx == AK4531_RESET || idx == AK4531_CLOCK)
+			continue;
+		ak4531->write(ak4531, idx, ak4531->regs[idx]);
+	}
+}
+#endif
+
 /*
 
  */
@@ -420,6 +450,10 @@ static void snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak453
 }
 
 EXPORT_SYMBOL(snd_ak4531_mixer);
+#ifdef CONFIG_PM
+EXPORT_SYMBOL(snd_ak4531_suspend);
+EXPORT_SYMBOL(snd_ak4531_resume);
+#endif
 
 /*
  *  INIT part
-- 
cgit v1.2.3-70-g09d2


From 09668b441dacdf4640509b640ad73e24efd5204f Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 16:14:10 +0100
Subject: [ALSA] emu10k1 - Add PM support

Modules: EMU10K1/EMU10K2 driver

Add PM support to emu10k1 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/emu10k1.h          |  31 +++-
 sound/pci/emu10k1/emu10k1.c      | 144 +++++++++++-------
 sound/pci/emu10k1/emu10k1_main.c | 308 +++++++++++++++++++++++++--------------
 sound/pci/emu10k1/emufx.c        | 121 ++++++++++++++-
 sound/pci/emu10k1/emupcm.c       |  14 +-
 sound/pci/emu10k1/p16v.c         |  43 +++++-
 6 files changed, 491 insertions(+), 170 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index d14c543b160..3d0496cc109 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1071,7 +1071,8 @@ struct snd_emu10k1 {
 
 	unsigned long port;			/* I/O port number */
 	unsigned int tos_link: 1,		/* tos link detected */
-	    rear_ac97: 1;			/* rear channels are on AC'97 */
+		rear_ac97: 1,			/* rear channels are on AC'97 */
+		enable_ir: 1;
 	/* Contains profile of card capabilities */
 	const struct snd_emu_chip_details *card_capabilities;
 	unsigned int audigy;			/* is Audigy? */
@@ -1108,6 +1109,7 @@ struct snd_emu10k1 {
 	struct snd_pcm *pcm;
 	struct snd_pcm *pcm_mic;
 	struct snd_pcm *pcm_efx;
+	struct snd_pcm *pcm_multi;
 	struct snd_pcm *pcm_p16v;
 
 	spinlock_t synth_lock;
@@ -1153,6 +1155,17 @@ struct snd_emu10k1 {
 
 	unsigned int efx_voices_mask[2];
 	unsigned int next_free_voice;
+
+#ifdef CONFIG_PM
+	unsigned int *saved_ptr;
+	unsigned int *saved_gpr;
+	unsigned int *tram_val_saved;
+	unsigned int *tram_addr_saved;
+	unsigned int *saved_icode;
+	unsigned int *p16v_saved;
+	unsigned int saved_a_iocfg, saved_hcfg;
+#endif
+
 };
 
 int snd_emu10k1_create(struct snd_card *card,
@@ -1178,11 +1191,11 @@ int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep
 
 irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
-/* initialization */
 void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int voice);
 int snd_emu10k1_init_efx(struct snd_emu10k1 *emu);
 void snd_emu10k1_free_efx(struct snd_emu10k1 *emu);
 int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size);
+int snd_emu10k1_done(struct snd_emu10k1 * emu);
 
 /* I/O functions */
 unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn);
@@ -1206,6 +1219,20 @@ unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg);
 void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data);
 unsigned int snd_emu10k1_rate_to_pitch(unsigned int rate);
 
+#ifdef CONFIG_PM
+void snd_emu10k1_suspend_regs(struct snd_emu10k1 *emu);
+void snd_emu10k1_resume_init(struct snd_emu10k1 *emu);
+void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu);
+int snd_emu10k1_efx_alloc_pm_buffer(struct snd_emu10k1 *emu);
+void snd_emu10k1_efx_free_pm_buffer(struct snd_emu10k1 *emu);
+void snd_emu10k1_efx_suspend(struct snd_emu10k1 *emu);
+void snd_emu10k1_efx_resume(struct snd_emu10k1 *emu);
+int snd_p16v_alloc_pm_buffer(struct snd_emu10k1 *emu);
+void snd_p16v_free_pm_buffer(struct snd_emu10k1 *emu);
+void snd_p16v_suspend(struct snd_emu10k1 *emu);
+void snd_p16v_resume(struct snd_emu10k1 *emu);
+#endif
+
 /* memory allocation */
 struct snd_util_memblk *snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substream);
 int snd_emu10k1_free_pages(struct snd_emu10k1 *emu, struct snd_util_memblk *blk);
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c
index 9be90022477..2dfa932f782 100644
--- a/sound/pci/emu10k1/emu10k1.c
+++ b/sound/pci/emu10k1/emu10k1.c
@@ -125,65 +125,43 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci,
 	if ((err = snd_emu10k1_create(card, pci, extin[dev], extout[dev],
 				      (long)max_buffer_size[dev] * 1024 * 1024,
 				      enable_ir[dev], subsystem[dev],
-				      &emu)) < 0) {
-		snd_card_free(card);
-		return err;
-	}		
-	if ((err = snd_emu10k1_pcm(emu, 0, NULL)) < 0) {
-		snd_card_free(card);
-		return err;
-	}		
-	if ((err = snd_emu10k1_pcm_mic(emu, 1, NULL)) < 0) {
-		snd_card_free(card);
-		return err;
-	}		
-	if ((err = snd_emu10k1_pcm_efx(emu, 2, NULL)) < 0) {
-		snd_card_free(card);
-		return err;
-	}
+				      &emu)) < 0)
+		goto error;
+	card->private_data = emu;
+	if ((err = snd_emu10k1_pcm(emu, 0, NULL)) < 0)
+		goto error;
+	if ((err = snd_emu10k1_pcm_mic(emu, 1, NULL)) < 0)
+		goto error;
+	if ((err = snd_emu10k1_pcm_efx(emu, 2, NULL)) < 0)
+		goto error;
 	/* This stores the periods table. */
 	if (emu->card_capabilities->ca0151_chip) { /* P16V */	
-		if(snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), 1024, &emu->p16v_buffer) < 0) {
-			snd_p16v_free(emu);
-			return -ENOMEM;
-		}
+		if ((err = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
+					       1024, &emu->p16v_buffer)) < 0)
+			goto error;
 	}
 
-	if ((err = snd_emu10k1_mixer(emu, 0, 3)) < 0) {
-		snd_card_free(card);
-		return err;
-	}
+	if ((err = snd_emu10k1_mixer(emu, 0, 3)) < 0)
+		goto error;
 	
-	if ((err = snd_emu10k1_timer(emu, 0)) < 0) {
-		snd_card_free(card);
-		return err;
-	}
+	if ((err = snd_emu10k1_timer(emu, 0)) < 0)
+		goto error;
 
-	if ((err = snd_emu10k1_pcm_multi(emu, 3, NULL)) < 0) {
-		snd_card_free(card);
-		return err;
-	}
-	if (emu->card_capabilities->ca0151_chip) { /* P16V */	
-		if ((err = snd_p16v_pcm(emu, 4, NULL)) < 0) {
-			snd_card_free(card);
-			return err;
-		}
+	if ((err = snd_emu10k1_pcm_multi(emu, 3, NULL)) < 0)
+		goto error;
+	if (emu->card_capabilities->ca0151_chip) { /* P16V */
+		if ((err = snd_p16v_pcm(emu, 4, NULL)) < 0)
+			goto error;
 	}
 	if (emu->audigy) {
-		if ((err = snd_emu10k1_audigy_midi(emu)) < 0) {
-			snd_card_free(card);
-			return err;
-		}
+		if ((err = snd_emu10k1_audigy_midi(emu)) < 0)
+			goto error;
 	} else {
-		if ((err = snd_emu10k1_midi(emu)) < 0) {
-			snd_card_free(card);
-			return err;
-		}
-	}
-	if ((err = snd_emu10k1_fx8010_new(emu, 0, NULL)) < 0) {
-		snd_card_free(card);
-		return err;
+		if ((err = snd_emu10k1_midi(emu)) < 0)
+			goto error;
 	}
+	if ((err = snd_emu10k1_fx8010_new(emu, 0, NULL)) < 0)
+		goto error;
 #ifdef ENABLE_SYNTH
 	if (snd_seq_device_new(card, 1, SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH,
 			       sizeof(struct snd_emu10k1_synth_arg), &wave) < 0 ||
@@ -206,13 +184,16 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci,
 		 "%s (rev.%d, serial:0x%x) at 0x%lx, irq %i",
 		 card->shortname, emu->revision, emu->serial, emu->port, emu->irq);
 
-	if ((err = snd_card_register(card)) < 0) {
-		snd_card_free(card);
-		return err;
-	}
+	if ((err = snd_card_register(card)) < 0)
+		goto error;
+
 	pci_set_drvdata(pci, card);
 	dev++;
 	return 0;
+
+ error:
+	snd_card_free(card);
+	return err;
 }
 
 static void __devexit snd_card_emu10k1_remove(struct pci_dev *pci)
@@ -221,11 +202,68 @@ static void __devexit snd_card_emu10k1_remove(struct pci_dev *pci)
 	pci_set_drvdata(pci, NULL);
 }
 
+
+#ifdef CONFIG_PM
+static int snd_emu10k1_suspend(struct pci_dev *pci, pm_message_t state)
+{
+	struct snd_card *card = pci_get_drvdata(pci);
+	struct snd_emu10k1 *emu = card->private_data;
+
+	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
+
+	snd_pcm_suspend_all(emu->pcm);
+	snd_pcm_suspend_all(emu->pcm_mic);
+	snd_pcm_suspend_all(emu->pcm_efx);
+	snd_pcm_suspend_all(emu->pcm_multi);
+	snd_pcm_suspend_all(emu->pcm_p16v);
+
+	snd_ac97_suspend(emu->ac97);
+
+	snd_emu10k1_efx_suspend(emu);
+	snd_emu10k1_suspend_regs(emu);
+	if (emu->card_capabilities->ca0151_chip)
+		snd_p16v_suspend(emu);
+
+	snd_emu10k1_done(emu);
+
+	pci_set_power_state(pci, PCI_D3hot);
+	pci_disable_device(pci);
+	pci_save_state(pci);
+	return 0;
+}
+
+int snd_emu10k1_resume(struct pci_dev *pci)
+{
+	struct snd_card *card = pci_get_drvdata(pci);
+	struct snd_emu10k1 *emu = card->private_data;
+
+	pci_restore_state(pci);
+	pci_enable_device(pci);
+	pci_set_power_state(pci, PCI_D0);
+	pci_set_master(pci);
+	
+	snd_emu10k1_resume_init(emu);
+	snd_emu10k1_efx_resume(emu);
+	snd_ac97_resume(emu->ac97);
+	snd_emu10k1_resume_regs(emu);
+
+	if (emu->card_capabilities->ca0151_chip)
+		snd_p16v_resume(emu);
+
+	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
+	return 0;
+}
+#endif
+
 static struct pci_driver driver = {
 	.name = "EMU10K1_Audigy",
 	.id_table = snd_emu10k1_ids,
 	.probe = snd_card_emu10k1_probe,
 	.remove = __devexit_p(snd_card_emu10k1_remove),
+#ifdef CONFIG_PM
+	.suspend = snd_emu10k1_suspend,
+	.resume = snd_emu10k1_resume,
+#endif
 };
 
 static int __init alsa_card_emu10k1_init(void)
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index f9855073a0a..cc36b748d9a 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -42,12 +42,6 @@
 #include "p16v.h"
 #include "tina2.h"
 
-#if 0
-MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>, Creative Labs, Inc.");
-MODULE_DESCRIPTION("Routines for control of EMU10K1 chips");
-MODULE_LICENSE("GPL");
-#endif
-
 /*************************************************************************
  * EMU10K1 init / done
  *************************************************************************/
@@ -97,17 +91,14 @@ void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int ch)
 	}
 }
 
-static int __devinit snd_emu10k1_init(struct snd_emu10k1 * emu, int enable_ir)
+static int snd_emu10k1_init(struct snd_emu10k1 *emu, int enable_ir, int resume)
 {
-	int ch, idx, err;
 	unsigned int silent_page;
-
-	emu->fx8010.itram_size = (16 * 1024)/2;
-	emu->fx8010.etram_pages.area = NULL;
-	emu->fx8010.etram_pages.bytes = 0;
+	int ch;
 
 	/* disable audio and lock cache */
-	outl(HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE, emu->port + HCFG);
+	outl(HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE,
+	     emu->port + HCFG);
 
 	/* reset recording buffers */
 	snd_emu10k1_ptr_write(emu, MICBS, 0, ADCBS_BUFSIZE_NONE);
@@ -128,48 +119,17 @@ static int __devinit snd_emu10k1_init(struct snd_emu10k1 * emu, int enable_ir)
 		/* set SPDIF bypass mode */
 		snd_emu10k1_ptr_write(emu, SPBYPASS, 0, SPBYPASS_FORMAT);
 		/* enable rear left + rear right AC97 slots */
-		snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_REAR_RIGHT | AC97SLOT_REAR_LEFT);
+		snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_REAR_RIGHT |
+				      AC97SLOT_REAR_LEFT);
 	}
 
 	/* init envelope engine */
-	for (ch = 0; ch < NUM_G; ch++) {
-		emu->voices[ch].emu = emu;
-		emu->voices[ch].number = ch;
+	for (ch = 0; ch < NUM_G; ch++)
 		snd_emu10k1_voice_init(emu, ch);
-	}
 
-	/*
-	 *  Init to 0x02109204 :
-	 *  Clock accuracy    = 0     (1000ppm)
-	 *  Sample Rate       = 2     (48kHz)
-	 *  Audio Channel     = 1     (Left of 2)
-	 *  Source Number     = 0     (Unspecified)
-	 *  Generation Status = 1     (Original for Cat Code 12)
-	 *  Cat Code          = 12    (Digital Signal Mixer)
-	 *  Mode              = 0     (Mode 0)
-	 *  Emphasis          = 0     (None)
-	 *  CP                = 1     (Copyright unasserted)
-	 *  AN                = 0     (Audio data)
-	 *  P                 = 0     (Consumer)
-	 */
-	snd_emu10k1_ptr_write(emu, SPCS0, 0,
-			emu->spdif_bits[0] =
-			SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
-			SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
-			SPCS_GENERATIONSTATUS | 0x00001200 |
-			0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT);
-	snd_emu10k1_ptr_write(emu, SPCS1, 0,
-			emu->spdif_bits[1] =
-			SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
-			SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
-			SPCS_GENERATIONSTATUS | 0x00001200 |
-			0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT);
-	snd_emu10k1_ptr_write(emu, SPCS2, 0,
-			emu->spdif_bits[2] =
-			SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
-			SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
-			SPCS_GENERATIONSTATUS | 0x00001200 |
-			0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT);
+	snd_emu10k1_ptr_write(emu, SPCS0, 0, emu->spdif_bits[0]);
+	snd_emu10k1_ptr_write(emu, SPCS1, 0, emu->spdif_bits[1]);
+	snd_emu10k1_ptr_write(emu, SPCS2, 0, emu->spdif_bits[2]);
 
 	if (emu->card_capabilities->ca0151_chip) { /* audigy2 */
 		/* Hacks for Alice3 to work independent of haP16V driver */
@@ -196,7 +156,7 @@ static int __devinit snd_emu10k1_init(struct snd_emu10k1 * emu, int enable_ir)
 		/* Hacks for Alice3 to work independent of haP16V driver */
 		u32 tmp;
 
-		snd_printk(KERN_ERR "Audigy2 value:Special config.\n");
+		snd_printk(KERN_INFO "Audigy2 value: Special config.\n");
 		//Setup SRCMulti_I2S SamplingRate
 		tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, 0);
 		tmp &= 0xfffff1ff;
@@ -221,14 +181,6 @@ static int __devinit snd_emu10k1_init(struct snd_emu10k1 * emu, int enable_ir)
 		outl(tmp, emu->port + A_IOCFG);
 	}
 
-
-	/*
-	 *  Clear page with silence & setup all pointers to this page
-	 */
-	memset(emu->silent_page.area, 0, PAGE_SIZE);
-	silent_page = emu->silent_page.addr << 1;
-	for (idx = 0; idx < MAXPAGES; idx++)
-		((u32 *)emu->ptb_pages.area)[idx] = cpu_to_le32(silent_page | idx);
 	snd_emu10k1_ptr_write(emu, PTB, 0, emu->ptb_pages.addr);
 	snd_emu10k1_ptr_write(emu, TCB, 0, 0);	/* taken from original driver */
 	snd_emu10k1_ptr_write(emu, TCBS, 0, 4);	/* taken from original driver */
@@ -287,12 +239,11 @@ static int __devinit snd_emu10k1_init(struct snd_emu10k1 * emu, int enable_ir)
 		outl(reg | A_IOCFG_GPOUT0, emu->port + A_IOCFG);
 	}
 
-	/*
-	 *  Initialize the effect engine
-	 */
-	if ((err = snd_emu10k1_init_efx(emu)) < 0)
-		return err;
+	return 0;
+}
 
+static void snd_emu10k1_audio_enable(struct snd_emu10k1 *emu)
+{
 	/*
 	 *  Enable the audio bit
 	 */
@@ -335,15 +286,9 @@ static int __devinit snd_emu10k1_init(struct snd_emu10k1 * emu, int enable_ir)
 #endif
 
 	snd_emu10k1_intr_enable(emu, INTE_PCIERRORENABLE);
-
-	emu->reserved_page = (struct snd_emu10k1_memblk *)snd_emu10k1_synth_alloc(emu, 4096);
-	if (emu->reserved_page)
-		emu->reserved_page->map_locked = 1;
-	
-	return 0;
 }
 
-static int snd_emu10k1_done(struct snd_emu10k1 * emu)
+int snd_emu10k1_done(struct snd_emu10k1 * emu)
 {
 	int ch;
 
@@ -382,18 +327,10 @@ static int snd_emu10k1_done(struct snd_emu10k1 * emu)
 	snd_emu10k1_ptr_write(emu, SOLEL, 0, 0);
 	snd_emu10k1_ptr_write(emu, SOLEH, 0, 0);
 
-	/* remove reserved page */
-	if (emu->reserved_page != NULL) {
-		snd_emu10k1_synth_free(emu, (struct snd_util_memblk *)emu->reserved_page);
-		emu->reserved_page = NULL;
-	}
-
 	/* disable audio and lock cache */
 	outl(HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE, emu->port + HCFG);
 	snd_emu10k1_ptr_write(emu, PTB, 0, 0);
 
-	snd_emu10k1_free_efx(emu);
-
 	return 0;
 }
 
@@ -609,11 +546,22 @@ static int __devinit snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu)
  *  Create the EMU10K1 instance
  */
 
+#ifdef CONFIG_PM
+static int alloc_pm_buffer(struct snd_emu10k1 *emu);
+static void free_pm_buffer(struct snd_emu10k1 *emu);
+#endif
+
 static int snd_emu10k1_free(struct snd_emu10k1 *emu)
 {
 	if (emu->port) {	/* avoid access to already used hardware */
 	       	snd_emu10k1_fx8010_tram_setup(emu, 0);
 		snd_emu10k1_done(emu);
+		/* remove reserved page */
+		if (emu->reserved_page) {
+			snd_emu10k1_synth_free(emu, (struct snd_util_memblk *)emu->reserved_page);
+			emu->reserved_page = NULL;
+		}
+		snd_emu10k1_free_efx(emu);
        	}
 	if (emu->memhdr)
 		snd_util_memhdr_free(emu->memhdr);
@@ -623,13 +571,16 @@ static int snd_emu10k1_free(struct snd_emu10k1 *emu)
 		snd_dma_free_pages(&emu->ptb_pages);
 	vfree(emu->page_ptr_table);
 	vfree(emu->page_addr_table);
+#ifdef CONFIG_PM
+	free_pm_buffer(emu);
+#endif
 	if (emu->irq >= 0)
 		free_irq(emu->irq, (void *)emu);
 	if (emu->port)
 		pci_release_regions(emu->pci);
-	pci_disable_device(emu->pci);
 	if (emu->card_capabilities->ca0151_chip) /* P16V */	
 		snd_p16v_free(emu);
+	pci_disable_device(emu->pci);
 	kfree(emu);
 	return 0;
 }
@@ -900,9 +851,10 @@ int __devinit snd_emu10k1_create(struct snd_card *card,
 		       struct snd_emu10k1 ** remu)
 {
 	struct snd_emu10k1 *emu;
-	int err;
+	int idx, err;
 	int is_audigy;
 	unsigned char revision;
+	unsigned int silent_page;
 	const struct snd_emu_chip_details *c;
 	static struct snd_device_ops ops = {
 		.dev_free =	snd_emu10k1_dev_free,
@@ -1012,34 +964,34 @@ int __devinit snd_emu10k1_create(struct snd_card *card,
 	emu->port = pci_resource_start(pci, 0);
 
 	if (request_irq(pci->irq, snd_emu10k1_interrupt, SA_INTERRUPT|SA_SHIRQ, "EMU10K1", (void *)emu)) {
-		snd_emu10k1_free(emu);
-		return -EBUSY;
+		err = -EBUSY;
+		goto error;
 	}
 	emu->irq = pci->irq;
 
 	emu->max_cache_pages = max_cache_bytes >> PAGE_SHIFT;
 	if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
 				32 * 1024, &emu->ptb_pages) < 0) {
-		snd_emu10k1_free(emu);
-		return -ENOMEM;
+		err = -ENOMEM;
+		goto error;
 	}
 
 	emu->page_ptr_table = (void **)vmalloc(emu->max_cache_pages * sizeof(void*));
 	emu->page_addr_table = (unsigned long*)vmalloc(emu->max_cache_pages * sizeof(unsigned long));
 	if (emu->page_ptr_table == NULL || emu->page_addr_table == NULL) {
-		snd_emu10k1_free(emu);
-		return -ENOMEM;
+		err = -ENOMEM;
+		goto error;
 	}
 
 	if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
 				EMUPAGESIZE, &emu->silent_page) < 0) {
-		snd_emu10k1_free(emu);
-		return -ENOMEM;
+		err = -ENOMEM;
+		goto error;
 	}
 	emu->memhdr = snd_util_memhdr_new(emu->max_cache_pages * PAGE_SIZE);
 	if (emu->memhdr == NULL) {
-		snd_emu10k1_free(emu);
-		return -ENOMEM;
+		err = -ENOMEM;
+		goto error;
 	}
 	emu->memhdr->block_extra_size = sizeof(struct snd_emu10k1_memblk) -
 		sizeof(struct snd_util_memblk);
@@ -1053,40 +1005,184 @@ int __devinit snd_emu10k1_create(struct snd_card *card,
 		extout_mask = 0x7fff;
 	emu->fx8010.extin_mask = extin_mask;
 	emu->fx8010.extout_mask = extout_mask;
+	emu->enable_ir = enable_ir;
 
 	if (emu->card_capabilities->ecard) {
-		if ((err = snd_emu10k1_ecard_init(emu)) < 0) {
-			snd_emu10k1_free(emu);
-			return err;
-		}
+		if ((err = snd_emu10k1_ecard_init(emu)) < 0)
+			goto error;
 	} else if (emu->card_capabilities->ca_cardbus_chip) {
-		if ((err = snd_emu10k1_cardbus_init(emu)) < 0) {
-			snd_emu10k1_free(emu);
-			return err;
-		}
+		if ((err = snd_emu10k1_cardbus_init(emu)) < 0)
+			goto error;
 	} else {
 		/* 5.1: Enable the additional AC97 Slots. If the emu10k1 version
 			does not support this, it shouldn't do any harm */
 		snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE);
 	}
 
-	if ((err = snd_emu10k1_init(emu, enable_ir)) < 0) {
-		snd_emu10k1_free(emu);
-		return err;
-	}
+	/* initialize TRAM setup */
+	emu->fx8010.itram_size = (16 * 1024)/2;
+	emu->fx8010.etram_pages.area = NULL;
+	emu->fx8010.etram_pages.bytes = 0;
 
-	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, emu, &ops)) < 0) {
-		snd_emu10k1_free(emu);
-		return err;
+	/*
+	 *  Init to 0x02109204 :
+	 *  Clock accuracy    = 0     (1000ppm)
+	 *  Sample Rate       = 2     (48kHz)
+	 *  Audio Channel     = 1     (Left of 2)
+	 *  Source Number     = 0     (Unspecified)
+	 *  Generation Status = 1     (Original for Cat Code 12)
+	 *  Cat Code          = 12    (Digital Signal Mixer)
+	 *  Mode              = 0     (Mode 0)
+	 *  Emphasis          = 0     (None)
+	 *  CP                = 1     (Copyright unasserted)
+	 *  AN                = 0     (Audio data)
+	 *  P                 = 0     (Consumer)
+	 */
+	emu->spdif_bits[0] = emu->spdif_bits[1] =
+		emu->spdif_bits[2] = SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
+		SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
+		SPCS_GENERATIONSTATUS | 0x00001200 |
+		0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT;
+
+	emu->reserved_page = (struct snd_emu10k1_memblk *)
+		snd_emu10k1_synth_alloc(emu, 4096);
+	if (emu->reserved_page)
+		emu->reserved_page->map_locked = 1;
+	
+	/* Clear silent pages and set up pointers */
+	memset(emu->silent_page.area, 0, PAGE_SIZE);
+	silent_page = emu->silent_page.addr << 1;
+	for (idx = 0; idx < MAXPAGES; idx++)
+		((u32 *)emu->ptb_pages.area)[idx] = cpu_to_le32(silent_page | idx);
+
+	/* set up voice indices */
+	for (idx = 0; idx < NUM_G; idx++) {
+		emu->voices[idx].emu = emu;
+		emu->voices[idx].number = idx;
 	}
 
+	if ((err = snd_emu10k1_init(emu, enable_ir, 0)) < 0)
+		goto error;
+#ifdef CONFIG_PM
+	if ((err = alloc_pm_buffer(emu)) < 0)
+		goto error;
+#endif
+
+	/*  Initialize the effect engine */
+	if ((err = snd_emu10k1_init_efx(emu)) < 0)
+		goto error;
+	snd_emu10k1_audio_enable(emu);
+
+	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, emu, &ops)) < 0)
+		goto error;
+
 	snd_emu10k1_proc_init(emu);
 
 	snd_card_set_dev(card, &pci->dev);
 	*remu = emu;
 	return 0;
+
+ error:
+	snd_emu10k1_free(emu);
+	return err;
 }
 
+#ifdef CONFIG_PM
+static unsigned char saved_regs[] = {
+	CPF, PTRX, CVCF, VTFT, Z1, Z2, PSST, DSL, CCCA, CCR, CLP,
+	FXRT, MAPA, MAPB, ENVVOL, ATKHLDV, DCYSUSV, LFOVAL1, ENVVAL,
+	ATKHLDM, DCYSUSM, LFOVAL2, IP, IFATN, PEFE, FMMOD, TREMFRQ, FM2FRQ2,
+	TEMPENV, ADCCR, FXWC, MICBA, ADCBA, FXBA,
+	MICBS, ADCBS, FXBS, CDCS, GPSCS, SPCS0, SPCS1, SPCS2,
+	SPBYPASS, AC97SLOT, CDSRCS, GPSRCS, ZVSRCS, MICIDX, ADCIDX, FXIDX,
+	0xff /* end */
+};
+static unsigned char saved_regs_audigy[] = {
+	A_ADCIDX, A_MICIDX, A_FXWC1, A_FXWC2, A_SAMPLE_RATE,
+	A_FXRT2, A_SENDAMOUNTS, A_FXRT1,
+	0xff /* end */
+};
+
+static int __devinit alloc_pm_buffer(struct snd_emu10k1 *emu)
+{
+	int size;
+
+	size = ARRAY_SIZE(saved_regs);
+	if (emu->audigy)
+		size += ARRAY_SIZE(saved_regs_audigy);
+	emu->saved_ptr = vmalloc(4 * NUM_G * size);
+	if (! emu->saved_ptr)
+		return -ENOMEM;
+	if (snd_emu10k1_efx_alloc_pm_buffer(emu) < 0)
+		return -ENOMEM;
+	if (emu->card_capabilities->ca0151_chip &&
+	    snd_p16v_alloc_pm_buffer(emu) < 0)
+		return -ENOMEM;
+	return 0;
+}
+
+static void free_pm_buffer(struct snd_emu10k1 *emu)
+{
+	vfree(emu->saved_ptr);
+	snd_emu10k1_efx_free_pm_buffer(emu);
+	if (emu->card_capabilities->ca0151_chip)
+		snd_p16v_free_pm_buffer(emu);
+}
+
+void snd_emu10k1_suspend_regs(struct snd_emu10k1 *emu)
+{
+	int i;
+	unsigned char *reg;
+	unsigned int *val;
+
+	val = emu->saved_ptr;
+	for (reg = saved_regs; *reg != 0xff; reg++)
+		for (i = 0; i < NUM_G; i++, val++)
+			*val = snd_emu10k1_ptr_read(emu, *reg, i);
+	if (emu->audigy) {
+		for (reg = saved_regs_audigy; *reg != 0xff; reg++)
+			for (i = 0; i < NUM_G; i++, val++)
+				*val = snd_emu10k1_ptr_read(emu, *reg, i);
+	}
+	if (emu->audigy)
+		emu->saved_a_iocfg = inl(emu->port + A_IOCFG);
+	emu->saved_hcfg = inl(emu->port + HCFG);
+}
+
+void snd_emu10k1_resume_init(struct snd_emu10k1 *emu)
+{
+	if (emu->card_capabilities->ecard)
+		snd_emu10k1_ecard_init(emu);
+	else
+		snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE);
+	snd_emu10k1_init(emu, emu->enable_ir, 1);
+}
+
+void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu)
+{
+	int i;
+	unsigned char *reg;
+	unsigned int *val;
+
+	snd_emu10k1_audio_enable(emu);
+
+	/* resore for spdif */
+	if (emu->audigy)
+		outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
+	outl(emu->port + HCFG, emu->saved_hcfg);
+
+	val = emu->saved_ptr;
+	for (reg = saved_regs; *reg != 0xff; reg++)
+		for (i = 0; i < NUM_G; i++, val++)
+			snd_emu10k1_ptr_write(emu, *reg, i, *val);
+	if (emu->audigy) {
+		for (reg = saved_regs_audigy; *reg != 0xff; reg++)
+			for (i = 0; i < NUM_G; i++, val++)
+				snd_emu10k1_ptr_write(emu, *reg, i, *val);
+	}
+}
+#endif
+
 /* memory.c */
 EXPORT_SYMBOL(snd_emu10k1_synth_alloc);
 EXPORT_SYMBOL(snd_emu10k1_synth_free);
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index f4452c5cb4c..a44e4fdfc02 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -1071,9 +1071,6 @@ static int __devinit _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu)
 	u32 *gpr_map;
 	mm_segment_t seg;
 
-	spin_lock_init(&emu->fx8010.irq_lock);
-	INIT_LIST_HEAD(&emu->fx8010.gpr_ctl);
-
 	if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL ||
 	    (icode->gpr_map = (u_int32_t __user *)
 	     kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t),
@@ -1541,9 +1538,6 @@ static int __devinit _snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
 	u32 *gpr_map;
 	mm_segment_t seg;
 
-	spin_lock_init(&emu->fx8010.irq_lock);
-	INIT_LIST_HEAD(&emu->fx8010.gpr_ctl);
-
 	if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL)
 		return -ENOMEM;
 	if ((icode->gpr_map = (u_int32_t __user *)
@@ -2102,6 +2096,8 @@ static int __devinit _snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
 
 int __devinit snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
 {
+	spin_lock_init(&emu->fx8010.irq_lock);
+	INIT_LIST_HEAD(&emu->fx8010.gpr_ctl);
 	if (emu->audigy)
 		return _snd_emu10k1_audigy_init_efx(emu);
 	else
@@ -2171,7 +2167,7 @@ int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size)
 		snd_emu10k1_ptr_write(emu, TCBS, 0, size_reg);
 		spin_lock_irq(&emu->emu_lock);
 		outl(inl(emu->port + HCFG) & ~HCFG_LOCKTANKCACHE_MASK, emu->port + HCFG);
-		spin_unlock_irq(&emu->emu_lock);	
+		spin_unlock_irq(&emu->emu_lock);
 	}
 
 	return 0;
@@ -2387,3 +2383,114 @@ int __devinit snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct
 		*rhwdep = hw;
 	return 0;
 }
+
+#ifdef CONFIG_PM
+int __devinit snd_emu10k1_efx_alloc_pm_buffer(struct snd_emu10k1 *emu)
+{
+	int len;
+
+	len = emu->audigy ? 0x200 : 0x100;
+	emu->saved_gpr = kmalloc(len * 4, GFP_KERNEL);
+	if (! emu->saved_gpr)
+		return -ENOMEM;
+	len = emu->audigy ? 0x100 : 0xa0;
+	emu->tram_val_saved = kmalloc(len * 4, GFP_KERNEL);
+	emu->tram_addr_saved = kmalloc(len * 4, GFP_KERNEL);
+	if (! emu->tram_val_saved || ! emu->tram_addr_saved)
+		return -ENOMEM;
+	len = emu->audigy ? 2 * 1024 : 2 * 512;
+	emu->saved_icode = vmalloc(len * 4);
+	if (! emu->saved_icode)
+		return -ENOMEM;
+	return 0;
+}
+
+void snd_emu10k1_efx_free_pm_buffer(struct snd_emu10k1 *emu)
+{
+	kfree(emu->saved_gpr);
+	kfree(emu->tram_val_saved);
+	kfree(emu->tram_addr_saved);
+	vfree(emu->saved_icode);
+}
+
+/*
+ * save/restore GPR, TRAM and codes
+ */
+void snd_emu10k1_efx_suspend(struct snd_emu10k1 *emu)
+{
+	int i, len;
+
+	len = emu->audigy ? 0x200 : 0x100;
+	for (i = 0; i < len; i++)
+		emu->saved_gpr[i] = snd_emu10k1_ptr_read(emu, emu->gpr_base + i, 0);
+
+	len = emu->audigy ? 0x100 : 0xa0;
+	for (i = 0; i < len; i++) {
+		emu->tram_val_saved[i] = snd_emu10k1_ptr_read(emu, TANKMEMDATAREGBASE + i, 0);
+		emu->tram_addr_saved[i] = snd_emu10k1_ptr_read(emu, TANKMEMADDRREGBASE + i, 0);
+		if (emu->audigy) {
+			emu->tram_addr_saved[i] >>= 12;
+			emu->tram_addr_saved[i] |=
+				snd_emu10k1_ptr_read(emu, A_TANKMEMCTLREGBASE + i, 0) << 20;
+		}
+	}
+
+	len = emu->audigy ? 2 * 1024 : 2 * 512;
+	for (i = 0; i < len; i++)
+		emu->saved_icode[i] = snd_emu10k1_efx_read(emu, i);
+}
+
+void snd_emu10k1_efx_resume(struct snd_emu10k1 *emu)
+{
+	int i, len;
+
+	/* set up TRAM */
+	if (emu->fx8010.etram_pages.bytes > 0) {
+		unsigned size, size_reg = 0;
+		size = emu->fx8010.etram_pages.bytes / 2;
+		size = (size - 1) >> 13;
+		while (size) {
+			size >>= 1;
+			size_reg++;
+		}
+		outl(HCFG_LOCKTANKCACHE_MASK | inl(emu->port + HCFG), emu->port + HCFG);
+		snd_emu10k1_ptr_write(emu, TCB, 0, emu->fx8010.etram_pages.addr);
+		snd_emu10k1_ptr_write(emu, TCBS, 0, size_reg);
+		outl(inl(emu->port + HCFG) & ~HCFG_LOCKTANKCACHE_MASK, emu->port + HCFG);
+	}
+
+	if (emu->audigy)
+		snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg | A_DBG_SINGLE_STEP);
+	else
+		snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg | EMU10K1_DBG_SINGLE_STEP);
+
+	len = emu->audigy ? 0x200 : 0x100;
+	for (i = 0; i < len; i++)
+		snd_emu10k1_ptr_write(emu, emu->gpr_base + i, 0, emu->saved_gpr[i]);
+
+	len = emu->audigy ? 0x100 : 0xa0;
+	for (i = 0; i < len; i++) {
+		snd_emu10k1_ptr_write(emu, TANKMEMDATAREGBASE + i, 0,
+				      emu->tram_val_saved[i]);
+		if (! emu->audigy)
+			snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + i, 0,
+					      emu->tram_addr_saved[i]);
+		else {
+			snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + i, 0,
+					      emu->tram_addr_saved[i] << 12);
+			snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + i, 0,
+					      emu->tram_addr_saved[i] >> 20);
+		}
+	}
+
+	len = emu->audigy ? 2 * 1024 : 2 * 512;
+	for (i = 0; i < len; i++)
+		snd_emu10k1_efx_write(emu, i, emu->saved_icode[i]);
+
+	/* start FX processor when the DSP code is updated */
+	if (emu->audigy)
+		snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg);
+	else
+		snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg);
+}
+#endif
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c
index 8e6caf581c0..717e92ec9e0 100644
--- a/sound/pci/emu10k1/emupcm.c
+++ b/sound/pci/emu10k1/emupcm.c
@@ -551,6 +551,7 @@ static struct snd_pcm_hardware snd_emu10k1_efx_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_NONINTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
+				 SNDRV_PCM_INFO_RESUME |
 				 SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE),
 	.formats =		SNDRV_PCM_FMTBIT_S16_LE,
 	.rates =		SNDRV_PCM_RATE_48000,
@@ -739,6 +740,7 @@ static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream,
 		snd_emu10k1_playback_invalidate_cache(emu, 0, epcm->voices[0]);
 		/* follow thru */
 	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+	case SNDRV_PCM_TRIGGER_RESUME:
 		mix = &emu->pcm_mixer[substream->number];
 		snd_emu10k1_playback_prepare_voice(emu, epcm->voices[0], 1, 0, mix);
 		snd_emu10k1_playback_prepare_voice(emu, epcm->voices[1], 0, 0, mix);
@@ -750,6 +752,7 @@ static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream,
 		break;
 	case SNDRV_PCM_TRIGGER_STOP:
 	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+	case SNDRV_PCM_TRIGGER_SUSPEND:
 		epcm->running = 0;
 		snd_emu10k1_playback_stop_voice(emu, epcm->voices[0]);
 		snd_emu10k1_playback_stop_voice(emu, epcm->voices[1]);
@@ -774,6 +777,7 @@ static int snd_emu10k1_capture_trigger(struct snd_pcm_substream *substream,
 	spin_lock(&emu->reg_lock);
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
+	case SNDRV_PCM_TRIGGER_RESUME:
 		// hmm this should cause full and half full interrupt to be raised?  
 		outl(epcm->capture_ipr, emu->port + IPR);
 		snd_emu10k1_intr_enable(emu, epcm->capture_inte);
@@ -797,6 +801,7 @@ static int snd_emu10k1_capture_trigger(struct snd_pcm_substream *substream,
 		epcm->first_ptr = 1;
 		break;
 	case SNDRV_PCM_TRIGGER_STOP:
+	case SNDRV_PCM_TRIGGER_SUSPEND:
 		epcm->running = 0;
 		snd_emu10k1_intr_disable(emu, epcm->capture_inte);
 		outl(epcm->capture_ipr, emu->port + IPR);
@@ -871,6 +876,7 @@ static int snd_emu10k1_efx_playback_trigger(struct snd_pcm_substream *substream,
 
 		/* follow thru */
 	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+	case SNDRV_PCM_TRIGGER_RESUME:
 		snd_emu10k1_playback_prepare_voice(emu, epcm->extra, 1, 1, NULL);
 		snd_emu10k1_playback_prepare_voice(emu, epcm->voices[0], 0, 0,
 						   &emu->efx_pcm_mixer[0]);
@@ -883,6 +889,7 @@ static int snd_emu10k1_efx_playback_trigger(struct snd_pcm_substream *substream,
 			snd_emu10k1_playback_trigger_voice(emu, epcm->voices[i], 0, 0);
 		epcm->running = 1;
 		break;
+	case SNDRV_PCM_TRIGGER_SUSPEND:
 	case SNDRV_PCM_TRIGGER_STOP:
 	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
 		epcm->running = 0;
@@ -925,6 +932,7 @@ static struct snd_pcm_hardware snd_emu10k1_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
+				 SNDRV_PCM_INFO_RESUME |
 				 SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE),
 	.formats =		SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,
 	.rates =		SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_96000,
@@ -948,6 +956,7 @@ static struct snd_pcm_hardware snd_emu10k1_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
+				 SNDRV_PCM_INFO_RESUME |
 				 SNDRV_PCM_INFO_MMAP_VALID),
 	.formats =		SNDRV_PCM_FMTBIT_S16_LE,
 	.rates =		SNDRV_PCM_RATE_8000_48000,
@@ -1309,7 +1318,7 @@ int __devinit snd_emu10k1_pcm_multi(struct snd_emu10k1 * emu, int device, struct
 	pcm->info_flags = 0;
 	pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;
 	strcpy(pcm->name, "Multichannel Playback");
-	emu->pcm = pcm;
+	emu->pcm_multi = pcm;
 
 	for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next)
 		if ((err = snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG, snd_dma_pci_data(emu->pci), 64*1024, 64*1024)) < 0)
@@ -1556,6 +1565,7 @@ static int snd_emu10k1_fx8010_playback_trigger(struct snd_pcm_substream *substre
 	case SNDRV_PCM_TRIGGER_START:
 		/* follow thru */
 	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+	case SNDRV_PCM_TRIGGER_RESUME:
 #ifdef EMU10K1_SET_AC3_IEC958
 	{
 		int i;
@@ -1576,6 +1586,7 @@ static int snd_emu10k1_fx8010_playback_trigger(struct snd_pcm_substream *substre
 		break;
 	case SNDRV_PCM_TRIGGER_STOP:
 	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+	case SNDRV_PCM_TRIGGER_SUSPEND:
 		snd_emu10k1_fx8010_unregister_irq_handler(emu, pcm->irq); pcm->irq = NULL;
 		snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0);
 		pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size);
@@ -1605,6 +1616,7 @@ static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(struct snd_pcm_subs
 static struct snd_pcm_hardware snd_emu10k1_fx8010_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
+				 SNDRV_PCM_INFO_RESUME |
 				 /* SNDRV_PCM_INFO_MMAP_VALID | */ SNDRV_PCM_INFO_PAUSE),
 	.formats =		SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,
 	.rates =		SNDRV_PCM_RATE_48000,
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c
index 90470de8bb8..adce6af98d0 100644
--- a/sound/pci/emu10k1/p16v.c
+++ b/sound/pci/emu10k1/p16v.c
@@ -125,6 +125,7 @@ static struct snd_pcm_hardware snd_p16v_playback_hw = {
 	.info =			(SNDRV_PCM_INFO_MMAP | 
 				 SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
+				 SNDRV_PCM_INFO_RESUME |
 				 SNDRV_PCM_INFO_MMAP_VALID),
 	.formats =		SNDRV_PCM_FMTBIT_S32_LE, /* Only supports 24-bit samples padded to 32 bits. */
 	.rates =		SNDRV_PCM_RATE_192000 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_44100, 
@@ -144,6 +145,7 @@ static struct snd_pcm_hardware snd_p16v_capture_hw = {
 	.info =			(SNDRV_PCM_INFO_MMAP |
 				 SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |
+				 SNDRV_PCM_INFO_RESUME |
 				 SNDRV_PCM_INFO_MMAP_VALID),
 	.formats =		SNDRV_PCM_FMTBIT_S32_LE,
 	.rates =		SNDRV_PCM_RATE_192000 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_44100, 
@@ -611,7 +613,7 @@ int snd_p16v_pcm(struct snd_emu10k1 *emu, int device, struct snd_pcm **rpcm)
 	pcm->info_flags = 0;
 	pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;
 	strcpy(pcm->name, "p16v");
-	emu->pcm = pcm;
+	emu->pcm_p16v = pcm;
 
 	for(substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; 
 	    substream; 
@@ -1030,3 +1032,42 @@ int snd_p16v_mixer(struct snd_emu10k1 *emu)
         return 0;
 }
 
+#ifdef CONFIG_PM
+
+#define NUM_CHS	1	/* up to 4, but only first channel is used */
+
+int __devinit snd_p16v_alloc_pm_buffer(struct snd_emu10k1 *emu)
+{
+	emu->p16v_saved = vmalloc(NUM_CHS * 4 * 0x80);
+	if (! emu->p16v_saved)
+		return -ENOMEM;
+	return 0;
+}
+
+void snd_p16v_free_pm_buffer(struct snd_emu10k1 *emu)
+{
+	vfree(emu->p16v_saved);
+}
+
+void snd_p16v_suspend(struct snd_emu10k1 *emu)
+{
+	int i, ch;
+	unsigned int *val;
+
+	val = emu->p16v_saved;
+	for (ch = 0; ch < NUM_CHS; ch++)
+		for (i = 0; i < 0x80; i++, val++)
+			*val = snd_emu10k1_ptr20_read(emu, i, ch);
+}
+
+void snd_p16v_resume(struct snd_emu10k1 *emu)
+{
+	int i, ch;
+	unsigned int *val;
+
+	val = emu->p16v_saved;
+	for (ch = 0; ch < NUM_CHS; ch++)
+		for (i = 0; i < 0x80; i++, val++)
+			snd_emu10k1_ptr20_write(emu, i, ch, *val);
+}
+#endif
-- 
cgit v1.2.3-70-g09d2


From 5bdb6a1629408f657f5f2c42b3c07c689c411499 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 16:16:10 +0100
Subject: [ALSA] Add PM support to SB-support code

Modules: SB drivers,SB16/AWE driver

Add PM support to SB-support code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/sb.h       |   8 +++
 sound/isa/sb/sb16_main.c |   4 ++
 sound/isa/sb/sb_common.c |   4 ++
 sound/isa/sb/sb_mixer.c  | 137 +++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 153 insertions(+)

(limited to 'include/sound')

diff --git a/include/sound/sb.h b/include/sound/sb.h
index 8e82460c4d3..431d06675e3 100644
--- a/include/sound/sb.h
+++ b/include/sound/sb.h
@@ -107,6 +107,10 @@ struct snd_sb {
 	spinlock_t midi_input_lock;
 
 	struct snd_info_entry *proc_entry;
+
+#ifdef CONFIG_PM
+	unsigned char saved_regs[0x20];
+#endif
 };
 
 /* I/O ports */
@@ -290,6 +294,10 @@ int snd_sbdsp_create(struct snd_card *card,
 void snd_sbmixer_write(struct snd_sb *chip, unsigned char reg, unsigned char data);
 unsigned char snd_sbmixer_read(struct snd_sb *chip, unsigned char reg);
 int snd_sbmixer_new(struct snd_sb *chip);
+#ifdef CONFIG_PM
+void snd_sbmixer_suspend(struct snd_sb *chip);
+void snd_sbmixer_resume(struct snd_sb *chip);
+#endif
 
 /* sb8_init.c */
 int snd_sb8dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm);
diff --git a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c
index 97786ed37dd..f183f1845a3 100644
--- a/sound/isa/sb/sb16_main.c
+++ b/sound/isa/sb/sb16_main.c
@@ -307,10 +307,12 @@ static int snd_sb16_playback_trigger(struct snd_pcm_substream *substream,
 	spin_lock(&chip->reg_lock);
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
+	case SNDRV_PCM_TRIGGER_RESUME:
 		chip->mode |= SB_RATE_LOCK_PLAYBACK;
 		snd_sbdsp_command(chip, chip->mode & SB_MODE_PLAYBACK_16 ? SB_DSP_DMA16_ON : SB_DSP_DMA8_ON);
 		break;
 	case SNDRV_PCM_TRIGGER_STOP:
+	case SNDRV_PCM_TRIGGER_SUSPEND:
 		snd_sbdsp_command(chip, chip->mode & SB_MODE_PLAYBACK_16 ? SB_DSP_DMA16_OFF : SB_DSP_DMA8_OFF);
 		/* next two lines are needed for some types of DSP4 (SB AWE 32 - 4.13) */
 		if (chip->mode & SB_RATE_LOCK_CAPTURE)
@@ -374,10 +376,12 @@ static int snd_sb16_capture_trigger(struct snd_pcm_substream *substream,
 	spin_lock(&chip->reg_lock);
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
+	case SNDRV_PCM_TRIGGER_RESUME:
 		chip->mode |= SB_RATE_LOCK_CAPTURE;
 		snd_sbdsp_command(chip, chip->mode & SB_MODE_CAPTURE_16 ? SB_DSP_DMA16_ON : SB_DSP_DMA8_ON);
 		break;
 	case SNDRV_PCM_TRIGGER_STOP:
+	case SNDRV_PCM_TRIGGER_SUSPEND:
 		snd_sbdsp_command(chip, chip->mode & SB_MODE_CAPTURE_16 ? SB_DSP_DMA16_OFF : SB_DSP_DMA8_OFF);
 		/* next two lines are needed for some types of DSP4 (SB AWE 32 - 4.13) */
 		if (chip->mode & SB_RATE_LOCK_PLAYBACK)
diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c
index eb86b4456ee..f343a8211d2 100644
--- a/sound/isa/sb/sb_common.c
+++ b/sound/isa/sb/sb_common.c
@@ -293,6 +293,10 @@ EXPORT_SYMBOL(snd_sbmixer_write);
 EXPORT_SYMBOL(snd_sbmixer_read);
 EXPORT_SYMBOL(snd_sbmixer_new);
 EXPORT_SYMBOL(snd_sbmixer_add_ctl);
+#ifdef CONFIG_PM
+EXPORT_SYMBOL(snd_sbmixer_suspend);
+EXPORT_SYMBOL(snd_sbmixer_resume);
+#endif
 
 /*
  *  INIT part
diff --git a/sound/isa/sb/sb_mixer.c b/sound/isa/sb/sb_mixer.c
index 6e0b935a8b8..1a6ee344ddd 100644
--- a/sound/isa/sb/sb_mixer.c
+++ b/sound/isa/sb/sb_mixer.c
@@ -853,3 +853,140 @@ int snd_sbmixer_new(struct snd_sb *chip)
 	}
 	return 0;
 }
+
+#ifdef CONFIG_PM
+static unsigned char sb20_saved_regs[] = {
+	SB_DSP20_MASTER_DEV,
+	SB_DSP20_PCM_DEV,
+	SB_DSP20_FM_DEV,
+	SB_DSP20_CD_DEV,
+};
+
+static unsigned char sbpro_saved_regs[] = {
+	SB_DSP_MASTER_DEV,
+	SB_DSP_PCM_DEV,
+	SB_DSP_PLAYBACK_FILT,
+	SB_DSP_FM_DEV,
+	SB_DSP_CD_DEV,
+	SB_DSP_LINE_DEV,
+	SB_DSP_MIC_DEV,
+	SB_DSP_CAPTURE_SOURCE,
+	SB_DSP_CAPTURE_FILT,
+};
+
+static unsigned char sb16_saved_regs[] = {
+	SB_DSP4_MASTER_DEV, SB_DSP4_MASTER_DEV + 1,
+	SB_DSP4_3DSE,
+	SB_DSP4_BASS_DEV, SB_DSP4_BASS_DEV + 1,
+	SB_DSP4_TREBLE_DEV, SB_DSP4_TREBLE_DEV + 1,
+	SB_DSP4_PCM_DEV, SB_DSP4_PCM_DEV + 1,
+	SB_DSP4_INPUT_LEFT, SB_DSP4_INPUT_RIGHT,
+	SB_DSP4_SYNTH_DEV, SB_DSP4_SYNTH_DEV + 1,
+	SB_DSP4_OUTPUT_SW,
+	SB_DSP4_CD_DEV, SB_DSP4_CD_DEV + 1,
+	SB_DSP4_LINE_DEV, SB_DSP4_LINE_DEV + 1,
+	SB_DSP4_MIC_DEV,
+	SB_DSP4_SPEAKER_DEV,
+	SB_DSP4_IGAIN_DEV, SB_DSP4_IGAIN_DEV + 1,
+	SB_DSP4_OGAIN_DEV, SB_DSP4_OGAIN_DEV + 1,
+	SB_DSP4_MIC_AGC
+};
+
+static unsigned char dt019x_saved_regs[] = {
+	SB_DT019X_MASTER_DEV,
+	SB_DT019X_PCM_DEV,
+	SB_DT019X_SYNTH_DEV,
+	SB_DT019X_CD_DEV,
+	SB_DT019X_MIC_DEV,
+	SB_DT019X_SPKR_DEV,
+	SB_DT019X_LINE_DEV,
+	SB_DSP4_OUTPUT_SW,
+	SB_DT019X_OUTPUT_SW2,
+	SB_DT019X_CAPTURE_SW,
+};
+
+static unsigned char als4000_saved_regs[] = {
+	SB_DSP4_MASTER_DEV, SB_DSP4_MASTER_DEV + 1,
+	SB_DSP4_OUTPUT_SW,
+	SB_DSP4_PCM_DEV, SB_DSP4_PCM_DEV + 1,
+	SB_DSP4_INPUT_LEFT, SB_DSP4_INPUT_RIGHT,
+	SB_DSP4_SYNTH_DEV, SB_DSP4_SYNTH_DEV + 1,
+	SB_DSP4_CD_DEV, SB_DSP4_CD_DEV + 1,
+	SB_DSP4_MIC_AGC,
+	SB_DSP4_MIC_DEV,
+	SB_DSP4_SPEAKER_DEV,
+	SB_DSP4_IGAIN_DEV, SB_DSP4_IGAIN_DEV + 1,
+	SB_DSP4_OGAIN_DEV, SB_DSP4_OGAIN_DEV + 1,
+	SB_DT019X_OUTPUT_SW2,
+	SB_ALS4000_MONO_IO_CTRL,
+	SB_ALS4000_MIC_IN_GAIN,
+	SB_ALS4000_3D_SND_FX,
+	SB_ALS4000_3D_TIME_DELAY,
+};
+
+static void save_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs)
+{
+	unsigned char *val = chip->saved_regs;
+	snd_assert(num_regs > ARRAY_SIZE(chip->saved_regs), return);
+	for (; num_regs; num_regs--)
+		*val++ = snd_sbmixer_read(chip, *regs++);
+}
+
+static void restore_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs)
+{
+	unsigned char *val = chip->saved_regs;
+	snd_assert(num_regs > ARRAY_SIZE(chip->saved_regs), return);
+	for (; num_regs; num_regs--)
+		snd_sbmixer_write(chip, *regs++, *val++);
+}
+
+void snd_sbmixer_suspend(struct snd_sb *chip)
+{
+	switch (chip->hardware) {
+	case SB_HW_20:
+	case SB_HW_201:
+		save_mixer(chip, sb20_saved_regs, ARRAY_SIZE(sb20_saved_regs));
+		break;
+	case SB_HW_PRO:
+		save_mixer(chip, sbpro_saved_regs, ARRAY_SIZE(sbpro_saved_regs));
+		break;
+	case SB_HW_16:
+	case SB_HW_ALS100:
+		save_mixer(chip, sb16_saved_regs, ARRAY_SIZE(sb16_saved_regs));
+		break;
+	case SB_HW_ALS4000:
+		save_mixer(chip, als4000_saved_regs, ARRAY_SIZE(als4000_saved_regs));
+		break;
+	case SB_HW_DT019X:
+		save_mixer(chip, dt019x_saved_regs, ARRAY_SIZE(dt019x_saved_regs));
+		break;
+	default:
+		break;
+	}
+}
+
+void snd_sbmixer_resume(struct snd_sb *chip)
+{
+	switch (chip->hardware) {
+	case SB_HW_20:
+	case SB_HW_201:
+		restore_mixer(chip, sb20_saved_regs, ARRAY_SIZE(sb20_saved_regs));
+		break;
+	case SB_HW_PRO:
+		restore_mixer(chip, sbpro_saved_regs, ARRAY_SIZE(sbpro_saved_regs));
+		break;
+	case SB_HW_16:
+	case SB_HW_ALS100:
+		restore_mixer(chip, sb16_saved_regs, ARRAY_SIZE(sb16_saved_regs));
+		break;
+	case SB_HW_ALS4000:
+		restore_mixer(chip, als4000_saved_regs, ARRAY_SIZE(als4000_saved_regs));
+		break;
+	case SB_HW_DT019X:
+		restore_mixer(chip, dt019x_saved_regs, ARRAY_SIZE(dt019x_saved_regs));
+		break;
+	default:
+		break;
+	}
+}
+#endif
-- 
cgit v1.2.3-70-g09d2


From c66d7f72569e304acc134b2561b148fe7c23c0f7 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 16:57:48 +0100
Subject: [ALSA] ad1848 - Add PM support

Modules: AD1848 driver

Add PM support to ad1848 support code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/ad1848.h        |  5 +++++
 sound/isa/ad1848/ad1848_lib.c | 28 +++++++++++++++-------------
 2 files changed, 20 insertions(+), 13 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/ad1848.h b/include/sound/ad1848.h
index a03807088b1..1a2759f3a29 100644
--- a/include/sound/ad1848.h
+++ b/include/sound/ad1848.h
@@ -148,6 +148,11 @@ struct snd_ad1848 {
 	int dma_size;
 	int thinkpad_flag;		/* Thinkpad CS4248 needs some extra help */
 
+#ifdef CONFIG_PM
+	void (*suspend)(struct snd_ad1848 *chip);
+	void (*resume)(struct snd_ad1848 *chip);
+#endif
+
 	spinlock_t reg_lock;
 	struct semaphore open_mutex;
 };
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c
index 55ba32d4a22..83764c94153 100644
--- a/sound/isa/ad1848/ad1848_lib.c
+++ b/sound/isa/ad1848/ad1848_lib.c
@@ -24,7 +24,6 @@
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
-#include <linux/pm.h>
 #include <linux/slab.h>
 #include <linux/ioport.h>
 #include <sound/core.h>
@@ -642,29 +641,30 @@ static void snd_ad1848_thinkpad_twiddle(struct snd_ad1848 *chip, int on) {
 }
 
 #ifdef CONFIG_PM
-static int snd_ad1848_suspend(struct snd_card *card, pm_message_t state)
+static void snd_ad1848_suspend(struct snd_ad1848 *chip)
 {
-	struct snd_ad1848 *chip = card->pm_private_data;
-
 	snd_pcm_suspend_all(chip->pcm);
-	/* FIXME: save registers? */
-
 	if (chip->thinkpad_flag)
 		snd_ad1848_thinkpad_twiddle(chip, 0);
-
-	return 0;
 }
 
-static int snd_ad1848_resume(struct snd_card *card)
+static void snd_ad1848_resume(struct snd_ad1848 *chip)
 {
-	struct snd_ad1848 *chip = card->pm_private_data;
+	int i;
 
 	if (chip->thinkpad_flag)
 		snd_ad1848_thinkpad_twiddle(chip, 1);
 
-	/* FIXME: restore registers? */
+	/* clear any pendings IRQ */
+	inb(AD1848P(chip, STATUS));
+	outb(0, AD1848P(chip, STATUS));
+	mb();
 
-	return 0;
+	snd_ad1848_mce_down(chip);
+	for (i = 0; i < 16; i++)
+		snd_ad1848_out(chip, i, chip->image[i]);
+	snd_ad1848_mce_up(chip);
+	snd_ad1848_mce_down(chip);
 }
 #endif /* CONFIG_PM */
 
@@ -919,7 +919,6 @@ int snd_ad1848_create(struct snd_card *card,
 		chip->thinkpad_flag = 1;
 		chip->hardware = AD1848_HW_DETECT; /* reset */
 		snd_ad1848_thinkpad_twiddle(chip, 1);
-		snd_card_set_isa_pm_callback(card, snd_ad1848_suspend, snd_ad1848_resume, chip);
 	}
 
 	if (snd_ad1848_probe(chip) < 0) {
@@ -933,6 +932,9 @@ int snd_ad1848_create(struct snd_card *card,
 		return err;
 	}
 
+	chip->suspend = snd_ad1848_suspend;
+	chip->resume = snd_ad1848_resume;
+
 	*rchip = chip;
 	return 0;
 }
-- 
cgit v1.2.3-70-g09d2


From 27441127b086230cc4c57d6cd9a615272fb47bcd Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 17 Nov 2005 17:22:43 +0100
Subject: [ALSA] Remove snd_legacy_auto_probe()

Modules: ALSA Core

Remove unsed snd_legacy_auto_probe() function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/initval.h | 14 --------------
 1 file changed, 14 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/initval.h b/include/sound/initval.h
index 2bf1508825a..d29e3d31d14 100644
--- a/include/sound/initval.h
+++ b/include/sound/initval.h
@@ -50,20 +50,6 @@
 #define SNDRV_DEFAULT_DMA_SIZE	{ [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_DMA_SIZE }
 #define SNDRV_DEFAULT_PTR	SNDRV_DEFAULT_STR
 
-#ifdef SNDRV_LEGACY_AUTO_PROBE
-static int snd_legacy_auto_probe(unsigned long *ports, int (*probe)(unsigned long port))
-{
-	int result = 0;	/* number of detected cards */
-
-	while ((signed long)*ports != -1) {
-		if (probe(*ports) >= 0)
-			result++;
-		ports++;
-	}
-	return result;
-}
-#endif
-
 #ifdef SNDRV_LEGACY_FIND_FREE_IRQ
 #include <linux/interrupt.h>
 
-- 
cgit v1.2.3-70-g09d2


From 2af677fc884fc6dc79e65c99050ea607ac8bab9b Mon Sep 17 00:00:00 2001
From: Clemens Ladisch <clemens@ladisch.de>
Date: Sun, 20 Nov 2005 14:03:48 +0100
Subject: [ALSA] dynamic minors (1/6): store device type in struct snd_minor

Instead of a comment string, store the device type in the snd_minor
structure.  This makes snd_minor more flexible, and has the nice side
effect that we don't need anymore to create a separate snd_minor
template for registering a device but can pass the file_operations
directly to snd_register_device().

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
---
 include/sound/core.h           |  8 ++++---
 include/sound/pcm.h            |  3 +--
 sound/core/control.c           | 11 +++------
 sound/core/hwdep.c             | 11 +++------
 sound/core/oss/mixer_oss.c     |  8 +------
 sound/core/oss/pcm_oss.c       |  8 +------
 sound/core/pcm.c               |  6 +++--
 sound/core/pcm_native.c        | 53 +++++++++++++++++-------------------------
 sound/core/rawmidi.c           | 14 ++++-------
 sound/core/seq/oss/seq_oss.c   |  9 ++-----
 sound/core/seq/seq_clientmgr.c | 10 ++------
 sound/core/sound.c             | 38 ++++++++++++++++++++++++------
 sound/core/sound_oss.c         | 35 ++++++++++++++++++++++------
 sound/core/timer.c             |  8 +------
 14 files changed, 108 insertions(+), 114 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/core.h b/include/sound/core.h
index f00b9c9b567..f557c8ac450 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -185,8 +185,8 @@ static inline int snd_power_wait(struct snd_card *card, unsigned int state, stru
 struct snd_minor {
 	struct list_head list;		/* list of all minors per card */
 	int number;			/* minor number */
+	int type;			/* SNDRV_DEVICE_TYPE_XXX */
 	int device;			/* device number */
-	const char *comment;		/* for /proc/asound/devices */
 	struct file_operations *f_ops;	/* file operations */
 	char name[0];			/* device name (keep at the end of
 								structure) */
@@ -199,11 +199,13 @@ extern int snd_ecards_limit;
 
 void snd_request_card(int card);
 
-int snd_register_device(int type, struct snd_card *card, int dev, struct snd_minor *reg, const char *name);
+int snd_register_device(int type, struct snd_card *card, int dev,
+			struct file_operations *f_ops, const char *name);
 int snd_unregister_device(int type, struct snd_card *card, int dev);
 
 #ifdef CONFIG_SND_OSSEMUL
-int snd_register_oss_device(int type, struct snd_card *card, int dev, struct snd_minor *reg, const char *name);
+int snd_register_oss_device(int type, struct snd_card *card, int dev,
+			    struct file_operations *f_ops, const char *name);
 int snd_unregister_oss_device(int type, struct snd_card *card, int dev);
 #endif
 
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 7e77c0add80..5e29b0e0f21 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -402,7 +402,6 @@ struct snd_pcm_str {
 	struct snd_pcm_oss_stream oss;
 #endif
 	struct snd_pcm_file *files;
-	struct snd_minor *reg;
 	struct snd_info_entry *proc_root;
 	struct snd_info_entry *proc_info_entry;
 #ifdef CONFIG_SND_DEBUG
@@ -441,7 +440,7 @@ struct snd_pcm_notify {
  */
 
 extern struct snd_pcm *snd_pcm_devices[];
-extern struct snd_minor snd_pcm_reg[2];
+extern struct file_operations snd_pcm_f_ops[2];
 
 int snd_pcm_new(struct snd_card *card, char *id, int device,
 		int playback_count, int capture_count,
diff --git a/sound/core/control.c b/sound/core/control.c
index f8f98cc5241..23561e74712 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -1264,12 +1264,6 @@ static struct file_operations snd_ctl_f_ops =
 	.fasync =	snd_ctl_fasync,
 };
 
-static struct snd_minor snd_ctl_reg =
-{
-	.comment =	"ctl",
-	.f_ops =	&snd_ctl_f_ops,
-};
-
 /*
  * registration of the control device
  */
@@ -1284,7 +1278,7 @@ static int snd_ctl_dev_register(struct snd_device *device)
 	snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO);
 	sprintf(name, "controlC%i", cardnum);
 	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_CONTROL,
-					card, 0, &snd_ctl_reg, name)) < 0)
+				       card, -1, &snd_ctl_f_ops, name)) < 0)
 		return err;
 	return 0;
 }
@@ -1336,7 +1330,8 @@ static int snd_ctl_dev_unregister(struct snd_device *device)
 	snd_assert(card != NULL, return -ENXIO);
 	cardnum = card->number;
 	snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO);
-	if ((err = snd_unregister_device(SNDRV_DEVICE_TYPE_CONTROL, card, 0)) < 0)
+	if ((err = snd_unregister_device(SNDRV_DEVICE_TYPE_CONTROL,
+					 card, -1)) < 0)
 		return err;
 	return snd_ctl_dev_free(device);
 }
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index 444e266e7c4..27d5bf7266f 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -330,12 +330,6 @@ static struct file_operations snd_hwdep_f_ops =
 	.mmap =		snd_hwdep_mmap,
 };
 
-static struct snd_minor snd_hwdep_reg =
-{
-	.comment =	"hardware dependent",
-	.f_ops =	&snd_hwdep_f_ops,
-};
-
 /**
  * snd_hwdep_new - create a new hwdep instance
  * @card: the card instance
@@ -416,7 +410,7 @@ static int snd_hwdep_dev_register(struct snd_device *device)
 	sprintf(name, "hwC%iD%i", hwdep->card->number, hwdep->device);
 	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_HWDEP,
 				       hwdep->card, hwdep->device,
-				       &snd_hwdep_reg, name)) < 0) {
+				       &snd_hwdep_f_ops, name)) < 0) {
 		snd_printk(KERN_ERR "unable to register hardware dependent device %i:%i\n",
 			   hwdep->card->number, hwdep->device);
 		snd_hwdep_devices[idx] = NULL;
@@ -431,7 +425,8 @@ static int snd_hwdep_dev_register(struct snd_device *device)
 		} else {
 			if (snd_register_oss_device(hwdep->oss_type,
 						    hwdep->card, hwdep->device,
-						    &snd_hwdep_reg, hwdep->oss_dev) < 0) {
+						    &snd_hwdep_f_ops,
+						    hwdep->oss_dev) < 0) {
 				snd_printk(KERN_ERR "unable to register OSS compatibility device %i:%i\n",
 					   hwdep->card->number, hwdep->device);
 			} else
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index e448002ca7b..2dd6bf9b49e 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -398,12 +398,6 @@ static struct file_operations snd_mixer_oss_f_ops =
 	.compat_ioctl =	snd_mixer_oss_ioctl_compat,
 };
 
-static struct snd_minor snd_mixer_oss_reg =
-{
-	.comment =	"mixer",
-	.f_ops =	&snd_mixer_oss_f_ops,
-};
-
 /*
  *  utilities
  */
@@ -1292,7 +1286,7 @@ static int snd_mixer_oss_notify_handler(struct snd_card *card, int cmd)
 		sprintf(name, "mixer%i%i", card->number, 0);
 		if ((err = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIXER,
 						   card, 0,
-						   &snd_mixer_oss_reg,
+						   &snd_mixer_oss_f_ops,
 						   name)) < 0) {
 			snd_printk(KERN_ERR "unable to register OSS mixer device %i:%i\n",
 				   card->number, 0);
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index ffc13b9194b..947bf08df42 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -2444,18 +2444,12 @@ static struct file_operations snd_pcm_oss_f_reg =
 	.mmap =		snd_pcm_oss_mmap,
 };
 
-static struct snd_minor snd_pcm_oss_reg =
-{
-	.comment =	"digital audio",
-	.f_ops =	&snd_pcm_oss_f_reg,
-};
-
 static void register_oss_dsp(struct snd_pcm *pcm, int index)
 {
 	char name[128];
 	sprintf(name, "dsp%i%i", pcm->card->number, pcm->device);
 	if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM,
-				    pcm->card, index, &snd_pcm_oss_reg,
+				    pcm->card, index, &snd_pcm_oss_f_reg,
 				    name) < 0) {
 		snd_printk(KERN_ERR "unable to register OSS PCM device %i:%i\n",
 			   pcm->card->number, pcm->device);
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 9305ac357a3..2bc5f69ec2a 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -597,7 +597,6 @@ int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count)
 	pstr->stream = stream;
 	pstr->pcm = pcm;
 	pstr->substream_count = substream_count;
-	pstr->reg = &snd_pcm_reg[stream];
 	if (substream_count > 0) {
 		err = snd_pcm_stream_proc_init(pstr);
 		if (err < 0) {
@@ -897,7 +896,10 @@ static int snd_pcm_dev_register(struct snd_device *device)
 			devtype = SNDRV_DEVICE_TYPE_PCM_CAPTURE;
 			break;
 		}
-		if ((err = snd_register_device(devtype, pcm->card, pcm->device, pcm->streams[cidx].reg, str)) < 0) {
+		if ((err = snd_register_device(devtype, pcm->card,
+					       pcm->device,
+					       &snd_pcm_f_ops[cidx], str)) < 0)
+		{
 			snd_pcm_devices[idx] = NULL;
 			up(&register_mutex);
 			return err;
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 7bac1cbe38d..bb40c016135 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -3370,40 +3370,29 @@ out:
  *  Register section
  */
 
-static struct file_operations snd_pcm_f_ops_playback = {
-	.owner =	THIS_MODULE,
-	.write =	snd_pcm_write,
-	.writev =	snd_pcm_writev,
-	.open =		snd_pcm_open,
-	.release =	snd_pcm_release,
-	.poll =		snd_pcm_playback_poll,
-	.unlocked_ioctl =	snd_pcm_playback_ioctl,
-	.compat_ioctl = snd_pcm_ioctl_compat,
-	.mmap =		snd_pcm_mmap,
-	.fasync =	snd_pcm_fasync,
-};
-
-static struct file_operations snd_pcm_f_ops_capture = {
-	.owner =	THIS_MODULE,
-	.read =		snd_pcm_read,
-	.readv =	snd_pcm_readv,
-	.open =		snd_pcm_open,
-	.release =	snd_pcm_release,
-	.poll =		snd_pcm_capture_poll,
-	.unlocked_ioctl =	snd_pcm_capture_ioctl,
-	.compat_ioctl = snd_pcm_ioctl_compat,
-	.mmap =		snd_pcm_mmap,
-	.fasync =	snd_pcm_fasync,
-};
-
-struct snd_minor snd_pcm_reg[2] =
-{
+struct file_operations snd_pcm_f_ops[2] = {
 	{
-		.comment =	"digital audio playback",
-		.f_ops =	&snd_pcm_f_ops_playback,
+		.owner =		THIS_MODULE,
+		.write =		snd_pcm_write,
+		.writev =		snd_pcm_writev,
+		.open =			snd_pcm_open,
+		.release =		snd_pcm_release,
+		.poll =			snd_pcm_playback_poll,
+		.unlocked_ioctl =	snd_pcm_playback_ioctl,
+		.compat_ioctl = 	snd_pcm_ioctl_compat,
+		.mmap =			snd_pcm_mmap,
+		.fasync =		snd_pcm_fasync,
 	},
 	{
-		.comment =	"digital audio capture",
-		.f_ops =	&snd_pcm_f_ops_capture,
+		.owner =		THIS_MODULE,
+		.read =			snd_pcm_read,
+		.readv =		snd_pcm_readv,
+		.open =			snd_pcm_open,
+		.release =		snd_pcm_release,
+		.poll =			snd_pcm_capture_poll,
+		.unlocked_ioctl =	snd_pcm_capture_ioctl,
+		.compat_ioctl = 	snd_pcm_ioctl_compat,
+		.mmap =			snd_pcm_mmap,
+		.fasync =		snd_pcm_fasync,
 	}
 };
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index d703545cae8..7ac77e5ddcb 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -1367,12 +1367,6 @@ static struct file_operations snd_rawmidi_f_ops =
 	.compat_ioctl =	snd_rawmidi_ioctl_compat,
 };
 
-static struct snd_minor snd_rawmidi_reg =
-{
-	.comment =	"raw midi",
-	.f_ops =	&snd_rawmidi_f_ops,
-};
-
 static int snd_rawmidi_alloc_substreams(struct snd_rawmidi *rmidi,
 					struct snd_rawmidi_str *stream,
 					int direction,
@@ -1516,7 +1510,7 @@ static int snd_rawmidi_dev_register(struct snd_device *device)
 	sprintf(name, "midiC%iD%i", rmidi->card->number, rmidi->device);
 	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_RAWMIDI,
 				       rmidi->card, rmidi->device,
-				       &snd_rawmidi_reg, name)) < 0) {
+				       &snd_rawmidi_f_ops, name)) < 0) {
 		snd_printk(KERN_ERR "unable to register rawmidi device %i:%i\n", rmidi->card->number, rmidi->device);
 		snd_rawmidi_devices[idx] = NULL;
 		up(&register_mutex);
@@ -1533,7 +1527,8 @@ static int snd_rawmidi_dev_register(struct snd_device *device)
 	rmidi->ossreg = 0;
 	if ((int)rmidi->device == midi_map[rmidi->card->number]) {
 		if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIDI,
-					    rmidi->card, 0, &snd_rawmidi_reg, name) < 0) {
+					    rmidi->card, 0,
+					    &snd_rawmidi_f_ops, name) < 0) {
 			snd_printk(KERN_ERR "unable to register OSS rawmidi device %i:%i\n", rmidi->card->number, 0);
 		} else {
 			rmidi->ossreg++;
@@ -1544,7 +1539,8 @@ static int snd_rawmidi_dev_register(struct snd_device *device)
 	}
 	if ((int)rmidi->device == amidi_map[rmidi->card->number]) {
 		if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIDI,
-					    rmidi->card, 1, &snd_rawmidi_reg, name) < 0) {
+					    rmidi->card, 1,
+					    &snd_rawmidi_f_ops, name) < 0) {
 			snd_printk(KERN_ERR "unable to register OSS rawmidi device %i:%i\n", rmidi->card->number, 1);
 		} else {
 			rmidi->ossreg++;
diff --git a/sound/core/seq/oss/seq_oss.c b/sound/core/seq/oss/seq_oss.c
index 2371e41b13e..61c0a41376f 100644
--- a/sound/core/seq/oss/seq_oss.c
+++ b/sound/core/seq/oss/seq_oss.c
@@ -217,11 +217,6 @@ static struct file_operations seq_oss_f_ops =
 	.compat_ioctl =	odev_ioctl_compat,
 };
 
-static struct snd_minor seq_oss_reg = {
-	.comment =	"sequencer",
-	.f_ops =	&seq_oss_f_ops,
-};
-
 static int __init
 register_device(void)
 {
@@ -230,7 +225,7 @@ register_device(void)
 	down(&register_mutex);
 	if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER,
 					  NULL, 0,
-					  &seq_oss_reg,
+					  &seq_oss_f_ops,
 					  SNDRV_SEQ_OSS_DEVNAME)) < 0) {
 		snd_printk(KERN_ERR "can't register device seq\n");
 		up(&register_mutex);
@@ -238,7 +233,7 @@ register_device(void)
 	}
 	if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC,
 					  NULL, 0,
-					  &seq_oss_reg,
+					  &seq_oss_f_ops,
 					  SNDRV_SEQ_OSS_DEVNAME)) < 0) {
 		snd_printk(KERN_ERR "can't register device music\n");
 		snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, NULL, 0);
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 5eab4201c64..087fdf32732 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -2520,13 +2520,6 @@ static struct file_operations snd_seq_f_ops =
 	.compat_ioctl =	snd_seq_ioctl_compat,
 };
 
-static struct snd_minor snd_seq_reg =
-{
-	.comment =	"sequencer",
-	.f_ops =	&snd_seq_f_ops,
-};
-
-
 /* 
  * register sequencer device 
  */
@@ -2537,7 +2530,8 @@ int __init snd_sequencer_device_init(void)
 	if (down_interruptible(&register_mutex))
 		return -ERESTARTSYS;
 
-	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_SEQUENCER, NULL, 0, &snd_seq_reg, "seq")) < 0) {
+	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_SEQUENCER, NULL, 0,
+				       &snd_seq_f_ops, "seq")) < 0) {
 		up(&register_mutex);
 		return err;
 	}
diff --git a/sound/core/sound.c b/sound/core/sound.c
index fb236a6b9c3..798c24c2de2 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -195,7 +195,7 @@ static int snd_kernel_minor(int type, struct snd_card *card, int dev)
  * @type: the device type, SNDRV_DEVICE_TYPE_XXX
  * @card: the card instance
  * @dev: the device index
- * @reg: the struct snd_minor record
+ * @f_ops: the file operations
  * @name: the device file name
  *
  * Registers an ALSA device file for the given card.
@@ -203,7 +203,8 @@ static int snd_kernel_minor(int type, struct snd_card *card, int dev)
  *
  * Retrurns zero if successful, or a negative error code on failure.
  */
-int snd_register_device(int type, struct snd_card *card, int dev, struct snd_minor * reg, const char *name)
+int snd_register_device(int type, struct snd_card *card, int dev,
+			struct file_operations *f_ops, const char *name)
 {
 	int minor = snd_kernel_minor(type, card, dev);
 	struct snd_minor *preg;
@@ -212,12 +213,13 @@ int snd_register_device(int type, struct snd_card *card, int dev, struct snd_min
 	if (minor < 0)
 		return minor;
 	snd_assert(name, return -EINVAL);
-	preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL);
+	preg = kzalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL);
 	if (preg == NULL)
 		return -ENOMEM;
-	*preg = *reg;
 	preg->number = minor;
+	preg->type = type;
 	preg->device = dev;
+	preg->f_ops = f_ops;
 	strcpy(preg->name, name);
 	down(&sound_mutex);
 	if (snd_minor_search(minor)) {
@@ -276,6 +278,28 @@ int snd_unregister_device(int type, struct snd_card *card, int dev)
 
 static struct snd_info_entry *snd_minor_info_entry = NULL;
 
+static const char *snd_device_type_name(int type)
+{
+	switch (type) {
+	case SNDRV_DEVICE_TYPE_CONTROL:
+		return "control";
+	case SNDRV_DEVICE_TYPE_HWDEP:
+		return "hardware dependent";
+	case SNDRV_DEVICE_TYPE_RAWMIDI:
+		return "raw midi";
+	case SNDRV_DEVICE_TYPE_PCM_PLAYBACK:
+		return "digital audio playback";
+	case SNDRV_DEVICE_TYPE_PCM_CAPTURE:
+		return "digital audio capture";
+	case SNDRV_DEVICE_TYPE_SEQUENCER:
+		return "sequencer";
+	case SNDRV_DEVICE_TYPE_TIMER:
+		return "timer";
+	default:
+		return "?";
+	}
+}
+
 static void snd_minor_info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
 {
 	int card, device;
@@ -288,11 +312,11 @@ static void snd_minor_info_read(struct snd_info_entry *entry, struct snd_info_bu
 			mptr = list_entry(list, struct snd_minor, list);
 			if (SNDRV_MINOR_DEVICE(mptr->number) != SNDRV_MINOR_GLOBAL) {
 				if ((device = mptr->device) >= 0)
-					snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n", mptr->number, card, device, mptr->comment);
+					snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n", mptr->number, card, device, snd_device_type_name(mptr->type));
 				else
-					snd_iprintf(buffer, "%3i: [%i]   : %s\n", mptr->number, card, mptr->comment);
+					snd_iprintf(buffer, "%3i: [%i]   : %s\n", mptr->number, card, snd_device_type_name(mptr->type));
 			} else {
-				snd_iprintf(buffer, "%3i:       : %s\n", mptr->number, mptr->comment);
+				snd_iprintf(buffer, "%3i:       : %s\n", mptr->number, snd_device_type_name(mptr->type));
 			}
 		}
 	}
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index ec37604ffb6..4d189ffaa76 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -91,7 +91,7 @@ static int snd_oss_kernel_minor(int type, struct snd_card *card, int dev)
 }
 
 int snd_register_oss_device(int type, struct snd_card *card, int dev,
-			    struct snd_minor * reg, const char *name)
+			    struct file_operations *f_ops, const char *name)
 {
 	int minor = snd_oss_kernel_minor(type, card, dev);
 	int minor_unit;
@@ -103,12 +103,13 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev,
 
 	if (minor < 0)
 		return minor;
-	preg = (struct snd_minor *)kmalloc(sizeof(struct snd_minor), GFP_KERNEL);
+	preg = kzalloc(sizeof(struct snd_minor), GFP_KERNEL);
 	if (preg == NULL)
 		return -ENOMEM;
-	*preg = *reg;
 	preg->number = minor;
+	preg->type = type;
 	preg->device = dev;
+	preg->f_ops = f_ops;
 	down(&sound_oss_mutex);
 	list_add_tail(&preg->list, &snd_oss_minors_hash[cidx]);
 	minor_unit = SNDRV_MINOR_OSS_DEVICE(minor);
@@ -125,11 +126,12 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev,
 	}
 	if (card)
 		carddev = card->dev;
-	register1 = register_sound_special_device(reg->f_ops, minor, carddev);
+	register1 = register_sound_special_device(f_ops, minor, carddev);
 	if (register1 != minor)
 		goto __end;
 	if (track2 >= 0) {
-		register2 = register_sound_special_device(reg->f_ops, track2, carddev);
+		register2 = register_sound_special_device(f_ops, track2,
+							  carddev);
 		if (register2 != track2)
 			goto __end;
 	}
@@ -190,6 +192,25 @@ int snd_unregister_oss_device(int type, struct snd_card *card, int dev)
 
 static struct snd_info_entry *snd_minor_info_oss_entry = NULL;
 
+static const char *snd_oss_device_type_name(int type)
+{
+	switch (type) {
+	case SNDRV_OSS_DEVICE_TYPE_MIXER:
+		return "mixer";
+	case SNDRV_OSS_DEVICE_TYPE_SEQUENCER:
+	case SNDRV_OSS_DEVICE_TYPE_MUSIC:
+		return "sequencer";
+	case SNDRV_OSS_DEVICE_TYPE_PCM:
+		return "digital audio";
+	case SNDRV_OSS_DEVICE_TYPE_MIDI:
+		return "raw midi";
+	case SNDRV_OSS_DEVICE_TYPE_DMFM:
+		return "hardware dependent";
+	default:
+		return "?";
+	}
+}
+
 static void snd_minor_info_oss_read(struct snd_info_entry *entry,
 				    struct snd_info_buffer *buffer)
 {
@@ -205,9 +226,9 @@ static void snd_minor_info_oss_read(struct snd_info_entry *entry,
 		        if (dev != SNDRV_MINOR_OSS_SNDSTAT &&
 			    dev != SNDRV_MINOR_OSS_SEQUENCER &&
 			    dev != SNDRV_MINOR_OSS_MUSIC)
-				snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n", mptr->number, card, dev, mptr->comment);
+				snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n", mptr->number, card, dev, snd_oss_device_type_name(mptr->type));
 			else
-				snd_iprintf(buffer, "%3i:       : %s\n", mptr->number, mptr->comment);
+				snd_iprintf(buffer, "%3i:       : %s\n", mptr->number, snd_oss_device_type_name(mptr->type));
 		}
 	}
 	up(&sound_oss_mutex);
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 6aad411dd7b..a7bcb04263c 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1924,12 +1924,6 @@ static struct file_operations snd_timer_f_ops =
 	.fasync = 	snd_timer_user_fasync,
 };
 
-static struct snd_minor snd_timer_reg =
-{
-	.comment =	"timer",
-	.f_ops =	&snd_timer_f_ops,
-};
-
 /*
  *  ENTRY functions
  */
@@ -1959,7 +1953,7 @@ static int __init alsa_timer_init(void)
 		snd_printk(KERN_ERR "unable to register system timer (%i)\n",
 			   err);
 	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_TIMER,
-					NULL, 0, &snd_timer_reg, "timer"))<0)
+				       NULL, 0, &snd_timer_f_ops, "timer")) < 0)
 		snd_printk(KERN_ERR "unable to register timer device (%i)\n",
 			   err);
 	return 0;
-- 
cgit v1.2.3-70-g09d2


From 6983b7240cd229787c3ee00e663ea94ea649d96a Mon Sep 17 00:00:00 2001
From: Clemens Ladisch <clemens@ladisch.de>
Date: Sun, 20 Nov 2005 14:05:49 +0100
Subject: [ALSA] dynamic minors (2/6): simplify storage of snd_minor structures

Modules: ALSA Core

Store the snd_minor structure pointers in one array instead of using a
separate list for each card.  This simplifies the mapping from device
files to minor struct by removing the need to know about the encoding
of the card number in the minor number.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
---
 include/sound/core.h   |  5 +---
 sound/core/sound.c     | 72 ++++++++++++++++++++------------------------------
 sound/core/sound_oss.c | 64 ++++++++++++++------------------------------
 3 files changed, 49 insertions(+), 92 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/core.h b/include/sound/core.h
index f557c8ac450..67b0a7e764e 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -183,9 +183,8 @@ static inline int snd_power_wait(struct snd_card *card, unsigned int state, stru
 #endif /* CONFIG_PM */
 
 struct snd_minor {
-	struct list_head list;		/* list of all minors per card */
-	int number;			/* minor number */
 	int type;			/* SNDRV_DEVICE_TYPE_XXX */
+	int card;			/* card number */
 	int device;			/* device number */
 	struct file_operations *f_ops;	/* file operations */
 	char name[0];			/* device name (keep at the end of
@@ -217,11 +216,9 @@ int snd_minor_info_done(void);
 #ifdef CONFIG_SND_OSSEMUL
 int snd_minor_info_oss_init(void);
 int snd_minor_info_oss_done(void);
-int snd_oss_init_module(void);
 #else
 #define snd_minor_info_oss_init() /*NOP*/
 #define snd_minor_info_oss_done() /*NOP*/
-#define snd_oss_init_module() 0
 #endif
 
 /* memory.c */
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 798c24c2de2..a509f49fa0b 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -59,7 +59,7 @@ MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR);
  */
 int snd_ecards_limit;
 
-static struct list_head snd_minors_hash[SNDRV_CARDS];
+static struct snd_minor *snd_minors[SNDRV_OS_MINORS];
 
 static DECLARE_MUTEX(sound_mutex);
 
@@ -107,19 +107,6 @@ static void snd_request_other(int minor)
 
 #endif				/* request_module support */
 
-static struct snd_minor *snd_minor_search(int minor)
-{
-	struct list_head *list;
-	struct snd_minor *mptr;
-
-	list_for_each(list, &snd_minors_hash[SNDRV_MINOR_CARD(minor)]) {
-		mptr = list_entry(list, struct snd_minor, list);
-		if (mptr->number == minor)
-			return mptr;
-	}
-	return NULL;
-}
-
 static int snd_open(struct inode *inode, struct file *file)
 {
 	int minor = iminor(inode);
@@ -139,11 +126,11 @@ static int snd_open(struct inode *inode, struct file *file)
 		}
 	} else {
 #ifdef CONFIG_KMOD
-		if ((mptr = snd_minor_search(minor)) == NULL)
+		if ((mptr = snd_minors[minor]) == NULL)
 			snd_request_other(minor);
 #endif
 	}
-	if (mptr == NULL && (mptr = snd_minor_search(minor)) == NULL)
+	if (mptr == NULL && (mptr = snd_minors[minor]) == NULL)
 		return -ENODEV;
 	old_fops = file->f_op;
 	file->f_op = fops_get(mptr->f_ops);
@@ -213,22 +200,22 @@ int snd_register_device(int type, struct snd_card *card, int dev,
 	if (minor < 0)
 		return minor;
 	snd_assert(name, return -EINVAL);
-	preg = kzalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL);
+	preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL);
 	if (preg == NULL)
 		return -ENOMEM;
-	preg->number = minor;
 	preg->type = type;
+	preg->card = card ? card->number : -1;
 	preg->device = dev;
 	preg->f_ops = f_ops;
 	strcpy(preg->name, name);
 	down(&sound_mutex);
-	if (snd_minor_search(minor)) {
+	if (snd_minors[minor]) {
 		up(&sound_mutex);
 		kfree(preg);
 		return -EBUSY;
 	}
-	list_add_tail(&preg->list, &snd_minors_hash[SNDRV_MINOR_CARD(minor)]);
-	if (strncmp(name, "controlC", 8) || card->number >= cards_limit)
+	snd_minors[minor] = preg;
+	if (type != SNDRV_DEVICE_TYPE_CONTROL || preg->card >= cards_limit)
 		devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name);
 	if (card)
 		device = card->dev;
@@ -257,16 +244,17 @@ int snd_unregister_device(int type, struct snd_card *card, int dev)
 	if (minor < 0)
 		return minor;
 	down(&sound_mutex);
-	if ((mptr = snd_minor_search(minor)) == NULL) {
+	if ((mptr = snd_minors[minor]) == NULL) {
 		up(&sound_mutex);
 		return -EINVAL;
 	}
 
-	if (strncmp(mptr->name, "controlC", 8) || card->number >= cards_limit) /* created in sound.c */
+	if (mptr->type != SNDRV_DEVICE_TYPE_CONTROL ||
+	    mptr->card >= cards_limit)			/* created in sound.c */
 		devfs_remove("snd/%s", mptr->name);
 	class_device_destroy(sound_class, MKDEV(major, minor));
 
-	list_del(&mptr->list);
+	snd_minors[minor] = NULL;
 	up(&sound_mutex);
 	kfree(mptr);
 	return 0;
@@ -302,23 +290,25 @@ static const char *snd_device_type_name(int type)
 
 static void snd_minor_info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
 {
-	int card, device;
-	struct list_head *list;
+	int minor;
 	struct snd_minor *mptr;
 
 	down(&sound_mutex);
-	for (card = 0; card < SNDRV_CARDS; card++) {
-		list_for_each(list, &snd_minors_hash[card]) {
-			mptr = list_entry(list, struct snd_minor, list);
-			if (SNDRV_MINOR_DEVICE(mptr->number) != SNDRV_MINOR_GLOBAL) {
-				if ((device = mptr->device) >= 0)
-					snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n", mptr->number, card, device, snd_device_type_name(mptr->type));
-				else
-					snd_iprintf(buffer, "%3i: [%i]   : %s\n", mptr->number, card, snd_device_type_name(mptr->type));
-			} else {
-				snd_iprintf(buffer, "%3i:       : %s\n", mptr->number, snd_device_type_name(mptr->type));
-			}
-		}
+	for (minor = 0; minor < SNDRV_OS_MINORS; ++minor) {
+		if (!(mptr = snd_minors[minor]))
+			continue;
+		if (mptr->card >= 0) {
+			if (mptr->device >= 0)
+				snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n",
+					    minor, mptr->card, mptr->device,
+					    snd_device_type_name(mptr->type));
+			else
+				snd_iprintf(buffer, "%3i: [%i]   : %s\n",
+					    minor, mptr->card,
+					    snd_device_type_name(mptr->type));
+		} else
+			snd_iprintf(buffer, "%3i:       : %s\n", minor,
+				    snd_device_type_name(mptr->type));
 	}
 	up(&sound_mutex);
 }
@@ -354,15 +344,9 @@ int __exit snd_minor_info_done(void)
 static int __init alsa_sound_init(void)
 {
 	short controlnum;
-	int err;
-	int card;
 
 	snd_major = major;
 	snd_ecards_limit = cards_limit;
-	for (card = 0; card < SNDRV_CARDS; card++)
-		INIT_LIST_HEAD(&snd_minors_hash[card]);
-	if ((err = snd_oss_init_module()) < 0)
-		return err;
 	devfs_mk_dir("snd");
 	if (register_chrdev(major, "alsa", &snd_fops)) {
 		snd_printk(KERN_ERR "unable to register native major device number %d\n", major);
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index 4d189ffaa76..afbfd8df129 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -35,25 +35,12 @@
 #include <sound/info.h>
 #include <linux/sound.h>
 
-#define SNDRV_OS_MINORS		256
+#define SNDRV_OSS_MINORS 128
 
-static struct list_head snd_oss_minors_hash[SNDRV_CARDS];
+static struct snd_minor *snd_oss_minors[SNDRV_OSS_MINORS];
 
 static DECLARE_MUTEX(sound_oss_mutex);
 
-static struct snd_minor *snd_oss_minor_search(int minor)
-{
-	struct list_head *list;
-	struct snd_minor *mptr;
-
-	list_for_each(list, &snd_oss_minors_hash[SNDRV_MINOR_OSS_CARD(minor)]) {
-		mptr = list_entry(list, struct snd_minor, list);
-		if (mptr->number == minor)
-			return mptr;
-	}
-	return NULL;
-}
-
 static int snd_oss_kernel_minor(int type, struct snd_card *card, int dev)
 {
 	int minor;
@@ -86,7 +73,7 @@ static int snd_oss_kernel_minor(int type, struct snd_card *card, int dev)
 	default:
 		return -EINVAL;
 	}
-	snd_assert(minor >= 0 && minor < SNDRV_OS_MINORS, return -EINVAL);
+	snd_assert(minor >= 0 && minor < SNDRV_OSS_MINORS, return -EINVAL);
 	return minor;
 }
 
@@ -103,15 +90,15 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev,
 
 	if (minor < 0)
 		return minor;
-	preg = kzalloc(sizeof(struct snd_minor), GFP_KERNEL);
+	preg = kmalloc(sizeof(struct snd_minor), GFP_KERNEL);
 	if (preg == NULL)
 		return -ENOMEM;
-	preg->number = minor;
 	preg->type = type;
+	preg->card = card ? card->number : -1;
 	preg->device = dev;
 	preg->f_ops = f_ops;
 	down(&sound_oss_mutex);
-	list_add_tail(&preg->list, &snd_oss_minors_hash[cidx]);
+	snd_oss_minors[minor] = preg;
 	minor_unit = SNDRV_MINOR_OSS_DEVICE(minor);
 	switch (minor_unit) {
 	case SNDRV_MINOR_OSS_PCM:
@@ -143,7 +130,7 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev,
       		unregister_sound_special(register2);
       	if (register1 >= 0)
       		unregister_sound_special(register1);
-      	list_del(&preg->list);
+	snd_oss_minors[minor] = NULL;
 	up(&sound_oss_mutex);
 	kfree(preg);
       	return -EBUSY;
@@ -159,7 +146,7 @@ int snd_unregister_oss_device(int type, struct snd_card *card, int dev)
 	if (minor < 0)
 		return minor;
 	down(&sound_oss_mutex);
-	mptr = snd_oss_minor_search(minor);
+	mptr = snd_oss_minors[minor];
 	if (mptr == NULL) {
 		up(&sound_oss_mutex);
 		return -ENOENT;
@@ -178,7 +165,7 @@ int snd_unregister_oss_device(int type, struct snd_card *card, int dev)
 	}
 	if (track2 >= 0)
 		unregister_sound_special(track2);
-	list_del(&mptr->list);
+	snd_oss_minors[minor] = NULL;
 	up(&sound_oss_mutex);
 	kfree(mptr);
 	return 0;
@@ -214,22 +201,20 @@ static const char *snd_oss_device_type_name(int type)
 static void snd_minor_info_oss_read(struct snd_info_entry *entry,
 				    struct snd_info_buffer *buffer)
 {
-	int card, dev;
-	struct list_head *list;
+	int minor;
 	struct snd_minor *mptr;
 
 	down(&sound_oss_mutex);
-	for (card = 0; card < SNDRV_CARDS; card++) {
-		list_for_each(list, &snd_oss_minors_hash[card]) {
-			mptr = list_entry(list, struct snd_minor, list);
-			dev = SNDRV_MINOR_OSS_DEVICE(mptr->number);
-		        if (dev != SNDRV_MINOR_OSS_SNDSTAT &&
-			    dev != SNDRV_MINOR_OSS_SEQUENCER &&
-			    dev != SNDRV_MINOR_OSS_MUSIC)
-				snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n", mptr->number, card, dev, snd_oss_device_type_name(mptr->type));
-			else
-				snd_iprintf(buffer, "%3i:       : %s\n", mptr->number, snd_oss_device_type_name(mptr->type));
-		}
+	for (minor = 0; minor < SNDRV_OSS_MINORS; ++minor) {
+		if (!(mptr = snd_oss_minors[minor]))
+			continue;
+		if (mptr->card >= 0)
+			snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n", minor,
+				    mptr->card, mptr->device,
+				    snd_oss_device_type_name(mptr->type));
+		else
+			snd_iprintf(buffer, "%3i:       : %s\n", minor,
+				    snd_oss_device_type_name(mptr->type));
 	}
 	up(&sound_oss_mutex);
 }
@@ -264,13 +249,4 @@ int __exit snd_minor_info_oss_done(void)
 	return 0;
 }
 
-int __init snd_oss_init_module(void)
-{
-	int card;
-	
-	for (card = 0; card < SNDRV_CARDS; card++)
-		INIT_LIST_HEAD(&snd_oss_minors_hash[card]);
-	return 0;
-}
-
 #endif /* CONFIG_SND_OSSEMUL */
-- 
cgit v1.2.3-70-g09d2


From f87135f56cb266e031f5ec081dfbde7e43f55e80 Mon Sep 17 00:00:00 2001
From: Clemens Ladisch <clemens@ladisch.de>
Date: Sun, 20 Nov 2005 14:06:59 +0100
Subject: [ALSA] dynamic minors (3/6): store device-specific object pointers
 dynamically

Instead of storing the pointers to the device-specific structures in an
array, put them into the struct snd_minor, and look them up dynamically.

This makes the device type modules independent of the minor number
encoding.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
---
 include/sound/core.h           |   9 +++-
 include/sound/hwdep.h          |   1 +
 include/sound/pcm.h            |   2 +-
 include/sound/rawmidi.h        |   6 +--
 sound/core/control.c           |   7 ++-
 sound/core/hwdep.c             |  91 +++++++++++++++----------------
 sound/core/oss/mixer_oss.c     |   7 +--
 sound/core/oss/pcm_oss.c       |  14 ++---
 sound/core/pcm.c               | 118 +++++++++++++++++++++++------------------
 sound/core/pcm_native.c        |  40 +++++++++-----
 sound/core/rawmidi.c           |  87 +++++++++++++++---------------
 sound/core/seq/oss/seq_oss.c   |   4 +-
 sound/core/seq/seq_clientmgr.c |   2 +-
 sound/core/seq/seq_midi.c      |  10 +++-
 sound/core/sound.c             |  46 +++++++++++++---
 sound/core/sound_oss.c         |  27 ++++++++--
 sound/core/timer.c             |   4 +-
 17 files changed, 278 insertions(+), 197 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/core.h b/include/sound/core.h
index 67b0a7e764e..90ac6132ea3 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -187,6 +187,7 @@ struct snd_minor {
 	int card;			/* card number */
 	int device;			/* device number */
 	struct file_operations *f_ops;	/* file operations */
+	void *private_data;		/* private data for f_ops->open */
 	char name[0];			/* device name (keep at the end of
 								structure) */
 };
@@ -199,13 +200,17 @@ extern int snd_ecards_limit;
 void snd_request_card(int card);
 
 int snd_register_device(int type, struct snd_card *card, int dev,
-			struct file_operations *f_ops, const char *name);
+			struct file_operations *f_ops, void *private_data,
+			const char *name);
 int snd_unregister_device(int type, struct snd_card *card, int dev);
+void *snd_lookup_minor_data(unsigned int minor, int type);
 
 #ifdef CONFIG_SND_OSSEMUL
 int snd_register_oss_device(int type, struct snd_card *card, int dev,
-			    struct file_operations *f_ops, const char *name);
+			    struct file_operations *f_ops, void *private_data,
+			    const char *name);
 int snd_unregister_oss_device(int type, struct snd_card *card, int dev);
+void *snd_lookup_oss_minor_data(unsigned int minor, int type);
 #endif
 
 int snd_minor_info_init(void);
diff --git a/include/sound/hwdep.h b/include/sound/hwdep.h
index 04b20bc4f14..c679e5b3111 100644
--- a/include/sound/hwdep.h
+++ b/include/sound/hwdep.h
@@ -43,6 +43,7 @@ struct snd_hwdep_ops {
 
 struct snd_hwdep {
 	struct snd_card *card;
+	struct list_head list;
 	int device;
 	char id[32];
 	char name[80];
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 5e29b0e0f21..314268a1104 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -412,6 +412,7 @@ struct snd_pcm_str {
 
 struct snd_pcm {
 	struct snd_card *card;
+	struct list_head list;
 	unsigned int device;	/* device number */
 	unsigned int info_flags;
 	unsigned short dev_class;
@@ -439,7 +440,6 @@ struct snd_pcm_notify {
  *  Registering
  */
 
-extern struct snd_pcm *snd_pcm_devices[];
 extern struct file_operations snd_pcm_f_ops[2];
 
 int snd_pcm_new(struct snd_card *card, char *id, int device,
diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h
index 9492a32c102..d19bddfbf99 100644
--- a/include/sound/rawmidi.h
+++ b/include/sound/rawmidi.h
@@ -113,7 +113,7 @@ struct snd_rawmidi_str {
 
 struct snd_rawmidi {
 	struct snd_card *card;
-
+	struct list_head list;
 	unsigned int device;		/* device number */
 	unsigned int info_flags;	/* SNDRV_RAWMIDI_INFO_XXXX */
 	char id[64];
@@ -165,8 +165,8 @@ int snd_rawmidi_transmit(struct snd_rawmidi_substream *substream,
 /* main midi functions */
 
 int snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info);
-int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice, int mode,
-			    struct snd_rawmidi_file *rfile);
+int snd_rawmidi_kernel_open(struct snd_card *card, int device, int subdevice,
+			    int mode, struct snd_rawmidi_file *rfile);
 int snd_rawmidi_kernel_release(struct snd_rawmidi_file *rfile);
 int snd_rawmidi_output_params(struct snd_rawmidi_substream *substream,
 			      struct snd_rawmidi_params *params);
diff --git a/sound/core/control.c b/sound/core/control.c
index 23561e74712..abd62f94372 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -47,13 +47,12 @@ static LIST_HEAD(snd_control_compat_ioctls);
 
 static int snd_ctl_open(struct inode *inode, struct file *file)
 {
-	int cardnum = SNDRV_MINOR_CARD(iminor(inode));
 	unsigned long flags;
 	struct snd_card *card;
 	struct snd_ctl_file *ctl;
 	int err;
 
-	card = snd_cards[cardnum];
+	card = snd_lookup_minor_data(iminor(inode), SNDRV_DEVICE_TYPE_CONTROL);
 	if (!card) {
 		err = -ENODEV;
 		goto __error1;
@@ -1277,8 +1276,8 @@ static int snd_ctl_dev_register(struct snd_device *device)
 	cardnum = card->number;
 	snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO);
 	sprintf(name, "controlC%i", cardnum);
-	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_CONTROL,
-				       card, -1, &snd_ctl_f_ops, name)) < 0)
+	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_CONTROL, card, -1,
+				       &snd_ctl_f_ops, card, name)) < 0)
 		return err;
 	return 0;
 }
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index 27d5bf7266f..b8c0c8c4d12 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -35,8 +35,7 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("Hardware dependent layer");
 MODULE_LICENSE("GPL");
 
-static struct snd_hwdep *snd_hwdep_devices[SNDRV_CARDS * SNDRV_MINOR_HWDEPS];
-
+static LIST_HEAD(snd_hwdep_devices);
 static DECLARE_MUTEX(register_mutex);
 
 static int snd_hwdep_free(struct snd_hwdep *hwdep);
@@ -44,9 +43,19 @@ static int snd_hwdep_dev_free(struct snd_device *device);
 static int snd_hwdep_dev_register(struct snd_device *device);
 static int snd_hwdep_dev_unregister(struct snd_device *device);
 
-/*
 
- */
+static struct snd_hwdep *snd_hwdep_search(struct snd_card *card, int device)
+{
+	struct list_head *p;
+	struct snd_hwdep *hwdep;
+
+	list_for_each(p, &snd_hwdep_devices) {
+		hwdep = list_entry(p, struct snd_hwdep, list);
+		if (hwdep->card == card && hwdep->device == device)
+			return hwdep;
+	}
+	return NULL;
+}
 
 static loff_t snd_hwdep_llseek(struct file * file, loff_t offset, int orig)
 {
@@ -77,34 +86,25 @@ static ssize_t snd_hwdep_write(struct file * file, const char __user *buf,
 static int snd_hwdep_open(struct inode *inode, struct file * file)
 {
 	int major = imajor(inode);
-	int cardnum;
-	int device;
 	struct snd_hwdep *hw;
 	int err;
 	wait_queue_t wait;
 
 	if (major == snd_major) {
-		cardnum = SNDRV_MINOR_CARD(iminor(inode));
-		device = SNDRV_MINOR_DEVICE(iminor(inode)) - SNDRV_MINOR_HWDEP;
+		hw = snd_lookup_minor_data(iminor(inode),
+					   SNDRV_DEVICE_TYPE_HWDEP);
 #ifdef CONFIG_SND_OSSEMUL
 	} else if (major == SOUND_MAJOR) {
-		cardnum = SNDRV_MINOR_OSS_CARD(iminor(inode));
-		device = 0;
+		hw = snd_lookup_oss_minor_data(iminor(inode),
+					       SNDRV_OSS_DEVICE_TYPE_DMFM);
 #endif
 	} else
 		return -ENXIO;
-	cardnum %= SNDRV_CARDS;
-	device %= SNDRV_MINOR_HWDEPS;
-	hw = snd_hwdep_devices[(cardnum * SNDRV_MINOR_HWDEPS) + device];
 	if (hw == NULL)
 		return -ENODEV;
 
 	if (!hw->ops.open)
 		return -ENXIO;
-#ifdef CONFIG_SND_OSSEMUL
-	if (major == SOUND_MAJOR && hw->oss_type < 0)
-		return -ENXIO;
-#endif
 
 	if (!try_module_get(hw->card->module))
 		return -EFAULT;
@@ -265,9 +265,6 @@ static int snd_hwdep_control_ioctl(struct snd_card *card,
 				   struct snd_ctl_file * control,
 				   unsigned int cmd, unsigned long arg)
 {
-	unsigned int tmp;
-	
-	tmp = card->number * SNDRV_MINOR_HWDEPS;
 	switch (cmd) {
 	case SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE:
 		{
@@ -275,14 +272,16 @@ static int snd_hwdep_control_ioctl(struct snd_card *card,
 
 			if (get_user(device, (int __user *)arg))
 				return -EFAULT;
+			down(&register_mutex);
 			device = device < 0 ? 0 : device + 1;
 			while (device < SNDRV_MINOR_HWDEPS) {
-				if (snd_hwdep_devices[tmp + device])
+				if (snd_hwdep_search(card, device))
 					break;
 				device++;
 			}
 			if (device >= SNDRV_MINOR_HWDEPS)
 				device = -1;
+			up(&register_mutex);
 			if (put_user(device, (int __user *)arg))
 				return -EFAULT;
 			return 0;
@@ -290,17 +289,19 @@ static int snd_hwdep_control_ioctl(struct snd_card *card,
 	case SNDRV_CTL_IOCTL_HWDEP_INFO:
 		{
 			struct snd_hwdep_info __user *info = (struct snd_hwdep_info __user *)arg;
-			int device;
+			int device, err;
 			struct snd_hwdep *hwdep;
 
 			if (get_user(device, &info->device))
 				return -EFAULT;
-			if (device < 0 || device >= SNDRV_MINOR_HWDEPS)
-				return -ENXIO;
-			hwdep = snd_hwdep_devices[tmp + device];
-			if (hwdep == NULL)
-				return -ENXIO;
-			return snd_hwdep_info(hwdep, info);
+			down(&register_mutex);
+			hwdep = snd_hwdep_search(card, device);
+			if (hwdep)
+				err = snd_hwdep_info(hwdep, info);
+			else
+				err = -ENXIO;
+			up(&register_mutex);
+			return err;
 		}
 	}
 	return -ENOIOCTLCMD;
@@ -397,23 +398,22 @@ static int snd_hwdep_dev_free(struct snd_device *device)
 static int snd_hwdep_dev_register(struct snd_device *device)
 {
 	struct snd_hwdep *hwdep = device->device_data;
-	int idx, err;
+	int err;
 	char name[32];
 
 	down(&register_mutex);
-	idx = (hwdep->card->number * SNDRV_MINOR_HWDEPS) + hwdep->device;
-	if (snd_hwdep_devices[idx]) {
+	if (snd_hwdep_search(hwdep->card, hwdep->device)) {
 		up(&register_mutex);
 		return -EBUSY;
 	}
-	snd_hwdep_devices[idx] = hwdep;
+	list_add_tail(&hwdep->list, &snd_hwdep_devices);
 	sprintf(name, "hwC%iD%i", hwdep->card->number, hwdep->device);
 	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_HWDEP,
 				       hwdep->card, hwdep->device,
-				       &snd_hwdep_f_ops, name)) < 0) {
+				       &snd_hwdep_f_ops, hwdep, name)) < 0) {
 		snd_printk(KERN_ERR "unable to register hardware dependent device %i:%i\n",
 			   hwdep->card->number, hwdep->device);
-		snd_hwdep_devices[idx] = NULL;
+		list_del(&hwdep->list);
 		up(&register_mutex);
 		return err;
 	}
@@ -425,7 +425,7 @@ static int snd_hwdep_dev_register(struct snd_device *device)
 		} else {
 			if (snd_register_oss_device(hwdep->oss_type,
 						    hwdep->card, hwdep->device,
-						    &snd_hwdep_f_ops,
+						    &snd_hwdep_f_ops, hwdep,
 						    hwdep->oss_dev) < 0) {
 				snd_printk(KERN_ERR "unable to register OSS compatibility device %i:%i\n",
 					   hwdep->card->number, hwdep->device);
@@ -441,12 +441,10 @@ static int snd_hwdep_dev_register(struct snd_device *device)
 static int snd_hwdep_dev_unregister(struct snd_device *device)
 {
 	struct snd_hwdep *hwdep = device->device_data;
-	int idx;
 
 	snd_assert(hwdep != NULL, return -ENXIO);
 	down(&register_mutex);
-	idx = (hwdep->card->number * SNDRV_MINOR_HWDEPS) + hwdep->device;
-	if (snd_hwdep_devices[idx] != hwdep) {
+	if (snd_hwdep_search(hwdep->card, hwdep->device) != hwdep) {
 		up(&register_mutex);
 		return -EINVAL;
 	}
@@ -455,7 +453,7 @@ static int snd_hwdep_dev_unregister(struct snd_device *device)
 		snd_unregister_oss_device(hwdep->oss_type, hwdep->card, hwdep->device);
 #endif
 	snd_unregister_device(SNDRV_DEVICE_TYPE_HWDEP, hwdep->card, hwdep->device);
-	snd_hwdep_devices[idx] = NULL;
+	list_del(&hwdep->list);
 	up(&register_mutex);
 	return snd_hwdep_free(hwdep);
 }
@@ -467,18 +465,14 @@ static int snd_hwdep_dev_unregister(struct snd_device *device)
 static void snd_hwdep_proc_read(struct snd_info_entry *entry,
 				struct snd_info_buffer *buffer)
 {
-	int idx;
+	struct list_head *p;
 	struct snd_hwdep *hwdep;
 
 	down(&register_mutex);
-	for (idx = 0; idx < SNDRV_CARDS * SNDRV_MINOR_HWDEPS; idx++) {
-		hwdep = snd_hwdep_devices[idx];
-		if (hwdep == NULL)
-			continue;
+	list_for_each(p, &snd_hwdep_devices) {
+		hwdep = list_entry(p, struct snd_hwdep, list);
 		snd_iprintf(buffer, "%02i-%02i: %s\n",
-					idx / SNDRV_MINOR_HWDEPS,
-					idx % SNDRV_MINOR_HWDEPS,
-					hwdep->name);
+			    hwdep->card->number, hwdep->device, hwdep->name);
 	}
 	up(&register_mutex);
 }
@@ -493,9 +487,8 @@ static int __init alsa_hwdep_init(void)
 {
 	struct snd_info_entry *entry;
 
-	memset(snd_hwdep_devices, 0, sizeof(snd_hwdep_devices));
 	if ((entry = snd_info_create_module_entry(THIS_MODULE, "hwdep", NULL)) != NULL) {
-		entry->c.text.read_size = 512;
+		entry->c.text.read_size = PAGE_SIZE;
 		entry->c.text.read = snd_hwdep_proc_read;
 		if (snd_info_register(entry) < 0) {
 			snd_info_free_entry(entry);
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index 2dd6bf9b49e..2d7a42014f5 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -41,12 +41,13 @@ MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MIXER);
 
 static int snd_mixer_oss_open(struct inode *inode, struct file *file)
 {
-	int cardnum = SNDRV_MINOR_OSS_CARD(iminor(inode));
 	struct snd_card *card;
 	struct snd_mixer_oss_file *fmixer;
 	int err;
 
-	if ((card = snd_cards[cardnum]) == NULL)
+	card = snd_lookup_oss_minor_data(iminor(inode),
+					 SNDRV_OSS_DEVICE_TYPE_MIXER);
+	if (card == NULL)
 		return -ENODEV;
 	if (card->mixer_oss == NULL)
 		return -ENODEV;
@@ -1286,7 +1287,7 @@ static int snd_mixer_oss_notify_handler(struct snd_card *card, int cmd)
 		sprintf(name, "mixer%i%i", card->number, 0);
 		if ((err = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIXER,
 						   card, 0,
-						   &snd_mixer_oss_f_ops,
+						   &snd_mixer_oss_f_ops, card,
 						   name)) < 0) {
 			snd_printk(KERN_ERR "unable to register OSS mixer device %i:%i\n",
 				   card->number, 0);
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 947bf08df42..2ae283c7b28 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1834,9 +1834,6 @@ static int snd_task_name(struct task_struct *task, char *name, size_t size)
 
 static int snd_pcm_oss_open(struct inode *inode, struct file *file)
 {
-	int minor = iminor(inode);
-	int cardnum = SNDRV_MINOR_OSS_CARD(minor);
-	int device;
 	int err;
 	char task_name[32];
 	struct snd_pcm *pcm;
@@ -1845,11 +1842,8 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file)
 	int nonblock;
 	wait_queue_t wait;
 
-	snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO);
-	device = SNDRV_MINOR_OSS_DEVICE(minor) == SNDRV_MINOR_OSS_PCM1 ?
-		adsp_map[cardnum] : dsp_map[cardnum];
-
-	pcm = snd_pcm_devices[(cardnum * SNDRV_PCM_DEVICES) + device];
+	pcm = snd_lookup_oss_minor_data(iminor(inode),
+					SNDRV_OSS_DEVICE_TYPE_PCM);
 	if (pcm == NULL) {
 		err = -ENODEV;
 		goto __error1;
@@ -1890,7 +1884,7 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file)
 	down(&pcm->open_mutex);
 	while (1) {
 		err = snd_pcm_oss_open_file(file, pcm, &pcm_oss_file,
-					    minor, psetup, csetup);
+					    iminor(inode), psetup, csetup);
 		if (err >= 0)
 			break;
 		if (err == -EAGAIN) {
@@ -2450,7 +2444,7 @@ static void register_oss_dsp(struct snd_pcm *pcm, int index)
 	sprintf(name, "dsp%i%i", pcm->card->number, pcm->device);
 	if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM,
 				    pcm->card, index, &snd_pcm_oss_f_reg,
-				    name) < 0) {
+				    pcm, name) < 0) {
 		snd_printk(KERN_ERR "unable to register OSS PCM device %i:%i\n",
 			   pcm->card->number, pcm->device);
 	}
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 2bc5f69ec2a..95036c83de4 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -33,7 +33,7 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>, Abramo Bagnara <abramo@alsa-proj
 MODULE_DESCRIPTION("Midlevel PCM code for ALSA.");
 MODULE_LICENSE("GPL");
 
-struct snd_pcm *snd_pcm_devices[SNDRV_CARDS * SNDRV_PCM_DEVICES];
+static LIST_HEAD(snd_pcm_devices);
 static LIST_HEAD(snd_pcm_notify_list);
 static DECLARE_MUTEX(register_mutex);
 
@@ -43,13 +43,23 @@ static int snd_pcm_dev_register(struct snd_device *device);
 static int snd_pcm_dev_disconnect(struct snd_device *device);
 static int snd_pcm_dev_unregister(struct snd_device *device);
 
+static struct snd_pcm *snd_pcm_search(struct snd_card *card, int device)
+{
+	struct list_head *p;
+	struct snd_pcm *pcm;
+
+	list_for_each(p, &snd_pcm_devices) {
+		pcm = list_entry(p, struct snd_pcm, list);
+		if (pcm->card == card && pcm->device == device)
+			return pcm;
+	}
+	return NULL;
+}
+
 static int snd_pcm_control_ioctl(struct snd_card *card,
 				 struct snd_ctl_file *control,
 				 unsigned int cmd, unsigned long arg)
 {
-	unsigned int tmp;
-
-	tmp = card->number * SNDRV_PCM_DEVICES;
 	switch (cmd) {
 	case SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE:
 		{
@@ -57,14 +67,16 @@ static int snd_pcm_control_ioctl(struct snd_card *card,
 
 			if (get_user(device, (int __user *)arg))
 				return -EFAULT;
+			down(&register_mutex);
 			device = device < 0 ? 0 : device + 1;
 			while (device < SNDRV_PCM_DEVICES) {
-				if (snd_pcm_devices[tmp + device])
+				if (snd_pcm_search(card, device))
 					break;
 				device++;
 			}
 			if (device == SNDRV_PCM_DEVICES)
 				device = -1;
+			up(&register_mutex);
 			if (put_user(device, (int __user *)arg))
 				return -EFAULT;
 			return 0;
@@ -77,31 +89,44 @@ static int snd_pcm_control_ioctl(struct snd_card *card,
 			struct snd_pcm *pcm;
 			struct snd_pcm_str *pstr;
 			struct snd_pcm_substream *substream;
+			int err;
+
 			info = (struct snd_pcm_info __user *)arg;
 			if (get_user(device, &info->device))
 				return -EFAULT;
-			if (device >= SNDRV_PCM_DEVICES)
-				return -ENXIO;
-			pcm = snd_pcm_devices[tmp + device];
-			if (pcm == NULL)
-				return -ENXIO;
 			if (get_user(stream, &info->stream))
 				return -EFAULT;
 			if (stream < 0 || stream > 1)
 				return -EINVAL;
-			pstr = &pcm->streams[stream];
-			if (pstr->substream_count == 0)
-				return -ENOENT;
 			if (get_user(subdevice, &info->subdevice))
 				return -EFAULT;
-			if (subdevice >= pstr->substream_count)
-				return -ENXIO;
-			for (substream = pstr->substream; substream; substream = substream->next)
+			down(&register_mutex);
+			pcm = snd_pcm_search(card, device);
+			if (pcm == NULL) {
+				err = -ENXIO;
+				goto _error;
+			}
+			pstr = &pcm->streams[stream];
+			if (pstr->substream_count == 0) {
+				err = -ENOENT;
+				goto _error;
+			}
+			if (subdevice >= pstr->substream_count) {
+				err = -ENXIO;
+				goto _error;
+			}
+			for (substream = pstr->substream; substream;
+			     substream = substream->next)
 				if (substream->number == (int)subdevice)
 					break;
-			if (substream == NULL)
-				return -ENXIO;
-			return snd_pcm_info_user(substream, info);
+			if (substream == NULL) {
+				err = -ENXIO;
+				goto _error;
+			}
+			err = snd_pcm_info_user(substream, info);
+		_error:
+			up(&register_mutex);
+			return err;
 		}
 	case SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE:
 		{
@@ -865,8 +890,7 @@ void snd_pcm_release_substream(struct snd_pcm_substream *substream)
 
 static int snd_pcm_dev_register(struct snd_device *device)
 {
-	int idx, cidx, err;
-	unsigned short minor;
+	int cidx, err;
 	struct snd_pcm_substream *substream;
 	struct list_head *list;
 	char str[16];
@@ -874,12 +898,11 @@ static int snd_pcm_dev_register(struct snd_device *device)
 
 	snd_assert(pcm != NULL && device != NULL, return -ENXIO);
 	down(&register_mutex);
-	idx = (pcm->card->number * SNDRV_PCM_DEVICES) + pcm->device;
-	if (snd_pcm_devices[idx]) {
+	if (snd_pcm_search(pcm->card, pcm->device)) {
 		up(&register_mutex);
 		return -EBUSY;
 	}
-	snd_pcm_devices[idx] = pcm;
+	list_add_tail(&pcm->list, &snd_pcm_devices);
 	for (cidx = 0; cidx < 2; cidx++) {
 		int devtype = -1;
 		if (pcm->streams[cidx].substream == NULL)
@@ -887,20 +910,19 @@ static int snd_pcm_dev_register(struct snd_device *device)
 		switch (cidx) {
 		case SNDRV_PCM_STREAM_PLAYBACK:
 			sprintf(str, "pcmC%iD%ip", pcm->card->number, pcm->device);
-			minor = SNDRV_MINOR_PCM_PLAYBACK + idx;
 			devtype = SNDRV_DEVICE_TYPE_PCM_PLAYBACK;
 			break;
 		case SNDRV_PCM_STREAM_CAPTURE:
 			sprintf(str, "pcmC%iD%ic", pcm->card->number, pcm->device);
-			minor = SNDRV_MINOR_PCM_CAPTURE + idx;
 			devtype = SNDRV_DEVICE_TYPE_PCM_CAPTURE;
 			break;
 		}
 		if ((err = snd_register_device(devtype, pcm->card,
 					       pcm->device,
-					       &snd_pcm_f_ops[cidx], str)) < 0)
+					       &snd_pcm_f_ops[cidx],
+					       pcm, str)) < 0)
 		{
-			snd_pcm_devices[idx] = NULL;
+			list_del(&pcm->list);
 			up(&register_mutex);
 			return err;
 		}
@@ -921,11 +943,10 @@ static int snd_pcm_dev_disconnect(struct snd_device *device)
 	struct snd_pcm *pcm = device->device_data;
 	struct list_head *list;
 	struct snd_pcm_substream *substream;
-	int idx, cidx;
+	int cidx;
 
 	down(&register_mutex);
-	idx = (pcm->card->number * SNDRV_PCM_DEVICES) + pcm->device;
-	snd_pcm_devices[idx] = NULL;
+	list_del_init(&pcm->list);
 	for (cidx = 0; cidx < 2; cidx++)
 		for (substream = pcm->streams[cidx].substream; substream; substream = substream->next)
 			if (substream->runtime)
@@ -941,15 +962,14 @@ static int snd_pcm_dev_disconnect(struct snd_device *device)
 
 static int snd_pcm_dev_unregister(struct snd_device *device)
 {
-	int idx, cidx, devtype;
+	int cidx, devtype;
 	struct snd_pcm_substream *substream;
 	struct list_head *list;
 	struct snd_pcm *pcm = device->device_data;
 
 	snd_assert(pcm != NULL, return -ENXIO);
 	down(&register_mutex);
-	idx = (pcm->card->number * SNDRV_PCM_DEVICES) + pcm->device;
-	snd_pcm_devices[idx] = NULL;
+	list_del(&pcm->list);
 	for (cidx = 0; cidx < 2; cidx++) {
 		devtype = -1;
 		switch (cidx) {
@@ -975,24 +995,19 @@ static int snd_pcm_dev_unregister(struct snd_device *device)
 
 int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree)
 {
-	int idx;
+	struct list_head *p;
 
 	snd_assert(notify != NULL && notify->n_register != NULL && notify->n_unregister != NULL, return -EINVAL);
 	down(&register_mutex);
 	if (nfree) {
 		list_del(&notify->list);
-		for (idx = 0; idx < SNDRV_CARDS * SNDRV_PCM_DEVICES; idx++) {
-			if (snd_pcm_devices[idx] == NULL)
-				continue;
-			notify->n_unregister(snd_pcm_devices[idx]);
-		}
+		list_for_each(p, &snd_pcm_devices)
+			notify->n_unregister(list_entry(p,
+							struct snd_pcm, list));
 	} else {
 		list_add_tail(&notify->list, &snd_pcm_notify_list);
-		for (idx = 0; idx < SNDRV_CARDS * SNDRV_PCM_DEVICES; idx++) {
-			if (snd_pcm_devices[idx] == NULL)
-				continue;
-			notify->n_register(snd_pcm_devices[idx]);
-		}
+		list_for_each(p, &snd_pcm_devices)
+			notify->n_register(list_entry(p, struct snd_pcm, list));
 	}
 	up(&register_mutex);
 	return 0;
@@ -1005,16 +1020,14 @@ int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree)
 static void snd_pcm_proc_read(struct snd_info_entry *entry,
 			      struct snd_info_buffer *buffer)
 {
-	int idx;
+	struct list_head *p;
 	struct snd_pcm *pcm;
 
 	down(&register_mutex);
-	for (idx = 0; idx < SNDRV_CARDS * SNDRV_PCM_DEVICES; idx++) {
-		pcm = snd_pcm_devices[idx];
-		if (pcm == NULL)
-			continue;
-		snd_iprintf(buffer, "%02i-%02i: %s : %s", idx / SNDRV_PCM_DEVICES,
-			    idx % SNDRV_PCM_DEVICES, pcm->id, pcm->name);
+	list_for_each(p, &snd_pcm_devices) {
+		pcm = list_entry(p, struct snd_pcm, list);
+		snd_iprintf(buffer, "%02i-%02i: %s : %s",
+			    pcm->card->number, pcm->device, pcm->id, pcm->name);
 		if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream)
 			snd_iprintf(buffer, " : playback %i",
 				    pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream_count);
@@ -1063,7 +1076,6 @@ static void __exit alsa_pcm_exit(void)
 module_init(alsa_pcm_init)
 module_exit(alsa_pcm_exit)
 
-EXPORT_SYMBOL(snd_pcm_devices);
 EXPORT_SYMBOL(snd_pcm_new);
 EXPORT_SYMBOL(snd_pcm_new_stream);
 EXPORT_SYMBOL(snd_pcm_notify);
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index bb40c016135..9010306bcea 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -62,6 +62,7 @@ static int snd_pcm_hw_refine_old_user(struct snd_pcm_substream *substream,
 				      struct snd_pcm_hw_params_old __user * _oparams);
 static int snd_pcm_hw_params_old_user(struct snd_pcm_substream *substream,
 				      struct snd_pcm_hw_params_old __user * _oparams);
+static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream);
 
 /*
  *
@@ -1554,7 +1555,8 @@ static struct file *snd_pcm_file_fd(int fd)
 {
 	struct file *file;
 	struct inode *inode;
-	unsigned short minor;
+	unsigned int minor;
+
 	file = fget(fd);
 	if (!file)
 		return NULL;
@@ -1565,8 +1567,8 @@ static struct file *snd_pcm_file_fd(int fd)
 		return NULL;
 	}
 	minor = iminor(inode);
-	if (minor >= 256 || 
-	    minor % SNDRV_MINOR_DEVICES < SNDRV_MINOR_PCM_PLAYBACK) {
+	if (!snd_lookup_minor_data(minor, SNDRV_DEVICE_TYPE_PCM_PLAYBACK) &&
+	    !snd_lookup_minor_data(minor, SNDRV_DEVICE_TYPE_PCM_CAPTURE)) {
 		fput(file);
 		return NULL;
 	}
@@ -2071,18 +2073,30 @@ static int snd_pcm_open_file(struct file *file,
 	return 0;
 }
 
-static int snd_pcm_open(struct inode *inode, struct file *file)
+static int snd_pcm_playback_open(struct inode *inode, struct file *file)
+{
+	struct snd_pcm *pcm;
+
+	pcm = snd_lookup_minor_data(iminor(inode),
+				    SNDRV_DEVICE_TYPE_PCM_PLAYBACK);
+	return snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_PLAYBACK);
+}
+
+static int snd_pcm_capture_open(struct inode *inode, struct file *file)
 {
-	int cardnum = SNDRV_MINOR_CARD(iminor(inode));
-	int device = SNDRV_MINOR_DEVICE(iminor(inode));
-	int err;
 	struct snd_pcm *pcm;
+
+	pcm = snd_lookup_minor_data(iminor(inode),
+				    SNDRV_DEVICE_TYPE_PCM_CAPTURE);
+	return snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_CAPTURE);
+}
+
+static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream)
+{
+	int err;
 	struct snd_pcm_file *pcm_file;
 	wait_queue_t wait;
 
-	if (device < SNDRV_MINOR_PCM_PLAYBACK || device >= SNDRV_MINOR_DEVICES)
-		return -ENXIO;
-	pcm = snd_pcm_devices[(cardnum * SNDRV_PCM_DEVICES) + (device % SNDRV_MINOR_PCMS)];
 	if (pcm == NULL) {
 		err = -ENODEV;
 		goto __error1;
@@ -2098,7 +2112,7 @@ static int snd_pcm_open(struct inode *inode, struct file *file)
 	add_wait_queue(&pcm->open_wait, &wait);
 	down(&pcm->open_mutex);
 	while (1) {
-		err = snd_pcm_open_file(file, pcm, device >= SNDRV_MINOR_PCM_CAPTURE ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK, &pcm_file);
+		err = snd_pcm_open_file(file, pcm, stream, &pcm_file);
 		if (err >= 0)
 			break;
 		if (err == -EAGAIN) {
@@ -3375,7 +3389,7 @@ struct file_operations snd_pcm_f_ops[2] = {
 		.owner =		THIS_MODULE,
 		.write =		snd_pcm_write,
 		.writev =		snd_pcm_writev,
-		.open =			snd_pcm_open,
+		.open =			snd_pcm_playback_open,
 		.release =		snd_pcm_release,
 		.poll =			snd_pcm_playback_poll,
 		.unlocked_ioctl =	snd_pcm_playback_ioctl,
@@ -3387,7 +3401,7 @@ struct file_operations snd_pcm_f_ops[2] = {
 		.owner =		THIS_MODULE,
 		.read =			snd_pcm_read,
 		.readv =		snd_pcm_readv,
-		.open =			snd_pcm_open,
+		.open =			snd_pcm_capture_open,
 		.release =		snd_pcm_release,
 		.poll =			snd_pcm_capture_poll,
 		.unlocked_ioctl =	snd_pcm_capture_ioctl,
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 7ac77e5ddcb..e6ee0d81378 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -56,10 +56,22 @@ static int snd_rawmidi_dev_register(struct snd_device *device);
 static int snd_rawmidi_dev_disconnect(struct snd_device *device);
 static int snd_rawmidi_dev_unregister(struct snd_device *device);
 
-static struct snd_rawmidi *snd_rawmidi_devices[SNDRV_CARDS * SNDRV_RAWMIDI_DEVICES];
-
+static LIST_HEAD(snd_rawmidi_devices);
 static DECLARE_MUTEX(register_mutex);
 
+static struct snd_rawmidi *snd_rawmidi_search(struct snd_card *card, int device)
+{
+	struct list_head *p;
+	struct snd_rawmidi *rawmidi;
+
+	list_for_each(p, &snd_rawmidi_devices) {
+		rawmidi = list_entry(p, struct snd_rawmidi, list);
+		if (rawmidi->card == card && rawmidi->device == device)
+			return rawmidi;
+	}
+	return NULL;
+}
+
 static inline unsigned short snd_rawmidi_file_flags(struct file *file)
 {
 	switch (file->f_mode & (FMODE_READ | FMODE_WRITE)) {
@@ -214,7 +226,7 @@ int snd_rawmidi_drain_input(struct snd_rawmidi_substream *substream)
 	return 0;
 }
 
-int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice,
+int snd_rawmidi_kernel_open(struct snd_card *card, int device, int subdevice,
 			    int mode, struct snd_rawmidi_file * rfile)
 {
 	struct snd_rawmidi *rmidi;
@@ -225,7 +237,9 @@ int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice,
 
 	if (rfile)
 		rfile->input = rfile->output = NULL;
-	rmidi = snd_rawmidi_devices[(cardnum * SNDRV_RAWMIDI_DEVICES) + device];
+	down(&register_mutex);
+	rmidi = snd_rawmidi_search(card, device);
+	up(&register_mutex);
 	if (rmidi == NULL) {
 		err = -ENODEV;
 		goto __error1;
@@ -368,9 +382,8 @@ int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice,
 static int snd_rawmidi_open(struct inode *inode, struct file *file)
 {
 	int maj = imajor(inode);
-	int cardnum;
 	struct snd_card *card;
-	int device, subdevice;
+	int subdevice;
 	unsigned short fflags;
 	int err;
 	struct snd_rawmidi *rmidi;
@@ -380,27 +393,18 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
 	struct snd_ctl_file *kctl;
 
 	if (maj == snd_major) {
-		cardnum = SNDRV_MINOR_CARD(iminor(inode));
-		cardnum %= SNDRV_CARDS;
-		device = SNDRV_MINOR_DEVICE(iminor(inode)) - SNDRV_MINOR_RAWMIDI;
-		device %= SNDRV_MINOR_RAWMIDIS;
+		rmidi = snd_lookup_minor_data(iminor(inode),
+					      SNDRV_DEVICE_TYPE_RAWMIDI);
 #ifdef CONFIG_SND_OSSEMUL
 	} else if (maj == SOUND_MAJOR) {
-		cardnum = SNDRV_MINOR_OSS_CARD(iminor(inode));
-		cardnum %= SNDRV_CARDS;
-		device = SNDRV_MINOR_OSS_DEVICE(iminor(inode)) == SNDRV_MINOR_OSS_MIDI ?
-			midi_map[cardnum] : amidi_map[cardnum];
+		rmidi = snd_lookup_oss_minor_data(iminor(inode),
+						  SNDRV_OSS_DEVICE_TYPE_MIDI);
 #endif
 	} else
 		return -ENXIO;
 
-	rmidi = snd_rawmidi_devices[(cardnum * SNDRV_RAWMIDI_DEVICES) + device];
 	if (rmidi == NULL)
 		return -ENODEV;
-#ifdef CONFIG_SND_OSSEMUL
-	if (maj == SOUND_MAJOR && !rmidi->ossreg)
-		return -ENXIO;
-#endif
 	if ((file->f_flags & O_APPEND) && !(file->f_flags & O_NONBLOCK)) 
 		return -EINVAL;		/* invalid combination */
 	card = rmidi->card;
@@ -430,7 +434,8 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
 			}
 		}
 		up_read(&card->controls_rwsem);
-		err = snd_rawmidi_kernel_open(cardnum, device, subdevice, fflags, rawmidi_file);
+		err = snd_rawmidi_kernel_open(rmidi->card, rmidi->device,
+					      subdevice, fflags, rawmidi_file);
 		if (err >= 0)
 			break;
 		if (err == -EAGAIN) {
@@ -570,9 +575,10 @@ int snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info
 	struct snd_rawmidi_str *pstr;
 	struct snd_rawmidi_substream *substream;
 	struct list_head *list;
-	if (info->device >= SNDRV_RAWMIDI_DEVICES)
-		return -ENXIO;
-	rmidi = snd_rawmidi_devices[card->number * SNDRV_RAWMIDI_DEVICES + info->device];
+
+	down(&register_mutex);
+	rmidi = snd_rawmidi_search(card, info->device);
+	up(&register_mutex);
 	if (!rmidi)
 		return -ENXIO;
 	if (info->stream < 0 || info->stream > 1)
@@ -803,9 +809,7 @@ static int snd_rawmidi_control_ioctl(struct snd_card *card,
 				     unsigned long arg)
 {
 	void __user *argp = (void __user *)arg;
-	unsigned int tmp;
 
-	tmp = card->number * SNDRV_RAWMIDI_DEVICES;
 	switch (cmd) {
 	case SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE:
 	{
@@ -813,14 +817,16 @@ static int snd_rawmidi_control_ioctl(struct snd_card *card,
 		
 		if (get_user(device, (int __user *)argp))
 			return -EFAULT;
+		down(&register_mutex);
 		device = device < 0 ? 0 : device + 1;
 		while (device < SNDRV_RAWMIDI_DEVICES) {
-			if (snd_rawmidi_devices[tmp + device])
+			if (snd_rawmidi_search(card, device))
 				break;
 			device++;
 		}
 		if (device == SNDRV_RAWMIDI_DEVICES)
 			device = -1;
+		up(&register_mutex);
 		if (put_user(device, (int __user *)argp))
 			return -EFAULT;
 		return 0;
@@ -1493,7 +1499,7 @@ static void snd_rawmidi_dev_seq_free(struct snd_seq_device *device)
 
 static int snd_rawmidi_dev_register(struct snd_device *device)
 {
-	int idx, err;
+	int err;
 	struct snd_info_entry *entry;
 	char name[16];
 	struct snd_rawmidi *rmidi = device->device_data;
@@ -1501,25 +1507,24 @@ static int snd_rawmidi_dev_register(struct snd_device *device)
 	if (rmidi->device >= SNDRV_RAWMIDI_DEVICES)
 		return -ENOMEM;
 	down(&register_mutex);
-	idx = (rmidi->card->number * SNDRV_RAWMIDI_DEVICES) + rmidi->device;
-	if (snd_rawmidi_devices[idx] != NULL) {
+	if (snd_rawmidi_search(rmidi->card, rmidi->device)) {
 		up(&register_mutex);
 		return -EBUSY;
 	}
-	snd_rawmidi_devices[idx] = rmidi;
+	list_add_tail(&rmidi->list, &snd_rawmidi_devices);
 	sprintf(name, "midiC%iD%i", rmidi->card->number, rmidi->device);
 	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_RAWMIDI,
 				       rmidi->card, rmidi->device,
-				       &snd_rawmidi_f_ops, name)) < 0) {
+				       &snd_rawmidi_f_ops, rmidi, name)) < 0) {
 		snd_printk(KERN_ERR "unable to register rawmidi device %i:%i\n", rmidi->card->number, rmidi->device);
-		snd_rawmidi_devices[idx] = NULL;
+		list_del(&rmidi->list);
 		up(&register_mutex);
 		return err;
 	}
 	if (rmidi->ops && rmidi->ops->dev_register &&
 	    (err = rmidi->ops->dev_register(rmidi)) < 0) {
 		snd_unregister_device(SNDRV_DEVICE_TYPE_RAWMIDI, rmidi->card, rmidi->device);
-		snd_rawmidi_devices[idx] = NULL;
+		list_del(&rmidi->list);
 		up(&register_mutex);
 		return err;
 	}
@@ -1527,8 +1532,8 @@ static int snd_rawmidi_dev_register(struct snd_device *device)
 	rmidi->ossreg = 0;
 	if ((int)rmidi->device == midi_map[rmidi->card->number]) {
 		if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIDI,
-					    rmidi->card, 0,
-					    &snd_rawmidi_f_ops, name) < 0) {
+					    rmidi->card, 0, &snd_rawmidi_f_ops,
+					    rmidi, name) < 0) {
 			snd_printk(KERN_ERR "unable to register OSS rawmidi device %i:%i\n", rmidi->card->number, 0);
 		} else {
 			rmidi->ossreg++;
@@ -1539,8 +1544,8 @@ static int snd_rawmidi_dev_register(struct snd_device *device)
 	}
 	if ((int)rmidi->device == amidi_map[rmidi->card->number]) {
 		if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIDI,
-					    rmidi->card, 1,
-					    &snd_rawmidi_f_ops, name) < 0) {
+					    rmidi->card, 1, &snd_rawmidi_f_ops,
+					    rmidi, name) < 0) {
 			snd_printk(KERN_ERR "unable to register OSS rawmidi device %i:%i\n", rmidi->card->number, 1);
 		} else {
 			rmidi->ossreg++;
@@ -1576,24 +1581,20 @@ static int snd_rawmidi_dev_register(struct snd_device *device)
 static int snd_rawmidi_dev_disconnect(struct snd_device *device)
 {
 	struct snd_rawmidi *rmidi = device->device_data;
-	int idx;
 
 	down(&register_mutex);
-	idx = (rmidi->card->number * SNDRV_RAWMIDI_DEVICES) + rmidi->device;
-	snd_rawmidi_devices[idx] = NULL;
+	list_del_init(&rmidi->list);
 	up(&register_mutex);
 	return 0;
 }
 
 static int snd_rawmidi_dev_unregister(struct snd_device *device)
 {
-	int idx;
 	struct snd_rawmidi *rmidi = device->device_data;
 
 	snd_assert(rmidi != NULL, return -ENXIO);
 	down(&register_mutex);
-	idx = (rmidi->card->number * SNDRV_RAWMIDI_DEVICES) + rmidi->device;
-	snd_rawmidi_devices[idx] = NULL;
+	list_del(&rmidi->list);
 	if (rmidi->proc_entry) {
 		snd_info_unregister(rmidi->proc_entry);
 		rmidi->proc_entry = NULL;
diff --git a/sound/core/seq/oss/seq_oss.c b/sound/core/seq/oss/seq_oss.c
index 61c0a41376f..4b51ab56507 100644
--- a/sound/core/seq/oss/seq_oss.c
+++ b/sound/core/seq/oss/seq_oss.c
@@ -225,7 +225,7 @@ register_device(void)
 	down(&register_mutex);
 	if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER,
 					  NULL, 0,
-					  &seq_oss_f_ops,
+					  &seq_oss_f_ops, NULL,
 					  SNDRV_SEQ_OSS_DEVNAME)) < 0) {
 		snd_printk(KERN_ERR "can't register device seq\n");
 		up(&register_mutex);
@@ -233,7 +233,7 @@ register_device(void)
 	}
 	if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC,
 					  NULL, 0,
-					  &seq_oss_f_ops,
+					  &seq_oss_f_ops, NULL,
 					  SNDRV_SEQ_OSS_DEVNAME)) < 0) {
 		snd_printk(KERN_ERR "can't register device music\n");
 		snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, NULL, 0);
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 087fdf32732..c8bd37ee837 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -2531,7 +2531,7 @@ int __init snd_sequencer_device_init(void)
 		return -ERESTARTSYS;
 
 	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_SEQUENCER, NULL, 0,
-				       &snd_seq_f_ops, "seq")) < 0) {
+				       &snd_seq_f_ops, NULL, "seq")) < 0) {
 		up(&register_mutex);
 		return err;
 	}
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
index f88d2e3ee66..0a65eb2f976 100644
--- a/sound/core/seq/seq_midi.c
+++ b/sound/core/seq/seq_midi.c
@@ -183,7 +183,10 @@ static int midisynth_subscribe(void *private_data, struct snd_seq_port_subscribe
 	struct snd_rawmidi_params params;
 
 	/* open midi port */
-	if ((err = snd_rawmidi_kernel_open(msynth->card->number, msynth->device, msynth->subdevice, SNDRV_RAWMIDI_LFLG_INPUT, &msynth->input_rfile)) < 0) {
+	if ((err = snd_rawmidi_kernel_open(msynth->card, msynth->device,
+					   msynth->subdevice,
+					   SNDRV_RAWMIDI_LFLG_INPUT,
+					   &msynth->input_rfile)) < 0) {
 		snd_printd("midi input open failed!!!\n");
 		return err;
 	}
@@ -221,7 +224,10 @@ static int midisynth_use(void *private_data, struct snd_seq_port_subscribe *info
 	struct snd_rawmidi_params params;
 
 	/* open midi port */
-	if ((err = snd_rawmidi_kernel_open(msynth->card->number, msynth->device, msynth->subdevice, SNDRV_RAWMIDI_LFLG_OUTPUT, &msynth->output_rfile)) < 0) {
+	if ((err = snd_rawmidi_kernel_open(msynth->card, msynth->device,
+					   msynth->subdevice,
+					   SNDRV_RAWMIDI_LFLG_OUTPUT,
+					   &msynth->output_rfile)) < 0) {
 		snd_printd("midi output open failed!!!\n");
 		return err;
 	}
diff --git a/sound/core/sound.c b/sound/core/sound.c
index a509f49fa0b..1e5eca54692 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -60,7 +60,6 @@ MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR);
 int snd_ecards_limit;
 
 static struct snd_minor *snd_minors[SNDRV_OS_MINORS];
-
 static DECLARE_MUTEX(sound_mutex);
 
 extern struct class *sound_class;
@@ -107,6 +106,31 @@ static void snd_request_other(int minor)
 
 #endif				/* request_module support */
 
+/**
+ * snd_lookup_minor_data - get user data of a registered device
+ * @minor: the minor number
+ * @type: device type (SNDRV_DEVICE_TYPE_XXX)
+ *
+ * Checks that a minor device with the specified type is registered, and returns
+ * its user data pointer.
+ */
+void *snd_lookup_minor_data(unsigned int minor, int type)
+{
+	struct snd_minor *mreg;
+	void *private_data;
+
+	if (minor > ARRAY_SIZE(snd_minors))
+		return NULL;
+	down(&sound_mutex);
+	mreg = snd_minors[minor];
+	if (mreg && mreg->type == type)
+		private_data = mreg->private_data;
+	else
+		private_data = NULL;
+	up(&sound_mutex);
+	return private_data;
+}
+
 static int snd_open(struct inode *inode, struct file *file)
 {
 	int minor = iminor(inode);
@@ -183,6 +207,7 @@ static int snd_kernel_minor(int type, struct snd_card *card, int dev)
  * @card: the card instance
  * @dev: the device index
  * @f_ops: the file operations
+ * @private_data: user pointer for f_ops->open()
  * @name: the device file name
  *
  * Registers an ALSA device file for the given card.
@@ -191,7 +216,8 @@ static int snd_kernel_minor(int type, struct snd_card *card, int dev)
  * Retrurns zero if successful, or a negative error code on failure.
  */
 int snd_register_device(int type, struct snd_card *card, int dev,
-			struct file_operations *f_ops, const char *name)
+			struct file_operations *f_ops, void *private_data,
+			const char *name)
 {
 	int minor = snd_kernel_minor(type, card, dev);
 	struct snd_minor *preg;
@@ -207,6 +233,7 @@ int snd_register_device(int type, struct snd_card *card, int dev,
 	preg->card = card ? card->number : -1;
 	preg->device = dev;
 	preg->f_ops = f_ops;
+	preg->private_data = private_data;
 	strcpy(preg->name, name);
 	down(&sound_mutex);
 	if (snd_minors[minor]) {
@@ -238,13 +265,18 @@ int snd_register_device(int type, struct snd_card *card, int dev,
  */
 int snd_unregister_device(int type, struct snd_card *card, int dev)
 {
-	int minor = snd_kernel_minor(type, card, dev);
+	int cardnum, minor;
 	struct snd_minor *mptr;
 
-	if (minor < 0)
-		return minor;
+	cardnum = card ? card->number : -1;
 	down(&sound_mutex);
-	if ((mptr = snd_minors[minor]) == NULL) {
+	for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor)
+		if ((mptr = snd_minors[minor]) != NULL &&
+		    mptr->type == type &&
+		    mptr->card == cardnum &&
+		    mptr->device == dev)
+			break;
+	if (minor == ARRAY_SIZE(snd_minors)) {
 		up(&sound_mutex);
 		return -EINVAL;
 	}
@@ -392,9 +424,11 @@ EXPORT_SYMBOL(snd_request_card);
 #endif
 EXPORT_SYMBOL(snd_register_device);
 EXPORT_SYMBOL(snd_unregister_device);
+EXPORT_SYMBOL(snd_lookup_minor_data);
 #if defined(CONFIG_SND_OSSEMUL)
 EXPORT_SYMBOL(snd_register_oss_device);
 EXPORT_SYMBOL(snd_unregister_oss_device);
+EXPORT_SYMBOL(snd_lookup_oss_minor_data);
 #endif
   /* memory.c */
 EXPORT_SYMBOL(copy_to_user_fromio);
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index afbfd8df129..b9e89cac4c5 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -38,9 +38,25 @@
 #define SNDRV_OSS_MINORS 128
 
 static struct snd_minor *snd_oss_minors[SNDRV_OSS_MINORS];
-
 static DECLARE_MUTEX(sound_oss_mutex);
 
+void *snd_lookup_oss_minor_data(unsigned int minor, int type)
+{
+	struct snd_minor *mreg;
+	void *private_data;
+
+	if (minor > ARRAY_SIZE(snd_oss_minors))
+		return NULL;
+	down(&sound_oss_mutex);
+	mreg = snd_oss_minors[minor];
+	if (mreg && mreg->type == type)
+		private_data = mreg->private_data;
+	else
+		private_data = NULL;
+	up(&sound_oss_mutex);
+	return private_data;
+}
+
 static int snd_oss_kernel_minor(int type, struct snd_card *card, int dev)
 {
 	int minor;
@@ -78,7 +94,8 @@ static int snd_oss_kernel_minor(int type, struct snd_card *card, int dev)
 }
 
 int snd_register_oss_device(int type, struct snd_card *card, int dev,
-			    struct file_operations *f_ops, const char *name)
+			    struct file_operations *f_ops, void *private_data,
+			    const char *name)
 {
 	int minor = snd_oss_kernel_minor(type, card, dev);
 	int minor_unit;
@@ -97,6 +114,7 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev,
 	preg->card = card ? card->number : -1;
 	preg->device = dev;
 	preg->f_ops = f_ops;
+	preg->private_data = private_data;
 	down(&sound_oss_mutex);
 	snd_oss_minors[minor] = preg;
 	minor_unit = SNDRV_MINOR_OSS_DEVICE(minor);
@@ -121,6 +139,7 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev,
 							  carddev);
 		if (register2 != track2)
 			goto __end;
+		snd_oss_minors[track2] = preg;
 	}
 	up(&sound_oss_mutex);
 	return 0;
@@ -163,8 +182,10 @@ int snd_unregister_oss_device(int type, struct snd_card *card, int dev)
 		track2 = SNDRV_MINOR_OSS(cidx, SNDRV_MINOR_OSS_DMMIDI1);
 		break;
 	}
-	if (track2 >= 0)
+	if (track2 >= 0) {
 		unregister_sound_special(track2);
+		snd_oss_minors[track2] = NULL;
+	}
 	snd_oss_minors[minor] = NULL;
 	up(&sound_oss_mutex);
 	kfree(mptr);
diff --git a/sound/core/timer.c b/sound/core/timer.c
index a7bcb04263c..c62dbacdca1 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1952,8 +1952,8 @@ static int __init alsa_timer_init(void)
 	if ((err = snd_timer_register_system()) < 0)
 		snd_printk(KERN_ERR "unable to register system timer (%i)\n",
 			   err);
-	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_TIMER,
-				       NULL, 0, &snd_timer_f_ops, "timer")) < 0)
+	if ((err = snd_register_device(SNDRV_DEVICE_TYPE_TIMER, NULL, 0,
+				       &snd_timer_f_ops, NULL, "timer")) < 0)
 		snd_printk(KERN_ERR "unable to register timer device (%i)\n",
 			   err);
 	return 0;
-- 
cgit v1.2.3-70-g09d2


From 332682b1cd540dd7abbbbfc1905af8139e76e1b7 Mon Sep 17 00:00:00 2001
From: Clemens Ladisch <clemens@ladisch.de>
Date: Sun, 20 Nov 2005 14:07:47 +0100
Subject: [ALSA] dynamic minors (4/6): dynamic minor number allocation

Modules: ALSA Core,ALSA Minor Numbers

Add an option to allocate device file minor numbers dynamically.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
---
 include/sound/minors.h | 29 ++++++++++++++++++----
 sound/core/Kconfig     | 11 +++++++++
 sound/core/sound.c     | 65 +++++++++++++++++++++++++++++++++++---------------
 3 files changed, 82 insertions(+), 23 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/minors.h b/include/sound/minors.h
index a17b5c9961b..46bcd2023ed 100644
--- a/include/sound/minors.h
+++ b/include/sound/minors.h
@@ -26,18 +26,20 @@
 #define SNDRV_MINOR_DEVICE(minor)	((minor) & 0x001f)
 #define SNDRV_MINOR(card, dev)		(((card) << 5) | (dev))
 
-#define SNDRV_MINOR_CONTROL		0	/* 0 - 0 */
+/* these minors can still be used for autoloading devices (/dev/aload*) */
+#define SNDRV_MINOR_CONTROL		0	/* 0 */
 #define SNDRV_MINOR_GLOBAL		1	/* 1 */
 #define SNDRV_MINOR_SEQUENCER		(SNDRV_MINOR_GLOBAL + 0 * 32)
 #define SNDRV_MINOR_TIMER		(SNDRV_MINOR_GLOBAL + 1 * 32)
+
+#ifndef CONFIG_SND_DYNAMIC_MINORS
+						/* 2 - 3 (reserved) */
 #define SNDRV_MINOR_HWDEP		4	/* 4 - 7 */
-#define SNDRV_MINOR_HWDEPS		4
 #define SNDRV_MINOR_RAWMIDI		8	/* 8 - 15 */
-#define SNDRV_MINOR_RAWMIDIS		8
 #define SNDRV_MINOR_PCM_PLAYBACK	16	/* 16 - 23 */
 #define SNDRV_MINOR_PCM_CAPTURE		24	/* 24 - 31 */
-#define SNDRV_MINOR_PCMS		8
 
+/* same as first respective minor number to make minor allocation easier */
 #define SNDRV_DEVICE_TYPE_CONTROL	SNDRV_MINOR_CONTROL
 #define SNDRV_DEVICE_TYPE_HWDEP		SNDRV_MINOR_HWDEP
 #define SNDRV_DEVICE_TYPE_RAWMIDI	SNDRV_MINOR_RAWMIDI
@@ -46,6 +48,25 @@
 #define SNDRV_DEVICE_TYPE_SEQUENCER	SNDRV_MINOR_SEQUENCER
 #define SNDRV_DEVICE_TYPE_TIMER		SNDRV_MINOR_TIMER
 
+#else /* CONFIG_SND_DYNAMIC_MINORS */
+
+enum {
+	SNDRV_DEVICE_TYPE_CONTROL,
+	SNDRV_DEVICE_TYPE_SEQUENCER,
+	SNDRV_DEVICE_TYPE_TIMER,
+	SNDRV_DEVICE_TYPE_HWDEP,
+	SNDRV_DEVICE_TYPE_RAWMIDI,
+	SNDRV_DEVICE_TYPE_PCM_PLAYBACK,
+	SNDRV_DEVICE_TYPE_PCM_CAPTURE,
+};
+
+#endif /* CONFIG_SND_DYNAMIC_MINORS */
+
+#define SNDRV_MINOR_HWDEPS		4
+#define SNDRV_MINOR_RAWMIDIS		8
+#define SNDRV_MINOR_PCMS		8
+
+
 #ifdef CONFIG_SND_OSSEMUL
 
 #define SNDRV_MINOR_OSS_DEVICES		16
diff --git a/sound/core/Kconfig b/sound/core/Kconfig
index b46efff2e4c..83cbe20c9c9 100644
--- a/sound/core/Kconfig
+++ b/sound/core/Kconfig
@@ -111,6 +111,17 @@ config SND_SEQ_RTCTIMER_DEFAULT
 
 	  If in doubt, say Y.
 
+config SND_DYNAMIC_MINORS
+	bool "Dynamic device file minor numbers (EXPERIMENTAL)"
+	depends on SND && EXPERIMENTAL
+	help
+	  If you say Y here, the minor numbers of ALSA device files in
+	  /dev/snd/ are allocated dynamically.  This allows you to have
+	  more than 8 sound cards, but requires a dynamic device file
+	  system like udev.
+
+	  If you are unsure about this, say N here.
+
 config SND_VERBOSE_PRINTK
 	bool "Verbose printk"
 	depends on SND
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 1e5eca54692..5e22283078f 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -133,29 +133,34 @@ void *snd_lookup_minor_data(unsigned int minor, int type)
 
 static int snd_open(struct inode *inode, struct file *file)
 {
-	int minor = iminor(inode);
-	int card = SNDRV_MINOR_CARD(minor);
-	int dev = SNDRV_MINOR_DEVICE(minor);
+	unsigned int minor = iminor(inode);
 	struct snd_minor *mptr = NULL;
 	struct file_operations *old_fops;
 	int err = 0;
 
-	if (dev != SNDRV_MINOR_GLOBAL) {
-		if (snd_cards[card] == NULL) {
+	if (minor > ARRAY_SIZE(snd_minors))
+		return -ENODEV;
+	mptr = snd_minors[minor];
+	if (mptr == NULL) {
 #ifdef CONFIG_KMOD
-			snd_request_card(card);
+		int dev = SNDRV_MINOR_DEVICE(minor);
+		if (dev == SNDRV_MINOR_CONTROL) {
+			/* /dev/aloadC? */
+			int card = SNDRV_MINOR_CARD(minor);
 			if (snd_cards[card] == NULL)
-#endif
-				return -ENODEV;
-		}
-	} else {
-#ifdef CONFIG_KMOD
-		if ((mptr = snd_minors[minor]) == NULL)
+				snd_request_card(card);
+		} else if (dev == SNDRV_MINOR_GLOBAL) {
+			/* /dev/aloadSEQ */
 			snd_request_other(minor);
+		}
+#ifndef CONFIG_SND_DYNAMIC_MINORS
+		/* /dev/snd/{controlC?,seq} */
+		mptr = snd_minors[minor];
+		if (mptr == NULL)
+#endif
 #endif
+			return -ENODEV;
 	}
-	if (mptr == NULL && (mptr = snd_minors[minor]) == NULL)
-		return -ENODEV;
 	old_fops = file->f_op;
 	file->f_op = fops_get(mptr->f_ops);
 	if (file->f_op->open)
@@ -174,6 +179,22 @@ static struct file_operations snd_fops =
 	.open =		snd_open
 };
 
+#ifdef CONFIG_SND_DYNAMIC_MINORS
+static int snd_find_free_minor(void)
+{
+	int minor;
+
+	for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor) {
+		/* skip minors still used statically for autoloading devices */
+		if (SNDRV_MINOR_DEVICE(minor) == SNDRV_MINOR_CONTROL ||
+		    minor == SNDRV_MINOR_SEQUENCER)
+			continue;
+		if (!snd_minors[minor])
+			return minor;
+	}
+	return -EBUSY;
+}
+#else
 static int snd_kernel_minor(int type, struct snd_card *card, int dev)
 {
 	int minor;
@@ -200,6 +221,7 @@ static int snd_kernel_minor(int type, struct snd_card *card, int dev)
 	snd_assert(minor >= 0 && minor < SNDRV_OS_MINORS, return -EINVAL);
 	return minor;
 }
+#endif
 
 /**
  * snd_register_device - Register the ALSA device file for the card
@@ -219,12 +241,10 @@ int snd_register_device(int type, struct snd_card *card, int dev,
 			struct file_operations *f_ops, void *private_data,
 			const char *name)
 {
-	int minor = snd_kernel_minor(type, card, dev);
+	int minor;
 	struct snd_minor *preg;
 	struct device *device = NULL;
 
-	if (minor < 0)
-		return minor;
 	snd_assert(name, return -EINVAL);
 	preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL);
 	if (preg == NULL)
@@ -236,10 +256,17 @@ int snd_register_device(int type, struct snd_card *card, int dev,
 	preg->private_data = private_data;
 	strcpy(preg->name, name);
 	down(&sound_mutex);
-	if (snd_minors[minor]) {
+#ifdef CONFIG_SND_DYNAMIC_MINORS
+	minor = snd_find_free_minor();
+#else
+	minor = snd_kernel_minor(type, card, dev);
+	if (minor >= 0 && snd_minors[minor])
+		minor = -EBUSY;
+#endif
+	if (minor < 0) {
 		up(&sound_mutex);
 		kfree(preg);
-		return -EBUSY;
+		return minor;
 	}
 	snd_minors[minor] = preg;
 	if (type != SNDRV_DEVICE_TYPE_CONTROL || preg->card >= cards_limit)
-- 
cgit v1.2.3-70-g09d2


From d001544ded23ddb1116f945ccc2d89a7f98ab7e8 Mon Sep 17 00:00:00 2001
From: Clemens Ladisch <clemens@ladisch.de>
Date: Sun, 20 Nov 2005 14:09:05 +0100
Subject: [ALSA] dynamic minors (6/6): increase maximum number of sound cards

Modules: ALSA Core,Memalloc module,ALSA sequencer

With dynamic minor numbers, we can increase the number of sound cards.

This requires that the sequencer client numbers of some kernel drivers
are allocated dynamically, too.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
---
 include/sound/driver.h         |  7 ++++++-
 sound/core/init.c              | 18 +++++++++++-------
 sound/core/memalloc.c          |  4 ----
 sound/core/seq/seq_clientmgr.c | 31 +++++++++++++++++++++++++------
 sound/core/sound.c             |  6 +++---
 sound/core/sound_oss.c         |  4 ++++
 6 files changed, 49 insertions(+), 21 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/driver.h b/include/sound/driver.h
index 3f0416ac24d..89c6a73f392 100644
--- a/include/sound/driver.h
+++ b/include/sound/driver.h
@@ -28,7 +28,12 @@
 
 #include <linux/config.h>
 
-#define SNDRV_CARDS		8	/* number of supported soundcards - don't change - minor numbers */
+/* number of supported soundcards */
+#ifdef CONFIG_SND_DYNAMIC_MINORS
+#define SNDRV_CARDS 32
+#else
+#define SNDRV_CARDS 8		/* don't change - minor numbers */
+#endif
 
 #ifndef CONFIG_SND_MAJOR	/* standard configuration */
 #define CONFIG_SND_MAJOR	116
diff --git a/sound/core/init.c b/sound/core/init.c
index 728bb2ce0bc..58e17d385f8 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -338,7 +338,7 @@ int snd_card_free_in_thread(struct snd_card *card)
 
 static void choose_default_id(struct snd_card *card)
 {
-	int i, len, idx_flag = 0, loops = 8;
+	int i, len, idx_flag = 0, loops = SNDRV_CARDS;
 	char *id, *spos;
 	
 	id = spos = card->shortname;	
@@ -380,9 +380,12 @@ static void choose_default_id(struct snd_card *card)
 
 	      __change:
 		len = strlen(id);
-		if (idx_flag)
-			id[len-1]++;
-		else if ((size_t)len <= sizeof(card->id) - 3) {
+		if (idx_flag) {
+			if (id[len-1] != '9')
+				id[len-1]++;
+			else
+				id[len-1] = 'A';
+		} else if ((size_t)len <= sizeof(card->id) - 3) {
 			strcat(id, "_1");
 			idx_flag++;
 		} else {
@@ -461,12 +464,12 @@ static void snd_card_info_read(struct snd_info_entry *entry,
 		read_lock(&snd_card_rwlock);
 		if ((card = snd_cards[idx]) != NULL) {
 			count++;
-			snd_iprintf(buffer, "%i [%-15s]: %s - %s\n",
+			snd_iprintf(buffer, "%2i [%-15s]: %s - %s\n",
 					idx,
 					card->id,
 					card->driver,
 					card->shortname);
-			snd_iprintf(buffer, "                     %s\n",
+			snd_iprintf(buffer, "                      %s\n",
 					card->longname);
 		}
 		read_unlock(&snd_card_rwlock);
@@ -508,7 +511,8 @@ static void snd_card_module_info_read(struct snd_info_entry *entry,
 	for (idx = 0; idx < SNDRV_CARDS; idx++) {
 		read_lock(&snd_card_rwlock);
 		if ((card = snd_cards[idx]) != NULL)
-			snd_iprintf(buffer, "%i %s\n", idx, card->module->name);
+			snd_iprintf(buffer, "%2i %s\n",
+				    idx, card->module->name);
 		read_unlock(&snd_card_rwlock);
 	}
 }
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c
index e4b8959dd4b..19b3dcbb09c 100644
--- a/sound/core/memalloc.c
+++ b/sound/core/memalloc.c
@@ -43,10 +43,6 @@ MODULE_DESCRIPTION("Memory allocator for ALSA system.");
 MODULE_LICENSE("GPL");
 
 
-#ifndef SNDRV_CARDS
-#define SNDRV_CARDS	8
-#endif
-
 /*
  */
 
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 95bd5ae92b9..2a9c6b316b1 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -47,6 +47,10 @@
  * 
  */
 
+/* range for dynamically allocated client numbers of kernel drivers */
+#define SNDRV_SEQ_DYNAMIC_CLIENT_BEGIN	16
+#define SNDRV_SEQ_DYNAMIC_CLIENT_END	48
+
 #define SNDRV_SEQ_LFLG_INPUT	0x0001
 #define SNDRV_SEQ_LFLG_OUTPUT	0x0002
 #define SNDRV_SEQ_LFLG_OPEN	(SNDRV_SEQ_LFLG_INPUT|SNDRV_SEQ_LFLG_OUTPUT)
@@ -203,7 +207,8 @@ int __init client_init_data(void)
 }
 
 
-static struct snd_seq_client *seq_create_client1(int client_index, int poolsize)
+static struct snd_seq_client *seq_create_client1(int client_index, int poolsize,
+						 int kernel_client)
 {
 	unsigned long flags;
 	int c;
@@ -227,7 +232,15 @@ static struct snd_seq_client *seq_create_client1(int client_index, int poolsize)
 	/* find free slot in the client table */
 	spin_lock_irqsave(&clients_lock, flags);
 	if (client_index < 0) {
-		for (c = 128; c < SNDRV_SEQ_MAX_CLIENTS; c++) {
+		int cmin, cmax;
+		if (kernel_client) {
+			cmin = SNDRV_SEQ_DYNAMIC_CLIENT_BEGIN;
+			cmax = SNDRV_SEQ_DYNAMIC_CLIENT_END;
+		} else {
+			cmin = 128;
+			cmax = SNDRV_SEQ_MAX_CLIENTS;
+		}
+		for (c = cmin; c < cmax; c++) {
 			if (clienttab[c] || clienttablock[c])
 				continue;
 			clienttab[client->number = c] = client;
@@ -306,7 +319,7 @@ static int snd_seq_open(struct inode *inode, struct file *file)
 
 	if (down_interruptible(&register_mutex))
 		return -ERESTARTSYS;
-	client = seq_create_client1(-1, SNDRV_SEQ_DEFAULT_EVENTS);
+	client = seq_create_client1(-1, SNDRV_SEQ_DEFAULT_EVENTS, 0);
 	if (client == NULL) {
 		up(&register_mutex);
 		return -ENOMEM;	/* failure code */
@@ -2212,13 +2225,19 @@ int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
 		return -EINVAL;
 	if (card == NULL && client_index > 63)
 		return -EINVAL;
-	if (card)
-		client_index += 64 + (card->number << 2);
 
 	if (down_interruptible(&register_mutex))
 		return -ERESTARTSYS;
+
+	if (card) {
+		if (card->number < 16)
+			client_index += 64 + (card->number << 2);
+		else
+			client_index = -1;
+	}
+
 	/* empty write queue as default */
-	client = seq_create_client1(client_index, 0);
+	client = seq_create_client1(client_index, 0, 1);
 	if (client == NULL) {
 		up(&register_mutex);
 		return -EBUSY;	/* failure code */
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 5e22283078f..5febd0545d7 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -358,15 +358,15 @@ static void snd_minor_info_read(struct snd_info_entry *entry, struct snd_info_bu
 			continue;
 		if (mptr->card >= 0) {
 			if (mptr->device >= 0)
-				snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n",
+				snd_iprintf(buffer, "%3i: [%2i-%2i]: %s\n",
 					    minor, mptr->card, mptr->device,
 					    snd_device_type_name(mptr->type));
 			else
-				snd_iprintf(buffer, "%3i: [%i]   : %s\n",
+				snd_iprintf(buffer, "%3i: [%2i]   : %s\n",
 					    minor, mptr->card,
 					    snd_device_type_name(mptr->type));
 		} else
-			snd_iprintf(buffer, "%3i:       : %s\n", minor,
+			snd_iprintf(buffer, "%3i:        : %s\n", minor,
 				    snd_device_type_name(mptr->type));
 	}
 	up(&sound_mutex);
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index b9e89cac4c5..3ae1c0d7ffd 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -105,6 +105,8 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev,
 	int register1 = -1, register2 = -1;
 	struct device *carddev = NULL;
 
+	if (card && card->number >= 8)
+		return 0; /* ignore silently */
 	if (minor < 0)
 		return minor;
 	preg = kmalloc(sizeof(struct snd_minor), GFP_KERNEL);
@@ -162,6 +164,8 @@ int snd_unregister_oss_device(int type, struct snd_card *card, int dev)
 	int track2 = -1;
 	struct snd_minor *mptr;
 
+	if (card && card->number >= 8)
+		return 0;
 	if (minor < 0)
 		return minor;
 	down(&sound_oss_mutex);
-- 
cgit v1.2.3-70-g09d2


From e28563cceb9f258ebe3c50fc27d8f4ff0ac4bfa4 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 1 Dec 2005 10:42:42 +0100
Subject: [ALSA] Optimize for config without PROC_FS

Modules: HWDEP Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel

Optimize the code when compiled without CONFIG_PROC_FS.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/info.h    |  13 ++++--
 sound/core/hwdep.c      |  33 ++++++++++-----
 sound/core/info.c       |  13 +++---
 sound/core/init.c       |  59 ++++++++++++++++-----------
 sound/core/pcm.c        | 104 +++++++++++++++++++++++++++++-------------------
 sound/core/pcm_memory.c |  39 +++++++++++-------
 sound/core/sound.c      |   2 +
 sound/core/sound_oss.c  |   6 +--
 sound/core/timer.c      |  48 ++++++++++++++--------
 9 files changed, 193 insertions(+), 124 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/info.h b/include/sound/info.h
index df03e601754..8ea5c7497c0 100644
--- a/include/sound/info.h
+++ b/include/sound/info.h
@@ -87,8 +87,6 @@ struct snd_info_entry {
 	struct semaphore access;
 };
 
-int snd_info_check_reserved_words(const char *str);
-
 #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
 int snd_info_minor_register(void);
 int snd_info_minor_unregister(void);
@@ -142,6 +140,7 @@ static inline void snd_info_set_text_ops(struct snd_info_entry *entry,
 	entry->c.text.read = read;
 }
 
+int snd_info_check_reserved_words(const char *str);
 
 #else
 
@@ -164,8 +163,14 @@ static inline int snd_info_card_free(struct snd_card * card) { return 0; }
 static inline int snd_info_register(struct snd_info_entry * entry) { return 0; }
 static inline int snd_info_unregister(struct snd_info_entry * entry) { return 0; }
 
-#define snd_card_proc_new(card,name,entryp)  0 /* always success */
-#define snd_info_set_text_ops(entry,private_data,read_size,read) /*NOP*/
+static inline int snd_card_proc_new(struct snd_card *card, const char *name,
+				    struct snd_info_entry **entryp) { return -EINVAL; }
+static inline void snd_info_set_text_ops(struct snd_info_entry *entry __attribute__((unused)),
+					 void *private_data,
+					 long read_size,
+					 void (*read)(struct snd_info_entry *, struct snd_info_buffer *)) {}
+
+static inline int snd_info_check_reserved_words(const char *str) { return 1; }
 
 #endif
 
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index b8c0c8c4d12..618c43be0bc 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -458,6 +458,7 @@ static int snd_hwdep_dev_unregister(struct snd_device *device)
 	return snd_hwdep_free(hwdep);
 }
 
+#ifdef CONFIG_PROC_FS
 /*
  *  Info interface
  */
@@ -477,13 +478,9 @@ static void snd_hwdep_proc_read(struct snd_info_entry *entry,
 	up(&register_mutex);
 }
 
-/*
- *  ENTRY functions
- */
+static struct snd_info_entry *snd_hwdep_proc_entry;
 
-static struct snd_info_entry *snd_hwdep_proc_entry = NULL;
-
-static int __init alsa_hwdep_init(void)
+static void __init snd_hwdep_proc_init(void)
 {
 	struct snd_info_entry *entry;
 
@@ -496,6 +493,25 @@ static int __init alsa_hwdep_init(void)
 		}
 	}
 	snd_hwdep_proc_entry = entry;
+}
+
+static void __exit snd_hwdep_proc_done(void)
+{
+	snd_info_unregister(snd_hwdep_proc_entry);
+}
+#else /* !CONFIG_PROC_FS */
+#define snd_hwdep_proc_init()
+#define snd_hwdep_proc_done()
+#endif /* CONFIG_PROC_FS */
+
+
+/*
+ *  ENTRY functions
+ */
+
+static int __init alsa_hwdep_init(void)
+{
+	snd_hwdep_proc_init();
 	snd_ctl_register_ioctl(snd_hwdep_control_ioctl);
 	snd_ctl_register_ioctl_compat(snd_hwdep_control_ioctl);
 	return 0;
@@ -505,10 +521,7 @@ static void __exit alsa_hwdep_exit(void)
 {
 	snd_ctl_unregister_ioctl(snd_hwdep_control_ioctl);
 	snd_ctl_unregister_ioctl_compat(snd_hwdep_control_ioctl);
-	if (snd_hwdep_proc_entry) {
-		snd_info_unregister(snd_hwdep_proc_entry);
-		snd_hwdep_proc_entry = NULL;
-	}
+	snd_hwdep_proc_done();
 }
 
 module_init(alsa_hwdep_init)
diff --git a/sound/core/info.c b/sound/core/info.c
index ec3282f266f..ae885392146 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -37,6 +37,8 @@
  *
  */
 
+#ifdef CONFIG_PROC_FS
+
 int snd_info_check_reserved_words(const char *str)
 {
 	static char *reserved[] =
@@ -66,8 +68,6 @@ int snd_info_check_reserved_words(const char *str)
 	return 1;
 }
 
-#ifdef CONFIG_PROC_FS
-
 static DECLARE_MUTEX(info_mutex);
 
 struct snd_info_private_data {
@@ -580,12 +580,10 @@ int __exit snd_info_done(void)
 	snd_info_version_done();
 	if (snd_proc_root) {
 #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
-		if (snd_seq_root)
-			snd_info_unregister(snd_seq_root);
+		snd_info_unregister(snd_seq_root);
 #endif
 #ifdef CONFIG_SND_OSSEMUL
-		if (snd_oss_root)
-			snd_info_unregister(snd_oss_root);
+		snd_info_unregister(snd_oss_root);
 #endif
 		snd_remove_proc_entry(&proc_root, snd_proc_root);
 	}
@@ -937,7 +935,8 @@ int snd_info_unregister(struct snd_info_entry * entry)
 {
 	struct proc_dir_entry *root;
 
-	snd_assert(entry != NULL, return -ENXIO);
+	if (! entry)
+		return 0;
 	snd_assert(entry->p != NULL, return -ENXIO);
 	root = entry->parent == NULL ? snd_proc_root : entry->parent->p;
 	snd_assert(root, return -ENXIO);
diff --git a/sound/core/init.c b/sound/core/init.c
index 58e17d385f8..75816688607 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -46,12 +46,39 @@ DEFINE_RWLOCK(snd_card_rwlock);
 int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int free_flag);
 #endif
 
+#ifdef CONFIG_PROC_FS
 static void snd_card_id_read(struct snd_info_entry *entry,
 			     struct snd_info_buffer *buffer)
 {
 	snd_iprintf(buffer, "%s\n", entry->card->id);
 }
 
+static inline int init_info_for_card(struct snd_card *card)
+{
+	int err;
+	struct snd_info_entry *entry;
+
+	if ((err = snd_info_card_register(card)) < 0) {
+		snd_printd("unable to create card info\n");
+		return err;
+	}
+	if ((entry = snd_info_create_card_entry(card, "id", card->proc_root)) == NULL) {
+		snd_printd("unable to create card entry\n");
+		return err;
+	}
+	entry->c.text.read_size = PAGE_SIZE;
+	entry->c.text.read = snd_card_id_read;
+	if (snd_info_register(entry) < 0) {
+		snd_info_free_entry(entry);
+		entry = NULL;
+	}
+	card->proc_id = entry;
+	return 0;
+}
+#else /* !CONFIG_PROC_FS */
+#define init_info_for_card(card)
+#endif
+
 static void snd_card_free_thread(void * __card);
 
 /**
@@ -273,8 +300,7 @@ int snd_card_free(struct snd_card *card)
 	}
 	if (card->private_free)
 		card->private_free(card);
-	if (card->proc_id)
-		snd_info_unregister(card->proc_id);
+	snd_info_unregister(card->proc_id);
 	if (snd_info_card_free(card) < 0) {
 		snd_printk(KERN_WARNING "unable to free card info\n");
 		/* Not fatal error */
@@ -414,7 +440,6 @@ static void choose_default_id(struct snd_card *card)
 int snd_card_register(struct snd_card *card)
 {
 	int err;
-	struct snd_info_entry *entry;
 
 	snd_assert(card != NULL, return -EINVAL);
 	if ((err = snd_device_register_all(card)) < 0)
@@ -429,22 +454,7 @@ int snd_card_register(struct snd_card *card)
 		choose_default_id(card);
 	snd_cards[card->number] = card;
 	write_unlock(&snd_card_rwlock);
-	if ((err = snd_info_card_register(card)) < 0) {
-		snd_printd("unable to create card info\n");
-		goto __skip_info;
-	}
-	if ((entry = snd_info_create_card_entry(card, "id", card->proc_root)) == NULL) {
-		snd_printd("unable to create card entry\n");
-		goto __skip_info;
-	}
-	entry->c.text.read_size = PAGE_SIZE;
-	entry->c.text.read = snd_card_id_read;
-	if (snd_info_register(entry) < 0) {
-		snd_info_free_entry(entry);
-		entry = NULL;
-	}
-	card->proc_id = entry;
-      __skip_info:
+	init_info_for_card(card);
 #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
 	if (snd_mixer_oss_notify_callback)
 		snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_REGISTER);
@@ -452,6 +462,7 @@ int snd_card_register(struct snd_card *card)
 	return 0;
 }
 
+#ifdef CONFIG_PROC_FS
 static struct snd_info_entry *snd_card_info_entry = NULL;
 
 static void snd_card_info_read(struct snd_info_entry *entry,
@@ -478,7 +489,7 @@ static void snd_card_info_read(struct snd_info_entry *entry,
 		snd_iprintf(buffer, "--- no soundcards ---\n");
 }
 
-#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
+#ifdef CONFIG_SND_OSSEMUL
 
 void snd_card_info_read_oss(struct snd_info_buffer *buffer)
 {
@@ -550,15 +561,15 @@ int __init snd_card_info_init(void)
 
 int __exit snd_card_info_done(void)
 {
-	if (snd_card_info_entry)
-		snd_info_unregister(snd_card_info_entry);
+	snd_info_unregister(snd_card_info_entry);
 #ifdef MODULE
-	if (snd_card_module_info_entry)
-		snd_info_unregister(snd_card_module_info_entry);
+	snd_info_unregister(snd_card_module_info_entry);
 #endif
 	return 0;
 }
 
+#endif /* CONFIG_PROC_FS */
+
 /**
  *  snd_component_add - add a component string
  *  @card: soundcard structure
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 95036c83de4..28ca61eb0b0 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -151,30 +151,6 @@ static int snd_pcm_control_ioctl(struct snd_card *card,
 #define FORMAT(v) [SNDRV_PCM_FORMAT_##v] = #v
 #define SUBFORMAT(v) [SNDRV_PCM_SUBFORMAT_##v] = #v 
 
-static char *snd_pcm_stream_names[] = {
-	STREAM(PLAYBACK),
-	STREAM(CAPTURE),
-};
-
-static char *snd_pcm_state_names[] = {
-	STATE(OPEN),
-	STATE(SETUP),
-	STATE(PREPARED),
-	STATE(RUNNING),
-	STATE(XRUN),
-	STATE(DRAINING),
-	STATE(PAUSED),
-	STATE(SUSPENDED),
-};
-
-static char *snd_pcm_access_names[] = {
-	ACCESS(MMAP_INTERLEAVED), 
-	ACCESS(MMAP_NONINTERLEAVED),
-	ACCESS(MMAP_COMPLEX),
-	ACCESS(RW_INTERLEAVED),
-	ACCESS(RW_NONINTERLEAVED),
-};
-
 static char *snd_pcm_format_names[] = {
 	FORMAT(S8),
 	FORMAT(U8),
@@ -216,6 +192,36 @@ static char *snd_pcm_format_names[] = {
 	FORMAT(U18_3BE),
 };
 
+const char *snd_pcm_format_name(snd_pcm_format_t format)
+{
+	return snd_pcm_format_names[format];
+}
+
+#ifdef CONFIG_PROC_FS
+static char *snd_pcm_stream_names[] = {
+	STREAM(PLAYBACK),
+	STREAM(CAPTURE),
+};
+
+static char *snd_pcm_state_names[] = {
+	STATE(OPEN),
+	STATE(SETUP),
+	STATE(PREPARED),
+	STATE(RUNNING),
+	STATE(XRUN),
+	STATE(DRAINING),
+	STATE(PAUSED),
+	STATE(SUSPENDED),
+};
+
+static char *snd_pcm_access_names[] = {
+	ACCESS(MMAP_INTERLEAVED), 
+	ACCESS(MMAP_NONINTERLEAVED),
+	ACCESS(MMAP_COMPLEX),
+	ACCESS(RW_INTERLEAVED),
+	ACCESS(RW_NONINTERLEAVED),
+};
+
 static char *snd_pcm_subformat_names[] = {
 	SUBFORMAT(STD), 
 };
@@ -236,11 +242,6 @@ static const char *snd_pcm_access_name(snd_pcm_access_t access)
 	return snd_pcm_access_names[access];
 }
 
-const char *snd_pcm_format_name(snd_pcm_format_t format)
-{
-	return snd_pcm_format_names[format];
-}
-
 static const char *snd_pcm_subformat_name(snd_pcm_subformat_t subformat)
 {
 	return snd_pcm_subformat_names[subformat];
@@ -288,7 +289,6 @@ static const char *snd_pcm_oss_format_name(int format)
 }
 #endif
 
-#ifdef CONFIG_PROC_FS
 static void snd_pcm_proc_info_read(struct snd_pcm_substream *substream,
 				   struct snd_info_buffer *buffer)
 {
@@ -431,7 +431,6 @@ static void snd_pcm_substream_proc_status_read(struct snd_info_entry *entry,
 	snd_iprintf(buffer, "hw_ptr      : %ld\n", runtime->status->hw_ptr);
 	snd_iprintf(buffer, "appl_ptr    : %ld\n", runtime->control->appl_ptr);
 }
-#endif
 
 #ifdef CONFIG_SND_DEBUG
 static void snd_pcm_xrun_debug_read(struct snd_info_entry *entry,
@@ -596,6 +595,12 @@ static int snd_pcm_substream_proc_done(struct snd_pcm_substream *substream)
 	}
 	return 0;
 }
+#else /* !CONFIG_PROC_FS */
+static inline int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) { return 0; }
+static inline int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) { return 0; }
+static inline int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream) { return 0; }
+static inline int snd_pcm_substream_proc_done(struct snd_pcm_substream *substream) { return 0; }
+#endif /* CONFIG_PROC_FS */
 
 /**
  * snd_pcm_new_stream - create a new PCM stream
@@ -1013,6 +1018,7 @@ int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree)
 	return 0;
 }
 
+#ifdef CONFIG_PROC_FS
 /*
  *  Info interface
  */
@@ -1039,18 +1045,12 @@ static void snd_pcm_proc_read(struct snd_info_entry *entry,
 	up(&register_mutex);
 }
 
-/*
- *  ENTRY functions
- */
-
 static struct snd_info_entry *snd_pcm_proc_entry = NULL;
 
-static int __init alsa_pcm_init(void)
+static void snd_pcm_proc_init(void)
 {
 	struct snd_info_entry *entry;
 
-	snd_ctl_register_ioctl(snd_pcm_control_ioctl);
-	snd_ctl_register_ioctl_compat(snd_pcm_control_ioctl);
 	if ((entry = snd_info_create_module_entry(THIS_MODULE, "pcm", NULL)) != NULL) {
 		snd_info_set_text_ops(entry, NULL, SNDRV_CARDS * SNDRV_PCM_DEVICES * 128,
 				      snd_pcm_proc_read);
@@ -1060,6 +1060,29 @@ static int __init alsa_pcm_init(void)
 		}
 	}
 	snd_pcm_proc_entry = entry;
+}
+
+static void snd_pcm_proc_done(void)
+{
+	if (snd_pcm_proc_entry)
+		snd_info_unregister(snd_pcm_proc_entry);
+}
+
+#else /* !CONFIG_PROC_FS */
+#define snd_pcm_proc_init()
+#define snd_pcm_proc_done()
+#endif /* CONFIG_PROC_FS */
+
+
+/*
+ *  ENTRY functions
+ */
+
+static int __init alsa_pcm_init(void)
+{
+	snd_ctl_register_ioctl(snd_pcm_control_ioctl);
+	snd_ctl_register_ioctl_compat(snd_pcm_control_ioctl);
+	snd_pcm_proc_init();
 	return 0;
 }
 
@@ -1067,10 +1090,7 @@ static void __exit alsa_pcm_exit(void)
 {
 	snd_ctl_unregister_ioctl(snd_pcm_control_ioctl);
 	snd_ctl_unregister_ioctl_compat(snd_pcm_control_ioctl);
-	if (snd_pcm_proc_entry) {
-		snd_info_unregister(snd_pcm_proc_entry);
-		snd_pcm_proc_entry = NULL;
-	}
+	snd_pcm_proc_done();
 }
 
 module_init(alsa_pcm_init)
diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c
index d37bcb76188..a0119ae67dc 100644
--- a/sound/core/pcm_memory.c
+++ b/sound/core/pcm_memory.c
@@ -100,10 +100,8 @@ static void snd_pcm_lib_preallocate_dma_free(struct snd_pcm_substream *substream
 int snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream)
 {
 	snd_pcm_lib_preallocate_dma_free(substream);
-	if (substream->proc_prealloc_entry) {
-		snd_info_unregister(substream->proc_prealloc_entry);
-		substream->proc_prealloc_entry = NULL;
-	}
+	snd_info_unregister(substream->proc_prealloc_entry);
+	substream->proc_prealloc_entry = NULL;
 	return 0;
 }
 
@@ -126,6 +124,7 @@ int snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm)
 	return 0;
 }
 
+#ifdef CONFIG_PROC_FS
 /*
  * read callback for prealloc proc file
  *
@@ -185,20 +184,10 @@ static void snd_pcm_lib_preallocate_proc_write(struct snd_info_entry *entry,
 	}
 }
 
-/*
- * pre-allocate the buffer and create a proc file for the substream
- */
-static int snd_pcm_lib_preallocate_pages1(struct snd_pcm_substream *substream,
-					  size_t size, size_t max)
+static inline void preallocate_info_init(struct snd_pcm_substream *substream)
 {
 	struct snd_info_entry *entry;
 
-	if (size > 0 && preallocate_dma && substream->number < maximum_substreams)
-		preallocate_pcm_pages(substream, size);
-
-	if (substream->dma_buffer.bytes > 0)
-		substream->buffer_bytes_max = substream->dma_buffer.bytes;
-	substream->dma_max = max;
 	if ((entry = snd_info_create_card_entry(substream->pcm->card, "prealloc", substream->proc_root)) != NULL) {
 		entry->c.text.read_size = 64;
 		entry->c.text.read = snd_pcm_lib_preallocate_proc_read;
@@ -212,6 +201,26 @@ static int snd_pcm_lib_preallocate_pages1(struct snd_pcm_substream *substream,
 		}
 	}
 	substream->proc_prealloc_entry = entry;
+}
+
+#else /* !CONFIG_PROC_FS */
+#define preallocate_info_init(s)
+#endif
+
+/*
+ * pre-allocate the buffer and create a proc file for the substream
+ */
+static int snd_pcm_lib_preallocate_pages1(struct snd_pcm_substream *substream,
+					  size_t size, size_t max)
+{
+
+	if (size > 0 && preallocate_dma && substream->number < maximum_substreams)
+		preallocate_pcm_pages(substream, size);
+
+	if (substream->dma_buffer.bytes > 0)
+		substream->buffer_bytes_max = substream->dma_buffer.bytes;
+	substream->dma_max = max;
+	preallocate_info_init(substream);
 	return 0;
 }
 
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 3b91f180f68..a8eda02bcf1 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -320,6 +320,7 @@ int snd_unregister_device(int type, struct snd_card *card, int dev)
 	return 0;
 }
 
+#ifdef CONFIG_PROC_FS
 /*
  *  INFO PART
  */
@@ -396,6 +397,7 @@ int __exit snd_minor_info_done(void)
 		snd_info_unregister(snd_minor_info_entry);
 	return 0;
 }
+#endif /* CONFIG_PROC_FS */
 
 /*
  *  INIT PART
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index 3ae1c0d7ffd..d0be32b517c 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -244,11 +244,9 @@ static void snd_minor_info_oss_read(struct snd_info_entry *entry,
 	up(&sound_oss_mutex);
 }
 
-#endif /* CONFIG_PROC_FS */
 
 int __init snd_minor_info_oss_init(void)
 {
-#ifdef CONFIG_PROC_FS
 	struct snd_info_entry *entry;
 
 	entry = snd_info_create_module_entry(THIS_MODULE, "devices", snd_oss_root);
@@ -261,17 +259,15 @@ int __init snd_minor_info_oss_init(void)
 		}
 	}
 	snd_minor_info_oss_entry = entry;
-#endif
 	return 0;
 }
 
 int __exit snd_minor_info_oss_done(void)
 {
-#ifdef CONFIG_PROC_FS
 	if (snd_minor_info_oss_entry)
 		snd_info_unregister(snd_minor_info_oss_entry);
-#endif
 	return 0;
 }
+#endif /* CONFIG_PROC_FS */
 
 #endif /* CONFIG_SND_OSSEMUL */
diff --git a/sound/core/timer.c b/sound/core/timer.c
index c62dbacdca1..2425b971b24 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1052,6 +1052,7 @@ static int snd_timer_register_system(void)
 	return snd_timer_global_register(timer);
 }
 
+#ifdef CONFIG_PROC_FS
 /*
  *  Info interface
  */
@@ -1107,6 +1108,33 @@ static void snd_timer_proc_read(struct snd_info_entry *entry,
 	up(&register_mutex);
 }
 
+static struct snd_info_entry *snd_timer_proc_entry = NULL;
+
+static void __init snd_timer_proc_init(void)
+{
+	struct snd_info_entry *entry;
+
+	entry = snd_info_create_module_entry(THIS_MODULE, "timers", NULL);
+	if (entry != NULL) {
+		entry->c.text.read_size = SNDRV_TIMER_DEVICES * 128;
+		entry->c.text.read = snd_timer_proc_read;
+		if (snd_info_register(entry) < 0) {
+			snd_info_free_entry(entry);
+			entry = NULL;
+		}
+	}
+	snd_timer_proc_entry = entry;
+}
+
+static void __exit snd_timer_proc_done(void)
+{
+	snd_info_unregister(snd_timer_proc_entry);
+}
+#else /* !CONFIG_PROC_FS */
+#define snd_timer_proc_init()
+#define snd_timer_proc_done()
+#endif
+
 /*
  *  USER SPACE interface
  */
@@ -1928,27 +1956,15 @@ static struct file_operations snd_timer_f_ops =
  *  ENTRY functions
  */
 
-static struct snd_info_entry *snd_timer_proc_entry = NULL;
-
 static int __init alsa_timer_init(void)
 {
 	int err;
-	struct snd_info_entry *entry;
 
 #ifdef SNDRV_OSS_INFO_DEV_TIMERS
 	snd_oss_info_register(SNDRV_OSS_INFO_DEV_TIMERS, SNDRV_CARDS - 1,
 			      "system timer");
 #endif
-	entry = snd_info_create_module_entry(THIS_MODULE, "timers", NULL);
-	if (entry != NULL) {
-		entry->c.text.read_size = SNDRV_TIMER_DEVICES * 128;
-		entry->c.text.read = snd_timer_proc_read;
-		if (snd_info_register(entry) < 0) {
-			snd_info_free_entry(entry);
-			entry = NULL;
-		}
-	}
-	snd_timer_proc_entry = entry;
+
 	if ((err = snd_timer_register_system()) < 0)
 		snd_printk(KERN_ERR "unable to register system timer (%i)\n",
 			   err);
@@ -1956,6 +1972,7 @@ static int __init alsa_timer_init(void)
 				       &snd_timer_f_ops, NULL, "timer")) < 0)
 		snd_printk(KERN_ERR "unable to register timer device (%i)\n",
 			   err);
+	snd_timer_proc_init();
 	return 0;
 }
 
@@ -1969,10 +1986,7 @@ static void __exit alsa_timer_exit(void)
 		struct snd_timer *timer = list_entry(p, struct snd_timer, device_list);
 		snd_timer_unregister(timer);
 	}
-	if (snd_timer_proc_entry) {
-		snd_info_unregister(snd_timer_proc_entry);
-		snd_timer_proc_entry = NULL;
-	}
+	snd_timer_proc_done();
 #ifdef SNDRV_OSS_INFO_DEV_TIMERS
 	snd_oss_info_unregister(SNDRV_OSS_INFO_DEV_TIMERS, SNDRV_CARDS - 1);
 #endif
-- 
cgit v1.2.3-70-g09d2


From 19b99fbaed2e2971b756311435c67e84431d8515 Mon Sep 17 00:00:00 2001
From: James Courtier-Dutton <James@superbug.co.uk>
Date: Sun, 4 Dec 2005 18:03:03 +0100
Subject: [ALSA] emu10k1: Partial support for Creative emu1212m

Modules: EMU10K1/EMU10K2 driver

Distorted sound now comes from the Audio Out socket. Still more work to do.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
---
 include/sound/emu10k1.h          |   1 +
 sound/pci/emu10k1/emu10k1_main.c | 150 +++++++++++++++++++++++++++++++++++++--
 sound/pci/emu10k1/emufx.c        |   9 +++
 sound/pci/emu10k1/emumixer.c     |   4 +-
 4 files changed, 159 insertions(+), 5 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 3d0496cc109..0d6e68c43e6 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1061,6 +1061,7 @@ struct snd_emu_chip_details {
 	unsigned char spdif_bug;    /* Has Spdif phasing bug */
 	unsigned char ac97_chip;    /* Has an AC97 chip: 1 = mandatory, 2 = optional */
 	unsigned char ecard;        /* APS EEPROM */
+	unsigned char emu1212m;     /* EMU 1212m card */
 	const char *driver;
 	const char *name;
 	const char *id;		/* for backward compatibility - can be NULL if not needed */
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index 175f8aac8de..f6cf589593b 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -42,6 +42,7 @@
 #include "p16v.h"
 #include "tina2.h"
 
+
 /*************************************************************************
  * EMU10K1 init / done
  *************************************************************************/
@@ -217,7 +218,9 @@ static int snd_emu10k1_init(struct snd_emu10k1 *emu, int enable_ir, int resume)
 		outl(HCFG_LOCKTANKCACHE_MASK | HCFG_AUTOMUTE | HCFG_JOYENABLE, emu->port + HCFG);
 
 	if (enable_ir) {	/* enable IR for SB Live */
-		if (emu->audigy) {
+		if ( emu->card_capabilities->emu1212m) {
+			;  /* Disable all access to A_IOCFG for the emu1212m */
+		} else if (emu->audigy) {
 			unsigned int reg = inl(emu->port + A_IOCFG);
 			outl(reg | A_IOCFG_GPOUT2, emu->port + A_IOCFG);
 			udelay(500);
@@ -234,7 +237,9 @@ static int snd_emu10k1_init(struct snd_emu10k1 *emu, int enable_ir, int resume)
  		}
 	}
 	
-	if (emu->audigy) {	/* enable analog output */
+	if ( emu->card_capabilities->emu1212m) {
+		;  /* Disable all access to A_IOCFG for the emu1212m */
+	} else if (emu->audigy) {	/* enable analog output */
 		unsigned int reg = inl(emu->port + A_IOCFG);
 		outl(reg | A_IOCFG_GPOUT0, emu->port + A_IOCFG);
 	}
@@ -250,7 +255,9 @@ static void snd_emu10k1_audio_enable(struct snd_emu10k1 *emu)
 	outl(inl(emu->port + HCFG) | HCFG_AUDIOENABLE, emu->port + HCFG);
 
 	/* Enable analog/digital outs on audigy */
-	if (emu->audigy) {
+	if ( emu->card_capabilities->emu1212m) {
+		;  /* Disable all access to A_IOCFG for the emu1212m */
+	} else if (emu->audigy) {
 		outl(inl(emu->port + A_IOCFG) & ~0x44, emu->port + A_IOCFG);
  
 		if (emu->card_capabilities->ca0151_chip) { /* audigy2 */
@@ -542,6 +549,136 @@ static int __devinit snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu)
 	return 0;
 }
 
+static int snd_emu1212m_fpga_write(struct snd_emu10k1 * emu, int reg, int value)
+{
+	if (reg<0 || reg>0x3f)
+		return 1;
+	reg+=0x40; /* 0x40 upwards are registers. */
+	if (value<0 || value>0x3f) /* 0 to 0x3f are values */
+		return 1;
+	outl(reg, emu->port + A_IOCFG);
+	outl(reg | 0x80, emu->port + A_IOCFG);  /* High bit clocks the value into the fpga. */
+	outl(value, emu->port + A_IOCFG);
+	outl(value | 0x80 , emu->port + A_IOCFG);  /* High bit clocks the value into the fpga. */
+
+	return 0;
+}
+
+static int snd_emu1212m_fpga_read(struct snd_emu10k1 * emu, int reg, int *value)
+{
+	if (reg<0 || reg>0x3f)
+		return 1;
+	reg+=0x40; /* 0x40 upwards are registers. */
+	outl(reg, emu->port + A_IOCFG);
+	outl(reg | 0x80, emu->port + A_IOCFG);  /* High bit clocks the value into the fpga. */
+	*value = inl(emu->port + A_IOCFG);
+
+	return 0;
+}
+
+static int snd_emu1212m_fpga_netlist_write(struct snd_emu10k1 * emu, int reg, int value)
+{
+	snd_emu1212m_fpga_write(emu, 0x00, ((reg >> 8) & 0x3f) );
+	snd_emu1212m_fpga_write(emu, 0x01, (reg & 0x3f) );
+	snd_emu1212m_fpga_write(emu, 0x02, ((value >> 8) & 0x3f) );
+	snd_emu1212m_fpga_write(emu, 0x03, (value & 0x3f) );
+
+	return 0;
+}
+
+static int __devinit snd_emu10k1_emu1212m_init(struct snd_emu10k1 * emu)
+{
+	unsigned int i;
+	int tmp;
+
+	snd_printk(KERN_ERR "emu1212m: Special config.\n");
+	outl(0x0005a00c, emu->port + HCFG);
+	outl(0x0005a004, emu->port + HCFG);
+	outl(0x0005a000, emu->port + HCFG);
+	outl(0x0005a000, emu->port + HCFG);
+
+	snd_emu1212m_fpga_read(emu, 0x22, &tmp );
+	snd_emu1212m_fpga_read(emu, 0x23, &tmp );
+	snd_emu1212m_fpga_read(emu, 0x24, &tmp );
+	snd_emu1212m_fpga_write(emu, 0x04, 0x01 );
+	snd_emu1212m_fpga_read(emu, 0x0b, &tmp );
+	snd_emu1212m_fpga_write(emu, 0x0b, 0x01 );
+	snd_emu1212m_fpga_read(emu, 0x10, &tmp );
+	snd_emu1212m_fpga_write(emu, 0x10, 0x00 );
+	snd_emu1212m_fpga_read(emu, 0x11, &tmp );
+	snd_emu1212m_fpga_write(emu, 0x11, 0x30 );
+	snd_emu1212m_fpga_read(emu, 0x13, &tmp );
+	snd_emu1212m_fpga_write(emu, 0x13, 0x0f );
+	snd_emu1212m_fpga_read(emu, 0x11, &tmp );
+	snd_emu1212m_fpga_write(emu, 0x11, 0x30 );
+	snd_emu1212m_fpga_read(emu, 0x0a, &tmp );
+	snd_emu1212m_fpga_write(emu, 0x0a, 0x10 );
+	snd_emu1212m_fpga_write(emu, 0x0c, 0x19 );
+	snd_emu1212m_fpga_write(emu, 0x12, 0x0c );
+	snd_emu1212m_fpga_write(emu, 0x09, 0x0f );
+	snd_emu1212m_fpga_write(emu, 0x06, 0x00 );
+	snd_emu1212m_fpga_write(emu, 0x05, 0x00 );
+	snd_emu1212m_fpga_write(emu, 0x0e, 0x12 );
+	snd_emu1212m_fpga_netlist_write(emu, 0x0000, 0x0200);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0001, 0x0201);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0002, 0x0500);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0003, 0x0501);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0004, 0x0400);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0005, 0x0401);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0006, 0x0402);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0007, 0x0403);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0008, 0x0404);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0009, 0x0405);
+	snd_emu1212m_fpga_netlist_write(emu, 0x000a, 0x0406);
+	snd_emu1212m_fpga_netlist_write(emu, 0x000b, 0x0407);
+	snd_emu1212m_fpga_netlist_write(emu, 0x000c, 0x0100);
+	snd_emu1212m_fpga_netlist_write(emu, 0x000d, 0x0104);
+	snd_emu1212m_fpga_netlist_write(emu, 0x000e, 0x0200);
+	snd_emu1212m_fpga_netlist_write(emu, 0x000f, 0x0201);
+	for (i=0;i < 0x20;i++) {
+		snd_emu1212m_fpga_netlist_write(emu, 0x0100+i, 0x0000);
+	}
+	for (i=0;i < 4;i++) {
+		snd_emu1212m_fpga_netlist_write(emu, 0x0200+i, 0x0000);
+	}
+	for (i=0;i < 7;i++) {
+		snd_emu1212m_fpga_netlist_write(emu, 0x0300+i, 0x0000);
+	}
+	for (i=0;i < 7;i++) {
+		snd_emu1212m_fpga_netlist_write(emu, 0x0400+i, 0x0000);
+	}
+	snd_emu1212m_fpga_netlist_write(emu, 0x0500, 0x0108);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0501, 0x010c);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0600, 0x0110);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0601, 0x0114);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0700, 0x0118);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0701, 0x011c);
+	snd_emu1212m_fpga_write(emu, 0x07, 0x01 );
+
+	snd_emu1212m_fpga_read(emu, 0x21, &tmp );
+
+	outl(0x0000a000, emu->port + HCFG);
+	outl(0x0000a001, emu->port + HCFG);
+	/* Initial boot complete. Now patches */
+
+	snd_emu1212m_fpga_read(emu, 0x21, &tmp );
+	snd_emu1212m_fpga_write(emu, 0x0c, 0x19 );
+	snd_emu1212m_fpga_write(emu, 0x12, 0x0c );
+	snd_emu1212m_fpga_write(emu, 0x0c, 0x19 );
+	snd_emu1212m_fpga_write(emu, 0x12, 0x0c );
+	snd_emu1212m_fpga_read(emu, 0x0a, &tmp );
+	snd_emu1212m_fpga_write(emu, 0x0a, 0x10 );
+
+	snd_emu1212m_fpga_read(emu, 0x20, &tmp );
+	snd_emu1212m_fpga_read(emu, 0x21, &tmp );
+
+	snd_emu1212m_fpga_netlist_write(emu, 0x0300, 0x0312);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0301, 0x0313);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0200, 0x0302);
+	snd_emu1212m_fpga_netlist_write(emu, 0x0201, 0x0303);
+
+	return 0;
+}
 /*
  *  Create the EMU10K1 instance
  */
@@ -623,7 +760,7 @@ static struct snd_emu_chip_details emu_chip_details[] = {
 	 .id = "EMU1212m",
 	 .emu10k2_chip = 1,
 	 .ca0102_chip = 1,
-	 .ecard = 1} ,
+	 .emu1212m = 1} ,
 	/* Tested by James@superbug.co.uk 3rd July 2005 */
 	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20071102,
 	 .driver = "Audigy2", .name = "Audigy 4 PRO [SB0380]", 
@@ -1013,6 +1150,11 @@ int __devinit snd_emu10k1_create(struct snd_card *card,
 	} else if (emu->card_capabilities->ca_cardbus_chip) {
 		if ((err = snd_emu10k1_cardbus_init(emu)) < 0)
 			goto error;
+ 	} else if (emu->card_capabilities->emu1212m) {
+ 		if ((err = snd_emu10k1_emu1212m_init(emu)) < 0) {
+ 			snd_emu10k1_free(emu);
+ 			return err;
+ 		}
 	} else {
 		/* 5.1: Enable the additional AC97 Slots. If the emu10k1 version
 			does not support this, it shouldn't do any harm */
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index a44e4fdfc02..cd356b04078 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -1102,6 +1102,14 @@ static int __devinit _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu)
 	/* stop FX processor */
 	snd_emu10k1_ptr_write(emu, A_DBG, 0, (emu->fx8010.dbg = 0) | A_DBG_SINGLE_STEP);
 
+#if 0
+	/* FIX: jcd test */
+	for (z = 0; z < 80; z=z+2) {
+		A_OP(icode, &ptr, iACC3, A_EXTOUT(z), A_FXBUS(FXBUS_PCM_LEFT_FRONT), A_C_00000000, A_C_00000000); /* left */
+		A_OP(icode, &ptr, iACC3, A_EXTOUT(z+1), A_FXBUS(FXBUS_PCM_RIGHT_FRONT), A_C_00000000, A_C_00000000); /* right */
+	}
+#endif /* jcd test */
+#if 1
 	/* PCM front Playback Volume (independent from stereo mix) */
 	A_OP(icode, &ptr, iMAC0, A_GPR(playback), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT_FRONT));
 	A_OP(icode, &ptr, iMAC0, A_GPR(playback+1), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_FRONT));
@@ -1447,6 +1455,7 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
 		A_OP(icode, &ptr, iACC3, A_FXBUS2(z), A_C_00000000, A_C_00000000, A_EXTIN(z));
 	}
 	
+#endif /* JCD test */
 	/*
 	 * ok, set up done..
 	 */
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c
index 98fb8139427..306fe4aa4aa 100644
--- a/sound/pci/emu10k1/emumixer.c
+++ b/sound/pci/emu10k1/emumixer.c
@@ -959,7 +959,9 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
 			return err;
 	}
 
-	if (emu->audigy) {
+	if ( emu->card_capabilities->emu1212m) {
+		;  /* Disable the snd_audigy_spdif_shared_spdif */
+	} else if (emu->audigy) {
 		if ((kctl = snd_ctl_new1(&snd_audigy_shared_spdif, emu)) == NULL)
 			return -ENOMEM;
 		if ((err = snd_ctl_add(card, kctl)))
-- 
cgit v1.2.3-70-g09d2


From a0faefedf7d81b6ead6a33e5576a6439606d7ed5 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg59@srcf.ucam.org>
Date: Tue, 6 Dec 2005 13:59:12 +0100
Subject: [ALSA] Add a new quirk for mute-LED and HP-only.

Modules: AC97 Codec,ATIIXP driver,Intel8x0 driver

This patch adds a new quirk for ac97 hardware that combines the existing
AC97_TUNE_MUTE_LED and AC97_TUNE_HP_ONLY quirks.  This is needed for several
current HP laptops.  Additionally, it adds the HP nx6125 to the
AC97_TUNE_MUTE_LED list.

Fixed for the latest version of ALSA by Takashi Iwai <tiwai@suse.de>.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/ac97_codec.h  |  1 +
 sound/pci/ac97/ac97_codec.c | 36 ++++++++++++++++++++++++++++++++++++
 sound/pci/atiixp.c          |  6 ++++++
 sound/pci/intel8x0.c        | 24 ++++++++++++++++++++++++
 4 files changed, 67 insertions(+)

(limited to 'include/sound')

diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index a1814cd9549..b0b3ea7b365 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -541,6 +541,7 @@ enum {
 	AC97_TUNE_ALC_JACK,	/* for Realtek, enable JACK detection */
 	AC97_TUNE_INV_EAPD,	/* inverted EAPD implementation */
 	AC97_TUNE_MUTE_LED,	/* EAPD bit works as mute LED */
+	AC97_TUNE_HP_MUTE_LED,  /* EAPD bit works as mute LED, use headphone control as master */
 };
 
 struct ac97_quirk {
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 33d7a1fc2f9..3020ca2b602 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -2457,6 +2457,41 @@ static int tune_mute_led(struct snd_ac97 *ac97)
 	return 0;
 }
 
+static int hp_master_mute_sw_put(struct snd_kcontrol *kcontrol,
+				 struct snd_ctl_elem_value *ucontrol)
+{
+	int err = bind_hp_volsw_put(kcontrol, ucontrol);
+	if (err > 0) {
+		struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
+		int shift = (kcontrol->private_value >> 8) & 0x0f;
+		int rshift = (kcontrol->private_value >> 12) & 0x0f;
+		unsigned short mask;
+		if (shift != rshift)
+			mask = 0x8080;
+		else
+			mask = 0x8000;
+		snd_ac97_update_bits(ac97, AC97_POWERDOWN, 0x8000,
+				     (ac97->regs[AC97_MASTER] & mask) == mask ?
+				     0x8000 : 0);
+	}
+	return err;
+}
+
+static int tune_hp_mute_led(struct snd_ac97 *ac97)
+{
+	struct snd_kcontrol *msw = ctl_find(ac97, "Master Playback Switch", NULL);
+	struct snd_kcontrol *mvol = ctl_find(ac97, "Master Playback Volume", NULL);
+	if (! msw || ! mvol)
+		return -ENOENT;
+	msw->put = hp_master_mute_sw_put;
+	mvol->put = bind_hp_volsw_put;
+	snd_ac97_remove_ctl(ac97, "External Amplifier", NULL);
+	snd_ac97_remove_ctl(ac97, "Headphone Playback", "Switch");
+	snd_ac97_remove_ctl(ac97, "Headphone Playback", "Volume");
+	snd_ac97_update_bits(ac97, AC97_POWERDOWN, 0x8000, 0x8000); /* mute LED on */
+	return 0;
+}
+
 struct quirk_table {
 	const char *name;
 	int (*func)(struct snd_ac97 *);
@@ -2471,6 +2506,7 @@ static struct quirk_table applicable_quirks[] = {
 	{ "alc_jack", tune_alc_jack },
 	{ "inv_eapd", tune_inv_eapd },
 	{ "mute_led", tune_mute_led },
+	{ "hp_mute_led", tune_hp_mute_led },
 };
 
 /* apply the quirk with the given type */
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index 33e0664a192..b7217adaf1d 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -1353,6 +1353,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
 		.name = "HP Pavilion ZV5030US",
 		.type = AC97_TUNE_MUTE_LED
 	},
+	{
+		.subvendor = 0x103c,
+		.subdevice = 0x308b,
+		.name = "HP nx6125",
+		.type = AC97_TUNE_MUTE_LED
+	},
 	{ } /* terminator */
 };
 
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index d3a4e5e8e04..5466b1fa0cd 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -1857,6 +1857,30 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
 		.name = "HP xw8000",
 		.type = AC97_TUNE_HP_ONLY
 	},
+	{
+		.subvendor = 0x103c,
+		.subdevice = 0x0938,
+		.name = "HP nc4200",
+		.type = AC97_TUNE_HP_MUTE_LED
+	},
+	{
+		.subvendor = 0x103c,
+		.subdevice = 0x099c,
+		.name = "HP nc6120",
+		.type = AC97_TUNE_HP_MUTE_LED
+	},
+	{
+		.subvendor = 0x103c,
+		.subdevice = 0x0944,
+		.name = "HP nc6220",
+		.type = AC97_TUNE_HP_MUTE_LED
+	},
+	{
+		.subvendor = 0x103c,
+		.subdevice = 0x0934,
+		.name = "HP nc8220",
+		.type = AC97_TUNE_HP_MUTE_LED
+	},
 	{
 		.subvendor = 0x103c,
 		.subdevice = 0x12f1,
-- 
cgit v1.2.3-70-g09d2


From 416c1079d30f1a52399b96f6772e993274b774ae Mon Sep 17 00:00:00 2001
From: Clemens Ladisch <clemens@ladisch.de>
Date: Wed, 7 Dec 2005 09:11:05 +0100
Subject: [ALSA] Nest sound devices

Modules: ALSA Core

Make the control device parent of all other ALSA devices of a card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
---
 include/sound/core.h |  1 +
 sound/core/device.c  |  2 +-
 sound/core/sound.c   | 11 +++++++++--
 3 files changed, 11 insertions(+), 3 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/core.h b/include/sound/core.h
index 90ac6132ea3..dbe7a2c3027 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -134,6 +134,7 @@ struct snd_card {
 	wait_queue_head_t shutdown_sleep;
 	struct work_struct free_workq;	/* for free in workqueue */
 	struct device *dev;
+	struct class_device *parent_device;
 
 #ifdef CONFIG_PM
 	unsigned int power_state;	/* power state */
diff --git a/sound/core/device.c b/sound/core/device.c
index b1cf6ec5678..478264cab67 100644
--- a/sound/core/device.c
+++ b/sound/core/device.c
@@ -193,7 +193,7 @@ int snd_device_register_all(struct snd_card *card)
 	int err;
 	
 	snd_assert(card != NULL, return -ENXIO);
-	list_for_each(list, &card->devices) {
+	list_for_each_prev(list, &card->devices) {
 		dev = snd_device(list);
 		if (dev->state == SNDRV_DEV_BUILD && dev->ops->dev_register) {
 			if ((err = dev->ops->dev_register(dev)) < 0)
diff --git a/sound/core/sound.c b/sound/core/sound.c
index a8eda02bcf1..2f6108deb21 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -245,6 +245,7 @@ int snd_register_device(int type, struct snd_card *card, int dev,
 	int minor;
 	struct snd_minor *preg;
 	struct device *device = NULL;
+	struct class_device *class_device = NULL;
 
 	snd_assert(name, return -EINVAL);
 	preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL);
@@ -272,9 +273,15 @@ int snd_register_device(int type, struct snd_card *card, int dev,
 	snd_minors[minor] = preg;
 	if (type != SNDRV_DEVICE_TYPE_CONTROL || preg->card >= cards_limit)
 		devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name);
-	if (card)
+	if (card) {
 		device = card->dev;
-	class_device_create(sound_class, NULL, MKDEV(major, minor), device, "%s", name);
+		class_device = card->parent_device;
+	}
+	class_device = class_device_create(sound_class, class_device,
+					   MKDEV(major, minor), device,
+					   "%s", name);
+	if (type == SNDRV_DEVICE_TYPE_CONTROL)
+		card->parent_device = class_device;
 
 	up(&sound_mutex);
 	return 0;
-- 
cgit v1.2.3-70-g09d2


From 83e8ad6984dccd6d848ac91ba0df379ff968180b Mon Sep 17 00:00:00 2001
From: Clemens Ladisch <clemens@ladisch.de>
Date: Mon, 12 Dec 2005 09:30:43 +0100
Subject: [ALSA] seq: remove struct snd_seq_client_callback

The fields of struct snd_seq_client_callback either aren't used or are
always set to the same value, so we can get rid of it altogether.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
---
 include/sound/seq_kernel.h        | 12 +-----------
 sound/core/seq/oss/seq_oss_init.c |  9 +--------
 sound/core/seq/seq_clientmgr.c    |  9 +++------
 sound/core/seq/seq_clientmgr.h    |  2 --
 sound/core/seq/seq_dummy.c        |  6 +-----
 sound/core/seq/seq_midi.c         |  6 +-----
 sound/core/seq/seq_system.c       |  6 +-----
 sound/core/seq/seq_virmidi.c      |  7 +------
 sound/drivers/opl3/opl3_seq.c     |  6 +-----
 sound/drivers/opl4/opl4_seq.c     |  6 +-----
 sound/isa/gus/gus_synth.c         |  6 +-----
 sound/pci/trident/trident_synth.c |  6 +-----
 sound/synth/emux/emux_seq.c       |  8 +-------
 13 files changed, 14 insertions(+), 75 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h
index 1b60890b44c..77cf57e2148 100644
--- a/include/sound/seq_kernel.h
+++ b/include/sound/seq_kernel.h
@@ -60,15 +60,6 @@ typedef union snd_seq_timestamp snd_seq_timestamp_t;
 /* max size of event size */
 #define SNDRV_SEQ_MAX_EVENT_LEN		0x3fffffff
 
-/* call-backs for kernel client */
-
-struct snd_seq_client_callback {
-	void *private_data;
-	unsigned allow_input: 1,
-		 allow_output: 1;
-	/*...*/
-};
-
 /* call-backs for kernel port */
 struct snd_seq_port_callback {
 	struct module *owner;
@@ -84,8 +75,7 @@ struct snd_seq_port_callback {
 };
 
 /* interface for kernel client */
-int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
-				 struct snd_seq_client_callback *callback);
+int snd_seq_create_kernel_client(struct snd_card *card, int client_index);
 int snd_seq_delete_kernel_client(int client);
 int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
 int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event *ev, int atomic, int hop);
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index 97e2493e931..cd4139adec0 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -65,7 +65,6 @@ int __init
 snd_seq_oss_create_client(void)
 {
 	int rc;
-	struct snd_seq_client_callback callback;
 	struct snd_seq_client_info *info;
 	struct snd_seq_port_info *port;
 	struct snd_seq_port_callback port_callback;
@@ -78,13 +77,7 @@ snd_seq_oss_create_client(void)
 	}
 
 	/* create ALSA client */
-	memset(&callback, 0, sizeof(callback));
-
-	callback.private_data = NULL;
-	callback.allow_input = 1;
-	callback.allow_output = 1;
-
-	rc = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_OSS, &callback);
+	rc = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_OSS);
 	if (rc < 0)
 		goto __error;
 
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 79199f53d63..bd8c0989785 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -2212,15 +2212,12 @@ static long snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg
 
 
 /* exported to kernel modules */
-int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
-				 struct snd_seq_client_callback *callback)
+int snd_seq_create_kernel_client(struct snd_card *card, int client_index)
 {
 	struct snd_seq_client *client;
 
 	snd_assert(! in_interrupt(), return -EBUSY);
 
-	if (callback == NULL)
-		return -EINVAL;
 	if (card && client_index > 3)
 		return -EINVAL;
 	if (card == NULL && client_index > 63)
@@ -2244,8 +2241,8 @@ int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
 	}
 	usage_alloc(&client_usage, 1);
 
-	client->accept_input = callback->allow_output;
-	client->accept_output = callback->allow_input;
+	client->accept_input = 1;
+	client->accept_output = 1;
 		
 	sprintf(client->name, "Client-%d", client->number);
 
diff --git a/sound/core/seq/seq_clientmgr.h b/sound/core/seq/seq_clientmgr.h
index 7131d218dc7..450091ca153 100644
--- a/sound/core/seq/seq_clientmgr.h
+++ b/sound/core/seq/seq_clientmgr.h
@@ -91,8 +91,6 @@ struct snd_seq_client *snd_seq_client_use_ptr(int clientid);
 int snd_seq_dispatch_event(struct snd_seq_event_cell *cell, int atomic, int hop);
 
 /* exported to other modules */
-int snd_seq_register_kernel_client(struct snd_seq_client_callback *callback, void *private_data);
-int snd_seq_unregister_kernel_client(int client);
 int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
 int snd_seq_kernel_client_enqueue_blocking(int client, struct snd_seq_event * ev,
 					   struct file *file, int atomic, int hop);
diff --git a/sound/core/seq/seq_dummy.c b/sound/core/seq/seq_dummy.c
index 8101a475e3e..e7344b6332d 100644
--- a/sound/core/seq/seq_dummy.c
+++ b/sound/core/seq/seq_dummy.c
@@ -193,7 +193,6 @@ create_port(int idx, int type)
 static int __init
 register_client(void)
 {
-	struct snd_seq_client_callback cb;
 	struct snd_seq_client_info cinfo;
 	struct snd_seq_dummy_port *rec1, *rec2;
 	int i;
@@ -204,10 +203,7 @@ register_client(void)
 	}
 
 	/* create client */
-	memset(&cb, 0, sizeof(cb));
-	cb.allow_input = 1;
-	cb.allow_output = 1;
-	my_client = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_DUMMY, &cb);
+	my_client = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_DUMMY);
 	if (my_client < 0)
 		return my_client;
 
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
index 0a65eb2f976..512ffddd158 100644
--- a/sound/core/seq/seq_midi.c
+++ b/sound/core/seq/seq_midi.c
@@ -295,7 +295,6 @@ snd_seq_midisynth_register_port(struct snd_seq_device *dev)
 	struct snd_rawmidi_info *info;
 	int newclient = 0;
 	unsigned int p, ports;
-	struct snd_seq_client_callback callbacks;
 	struct snd_seq_port_callback pcallbacks;
 	struct snd_card *card = dev->card;
 	int device = dev->device;
@@ -334,10 +333,7 @@ snd_seq_midisynth_register_port(struct snd_seq_device *dev)
 			kfree(info);
 			return -ENOMEM;
 		}
-		memset(&callbacks, 0, sizeof(callbacks));
-		callbacks.private_data = client;
-		callbacks.allow_input = callbacks.allow_output = 1;
-		client->seq_client = snd_seq_create_kernel_client(card, 0, &callbacks);
+		client->seq_client = snd_seq_create_kernel_client(card, 0);
 		if (client->seq_client < 0) {
 			kfree(client);
 			up(&register_mutex);
diff --git a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c
index 86b1cba33c0..c87c883bd92 100644
--- a/sound/core/seq/seq_system.c
+++ b/sound/core/seq/seq_system.c
@@ -120,8 +120,6 @@ static int event_input_timer(struct snd_seq_event * ev, int direct, void *privat
 /* register our internal client */
 int __init snd_seq_system_client_init(void)
 {
-
-	struct snd_seq_client_callback callbacks;
 	struct snd_seq_port_callback pcallbacks;
 	struct snd_seq_client_info *inf;
 	struct snd_seq_port_info *port;
@@ -134,14 +132,12 @@ int __init snd_seq_system_client_init(void)
 		return -ENOMEM;
 	}
 
-	memset(&callbacks, 0, sizeof(callbacks));
 	memset(&pcallbacks, 0, sizeof(pcallbacks));
 	pcallbacks.owner = THIS_MODULE;
 	pcallbacks.event_input = event_input_timer;
 
 	/* register client */
-	callbacks.allow_input = callbacks.allow_output = 1;
-	sysclient = snd_seq_create_kernel_client(NULL, 0, &callbacks);
+	sysclient = snd_seq_create_kernel_client(NULL, 0);
 
 	/* set our name */
 	inf->client = 0;
diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c
index ea2113968fe..2739f577257 100644
--- a/sound/core/seq/seq_virmidi.c
+++ b/sound/core/seq/seq_virmidi.c
@@ -359,7 +359,6 @@ static struct snd_rawmidi_ops snd_virmidi_output_ops = {
 static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev)
 {
 	int client;
-	struct snd_seq_client_callback callbacks;
 	struct snd_seq_port_callback pcallbacks;
 	struct snd_seq_client_info *info;
 	struct snd_seq_port_info *pinfo;
@@ -375,11 +374,7 @@ static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev)
 		goto __error;
 	}
 
-	memset(&callbacks, 0, sizeof(callbacks));
-	callbacks.private_data = rdev;
-	callbacks.allow_input = 1;
-	callbacks.allow_output = 1;
-	client = snd_seq_create_kernel_client(rdev->card, rdev->device, &callbacks);
+	client = snd_seq_create_kernel_client(rdev->card, rdev->device);
 	if (client < 0) {
 		err = client;
 		goto __error;
diff --git a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c
index 1886b2958e7..582ff63e784 100644
--- a/sound/drivers/opl3/opl3_seq.c
+++ b/sound/drivers/opl3/opl3_seq.c
@@ -219,7 +219,6 @@ static int snd_opl3_seq_new_device(struct snd_seq_device *dev)
 {
 	struct snd_opl3 *opl3;
 	int client;
-	struct snd_seq_client_callback callbacks;
 	struct snd_seq_client_info cinfo;
 	int opl_ver;
 
@@ -232,11 +231,8 @@ static int snd_opl3_seq_new_device(struct snd_seq_device *dev)
 	opl3->seq_client = -1;
 
 	/* allocate new client */
-	memset(&callbacks, 0, sizeof(callbacks));
-	callbacks.private_data = opl3;
-	callbacks.allow_output = callbacks.allow_input = 1;
 	client = opl3->seq_client =
-	    snd_seq_create_kernel_client(opl3->card, opl3->seq_dev_num, &callbacks);
+		snd_seq_create_kernel_client(opl3->card, opl3->seq_dev_num);
 	if (client < 0)
 		return client;
 
diff --git a/sound/drivers/opl4/opl4_seq.c b/sound/drivers/opl4/opl4_seq.c
index bfd68e49c91..a69117dd007 100644
--- a/sound/drivers/opl4/opl4_seq.c
+++ b/sound/drivers/opl4/opl4_seq.c
@@ -127,7 +127,6 @@ static int snd_opl4_seq_new_device(struct snd_seq_device *dev)
 {
 	struct snd_opl4 *opl4;
 	int client;
-	struct snd_seq_client_callback callbacks;
 	struct snd_seq_client_info cinfo;
 	struct snd_seq_port_callback pcallbacks;
 
@@ -144,10 +143,7 @@ static int snd_opl4_seq_new_device(struct snd_seq_device *dev)
 	opl4->chset->private_data = opl4;
 
 	/* allocate new client */
-	memset(&callbacks, 0, sizeof(callbacks));
-	callbacks.private_data = opl4;
-	callbacks.allow_output = callbacks.allow_input = 1;
-	client = snd_seq_create_kernel_client(opl4->card, opl4->seq_dev_num, &callbacks);
+	client = snd_seq_create_kernel_client(opl4->card, opl4->seq_dev_num);
 	if (client < 0) {
 		snd_midi_channel_free_set(opl4->chset);
 		return client;
diff --git a/sound/isa/gus/gus_synth.c b/sound/isa/gus/gus_synth.c
index 9c7d6986f62..6464488363e 100644
--- a/sound/isa/gus/gus_synth.c
+++ b/sound/isa/gus/gus_synth.c
@@ -214,7 +214,6 @@ static int snd_gus_synth_new_device(struct snd_seq_device *dev)
 {
 	struct snd_gus_card *gus;
 	int client, i;
-	struct snd_seq_client_callback callbacks;
 	struct snd_seq_client_info *cinfo;
 	struct snd_seq_port_subscribe sub;
 	struct snd_iwffff_ops *iwops;
@@ -233,11 +232,8 @@ static int snd_gus_synth_new_device(struct snd_seq_device *dev)
 		return -ENOMEM;
 
 	/* allocate new client */
-	memset(&callbacks, 0, sizeof(callbacks));
-	callbacks.private_data = gus;
-	callbacks.allow_output = callbacks.allow_input = 1;
 	client = gus->gf1.seq_client =
-			snd_seq_create_kernel_client(gus->card, 1, &callbacks);
+		snd_seq_create_kernel_client(gus->card, 1);
 	if (client < 0) {
 		kfree(cinfo);
 		return client;
diff --git a/sound/pci/trident/trident_synth.c b/sound/pci/trident/trident_synth.c
index a49682ef3e3..e31055a4bd2 100644
--- a/sound/pci/trident/trident_synth.c
+++ b/sound/pci/trident/trident_synth.c
@@ -934,7 +934,6 @@ static int snd_trident_synth_new_device(struct snd_seq_device *dev)
 {
 	struct snd_trident *trident;
 	int client, i;
-	struct snd_seq_client_callback callbacks;
 	struct snd_seq_client_info cinfo;
 	struct snd_seq_port_subscribe sub;
 	struct snd_simple_ops *simpleops;
@@ -947,11 +946,8 @@ static int snd_trident_synth_new_device(struct snd_seq_device *dev)
 	trident->synth.seq_client = -1;
 
 	/* allocate new client */
-	memset(&callbacks, 0, sizeof(callbacks));
-	callbacks.private_data = trident;
-	callbacks.allow_output = callbacks.allow_input = 1;
 	client = trident->synth.seq_client =
-	    snd_seq_create_kernel_client(trident->card, 1, &callbacks);
+		snd_seq_create_kernel_client(trident->card, 1);
 	if (client < 0)
 		return client;
 
diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c
index f5a832ff362..b7129c5aee0 100644
--- a/sound/synth/emux/emux_seq.c
+++ b/sound/synth/emux/emux_seq.c
@@ -347,17 +347,11 @@ snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info)
 static int
 get_client(struct snd_card *card, int index, char *name)
 {
-	struct snd_seq_client_callback callbacks;
 	struct snd_seq_client_info cinfo;
 	int client;
 
-	memset(&callbacks, 0, sizeof(callbacks));
-	callbacks.private_data = NULL;
-	callbacks.allow_input = 1;
-	callbacks.allow_output = 1;
-
 	/* Find a free client, start from 1 as the MPU expects to use 0 */
-	client = snd_seq_create_kernel_client(card, index, &callbacks);
+	client = snd_seq_create_kernel_client(card, index);
 	if (client < 0)
 		return client;
 
-- 
cgit v1.2.3-70-g09d2


From 7b6d92451ad5e1136dc347347e888b94638b8ba9 Mon Sep 17 00:00:00 2001
From: Clemens Ladisch <clemens@ladisch.de>
Date: Mon, 12 Dec 2005 09:33:37 +0100
Subject: [ALSA] seq: set client name in snd_seq_create_kernel_client()

All users of snd_seq_create_kernel_client() have to set the client name
anyway, so we can just pass the name as parameter.  This relieves us
from having to muck around with a struct snd_seq_client_info in these
cases.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
---
 include/sound/seq_kernel.h        |  4 +++-
 sound/core/seq/oss/seq_oss_init.c | 16 +++-------------
 sound/core/seq/seq_clientmgr.c    |  8 ++++++--
 sound/core/seq/seq_dummy.c        | 11 ++---------
 sound/core/seq/seq_midi.c         | 24 +++++-------------------
 sound/core/seq/seq_system.c       | 16 ++--------------
 sound/core/seq/seq_virmidi.c      | 17 +++++------------
 sound/drivers/opl3/opl3_seq.c     | 17 ++++++-----------
 sound/drivers/opl4/opl4_seq.c     | 11 ++---------
 sound/isa/gus/gus_synth.c         | 20 +++-----------------
 sound/pci/trident/trident_synth.c | 16 ++++------------
 sound/synth/emux/emux_seq.c       | 29 ++---------------------------
 12 files changed, 43 insertions(+), 146 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h
index 77cf57e2148..f023c1b97f8 100644
--- a/include/sound/seq_kernel.h
+++ b/include/sound/seq_kernel.h
@@ -75,7 +75,9 @@ struct snd_seq_port_callback {
 };
 
 /* interface for kernel client */
-int snd_seq_create_kernel_client(struct snd_card *card, int client_index);
+int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
+				 const char *name_fmt, ...)
+	__attribute__ ((format (printf, 3, 4)));
 int snd_seq_delete_kernel_client(int client);
 int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
 int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event *ev, int atomic, int hop);
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index cd4139adec0..ca5a2ed4d7c 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -65,33 +65,24 @@ int __init
 snd_seq_oss_create_client(void)
 {
 	int rc;
-	struct snd_seq_client_info *info;
 	struct snd_seq_port_info *port;
 	struct snd_seq_port_callback port_callback;
 
-	info = kmalloc(sizeof(*info), GFP_KERNEL);
 	port = kmalloc(sizeof(*port), GFP_KERNEL);
-	if (!info || !port) {
+	if (!port) {
 		rc = -ENOMEM;
 		goto __error;
 	}
 
 	/* create ALSA client */
-	rc = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_OSS);
+	rc = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_OSS,
+					  "OSS sequencer");
 	if (rc < 0)
 		goto __error;
 
 	system_client = rc;
 	debug_printk(("new client = %d\n", rc));
 
-	/* set client information */
-	memset(info, 0, sizeof(*info));
-	info->client = system_client;
-	info->type = KERNEL_CLIENT;
-	strcpy(info->name, "OSS sequencer");
-
-	rc = call_ctl(SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, info);
-
 	/* look up midi devices */
 	snd_seq_oss_midi_lookup_ports(system_client);
 
@@ -124,7 +115,6 @@ snd_seq_oss_create_client(void)
 
  __error:
 	kfree(port);
-	kfree(info);
 	return rc;
 }
 
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index bd8c0989785..606d076f72f 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -2212,9 +2212,11 @@ static long snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg
 
 
 /* exported to kernel modules */
-int snd_seq_create_kernel_client(struct snd_card *card, int client_index)
+int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
+				 const char *name_fmt, ...)
 {
 	struct snd_seq_client *client;
+	va_list args;
 
 	snd_assert(! in_interrupt(), return -EBUSY);
 
@@ -2244,7 +2246,9 @@ int snd_seq_create_kernel_client(struct snd_card *card, int client_index)
 	client->accept_input = 1;
 	client->accept_output = 1;
 		
-	sprintf(client->name, "Client-%d", client->number);
+	va_start(args, name_fmt);
+	vsnprintf(client->name, sizeof(client->name), name_fmt, args);
+	va_end(args);
 
 	client->type = KERNEL_CLIENT;
 	up(&register_mutex);
diff --git a/sound/core/seq/seq_dummy.c b/sound/core/seq/seq_dummy.c
index e7344b6332d..2a283a59ea4 100644
--- a/sound/core/seq/seq_dummy.c
+++ b/sound/core/seq/seq_dummy.c
@@ -193,7 +193,6 @@ create_port(int idx, int type)
 static int __init
 register_client(void)
 {
-	struct snd_seq_client_info cinfo;
 	struct snd_seq_dummy_port *rec1, *rec2;
 	int i;
 
@@ -203,17 +202,11 @@ register_client(void)
 	}
 
 	/* create client */
-	my_client = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_DUMMY);
+	my_client = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_DUMMY,
+						 "Midi Through");
 	if (my_client < 0)
 		return my_client;
 
-	/* set client name */
-	memset(&cinfo, 0, sizeof(cinfo));
-	cinfo.client = my_client;
-	cinfo.type = KERNEL_CLIENT;
-	strcpy(cinfo.name, "Midi Through");
-	snd_seq_kernel_client_ctl(my_client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &cinfo);
-
 	/* create ports */
 	for (i = 0; i < ports; i++) {
 		rec1 = create_port(i, 0);
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
index 512ffddd158..ce0df86157d 100644
--- a/sound/core/seq/seq_midi.c
+++ b/sound/core/seq/seq_midi.c
@@ -270,21 +270,6 @@ static void snd_seq_midisynth_delete(struct seq_midisynth *msynth)
 		snd_midi_event_free(msynth->parser);
 }
 
-/* set our client name */
-static int set_client_name(struct seq_midisynth_client *client, struct snd_card *card,
-			   struct snd_rawmidi_info *rmidi)
-{
-	struct snd_seq_client_info cinfo;
-	const char *name;
-
-	memset(&cinfo, 0, sizeof(cinfo));
-	cinfo.client = client->seq_client;
-	cinfo.type = KERNEL_CLIENT;
-	name = rmidi->name[0] ? (const char *)rmidi->name : "External MIDI";
-	strlcpy(cinfo.name, name, sizeof(cinfo.name));
-	return snd_seq_kernel_client_ctl(client->seq_client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &cinfo);
-}
-
 /* register new midi synth port */
 static int
 snd_seq_midisynth_register_port(struct snd_seq_device *dev)
@@ -333,16 +318,17 @@ snd_seq_midisynth_register_port(struct snd_seq_device *dev)
 			kfree(info);
 			return -ENOMEM;
 		}
-		client->seq_client = snd_seq_create_kernel_client(card, 0);
+		client->seq_client =
+			snd_seq_create_kernel_client(
+				card, 0, "%s", info->name[0] ?
+				(const char *)info->name : "External MIDI");
 		if (client->seq_client < 0) {
 			kfree(client);
 			up(&register_mutex);
 			kfree(info);
 			return -ENOMEM;
 		}
-		set_client_name(client, card, info);
-	} else if (device == 0)
-		set_client_name(client, card, info); /* use the first device's name */
+	}
 
 	msynth = kcalloc(ports, sizeof(struct seq_midisynth), GFP_KERNEL);
 	port = kmalloc(sizeof(*port), GFP_KERNEL);
diff --git a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c
index c87c883bd92..b201b76e941 100644
--- a/sound/core/seq/seq_system.c
+++ b/sound/core/seq/seq_system.c
@@ -121,29 +121,18 @@ static int event_input_timer(struct snd_seq_event * ev, int direct, void *privat
 int __init snd_seq_system_client_init(void)
 {
 	struct snd_seq_port_callback pcallbacks;
-	struct snd_seq_client_info *inf;
 	struct snd_seq_port_info *port;
 
-	inf = kzalloc(sizeof(*inf), GFP_KERNEL);
 	port = kzalloc(sizeof(*port), GFP_KERNEL);
-	if (! inf || ! port) {
-		kfree(inf);
-		kfree(port);
+	if (!port)
 		return -ENOMEM;
-	}
 
 	memset(&pcallbacks, 0, sizeof(pcallbacks));
 	pcallbacks.owner = THIS_MODULE;
 	pcallbacks.event_input = event_input_timer;
 
 	/* register client */
-	sysclient = snd_seq_create_kernel_client(NULL, 0);
-
-	/* set our name */
-	inf->client = 0;
-	inf->type = KERNEL_CLIENT;
-	strcpy(inf->name, "System");
-	snd_seq_kernel_client_ctl(sysclient, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, inf);
+	sysclient = snd_seq_create_kernel_client(NULL, 0, "System");
 
 	/* register timer */
 	strcpy(port->name, "Timer");
@@ -167,7 +156,6 @@ int __init snd_seq_system_client_init(void)
 	snd_seq_kernel_client_ctl(sysclient, SNDRV_SEQ_IOCTL_CREATE_PORT, port);
 	announce_port = port->addr.port;
 
-	kfree(inf);
 	kfree(port);
 	return 0;
 }
diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c
index 2739f577257..14fd1a608e1 100644
--- a/sound/core/seq/seq_virmidi.c
+++ b/sound/core/seq/seq_virmidi.c
@@ -360,34 +360,28 @@ static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev)
 {
 	int client;
 	struct snd_seq_port_callback pcallbacks;
-	struct snd_seq_client_info *info;
 	struct snd_seq_port_info *pinfo;
 	int err;
 
 	if (rdev->client >= 0)
 		return 0;
 
-	info = kmalloc(sizeof(*info), GFP_KERNEL);
 	pinfo = kmalloc(sizeof(*pinfo), GFP_KERNEL);
-	if (! info || ! pinfo) {
+	if (!pinfo) {
 		err = -ENOMEM;
 		goto __error;
 	}
 
-	client = snd_seq_create_kernel_client(rdev->card, rdev->device);
+	client = snd_seq_create_kernel_client(rdev->card, rdev->device,
+					      "%s %d-%d", rdev->rmidi->name,
+					      rdev->card->number,
+					      rdev->device);
 	if (client < 0) {
 		err = client;
 		goto __error;
 	}
 	rdev->client = client;
 
-	/* set client name */
-	memset(info, 0, sizeof(*info));
-	info->client = client;
-	info->type = KERNEL_CLIENT;
-	sprintf(info->name, "%s %d-%d", rdev->rmidi->name, rdev->card->number, rdev->device);
-	snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, info);
-
 	/* create a port */
 	memset(pinfo, 0, sizeof(*pinfo));
 	pinfo->addr.client = client;
@@ -418,7 +412,6 @@ static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev)
 	err = 0; /* success */
 
  __error:
-	kfree(info);
 	kfree(pinfo);
 	return err;
 }
diff --git a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c
index 582ff63e784..c4ead790008 100644
--- a/sound/drivers/opl3/opl3_seq.c
+++ b/sound/drivers/opl3/opl3_seq.c
@@ -219,7 +219,7 @@ static int snd_opl3_seq_new_device(struct snd_seq_device *dev)
 {
 	struct snd_opl3 *opl3;
 	int client;
-	struct snd_seq_client_info cinfo;
+	char name[32];
 	int opl_ver;
 
 	opl3 = *(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
@@ -231,19 +231,14 @@ static int snd_opl3_seq_new_device(struct snd_seq_device *dev)
 	opl3->seq_client = -1;
 
 	/* allocate new client */
+	opl_ver = (opl3->hardware & OPL3_HW_MASK) >> 8;
+	sprintf(name, "OPL%i FM synth", opl_ver);
 	client = opl3->seq_client =
-		snd_seq_create_kernel_client(opl3->card, opl3->seq_dev_num);
+		snd_seq_create_kernel_client(opl3->card, opl3->seq_dev_num,
+					     name);
 	if (client < 0)
 		return client;
 
-	/* change name of client */
-	memset(&cinfo, 0, sizeof(cinfo));
-	cinfo.client = client;
-	cinfo.type = KERNEL_CLIENT;
-	opl_ver = (opl3->hardware & OPL3_HW_MASK) >> 8;
-	sprintf(cinfo.name, "OPL%i FM synth", opl_ver);
-	snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &cinfo);
-
 	snd_opl3_synth_create_port(opl3);
 
 	/* initialize instrument list */
@@ -264,7 +259,7 @@ static int snd_opl3_seq_new_device(struct snd_seq_device *dev)
 	opl3->sys_timer_status = 0;
 
 #ifdef CONFIG_SND_SEQUENCER_OSS
-	snd_opl3_init_seq_oss(opl3, cinfo.name);
+	snd_opl3_init_seq_oss(opl3, name);
 #endif
 	return 0;
 }
diff --git a/sound/drivers/opl4/opl4_seq.c b/sound/drivers/opl4/opl4_seq.c
index a69117dd007..e3480326e73 100644
--- a/sound/drivers/opl4/opl4_seq.c
+++ b/sound/drivers/opl4/opl4_seq.c
@@ -127,7 +127,6 @@ static int snd_opl4_seq_new_device(struct snd_seq_device *dev)
 {
 	struct snd_opl4 *opl4;
 	int client;
-	struct snd_seq_client_info cinfo;
 	struct snd_seq_port_callback pcallbacks;
 
 	opl4 = *(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
@@ -143,7 +142,8 @@ static int snd_opl4_seq_new_device(struct snd_seq_device *dev)
 	opl4->chset->private_data = opl4;
 
 	/* allocate new client */
-	client = snd_seq_create_kernel_client(opl4->card, opl4->seq_dev_num);
+	client = snd_seq_create_kernel_client(opl4->card, opl4->seq_dev_num,
+					      "OPL4 Wavetable");
 	if (client < 0) {
 		snd_midi_channel_free_set(opl4->chset);
 		return client;
@@ -151,13 +151,6 @@ static int snd_opl4_seq_new_device(struct snd_seq_device *dev)
 	opl4->seq_client = client;
 	opl4->chset->client = client;
 
-	/* change name of client */
-	memset(&cinfo, 0, sizeof(cinfo));
-	cinfo.client = client;
-	cinfo.type = KERNEL_CLIENT;
-	strcpy(cinfo.name, "OPL4 Wavetable");
-	snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &cinfo);
-
 	/* create new port */
 	memset(&pcallbacks, 0, sizeof(pcallbacks));
 	pcallbacks.owner = THIS_MODULE;
diff --git a/sound/isa/gus/gus_synth.c b/sound/isa/gus/gus_synth.c
index 6464488363e..85a1b051f09 100644
--- a/sound/isa/gus/gus_synth.c
+++ b/sound/isa/gus/gus_synth.c
@@ -214,7 +214,6 @@ static int snd_gus_synth_new_device(struct snd_seq_device *dev)
 {
 	struct snd_gus_card *gus;
 	int client, i;
-	struct snd_seq_client_info *cinfo;
 	struct snd_seq_port_subscribe sub;
 	struct snd_iwffff_ops *iwops;
 	struct snd_gf1_ops *gf1ops;
@@ -227,25 +226,12 @@ static int snd_gus_synth_new_device(struct snd_seq_device *dev)
 	init_MUTEX(&gus->register_mutex);
 	gus->gf1.seq_client = -1;
 	
-	cinfo = kmalloc(sizeof(*cinfo), GFP_KERNEL);
-	if (! cinfo)
-		return -ENOMEM;
-
 	/* allocate new client */
 	client = gus->gf1.seq_client =
-		snd_seq_create_kernel_client(gus->card, 1);
-	if (client < 0) {
-		kfree(cinfo);
+		snd_seq_create_kernel_client(gus->card, 1, gus->interwave ?
+					     "AMD InterWave" : "GF1");
+	if (client < 0)
 		return client;
-	}
-
-	/* change name of client */
-	memset(cinfo, 0, sizeof(*cinfo));
-	cinfo->client = client;
-	cinfo->type = KERNEL_CLIENT;
-	sprintf(cinfo->name, gus->interwave ? "AMD InterWave" : "GF1");
-	snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, cinfo);
-	kfree(cinfo);
 
 	for (i = 0; i < 4; i++)
 		snd_gus_synth_create_port(gus, i);
diff --git a/sound/pci/trident/trident_synth.c b/sound/pci/trident/trident_synth.c
index e31055a4bd2..cc7af8bc55a 100644
--- a/sound/pci/trident/trident_synth.c
+++ b/sound/pci/trident/trident_synth.c
@@ -934,7 +934,6 @@ static int snd_trident_synth_new_device(struct snd_seq_device *dev)
 {
 	struct snd_trident *trident;
 	int client, i;
-	struct snd_seq_client_info cinfo;
 	struct snd_seq_port_subscribe sub;
 	struct snd_simple_ops *simpleops;
 	char *str;
@@ -946,23 +945,16 @@ static int snd_trident_synth_new_device(struct snd_seq_device *dev)
 	trident->synth.seq_client = -1;
 
 	/* allocate new client */
-	client = trident->synth.seq_client =
-		snd_seq_create_kernel_client(trident->card, 1);
-	if (client < 0)
-		return client;
-
-	/* change name of client */
-	memset(&cinfo, 0, sizeof(cinfo));
-	cinfo.client = client;
-	cinfo.type = KERNEL_CLIENT;
 	str = "???";
 	switch (trident->device) {
 	case TRIDENT_DEVICE_ID_DX:	str = "Trident 4DWave-DX"; break;
 	case TRIDENT_DEVICE_ID_NX:	str = "Trident 4DWave-NX"; break;
 	case TRIDENT_DEVICE_ID_SI7018:	str = "SiS 7018"; break;
 	}
-	sprintf(cinfo.name, str);
-	snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &cinfo);
+	client = trident->synth.seq_client =
+		snd_seq_create_kernel_client(trident->card, 1, str);
+	if (client < 0)
+		return client;
 
 	for (i = 0; i < 4; i++)
 		snd_trident_synth_create_port(trident, i);
diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c
index b7129c5aee0..1a973d7a90f 100644
--- a/sound/synth/emux/emux_seq.c
+++ b/sound/synth/emux/emux_seq.c
@@ -28,7 +28,6 @@ static void free_port(void *private);
 static void snd_emux_init_port(struct snd_emux_port *p);
 static int snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info);
 static int snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info);
-static int get_client(struct snd_card *card, int index, char *name);
 
 /*
  * MIDI emulation operators
@@ -71,8 +70,8 @@ snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index)
 	struct snd_seq_port_callback pinfo;
 	char tmpname[64];
 
-	sprintf(tmpname, "%s WaveTable", emu->name);
-	emu->client = get_client(card, index, tmpname);
+	emu->client = snd_seq_create_kernel_client(card, index,
+						   "%s WaveTable", emu->name);
 	if (emu->client < 0) {
 		snd_printk("can't create client\n");
 		return -ENODEV;
@@ -341,30 +340,6 @@ snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info)
 }
 
 
-/*
- * Create a sequencer client
- */
-static int
-get_client(struct snd_card *card, int index, char *name)
-{
-	struct snd_seq_client_info cinfo;
-	int client;
-
-	/* Find a free client, start from 1 as the MPU expects to use 0 */
-	client = snd_seq_create_kernel_client(card, index);
-	if (client < 0)
-		return client;
-
-	memset(&cinfo, 0, sizeof(cinfo));
-	cinfo.client = client;
-	cinfo.type = KERNEL_CLIENT;
-	strcpy(cinfo.name, name);
-	snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &cinfo);
-
-	return client;
-}
-
-
 /*
  * attach virtual rawmidi devices
  */
-- 
cgit v1.2.3-70-g09d2


From aa1e77e691025149908f7641e77de93ffd7f1188 Mon Sep 17 00:00:00 2001
From: Clemens Ladisch <clemens@ladisch.de>
Date: Mon, 12 Dec 2005 09:36:01 +0100
Subject: [ALSA] seq: reorganize sequencer client numbers

Modules: ALSA sequencer

Reduce the maximum possible number of global clients to 16 to make
more numbers available for card clients, and allow dynamically allocated
card client numbers to share the same range as application client
numbers to make sure that all 32 cards can be used at the same time.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
---
 include/sound/asequencer.h     |  5 ++--
 sound/core/seq/seq.c           |  4 +--
 sound/core/seq/seq_clientmgr.c | 57 +++++++++++++++++++++++-------------------
 3 files changed, 36 insertions(+), 30 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/asequencer.h b/include/sound/asequencer.h
index 59485be0579..6691e4aa4ea 100644
--- a/include/sound/asequencer.h
+++ b/include/sound/asequencer.h
@@ -502,8 +502,9 @@ struct snd_seq_running_info {
 
 	/* known client numbers */
 #define SNDRV_SEQ_CLIENT_SYSTEM		0
-#define SNDRV_SEQ_CLIENT_DUMMY		62	/* dummy ports */
-#define SNDRV_SEQ_CLIENT_OSS		63	/* oss sequencer emulator */
+	/* internal client numbers */
+#define SNDRV_SEQ_CLIENT_DUMMY		14	/* midi through */
+#define SNDRV_SEQ_CLIENT_OSS		15	/* oss sequencer emulator */
 
 
 	/* client types */
diff --git a/sound/core/seq/seq.c b/sound/core/seq/seq.c
index 24644150f24..20f954bc7aa 100644
--- a/sound/core/seq/seq.c
+++ b/sound/core/seq/seq.c
@@ -36,9 +36,9 @@
 #include <sound/seq_device.h>
 
 #if defined(CONFIG_SND_SEQ_DUMMY_MODULE)
-int seq_client_load[64] = {[0] = SNDRV_SEQ_CLIENT_DUMMY, [1 ... 63] = -1};
+int seq_client_load[15] = {[0] = SNDRV_SEQ_CLIENT_DUMMY, [1 ... 14] = -1};
 #else
-int seq_client_load[64] = {[0 ... 63] = -1};
+int seq_client_load[15] = {[0 ... 14] = -1};
 #endif
 int seq_default_timer_class = SNDRV_TIMER_CLASS_GLOBAL;
 int seq_default_timer_sclass = SNDRV_TIMER_SCLASS_NONE;
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 606d076f72f..fd2032eae21 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -47,9 +47,20 @@
  * 
  */
 
-/* range for dynamically allocated client numbers of kernel drivers */
-#define SNDRV_SEQ_DYNAMIC_CLIENT_BEGIN	16
-#define SNDRV_SEQ_DYNAMIC_CLIENT_END	48
+/*
+ * There are four ranges of client numbers (last two shared):
+ * 0..15: global clients
+ * 16..127: statically allocated client numbers for cards 0..27
+ * 128..191: dynamically allocated client numbers for cards 28..31
+ * 128..191: dynamically allocated client numbers for applications
+ */
+
+/* number of kernel non-card clients */
+#define SNDRV_SEQ_GLOBAL_CLIENTS	16
+/* clients per cards, for static clients */
+#define SNDRV_SEQ_CLIENTS_PER_CARD	4
+/* dynamically allocated client numbers (both kernel drivers and user space) */
+#define SNDRV_SEQ_DYNAMIC_CLIENTS_BEGIN	128
 
 #define SNDRV_SEQ_LFLG_INPUT	0x0001
 #define SNDRV_SEQ_LFLG_OUTPUT	0x0002
@@ -143,14 +154,14 @@ struct snd_seq_client *snd_seq_client_use_ptr(int clientid)
 	spin_unlock_irqrestore(&clients_lock, flags);
 #ifdef CONFIG_KMOD
 	if (!in_interrupt() && current->fs->root) {
-		static char client_requested[64];
+		static char client_requested[SNDRV_SEQ_GLOBAL_CLIENTS];
 		static char card_requested[SNDRV_CARDS];
-		if (clientid < 64) {
+		if (clientid < SNDRV_SEQ_GLOBAL_CLIENTS) {
 			int idx;
 			
 			if (! client_requested[clientid] && current->fs->root) {
 				client_requested[clientid] = 1;
-				for (idx = 0; idx < 64; idx++) {
+				for (idx = 0; idx < 15; idx++) {
 					if (seq_client_load[idx] < 0)
 						break;
 					if (seq_client_load[idx] == clientid) {
@@ -160,8 +171,9 @@ struct snd_seq_client *snd_seq_client_use_ptr(int clientid)
 					}
 				}
 			}
-		} else if (clientid >= 64 && clientid < 128) {
-			int card = (clientid - 64) / 4;
+		} else if (clientid < SNDRV_SEQ_DYNAMIC_CLIENTS_BEGIN) {
+			int card = (clientid - SNDRV_SEQ_GLOBAL_CLIENTS) /
+				SNDRV_SEQ_CLIENTS_PER_CARD;
 			if (card < snd_ecards_limit) {
 				if (! card_requested[card]) {
 					card_requested[card] = 1;
@@ -207,8 +219,7 @@ int __init client_init_data(void)
 }
 
 
-static struct snd_seq_client *seq_create_client1(int client_index, int poolsize,
-						 int kernel_client)
+static struct snd_seq_client *seq_create_client1(int client_index, int poolsize)
 {
 	unsigned long flags;
 	int c;
@@ -232,15 +243,9 @@ static struct snd_seq_client *seq_create_client1(int client_index, int poolsize,
 	/* find free slot in the client table */
 	spin_lock_irqsave(&clients_lock, flags);
 	if (client_index < 0) {
-		int cmin, cmax;
-		if (kernel_client) {
-			cmin = SNDRV_SEQ_DYNAMIC_CLIENT_BEGIN;
-			cmax = SNDRV_SEQ_DYNAMIC_CLIENT_END;
-		} else {
-			cmin = 128;
-			cmax = SNDRV_SEQ_MAX_CLIENTS;
-		}
-		for (c = cmin; c < cmax; c++) {
+		for (c = SNDRV_SEQ_DYNAMIC_CLIENTS_BEGIN;
+		     c < SNDRV_SEQ_MAX_CLIENTS;
+		     c++) {
 			if (clienttab[c] || clienttablock[c])
 				continue;
 			clienttab[client->number = c] = client;
@@ -319,7 +324,7 @@ static int snd_seq_open(struct inode *inode, struct file *file)
 
 	if (down_interruptible(&register_mutex))
 		return -ERESTARTSYS;
-	client = seq_create_client1(-1, SNDRV_SEQ_DEFAULT_EVENTS, 0);
+	client = seq_create_client1(-1, SNDRV_SEQ_DEFAULT_EVENTS);
 	if (client == NULL) {
 		up(&register_mutex);
 		return -ENOMEM;	/* failure code */
@@ -2220,23 +2225,23 @@ int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
 
 	snd_assert(! in_interrupt(), return -EBUSY);
 
-	if (card && client_index > 3)
+	if (card && client_index >= SNDRV_SEQ_CLIENTS_PER_CARD)
 		return -EINVAL;
-	if (card == NULL && client_index > 63)
+	if (card == NULL && client_index >= SNDRV_SEQ_GLOBAL_CLIENTS)
 		return -EINVAL;
 
 	if (down_interruptible(&register_mutex))
 		return -ERESTARTSYS;
 
 	if (card) {
-		if (card->number < 16)
-			client_index += 64 + (card->number << 2);
-		else
+		client_index += SNDRV_SEQ_GLOBAL_CLIENTS
+			+ card->number * SNDRV_SEQ_CLIENTS_PER_CARD;
+		if (client_index >= SNDRV_SEQ_DYNAMIC_CLIENTS_BEGIN)
 			client_index = -1;
 	}
 
 	/* empty write queue as default */
-	client = seq_create_client1(client_index, 0, 1);
+	client = seq_create_client1(client_index, 0);
 	if (client == NULL) {
 		up(&register_mutex);
 		return -EBUSY;	/* failure code */
-- 
cgit v1.2.3-70-g09d2


From 27fe864ec9e61041fc0b6f680207ae84f359b502 Mon Sep 17 00:00:00 2001
From: James Courtier-Dutton <James@superbug.co.uk>
Date: Wed, 21 Dec 2005 15:06:08 +0100
Subject: [ALSA] snd-emu10k1: Removes some distortion from Audigy 2 ZS
 Notebook.

Modules: EMU10K1/EMU10K2 driver

Description:
Part way to fix ALSA bug#927
Add support for the SPI interface on the CA0108 chip.
This is used to control the registers on the DAC.
Headphone output tested.
Other outputs and Capture not tested yet.
Note: The red LED does not come on, but sound is still OK.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
---
 include/sound/emu10k1.h          |  3 +++
 sound/pci/emu10k1/emu10k1_main.c | 28 +++++++++++++++++++++++++++-
 sound/pci/emu10k1/io.c           | 36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+), 1 deletion(-)

(limited to 'include/sound')

diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 0d6e68c43e6..951e40d720d 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1062,6 +1062,8 @@ struct snd_emu_chip_details {
 	unsigned char ac97_chip;    /* Has an AC97 chip: 1 = mandatory, 2 = optional */
 	unsigned char ecard;        /* APS EEPROM */
 	unsigned char emu1212m;     /* EMU 1212m card */
+	unsigned char spi_dac;      /* SPI interface for DAC */
+	unsigned char i2c_adc;      /* I2C interface for ADC */
 	const char *driver;
 	const char *name;
 	const char *id;		/* for backward compatibility - can be NULL if not needed */
@@ -1203,6 +1205,7 @@ unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, un
 void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data);
 unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn);
 void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data);
+int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data);
 unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc);
 void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb);
 void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb);
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index f8e2ccd50d6..eb093700fa7 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -181,7 +181,32 @@ static int snd_emu10k1_init(struct snd_emu10k1 *emu, int enable_ir, int resume)
 		tmp = inl(emu->port + A_IOCFG) & ~0x8; /* Clear bit 3 */
 		outl(tmp, emu->port + A_IOCFG);
 	}
-
+	if (emu->card_capabilities->spi_dac) { /* Audigy 2 ZS Notebook with DAC Wolfson WM8768/WM8568 */
+		u32 tmp;
+		tmp = snd_emu10k1_spi_write(emu, 0x00ff);
+		tmp = snd_emu10k1_spi_write(emu, 0x02ff);
+		tmp = snd_emu10k1_spi_write(emu, 0x0400);
+		tmp = snd_emu10k1_spi_write(emu, 0x0520);
+		tmp = snd_emu10k1_spi_write(emu, 0x0600);
+		tmp = snd_emu10k1_spi_write(emu, 0x08ff);
+		tmp = snd_emu10k1_spi_write(emu, 0x0aff);
+		tmp = snd_emu10k1_spi_write(emu, 0x0cff);
+		tmp = snd_emu10k1_spi_write(emu, 0x0eff);
+		tmp = snd_emu10k1_spi_write(emu, 0x10ff);
+		tmp = snd_emu10k1_spi_write(emu, 0x1200);
+		tmp = snd_emu10k1_spi_write(emu, 0x1400);
+		tmp = snd_emu10k1_spi_write(emu, 0x1480);
+		tmp = snd_emu10k1_spi_write(emu, 0x1800);
+		tmp = snd_emu10k1_spi_write(emu, 0x1aff);
+		tmp = snd_emu10k1_spi_write(emu, 0x1cff);
+		tmp = snd_emu10k1_spi_write(emu, 0x1e00);
+		tmp = snd_emu10k1_spi_write(emu, 0x0530);
+		tmp = snd_emu10k1_spi_write(emu, 0x0602);
+		tmp = snd_emu10k1_spi_write(emu, 0x0622);
+		tmp = snd_emu10k1_spi_write(emu, 0x1400);
+		snd_emu10k1_ptr20_write(emu, 0x60, 0, 0x10);
+	}
+	
 	snd_emu10k1_ptr_write(emu, PTB, 0, emu->ptb_pages.addr);
 	snd_emu10k1_ptr_write(emu, TCB, 0, 0);	/* taken from original driver */
 	snd_emu10k1_ptr_write(emu, TCBS, 0, 4);	/* taken from original driver */
@@ -747,6 +772,7 @@ static struct snd_emu_chip_details emu_chip_details[] = {
 	 .emu10k2_chip = 1,
 	 .ca0108_chip = 1,
 	 .ca_cardbus_chip = 1,
+	 .spi_dac = 1,
 	 .spk71 = 1} ,
 	{.vendor = 0x1102, .device = 0x0008, 
 	 .driver = "Audigy2", .name = "Audigy 2 Value [Unknown]", 
diff --git a/sound/pci/emu10k1/io.c b/sound/pci/emu10k1/io.c
index 5d116dd7403..7d0cb9db428 100644
--- a/sound/pci/emu10k1/io.c
+++ b/sound/pci/emu10k1/io.c
@@ -29,6 +29,7 @@
 #include <linux/time.h>
 #include <sound/core.h>
 #include <sound/emu10k1.h>
+#include <linux/delay.h>
 
 unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn)
 {
@@ -123,6 +124,41 @@ void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu,
 	spin_unlock_irqrestore(&emu->emu_lock, flags);
 }
 
+int snd_emu10k1_spi_write(struct snd_emu10k1 * emu,
+				   unsigned int data)
+{
+	unsigned int reset, set;
+	unsigned int reg, tmp;
+	int n, result;
+	if (emu->card_capabilities->ca0108_chip) {
+		reg=0x3c; /* PTR20, reg 0x3c */
+	} else {
+		return 1;  /* For other cards types the SPI register is currently unknown. */
+	}
+	if (data > 0xffff) return 1; /* Only 16bit values allowed */
+
+	tmp = snd_emu10k1_ptr20_read(emu, reg, 0);
+       	reset = (tmp & ~0x3ffff) | 0x20000; /* Set xxx20000 */
+	set = reset | 0x10000; /* Set xxx1xxxx */
+	snd_emu10k1_ptr20_write(emu, reg, 0, reset | data);
+	tmp = snd_emu10k1_ptr20_read(emu, reg, 0); /* write post */
+	snd_emu10k1_ptr20_write(emu, reg, 0, set | data);
+	result = 1;
+	/* Wait for status bit to return to 0 */
+	for (n=0;n<100;n++) {
+		udelay(10);
+		tmp = snd_emu10k1_ptr20_read(emu, reg, 0);
+		if (!(tmp & 0x10000)) {
+			result=0;
+			break;
+		}
+	}
+	if (result) return 1; /* Timed out */
+	snd_emu10k1_ptr20_write(emu, reg, 0, reset | data);
+	tmp = snd_emu10k1_ptr20_read(emu, reg, 0); /* Write post */
+	return 0;
+}
+
 void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb)
 {
 	unsigned long flags;
-- 
cgit v1.2.3-70-g09d2


From 7790db18be736c87b0cdfa8da8aca11627fc5e54 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@suse.cz>
Date: Wed, 4 Jan 2006 10:13:22 +0100
Subject: [ALSA] version 1.0.11rc2

---
 include/sound/version.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/version.h b/include/sound/version.h
index d1bd3b72396..919da0dd001 100644
--- a/include/sound/version.h
+++ b/include/sound/version.h
@@ -1,3 +1,3 @@
 /* include/version.h.  Generated by configure.  */
-#define CONFIG_SND_VERSION "1.0.10rc3"
-#define CONFIG_SND_DATE " (Mon Nov 07 13:30:21 2005 UTC)"
+#define CONFIG_SND_VERSION "1.0.11rc2"
+#define CONFIG_SND_DATE " (Wed Jan 04 08:57:20 2006 UTC)"
-- 
cgit v1.2.3-70-g09d2


From 3e23c658833f135508127c955d40d7c9387f71dd Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 3 Jan 2006 19:54:44 +0100
Subject: [ALSA] Revert the nested-device patch

Modules: ALSA Core

Revert the nested-device patch to keep the compatibility with the
current HAL configuration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/core.h |  1 -
 sound/core/device.c  |  2 +-
 sound/core/sound.c   | 11 ++---------
 3 files changed, 3 insertions(+), 11 deletions(-)

(limited to 'include/sound')

diff --git a/include/sound/core.h b/include/sound/core.h
index dbe7a2c3027..90ac6132ea3 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -134,7 +134,6 @@ struct snd_card {
 	wait_queue_head_t shutdown_sleep;
 	struct work_struct free_workq;	/* for free in workqueue */
 	struct device *dev;
-	struct class_device *parent_device;
 
 #ifdef CONFIG_PM
 	unsigned int power_state;	/* power state */
diff --git a/sound/core/device.c b/sound/core/device.c
index 478264cab67..b1cf6ec5678 100644
--- a/sound/core/device.c
+++ b/sound/core/device.c
@@ -193,7 +193,7 @@ int snd_device_register_all(struct snd_card *card)
 	int err;
 	
 	snd_assert(card != NULL, return -ENXIO);
-	list_for_each_prev(list, &card->devices) {
+	list_for_each(list, &card->devices) {
 		dev = snd_device(list);
 		if (dev->state == SNDRV_DEV_BUILD && dev->ops->dev_register) {
 			if ((err = dev->ops->dev_register(dev)) < 0)
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 2f6108deb21..a8eda02bcf1 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -245,7 +245,6 @@ int snd_register_device(int type, struct snd_card *card, int dev,
 	int minor;
 	struct snd_minor *preg;
 	struct device *device = NULL;
-	struct class_device *class_device = NULL;
 
 	snd_assert(name, return -EINVAL);
 	preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL);
@@ -273,15 +272,9 @@ int snd_register_device(int type, struct snd_card *card, int dev,
 	snd_minors[minor] = preg;
 	if (type != SNDRV_DEVICE_TYPE_CONTROL || preg->card >= cards_limit)
 		devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name);
-	if (card) {
+	if (card)
 		device = card->dev;
-		class_device = card->parent_device;
-	}
-	class_device = class_device_create(sound_class, class_device,
-					   MKDEV(major, minor), device,
-					   "%s", name);
-	if (type == SNDRV_DEVICE_TYPE_CONTROL)
-		card->parent_device = class_device;
+	class_device_create(sound_class, NULL, MKDEV(major, minor), device, "%s", name);
 
 	up(&sound_mutex);
 	return 0;
-- 
cgit v1.2.3-70-g09d2