Lines Matching +full:en +full:- +full:global

1 // SPDX-License-Identifier: GPL-2.0-or-later
13 static void vortex_fifo_setwtvalid(vortex_t * vortex, int fifo, int en);
14 static void vortex_connection_adb_mixin(vortex_t * vortex, int en,
18 static void vortex_connection_mixin_mix(vortex_t * vortex, int en,
32 //temp = hwread(vortex->mmio, 0x80 + ((wt >> 0x5)<< 0xf) + (((wt & 0x1f) >> 1) << 2)); in vortex_wt_setstereo()
33 temp = hwread(vortex->mmio, WT_STEREO(wt)); in vortex_wt_setstereo()
35 //hwwrite(vortex->mmio, 0x80 + ((wt >> 0x5)<< 0xf) + (((wt & 0x1f) >> 1) << 2), temp); in vortex_wt_setstereo()
36 hwwrite(vortex->mmio, WT_STEREO(wt), temp); in vortex_wt_setstereo()
40 static void vortex_wt_setdsout(vortex_t * vortex, u32 wt, int en) in vortex_wt_setdsout() argument
45 temp = hwread(vortex->mmio, WT_DSREG((wt >= 0x20) ? 1 : 0)); in vortex_wt_setdsout()
46 if (en) in vortex_wt_setdsout()
50 hwwrite(vortex->mmio, WT_DSREG((wt >= 0x20) ? 1 : 0), temp); in vortex_wt_setdsout()
56 wt_voice_t *voice = &(vortex->wt_voice[wt]); in vortex_wt_allocroute()
63 vortex_wt_setstereo(vortex, wt, nr_ch - 1); in vortex_wt_allocroute()
70 hwwrite(vortex->mmio, WT_SRAMP(0), 0x880000); in vortex_wt_allocroute()
71 //hwwrite(vortex->mmio, WT_GMODE(0), 0xffffffff); in vortex_wt_allocroute()
73 hwwrite(vortex->mmio, WT_SRAMP(1), 0x880000); in vortex_wt_allocroute()
74 //hwwrite(vortex->mmio, WT_GMODE(1), 0xffffffff); in vortex_wt_allocroute()
76 hwwrite(vortex->mmio, WT_PARM(wt, 0), 0); in vortex_wt_allocroute()
77 hwwrite(vortex->mmio, WT_PARM(wt, 1), 0); in vortex_wt_allocroute()
78 hwwrite(vortex->mmio, WT_PARM(wt, 2), 0); in vortex_wt_allocroute()
80 temp = hwread(vortex->mmio, WT_PARM(wt, 3)); in vortex_wt_allocroute()
81 dev_dbg(vortex->card->dev, "WT PARM3: %x\n", temp); in vortex_wt_allocroute()
82 //hwwrite(vortex->mmio, WT_PARM(wt, 3), temp); in vortex_wt_allocroute()
84 hwwrite(vortex->mmio, WT_DELAY(wt, 0), 0); in vortex_wt_allocroute()
85 hwwrite(vortex->mmio, WT_DELAY(wt, 1), 0); in vortex_wt_allocroute()
86 hwwrite(vortex->mmio, WT_DELAY(wt, 2), 0); in vortex_wt_allocroute()
87 hwwrite(vortex->mmio, WT_DELAY(wt, 3), 0); in vortex_wt_allocroute()
89 dev_dbg(vortex->card->dev, "WT GMODE: %x\n", in vortex_wt_allocroute()
90 hwread(vortex->mmio, WT_GMODE(wt))); in vortex_wt_allocroute()
92 hwwrite(vortex->mmio, WT_PARM(wt, 2), 0xffffffff); in vortex_wt_allocroute()
93 hwwrite(vortex->mmio, WT_PARM(wt, 3), 0xcff1c810); in vortex_wt_allocroute()
95 voice->parm0 = voice->parm1 = 0xcfb23e2f; in vortex_wt_allocroute()
96 hwwrite(vortex->mmio, WT_PARM(wt, 0), voice->parm0); in vortex_wt_allocroute()
97 hwwrite(vortex->mmio, WT_PARM(wt, 1), voice->parm1); in vortex_wt_allocroute()
98 dev_dbg(vortex->card->dev, "WT GMODE 2 : %x\n", in vortex_wt_allocroute()
99 hwread(vortex->mmio, WT_GMODE(wt))); in vortex_wt_allocroute()
104 static void vortex_wt_connect(vortex_t * vortex, int en) in vortex_wt_connect() argument
119 vortex->fixed_res, en, in vortex_wt_connect()
121 vortex->mixwt[(i * NR_WTROUTES) + ii] = mix; in vortex_wt_connect()
123 vortex_route(vortex, en, 0x11, in vortex_wt_connect()
126 vortex_connection_mixin_mix(vortex, en, mix, in vortex_wt_connect()
127 vortex->mixplayb[ii % 2], 0); in vortex_wt_connect()
129 vortex_connection_mixin_mix(vortex, en, in vortex_wt_connect()
131 vortex->mixplayb[2 + in vortex_wt_connect()
136 hwwrite(vortex->mmio, WT_RUN(i), 1); in vortex_wt_connect()
147 return hwread(vortex->mmio, WT_PARM(wt, 3));
150 return hwread(vortex->mmio, WT_GMODE(wt));
164 if (wt >= NR_WT) // 0x40 -> NR_WT
167 if ((reg - 0x20) > 0) {
168 if ((reg - 0x21) != 0)
174 hwwrite(vortex->mmio, eax, c);
189 dev_warn(vortex->card->dev, in vortex_wt_SetReg()
196 dev_err(vortex->card->dev, in vortex_wt_SetReg()
211 hwwrite(vortex->mmio, WT_RUN(wt), val); in vortex_wt_SetReg()
218 hwwrite(vortex->mmio, WT_PARM(wt, 0), val); in vortex_wt_SetReg()
225 hwwrite(vortex->mmio, WT_PARM(wt, 1), val); in vortex_wt_SetReg()
232 hwwrite(vortex->mmio, WT_PARM(wt, 2), val); in vortex_wt_SetReg()
239 hwwrite(vortex->mmio, WT_PARM(wt, 3), val); in vortex_wt_SetReg()
246 hwwrite(vortex->mmio, WT_MUTE(wt), val); in vortex_wt_SetReg()
254 hwwrite(vortex->mmio, WT_DELAY(wt, 3), val); in vortex_wt_SetReg()
255 hwwrite(vortex->mmio, WT_DELAY(wt, 2), val); in vortex_wt_SetReg()
256 hwwrite(vortex->mmio, WT_DELAY(wt, 1), val); in vortex_wt_SetReg()
257 hwwrite(vortex->mmio, WT_DELAY(wt, 0), val); in vortex_wt_SetReg()
259 /* Global WT block parameters */ in vortex_wt_SetReg()
281 hwwrite(vortex->mmio, ecx, val); in vortex_wt_SetReg()
316 vortex_wt_SetReg(vortex, 0xb, edi, 0); /* delay 0x400 - 0x40c */ in vortex_wt_init()
327 wt_voice_t *voice = &(vortex->wt_voice[wt]);
331 voice->parm0 &= 0xff00ffff;
332 voice->parm0 |= (vol[0] & 0xff) << 0x10;
333 voice->parm1 &= 0xff00ffff;
334 voice->parm1 |= (vol[1] & 0xff) << 0x10;
337 hwwrite(vortex, WT_PARM(wt, 0), voice->parm0);
338 hwwrite(vortex, WT_PARM(wt, 1), voice->parm0);
340 if (voice->this_1D0 & 4) {
345 voice->parm3 &= 0xFFFFC07F;
346 voice->parm3 |= (ecx & 0x7f) << 7;
347 voice->parm3 &= 0xFFFFFF80;
348 voice->parm3 |= (eax & 0x7f);
350 voice->parm3 &= 0xFFE03FFF;
351 voice->parm3 |= (eax & 0xFE00) << 5;
354 hwwrite(vortex, WT_PARM(wt, 3), voice->parm3);
360 wt_voice_t *voice = &(vortex->wt_voice[wt]);
377 eax--;
389 voice->parm0 &= 0xffff0001;
390 voice->parm0 |= (eax & 0x7fff) << 1;
391 voice->parm1 = voice->parm0 | 1;
395 hwwrite(vortex->mmio, WT_PARM(wt, 0), voice->parm0);
396 hwwrite(vortex->mmio, WT_PARM(wt, 1), voice->parm1);