aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-01-13 11:16:29 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:23:32 -0500
commit97c67b65cbdfd19887450ae1b80ddbb54de9559d (patch)
treead92dc802a5146c8b86e2333118f0fc394dddcfb
parent7a6c8ff1ef83df4ce44b586999e54966d8e5bda8 (diff)
[ALSA] au88x0 - 64bit arch fixes
Modules: au88x0 driver Fix the driver codes to run on 64bit architectures. The patch taken from ALSA BTS bug#1047. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/au88x0/au88x0.c10
-rw-r--r--sound/pci/au88x0/au88x0.h12
-rw-r--r--sound/pci/au88x0/au88x0_core.c12
-rw-r--r--sound/pci/au88x0/au88x0_eq.c31
-rw-r--r--sound/pci/au88x0/au88x0_eq.h30
-rw-r--r--sound/pci/au88x0/au88x0_eqdata.c6
-rw-r--r--sound/pci/au88x0/au88x0_mpu401.c4
-rw-r--r--sound/pci/au88x0/au88x0_synth.c10
-rw-r--r--sound/pci/au88x0/au88x0_wt.h10
-rw-r--r--sound/pci/au88x0/au88x0_xtalk.c16
-rw-r--r--sound/pci/au88x0/au88x0_xtalk.h12
11 files changed, 81 insertions, 72 deletions
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c
index 7d9184f7367a..126870ec063a 100644
--- a/sound/pci/au88x0/au88x0.c
+++ b/sound/pci/au88x0/au88x0.c
@@ -151,14 +151,18 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
151 // check PCI availability (DMA). 151 // check PCI availability (DMA).
152 if ((err = pci_enable_device(pci)) < 0) 152 if ((err = pci_enable_device(pci)) < 0)
153 return err; 153 return err;
154 if (pci_set_dma_mask(pci, DMA_32BIT_MASK)) { 154 if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 ||
155 pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) {
155 printk(KERN_ERR "error to set DMA mask\n"); 156 printk(KERN_ERR "error to set DMA mask\n");
157 pci_disable_device(pci);
156 return -ENXIO; 158 return -ENXIO;
157 } 159 }
158 160
159 chip = kzalloc(sizeof(*chip), GFP_KERNEL); 161 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
160 if (chip == NULL) 162 if (chip == NULL) {
163 pci_disable_device(pci);
161 return -ENOMEM; 164 return -ENOMEM;
165 }
162 166
163 chip->card = card; 167 chip->card = card;
164 168
@@ -208,6 +212,8 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
208 goto alloc_out; 212 goto alloc_out;
209 } 213 }
210 214
215 snd_card_set_dev(card, &pci->dev);
216
211 *rchip = chip; 217 *rchip = chip;
212 218
213 return 0; 219 return 0;
diff --git a/sound/pci/au88x0/au88x0.h b/sound/pci/au88x0/au88x0.h
index c2ad2674bea7..d65ccb1866a0 100644
--- a/sound/pci/au88x0/au88x0.h
+++ b/sound/pci/au88x0/au88x0.h
@@ -39,8 +39,8 @@
39#include "au88x0_wt.h" 39#include "au88x0_wt.h"
40#endif 40#endif
41 41
42#define hwread(x,y) readl((x)+((y)>>2)) 42#define hwread(x,y) readl((x)+(y))
43#define hwwrite(x,y,z) writel((z),(x)+((y)>>2)) 43#define hwwrite(x,y,z) writel((z),(x)+(y))
44 44
45/* Vortex MPU401 defines. */ 45/* Vortex MPU401 defines. */
46#define MIDI_CLOCK_DIV 0x61 46#define MIDI_CLOCK_DIV 0x61
@@ -113,7 +113,7 @@ typedef struct {
113 //int this_08; /* Still unknown */ 113 //int this_08; /* Still unknown */
114 int fifo_enabled; /* this_24 */ 114 int fifo_enabled; /* this_24 */
115 int fifo_status; /* this_1c */ 115 int fifo_status; /* this_1c */
116 int dma_ctrl; /* this_78 (ADB), this_7c (WT) */ 116 u32 dma_ctrl; /* this_78 (ADB), this_7c (WT) */
117 int dma_unknown; /* this_74 (ADB), this_78 (WT). WDM: +8 */ 117 int dma_unknown; /* this_74 (ADB), this_78 (WT). WDM: +8 */
118 int cfg0; 118 int cfg0;
119 int cfg1; 119 int cfg1;
@@ -178,7 +178,7 @@ struct snd_vortex {
178 178
179 /* PCI hardware resources */ 179 /* PCI hardware resources */
180 unsigned long io; 180 unsigned long io;
181 unsigned long __iomem *mmio; 181 void __iomem *mmio;
182 unsigned int irq; 182 unsigned int irq;
183 spinlock_t lock; 183 spinlock_t lock;
184 184
@@ -201,14 +201,14 @@ static void vortex_adbdma_setbuffers(vortex_t * vortex, int adbdma,
201 int count); 201 int count);
202static void vortex_adbdma_setmode(vortex_t * vortex, int adbdma, int ie, 202static void vortex_adbdma_setmode(vortex_t * vortex, int adbdma, int ie,
203 int dir, int fmt, int d, 203 int dir, int fmt, int d,
204 unsigned long offset); 204 u32 offset);
205static void vortex_adbdma_setstartbuffer(vortex_t * vortex, int adbdma, int sb); 205static void vortex_adbdma_setstartbuffer(vortex_t * vortex, int adbdma, int sb);
206#ifndef CHIP_AU8810 206#ifndef CHIP_AU8810
207static void vortex_wtdma_setbuffers(vortex_t * vortex, int wtdma, 207static void vortex_wtdma_setbuffers(vortex_t * vortex, int wtdma,
208 struct snd_sg_buf * sgbuf, int size, 208 struct snd_sg_buf * sgbuf, int size,
209 int count); 209 int count);
210static void vortex_wtdma_setmode(vortex_t * vortex, int wtdma, int ie, int fmt, int d, /*int e, */ 210static void vortex_wtdma_setmode(vortex_t * vortex, int wtdma, int ie, int fmt, int d, /*int e, */
211 unsigned long offset); 211 u32 offset);
212static void vortex_wtdma_setstartbuffer(vortex_t * vortex, int wtdma, int sb); 212static void vortex_wtdma_setstartbuffer(vortex_t * vortex, int wtdma, int sb);
213#endif 213#endif
214 214
diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c
index e3394fe63253..9cac02e93b25 100644
--- a/sound/pci/au88x0/au88x0_core.c
+++ b/sound/pci/au88x0/au88x0_core.c
@@ -376,7 +376,7 @@ vortex_mixer_delWTD(vortex_t * vortex, unsigned char mix, unsigned char ch)
376 376
377static void vortex_mixer_init(vortex_t * vortex) 377static void vortex_mixer_init(vortex_t * vortex)
378{ 378{
379 unsigned long addr; 379 u32 addr;
380 int x; 380 int x;
381 381
382 // FIXME: get rid of this crap. 382 // FIXME: get rid of this crap.
@@ -639,7 +639,7 @@ static void vortex_src_setupchannel(vortex_t * card, unsigned char src,
639 639
640static void vortex_srcblock_init(vortex_t * vortex) 640static void vortex_srcblock_init(vortex_t * vortex)
641{ 641{
642 unsigned long addr; 642 u32 addr;
643 int x; 643 int x;
644 hwwrite(vortex->mmio, VORTEX_SRC_SOURCESIZE, 0x1ff); 644 hwwrite(vortex->mmio, VORTEX_SRC_SOURCESIZE, 0x1ff);
645 /* 645 /*
@@ -1035,7 +1035,7 @@ vortex_fifo_setwtctrl(vortex_t * vortex, int fifo, int ctrl, int priority,
1035static void vortex_fifo_init(vortex_t * vortex) 1035static void vortex_fifo_init(vortex_t * vortex)
1036{ 1036{
1037 int x; 1037 int x;
1038 unsigned long addr; 1038 u32 addr;
1039 1039
1040 /* ADB DMA channels fifos. */ 1040 /* ADB DMA channels fifos. */
1041 addr = VORTEX_FIFO_ADBCTRL + ((NR_ADB - 1) * 4); 1041 addr = VORTEX_FIFO_ADBCTRL + ((NR_ADB - 1) * 4);
@@ -1054,7 +1054,7 @@ static void vortex_fifo_init(vortex_t * vortex)
1054 hwwrite(vortex->mmio, addr, FIFO_U0); 1054 hwwrite(vortex->mmio, addr, FIFO_U0);
1055 if (hwread(vortex->mmio, addr) != FIFO_U0) 1055 if (hwread(vortex->mmio, addr) != FIFO_U0)
1056 printk(KERN_ERR 1056 printk(KERN_ERR
1057 "bad wt fifo reset (0x%08lx, 0x%08x)!\n", 1057 "bad wt fifo reset (0x%08x, 0x%08x)!\n",
1058 addr, hwread(vortex->mmio, addr)); 1058 addr, hwread(vortex->mmio, addr));
1059 vortex_fifo_clearwtdata(vortex, x, FIFO_SIZE); 1059 vortex_fifo_clearwtdata(vortex, x, FIFO_SIZE);
1060 addr -= 4; 1060 addr -= 4;
@@ -1152,7 +1152,7 @@ vortex_adbdma_setbuffers(vortex_t * vortex, int adbdma,
1152 1152
1153static void 1153static void
1154vortex_adbdma_setmode(vortex_t * vortex, int adbdma, int ie, int dir, 1154vortex_adbdma_setmode(vortex_t * vortex, int adbdma, int ie, int dir,
1155 int fmt, int d, unsigned long offset) 1155 int fmt, int d, u32 offset)
1156{ 1156{
1157 stream_t *dma = &vortex->dma_adb[adbdma]; 1157 stream_t *dma = &vortex->dma_adb[adbdma];
1158 1158
@@ -1411,7 +1411,7 @@ vortex_wtdma_setbuffers(vortex_t * vortex, int wtdma,
1411 1411
1412static void 1412static void
1413vortex_wtdma_setmode(vortex_t * vortex, int wtdma, int ie, int fmt, int d, 1413vortex_wtdma_setmode(vortex_t * vortex, int wtdma, int ie, int fmt, int d,
1414 /*int e, */ unsigned long offset) 1414 /*int e, */ u32 offset)
1415{ 1415{
1416 stream_t *dma = &vortex->dma_wt[wtdma]; 1416 stream_t *dma = &vortex->dma_wt[wtdma];
1417 1417
diff --git a/sound/pci/au88x0/au88x0_eq.c b/sound/pci/au88x0/au88x0_eq.c
index c8280f82eb5a..64fbfbbaf816 100644
--- a/sound/pci/au88x0/au88x0_eq.c
+++ b/sound/pci/au88x0/au88x0_eq.c
@@ -377,23 +377,23 @@ static void vortex_EqHw_GetLevels(vortex_t * vortex, u16 a[])
377 377
378#endif 378#endif
379/* Global Control */ 379/* Global Control */
380static void vortex_EqHw_SetControlReg(vortex_t * vortex, unsigned long reg) 380static void vortex_EqHw_SetControlReg(vortex_t * vortex, u32 reg)
381{ 381{
382 hwwrite(vortex->mmio, 0x2b440, reg); 382 hwwrite(vortex->mmio, 0x2b440, reg);
383} 383}
384 384
385static void vortex_EqHw_SetSampleRate(vortex_t * vortex, int sr) 385static void vortex_EqHw_SetSampleRate(vortex_t * vortex, u32 sr)
386{ 386{
387 hwwrite(vortex->mmio, 0x2b440, ((sr & 0x1f) << 3) | 0xb800); 387 hwwrite(vortex->mmio, 0x2b440, ((sr & 0x1f) << 3) | 0xb800);
388} 388}
389 389
390#if 0 390#if 0
391static void vortex_EqHw_GetControlReg(vortex_t * vortex, unsigned long *reg) 391static void vortex_EqHw_GetControlReg(vortex_t * vortex, u32 *reg)
392{ 392{
393 *reg = hwread(vortex->mmio, 0x2b440); 393 *reg = hwread(vortex->mmio, 0x2b440);
394} 394}
395 395
396static void vortex_EqHw_GetSampleRate(vortex_t * vortex, int *sr) 396static void vortex_EqHw_GetSampleRate(vortex_t * vortex, u32 *sr)
397{ 397{
398 *sr = (hwread(vortex->mmio, 0x2b440) >> 3) & 0x1f; 398 *sr = (hwread(vortex->mmio, 0x2b440) >> 3) & 0x1f;
399} 399}
@@ -554,7 +554,7 @@ static void vortex_Eqlzr_SetRightGain(vortex_t * vortex, u16 index, u16 gain)
554 554
555#if 0 555#if 0
556static int 556static int
557vortex_Eqlzr_GetAllBands(vortex_t * vortex, u16 * gains, unsigned long *cnt) 557vortex_Eqlzr_GetAllBands(vortex_t * vortex, u16 * gains, s32 *cnt)
558{ 558{
559 eqlzr_t *eq = &(vortex->eq); 559 eqlzr_t *eq = &(vortex->eq);
560 int si = 0; 560 int si = 0;
@@ -586,7 +586,7 @@ static int vortex_Eqlzr_SetAllBandsFromActiveCoeffSet(vortex_t * vortex)
586} 586}
587 587
588static int 588static int
589vortex_Eqlzr_SetAllBands(vortex_t * vortex, u16 gains[], unsigned long count) 589vortex_Eqlzr_SetAllBands(vortex_t * vortex, u16 gains[], s32 count)
590{ 590{
591 eqlzr_t *eq = &(vortex->eq); 591 eqlzr_t *eq = &(vortex->eq);
592 int i; 592 int i;
@@ -604,11 +604,10 @@ vortex_Eqlzr_SetAllBands(vortex_t * vortex, u16 gains[], unsigned long count)
604} 604}
605 605
606static void 606static void
607vortex_Eqlzr_SetA3dBypassGain(vortex_t * vortex, unsigned long a, 607vortex_Eqlzr_SetA3dBypassGain(vortex_t * vortex, u32 a, u32 b)
608 unsigned long b)
609{ 608{
610 eqlzr_t *eq = &(vortex->eq); 609 eqlzr_t *eq = &(vortex->eq);
611 int eax, ebx; 610 u32 eax, ebx;
612 611
613 eq->this58 = a; 612 eq->this58 = a;
614 eq->this5c = b; 613 eq->this5c = b;
@@ -624,7 +623,7 @@ vortex_Eqlzr_SetA3dBypassGain(vortex_t * vortex, unsigned long a,
624static void vortex_Eqlzr_ProgramA3dBypassGain(vortex_t * vortex) 623static void vortex_Eqlzr_ProgramA3dBypassGain(vortex_t * vortex)
625{ 624{
626 eqlzr_t *eq = &(vortex->eq); 625 eqlzr_t *eq = &(vortex->eq);
627 int eax, ebx; 626 u32 eax, ebx;
628 627
629 if (eq->this54) 628 if (eq->this54)
630 eax = eq->this0e; 629 eax = eq->this0e;
@@ -641,7 +640,7 @@ static void vortex_Eqlzr_ShutDownA3d(vortex_t * vortex)
641 vortex_EqHw_ZeroA3DIO(vortex); 640 vortex_EqHw_ZeroA3DIO(vortex);
642} 641}
643 642
644static void vortex_Eqlzr_SetBypass(vortex_t * vortex, long bp) 643static void vortex_Eqlzr_SetBypass(vortex_t * vortex, u32 bp)
645{ 644{
646 eqlzr_t *eq = &(vortex->eq); 645 eqlzr_t *eq = &(vortex->eq);
647 646
@@ -651,8 +650,8 @@ static void vortex_Eqlzr_SetBypass(vortex_t * vortex, long bp)
651 vortex_EqHw_SetBypassGain(vortex, eq->this08, eq->this08); 650 vortex_EqHw_SetBypassGain(vortex, eq->this08, eq->this08);
652 } else { 651 } else {
653 /* EQ disabled. */ 652 /* EQ disabled. */
654 vortex_EqHw_SetLeftGainsTarget(vortex, (u16 *) (eq->this14)); 653 vortex_EqHw_SetLeftGainsTarget(vortex, eq->this14_array);
655 vortex_EqHw_SetRightGainsTarget(vortex, (u16 *) (eq->this14)); 654 vortex_EqHw_SetRightGainsTarget(vortex, eq->this14_array);
656 vortex_EqHw_SetBypassGain(vortex, eq->this0c, eq->this0c); 655 vortex_EqHw_SetBypassGain(vortex, eq->this0c, eq->this0c);
657 } 656 }
658 vortex_Eqlzr_ProgramA3dBypassGain(vortex); 657 vortex_Eqlzr_ProgramA3dBypassGain(vortex);
@@ -706,7 +705,7 @@ static void vortex_Eqlzr_init(vortex_t * vortex)
706 eq->this5c = 0xffff; 705 eq->this5c = 0xffff;
707 706
708 /* Set gains. */ 707 /* Set gains. */
709 memset(eq->this14, 0, 2 * 10); 708 memset(eq->this14_array, 0, sizeof(eq->this14_array));
710 709
711 /* Actual init. */ 710 /* Actual init. */
712 vortex_EqHw_ZeroState(vortex); 711 vortex_EqHw_ZeroState(vortex);
@@ -792,7 +791,7 @@ snd_vortex_eq_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucon
792{ 791{
793 vortex_t *vortex = snd_kcontrol_chip(kcontrol); 792 vortex_t *vortex = snd_kcontrol_chip(kcontrol);
794 int i = kcontrol->private_value; 793 int i = kcontrol->private_value;
795 u16 gainL, gainR; 794 u16 gainL = 0, gainR = 0;
796 795
797 vortex_Eqlzr_GetLeftGain(vortex, i, &gainL); 796 vortex_Eqlzr_GetLeftGain(vortex, i, &gainL);
798 vortex_Eqlzr_GetRightGain(vortex, i, &gainR); 797 vortex_Eqlzr_GetRightGain(vortex, i, &gainR);
@@ -806,7 +805,7 @@ snd_vortex_eq_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucon
806{ 805{
807 vortex_t *vortex = snd_kcontrol_chip(kcontrol); 806 vortex_t *vortex = snd_kcontrol_chip(kcontrol);
808 int changed = 0, i = kcontrol->private_value; 807 int changed = 0, i = kcontrol->private_value;
809 u16 gainL, gainR; 808 u16 gainL = 0, gainR = 0;
810 809
811 vortex_Eqlzr_GetLeftGain(vortex, i, &gainL); 810 vortex_Eqlzr_GetLeftGain(vortex, i, &gainL);
812 vortex_Eqlzr_GetRightGain(vortex, i, &gainR); 811 vortex_Eqlzr_GetRightGain(vortex, i, &gainR);
diff --git a/sound/pci/au88x0/au88x0_eq.h b/sound/pci/au88x0/au88x0_eq.h
index e49bc625c873..717544af58ad 100644
--- a/sound/pci/au88x0/au88x0_eq.h
+++ b/sound/pci/au88x0/au88x0_eq.h
@@ -18,26 +18,26 @@ typedef struct {
18} auxxEqCoeffSet_t; 18} auxxEqCoeffSet_t;
19 19
20typedef struct { 20typedef struct {
21 unsigned int *this00; /*CAsp4HwIO */ 21 u32 ptr_this00; /*CAsp4HwIO */
22 long this04; /* How many filters for each side (default = 10) */ 22 s32 this04; /* How many filters for each side (default = 10) */
23 long this08; /* inited to cero. Stereo flag? */ 23 s32 this08; /* inited to cero. Stereo flag? */
24} eqhw_t; 24} eqhw_t;
25 25
26typedef struct { 26typedef struct {
27 unsigned int *this00; /*CAsp4Core */ 27 u32 ptr_this00; /*CAsp4Core */
28 eqhw_t this04; /* CHwEq */ 28 eqhw_t this04; /* CHwEq */
29 short this08; /* Bad codec flag ? SetBypassGain: bypass gain */ 29 u16 this08; /* Bad codec flag ? SetBypassGain: bypass gain */
30 short this0a; 30 u16 this0a;
31 short this0c; /* SetBypassGain: bypass gain when this28 is not set. */ 31 u16 this0c; /* SetBypassGain: bypass gain when this28 is not set. */
32 short this0e; 32 u16 this0e;
33 33
34 long this10; /* How many gains are used for each side (right or left). */ 34 s32 this10; /* How many gains are used for each side (right or left). */
35 u16 this14[32]; /* SetLeftGainsTarget: Left (and right?) EQ gains */ 35 u16 this14_array[32]; /* SetLeftGainsTarget: Left (and right?) EQ gains */
36 long this24; 36 s32 this24;
37 long this28; /* flag related to EQ enabled or not. Gang flag ? */ 37 s32 this28; /* flag related to EQ enabled or not. Gang flag ? */
38 long this54; /* SetBypass */ 38 s32 this54; /* SetBypass */
39 long this58; 39 s32 this58;
40 long this5c; 40 s32 this5c;
41 /*0x60 */ auxxEqCoeffSet_t coefset; 41 /*0x60 */ auxxEqCoeffSet_t coefset;
42 /* 50 u16 word each channel. */ 42 /* 50 u16 word each channel. */
43 u16 this130[20]; /* Left and Right gains */ 43 u16 this130[20]; /* Left and Right gains */
diff --git a/sound/pci/au88x0/au88x0_eqdata.c b/sound/pci/au88x0/au88x0_eqdata.c
index abf8d6ac4c15..ce8dca8ce1e2 100644
--- a/sound/pci/au88x0/au88x0_eqdata.c
+++ b/sound/pci/au88x0/au88x0_eqdata.c
@@ -104,7 +104,11 @@ static u16 asEqOutStateZeros[48] = {
104}; 104};
105 105
106/*_rodataba0:*/ 106/*_rodataba0:*/
107static long eq_levels[32] = { 107static u16 eq_levels[64] = {
108 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
109 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
110 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
111 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
108 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 112 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
109 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 113 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
110 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 114 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
diff --git a/sound/pci/au88x0/au88x0_mpu401.c b/sound/pci/au88x0/au88x0_mpu401.c
index 8ba6dd36222b..873f486b07b8 100644
--- a/sound/pci/au88x0/au88x0_mpu401.c
+++ b/sound/pci/au88x0/au88x0_mpu401.c
@@ -95,7 +95,7 @@ static int __devinit snd_vortex_midi(vortex_t * vortex)
95 return temp; 95 return temp;
96 } 96 }
97#else 97#else
98 port = (unsigned long)(vortex->mmio + (VORTEX_MIDI_DATA >> 2)); 98 port = (unsigned long)(vortex->mmio + VORTEX_MIDI_DATA);
99 if ((temp = 99 if ((temp =
100 snd_mpu401_uart_new(vortex->card, 0, MPU401_HW_AUREAL, port, 100 snd_mpu401_uart_new(vortex->card, 0, MPU401_HW_AUREAL, port,
101 1, 0, 0, &rmidi)) != 0) { 101 1, 0, 0, &rmidi)) != 0) {
@@ -105,7 +105,7 @@ static int __devinit snd_vortex_midi(vortex_t * vortex)
105 return temp; 105 return temp;
106 } 106 }
107 mpu = rmidi->private_data; 107 mpu = rmidi->private_data;
108 mpu->cport = (unsigned long)(vortex->mmio + (VORTEX_MIDI_CMD >> 2)); 108 mpu->cport = (unsigned long)(vortex->mmio + VORTEX_MIDI_CMD);
109#endif 109#endif
110 vortex->rmidi = rmidi; 110 vortex->rmidi = rmidi;
111 return 0; 111 return 0;
diff --git a/sound/pci/au88x0/au88x0_synth.c b/sound/pci/au88x0/au88x0_synth.c
index 65f375bad43a..d3e662a1285d 100644
--- a/sound/pci/au88x0/au88x0_synth.c
+++ b/sound/pci/au88x0/au88x0_synth.c
@@ -32,7 +32,7 @@ static void vortex_connection_mixin_mix(vortex_t * vortex, int en,
32 unsigned char mix, int a); 32 unsigned char mix, int a);
33static void vortex_fifo_wtinitialize(vortex_t * vortex, int fifo, int j); 33static void vortex_fifo_wtinitialize(vortex_t * vortex, int fifo, int j);
34static int vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt, 34static int vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
35 unsigned long val); 35 u32 val);
36 36
37/* WT */ 37/* WT */
38 38
@@ -166,7 +166,7 @@ static int vortex_wt_GetReg(vortex_t * vortex, char reg, int wt)
166/* WT hardware abstraction layer generic register interface. */ 166/* WT hardware abstraction layer generic register interface. */
167static int 167static int
168vortex_wt_SetReg2(vortex_t * vortex, unsigned char reg, int wt, 168vortex_wt_SetReg2(vortex_t * vortex, unsigned char reg, int wt,
169 unsigned short val) 169 u16 val)
170{ 170{
171 /* 171 /*
172 int eax, edx; 172 int eax, edx;
@@ -190,7 +190,7 @@ vortex_wt_SetReg2(vortex_t * vortex, unsigned char reg, int wt,
190#endif 190#endif
191static int 191static int
192vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt, 192vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
193 unsigned long val) 193 u32 val)
194{ 194{
195 int ecx; 195 int ecx;
196 196
@@ -279,7 +279,7 @@ vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
279 279
280static void vortex_wt_init(vortex_t * vortex) 280static void vortex_wt_init(vortex_t * vortex)
281{ 281{
282 int var4, var8, varc, var10 = 0, edi; 282 u32 var4, var8, varc, var10 = 0, edi;
283 283
284 var10 &= 0xFFFFFFE3; 284 var10 &= 0xFFFFFFE3;
285 var10 |= 0x22; 285 var10 |= 0x22;
@@ -353,7 +353,7 @@ static void vortex_wt_SetVolume(vortex_t * vortex, int wt, int vol[])
353static void vortex_wt_SetFrequency(vortex_t * vortex, int wt, unsigned int sr) 353static void vortex_wt_SetFrequency(vortex_t * vortex, int wt, unsigned int sr)
354{ 354{
355 wt_voice_t *voice = &(vortex->wt_voice[wt]); 355 wt_voice_t *voice = &(vortex->wt_voice[wt]);
356 long int eax, edx; 356 u32 eax, edx;
357 357
358 //FIXME: 64 bit operation. 358 //FIXME: 64 bit operation.
359 eax = ((sr << 0xf) * 0x57619F1) & 0xffffffff; 359 eax = ((sr << 0xf) * 0x57619F1) & 0xffffffff;
diff --git a/sound/pci/au88x0/au88x0_wt.h b/sound/pci/au88x0/au88x0_wt.h
index d536c88b43bf..38d98f88a95c 100644
--- a/sound/pci/au88x0/au88x0_wt.h
+++ b/sound/pci/au88x0/au88x0_wt.h
@@ -53,11 +53,11 @@ enum {
53#endif 53#endif
54 54
55typedef struct { 55typedef struct {
56 unsigned int parm0; /* this_1E4 */ 56 u32 parm0; /* this_1E4 */
57 unsigned int parm1; /* this_1E8 */ 57 u32 parm1; /* this_1E8 */
58 unsigned int parm2; /* this_1EC */ 58 u32 parm2; /* this_1EC */
59 unsigned int parm3; /* this_1F0 */ 59 u32 parm3; /* this_1F0 */
60 unsigned int this_1D0; 60 u32 this_1D0;
61} wt_voice_t; 61} wt_voice_t;
62 62
63#endif /* _AU88X0_WT_H */ 63#endif /* _AU88X0_WT_H */
diff --git a/sound/pci/au88x0/au88x0_xtalk.c b/sound/pci/au88x0/au88x0_xtalk.c
index df915fa3f88d..4534e1882ada 100644
--- a/sound/pci/au88x0/au88x0_xtalk.c
+++ b/sound/pci/au88x0/au88x0_xtalk.c
@@ -562,7 +562,7 @@ static void
562vortex_XtalkHw_SetDelay(vortex_t * vortex, unsigned short right, 562vortex_XtalkHw_SetDelay(vortex_t * vortex, unsigned short right,
563 unsigned short left) 563 unsigned short left)
564{ 564{
565 int esp0 = 0; 565 u32 esp0 = 0;
566 566
567 esp0 &= 0x1FFFFFFF; 567 esp0 &= 0x1FFFFFFF;
568 esp0 |= 0xA0000000; 568 esp0 |= 0xA0000000;
@@ -632,18 +632,18 @@ static void vortex_XtalkHw_GetRightDline(vortex_t * vortex, xtalk_dline_t dline)
632/* Control/Global stuff */ 632/* Control/Global stuff */
633 633
634#if 0 634#if 0
635static void vortex_XtalkHw_SetControlReg(vortex_t * vortex, unsigned long ctrl) 635static void vortex_XtalkHw_SetControlReg(vortex_t * vortex, u32 ctrl)
636{ 636{
637 hwwrite(vortex->mmio, 0x24660, ctrl); 637 hwwrite(vortex->mmio, 0x24660, ctrl);
638} 638}
639static void vortex_XtalkHw_GetControlReg(vortex_t * vortex, unsigned long *ctrl) 639static void vortex_XtalkHw_GetControlReg(vortex_t * vortex, u32 *ctrl)
640{ 640{
641 *ctrl = hwread(vortex->mmio, 0x24660); 641 *ctrl = hwread(vortex->mmio, 0x24660);
642} 642}
643#endif 643#endif
644static void vortex_XtalkHw_SetSampleRate(vortex_t * vortex, int sr) 644static void vortex_XtalkHw_SetSampleRate(vortex_t * vortex, u32 sr)
645{ 645{
646 int temp; 646 u32 temp;
647 647
648 temp = (hwread(vortex->mmio, 0x24660) & 0x1FFFFFFF) | 0xC0000000; 648 temp = (hwread(vortex->mmio, 0x24660) & 0x1FFFFFFF) | 0xC0000000;
649 temp = (temp & 0xffffff07) | ((sr & 0x1f) << 3); 649 temp = (temp & 0xffffff07) | ((sr & 0x1f) << 3);
@@ -651,7 +651,7 @@ static void vortex_XtalkHw_SetSampleRate(vortex_t * vortex, int sr)
651} 651}
652 652
653#if 0 653#if 0
654static void vortex_XtalkHw_GetSampleRate(vortex_t * vortex, int *sr) 654static void vortex_XtalkHw_GetSampleRate(vortex_t * vortex, u32 *sr)
655{ 655{
656 *sr = (hwread(vortex->mmio, 0x24660) >> 3) & 0x1f; 656 *sr = (hwread(vortex->mmio, 0x24660) >> 3) & 0x1f;
657} 657}
@@ -659,7 +659,7 @@ static void vortex_XtalkHw_GetSampleRate(vortex_t * vortex, int *sr)
659#endif 659#endif
660static void vortex_XtalkHw_Enable(vortex_t * vortex) 660static void vortex_XtalkHw_Enable(vortex_t * vortex)
661{ 661{
662 int temp; 662 u32 temp;
663 663
664 temp = (hwread(vortex->mmio, 0x24660) & 0x1FFFFFFF) | 0xC0000000; 664 temp = (hwread(vortex->mmio, 0x24660) & 0x1FFFFFFF) | 0xC0000000;
665 temp |= 1; 665 temp |= 1;
@@ -669,7 +669,7 @@ static void vortex_XtalkHw_Enable(vortex_t * vortex)
669 669
670static void vortex_XtalkHw_Disable(vortex_t * vortex) 670static void vortex_XtalkHw_Disable(vortex_t * vortex)
671{ 671{
672 int temp; 672 u32 temp;
673 673
674 temp = (hwread(vortex->mmio, 0x24660) & 0x1FFFFFFF) | 0xC0000000; 674 temp = (hwread(vortex->mmio, 0x24660) & 0x1FFFFFFF) | 0xC0000000;
675 temp &= 0xfffffffe; 675 temp &= 0xfffffffe;
diff --git a/sound/pci/au88x0/au88x0_xtalk.h b/sound/pci/au88x0/au88x0_xtalk.h
index 0b8d7b64012d..7f4534b94d00 100644
--- a/sound/pci/au88x0/au88x0_xtalk.h
+++ b/sound/pci/au88x0/au88x0_xtalk.h
@@ -39,16 +39,16 @@
39#define XT_SPEAKER1 3 39#define XT_SPEAKER1 3
40#define XT_DIAMOND 4 40#define XT_DIAMOND 4
41 41
42typedef long xtalk_dline_t[XTDLINE_SZ]; 42typedef u32 xtalk_dline_t[XTDLINE_SZ];
43typedef short xtalk_gains_t[XTGAINS_SZ]; 43typedef u16 xtalk_gains_t[XTGAINS_SZ];
44typedef short xtalk_instate_t[XTINST_SZ]; 44typedef u16 xtalk_instate_t[XTINST_SZ];
45typedef short xtalk_coefs_t[5][5]; 45typedef u16 xtalk_coefs_t[5][5];
46typedef short xtalk_state_t[5][4]; 46typedef u16 xtalk_state_t[5][4];
47 47
48static void vortex_XtalkHw_SetGains(vortex_t * vortex, 48static void vortex_XtalkHw_SetGains(vortex_t * vortex,
49 xtalk_gains_t const gains); 49 xtalk_gains_t const gains);
50static void vortex_XtalkHw_SetGainsAllChan(vortex_t * vortex); 50static void vortex_XtalkHw_SetGainsAllChan(vortex_t * vortex);
51static void vortex_XtalkHw_SetSampleRate(vortex_t * vortex, int sr); 51static void vortex_XtalkHw_SetSampleRate(vortex_t * vortex, u32 sr);
52static void vortex_XtalkHw_ProgramPipe(vortex_t * vortex); 52static void vortex_XtalkHw_ProgramPipe(vortex_t * vortex);
53static void vortex_XtalkHw_ProgramPipe(vortex_t * vortex); 53static void vortex_XtalkHw_ProgramPipe(vortex_t * vortex);
54static void vortex_XtalkHw_ProgramXtalkWide(vortex_t * vortex); 54static void vortex_XtalkHw_ProgramXtalkWide(vortex_t * vortex);