Lines Matching refs:vortex

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,
21 static void vortex_fifo_wtinitialize(vortex_t * vortex, int fifo, int j);
22 static int vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
28 static void vortex_wt_setstereo(vortex_t * vortex, u32 wt, u32 stereo) in vortex_wt_setstereo() argument
33 temp = hwread(vortex->mmio, WT_STEREO(wt)); 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()
50 hwwrite(vortex->mmio, WT_DSREG((wt >= 0x20) ? 1 : 0), temp); in vortex_wt_setdsout()
54 static int vortex_wt_allocroute(vortex_t * vortex, int wt, int nr_ch) in vortex_wt_allocroute() argument
56 wt_voice_t *voice = &(vortex->wt_voice[wt]); in vortex_wt_allocroute()
61 vortex_fifo_wtinitialize(vortex, wt, 1); in vortex_wt_allocroute()
62 vortex_fifo_setwtvalid(vortex, wt, 1); in vortex_wt_allocroute()
63 vortex_wt_setstereo(vortex, wt, nr_ch - 1); in vortex_wt_allocroute()
65 vortex_fifo_setwtvalid(vortex, wt, 0); in vortex_wt_allocroute()
68 vortex_wt_setdsout(vortex, wt, 1); in vortex_wt_allocroute()
70 hwwrite(vortex->mmio, WT_SRAMP(0), 0x880000); in vortex_wt_allocroute()
73 hwwrite(vortex->mmio, WT_SRAMP(1), 0x880000); 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()
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()
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
118 vortex_adb_checkinout(vortex, in vortex_wt_connect()
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()
128 if (VORTEX_IS_QUAD(vortex)) 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()
142 static int vortex_wt_GetReg(vortex_t * vortex, char reg, int wt)
147 return hwread(vortex->mmio, WT_PARM(wt, 3));
150 return hwread(vortex->mmio, WT_GMODE(wt));
158 vortex_wt_SetReg2(vortex_t * vortex, unsigned char reg, int wt,
182 vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt, in vortex_wt_SetReg() argument
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()
281 hwwrite(vortex->mmio, ecx, val); in vortex_wt_SetReg()
285 static void vortex_wt_init(vortex_t * vortex) in vortex_wt_init() argument
304 vortex_wt_SetReg(vortex, 0xc, edi, 0); /* ds_reg */ in vortex_wt_init()
305 vortex_wt_SetReg(vortex, 0xa, edi, var10); /* ctrl */ in vortex_wt_init()
306 vortex_wt_SetReg(vortex, 0x9, edi, var4); /* mramp */ in vortex_wt_init()
307 vortex_wt_SetReg(vortex, 0x8, edi, varc); /* aramp */ in vortex_wt_init()
308 vortex_wt_SetReg(vortex, 0x5, edi, var8); /* sramp */ in vortex_wt_init()
312 vortex_wt_SetReg(vortex, 0x4, edi, 0); /* param 3 0x20c */ in vortex_wt_init()
313 vortex_wt_SetReg(vortex, 0x3, edi, 0); /* param 2 0x208 */ in vortex_wt_init()
314 vortex_wt_SetReg(vortex, 0x2, edi, 0); /* param 1 0x204 */ in vortex_wt_init()
315 vortex_wt_SetReg(vortex, 0x1, edi, 0); /* param 0 0x200 */ in vortex_wt_init()
316 vortex_wt_SetReg(vortex, 0xb, edi, 0); /* delay 0x400 - 0x40c */ in vortex_wt_init()
320 vortex_wt_SetReg(vortex, 0xa, edi, var10); /* ctrl */ in vortex_wt_init()
325 static void vortex_wt_SetVolume(vortex_t * vortex, int wt, int vol[])
327 wt_voice_t *voice = &(vortex->wt_voice[wt]);
337 hwwrite(vortex, WT_PARM(wt, 0), voice->parm0);
338 hwwrite(vortex, WT_PARM(wt, 1), voice->parm0);
354 hwwrite(vortex, WT_PARM(wt, 3), voice->parm3);
358 static void vortex_wt_SetFrequency(vortex_t * vortex, int wt, unsigned int sr)
360 wt_voice_t *voice = &(vortex->wt_voice[wt]);
395 hwwrite(vortex->mmio, WT_PARM(wt, 0), voice->parm0);
396 hwwrite(vortex->mmio, WT_PARM(wt, 1), voice->parm1);