Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / sound / pci / rme32.c
index b96acd5..55b1d48 100644 (file)
@@ -192,21 +192,7 @@ MODULE_SUPPORTED_DEVICE("{{RME,Digi32}," "{RME,Digi32/8}," "{RME,Digi32 PRO}}");
 #define RME32_PRO_REVISION_WITH_8414 150
 
 
-/* PCI vendor/device ID's */
-#ifndef PCI_VENDOR_ID_XILINX_RME
-# define PCI_VENDOR_ID_XILINX_RME 0xea60
-#endif
-#ifndef PCI_DEVICE_ID_DIGI32
-# define PCI_DEVICE_ID_DIGI32 0x9896
-#endif
-#ifndef PCI_DEVICE_ID_DIGI32_PRO
-# define PCI_DEVICE_ID_DIGI32_PRO 0x9897
-#endif
-#ifndef PCI_DEVICE_ID_DIGI32_8
-# define PCI_DEVICE_ID_DIGI32_8 0x9898
-#endif
-
-typedef struct snd_rme32 {
+struct rme32 {
        spinlock_t lock;
        int irq;
        unsigned long port;
@@ -219,8 +205,8 @@ typedef struct snd_rme32 {
 
        u8 rev;                 /* card revision number */
 
-       snd_pcm_substream_t *playback_substream;
-       snd_pcm_substream_t *capture_substream;
+       struct snd_pcm_substream *playback_substream;
+       struct snd_pcm_substream *capture_substream;
 
        int playback_frlog;     /* log2 of framesize */
        int capture_frlog;
@@ -231,22 +217,22 @@ typedef struct snd_rme32 {
        unsigned int fullduplex_mode;
        int running;
 
-       snd_pcm_indirect_t playback_pcm;
-       snd_pcm_indirect_t capture_pcm;
+       struct snd_pcm_indirect playback_pcm;
+       struct snd_pcm_indirect capture_pcm;
 
-       snd_card_t *card;
-       snd_pcm_t *spdif_pcm;
-       snd_pcm_t *adat_pcm;
+       struct snd_card *card;
+       struct snd_pcm *spdif_pcm;
+       struct snd_pcm *adat_pcm;
        struct pci_dev *pci;
-       snd_kcontrol_t *spdif_ctl;
-} rme32_t;
+       struct snd_kcontrol *spdif_ctl;
+};
 
-static struct pci_device_id snd_rme32_ids[] = {
-       {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_DIGI32,
+static struct pci_device_id snd_rme32_ids[] __devinitdata = {
+       {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32,
         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,},
-       {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_DIGI32_8,
+       {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_8,
         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,},
-       {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_DIGI32_PRO,
+       {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_PRO,
         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,},
        {0,}
 };
@@ -254,19 +240,19 @@ static struct pci_device_id snd_rme32_ids[] = {
 MODULE_DEVICE_TABLE(pci, snd_rme32_ids);
 
 #define RME32_ISWORKING(rme32) ((rme32)->wcreg & RME32_WCR_START)
-#define RME32_PRO_WITH_8414(rme32) ((rme32)->pci->device == PCI_DEVICE_ID_DIGI32_PRO && (rme32)->rev == RME32_PRO_REVISION_WITH_8414)
+#define RME32_PRO_WITH_8414(rme32) ((rme32)->pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO && (rme32)->rev == RME32_PRO_REVISION_WITH_8414)
 
-static int snd_rme32_playback_prepare(snd_pcm_substream_t * substream);
+static int snd_rme32_playback_prepare(struct snd_pcm_substream *substream);
 
-static int snd_rme32_capture_prepare(snd_pcm_substream_t * substream);
+static int snd_rme32_capture_prepare(struct snd_pcm_substream *substream);
 
-static int snd_rme32_pcm_trigger(snd_pcm_substream_t * substream, int cmd);
+static int snd_rme32_pcm_trigger(struct snd_pcm_substream *substream, int cmd);
 
-static void snd_rme32_proc_init(rme32_t * rme32);
+static void snd_rme32_proc_init(struct rme32 * rme32);
 
-static int snd_rme32_create_switches(snd_card_t * card, rme32_t * rme32);
+static int snd_rme32_create_switches(struct snd_card *card, struct rme32 * rme32);
 
-static inline unsigned int snd_rme32_pcm_byteptr(rme32_t * rme32)
+static inline unsigned int snd_rme32_pcm_byteptr(struct rme32 * rme32)
 {
        return (readl(rme32->iobase + RME32_IO_GET_POS)
                & RME32_RCR_AUDIO_ADDR_MASK);
@@ -286,11 +272,11 @@ static int snd_rme32_ratecode(int rate)
 }
 
 /* silence callback for halfduplex mode */
-static int snd_rme32_playback_silence(snd_pcm_substream_t * substream, int channel,    /* not used (interleaved data) */
+static int snd_rme32_playback_silence(struct snd_pcm_substream *substream, int channel,        /* not used (interleaved data) */
                                      snd_pcm_uframes_t pos,
                                      snd_pcm_uframes_t count)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
        count <<= rme32->playback_frlog;
        pos <<= rme32->playback_frlog;
        memset_io(rme32->iobase + RME32_IO_DATA_BUFFER + pos, 0, count);
@@ -298,11 +284,11 @@ static int snd_rme32_playback_silence(snd_pcm_substream_t * substream, int chann
 }
 
 /* copy callback for halfduplex mode */
-static int snd_rme32_playback_copy(snd_pcm_substream_t * substream, int channel,       /* not used (interleaved data) */
+static int snd_rme32_playback_copy(struct snd_pcm_substream *substream, int channel,   /* not used (interleaved data) */
                                   snd_pcm_uframes_t pos,
                                   void __user *src, snd_pcm_uframes_t count)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
        count <<= rme32->playback_frlog;
        pos <<= rme32->playback_frlog;
        if (copy_from_user_toio(rme32->iobase + RME32_IO_DATA_BUFFER + pos,
@@ -312,11 +298,11 @@ static int snd_rme32_playback_copy(snd_pcm_substream_t * substream, int channel,
 }
 
 /* copy callback for halfduplex mode */
-static int snd_rme32_capture_copy(snd_pcm_substream_t * substream, int channel,        /* not used (interleaved data) */
+static int snd_rme32_capture_copy(struct snd_pcm_substream *substream, int channel,    /* not used (interleaved data) */
                                  snd_pcm_uframes_t pos,
                                  void __user *dst, snd_pcm_uframes_t count)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
        count <<= rme32->capture_frlog;
        pos <<= rme32->capture_frlog;
        if (copy_to_user_fromio(dst,
@@ -327,9 +313,9 @@ static int snd_rme32_capture_copy(snd_pcm_substream_t * substream, int channel,
 }
 
 /*
- * SPDIF I/O capabilites (half-duplex mode)
+ * SPDIF I/O capabilities (half-duplex mode)
  */
-static snd_pcm_hardware_t snd_rme32_spdif_info = {
+static struct snd_pcm_hardware snd_rme32_spdif_info = {
        .info =         (SNDRV_PCM_INFO_MMAP_IOMEM |
                         SNDRV_PCM_INFO_MMAP_VALID |
                         SNDRV_PCM_INFO_INTERLEAVED | 
@@ -353,9 +339,9 @@ static snd_pcm_hardware_t snd_rme32_spdif_info = {
 };
 
 /*
- * ADAT I/O capabilites (half-duplex mode)
+ * ADAT I/O capabilities (half-duplex mode)
  */
-static snd_pcm_hardware_t snd_rme32_adat_info =
+static struct snd_pcm_hardware snd_rme32_adat_info =
 {
        .info =              (SNDRV_PCM_INFO_MMAP_IOMEM |
                              SNDRV_PCM_INFO_MMAP_VALID |
@@ -378,9 +364,9 @@ static snd_pcm_hardware_t snd_rme32_adat_info =
 };
 
 /*
- * SPDIF I/O capabilites (full-duplex mode)
+ * SPDIF I/O capabilities (full-duplex mode)
  */
-static snd_pcm_hardware_t snd_rme32_spdif_fd_info = {
+static struct snd_pcm_hardware snd_rme32_spdif_fd_info = {
        .info =         (SNDRV_PCM_INFO_MMAP |
                         SNDRV_PCM_INFO_MMAP_VALID |
                         SNDRV_PCM_INFO_INTERLEAVED | 
@@ -404,9 +390,9 @@ static snd_pcm_hardware_t snd_rme32_spdif_fd_info = {
 };
 
 /*
- * ADAT I/O capabilites (full-duplex mode)
+ * ADAT I/O capabilities (full-duplex mode)
  */
-static snd_pcm_hardware_t snd_rme32_adat_fd_info =
+static struct snd_pcm_hardware snd_rme32_adat_fd_info =
 {
        .info =              (SNDRV_PCM_INFO_MMAP |
                              SNDRV_PCM_INFO_MMAP_VALID |
@@ -428,14 +414,14 @@ static snd_pcm_hardware_t snd_rme32_adat_fd_info =
        .fifo_size =        0,
 };
 
-static void snd_rme32_reset_dac(rme32_t *rme32)
+static void snd_rme32_reset_dac(struct rme32 *rme32)
 {
         writel(rme32->wcreg | RME32_WCR_PD,
                rme32->iobase + RME32_IO_CONTROL_REGISTER);
         writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER);
 }
 
-static int snd_rme32_playback_getrate(rme32_t * rme32)
+static int snd_rme32_playback_getrate(struct rme32 * rme32)
 {
        int rate;
 
@@ -457,7 +443,7 @@ static int snd_rme32_playback_getrate(rme32_t * rme32)
        return (rme32->wcreg & RME32_WCR_DS_BM) ? rate << 1 : rate;
 }
 
-static int snd_rme32_capture_getrate(rme32_t * rme32, int *is_adat)
+static int snd_rme32_capture_getrate(struct rme32 * rme32, int *is_adat)
 {
        int n;
 
@@ -519,7 +505,7 @@ static int snd_rme32_capture_getrate(rme32_t * rme32, int *is_adat)
        return -1;
 }
 
-static int snd_rme32_playback_setrate(rme32_t * rme32, int rate)
+static int snd_rme32_playback_setrate(struct rme32 * rme32, int rate)
 {
         int ds;
 
@@ -541,21 +527,21 @@ static int snd_rme32_playback_setrate(rme32_t * rme32, int rate)
                        RME32_WCR_FREQ_1;
                break;
        case 64000:
-               if (rme32->pci->device != PCI_DEVICE_ID_DIGI32_PRO)
+               if (rme32->pci->device != PCI_DEVICE_ID_RME_DIGI32_PRO)
                        return -EINVAL;
                rme32->wcreg |= RME32_WCR_DS_BM;
                rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_0) & 
                        ~RME32_WCR_FREQ_1;
                break;
        case 88200:
-               if (rme32->pci->device != PCI_DEVICE_ID_DIGI32_PRO)
+               if (rme32->pci->device != PCI_DEVICE_ID_RME_DIGI32_PRO)
                        return -EINVAL;
                rme32->wcreg |= RME32_WCR_DS_BM;
                rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_1) & 
                        ~RME32_WCR_FREQ_0;
                break;
        case 96000:
-               if (rme32->pci->device != PCI_DEVICE_ID_DIGI32_PRO)
+               if (rme32->pci->device != PCI_DEVICE_ID_RME_DIGI32_PRO)
                        return -EINVAL;
                rme32->wcreg |= RME32_WCR_DS_BM;
                rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_0) | 
@@ -575,7 +561,7 @@ static int snd_rme32_playback_setrate(rme32_t * rme32, int rate)
        return 0;
 }
 
-static int snd_rme32_setclockmode(rme32_t * rme32, int mode)
+static int snd_rme32_setclockmode(struct rme32 * rme32, int mode)
 {
        switch (mode) {
        case RME32_CLOCKMODE_SLAVE:
@@ -605,13 +591,13 @@ static int snd_rme32_setclockmode(rme32_t * rme32, int mode)
        return 0;
 }
 
-static int snd_rme32_getclockmode(rme32_t * rme32)
+static int snd_rme32_getclockmode(struct rme32 * rme32)
 {
        return ((rme32->wcreg >> RME32_WCR_BITPOS_FREQ_0) & 1) +
            (((rme32->wcreg >> RME32_WCR_BITPOS_FREQ_1) & 1) << 1);
 }
 
-static int snd_rme32_setinputtype(rme32_t * rme32, int type)
+static int snd_rme32_setinputtype(struct rme32 * rme32, int type)
 {
        switch (type) {
        case RME32_INPUT_OPTICAL:
@@ -637,14 +623,14 @@ static int snd_rme32_setinputtype(rme32_t * rme32, int type)
        return 0;
 }
 
-static int snd_rme32_getinputtype(rme32_t * rme32)
+static int snd_rme32_getinputtype(struct rme32 * rme32)
 {
        return ((rme32->wcreg >> RME32_WCR_BITPOS_INP_0) & 1) +
            (((rme32->wcreg >> RME32_WCR_BITPOS_INP_1) & 1) << 1);
 }
 
 static void
-snd_rme32_setframelog(rme32_t * rme32, int n_channels, int is_playback)
+snd_rme32_setframelog(struct rme32 * rme32, int n_channels, int is_playback)
 {
        int frlog;
 
@@ -663,7 +649,7 @@ snd_rme32_setframelog(rme32_t * rme32, int n_channels, int is_playback)
        }
 }
 
-static int snd_rme32_setformat(rme32_t * rme32, int format)
+static int snd_rme32_setformat(struct rme32 * rme32, int format)
 {
        switch (format) {
        case SNDRV_PCM_FORMAT_S16_LE:
@@ -680,19 +666,20 @@ static int snd_rme32_setformat(rme32_t * rme32, int format)
 }
 
 static int
-snd_rme32_playback_hw_params(snd_pcm_substream_t * substream,
-                            snd_pcm_hw_params_t * params)
+snd_rme32_playback_hw_params(struct snd_pcm_substream *substream,
+                            struct snd_pcm_hw_params *params)
 {
        int err, rate, dummy;
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
-       snd_pcm_runtime_t *runtime = substream->runtime;
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
+       struct snd_pcm_runtime *runtime = substream->runtime;
 
        if (rme32->fullduplex_mode) {
                err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
                if (err < 0)
                        return err;
        } else {
-               runtime->dma_area = (void *)(rme32->iobase + RME32_IO_DATA_BUFFER);
+               runtime->dma_area = (void __force *)(rme32->iobase +
+                                                    RME32_IO_DATA_BUFFER);
                runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER;
                runtime->dma_bytes = RME32_BUFFER_SIZE;
        }
@@ -734,19 +721,20 @@ snd_rme32_playback_hw_params(snd_pcm_substream_t * substream,
 }
 
 static int
-snd_rme32_capture_hw_params(snd_pcm_substream_t * substream,
-                           snd_pcm_hw_params_t * params)
+snd_rme32_capture_hw_params(struct snd_pcm_substream *substream,
+                           struct snd_pcm_hw_params *params)
 {
        int err, isadat, rate;
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
-       snd_pcm_runtime_t *runtime = substream->runtime;
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
+       struct snd_pcm_runtime *runtime = substream->runtime;
 
        if (rme32->fullduplex_mode) {
                err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
                if (err < 0)
                        return err;
        } else {
-               runtime->dma_area = (void *)rme32->iobase + RME32_IO_DATA_BUFFER;
+               runtime->dma_area = (void __force *)rme32->iobase +
+                                       RME32_IO_DATA_BUFFER;
                runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER;
                runtime->dma_bytes = RME32_BUFFER_SIZE;
        }
@@ -794,15 +782,15 @@ snd_rme32_capture_hw_params(snd_pcm_substream_t * substream,
        return 0;
 }
 
-static int snd_rme32_pcm_hw_free(snd_pcm_substream_t * substream)
+static int snd_rme32_pcm_hw_free(struct snd_pcm_substream *substream)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
        if (! rme32->fullduplex_mode)
                return 0;
        return snd_pcm_lib_free_pages(substream);
 }
 
-static void snd_rme32_pcm_start(rme32_t * rme32, int from_pause)
+static void snd_rme32_pcm_start(struct rme32 * rme32, int from_pause)
 {
        if (!from_pause) {
                writel(0, rme32->iobase + RME32_IO_RESET_POS);
@@ -812,7 +800,7 @@ static void snd_rme32_pcm_start(rme32_t * rme32, int from_pause)
        writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER);
 }
 
-static void snd_rme32_pcm_stop(rme32_t * rme32, int to_pause)
+static void snd_rme32_pcm_stop(struct rme32 * rme32, int to_pause)
 {
        /*
         * Check if there is an unconfirmed IRQ, if so confirm it, or else
@@ -833,7 +821,7 @@ static void snd_rme32_pcm_stop(rme32_t * rme32, int to_pause)
 static irqreturn_t
 snd_rme32_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-       rme32_t *rme32 = (rme32_t *) dev_id;
+       struct rme32 *rme32 = (struct rme32 *) dev_id;
 
        rme32->rcreg = readl(rme32->iobase + RME32_IO_CONTROL_REGISTER);
        if (!(rme32->rcreg & RME32_RCR_IRQ)) {
@@ -853,13 +841,13 @@ snd_rme32_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 static unsigned int period_bytes[] = { RME32_BLOCK_SIZE };
 
 
-static snd_pcm_hw_constraint_list_t hw_constraints_period_bytes = {
+static struct snd_pcm_hw_constraint_list hw_constraints_period_bytes = {
        .count = ARRAY_SIZE(period_bytes),
        .list = period_bytes,
        .mask = 0
 };
 
-static void snd_rme32_set_buffer_constraint(rme32_t *rme32, snd_pcm_runtime_t *runtime)
+static void snd_rme32_set_buffer_constraint(struct rme32 *rme32, struct snd_pcm_runtime *runtime)
 {
        if (! rme32->fullduplex_mode) {
                snd_pcm_hw_constraint_minmax(runtime,
@@ -871,11 +859,11 @@ static void snd_rme32_set_buffer_constraint(rme32_t *rme32, snd_pcm_runtime_t *r
        }
 }
 
-static int snd_rme32_playback_spdif_open(snd_pcm_substream_t * substream)
+static int snd_rme32_playback_spdif_open(struct snd_pcm_substream *substream)
 {
        int rate, dummy;
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
-       snd_pcm_runtime_t *runtime = substream->runtime;
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
+       struct snd_pcm_runtime *runtime = substream->runtime;
 
        snd_pcm_set_sync(substream);
 
@@ -893,7 +881,7 @@ static int snd_rme32_playback_spdif_open(snd_pcm_substream_t * substream)
                runtime->hw = snd_rme32_spdif_fd_info;
        else
                runtime->hw = snd_rme32_spdif_info;
-       if (rme32->pci->device == PCI_DEVICE_ID_DIGI32_PRO) {
+       if (rme32->pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO) {
                runtime->hw.rates |= SNDRV_PCM_RATE_64000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000;
                runtime->hw.rate_max = 96000;
        }
@@ -914,11 +902,11 @@ static int snd_rme32_playback_spdif_open(snd_pcm_substream_t * substream)
        return 0;
 }
 
-static int snd_rme32_capture_spdif_open(snd_pcm_substream_t * substream)
+static int snd_rme32_capture_spdif_open(struct snd_pcm_substream *substream)
 {
        int isadat, rate;
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
-       snd_pcm_runtime_t *runtime = substream->runtime;
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
+       struct snd_pcm_runtime *runtime = substream->runtime;
 
        snd_pcm_set_sync(substream);
 
@@ -953,11 +941,11 @@ static int snd_rme32_capture_spdif_open(snd_pcm_substream_t * substream)
 }
 
 static int
-snd_rme32_playback_adat_open(snd_pcm_substream_t *substream)
+snd_rme32_playback_adat_open(struct snd_pcm_substream *substream)
 {
        int rate, dummy;
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
-       snd_pcm_runtime_t *runtime = substream->runtime;
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
+       struct snd_pcm_runtime *runtime = substream->runtime;
        
        snd_pcm_set_sync(substream);
 
@@ -988,11 +976,11 @@ snd_rme32_playback_adat_open(snd_pcm_substream_t *substream)
 }
 
 static int
-snd_rme32_capture_adat_open(snd_pcm_substream_t *substream)
+snd_rme32_capture_adat_open(struct snd_pcm_substream *substream)
 {
        int isadat, rate;
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
-       snd_pcm_runtime_t *runtime = substream->runtime;
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
+       struct snd_pcm_runtime *runtime = substream->runtime;
 
        if (rme32->fullduplex_mode)
                runtime->hw = snd_rme32_adat_fd_info;
@@ -1021,9 +1009,9 @@ snd_rme32_capture_adat_open(snd_pcm_substream_t *substream)
        return 0;
 }
 
-static int snd_rme32_playback_close(snd_pcm_substream_t * substream)
+static int snd_rme32_playback_close(struct snd_pcm_substream *substream)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
        int spdif = 0;
 
        spin_lock_irq(&rme32->lock);
@@ -1040,9 +1028,9 @@ static int snd_rme32_playback_close(snd_pcm_substream_t * substream)
        return 0;
 }
 
-static int snd_rme32_capture_close(snd_pcm_substream_t * substream)
+static int snd_rme32_capture_close(struct snd_pcm_substream *substream)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
 
        spin_lock_irq(&rme32->lock);
        rme32->capture_substream = NULL;
@@ -1051,9 +1039,9 @@ static int snd_rme32_capture_close(snd_pcm_substream_t * substream)
        return 0;
 }
 
-static int snd_rme32_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_rme32_playback_prepare(struct snd_pcm_substream *substream)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
 
        spin_lock_irq(&rme32->lock);
        if (rme32->fullduplex_mode) {
@@ -1070,9 +1058,9 @@ static int snd_rme32_playback_prepare(snd_pcm_substream_t * substream)
        return 0;
 }
 
-static int snd_rme32_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_rme32_capture_prepare(struct snd_pcm_substream *substream)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
 
        spin_lock_irq(&rme32->lock);
        if (rme32->fullduplex_mode) {
@@ -1088,11 +1076,11 @@ static int snd_rme32_capture_prepare(snd_pcm_substream_t * substream)
 }
 
 static int
-snd_rme32_pcm_trigger(snd_pcm_substream_t * substream, int cmd)
+snd_rme32_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
        struct list_head *pos;
-       snd_pcm_substream_t *s;
+       struct snd_pcm_substream *s;
 
        spin_lock(&rme32->lock);
        snd_pcm_group_for_each(pos, substream) {
@@ -1156,33 +1144,33 @@ snd_rme32_pcm_trigger(snd_pcm_substream_t * substream, int cmd)
 
 /* pointer callback for halfduplex mode */
 static snd_pcm_uframes_t
-snd_rme32_playback_pointer(snd_pcm_substream_t * substream)
+snd_rme32_playback_pointer(struct snd_pcm_substream *substream)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
        return snd_rme32_pcm_byteptr(rme32) >> rme32->playback_frlog;
 }
 
 static snd_pcm_uframes_t
-snd_rme32_capture_pointer(snd_pcm_substream_t * substream)
+snd_rme32_capture_pointer(struct snd_pcm_substream *substream)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
        return snd_rme32_pcm_byteptr(rme32) >> rme32->capture_frlog;
 }
 
 
 /* ack and pointer callbacks for fullduplex mode */
-static void snd_rme32_pb_trans_copy(snd_pcm_substream_t *substream,
-                                   snd_pcm_indirect_t *rec, size_t bytes)
+static void snd_rme32_pb_trans_copy(struct snd_pcm_substream *substream,
+                                   struct snd_pcm_indirect *rec, size_t bytes)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
        memcpy_toio(rme32->iobase + RME32_IO_DATA_BUFFER + rec->hw_data,
                    substream->runtime->dma_area + rec->sw_data, bytes);
 }
 
-static int snd_rme32_playback_fd_ack(snd_pcm_substream_t *substream)
+static int snd_rme32_playback_fd_ack(struct snd_pcm_substream *substream)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
-       snd_pcm_indirect_t *rec, *cprec;
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
+       struct snd_pcm_indirect *rec, *cprec;
 
        rec = &rme32->playback_pcm;
        cprec = &rme32->capture_pcm;
@@ -1196,41 +1184,41 @@ static int snd_rme32_playback_fd_ack(snd_pcm_substream_t *substream)
        return 0;
 }
 
-static void snd_rme32_cp_trans_copy(snd_pcm_substream_t *substream,
-                                   snd_pcm_indirect_t *rec, size_t bytes)
+static void snd_rme32_cp_trans_copy(struct snd_pcm_substream *substream,
+                                   struct snd_pcm_indirect *rec, size_t bytes)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
        memcpy_fromio(substream->runtime->dma_area + rec->sw_data,
                      rme32->iobase + RME32_IO_DATA_BUFFER + rec->hw_data,
                      bytes);
 }
 
-static int snd_rme32_capture_fd_ack(snd_pcm_substream_t *substream)
+static int snd_rme32_capture_fd_ack(struct snd_pcm_substream *substream)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
        snd_pcm_indirect_capture_transfer(substream, &rme32->capture_pcm,
                                          snd_rme32_cp_trans_copy);
        return 0;
 }
 
 static snd_pcm_uframes_t
-snd_rme32_playback_fd_pointer(snd_pcm_substream_t * substream)
+snd_rme32_playback_fd_pointer(struct snd_pcm_substream *substream)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
        return snd_pcm_indirect_playback_pointer(substream, &rme32->playback_pcm,
                                                 snd_rme32_pcm_byteptr(rme32));
 }
 
 static snd_pcm_uframes_t
-snd_rme32_capture_fd_pointer(snd_pcm_substream_t * substream)
+snd_rme32_capture_fd_pointer(struct snd_pcm_substream *substream)
 {
-       rme32_t *rme32 = snd_pcm_substream_chip(substream);
+       struct rme32 *rme32 = snd_pcm_substream_chip(substream);
        return snd_pcm_indirect_capture_pointer(substream, &rme32->capture_pcm,
                                                snd_rme32_pcm_byteptr(rme32));
 }
 
 /* for halfduplex mode */
-static snd_pcm_ops_t snd_rme32_playback_spdif_ops = {
+static struct snd_pcm_ops snd_rme32_playback_spdif_ops = {
        .open =         snd_rme32_playback_spdif_open,
        .close =        snd_rme32_playback_close,
        .ioctl =        snd_pcm_lib_ioctl,
@@ -1244,7 +1232,7 @@ static snd_pcm_ops_t snd_rme32_playback_spdif_ops = {
        .mmap =         snd_pcm_lib_mmap_iomem,
 };
 
-static snd_pcm_ops_t snd_rme32_capture_spdif_ops = {
+static struct snd_pcm_ops snd_rme32_capture_spdif_ops = {
        .open =         snd_rme32_capture_spdif_open,
        .close =        snd_rme32_capture_close,
        .ioctl =        snd_pcm_lib_ioctl,
@@ -1257,7 +1245,7 @@ static snd_pcm_ops_t snd_rme32_capture_spdif_ops = {
        .mmap =         snd_pcm_lib_mmap_iomem,
 };
 
-static snd_pcm_ops_t snd_rme32_playback_adat_ops = {
+static struct snd_pcm_ops snd_rme32_playback_adat_ops = {
        .open =         snd_rme32_playback_adat_open,
        .close =        snd_rme32_playback_close,
        .ioctl =        snd_pcm_lib_ioctl,
@@ -1270,7 +1258,7 @@ static snd_pcm_ops_t snd_rme32_playback_adat_ops = {
        .mmap =         snd_pcm_lib_mmap_iomem,
 };
 
-static snd_pcm_ops_t snd_rme32_capture_adat_ops = {
+static struct snd_pcm_ops snd_rme32_capture_adat_ops = {
        .open =         snd_rme32_capture_adat_open,
        .close =        snd_rme32_capture_close,
        .ioctl =        snd_pcm_lib_ioctl,
@@ -1283,7 +1271,7 @@ static snd_pcm_ops_t snd_rme32_capture_adat_ops = {
 };
 
 /* for fullduplex mode */
-static snd_pcm_ops_t snd_rme32_playback_spdif_fd_ops = {
+static struct snd_pcm_ops snd_rme32_playback_spdif_fd_ops = {
        .open =         snd_rme32_playback_spdif_open,
        .close =        snd_rme32_playback_close,
        .ioctl =        snd_pcm_lib_ioctl,
@@ -1295,7 +1283,7 @@ static snd_pcm_ops_t snd_rme32_playback_spdif_fd_ops = {
        .ack =          snd_rme32_playback_fd_ack,
 };
 
-static snd_pcm_ops_t snd_rme32_capture_spdif_fd_ops = {
+static struct snd_pcm_ops snd_rme32_capture_spdif_fd_ops = {
        .open =         snd_rme32_capture_spdif_open,
        .close =        snd_rme32_capture_close,
        .ioctl =        snd_pcm_lib_ioctl,
@@ -1307,7 +1295,7 @@ static snd_pcm_ops_t snd_rme32_capture_spdif_fd_ops = {
        .ack =          snd_rme32_capture_fd_ack,
 };
 
-static snd_pcm_ops_t snd_rme32_playback_adat_fd_ops = {
+static struct snd_pcm_ops snd_rme32_playback_adat_fd_ops = {
        .open =         snd_rme32_playback_adat_open,
        .close =        snd_rme32_playback_close,
        .ioctl =        snd_pcm_lib_ioctl,
@@ -1318,7 +1306,7 @@ static snd_pcm_ops_t snd_rme32_playback_adat_fd_ops = {
        .ack =          snd_rme32_playback_fd_ack,
 };
 
-static snd_pcm_ops_t snd_rme32_capture_adat_fd_ops = {
+static struct snd_pcm_ops snd_rme32_capture_adat_fd_ops = {
        .open =         snd_rme32_capture_adat_open,
        .close =        snd_rme32_capture_close,
        .ioctl =        snd_pcm_lib_ioctl,
@@ -1331,7 +1319,7 @@ static snd_pcm_ops_t snd_rme32_capture_adat_fd_ops = {
 
 static void snd_rme32_free(void *private_data)
 {
-       rme32_t *rme32 = (rme32_t *) private_data;
+       struct rme32 *rme32 = (struct rme32 *) private_data;
 
        if (rme32 == NULL) {
                return;
@@ -1352,20 +1340,20 @@ static void snd_rme32_free(void *private_data)
        pci_disable_device(rme32->pci);
 }
 
-static void snd_rme32_free_spdif_pcm(snd_pcm_t * pcm)
+static void snd_rme32_free_spdif_pcm(struct snd_pcm *pcm)
 {
-       rme32_t *rme32 = (rme32_t *) pcm->private_data;
+       struct rme32 *rme32 = (struct rme32 *) pcm->private_data;
        rme32->spdif_pcm = NULL;
 }
 
 static void
-snd_rme32_free_adat_pcm(snd_pcm_t *pcm)
+snd_rme32_free_adat_pcm(struct snd_pcm *pcm)
 {
-       rme32_t *rme32 = (rme32_t *) pcm->private_data;
+       struct rme32 *rme32 = (struct rme32 *) pcm->private_data;
        rme32->adat_pcm = NULL;
 }
 
-static int __devinit snd_rme32_create(rme32_t * rme32)
+static int __devinit snd_rme32_create(struct rme32 * rme32)
 {
        struct pci_dev *pci = rme32->pci;
        int err;
@@ -1381,13 +1369,13 @@ static int __devinit snd_rme32_create(rme32_t * rme32)
        rme32->port = pci_resource_start(rme32->pci, 0);
 
        if (request_irq(pci->irq, snd_rme32_interrupt, SA_INTERRUPT | SA_SHIRQ, "RME32", (void *) rme32)) {
-               snd_printk("unable to grab IRQ %d\n", pci->irq);
+               snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                return -EBUSY;
        }
        rme32->irq = pci->irq;
 
        if ((rme32->iobase = ioremap_nocache(rme32->port, RME32_IO_SIZE)) == 0) {
-               snd_printk("unable to remap memory region 0x%lx-0x%lx\n",
+               snd_printk(KERN_ERR "unable to remap memory region 0x%lx-0x%lx\n",
                           rme32->port, rme32->port + RME32_IO_SIZE - 1);
                return -ENOMEM;
        }
@@ -1420,8 +1408,8 @@ static int __devinit snd_rme32_create(rme32_t * rme32)
        }
 
        /* set up ALSA pcm device for ADAT */
-       if ((pci->device == PCI_DEVICE_ID_DIGI32) ||
-           (pci->device == PCI_DEVICE_ID_DIGI32_PRO)) {
+       if ((pci->device == PCI_DEVICE_ID_RME_DIGI32) ||
+           (pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO)) {
                /* ADAT is not available on DIGI32 and DIGI32 Pro */
                rme32->adat_pcm = NULL;
        }
@@ -1491,10 +1479,10 @@ static int __devinit snd_rme32_create(rme32_t * rme32)
  */
 
 static void
-snd_rme32_proc_read(snd_info_entry_t * entry, snd_info_buffer_t * buffer)
+snd_rme32_proc_read(struct snd_info_entry * entry, struct snd_info_buffer *buffer)
 {
        int n;
-       rme32_t *rme32 = (rme32_t *) entry->private_data;
+       struct rme32 *rme32 = (struct rme32 *) entry->private_data;
 
        rme32->rcreg = readl(rme32->iobase + RME32_IO_CONTROL_REGISTER);
 
@@ -1585,9 +1573,9 @@ snd_rme32_proc_read(snd_info_entry_t * entry, snd_info_buffer_t * buffer)
        }
 }
 
-static void __devinit snd_rme32_proc_init(rme32_t * rme32)
+static void __devinit snd_rme32_proc_init(struct rme32 * rme32)
 {
-       snd_info_entry_t *entry;
+       struct snd_info_entry *entry;
 
        if (! snd_card_proc_new(rme32->card, "rme32", &entry))
                snd_info_set_text_ops(entry, rme32, 1024, snd_rme32_proc_read);
@@ -1598,8 +1586,8 @@ static void __devinit snd_rme32_proc_init(rme32_t * rme32)
  */
 
 static int
-snd_rme32_info_loopback_control(snd_kcontrol_t * kcontrol,
-                               snd_ctl_elem_info_t * uinfo)
+snd_rme32_info_loopback_control(struct snd_kcontrol *kcontrol,
+                               struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
        uinfo->count = 1;
@@ -1608,10 +1596,10 @@ snd_rme32_info_loopback_control(snd_kcontrol_t * kcontrol,
        return 0;
 }
 static int
-snd_rme32_get_loopback_control(snd_kcontrol_t * kcontrol,
-                              snd_ctl_elem_value_t * ucontrol)
+snd_rme32_get_loopback_control(struct snd_kcontrol *kcontrol,
+                              struct snd_ctl_elem_value *ucontrol)
 {
-       rme32_t *rme32 = snd_kcontrol_chip(kcontrol);
+       struct rme32 *rme32 = snd_kcontrol_chip(kcontrol);
 
        spin_lock_irq(&rme32->lock);
        ucontrol->value.integer.value[0] =
@@ -1620,10 +1608,10 @@ snd_rme32_get_loopback_control(snd_kcontrol_t * kcontrol,
        return 0;
 }
 static int
-snd_rme32_put_loopback_control(snd_kcontrol_t * kcontrol,
-                              snd_ctl_elem_value_t * ucontrol)
+snd_rme32_put_loopback_control(struct snd_kcontrol *kcontrol,
+                              struct snd_ctl_elem_value *ucontrol)
 {
-       rme32_t *rme32 = snd_kcontrol_chip(kcontrol);
+       struct rme32 *rme32 = snd_kcontrol_chip(kcontrol);
        unsigned int val;
        int change;
 
@@ -1642,20 +1630,20 @@ snd_rme32_put_loopback_control(snd_kcontrol_t * kcontrol,
 }
 
 static int
-snd_rme32_info_inputtype_control(snd_kcontrol_t * kcontrol,
-                                snd_ctl_elem_info_t * uinfo)
+snd_rme32_info_inputtype_control(struct snd_kcontrol *kcontrol,
+                                struct snd_ctl_elem_info *uinfo)
 {
-       rme32_t *rme32 = snd_kcontrol_chip(kcontrol);
+       struct rme32 *rme32 = snd_kcontrol_chip(kcontrol);
        static char *texts[4] = { "Optical", "Coaxial", "Internal", "XLR" };
 
        uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
        uinfo->count = 1;
        switch (rme32->pci->device) {
-       case PCI_DEVICE_ID_DIGI32:
-       case PCI_DEVICE_ID_DIGI32_8:
+       case PCI_DEVICE_ID_RME_DIGI32:
+       case PCI_DEVICE_ID_RME_DIGI32_8:
                uinfo->value.enumerated.items = 3;
                break;
-       case PCI_DEVICE_ID_DIGI32_PRO:
+       case PCI_DEVICE_ID_RME_DIGI32_PRO:
                uinfo->value.enumerated.items = 4;
                break;
        default:
@@ -1672,21 +1660,21 @@ snd_rme32_info_inputtype_control(snd_kcontrol_t * kcontrol,
        return 0;
 }
 static int
-snd_rme32_get_inputtype_control(snd_kcontrol_t * kcontrol,
-                               snd_ctl_elem_value_t * ucontrol)
+snd_rme32_get_inputtype_control(struct snd_kcontrol *kcontrol,
+                               struct snd_ctl_elem_value *ucontrol)
 {
-       rme32_t *rme32 = snd_kcontrol_chip(kcontrol);
+       struct rme32 *rme32 = snd_kcontrol_chip(kcontrol);
        unsigned int items = 3;
 
        spin_lock_irq(&rme32->lock);
        ucontrol->value.enumerated.item[0] = snd_rme32_getinputtype(rme32);
 
        switch (rme32->pci->device) {
-       case PCI_DEVICE_ID_DIGI32:
-       case PCI_DEVICE_ID_DIGI32_8:
+       case PCI_DEVICE_ID_RME_DIGI32:
+       case PCI_DEVICE_ID_RME_DIGI32_8:
                items = 3;
                break;
-       case PCI_DEVICE_ID_DIGI32_PRO:
+       case PCI_DEVICE_ID_RME_DIGI32_PRO:
                items = 4;
                break;
        default:
@@ -1701,19 +1689,19 @@ snd_rme32_get_inputtype_control(snd_kcontrol_t * kcontrol,
        return 0;
 }
 static int
-snd_rme32_put_inputtype_control(snd_kcontrol_t * kcontrol,
-                               snd_ctl_elem_value_t * ucontrol)
+snd_rme32_put_inputtype_control(struct snd_kcontrol *kcontrol,
+                               struct snd_ctl_elem_value *ucontrol)
 {
-       rme32_t *rme32 = snd_kcontrol_chip(kcontrol);
+       struct rme32 *rme32 = snd_kcontrol_chip(kcontrol);
        unsigned int val;
        int change, items = 3;
 
        switch (rme32->pci->device) {
-       case PCI_DEVICE_ID_DIGI32:
-       case PCI_DEVICE_ID_DIGI32_8:
+       case PCI_DEVICE_ID_RME_DIGI32:
+       case PCI_DEVICE_ID_RME_DIGI32_8:
                items = 3;
                break;
-       case PCI_DEVICE_ID_DIGI32_PRO:
+       case PCI_DEVICE_ID_RME_DIGI32_PRO:
                items = 4;
                break;
        default:
@@ -1730,8 +1718,8 @@ snd_rme32_put_inputtype_control(snd_kcontrol_t * kcontrol,
 }
 
 static int
-snd_rme32_info_clockmode_control(snd_kcontrol_t * kcontrol,
-                                snd_ctl_elem_info_t * uinfo)
+snd_rme32_info_clockmode_control(struct snd_kcontrol *kcontrol,
+                                struct snd_ctl_elem_info *uinfo)
 {
        static char *texts[4] = { "AutoSync", 
                                  "Internal 32.0kHz", 
@@ -1749,10 +1737,10 @@ snd_rme32_info_clockmode_control(snd_kcontrol_t * kcontrol,
        return 0;
 }
 static int
-snd_rme32_get_clockmode_control(snd_kcontrol_t * kcontrol,
-                               snd_ctl_elem_value_t * ucontrol)
+snd_rme32_get_clockmode_control(struct snd_kcontrol *kcontrol,
+                               struct snd_ctl_elem_value *ucontrol)
 {
-       rme32_t *rme32 = snd_kcontrol_chip(kcontrol);
+       struct rme32 *rme32 = snd_kcontrol_chip(kcontrol);
 
        spin_lock_irq(&rme32->lock);
        ucontrol->value.enumerated.item[0] = snd_rme32_getclockmode(rme32);
@@ -1760,10 +1748,10 @@ snd_rme32_get_clockmode_control(snd_kcontrol_t * kcontrol,
        return 0;
 }
 static int
-snd_rme32_put_clockmode_control(snd_kcontrol_t * kcontrol,
-                               snd_ctl_elem_value_t * ucontrol)
+snd_rme32_put_clockmode_control(struct snd_kcontrol *kcontrol,
+                               struct snd_ctl_elem_value *ucontrol)
 {
-       rme32_t *rme32 = snd_kcontrol_chip(kcontrol);
+       struct rme32 *rme32 = snd_kcontrol_chip(kcontrol);
        unsigned int val;
        int change;
 
@@ -1775,7 +1763,7 @@ snd_rme32_put_clockmode_control(snd_kcontrol_t * kcontrol,
        return change;
 }
 
-static u32 snd_rme32_convert_from_aes(snd_aes_iec958_t * aes)
+static u32 snd_rme32_convert_from_aes(struct snd_aes_iec958 * aes)
 {
        u32 val = 0;
        val |= (aes->status[0] & IEC958_AES0_PROFESSIONAL) ? RME32_WCR_PRO : 0;
@@ -1786,7 +1774,7 @@ static u32 snd_rme32_convert_from_aes(snd_aes_iec958_t * aes)
        return val;
 }
 
-static void snd_rme32_convert_to_aes(snd_aes_iec958_t * aes, u32 val)
+static void snd_rme32_convert_to_aes(struct snd_aes_iec958 * aes, u32 val)
 {
        aes->status[0] = ((val & RME32_WCR_PRO) ? IEC958_AES0_PROFESSIONAL : 0);
        if (val & RME32_WCR_PRO)
@@ -1795,28 +1783,28 @@ static void snd_rme32_convert_to_aes(snd_aes_iec958_t * aes, u32 val)
                aes->status[0] |= (val & RME32_WCR_EMP) ? IEC958_AES0_CON_EMPHASIS_5015 : 0;
 }
 
-static int snd_rme32_control_spdif_info(snd_kcontrol_t * kcontrol,
-                                       snd_ctl_elem_info_t * uinfo)
+static int snd_rme32_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_rme32_control_spdif_get(snd_kcontrol_t * kcontrol,
-                                      snd_ctl_elem_value_t * ucontrol)
+static int snd_rme32_control_spdif_get(struct snd_kcontrol *kcontrol,
+                                      struct snd_ctl_elem_value *ucontrol)
 {
-       rme32_t *rme32 = snd_kcontrol_chip(kcontrol);
+       struct rme32 *rme32 = snd_kcontrol_chip(kcontrol);
 
        snd_rme32_convert_to_aes(&ucontrol->value.iec958,
                                 rme32->wcreg_spdif);
        return 0;
 }
 
-static int snd_rme32_control_spdif_put(snd_kcontrol_t * kcontrol,
-                                      snd_ctl_elem_value_t * ucontrol)
+static int snd_rme32_control_spdif_put(struct snd_kcontrol *kcontrol,
+                                      struct snd_ctl_elem_value *ucontrol)
 {
-       rme32_t *rme32 = snd_kcontrol_chip(kcontrol);
+       struct rme32 *rme32 = snd_kcontrol_chip(kcontrol);
        int change;
        u32 val;
 
@@ -1828,30 +1816,30 @@ static int snd_rme32_control_spdif_put(snd_kcontrol_t * kcontrol,
        return change;
 }
 
-static int snd_rme32_control_spdif_stream_info(snd_kcontrol_t * kcontrol,
-                                              snd_ctl_elem_info_t * uinfo)
+static int snd_rme32_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_rme32_control_spdif_stream_get(snd_kcontrol_t * kcontrol,
-                                             snd_ctl_elem_value_t *
+static int snd_rme32_control_spdif_stream_get(struct snd_kcontrol *kcontrol,
+                                             struct snd_ctl_elem_value *
                                              ucontrol)
 {
-       rme32_t *rme32 = snd_kcontrol_chip(kcontrol);
+       struct rme32 *rme32 = snd_kcontrol_chip(kcontrol);
 
        snd_rme32_convert_to_aes(&ucontrol->value.iec958,
                                 rme32->wcreg_spdif_stream);
        return 0;
 }
 
-static int snd_rme32_control_spdif_stream_put(snd_kcontrol_t * kcontrol,
-                                             snd_ctl_elem_value_t *
+static int snd_rme32_control_spdif_stream_put(struct snd_kcontrol *kcontrol,
+                                             struct snd_ctl_elem_value *
                                              ucontrol)
 {
-       rme32_t *rme32 = snd_kcontrol_chip(kcontrol);
+       struct rme32 *rme32 = snd_kcontrol_chip(kcontrol);
        int change;
        u32 val;
 
@@ -1866,23 +1854,23 @@ static int snd_rme32_control_spdif_stream_put(snd_kcontrol_t * kcontrol,
        return change;
 }
 
-static int snd_rme32_control_spdif_mask_info(snd_kcontrol_t * kcontrol,
-                                            snd_ctl_elem_info_t * uinfo)
+static int snd_rme32_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_rme32_control_spdif_mask_get(snd_kcontrol_t * kcontrol,
-                                           snd_ctl_elem_value_t *
+static int snd_rme32_control_spdif_mask_get(struct snd_kcontrol *kcontrol,
+                                           struct snd_ctl_elem_value *
                                            ucontrol)
 {
        ucontrol->value.iec958.status[0] = kcontrol->private_value;
        return 0;
 }
 
-static snd_kcontrol_new_t snd_rme32_controls[] = {
+static struct snd_kcontrol_new snd_rme32_controls[] = {
        {
                .iface = SNDRV_CTL_ELEM_IFACE_PCM,
                .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, DEFAULT),
@@ -1900,7 +1888,7 @@ static snd_kcontrol_new_t snd_rme32_controls[] = {
        },
        {
                .access = SNDRV_CTL_ELEM_ACCESS_READ,
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+               .iface = SNDRV_CTL_ELEM_IFACE_PCM,
                .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, CON_MASK),
                .info = snd_rme32_control_spdif_mask_info,
                .get =  snd_rme32_control_spdif_mask_get,
@@ -1908,7 +1896,7 @@ static snd_kcontrol_new_t snd_rme32_controls[] = {
        },
        {
                .access = SNDRV_CTL_ELEM_ACCESS_READ,
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+               .iface = SNDRV_CTL_ELEM_IFACE_PCM,
                .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, PRO_MASK),
                .info = snd_rme32_control_spdif_mask_info,
                .get =  snd_rme32_control_spdif_mask_get,
@@ -1937,10 +1925,10 @@ static snd_kcontrol_new_t snd_rme32_controls[] = {
        }
 };
 
-static int snd_rme32_create_switches(snd_card_t * card, rme32_t * rme32)
+static int snd_rme32_create_switches(struct snd_card *card, struct rme32 * rme32)
 {
        int idx, err;
-       snd_kcontrol_t *kctl;
+       struct snd_kcontrol *kctl;
 
        for (idx = 0; idx < (int)ARRAY_SIZE(snd_rme32_controls); idx++) {
                if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_rme32_controls[idx], rme32))) < 0)
@@ -1956,7 +1944,7 @@ static int snd_rme32_create_switches(snd_card_t * card, rme32_t * rme32)
  * Card initialisation
  */
 
-static void snd_rme32_card_free(snd_card_t * card)
+static void snd_rme32_card_free(struct snd_card *card)
 {
        snd_rme32_free(card->private_data);
 }
@@ -1965,8 +1953,8 @@ static int __devinit
 snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
 {
        static int dev;
-       rme32_t *rme32;
-       snd_card_t *card;
+       struct rme32 *rme32;
+       struct snd_card *card;
        int err;
 
        if (dev >= SNDRV_CARDS) {
@@ -1978,10 +1966,10 @@ snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
        }
 
        if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
-                                sizeof(rme32_t))) == NULL)
+                                sizeof(struct rme32))) == NULL)
                return -ENOMEM;
        card->private_free = snd_rme32_card_free;
-       rme32 = (rme32_t *) card->private_data;
+       rme32 = (struct rme32 *) card->private_data;
        rme32->card = card;
        rme32->pci = pci;
        snd_card_set_dev(card, &pci->dev);
@@ -1994,13 +1982,13 @@ snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
 
        strcpy(card->driver, "Digi32");
        switch (rme32->pci->device) {
-       case PCI_DEVICE_ID_DIGI32:
+       case PCI_DEVICE_ID_RME_DIGI32:
                strcpy(card->shortname, "RME Digi32");
                break;
-       case PCI_DEVICE_ID_DIGI32_8:
+       case PCI_DEVICE_ID_RME_DIGI32_8:
                strcpy(card->shortname, "RME Digi32/8");
                break;
-       case PCI_DEVICE_ID_DIGI32_PRO:
+       case PCI_DEVICE_ID_RME_DIGI32_PRO:
                strcpy(card->shortname, "RME Digi32 PRO");
                break;
        }
@@ -2031,7 +2019,7 @@ static struct pci_driver driver = {
 
 static int __init alsa_card_rme32_init(void)
 {
-       return pci_module_init(&driver);
+       return pci_register_driver(&driver);
 }
 
 static void __exit alsa_card_rme32_exit(void)