Lines Matching refs:vortex
51 static void vortex_EqHw_SetTimeConsts(vortex_t * vortex, u16 gain, u16 level) in vortex_EqHw_SetTimeConsts() argument
53 hwwrite(vortex->mmio, 0x2b3c4, gain); in vortex_EqHw_SetTimeConsts()
54 hwwrite(vortex->mmio, 0x2b3c8, level); in vortex_EqHw_SetTimeConsts()
66 static void vortex_EqHw_SetLeftCoefs(vortex_t * vortex, u16 coefs[]) in vortex_EqHw_SetLeftCoefs() argument
68 eqhw_t *eqhw = &(vortex->eq.this04); in vortex_EqHw_SetLeftCoefs()
72 hwwrite(vortex->mmio, 0x2b000 + n * 0x30, coefs[i + 0]); in vortex_EqHw_SetLeftCoefs()
73 hwwrite(vortex->mmio, 0x2b004 + n * 0x30, coefs[i + 1]); in vortex_EqHw_SetLeftCoefs()
76 hwwrite(vortex->mmio, 0x2b008 + n * 0x30, coefs[i + 2]); in vortex_EqHw_SetLeftCoefs()
77 hwwrite(vortex->mmio, 0x2b00c + n * 0x30, coefs[i + 3]); in vortex_EqHw_SetLeftCoefs()
78 hwwrite(vortex->mmio, 0x2b010 + n * 0x30, coefs[i + 4]); in vortex_EqHw_SetLeftCoefs()
80 hwwrite(vortex->mmio, 0x2b008 + n * 0x30, sign_invert(coefs[2 + i])); in vortex_EqHw_SetLeftCoefs()
81 hwwrite(vortex->mmio, 0x2b00c + n * 0x30, sign_invert(coefs[3 + i])); in vortex_EqHw_SetLeftCoefs()
82 hwwrite(vortex->mmio, 0x2b010 + n * 0x30, sign_invert(coefs[4 + i])); in vortex_EqHw_SetLeftCoefs()
88 static void vortex_EqHw_SetRightCoefs(vortex_t * vortex, u16 coefs[]) in vortex_EqHw_SetRightCoefs() argument
90 eqhw_t *eqhw = &(vortex->eq.this04); in vortex_EqHw_SetRightCoefs()
94 hwwrite(vortex->mmio, 0x2b1e0 + n * 0x30, coefs[0 + i]); in vortex_EqHw_SetRightCoefs()
95 hwwrite(vortex->mmio, 0x2b1e4 + n * 0x30, coefs[1 + i]); in vortex_EqHw_SetRightCoefs()
98 hwwrite(vortex->mmio, 0x2b1e8 + n * 0x30, coefs[2 + i]); in vortex_EqHw_SetRightCoefs()
99 hwwrite(vortex->mmio, 0x2b1ec + n * 0x30, coefs[3 + i]); in vortex_EqHw_SetRightCoefs()
100 hwwrite(vortex->mmio, 0x2b1f0 + n * 0x30, coefs[4 + i]); in vortex_EqHw_SetRightCoefs()
102 hwwrite(vortex->mmio, 0x2b1e8 + n * 0x30, sign_invert(coefs[2 + i])); in vortex_EqHw_SetRightCoefs()
103 hwwrite(vortex->mmio, 0x2b1ec + n * 0x30, sign_invert(coefs[3 + i])); in vortex_EqHw_SetRightCoefs()
104 hwwrite(vortex->mmio, 0x2b1f0 + n * 0x30, sign_invert(coefs[4 + i])); in vortex_EqHw_SetRightCoefs()
111 static void vortex_EqHw_SetLeftStates(vortex_t * vortex, u16 a[], u16 b[]) in vortex_EqHw_SetLeftStates() argument
113 eqhw_t *eqhw = &(vortex->eq.this04); in vortex_EqHw_SetLeftStates()
116 hwwrite(vortex->mmio, 0x2b3fc, a[0]); in vortex_EqHw_SetLeftStates()
117 hwwrite(vortex->mmio, 0x2b400, a[1]); in vortex_EqHw_SetLeftStates()
120 hwwrite(vortex->mmio, 0x2b014 + (i * 0xc), b[i]); in vortex_EqHw_SetLeftStates()
121 hwwrite(vortex->mmio, 0x2b018 + (i * 0xc), b[1 + i]); in vortex_EqHw_SetLeftStates()
122 hwwrite(vortex->mmio, 0x2b01c + (i * 0xc), b[2 + i]); in vortex_EqHw_SetLeftStates()
123 hwwrite(vortex->mmio, 0x2b020 + (i * 0xc), b[3 + i]); in vortex_EqHw_SetLeftStates()
128 static void vortex_EqHw_SetRightStates(vortex_t * vortex, u16 a[], u16 b[]) in vortex_EqHw_SetRightStates() argument
130 eqhw_t *eqhw = &(vortex->eq.this04); in vortex_EqHw_SetRightStates()
133 hwwrite(vortex->mmio, 0x2b404, a[0]); in vortex_EqHw_SetRightStates()
134 hwwrite(vortex->mmio, 0x2b408, a[1]); in vortex_EqHw_SetRightStates()
137 hwwrite(vortex->mmio, 0x2b1f4 + (i * 0xc), b[i]); in vortex_EqHw_SetRightStates()
138 hwwrite(vortex->mmio, 0x2b1f8 + (i * 0xc), b[1 + i]); in vortex_EqHw_SetRightStates()
139 hwwrite(vortex->mmio, 0x2b1fc + (i * 0xc), b[2 + i]); in vortex_EqHw_SetRightStates()
140 hwwrite(vortex->mmio, 0x2b200 + (i * 0xc), b[3 + i]); in vortex_EqHw_SetRightStates()
146 static void vortex_EqHw_GetTimeConsts(vortex_t * vortex, u16 * a, u16 * b)
148 *a = hwread(vortex->mmio, 0x2b3c4);
149 *b = hwread(vortex->mmio, 0x2b3c8);
152 static void vortex_EqHw_GetLeftCoefs(vortex_t * vortex, u16 a[])
157 static void vortex_EqHw_GetRightCoefs(vortex_t * vortex, u16 a[])
162 static void vortex_EqHw_GetLeftStates(vortex_t * vortex, u16 * a, u16 b[])
167 static void vortex_EqHw_GetRightStates(vortex_t * vortex, u16 * a, u16 b[])
174 static void vortex_EqHw_SetBypassGain(vortex_t * vortex, u16 a, u16 b) in vortex_EqHw_SetBypassGain() argument
176 eqhw_t *eqhw = &(vortex->eq.this04); in vortex_EqHw_SetBypassGain()
178 hwwrite(vortex->mmio, 0x2b3d4, a); in vortex_EqHw_SetBypassGain()
179 hwwrite(vortex->mmio, 0x2b3ec, b); in vortex_EqHw_SetBypassGain()
181 hwwrite(vortex->mmio, 0x2b3d4, sign_invert(a)); in vortex_EqHw_SetBypassGain()
182 hwwrite(vortex->mmio, 0x2b3ec, sign_invert(b)); in vortex_EqHw_SetBypassGain()
186 static void vortex_EqHw_SetA3DBypassGain(vortex_t * vortex, u16 a, u16 b) in vortex_EqHw_SetA3DBypassGain() argument
189 hwwrite(vortex->mmio, 0x2b3e0, a); in vortex_EqHw_SetA3DBypassGain()
190 hwwrite(vortex->mmio, 0x2b3f8, b); in vortex_EqHw_SetA3DBypassGain()
194 static void vortex_EqHw_SetCurrBypassGain(vortex_t * vortex, u16 a, u16 b)
197 hwwrite(vortex->mmio, 0x2b3d0, a);
198 hwwrite(vortex->mmio, 0x2b3e8, b);
201 static void vortex_EqHw_SetCurrA3DBypassGain(vortex_t * vortex, u16 a, u16 b)
204 hwwrite(vortex->mmio, 0x2b3dc, a);
205 hwwrite(vortex->mmio, 0x2b3f4, b);
210 vortex_EqHw_SetLeftGainsSingleTarget(vortex_t * vortex, u16 index, u16 b) in vortex_EqHw_SetLeftGainsSingleTarget() argument
212 hwwrite(vortex->mmio, 0x2b02c + (index * 0x30), b); in vortex_EqHw_SetLeftGainsSingleTarget()
216 vortex_EqHw_SetRightGainsSingleTarget(vortex_t * vortex, u16 index, u16 b) in vortex_EqHw_SetRightGainsSingleTarget() argument
218 hwwrite(vortex->mmio, 0x2b20c + (index * 0x30), b); in vortex_EqHw_SetRightGainsSingleTarget()
221 static void vortex_EqHw_SetLeftGainsTarget(vortex_t * vortex, u16 a[]) in vortex_EqHw_SetLeftGainsTarget() argument
223 eqhw_t *eqhw = &(vortex->eq.this04); in vortex_EqHw_SetLeftGainsTarget()
227 hwwrite(vortex->mmio, 0x2b02c + ebx * 0x30, a[ebx]); in vortex_EqHw_SetLeftGainsTarget()
231 static void vortex_EqHw_SetRightGainsTarget(vortex_t * vortex, u16 a[]) in vortex_EqHw_SetRightGainsTarget() argument
233 eqhw_t *eqhw = &(vortex->eq.this04); in vortex_EqHw_SetRightGainsTarget()
237 hwwrite(vortex->mmio, 0x2b20c + ebx * 0x30, a[ebx]); in vortex_EqHw_SetRightGainsTarget()
241 static void vortex_EqHw_SetLeftGainsCurrent(vortex_t * vortex, u16 a[]) in vortex_EqHw_SetLeftGainsCurrent() argument
243 eqhw_t *eqhw = &(vortex->eq.this04); in vortex_EqHw_SetLeftGainsCurrent()
247 hwwrite(vortex->mmio, 0x2b028 + ebx * 0x30, a[ebx]); in vortex_EqHw_SetLeftGainsCurrent()
251 static void vortex_EqHw_SetRightGainsCurrent(vortex_t * vortex, u16 a[]) in vortex_EqHw_SetRightGainsCurrent() argument
253 eqhw_t *eqhw = &(vortex->eq.this04); in vortex_EqHw_SetRightGainsCurrent()
257 hwwrite(vortex->mmio, 0x2b208 + ebx * 0x30, a[ebx]); in vortex_EqHw_SetRightGainsCurrent()
262 static void vortex_EqHw_GetLeftGainsTarget(vortex_t * vortex, u16 a[])
264 eqhw_t *eqhw = &(vortex->eq.this04);
271 a[ebx] = hwread(vortex->mmio, 0x2b02c + ebx * 0x30);
277 static void vortex_EqHw_GetRightGainsTarget(vortex_t * vortex, u16 a[])
279 eqhw_t *eqhw = &(vortex->eq.this04);
286 a[ebx] = hwread(vortex->mmio, 0x2b20c + ebx * 0x30);
292 static void vortex_EqHw_GetLeftGainsCurrent(vortex_t * vortex, u16 a[])
294 eqhw_t *eqhw = &(vortex->eq.this04);
301 a[ebx] = hwread(vortex->mmio, 0x2b028 + ebx * 0x30);
307 static void vortex_EqHw_GetRightGainsCurrent(vortex_t * vortex, u16 a[])
309 eqhw_t *eqhw = &(vortex->eq.this04);
316 a[ebx] = hwread(vortex->mmio, 0x2b208 + ebx * 0x30);
324 static void vortex_EqHw_SetLevels(vortex_t * vortex, u16 peaks[]) in vortex_EqHw_SetLevels() argument
326 eqhw_t *eqhw = &(vortex->eq.this04); in vortex_EqHw_SetLevels()
331 hwwrite(vortex->mmio, 0x2b024 + i * VORTEX_BAND_COEFF_SIZE, peaks[i]); in vortex_EqHw_SetLevels()
334 hwwrite(vortex->mmio, 0x2b3cc, peaks[eqhw->this04]); in vortex_EqHw_SetLevels()
335 hwwrite(vortex->mmio, 0x2b3d8, peaks[eqhw->this04 + 1]); in vortex_EqHw_SetLevels()
339 hwwrite(vortex->mmio, 0x2b204 + i * VORTEX_BAND_COEFF_SIZE, in vortex_EqHw_SetLevels()
343 hwwrite(vortex->mmio, 0x2b3e4, peaks[2 + (eqhw->this04 * 2)]); in vortex_EqHw_SetLevels()
344 hwwrite(vortex->mmio, 0x2b3f0, peaks[3 + (eqhw->this04 * 2)]); in vortex_EqHw_SetLevels()
348 static void vortex_EqHw_GetLevels(vortex_t * vortex, u16 a[])
350 eqhw_t *eqhw = &(vortex->eq.this04);
358 a[ebx] = hwread(vortex->mmio, 0x2b024 + ebx * 0x30);
363 a[eqhw->this04] = hwread(vortex->mmio, 0x2b3cc);
364 a[eqhw->this04 + 1] = hwread(vortex->mmio, 0x2b3d8);
369 hwread(vortex->mmio, 0x2b204 + ebx * 0x30);
374 a[2 + (eqhw->this04 * 2)] = hwread(vortex->mmio, 0x2b3e4);
375 a[3 + (eqhw->this04 * 2)] = hwread(vortex->mmio, 0x2b3f0);
380 static void vortex_EqHw_SetControlReg(vortex_t * vortex, u32 reg) in vortex_EqHw_SetControlReg() argument
382 hwwrite(vortex->mmio, 0x2b440, reg); in vortex_EqHw_SetControlReg()
385 static void vortex_EqHw_SetSampleRate(vortex_t * vortex, u32 sr) in vortex_EqHw_SetSampleRate() argument
387 hwwrite(vortex->mmio, 0x2b440, ((sr & 0x1f) << 3) | 0xb800); in vortex_EqHw_SetSampleRate()
391 static void vortex_EqHw_GetControlReg(vortex_t * vortex, u32 *reg)
393 *reg = hwread(vortex->mmio, 0x2b440);
396 static void vortex_EqHw_GetSampleRate(vortex_t * vortex, u32 *sr)
398 *sr = (hwread(vortex->mmio, 0x2b440) >> 3) & 0x1f;
402 static void vortex_EqHw_Enable(vortex_t * vortex) in vortex_EqHw_Enable() argument
404 hwwrite(vortex->mmio, VORTEX_EQ_CTRL, 0xf001); in vortex_EqHw_Enable()
407 static void vortex_EqHw_Disable(vortex_t * vortex) in vortex_EqHw_Disable() argument
409 hwwrite(vortex->mmio, VORTEX_EQ_CTRL, 0xf000); in vortex_EqHw_Disable()
413 static void vortex_EqHw_ZeroIO(vortex_t * vortex) in vortex_EqHw_ZeroIO() argument
417 hwwrite(vortex->mmio, VORTEX_EQ_DEST + (i << 2), 0x0); in vortex_EqHw_ZeroIO()
419 hwwrite(vortex->mmio, VORTEX_EQ_SOURCE + (i << 2), 0x0); in vortex_EqHw_ZeroIO()
422 static void vortex_EqHw_ZeroA3DIO(vortex_t * vortex) in vortex_EqHw_ZeroA3DIO() argument
426 hwwrite(vortex->mmio, VORTEX_EQ_DEST + (i << 2), 0x0); in vortex_EqHw_ZeroA3DIO()
429 static void vortex_EqHw_ZeroState(vortex_t * vortex) in vortex_EqHw_ZeroState() argument
432 vortex_EqHw_SetControlReg(vortex, 0); in vortex_EqHw_ZeroState()
433 vortex_EqHw_ZeroIO(vortex); in vortex_EqHw_ZeroState()
434 hwwrite(vortex->mmio, 0x2b3c0, 0); in vortex_EqHw_ZeroState()
436 vortex_EqHw_SetTimeConsts(vortex, 0, 0); in vortex_EqHw_ZeroState()
438 vortex_EqHw_SetLeftCoefs(vortex, asEqCoefsZeros); in vortex_EqHw_ZeroState()
439 vortex_EqHw_SetRightCoefs(vortex, asEqCoefsZeros); in vortex_EqHw_ZeroState()
441 vortex_EqHw_SetLeftGainsCurrent(vortex, eq_gains_zero); in vortex_EqHw_ZeroState()
442 vortex_EqHw_SetRightGainsCurrent(vortex, eq_gains_zero); in vortex_EqHw_ZeroState()
443 vortex_EqHw_SetLeftGainsTarget(vortex, eq_gains_zero); in vortex_EqHw_ZeroState()
444 vortex_EqHw_SetRightGainsTarget(vortex, eq_gains_zero); in vortex_EqHw_ZeroState()
446 vortex_EqHw_SetBypassGain(vortex, 0, 0); in vortex_EqHw_ZeroState()
448 vortex_EqHw_SetA3DBypassGain(vortex, 0, 0); in vortex_EqHw_ZeroState()
450 vortex_EqHw_SetLeftStates(vortex, eq_states_zero, asEqOutStateZeros); in vortex_EqHw_ZeroState()
451 vortex_EqHw_SetRightStates(vortex, eq_states_zero, asEqOutStateZeros); in vortex_EqHw_ZeroState()
452 vortex_EqHw_SetLevels(vortex, (u16 *) eq_levels); in vortex_EqHw_ZeroState()
456 static void vortex_EqHw_ProgramPipe(vortex_t * vortex) in vortex_EqHw_ProgramPipe() argument
458 vortex_EqHw_SetTimeConsts(vortex, 0, 0); in vortex_EqHw_ProgramPipe()
460 vortex_EqHw_SetLeftCoefs(vortex, asEqCoefsPipes); in vortex_EqHw_ProgramPipe()
461 vortex_EqHw_SetRightCoefs(vortex, asEqCoefsPipes); in vortex_EqHw_ProgramPipe()
463 vortex_EqHw_SetLeftGainsCurrent(vortex, eq_gains_current); in vortex_EqHw_ProgramPipe()
464 vortex_EqHw_SetRightGainsCurrent(vortex, eq_gains_current); in vortex_EqHw_ProgramPipe()
465 vortex_EqHw_SetLeftGainsTarget(vortex, eq_gains_current); in vortex_EqHw_ProgramPipe()
466 vortex_EqHw_SetRightGainsTarget(vortex, eq_gains_current); in vortex_EqHw_ProgramPipe()
471 vortex_EqHw_Program10Band(vortex_t * vortex, auxxEqCoeffSet_t * coefset) in vortex_EqHw_Program10Band() argument
474 vortex_EqHw_SetTimeConsts(vortex, 0xc, 0x7fe0); in vortex_EqHw_Program10Band()
476 vortex_EqHw_SetLeftCoefs(vortex, coefset->LeftCoefs); in vortex_EqHw_Program10Band()
477 vortex_EqHw_SetRightCoefs(vortex, coefset->RightCoefs); in vortex_EqHw_Program10Band()
479 vortex_EqHw_SetLeftGainsCurrent(vortex, coefset->LeftGains); in vortex_EqHw_Program10Band()
481 vortex_EqHw_SetRightGainsTarget(vortex, coefset->RightGains); in vortex_EqHw_Program10Band()
482 vortex_EqHw_SetLeftGainsTarget(vortex, coefset->LeftGains); in vortex_EqHw_Program10Band()
484 vortex_EqHw_SetRightGainsCurrent(vortex, coefset->RightGains); in vortex_EqHw_Program10Band()
488 static void vortex_EqHw_GetTenBandLevels(vortex_t * vortex, u16 peaks[]) in vortex_EqHw_GetTenBandLevels() argument
490 eqhw_t *eqhw = &(vortex->eq.this04); in vortex_EqHw_GetTenBandLevels()
497 peaks[i] = hwread(vortex->mmio, 0x2B024 + i * 0x30); in vortex_EqHw_GetTenBandLevels()
500 hwread(vortex->mmio, 0x2B204 + i * 0x30); in vortex_EqHw_GetTenBandLevels()
505 static int vortex_Eqlzr_GetLeftGain(vortex_t * vortex, u16 index, u16 * gain) in vortex_Eqlzr_GetLeftGain() argument
507 eqlzr_t *eq = &(vortex->eq); in vortex_Eqlzr_GetLeftGain()
516 static void vortex_Eqlzr_SetLeftGain(vortex_t * vortex, u16 index, u16 gain) in vortex_Eqlzr_SetLeftGain() argument
518 eqlzr_t *eq = &(vortex->eq); in vortex_Eqlzr_SetLeftGain()
527 vortex_EqHw_SetLeftGainsSingleTarget(vortex, index, gain); in vortex_Eqlzr_SetLeftGain()
530 static int vortex_Eqlzr_GetRightGain(vortex_t * vortex, u16 index, u16 * gain) in vortex_Eqlzr_GetRightGain() argument
532 eqlzr_t *eq = &(vortex->eq); in vortex_Eqlzr_GetRightGain()
541 static void vortex_Eqlzr_SetRightGain(vortex_t * vortex, u16 index, u16 gain) in vortex_Eqlzr_SetRightGain() argument
543 eqlzr_t *eq = &(vortex->eq); in vortex_Eqlzr_SetRightGain()
552 vortex_EqHw_SetRightGainsSingleTarget(vortex, index, gain); in vortex_Eqlzr_SetRightGain()
557 vortex_Eqlzr_GetAllBands(vortex_t * vortex, u16 * gains, s32 *cnt)
559 eqlzr_t *eq = &(vortex->eq);
566 if (vortex_Eqlzr_GetLeftGain(vortex, si, &gains[si]))
569 (vortex, si, &gains[si + eq->this10]))
578 static int vortex_Eqlzr_SetAllBandsFromActiveCoeffSet(vortex_t * vortex) in vortex_Eqlzr_SetAllBandsFromActiveCoeffSet() argument
580 eqlzr_t *eq = &(vortex->eq); in vortex_Eqlzr_SetAllBandsFromActiveCoeffSet()
582 vortex_EqHw_SetLeftGainsTarget(vortex, eq->this130); in vortex_Eqlzr_SetAllBandsFromActiveCoeffSet()
583 vortex_EqHw_SetRightGainsTarget(vortex, &(eq->this130[eq->this10])); in vortex_Eqlzr_SetAllBandsFromActiveCoeffSet()
589 vortex_Eqlzr_SetAllBands(vortex_t * vortex, u16 gains[], s32 count) in vortex_Eqlzr_SetAllBands() argument
591 eqlzr_t *eq = &(vortex->eq); in vortex_Eqlzr_SetAllBands()
603 return vortex_Eqlzr_SetAllBandsFromActiveCoeffSet(vortex); in vortex_Eqlzr_SetAllBands()
607 vortex_Eqlzr_SetA3dBypassGain(vortex_t * vortex, u32 a, u32 b) in vortex_Eqlzr_SetA3dBypassGain() argument
609 eqlzr_t *eq = &(vortex->eq); in vortex_Eqlzr_SetA3dBypassGain()
620 vortex_EqHw_SetA3DBypassGain(vortex, ebx, eax); in vortex_Eqlzr_SetA3dBypassGain()
623 static void vortex_Eqlzr_ProgramA3dBypassGain(vortex_t * vortex) in vortex_Eqlzr_ProgramA3dBypassGain() argument
625 eqlzr_t *eq = &(vortex->eq); in vortex_Eqlzr_ProgramA3dBypassGain()
634 vortex_EqHw_SetA3DBypassGain(vortex, ebx, eax); in vortex_Eqlzr_ProgramA3dBypassGain()
637 static void vortex_Eqlzr_ShutDownA3d(vortex_t * vortex) in vortex_Eqlzr_ShutDownA3d() argument
639 if (vortex != NULL) in vortex_Eqlzr_ShutDownA3d()
640 vortex_EqHw_ZeroA3DIO(vortex); in vortex_Eqlzr_ShutDownA3d()
643 static void vortex_Eqlzr_SetBypass(vortex_t * vortex, u32 bp) in vortex_Eqlzr_SetBypass() argument
645 eqlzr_t *eq = &(vortex->eq); in vortex_Eqlzr_SetBypass()
649 vortex_Eqlzr_SetAllBandsFromActiveCoeffSet(vortex); in vortex_Eqlzr_SetBypass()
650 vortex_EqHw_SetBypassGain(vortex, eq->this08, eq->this08); in vortex_Eqlzr_SetBypass()
653 vortex_EqHw_SetLeftGainsTarget(vortex, eq->this14_array); in vortex_Eqlzr_SetBypass()
654 vortex_EqHw_SetRightGainsTarget(vortex, eq->this14_array); in vortex_Eqlzr_SetBypass()
655 vortex_EqHw_SetBypassGain(vortex, eq->this0c, eq->this0c); in vortex_Eqlzr_SetBypass()
657 vortex_Eqlzr_ProgramA3dBypassGain(vortex); in vortex_Eqlzr_SetBypass()
660 static void vortex_Eqlzr_ReadAndSetActiveCoefSet(vortex_t * vortex) in vortex_Eqlzr_ReadAndSetActiveCoefSet() argument
662 eqlzr_t *eq = &(vortex->eq); in vortex_Eqlzr_ReadAndSetActiveCoefSet()
667 vortex_Eqlzr_SetAllBands(vortex, eq_gains_normal, eq->this10 * 2); in vortex_Eqlzr_ReadAndSetActiveCoefSet()
670 static int vortex_Eqlzr_GetAllPeaks(vortex_t * vortex, u16 * peaks, int *count) in vortex_Eqlzr_GetAllPeaks() argument
672 eqlzr_t *eq = &(vortex->eq); in vortex_Eqlzr_GetAllPeaks()
677 vortex_EqHw_GetTenBandLevels(vortex, peaks); in vortex_Eqlzr_GetAllPeaks()
682 static auxxEqCoeffSet_t *vortex_Eqlzr_GetActiveCoefSet(vortex_t * vortex)
684 eqlzr_t *eq = &(vortex->eq);
689 static void vortex_Eqlzr_init(vortex_t * vortex) in vortex_Eqlzr_init() argument
691 eqlzr_t *eq = &(vortex->eq); in vortex_Eqlzr_init()
711 vortex_EqHw_ZeroState(vortex); in vortex_Eqlzr_init()
712 vortex_EqHw_SetSampleRate(vortex, 0x11); in vortex_Eqlzr_init()
713 vortex_Eqlzr_ReadAndSetActiveCoefSet(vortex); in vortex_Eqlzr_init()
715 vortex_EqHw_Program10Band(vortex, &(eq->coefset)); in vortex_Eqlzr_init()
716 vortex_Eqlzr_SetBypass(vortex, eq->this54); in vortex_Eqlzr_init()
717 vortex_Eqlzr_SetA3dBypassGain(vortex, 0, 0); in vortex_Eqlzr_init()
718 vortex_EqHw_Enable(vortex); in vortex_Eqlzr_init()
721 static void vortex_Eqlzr_shutdown(vortex_t * vortex) in vortex_Eqlzr_shutdown() argument
723 vortex_Eqlzr_ShutDownA3d(vortex); in vortex_Eqlzr_shutdown()
724 vortex_EqHw_ProgramPipe(vortex); in vortex_Eqlzr_shutdown()
725 vortex_EqHw_Disable(vortex); in vortex_Eqlzr_shutdown()
737 vortex_t *vortex = snd_kcontrol_chip(kcontrol); in snd_vortex_eqtoggle_get() local
738 eqlzr_t *eq = &(vortex->eq); in snd_vortex_eqtoggle_get()
750 vortex_t *vortex = snd_kcontrol_chip(kcontrol); in snd_vortex_eqtoggle_put() local
751 eqlzr_t *eq = &(vortex->eq); in snd_vortex_eqtoggle_put()
755 vortex_Eqlzr_SetBypass(vortex, eq->this54); in snd_vortex_eqtoggle_put()
784 vortex_t *vortex = snd_kcontrol_chip(kcontrol); in snd_vortex_eq_get() local
788 vortex_Eqlzr_GetLeftGain(vortex, i, &gainL); in snd_vortex_eq_get()
789 vortex_Eqlzr_GetRightGain(vortex, i, &gainR); in snd_vortex_eq_get()
798 vortex_t *vortex = snd_kcontrol_chip(kcontrol); in snd_vortex_eq_put() local
802 vortex_Eqlzr_GetLeftGain(vortex, i, &gainL); in snd_vortex_eq_put()
803 vortex_Eqlzr_GetRightGain(vortex, i, &gainR); in snd_vortex_eq_put()
806 vortex_Eqlzr_SetLeftGain(vortex, i, in snd_vortex_eq_put()
811 vortex_Eqlzr_SetRightGain(vortex, i, in snd_vortex_eq_put()
842 vortex_t *vortex = snd_kcontrol_chip(kcontrol); in snd_vortex_peaks_get() local
846 vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count); in snd_vortex_peaks_get()
880 static int __devinit vortex_eq_init(vortex_t * vortex) in vortex_eq_init() argument
885 vortex_Eqlzr_init(vortex); in vortex_eq_init()
888 snd_ctl_new1(&vortex_eqtoggle_kcontrol, vortex)) == NULL) in vortex_eq_init()
891 if ((err = snd_ctl_add(vortex->card, kcontrol)) < 0) in vortex_eq_init()
897 snd_ctl_new1(&vortex_eq_kcontrol, vortex)) == NULL) in vortex_eq_init()
902 if ((err = snd_ctl_add(vortex->card, kcontrol)) < 0) in vortex_eq_init()
907 if ((kcontrol = snd_ctl_new1(&vortex_levels_kcontrol, vortex)) == NULL) in vortex_eq_init()
909 if ((err = snd_ctl_add(vortex->card, kcontrol)) < 0) in vortex_eq_init()
915 static int vortex_eq_free(vortex_t * vortex) in vortex_eq_free() argument
925 vortex_Eqlzr_shutdown(vortex); in vortex_eq_free()