Lines Matching refs:a
21 a3dsrc_SetTimeConsts(a3dsrc_t * a, short HrtfTrack, short ItdTrack, in a3dsrc_SetTimeConsts() argument
24 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetTimeConsts()
26 a3d_addrA(a->slice, a->source, A3D_A_HrtfTrackTC), HrtfTrack); in a3dsrc_SetTimeConsts()
28 a3d_addrA(a->slice, a->source, A3D_A_ITDTrackTC), ItdTrack); in a3dsrc_SetTimeConsts()
30 a3d_addrA(a->slice, a->source, A3D_A_GainTrackTC), GTrack); in a3dsrc_SetTimeConsts()
32 a3d_addrA(a->slice, a->source, A3D_A_CoeffTrackTC), CTrack); in a3dsrc_SetTimeConsts()
37 a3dsrc_GetTimeConsts(a3dsrc_t * a, short *HrtfTrack, short *ItdTrack,
47 a3dsrc_SetAtmosTarget(a3dsrc_t * a, short aa, short b, short c, short d, in a3dsrc_SetAtmosTarget() argument
50 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetAtmosTarget()
52 a3d_addrB(a->slice, a->source, A3D_B_A21Target), in a3dsrc_SetAtmosTarget()
55 a3d_addrB(a->slice, a->source, A3D_B_B10Target), in a3dsrc_SetAtmosTarget()
58 a3d_addrB(a->slice, a->source, A3D_B_B2Target), c); in a3dsrc_SetAtmosTarget()
62 a3dsrc_SetAtmosCurrent(a3dsrc_t * a, short aa, short b, short c, short d, in a3dsrc_SetAtmosCurrent() argument
65 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetAtmosCurrent()
67 a3d_addrB(a->slice, a->source, A3D_B_A12Current), in a3dsrc_SetAtmosCurrent()
70 a3d_addrB(a->slice, a->source, A3D_B_B01Current), in a3dsrc_SetAtmosCurrent()
73 a3d_addrB(a->slice, a->source, A3D_B_B2Current), c); in a3dsrc_SetAtmosCurrent()
77 a3dsrc_SetAtmosState(a3dsrc_t * a, short x1, short x2, short y1, short y2) in a3dsrc_SetAtmosState() argument
79 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetAtmosState()
80 hwwrite(vortex->mmio, a3d_addrA(a->slice, a->source, A3D_A_x1), x1); in a3dsrc_SetAtmosState()
81 hwwrite(vortex->mmio, a3d_addrA(a->slice, a->source, A3D_A_x2), x2); in a3dsrc_SetAtmosState()
82 hwwrite(vortex->mmio, a3d_addrA(a->slice, a->source, A3D_A_y1), y1); in a3dsrc_SetAtmosState()
83 hwwrite(vortex->mmio, a3d_addrA(a->slice, a->source, A3D_A_y2), y2); in a3dsrc_SetAtmosState()
88 a3dsrc_GetAtmosTarget(a3dsrc_t * a, short *aa, short *b, short *c,
93 a3dsrc_GetAtmosCurrent(a3dsrc_t * a, short *bb01, short *ab01, short *b2,
96 vortex_t *vortex = (vortex_t *) (a->vortex);
99 a3d_addrA(a->slice, a->source, A3D_A_A12Current));
102 a3d_addrB(a->slice, a->source, A3D_B_A12Current));
105 a3d_addrA(a->slice, a->source, A3D_A_B01Current));
108 a3d_addrB(a->slice, a->source, A3D_B_B01Current));
111 a3d_addrA(a->slice, a->source, A3D_A_B2Current));
115 a3dsrc_GetAtmosState(a3dsrc_t * a, short *x1, short *x2, short *y1, short *y2)
124 a3dsrc_SetHrtfTarget(a3dsrc_t * a, a3d_Hrtf_t const aa, a3d_Hrtf_t const b) in a3dsrc_SetHrtfTarget() argument
126 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetHrtfTarget()
131 a3d_addrB(a->slice, a->source, in a3dsrc_SetHrtfTarget()
137 a3dsrc_SetHrtfCurrent(a3dsrc_t * a, a3d_Hrtf_t const aa, a3d_Hrtf_t const b) in a3dsrc_SetHrtfCurrent() argument
139 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetHrtfCurrent()
144 a3d_addrB(a->slice, a->source, in a3dsrc_SetHrtfCurrent()
150 a3dsrc_SetHrtfState(a3dsrc_t * a, a3d_Hrtf_t const aa, a3d_Hrtf_t const b) in a3dsrc_SetHrtfState() argument
152 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetHrtfState()
157 a3d_addrB(a->slice, a->source, in a3dsrc_SetHrtfState()
162 static void a3dsrc_SetHrtfOutput(a3dsrc_t * a, short left, short right) in a3dsrc_SetHrtfOutput() argument
164 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetHrtfOutput()
166 a3d_addrA(a->slice, a->source, A3D_A_HrtfOutL), left); in a3dsrc_SetHrtfOutput()
168 a3d_addrA(a->slice, a->source, A3D_A_HrtfOutR), right); in a3dsrc_SetHrtfOutput()
172 static void a3dsrc_GetHrtfTarget(a3dsrc_t * a, a3d_Hrtf_t aa, a3d_Hrtf_t b)
174 vortex_t *vortex = (vortex_t *) (a->vortex);
180 a3d_addrA(a->slice, a->source,
185 a3d_addrB(a->slice, a->source,
189 static void a3dsrc_GetHrtfCurrent(a3dsrc_t * a, a3d_Hrtf_t aa, a3d_Hrtf_t b)
191 vortex_t *vortex = (vortex_t *) (a->vortex);
197 a3d_addrA(a->slice, a->source,
202 a3d_addrB(a->slice, a->source,
206 static void a3dsrc_GetHrtfState(a3dsrc_t * a, a3d_Hrtf_t aa, a3d_Hrtf_t b)
208 vortex_t *vortex = (vortex_t *) (a->vortex);
214 a3d_addrA(a->slice, a->source,
219 a3d_addrB(a->slice, a->source,
223 static void a3dsrc_GetHrtfOutput(a3dsrc_t * a, short *left, short *right)
225 vortex_t *vortex = (vortex_t *) (a->vortex);
228 a3d_addrA(a->slice, a->source, A3D_A_HrtfOutL));
231 a3d_addrA(a->slice, a->source, A3D_A_HrtfOutR));
241 static void a3dsrc_SetItdTarget(a3dsrc_t * a, short litd, short ritd) in a3dsrc_SetItdTarget() argument
243 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetItdTarget()
254 a3d_addrB(a->slice, a->source, A3D_B_ITDTarget), in a3dsrc_SetItdTarget()
259 static void a3dsrc_SetItdCurrent(a3dsrc_t * a, short litd, short ritd) in a3dsrc_SetItdCurrent() argument
261 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetItdCurrent()
272 a3d_addrB(a->slice, a->source, A3D_B_ITDCurrent), in a3dsrc_SetItdCurrent()
277 static void a3dsrc_SetItdDline(a3dsrc_t * a, a3d_ItdDline_t const dline) in a3dsrc_SetItdDline() argument
279 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetItdDline()
284 a3d_addrA(a->slice, a->source, in a3dsrc_SetItdDline()
289 static void a3dsrc_GetItdTarget(a3dsrc_t * a, short *litd, short *ritd)
291 vortex_t *vortex = (vortex_t *) (a->vortex);
294 a3d_addrA(a->slice, a->source, A3D_A_ITDTarget));
297 a3d_addrB(a->slice, a->source, A3D_B_ITDTarget));
300 static void a3dsrc_GetItdCurrent(a3dsrc_t * a, short *litd, short *ritd)
302 vortex_t *vortex = (vortex_t *) (a->vortex);
306 a3d_addrA(a->slice, a->source, A3D_A_ITDCurrent));
309 a3d_addrB(a->slice, a->source, A3D_B_ITDCurrent));
312 static void a3dsrc_GetItdDline(a3dsrc_t * a, a3d_ItdDline_t dline)
314 vortex_t *vortex = (vortex_t *) (a->vortex);
320 a3d_addrA(a->slice, a->source,
327 static void a3dsrc_SetGainTarget(a3dsrc_t * a, short left, short right) in a3dsrc_SetGainTarget() argument
329 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetGainTarget()
331 a3d_addrB(a->slice, a->source, A3D_B_GainTarget), in a3dsrc_SetGainTarget()
335 static void a3dsrc_SetGainCurrent(a3dsrc_t * a, short left, short right) in a3dsrc_SetGainCurrent() argument
337 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetGainCurrent()
339 a3d_addrB(a->slice, a->source, A3D_B_GainCurrent), in a3dsrc_SetGainCurrent()
344 static void a3dsrc_GetGainTarget(a3dsrc_t * a, short *left, short *right)
346 vortex_t *vortex = (vortex_t *) (a->vortex);
349 a3d_addrA(a->slice, a->source, A3D_A_GainTarget));
352 a3d_addrB(a->slice, a->source, A3D_B_GainTarget));
355 static void a3dsrc_GetGainCurrent(a3dsrc_t * a, short *left, short *right)
357 vortex_t *vortex = (vortex_t *) (a->vortex);
360 a3d_addrA(a->slice, a->source, A3D_A_GainCurrent));
363 a3d_addrB(a->slice, a->source, A3D_B_GainCurrent));
367 static void CA3dIO_WriteReg(a3dsrc_t * a, unsigned long addr, short aa, short b)
369 vortex_t *vortex = (vortex_t *) (a->vortex);
376 static void a3dsrc_SetA3DSampleRate(a3dsrc_t * a, int sr) in a3dsrc_SetA3DSampleRate() argument
378 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetA3DSampleRate()
382 hwwrite(vortex->mmio, A3D_SLICE_Control + ((a->slice) << 0xd), esp0); in a3dsrc_SetA3DSampleRate()
386 static void a3dsrc_EnableA3D(a3dsrc_t * a) in a3dsrc_EnableA3D() argument
388 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_EnableA3D()
389 hwwrite(vortex->mmio, A3D_SLICE_Control + ((a->slice) << 0xd), in a3dsrc_EnableA3D()
394 static void a3dsrc_DisableA3D(a3dsrc_t * a) in a3dsrc_DisableA3D() argument
396 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_DisableA3D()
397 hwwrite(vortex->mmio, A3D_SLICE_Control + ((a->slice) << 0xd), in a3dsrc_DisableA3D()
401 static void a3dsrc_SetA3DControlReg(a3dsrc_t * a, unsigned long ctrl) in a3dsrc_SetA3DControlReg() argument
403 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetA3DControlReg()
404 hwwrite(vortex->mmio, A3D_SLICE_Control + ((a->slice) << 0xd), ctrl); in a3dsrc_SetA3DControlReg()
407 static void a3dsrc_SetA3DPointerReg(a3dsrc_t * a, unsigned long ptr) in a3dsrc_SetA3DPointerReg() argument
409 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_SetA3DPointerReg()
410 hwwrite(vortex->mmio, A3D_SLICE_Pointers + ((a->slice) << 0xd), ptr); in a3dsrc_SetA3DPointerReg()
414 static void a3dsrc_GetA3DSampleRate(a3dsrc_t * a, int *sr)
416 vortex_t *vortex = (vortex_t *) (a->vortex);
417 *sr = ((hwread(vortex->mmio, A3D_SLICE_Control + (a->slice << 0xd))
422 static void a3dsrc_GetA3DControlReg(a3dsrc_t * a, unsigned long *ctrl)
424 vortex_t *vortex = (vortex_t *) (a->vortex);
425 *ctrl = hwread(vortex->mmio, A3D_SLICE_Control + ((a->slice) << 0xd));
428 static void a3dsrc_GetA3DPointerReg(a3dsrc_t * a, unsigned long *ptr)
430 vortex_t *vortex = (vortex_t *) (a->vortex);
431 *ptr = hwread(vortex->mmio, A3D_SLICE_Pointers + ((a->slice) << 0xd));
435 static void a3dsrc_ZeroSliceIO(a3dsrc_t * a) in a3dsrc_ZeroSliceIO() argument
437 vortex_t *vortex = (vortex_t *) (a->vortex); in a3dsrc_ZeroSliceIO()
443 ((((a->slice) << 0xb) + i) << 2), 0); in a3dsrc_ZeroSliceIO()
447 ((((a->slice) << 0xb) + i) << 2), 0); in a3dsrc_ZeroSliceIO()
451 static void a3dsrc_ZeroState(a3dsrc_t * a) in a3dsrc_ZeroState() argument
457 a3dsrc_SetAtmosState(a, 0, 0, 0, 0); in a3dsrc_ZeroState()
458 a3dsrc_SetHrtfState(a, A3dHrirZeros, A3dHrirZeros); in a3dsrc_ZeroState()
459 a3dsrc_SetItdDline(a, A3dItdDlineZeros); in a3dsrc_ZeroState()
460 a3dsrc_SetHrtfOutput(a, 0, 0); in a3dsrc_ZeroState()
461 a3dsrc_SetTimeConsts(a, 0, 0, 0, 0); in a3dsrc_ZeroState()
463 a3dsrc_SetAtmosCurrent(a, 0, 0, 0, 0, 0); in a3dsrc_ZeroState()
464 a3dsrc_SetAtmosTarget(a, 0, 0, 0, 0, 0); in a3dsrc_ZeroState()
465 a3dsrc_SetItdCurrent(a, 0, 0); in a3dsrc_ZeroState()
466 a3dsrc_SetItdTarget(a, 0, 0); in a3dsrc_ZeroState()
467 a3dsrc_SetGainCurrent(a, 0, 0); in a3dsrc_ZeroState()
468 a3dsrc_SetGainTarget(a, 0, 0); in a3dsrc_ZeroState()
470 a3dsrc_SetHrtfCurrent(a, A3dHrirZeros, A3dHrirZeros); in a3dsrc_ZeroState()
471 a3dsrc_SetHrtfTarget(a, A3dHrirZeros, A3dHrirZeros); in a3dsrc_ZeroState()
475 static void a3dsrc_ZeroStateA3D(a3dsrc_t *a, vortex_t *v) in a3dsrc_ZeroStateA3D() argument
479 if ((a->vortex) == NULL) { in a3dsrc_ZeroStateA3D()
485 a3dsrc_SetA3DControlReg(a, 0); in a3dsrc_ZeroStateA3D()
486 a3dsrc_SetA3DPointerReg(a, 0); in a3dsrc_ZeroStateA3D()
488 var = a->slice; in a3dsrc_ZeroStateA3D()
489 var2 = a->source; in a3dsrc_ZeroStateA3D()
491 a->slice = i; in a3dsrc_ZeroStateA3D()
492 a3dsrc_ZeroSliceIO(a); in a3dsrc_ZeroStateA3D()
495 a->source = var2; in a3dsrc_ZeroStateA3D()
496 a->slice = var; in a3dsrc_ZeroStateA3D()
500 static void a3dsrc_ProgramPipe(a3dsrc_t * a) in a3dsrc_ProgramPipe() argument
502 a3dsrc_SetTimeConsts(a, 0, 0, 0, 0); in a3dsrc_ProgramPipe()
503 a3dsrc_SetAtmosCurrent(a, 0, 0x4000, 0, 0, 0); in a3dsrc_ProgramPipe()
504 a3dsrc_SetAtmosTarget(a, 0x4000, 0, 0, 0, 0); in a3dsrc_ProgramPipe()
505 a3dsrc_SetItdCurrent(a, 0, 0); in a3dsrc_ProgramPipe()
506 a3dsrc_SetItdTarget(a, 0, 0); in a3dsrc_ProgramPipe()
507 a3dsrc_SetGainCurrent(a, 0x7fff, 0x7fff); in a3dsrc_ProgramPipe()
508 a3dsrc_SetGainTarget(a, 0x7fff, 0x7fff); in a3dsrc_ProgramPipe()
513 a3dsrc_SetHrtfCurrent(a, A3dHrirImpulse, A3dHrirImpulse); in a3dsrc_ProgramPipe()
514 a3dsrc_SetHrtfTarget(a, A3dHrirImpulse, A3dHrirImpulse); in a3dsrc_ProgramPipe()
523 static void a3dsrc_ClearVDBData(a3dsrc_t * a, unsigned long aa)
525 vortex_t *vortex = (vortex_t *) (a->vortex);
529 a3d_addrS(a->slice, A3D_SLICE_VDBDest) + (a->source << 2), 0);
531 a3d_addrS(a->slice,
532 A3D_SLICE_VDBDest + 4) + (a->source << 2), 0);
668 static void vortex_Vort3D_InitializeSource(a3dsrc_t *a, int en, vortex_t *v) in vortex_Vort3D_InitializeSource() argument
670 if (a->vortex == NULL) { in vortex_Vort3D_InitializeSource()
676 a3dsrc_ProgramPipe(a); in vortex_Vort3D_InitializeSource()
677 a3dsrc_SetA3DSampleRate(a, 0x11); in vortex_Vort3D_InitializeSource()
678 a3dsrc_SetTimeConsts(a, HrtfTCDefault, in vortex_Vort3D_InitializeSource()
684 a3dsrc_EnableA3D(a); in vortex_Vort3D_InitializeSource()
686 a3dsrc_DisableA3D(a); in vortex_Vort3D_InitializeSource()
687 a3dsrc_ZeroState(a); in vortex_Vort3D_InitializeSource()
767 a3dsrc_t *a = kcontrol->private_data; in snd_vortex_a3d_hrtf_put() local
773 vortex_a3d_coord2hrtf(a->hrtf[0], coord); in snd_vortex_a3d_hrtf_put()
774 vortex_a3d_coord2hrtf(a->hrtf[1], coord); in snd_vortex_a3d_hrtf_put()
775 a3dsrc_SetHrtfTarget(a, a->hrtf[0], a->hrtf[1]); in snd_vortex_a3d_hrtf_put()
776 a3dsrc_SetHrtfCurrent(a, a->hrtf[0], a->hrtf[1]); in snd_vortex_a3d_hrtf_put()
784 a3dsrc_t *a = kcontrol->private_data; in snd_vortex_a3d_itd_put() local
790 vortex_a3d_coord2itd(a->hrtf[0], coord); in snd_vortex_a3d_itd_put()
791 vortex_a3d_coord2itd(a->hrtf[1], coord); in snd_vortex_a3d_itd_put()
793 a3dsrc_SetItdTarget(a, a->itd[0], a->itd[1]); in snd_vortex_a3d_itd_put()
794 a3dsrc_SetItdCurrent(a, a->itd[0], a->itd[1]); in snd_vortex_a3d_itd_put()
795 a3dsrc_SetItdDline(a, a->dline); in snd_vortex_a3d_itd_put()
803 a3dsrc_t *a = kcontrol->private_data; in snd_vortex_a3d_ild_put() local
808 vortex_a3d_coord2ild(a->ild, l, r); in snd_vortex_a3d_ild_put()
810 a3dsrc_SetGainTarget(a, l, r); in snd_vortex_a3d_ild_put()
811 a3dsrc_SetGainCurrent(a, l, r); in snd_vortex_a3d_ild_put()
819 a3dsrc_t *a = kcontrol->private_data; in snd_vortex_a3d_filter_put() local
825 vortex_a3d_translate_filter(a->filter, params); in snd_vortex_a3d_filter_put()
827 a3dsrc_SetAtmosTarget(a, a->filter[0], in snd_vortex_a3d_filter_put()
828 a->filter[1], a->filter[2], in snd_vortex_a3d_filter_put()
829 a->filter[3], a->filter[4]); in snd_vortex_a3d_filter_put()
830 a3dsrc_SetAtmosCurrent(a, a->filter[0], in snd_vortex_a3d_filter_put()
831 a->filter[1], a->filter[2], in snd_vortex_a3d_filter_put()
832 a->filter[3], a->filter[4]); in snd_vortex_a3d_filter_put()