• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/sound/isa/sb/

Lines Matching defs:vp

30 static int start_voice(struct snd_emux_voice *vp);
31 static void trigger_voice(struct snd_emux_voice *vp);
32 static void release_voice(struct snd_emux_voice *vp);
33 static void update_voice(struct snd_emux_voice *vp, int update);
35 static void terminate_voice(struct snd_emux_voice *vp);
44 static void set_pitch(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
45 static void set_volume(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
46 static void set_pan(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
47 static void set_fmmod(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
48 static void set_tremfreq(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
49 static void set_fm2frq2(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
50 static void set_filterQ(struct snd_emu8000 *hw, struct snd_emux_voice *vp);
95 release_voice(struct snd_emux_voice *vp)
100 hw = vp->hw;
101 dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease;
102 EMU8000_DCYSUS_WRITE(hw, vp->ch, dcysusv);
103 dcysusv = 0x8000 | (unsigned char)vp->reg.parm.volrelease;
104 EMU8000_DCYSUSV_WRITE(hw, vp->ch, dcysusv);
111 terminate_voice(struct snd_emux_voice *vp)
115 hw = vp->hw;
116 EMU8000_DCYSUSV_WRITE(hw, vp->ch, 0x807F);
123 update_voice(struct snd_emux_voice *vp, int update)
127 hw = vp->hw;
129 set_volume(hw, vp);
131 set_pitch(hw, vp);
133 vp->port->ctrls[EMUX_MD_REALTIME_PAN])
134 set_pan(hw, vp);
136 set_fmmod(hw, vp);
138 set_tremfreq(hw, vp);
140 set_fm2frq2(hw, vp);
142 set_filterQ(hw, vp);
152 * The channel index (vp->ch) must be initialized in this routine.
159 struct snd_emux_voice *vp;
187 vp = &emu->voices[i];
188 state = vp->state;
195 val = (EMU8000_CVCF_READ(hw, vp->ch) >> 16) & 0xffff;
206 (vp->reg.sample_mode & SNDRV_SFNT_SAMPLE_SINGLESHOT)) {
207 val = EMU8000_CCCA_READ(hw, vp->ch) & 0xffffff;
208 if (val >= vp->reg.loopstart)
212 if (vp->time < bp->time) {
213 bp->time = vp->time;
220 vp = &emu->voices[best[i].voice];
221 vp->ch = best[i].voice;
222 return vp;
233 start_voice(struct snd_emux_voice *vp)
241 hw = vp->hw;
242 ch = vp->ch;
243 chan = vp->chan;
253 set_pitch(hw, vp);
256 EMU8000_ENVVAL_WRITE(hw, ch, vp->reg.parm.moddelay);
257 EMU8000_ATKHLD_WRITE(hw, ch, vp->reg.parm.modatkhld);
258 EMU8000_DCYSUS_WRITE(hw, ch, vp->reg.parm.moddcysus);
259 EMU8000_ENVVOL_WRITE(hw, ch, vp->reg.parm.voldelay);
260 EMU8000_ATKHLDV_WRITE(hw, ch, vp->reg.parm.volatkhld);
265 set_volume(hw, vp);
268 EMU8000_PEFE_WRITE(hw, ch, vp->reg.parm.pefe);
271 EMU8000_LFO1VAL_WRITE(hw, ch, vp->reg.parm.lfo1delay);
272 EMU8000_LFO2VAL_WRITE(hw, ch, vp->reg.parm.lfo2delay);
275 set_fmmod(hw, vp);
277 set_tremfreq(hw, vp);
279 set_fm2frq2(hw, vp);
281 set_pan(hw, vp);
284 addr = vp->reg.loopend - 1;
285 temp = vp->reg.parm.chorus;
292 addr = vp->reg.start - 1;
293 temp = vp->reg.parm.filterQ;
302 temp = vp->vtarget << 16;
303 EMU8000_VTFT_WRITE(hw, ch, temp | vp->ftarget);
313 trigger_voice(struct snd_emux_voice *vp)
315 int ch = vp->ch;
319 hw = vp->hw;
322 temp = vp->reg.parm.reverb;
323 temp += (int)vp->chan->control[MIDI_CTL_E1_REVERB_DEPTH] * 9 / 10;
325 temp = (temp << 8) | (vp->ptarget << 16) | vp->aaux;
327 EMU8000_CPF_WRITE(hw, ch, vp->ptarget << 16);
328 EMU8000_DCYSUSV_WRITE(hw, ch, vp->reg.parm.voldcysus);
348 set_pitch(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
350 EMU8000_IP_WRITE(hw, vp->ch, vp->apitch);
357 set_volume(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
361 ifatn = (unsigned char)vp->acutoff;
363 ifatn |= (unsigned char)vp->avol;
364 EMU8000_IFATN_WRITE(hw, vp->ch, ifatn);
371 set_pan(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
375 temp = ((unsigned int)vp->apan<<24) | ((unsigned int)vp->reg.loopstart - 1);
376 EMU8000_PSST_WRITE(hw, vp->ch, temp);
382 set_fmmod(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
389 pitch = (char)(vp->reg.parm.fmmod>>8);
390 cutoff = (vp->reg.parm.fmmod & 0xff);
391 modulation = vp->chan->gm_modulation + vp->chan->midi_pressure;
395 EMU8000_FMMOD_WRITE(hw, vp->ch, fmmod);
400 set_tremfreq(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
402 EMU8000_TREMFRQ_WRITE(hw, vp->ch, vp->reg.parm.tremfrq);
407 set_fm2frq2(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
414 pitch = (char)(vp->reg.parm.fm2frq2>>8);
415 freq = vp->reg.parm.fm2frq2 & 0xff;
416 modulation = vp->chan->gm_modulation + vp->chan->midi_pressure;
420 EMU8000_FM2FRQ2_WRITE(hw, vp->ch, fm2frq2);
425 set_filterQ(struct snd_emu8000 *hw, struct snd_emux_voice *vp)
428 addr = EMU8000_CCCA_READ(hw, vp->ch) & 0xffffff;
429 addr |= (vp->reg.parm.filterQ << 28);
430 EMU8000_CCCA_WRITE(hw, vp->ch, addr);