Lines Matching +full:0 +full:xf001

31 #define VORTEX_EQ_BASE	 0x2b000
32 #define VORTEX_EQ_DEST (VORTEX_EQ_BASE + 0x410)
33 #define VORTEX_EQ_SOURCE (VORTEX_EQ_BASE + 0x430)
34 #define VORTEX_EQ_CTRL (VORTEX_EQ_BASE + 0x440)
36 #define VORTEX_BAND_COEFF_SIZE 0x30
41 hwwrite(vortex->mmio, 0x2b3c4, gain); in vortex_EqHw_SetTimeConsts()
42 hwwrite(vortex->mmio, 0x2b3c8, level); in vortex_EqHw_SetTimeConsts()
57 int i = 0, n /*esp2c */; in vortex_EqHw_SetLeftCoefs()
59 for (n = 0; n < eqhw->this04; n++) { in vortex_EqHw_SetLeftCoefs()
60 hwwrite(vortex->mmio, 0x2b000 + n * 0x30, coefs[i + 0]); in vortex_EqHw_SetLeftCoefs()
61 hwwrite(vortex->mmio, 0x2b004 + n * 0x30, coefs[i + 1]); in vortex_EqHw_SetLeftCoefs()
63 if (eqhw->this08 == 0) { in vortex_EqHw_SetLeftCoefs()
64 hwwrite(vortex->mmio, 0x2b008 + n * 0x30, coefs[i + 2]); in vortex_EqHw_SetLeftCoefs()
65 hwwrite(vortex->mmio, 0x2b00c + n * 0x30, coefs[i + 3]); in vortex_EqHw_SetLeftCoefs()
66 hwwrite(vortex->mmio, 0x2b010 + n * 0x30, coefs[i + 4]); in vortex_EqHw_SetLeftCoefs()
68 hwwrite(vortex->mmio, 0x2b008 + n * 0x30, sign_invert(coefs[2 + i])); in vortex_EqHw_SetLeftCoefs()
69 hwwrite(vortex->mmio, 0x2b00c + n * 0x30, sign_invert(coefs[3 + i])); in vortex_EqHw_SetLeftCoefs()
70 hwwrite(vortex->mmio, 0x2b010 + n * 0x30, sign_invert(coefs[4 + i])); in vortex_EqHw_SetLeftCoefs()
79 int i = 0, n /*esp2c */; in vortex_EqHw_SetRightCoefs()
81 for (n = 0; n < eqhw->this04; n++) { in vortex_EqHw_SetRightCoefs()
82 hwwrite(vortex->mmio, 0x2b1e0 + n * 0x30, coefs[0 + i]); in vortex_EqHw_SetRightCoefs()
83 hwwrite(vortex->mmio, 0x2b1e4 + n * 0x30, coefs[1 + i]); in vortex_EqHw_SetRightCoefs()
85 if (eqhw->this08 == 0) { in vortex_EqHw_SetRightCoefs()
86 hwwrite(vortex->mmio, 0x2b1e8 + n * 0x30, coefs[2 + i]); in vortex_EqHw_SetRightCoefs()
87 hwwrite(vortex->mmio, 0x2b1ec + n * 0x30, coefs[3 + i]); in vortex_EqHw_SetRightCoefs()
88 hwwrite(vortex->mmio, 0x2b1f0 + n * 0x30, coefs[4 + i]); in vortex_EqHw_SetRightCoefs()
90 hwwrite(vortex->mmio, 0x2b1e8 + n * 0x30, sign_invert(coefs[2 + i])); in vortex_EqHw_SetRightCoefs()
91 hwwrite(vortex->mmio, 0x2b1ec + n * 0x30, sign_invert(coefs[3 + i])); in vortex_EqHw_SetRightCoefs()
92 hwwrite(vortex->mmio, 0x2b1f0 + n * 0x30, sign_invert(coefs[4 + i])); in vortex_EqHw_SetRightCoefs()
102 int i = 0, ebx; in vortex_EqHw_SetLeftStates()
104 hwwrite(vortex->mmio, 0x2b3fc, a[0]); in vortex_EqHw_SetLeftStates()
105 hwwrite(vortex->mmio, 0x2b400, a[1]); in vortex_EqHw_SetLeftStates()
107 for (ebx = 0; ebx < eqhw->this04; ebx++) { in vortex_EqHw_SetLeftStates()
108 hwwrite(vortex->mmio, 0x2b014 + (i * 0xc), b[i]); in vortex_EqHw_SetLeftStates()
109 hwwrite(vortex->mmio, 0x2b018 + (i * 0xc), b[1 + i]); in vortex_EqHw_SetLeftStates()
110 hwwrite(vortex->mmio, 0x2b01c + (i * 0xc), b[2 + i]); in vortex_EqHw_SetLeftStates()
111 hwwrite(vortex->mmio, 0x2b020 + (i * 0xc), b[3 + i]); in vortex_EqHw_SetLeftStates()
119 int i = 0, ebx; in vortex_EqHw_SetRightStates()
121 hwwrite(vortex->mmio, 0x2b404, a[0]); in vortex_EqHw_SetRightStates()
122 hwwrite(vortex->mmio, 0x2b408, a[1]); in vortex_EqHw_SetRightStates()
124 for (ebx = 0; ebx < eqhw->this04; ebx++) { in vortex_EqHw_SetRightStates()
125 hwwrite(vortex->mmio, 0x2b1f4 + (i * 0xc), b[i]); in vortex_EqHw_SetRightStates()
126 hwwrite(vortex->mmio, 0x2b1f8 + (i * 0xc), b[1 + i]); in vortex_EqHw_SetRightStates()
127 hwwrite(vortex->mmio, 0x2b1fc + (i * 0xc), b[2 + i]); in vortex_EqHw_SetRightStates()
128 hwwrite(vortex->mmio, 0x2b200 + (i * 0xc), b[3 + i]); in vortex_EqHw_SetRightStates()
133 #if 0
136 *a = hwread(vortex->mmio, 0x2b3c4);
137 *b = hwread(vortex->mmio, 0x2b3c8);
165 if (eqhw->this08 == 0) { in vortex_EqHw_SetBypassGain()
166 hwwrite(vortex->mmio, 0x2b3d4, a); in vortex_EqHw_SetBypassGain()
167 hwwrite(vortex->mmio, 0x2b3ec, b); in vortex_EqHw_SetBypassGain()
169 hwwrite(vortex->mmio, 0x2b3d4, sign_invert(a)); in vortex_EqHw_SetBypassGain()
170 hwwrite(vortex->mmio, 0x2b3ec, sign_invert(b)); in vortex_EqHw_SetBypassGain()
177 hwwrite(vortex->mmio, 0x2b3e0, a); in vortex_EqHw_SetA3DBypassGain()
178 hwwrite(vortex->mmio, 0x2b3f8, b); in vortex_EqHw_SetA3DBypassGain()
181 #if 0
185 hwwrite(vortex->mmio, 0x2b3d0, a);
186 hwwrite(vortex->mmio, 0x2b3e8, b);
192 hwwrite(vortex->mmio, 0x2b3dc, a);
193 hwwrite(vortex->mmio, 0x2b3f4, b);
200 hwwrite(vortex->mmio, 0x2b02c + (index * 0x30), b); in vortex_EqHw_SetLeftGainsSingleTarget()
206 hwwrite(vortex->mmio, 0x2b20c + (index * 0x30), b); in vortex_EqHw_SetRightGainsSingleTarget()
214 for (ebx = 0; ebx < eqhw->this04; ebx++) { in vortex_EqHw_SetLeftGainsTarget()
215 hwwrite(vortex->mmio, 0x2b02c + ebx * 0x30, a[ebx]); in vortex_EqHw_SetLeftGainsTarget()
224 for (ebx = 0; ebx < eqhw->this04; ebx++) { in vortex_EqHw_SetRightGainsTarget()
225 hwwrite(vortex->mmio, 0x2b20c + ebx * 0x30, a[ebx]); in vortex_EqHw_SetRightGainsTarget()
234 for (ebx = 0; ebx < eqhw->this04; ebx++) { in vortex_EqHw_SetLeftGainsCurrent()
235 hwwrite(vortex->mmio, 0x2b028 + ebx * 0x30, a[ebx]); in vortex_EqHw_SetLeftGainsCurrent()
244 for (ebx = 0; ebx < eqhw->this04; ebx++) { in vortex_EqHw_SetRightGainsCurrent()
245 hwwrite(vortex->mmio, 0x2b208 + ebx * 0x30, a[ebx]); in vortex_EqHw_SetRightGainsCurrent()
249 #if 0
253 int ebx = 0;
255 if (eqhw->this04 < 0)
259 a[ebx] = hwread(vortex->mmio, 0x2b02c + ebx * 0x30);
268 int ebx = 0;
270 if (eqhw->this04 < 0)
274 a[ebx] = hwread(vortex->mmio, 0x2b20c + ebx * 0x30);
283 int ebx = 0;
285 if (eqhw->this04 < 0)
289 a[ebx] = hwread(vortex->mmio, 0x2b028 + ebx * 0x30);
298 int ebx = 0;
300 if (eqhw->this04 < 0)
304 a[ebx] = hwread(vortex->mmio, 0x2b208 + ebx * 0x30);
318 for (i = 0; i < eqhw->this04; i++) { in vortex_EqHw_SetLevels()
319 hwwrite(vortex->mmio, 0x2b024 + i * VORTEX_BAND_COEFF_SIZE, peaks[i]); in vortex_EqHw_SetLevels()
322 hwwrite(vortex->mmio, 0x2b3cc, peaks[eqhw->this04]); in vortex_EqHw_SetLevels()
323 hwwrite(vortex->mmio, 0x2b3d8, peaks[eqhw->this04 + 1]); in vortex_EqHw_SetLevels()
326 for (i = 0; i < eqhw->this04; i++) { in vortex_EqHw_SetLevels()
327 hwwrite(vortex->mmio, 0x2b204 + i * VORTEX_BAND_COEFF_SIZE, in vortex_EqHw_SetLevels()
331 hwwrite(vortex->mmio, 0x2b3e4, peaks[2 + (eqhw->this04 * 2)]); in vortex_EqHw_SetLevels()
332 hwwrite(vortex->mmio, 0x2b3f0, peaks[3 + (eqhw->this04 * 2)]); in vortex_EqHw_SetLevels()
335 #if 0
341 if (eqhw->this04 < 0)
344 ebx = 0;
346 a[ebx] = hwread(vortex->mmio, 0x2b024 + ebx * 0x30);
351 a[eqhw->this04] = hwread(vortex->mmio, 0x2b3cc);
352 a[eqhw->this04 + 1] = hwread(vortex->mmio, 0x2b3d8);
354 ebx = 0;
357 hwread(vortex->mmio, 0x2b204 + ebx * 0x30);
362 a[2 + (eqhw->this04 * 2)] = hwread(vortex->mmio, 0x2b3e4);
363 a[3 + (eqhw->this04 * 2)] = hwread(vortex->mmio, 0x2b3f0);
370 hwwrite(vortex->mmio, 0x2b440, reg); in vortex_EqHw_SetControlReg()
375 hwwrite(vortex->mmio, 0x2b440, ((sr & 0x1f) << 3) | 0xb800); in vortex_EqHw_SetSampleRate()
378 #if 0
381 *reg = hwread(vortex->mmio, 0x2b440);
386 *sr = (hwread(vortex->mmio, 0x2b440) >> 3) & 0x1f;
392 hwwrite(vortex->mmio, VORTEX_EQ_CTRL, 0xf001); in vortex_EqHw_Enable()
397 hwwrite(vortex->mmio, VORTEX_EQ_CTRL, 0xf000); in vortex_EqHw_Disable()
404 for (i = 0; i < 0x8; i++) in vortex_EqHw_ZeroIO()
405 hwwrite(vortex->mmio, VORTEX_EQ_DEST + (i << 2), 0x0); in vortex_EqHw_ZeroIO()
406 for (i = 0; i < 0x4; i++) in vortex_EqHw_ZeroIO()
407 hwwrite(vortex->mmio, VORTEX_EQ_SOURCE + (i << 2), 0x0); in vortex_EqHw_ZeroIO()
413 for (i = 0; i < 0x4; i++) in vortex_EqHw_ZeroA3DIO()
414 hwwrite(vortex->mmio, VORTEX_EQ_DEST + (i << 2), 0x0); in vortex_EqHw_ZeroA3DIO()
420 vortex_EqHw_SetControlReg(vortex, 0); in vortex_EqHw_ZeroState()
422 hwwrite(vortex->mmio, 0x2b3c0, 0); in vortex_EqHw_ZeroState()
424 vortex_EqHw_SetTimeConsts(vortex, 0, 0); in vortex_EqHw_ZeroState()
434 vortex_EqHw_SetBypassGain(vortex, 0, 0); in vortex_EqHw_ZeroState()
435 //vortex_EqHw_SetCurrBypassGain(vortex, 0, 0); in vortex_EqHw_ZeroState()
436 vortex_EqHw_SetA3DBypassGain(vortex, 0, 0); in vortex_EqHw_ZeroState()
437 //vortex_EqHw_SetCurrA3DBypassGain(vortex, 0, 0); in vortex_EqHw_ZeroState()
446 vortex_EqHw_SetTimeConsts(vortex, 0, 0); in vortex_EqHw_ProgramPipe()
462 vortex_EqHw_SetTimeConsts(vortex, 0xc, 0x7fe0); in vortex_EqHw_Program10Band()
481 if (eqhw->this04 <= 0) in vortex_EqHw_GetTenBandLevels()
484 for (i = 0; i < eqhw->this04; i++) in vortex_EqHw_GetTenBandLevels()
485 peaks[i] = hwread(vortex->mmio, 0x2B024 + i * 0x30); in vortex_EqHw_GetTenBandLevels()
486 for (i = 0; i < eqhw->this04; i++) in vortex_EqHw_GetTenBandLevels()
488 hwread(vortex->mmio, 0x2B204 + i * 0x30); in vortex_EqHw_GetTenBandLevels()
499 return 0; in vortex_Eqlzr_GetLeftGain()
508 if (eq->this28 == 0) in vortex_Eqlzr_SetLeftGain()
524 return 0; in vortex_Eqlzr_GetRightGain()
533 if (eq->this28 == 0) in vortex_Eqlzr_SetRightGain()
543 #if 0
548 int si = 0;
550 if (eq->this10 == 0)
563 return 0;
573 return 0; in vortex_Eqlzr_SetAllBandsFromActiveCoeffSet()
582 if (((eq->this10) * 2 != count) || (eq->this28 == 0)) in vortex_Eqlzr_SetAllBands()
585 for (i = 0; i < count; i++) { in vortex_Eqlzr_SetAllBands()
590 return 0; in vortex_Eqlzr_SetAllBands()
606 ebx = (eax * eq->this58) >> 0x10; in vortex_Eqlzr_SetA3dBypassGain()
607 eax = (eax * eq->this5c) >> 0x10; in vortex_Eqlzr_SetA3dBypassGain()
620 ebx = (eax * eq->this58) >> 0x10; in vortex_Eqlzr_ProgramA3dBypassGain()
621 eax = (eax * eq->this5c) >> 0x10; in vortex_Eqlzr_ProgramA3dBypassGain()
635 if ((eq->this28) && (bp == 0)) { in vortex_Eqlzr_SetBypass()
662 if (eq->this10 == 0) in vortex_Eqlzr_GetAllPeaks()
666 return 0; in vortex_Eqlzr_GetAllPeaks()
669 #if 0
682 //eq->this04 = 0; in vortex_Eqlzr_init()
683 eq->this08 = 0; /* Bypass gain with EQ in use. */ in vortex_Eqlzr_init()
684 eq->this0a = 0x5999; in vortex_Eqlzr_init()
685 eq->this0c = 0x5999; /* Bypass gain with EQ disabled. */ in vortex_Eqlzr_init()
686 eq->this0e = 0x5999; in vortex_Eqlzr_init()
688 eq->this10 = 0xa; /* 10 eq frequency bands. */ in vortex_Eqlzr_init()
690 eq->this28 = 0x1; /* if 1 => Allow read access to this130 (gains) */ in vortex_Eqlzr_init()
691 eq->this54 = 0x0; /* if 1 => Dont Allow access to hardware (gains) */ in vortex_Eqlzr_init()
692 eq->this58 = 0xffff; in vortex_Eqlzr_init()
693 eq->this5c = 0xffff; in vortex_Eqlzr_init()
696 memset(eq->this14_array, 0, sizeof(eq->this14_array)); in vortex_Eqlzr_init()
700 vortex_EqHw_SetSampleRate(vortex, 0x11); in vortex_Eqlzr_init()
705 vortex_Eqlzr_SetA3dBypassGain(vortex, 0, 0); in vortex_Eqlzr_init()
729 ucontrol->value.integer.value[0] = eq->this54 ? 0 : 1; in snd_vortex_eqtoggle_get()
731 return 0; in snd_vortex_eqtoggle_get()
742 eq->this54 = ucontrol->value.integer.value[0] ? 0 : 1; in snd_vortex_eqtoggle_put()
751 .index = 0,
753 .private_value = 0,
764 uinfo->value.integer.min = 0x0000; in snd_vortex_eq_info()
765 uinfo->value.integer.max = 0x7fff; in snd_vortex_eq_info()
766 return 0; in snd_vortex_eq_info()
774 u16 gainL = 0, gainR = 0; in snd_vortex_eq_get()
778 ucontrol->value.integer.value[0] = gainL; in snd_vortex_eq_get()
780 return 0; in snd_vortex_eq_get()
787 int changed = 0, i = kcontrol->private_value; in snd_vortex_eq_put()
788 u16 gainL = 0, gainR = 0; in snd_vortex_eq_put()
793 if (gainL != ucontrol->value.integer.value[0]) { in snd_vortex_eq_put()
795 ucontrol->value.integer.value[0]); in snd_vortex_eq_put()
809 .index = 0,
811 .private_value = 0,
822 uinfo->value.integer.min = 0x0000; in snd_vortex_peaks_info()
823 uinfo->value.integer.max = 0x7fff; in snd_vortex_peaks_info()
824 return 0; in snd_vortex_peaks_info()
831 int i, count = 0; in snd_vortex_peaks_get()
840 for (i = 0; i < 20; i++) in snd_vortex_peaks_get()
843 return 0; in snd_vortex_peaks_get()
856 "EQ0 31Hz\0",
857 "EQ1 63Hz\0",
858 "EQ2 125Hz\0",
859 "EQ3 250Hz\0",
860 "EQ4 500Hz\0",
861 "EQ5 1KHz\0",
862 "EQ6 2KHz\0",
863 "EQ7 4KHz\0",
864 "EQ8 8KHz\0",
865 "EQ9 16KHz\0",
879 kcontrol->private_value = 0; in vortex_eq_init()
881 if (err < 0) in vortex_eq_init()
885 for (i = 0; i < 10; i++) { in vortex_eq_init()
893 if (err < 0) in vortex_eq_init()
902 if (err < 0) in vortex_eq_init()
905 return 0; in vortex_eq_init()
913 for (i=0; i<10; i++) { in vortex_eq_free()
919 return 0; in vortex_eq_free()