diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-01-13 11:16:29 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 04:23:32 -0500 |
commit | 97c67b65cbdfd19887450ae1b80ddbb54de9559d (patch) | |
tree | ad92dc802a5146c8b86e2333118f0fc394dddcfb /sound/pci/au88x0/au88x0_eq.c | |
parent | 7a6c8ff1ef83df4ce44b586999e54966d8e5bda8 (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>
Diffstat (limited to 'sound/pci/au88x0/au88x0_eq.c')
-rw-r--r-- | sound/pci/au88x0/au88x0_eq.c | 31 |
1 files changed, 15 insertions, 16 deletions
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 */ |
380 | static void vortex_EqHw_SetControlReg(vortex_t * vortex, unsigned long reg) | 380 | static 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 | ||
385 | static void vortex_EqHw_SetSampleRate(vortex_t * vortex, int sr) | 385 | static 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 |
391 | static void vortex_EqHw_GetControlReg(vortex_t * vortex, unsigned long *reg) | 391 | static 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 | ||
396 | static void vortex_EqHw_GetSampleRate(vortex_t * vortex, int *sr) | 396 | static 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 |
556 | static int | 556 | static int |
557 | vortex_Eqlzr_GetAllBands(vortex_t * vortex, u16 * gains, unsigned long *cnt) | 557 | vortex_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 | ||
588 | static int | 588 | static int |
589 | vortex_Eqlzr_SetAllBands(vortex_t * vortex, u16 gains[], unsigned long count) | 589 | vortex_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 | ||
606 | static void | 606 | static void |
607 | vortex_Eqlzr_SetA3dBypassGain(vortex_t * vortex, unsigned long a, | 607 | vortex_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, | |||
624 | static void vortex_Eqlzr_ProgramA3dBypassGain(vortex_t * vortex) | 623 | static 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 | ||
644 | static void vortex_Eqlzr_SetBypass(vortex_t * vortex, long bp) | 643 | static 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); |