Lines Matching refs:hw
26 static void lookup_voices(struct snd_emux *emux, struct snd_emu10k1 *hw,
36 static void set_fmmod(struct snd_emu10k1 *hw, struct snd_emux_voice *vp);
37 static void set_fm2frq2(struct snd_emu10k1 *hw, struct snd_emux_voice *vp);
38 static void set_filterQ(struct snd_emu10k1 *hw, struct snd_emux_voice *vp);
79 snd_emu10k1_synth_get_voice(struct snd_emu10k1 *hw) in snd_emu10k1_synth_get_voice() argument
86 emu = hw->synth; in snd_emu10k1_synth_get_voice()
88 lookup_voices(emu, hw, best, 1); /* no OFF voices */ in snd_emu10k1_synth_get_voice()
120 struct snd_emu10k1 *hw; in release_voice() local
122 hw = vp->hw; in release_voice()
124 snd_emu10k1_ptr_write(hw, DCYSUSM, vp->ch, dcysusv); in release_voice()
126 snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, dcysusv); in release_voice()
136 struct snd_emu10k1 *hw; in terminate_voice() local
140 hw = vp->hw; in terminate_voice()
141 snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0x807f | DCYSUSV_CHANNELENABLE_MASK); in terminate_voice()
156 struct snd_emu10k1 *hw; in free_voice() local
158 hw = vp->hw; in free_voice()
163 if (hw && (vp->ch >= 0)) { in free_voice()
164 snd_emu10k1_ptr_write(hw, IFATN, vp->ch, 0xff00); in free_voice()
165 snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0x807f | DCYSUSV_CHANNELENABLE_MASK); in free_voice()
167 snd_emu10k1_ptr_write(hw, VTFT, vp->ch, 0xffff); in free_voice()
168 snd_emu10k1_ptr_write(hw, CVCF, vp->ch, 0xffff); in free_voice()
169 snd_emu10k1_voice_free(hw, &hw->voices[vp->ch]); in free_voice()
182 struct snd_emu10k1 *hw; in update_voice() local
184 hw = vp->hw; in update_voice()
186 snd_emu10k1_ptr_write(hw, IFATN_ATTENUATION, vp->ch, vp->avol); in update_voice()
188 snd_emu10k1_ptr_write(hw, IP, vp->ch, vp->apitch); in update_voice()
190 snd_emu10k1_ptr_write(hw, PTRX_FXSENDAMOUNT_A, vp->ch, vp->apan); in update_voice()
191 snd_emu10k1_ptr_write(hw, PTRX_FXSENDAMOUNT_B, vp->ch, vp->aaux); in update_voice()
194 set_fmmod(hw, vp); in update_voice()
196 snd_emu10k1_ptr_write(hw, TREMFRQ, vp->ch, vp->reg.parm.tremfrq); in update_voice()
198 set_fm2frq2(hw, vp); in update_voice()
200 set_filterQ(hw, vp); in update_voice()
209 lookup_voices(struct snd_emux *emu, struct snd_emu10k1 *hw, in lookup_voices() argument
242 val = snd_emu10k1_ptr_read(hw, CVCF_CURRENTVOL, vp->ch); in lookup_voices()
257 val = snd_emu10k1_ptr_read(hw, CCCA_CURRADDR, vp->ch); in lookup_voices()
277 struct snd_emu10k1 *hw; in get_voice() local
282 hw = emu->hw; in get_voice()
284 lookup_voices(emu, hw, best, 0); in get_voice()
291 if (snd_emu10k1_voice_alloc(hw, EMU10K1_SYNTH, 1, &hwvoice) < 0 || hwvoice == NULL) in get_voice()
314 struct snd_emu10k1 *hw; in start_voice() local
317 hw = vp->hw; in start_voice()
327 if (snd_emu10k1_memblk_map(hw, emem) < 0) { in start_voice()
339 if (hw->audigy) { in start_voice()
342 snd_emu10k1_ptr_write(hw, A_FXRT1, ch, temp); in start_voice()
346 snd_emu10k1_ptr_write(hw, FXRT, ch, temp); in start_voice()
350 snd_emu10k1_ptr_write(hw, DCYSUSV, ch, 0x0000); in start_voice()
351 snd_emu10k1_ptr_write(hw, VTFT, ch, 0x0000FFFF); in start_voice()
352 snd_emu10k1_ptr_write(hw, CVCF, ch, 0x0000FFFF); in start_voice()
353 snd_emu10k1_ptr_write(hw, PTRX, ch, 0); in start_voice()
354 snd_emu10k1_ptr_write(hw, CPF, ch, 0); in start_voice()
357 snd_emu10k1_ptr_write(hw, IP, vp->ch, vp->apitch); in start_voice()
360 snd_emu10k1_ptr_write(hw, ENVVAL, ch, vp->reg.parm.moddelay); in start_voice()
361 snd_emu10k1_ptr_write(hw, ATKHLDM, ch, vp->reg.parm.modatkhld); in start_voice()
362 snd_emu10k1_ptr_write(hw, DCYSUSM, ch, vp->reg.parm.moddcysus); in start_voice()
363 snd_emu10k1_ptr_write(hw, ENVVOL, ch, vp->reg.parm.voldelay); in start_voice()
364 snd_emu10k1_ptr_write(hw, ATKHLDV, ch, vp->reg.parm.volatkhld); in start_voice()
370 snd_emu10k1_ptr_write(hw, IFATN, vp->ch, temp); in start_voice()
373 snd_emu10k1_ptr_write(hw, PEFE, ch, vp->reg.parm.pefe); in start_voice()
376 snd_emu10k1_ptr_write(hw, LFOVAL1, ch, vp->reg.parm.lfo1delay); in start_voice()
377 snd_emu10k1_ptr_write(hw, LFOVAL2, ch, vp->reg.parm.lfo2delay); in start_voice()
380 set_fmmod(hw, vp); in start_voice()
382 snd_emu10k1_ptr_write(hw, TREMFRQ, vp->ch, vp->reg.parm.tremfrq); in start_voice()
384 set_fm2frq2(hw, vp); in start_voice()
391 snd_emu10k1_ptr_write(hw, PSST, vp->ch, (temp << 24) | addr); in start_voice()
399 snd_emu10k1_ptr_write(hw, DSL, ch, temp); in start_voice()
402 snd_emu10k1_ptr_write(hw, Z1, ch, 0); in start_voice()
403 snd_emu10k1_ptr_write(hw, Z2, ch, 0); in start_voice()
406 …temp = (hw->silent_page.addr << hw->address_mode) | (hw->address_mode ? MAP_PTI_MASK1 : MAP_PTI_MA… in start_voice()
407 snd_emu10k1_ptr_write(hw, MAPA, ch, temp); in start_voice()
408 snd_emu10k1_ptr_write(hw, MAPB, ch, temp); in start_voice()
422 snd_emu10k1_ptr_write(hw, CCR, ch, 0x1c << 16); in start_voice()
423 snd_emu10k1_ptr_write(hw, CDE, ch, sample); in start_voice()
424 snd_emu10k1_ptr_write(hw, CDF, ch, sample); in start_voice()
427 …temp = ((unsigned int)hw->silent_page.addr << hw_address_mode) | (hw->address_mode ? MAP_PTI_MASK1… in start_voice()
428 snd_emu10k1_ptr_write(hw, MAPA, ch, temp); in start_voice()
429 snd_emu10k1_ptr_write(hw, MAPB, ch, temp); in start_voice()
435 snd_emu10k1_ptr_write(hw, CCR, ch, val); in start_voice()
451 snd_emu10k1_ptr_write(hw, CCCA, ch, temp); in start_voice()
455 snd_emu10k1_ptr_write(hw, VTFT, ch, temp | vp->ftarget); in start_voice()
456 snd_emu10k1_ptr_write(hw, CVCF, ch, temp | 0xff00); in start_voice()
467 struct snd_emu10k1 *hw; in trigger_voice() local
470 hw = vp->hw; in trigger_voice()
483 snd_emu10k1_ptr_write(hw, PTRX, vp->ch, temp); in trigger_voice()
486 snd_emu10k1_ptr_write(hw, CPF, vp->ch, ptarget); in trigger_voice()
489 snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, vp->reg.parm.voldcysus|DCYSUSV_CHANNELENABLE_MASK); in trigger_voice()
496 set_fmmod(struct snd_emu10k1 *hw, struct snd_emux_voice *vp) in set_fmmod() argument
509 snd_emu10k1_ptr_write(hw, FMMOD, vp->ch, fmmod); in set_fmmod()
514 set_fm2frq2(struct snd_emu10k1 *hw, struct snd_emux_voice *vp) in set_fm2frq2() argument
527 snd_emu10k1_ptr_write(hw, FM2FRQ2, vp->ch, fm2frq2); in set_fm2frq2()
532 set_filterQ(struct snd_emu10k1 *hw, struct snd_emux_voice *vp) in set_filterQ() argument
535 val = snd_emu10k1_ptr_read(hw, CCCA, vp->ch) & ~CCCA_RESONANCE; in set_filterQ()
537 snd_emu10k1_ptr_write(hw, CCCA, vp->ch, val); in set_filterQ()