aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/au88x0/au88x0_eq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/au88x0/au88x0_eq.c')
-rw-r--r--sound/pci/au88x0/au88x0_eq.c31
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 */
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);