Lines Matching refs:a
33 a3dsrc_SetTimeConsts(a3dsrc_t * a, short HrtfTrack, short ItdTrack, in a3dsrc_SetTimeConsts() argument
36 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetTimeConsts()
38 a3d_addrA(a->slice, a->source, A3D_A_HrtfTrackTC), HrtfTrack); in a3dsrc_SetTimeConsts()
40 a3d_addrA(a->slice, a->source, A3D_A_ITDTrackTC), ItdTrack); in a3dsrc_SetTimeConsts()
42 a3d_addrA(a->slice, a->source, A3D_A_GainTrackTC), GTrack); in a3dsrc_SetTimeConsts()
44 a3d_addrA(a->slice, a->source, A3D_A_CoeffTrackTC), CTrack); in a3dsrc_SetTimeConsts()
49 a3dsrc_GetTimeConsts(a3dsrc_t * a, short *HrtfTrack, short *ItdTrack,
59 a3dsrc_SetAtmosTarget(a3dsrc_t * a, short aa, short b, short c, short d, in a3dsrc_SetAtmosTarget() argument
62 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetAtmosTarget()
64 a3d_addrB(a->slice, a->source, A3D_B_A21Target), in a3dsrc_SetAtmosTarget()
67 a3d_addrB(a->slice, a->source, A3D_B_B10Target), in a3dsrc_SetAtmosTarget()
70 a3d_addrB(a->slice, a->source, A3D_B_B2Target), c); in a3dsrc_SetAtmosTarget()
74 a3dsrc_SetAtmosCurrent(a3dsrc_t * a, short aa, short b, short c, short d, in a3dsrc_SetAtmosCurrent() argument
77 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetAtmosCurrent()
79 a3d_addrB(a->slice, a->source, A3D_B_A12Current), in a3dsrc_SetAtmosCurrent()
82 a3d_addrB(a->slice, a->source, A3D_B_B01Current), in a3dsrc_SetAtmosCurrent()
85 a3d_addrB(a->slice, a->source, A3D_B_B2Current), c); in a3dsrc_SetAtmosCurrent()
89 a3dsrc_SetAtmosState(a3dsrc_t * a, short x1, short x2, short y1, short y2) in a3dsrc_SetAtmosState() argument
91 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetAtmosState()
92 hwwrite(vortex->mmio, a3d_addrA(a->slice, a->source, A3D_A_x1), x1); in a3dsrc_SetAtmosState()
93 hwwrite(vortex->mmio, a3d_addrA(a->slice, a->source, A3D_A_x2), x2); in a3dsrc_SetAtmosState()
94 hwwrite(vortex->mmio, a3d_addrA(a->slice, a->source, A3D_A_y1), y1); in a3dsrc_SetAtmosState()
95 hwwrite(vortex->mmio, a3d_addrA(a->slice, a->source, A3D_A_y2), y2); in a3dsrc_SetAtmosState()
100 a3dsrc_GetAtmosTarget(a3dsrc_t * a, short *aa, short *b, short *c,
105 a3dsrc_GetAtmosCurrent(a3dsrc_t * a, short *bb01, short *ab01, short *b2,
108 vortex_t *vortex = (vortex_t *) (a->vortex);
111 a3d_addrA(a->slice, a->source, A3D_A_A12Current));
114 a3d_addrB(a->slice, a->source, A3D_B_A12Current));
117 a3d_addrA(a->slice, a->source, A3D_A_B01Current));
120 a3d_addrB(a->slice, a->source, A3D_B_B01Current));
123 a3d_addrA(a->slice, a->source, A3D_A_B2Current));
127 a3dsrc_GetAtmosState(a3dsrc_t * a, short *x1, short *x2, short *y1, short *y2)
136 a3dsrc_SetHrtfTarget(a3dsrc_t * a, a3d_Hrtf_t const aa, a3d_Hrtf_t const b) in a3dsrc_SetHrtfTarget() argument
138 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetHrtfTarget()
143 a3d_addrB(a->slice, a->source, in a3dsrc_SetHrtfTarget()
149 a3dsrc_SetHrtfCurrent(a3dsrc_t * a, a3d_Hrtf_t const aa, a3d_Hrtf_t const b) in a3dsrc_SetHrtfCurrent() argument
151 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetHrtfCurrent()
156 a3d_addrB(a->slice, a->source, in a3dsrc_SetHrtfCurrent()
162 a3dsrc_SetHrtfState(a3dsrc_t * a, a3d_Hrtf_t const aa, a3d_Hrtf_t const b) in a3dsrc_SetHrtfState() argument
164 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetHrtfState()
169 a3d_addrB(a->slice, a->source, in a3dsrc_SetHrtfState()
174 static void a3dsrc_SetHrtfOutput(a3dsrc_t * a, short left, short right) in a3dsrc_SetHrtfOutput() argument
176 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetHrtfOutput()
178 a3d_addrA(a->slice, a->source, A3D_A_HrtfOutL), left); in a3dsrc_SetHrtfOutput()
180 a3d_addrA(a->slice, a->source, A3D_A_HrtfOutR), right); in a3dsrc_SetHrtfOutput()
184 static void a3dsrc_GetHrtfTarget(a3dsrc_t * a, a3d_Hrtf_t aa, a3d_Hrtf_t b)
186 vortex_t *vortex = (vortex_t *) (a->vortex);
192 a3d_addrA(a->slice, a->source,
197 a3d_addrB(a->slice, a->source,
201 static void a3dsrc_GetHrtfCurrent(a3dsrc_t * a, a3d_Hrtf_t aa, a3d_Hrtf_t b)
203 vortex_t *vortex = (vortex_t *) (a->vortex);
209 a3d_addrA(a->slice, a->source,
214 a3d_addrB(a->slice, a->source,
218 static void a3dsrc_GetHrtfState(a3dsrc_t * a, a3d_Hrtf_t aa, a3d_Hrtf_t b)
220 vortex_t *vortex = (vortex_t *) (a->vortex);
226 a3d_addrA(a->slice, a->source,
231 a3d_addrB(a->slice, a->source,
235 static void a3dsrc_GetHrtfOutput(a3dsrc_t * a, short *left, short *right)
237 vortex_t *vortex = (vortex_t *) (a->vortex);
240 a3d_addrA(a->slice, a->source, A3D_A_HrtfOutL));
243 a3d_addrA(a->slice, a->source, A3D_A_HrtfOutR));
253 static void a3dsrc_SetItdTarget(a3dsrc_t * a, short litd, short ritd) in a3dsrc_SetItdTarget() argument
255 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetItdTarget()
266 a3d_addrB(a->slice, a->source, A3D_B_ITDTarget), in a3dsrc_SetItdTarget()
271 static void a3dsrc_SetItdCurrent(a3dsrc_t * a, short litd, short ritd) in a3dsrc_SetItdCurrent() argument
273 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetItdCurrent()
284 a3d_addrB(a->slice, a->source, A3D_B_ITDCurrent), in a3dsrc_SetItdCurrent()
289 static void a3dsrc_SetItdDline(a3dsrc_t * a, a3d_ItdDline_t const dline) in a3dsrc_SetItdDline() argument
291 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetItdDline()
296 a3d_addrA(a->slice, a->source, in a3dsrc_SetItdDline()
301 static void a3dsrc_GetItdTarget(a3dsrc_t * a, short *litd, short *ritd)
303 vortex_t *vortex = (vortex_t *) (a->vortex);
306 a3d_addrA(a->slice, a->source, A3D_A_ITDTarget));
309 a3d_addrB(a->slice, a->source, A3D_B_ITDTarget));
312 static void a3dsrc_GetItdCurrent(a3dsrc_t * a, short *litd, short *ritd)
314 vortex_t *vortex = (vortex_t *) (a->vortex);
318 a3d_addrA(a->slice, a->source, A3D_A_ITDCurrent));
321 a3d_addrB(a->slice, a->source, A3D_B_ITDCurrent));
324 static void a3dsrc_GetItdDline(a3dsrc_t * a, a3d_ItdDline_t dline)
326 vortex_t *vortex = (vortex_t *) (a->vortex);
332 a3d_addrA(a->slice, a->source,
339 static void a3dsrc_SetGainTarget(a3dsrc_t * a, short left, short right) in a3dsrc_SetGainTarget() argument
341 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetGainTarget()
343 a3d_addrB(a->slice, a->source, A3D_B_GainTarget), in a3dsrc_SetGainTarget()
347 static void a3dsrc_SetGainCurrent(a3dsrc_t * a, short left, short right) in a3dsrc_SetGainCurrent() argument
349 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetGainCurrent()
351 a3d_addrB(a->slice, a->source, A3D_B_GainCurrent), in a3dsrc_SetGainCurrent()
356 static void a3dsrc_GetGainTarget(a3dsrc_t * a, short *left, short *right)
358 vortex_t *vortex = (vortex_t *) (a->vortex);
361 a3d_addrA(a->slice, a->source, A3D_A_GainTarget));
364 a3d_addrB(a->slice, a->source, A3D_B_GainTarget));
367 static void a3dsrc_GetGainCurrent(a3dsrc_t * a, short *left, short *right)
369 vortex_t *vortex = (vortex_t *) (a->vortex);
372 a3d_addrA(a->slice, a->source, A3D_A_GainCurrent));
375 a3d_addrB(a->slice, a->source, A3D_B_GainCurrent));
379 static void CA3dIO_WriteReg(a3dsrc_t * a, unsigned long addr, short aa, short b)
381 vortex_t *vortex = (vortex_t *) (a->vortex);
388 static void a3dsrc_SetA3DSampleRate(a3dsrc_t * a, int sr) in a3dsrc_SetA3DSampleRate() argument
390 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetA3DSampleRate()
394 hwwrite(vortex->mmio, A3D_SLICE_Control + ((a->slice) << 0xd), esp0); in a3dsrc_SetA3DSampleRate()
398 static void a3dsrc_EnableA3D(a3dsrc_t * a) in a3dsrc_EnableA3D() argument
400 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_EnableA3D()
401 hwwrite(vortex->mmio, A3D_SLICE_Control + ((a->slice) << 0xd), in a3dsrc_EnableA3D()
406 static void a3dsrc_DisableA3D(a3dsrc_t * a) in a3dsrc_DisableA3D() argument
408 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_DisableA3D()
409 hwwrite(vortex->mmio, A3D_SLICE_Control + ((a->slice) << 0xd), in a3dsrc_DisableA3D()
413 static void a3dsrc_SetA3DControlReg(a3dsrc_t * a, unsigned long ctrl) in a3dsrc_SetA3DControlReg() argument
415 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetA3DControlReg()
416 hwwrite(vortex->mmio, A3D_SLICE_Control + ((a->slice) << 0xd), ctrl); in a3dsrc_SetA3DControlReg()
419 static void a3dsrc_SetA3DPointerReg(a3dsrc_t * a, unsigned long ptr) in a3dsrc_SetA3DPointerReg() argument
421 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetA3DPointerReg()
422 hwwrite(vortex->mmio, A3D_SLICE_Pointers + ((a->slice) << 0xd), ptr); in a3dsrc_SetA3DPointerReg()
426 static void a3dsrc_GetA3DSampleRate(a3dsrc_t * a, int *sr)
428 vortex_t *vortex = (vortex_t *) (a->vortex);
429 *sr = ((hwread(vortex->mmio, A3D_SLICE_Control + (a->slice << 0xd))
434 static void a3dsrc_GetA3DControlReg(a3dsrc_t * a, unsigned long *ctrl)
436 vortex_t *vortex = (vortex_t *) (a->vortex);
437 *ctrl = hwread(vortex->mmio, A3D_SLICE_Control + ((a->slice) << 0xd));
440 static void a3dsrc_GetA3DPointerReg(a3dsrc_t * a, unsigned long *ptr)
442 vortex_t *vortex = (vortex_t *) (a->vortex);
443 *ptr = hwread(vortex->mmio, A3D_SLICE_Pointers + ((a->slice) << 0xd));
447 static void a3dsrc_ZeroSliceIO(a3dsrc_t * a) in a3dsrc_ZeroSliceIO() argument
449 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_ZeroSliceIO()
455 ((((a->slice) << 0xb) + i) << 2), 0); in a3dsrc_ZeroSliceIO()
459 ((((a->slice) << 0xb) + i) << 2), 0); in a3dsrc_ZeroSliceIO()
463 static void a3dsrc_ZeroState(a3dsrc_t * a) in a3dsrc_ZeroState() argument
469 a3dsrc_SetAtmosState(a, 0, 0, 0, 0); in a3dsrc_ZeroState()
470 a3dsrc_SetHrtfState(a, A3dHrirZeros, A3dHrirZeros); in a3dsrc_ZeroState()
471 a3dsrc_SetItdDline(a, A3dItdDlineZeros); in a3dsrc_ZeroState()
472 a3dsrc_SetHrtfOutput(a, 0, 0); in a3dsrc_ZeroState()
473 a3dsrc_SetTimeConsts(a, 0, 0, 0, 0); in a3dsrc_ZeroState()
475 a3dsrc_SetAtmosCurrent(a, 0, 0, 0, 0, 0); in a3dsrc_ZeroState()
476 a3dsrc_SetAtmosTarget(a, 0, 0, 0, 0, 0); in a3dsrc_ZeroState()
477 a3dsrc_SetItdCurrent(a, 0, 0); in a3dsrc_ZeroState()
478 a3dsrc_SetItdTarget(a, 0, 0); in a3dsrc_ZeroState()
479 a3dsrc_SetGainCurrent(a, 0, 0); in a3dsrc_ZeroState()
480 a3dsrc_SetGainTarget(a, 0, 0); in a3dsrc_ZeroState()
482 a3dsrc_SetHrtfCurrent(a, A3dHrirZeros, A3dHrirZeros); in a3dsrc_ZeroState()
483 a3dsrc_SetHrtfTarget(a, A3dHrirZeros, A3dHrirZeros); in a3dsrc_ZeroState()
487 static void a3dsrc_ZeroStateA3D(a3dsrc_t * a) in a3dsrc_ZeroStateA3D() argument
491 if ((a->vortex) == NULL) { in a3dsrc_ZeroStateA3D()
496 a3dsrc_SetA3DControlReg(a, 0); in a3dsrc_ZeroStateA3D()
497 a3dsrc_SetA3DPointerReg(a, 0); in a3dsrc_ZeroStateA3D()
499 var = a->slice; in a3dsrc_ZeroStateA3D()
500 var2 = a->source; in a3dsrc_ZeroStateA3D()
502 a->slice = i; in a3dsrc_ZeroStateA3D()
503 a3dsrc_ZeroSliceIO(a); in a3dsrc_ZeroStateA3D()
506 a->source = var2; in a3dsrc_ZeroStateA3D()
507 a->slice = var; in a3dsrc_ZeroStateA3D()
511 static void a3dsrc_ProgramPipe(a3dsrc_t * a) in a3dsrc_ProgramPipe() argument
513 a3dsrc_SetTimeConsts(a, 0, 0, 0, 0); in a3dsrc_ProgramPipe()
514 a3dsrc_SetAtmosCurrent(a, 0, 0x4000, 0, 0, 0); in a3dsrc_ProgramPipe()
515 a3dsrc_SetAtmosTarget(a, 0x4000, 0, 0, 0, 0); in a3dsrc_ProgramPipe()
516 a3dsrc_SetItdCurrent(a, 0, 0); in a3dsrc_ProgramPipe()
517 a3dsrc_SetItdTarget(a, 0, 0); in a3dsrc_ProgramPipe()
518 a3dsrc_SetGainCurrent(a, 0x7fff, 0x7fff); in a3dsrc_ProgramPipe()
519 a3dsrc_SetGainTarget(a, 0x7fff, 0x7fff); in a3dsrc_ProgramPipe()
524 a3dsrc_SetHrtfCurrent(a, A3dHrirImpulse, A3dHrirImpulse); in a3dsrc_ProgramPipe()
525 a3dsrc_SetHrtfTarget(a, A3dHrirImpulse, A3dHrirImpulse); in a3dsrc_ProgramPipe()
534 static void a3dsrc_ClearVDBData(a3dsrc_t * a, unsigned long aa)
536 vortex_t *vortex = (vortex_t *) (a->vortex);
540 a3d_addrS(a->slice, A3D_SLICE_VDBDest) + (a->source << 2), 0);
542 a3d_addrS(a->slice,
543 A3D_SLICE_VDBDest + 4) + (a->source << 2), 0);
679 static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en) in vortex_Vort3D_InitializeSource() argument
681 if (a->vortex == NULL) { in vortex_Vort3D_InitializeSource()
687 a3dsrc_ProgramPipe(a); in vortex_Vort3D_InitializeSource()
688 a3dsrc_SetA3DSampleRate(a, 0x11); in vortex_Vort3D_InitializeSource()
689 a3dsrc_SetTimeConsts(a, HrtfTCDefault, in vortex_Vort3D_InitializeSource()
695 a3dsrc_EnableA3D(a); in vortex_Vort3D_InitializeSource()
697 a3dsrc_DisableA3D(a); in vortex_Vort3D_InitializeSource()
698 a3dsrc_ZeroState(a); in vortex_Vort3D_InitializeSource()
778 a3dsrc_t *a = kcontrol->private_data; in snd_vortex_a3d_hrtf_put() local
784 vortex_a3d_coord2hrtf(a->hrtf[0], coord); in snd_vortex_a3d_hrtf_put()
785 vortex_a3d_coord2hrtf(a->hrtf[1], coord); in snd_vortex_a3d_hrtf_put()
786 a3dsrc_SetHrtfTarget(a, a->hrtf[0], a->hrtf[1]); in snd_vortex_a3d_hrtf_put()
787 a3dsrc_SetHrtfCurrent(a, a->hrtf[0], a->hrtf[1]); in snd_vortex_a3d_hrtf_put()
795 a3dsrc_t *a = kcontrol->private_data; in snd_vortex_a3d_itd_put() local
801 vortex_a3d_coord2itd(a->hrtf[0], coord); in snd_vortex_a3d_itd_put()
802 vortex_a3d_coord2itd(a->hrtf[1], coord); in snd_vortex_a3d_itd_put()
804 a3dsrc_SetItdTarget(a, a->itd[0], a->itd[1]); in snd_vortex_a3d_itd_put()
805 a3dsrc_SetItdCurrent(a, a->itd[0], a->itd[1]); in snd_vortex_a3d_itd_put()
806 a3dsrc_SetItdDline(a, a->dline); in snd_vortex_a3d_itd_put()
814 a3dsrc_t *a = kcontrol->private_data; in snd_vortex_a3d_ild_put() local
820 vortex_a3d_coord2ild(a->ild, l, r); in snd_vortex_a3d_ild_put()
822 a3dsrc_SetGainTarget(a, l, r); in snd_vortex_a3d_ild_put()
823 a3dsrc_SetGainCurrent(a, l, r); in snd_vortex_a3d_ild_put()
831 a3dsrc_t *a = kcontrol->private_data; in snd_vortex_a3d_filter_put() local
837 vortex_a3d_translate_filter(a->filter, params); in snd_vortex_a3d_filter_put()
839 a3dsrc_SetAtmosTarget(a, a->filter[0], in snd_vortex_a3d_filter_put()
840 a->filter[1], a->filter[2], in snd_vortex_a3d_filter_put()
841 a->filter[3], a->filter[4]); in snd_vortex_a3d_filter_put()
842 a3dsrc_SetAtmosCurrent(a, a->filter[0], in snd_vortex_a3d_filter_put()
843 a->filter[1], a->filter[2], in snd_vortex_a3d_filter_put()
844 a->filter[3], a->filter[4]); in snd_vortex_a3d_filter_put()