Lines Matching +full:- +full:a

1 // SPDX-License-Identifier: GPL-2.0-or-later
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()
25 hwwrite(vortex->mmio, in a3dsrc_SetTimeConsts()
26 a3d_addrA(a->slice, a->source, A3D_A_HrtfTrackTC), HrtfTrack); in a3dsrc_SetTimeConsts()
27 hwwrite(vortex->mmio, in a3dsrc_SetTimeConsts()
28 a3d_addrA(a->slice, a->source, A3D_A_ITDTrackTC), ItdTrack); in a3dsrc_SetTimeConsts()
29 hwwrite(vortex->mmio, in a3dsrc_SetTimeConsts()
30 a3d_addrA(a->slice, a->source, A3D_A_GainTrackTC), GTrack); in a3dsrc_SetTimeConsts()
31 hwwrite(vortex->mmio, 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()
51 hwwrite(vortex->mmio, in a3dsrc_SetAtmosTarget()
52 a3d_addrB(a->slice, a->source, A3D_B_A21Target), in a3dsrc_SetAtmosTarget()
54 hwwrite(vortex->mmio, in a3dsrc_SetAtmosTarget()
55 a3d_addrB(a->slice, a->source, A3D_B_B10Target), in a3dsrc_SetAtmosTarget()
57 hwwrite(vortex->mmio, 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()
66 hwwrite(vortex->mmio, in a3dsrc_SetAtmosCurrent()
67 a3d_addrB(a->slice, a->source, A3D_B_A12Current), in a3dsrc_SetAtmosCurrent()
69 hwwrite(vortex->mmio, in a3dsrc_SetAtmosCurrent()
70 a3d_addrB(a->slice, a->source, A3D_B_B01Current), in a3dsrc_SetAtmosCurrent()
72 hwwrite(vortex->mmio, 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);
98 hwread(vortex->mmio,
99 a3d_addrA(a->slice, a->source, A3D_A_A12Current));
101 hwread(vortex->mmio,
102 a3d_addrB(a->slice, a->source, A3D_B_A12Current));
104 hwread(vortex->mmio,
105 a3d_addrA(a->slice, a->source, A3D_A_B01Current));
107 hwread(vortex->mmio,
108 a3d_addrB(a->slice, a->source, A3D_B_B01Current));
110 hwread(vortex->mmio,
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()
130 hwwrite(vortex->mmio, 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()
143 hwwrite(vortex->mmio, 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()
156 hwwrite(vortex->mmio, 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()
165 hwwrite(vortex->mmio, in a3dsrc_SetHrtfOutput()
166 a3d_addrA(a->slice, a->source, A3D_A_HrtfOutL), left); in a3dsrc_SetHrtfOutput()
167 hwwrite(vortex->mmio, 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);
179 hwread(vortex->mmio,
180 a3d_addrA(a->slice, a->source,
184 hwread(vortex->mmio,
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);
196 hwread(vortex->mmio,
197 a3d_addrA(a->slice, a->source,
201 hwread(vortex->mmio,
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);
213 hwread(vortex->mmio,
214 a3d_addrA(a->slice, a->source,
218 hwread(vortex->mmio,
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);
227 hwread(vortex->mmio,
228 a3d_addrA(a->slice, a->source, A3D_A_HrtfOutL));
230 hwread(vortex->mmio,
231 a3d_addrA(a->slice, a->source, A3D_A_HrtfOutR));
239 * the sound source to a listeners ears means that the sound will
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()
253 hwwrite(vortex->mmio, in a3dsrc_SetItdTarget()
254 a3d_addrB(a->slice, a->source, A3D_B_ITDTarget), in a3dsrc_SetItdTarget()
256 //hwwrite(vortex->mmio, addr(0x191DF+5, this04, this08), (ritd<<0x10)|litd); 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()
271 hwwrite(vortex->mmio, in a3dsrc_SetItdCurrent()
272 a3d_addrB(a->slice, a->source, A3D_B_ITDCurrent), in a3dsrc_SetItdCurrent()
274 //hwwrite(vortex->mmio, addr(0x191DF+1, this04, this08), (ritd<<0x10)|litd); 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()
281 /* 45 != 40 -> Check this ! */ in a3dsrc_SetItdDline()
283 hwwrite(vortex->mmio, 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);
293 hwread(vortex->mmio,
294 a3d_addrA(a->slice, a->source, A3D_A_ITDTarget));
296 hwread(vortex->mmio,
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);
305 hwread(vortex->mmio,
306 a3d_addrA(a->slice, a->source, A3D_A_ITDCurrent));
308 hwread(vortex->mmio,
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);
319 hwread(vortex->mmio,
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()
330 hwwrite(vortex->mmio, 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()
338 hwwrite(vortex->mmio, 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);
348 hwread(vortex->mmio,
349 a3d_addrA(a->slice, a->source, A3D_A_GainTarget));
351 hwread(vortex->mmio,
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);
359 hwread(vortex->mmio,
360 a3d_addrA(a->slice, a->source, A3D_A_GainCurrent));
362 hwread(vortex->mmio,
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);
370 hwwrite(vortex->mmio, addr, (aa << 0x10) | b);
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()
383 //hwwrite(vortex->mmio, 0x19C38 + (this08<<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()
391 //hwwrite(vortex->mmio, 0x19C38 + (this08<<0xd), 0xF0000001); 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))
419 //*sr = ((hwread(vortex->mmio, 0x19C38 + (this08<<0xd))>>3)&0x1f);
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()
441 hwwrite(vortex->mmio, in a3dsrc_ZeroSliceIO()
443 ((((a->slice) << 0xb) + i) << 2), 0); in a3dsrc_ZeroSliceIO()
445 hwwrite(vortex->mmio, 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
455 a->slice, a->source); in a3dsrc_ZeroState()
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()
480 dev_err(v->card->dev, in a3dsrc_ZeroStateA3D()
481 "ZeroStateA3D: ERROR: a->vortex is NULL\n"); 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()
493 //a3dsrc_ZeroState(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()
517 //a3dsrc_SetHrtfCurrent(a, A3dHrirSatTest, A3dHrirSatTest); in a3dsrc_ProgramPipe()
518 //a3dsrc_SetHrtfTarget(a, A3dHrirSatTest, A3dHrirSatTest); in a3dsrc_ProgramPipe()
523 static void a3dsrc_ClearVDBData(a3dsrc_t * a, unsigned long aa)
525 vortex_t *vortex = (vortex_t *) (a->vortex);
527 // ((aa >> 2) << 8) - (aa >> 2)
528 hwwrite(vortex->mmio,
529 a3d_addrS(a->slice, A3D_SLICE_VDBDest) + (a->source << 2), 0);
530 hwwrite(vortex->mmio,
531 a3d_addrS(a->slice,
532 A3D_SLICE_VDBDest + 4) + (a->source << 2), 0);
534 hwwrite(vortex->mmio, 0x19c00 + (((aa>>2)*255*4)+aa)*8, 0);
535 hwwrite(vortex->mmio, 0x19c04 + (((aa>>2)*255*4)+aa)*8, 0);
544 a3dsrc_t *a3dsrc = &(v->a3d[source + (slice * 4)]); in vortex_A3dSourceHw_Initialize()
545 //a3dsrc_t *a3dsrc = &(v->a3d[source + (slice*4)]); in vortex_A3dSourceHw_Initialize()
547 a3dsrc->vortex = (void *)v; in vortex_A3dSourceHw_Initialize()
548 a3dsrc->source = source; /* source */ in vortex_A3dSourceHw_Initialize()
549 a3dsrc->slice = slice; /* slice */ in vortex_A3dSourceHw_Initialize()
557 v->xt_mode = mode; /* this_14 */ in Vort3DRend_Initialize()
561 switch (v->xt_mode) { in Vort3DRend_Initialize()
593 a3dsrc_ZeroStateA3D(&v->a3d[0], v); in vortex_Vort3D_enable()
617 v->mixxtlk[0] = in vortex_Vort3D_connect()
618 vortex_adb_checkinout(v, v->fixed_res, en, VORTEX_RESOURCE_MIXIN); in vortex_Vort3D_connect()
619 if (v->mixxtlk[0] < 0) { in vortex_Vort3D_connect()
620 dev_warn(v->card->dev, in vortex_Vort3D_connect()
624 v->mixxtlk[1] = in vortex_Vort3D_connect()
625 vortex_adb_checkinout(v, v->fixed_res, en, VORTEX_RESOURCE_MIXIN); in vortex_Vort3D_connect()
626 if (v->mixxtlk[1] < 0) { in vortex_Vort3D_connect()
627 dev_warn(v->card->dev, in vortex_Vort3D_connect()
633 /* Connect A3D -> XTALK */ in vortex_Vort3D_connect()
643 /* Connect XTalk -> mixer */ in vortex_Vort3D_connect()
644 vortex_route(v, en, 0x11, ADB_XTALKOUT(0), ADB_MIXIN(v->mixxtlk[0])); in vortex_Vort3D_connect()
645 vortex_route(v, en, 0x11, ADB_XTALKOUT(1), ADB_MIXIN(v->mixxtlk[1])); in vortex_Vort3D_connect()
646 vortex_connection_mixin_mix(v, en, v->mixxtlk[0], v->mixplayb[0], 0); in vortex_Vort3D_connect()
647 vortex_connection_mixin_mix(v, en, v->mixxtlk[1], v->mixplayb[1], 0); in vortex_Vort3D_connect()
648 vortex_mix_setinputvolumebyte(v, v->mixplayb[0], v->mixxtlk[0], in vortex_Vort3D_connect()
650 vortex_mix_setinputvolumebyte(v, v->mixplayb[1], v->mixxtlk[1], in vortex_Vort3D_connect()
653 vortex_connection_mixin_mix(v, en, v->mixxtlk[0], in vortex_Vort3D_connect()
654 v->mixplayb[2], 0); in vortex_Vort3D_connect()
655 vortex_connection_mixin_mix(v, en, v->mixxtlk[1], in vortex_Vort3D_connect()
656 v->mixplayb[3], 0); in vortex_Vort3D_connect()
657 vortex_mix_setinputvolumebyte(v, v->mixplayb[2], in vortex_Vort3D_connect()
658 v->mixxtlk[0], in vortex_Vort3D_connect()
660 vortex_mix_setinputvolumebyte(v, v->mixplayb[3], in vortex_Vort3D_connect()
661 v->mixxtlk[1], in vortex_Vort3D_connect()
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()
671 dev_warn(v->card->dev, 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()
682 //a3dsrc_SetGainTarget(a,0,0); in vortex_Vort3D_InitializeSource()
683 //a3dsrc_SetGainCurrent(a,0,0); 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()
719 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_vortex_a3d_hrtf_info()
720 uinfo->count = 6; in snd_vortex_a3d_hrtf_info()
721 uinfo->value.integer.min = 0x00000000; in snd_vortex_a3d_hrtf_info()
722 uinfo->value.integer.max = 0xffffffff; in snd_vortex_a3d_hrtf_info()
728 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_vortex_a3d_itd_info()
729 uinfo->count = 2; in snd_vortex_a3d_itd_info()
730 uinfo->value.integer.min = 0x00000000; in snd_vortex_a3d_itd_info()
731 uinfo->value.integer.max = 0xffffffff; in snd_vortex_a3d_itd_info()
737 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_vortex_a3d_ild_info()
738 uinfo->count = 2; in snd_vortex_a3d_ild_info()
739 uinfo->value.integer.min = 0x00000000; in snd_vortex_a3d_ild_info()
740 uinfo->value.integer.max = 0xffffffff; in snd_vortex_a3d_ild_info()
747 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_vortex_a3d_filter_info()
748 uinfo->count = 4; in snd_vortex_a3d_filter_info()
749 uinfo->value.integer.min = 0x00000000; in snd_vortex_a3d_filter_info()
750 uinfo->value.integer.max = 0xffffffff; in snd_vortex_a3d_filter_info()
757 //a3dsrc_t *a = kcontrol->private_data; in snd_vortex_a3d_get()
767 a3dsrc_t *a = kcontrol->private_data; in snd_vortex_a3d_hrtf_put() local
771 coord[i] = ucontrol->value.integer.value[i]; in snd_vortex_a3d_hrtf_put()
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
788 coord[i] = ucontrol->value.integer.value[i]; in snd_vortex_a3d_itd_put()
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
806 l = ucontrol->value.integer.value[0]; in snd_vortex_a3d_ild_put()
807 r = ucontrol->value.integer.value[1]; in snd_vortex_a3d_ild_put()
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
823 params[i] = ucontrol->value.integer.value[i]; in snd_vortex_a3d_filter_put()
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()
852 kcontrol = snd_ctl_new1(&vortex_a3d_kcontrol, &vortex->a3d[i]); in vortex_a3d_register_controls()
854 return -ENOMEM; in vortex_a3d_register_controls()
855 kcontrol->id.numid = CTRLID_HRTF; in vortex_a3d_register_controls()
856 kcontrol->info = snd_vortex_a3d_hrtf_info; in vortex_a3d_register_controls()
857 kcontrol->put = snd_vortex_a3d_hrtf_put; in vortex_a3d_register_controls()
858 err = snd_ctl_add(vortex->card, kcontrol); in vortex_a3d_register_controls()
864 kcontrol = snd_ctl_new1(&vortex_a3d_kcontrol, &vortex->a3d[i]); in vortex_a3d_register_controls()
866 return -ENOMEM; in vortex_a3d_register_controls()
867 kcontrol->id.numid = CTRLID_ITD; in vortex_a3d_register_controls()
868 kcontrol->info = snd_vortex_a3d_itd_info; in vortex_a3d_register_controls()
869 kcontrol->put = snd_vortex_a3d_itd_put; in vortex_a3d_register_controls()
870 err = snd_ctl_add(vortex->card, kcontrol); in vortex_a3d_register_controls()
876 kcontrol = snd_ctl_new1(&vortex_a3d_kcontrol, &vortex->a3d[i]); in vortex_a3d_register_controls()
878 return -ENOMEM; in vortex_a3d_register_controls()
879 kcontrol->id.numid = CTRLID_GAINS; in vortex_a3d_register_controls()
880 kcontrol->info = snd_vortex_a3d_ild_info; in vortex_a3d_register_controls()
881 kcontrol->put = snd_vortex_a3d_ild_put; in vortex_a3d_register_controls()
882 err = snd_ctl_add(vortex->card, kcontrol); in vortex_a3d_register_controls()
888 kcontrol = snd_ctl_new1(&vortex_a3d_kcontrol, &vortex->a3d[i]); in vortex_a3d_register_controls()
890 return -ENOMEM; in vortex_a3d_register_controls()
891 kcontrol->id.numid = CTRLID_FILTER; in vortex_a3d_register_controls()
892 kcontrol->info = snd_vortex_a3d_filter_info; in vortex_a3d_register_controls()
893 kcontrol->put = snd_vortex_a3d_filter_put; in vortex_a3d_register_controls()
894 err = snd_ctl_add(vortex->card, kcontrol); in vortex_a3d_register_controls()