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

Lines Matching refs:voice

126 static void debug_alloc(struct snd_opl3 *opl3, char *s, int voice) {
130 printk(KERN_DEBUG "time %.5i: %s [%.2i]: ", opl3->use_time, s, voice);
138 * Get a FM voice (channel) to play a note on.
142 int chan_4op_1; /* first voice for 4op instrument */
143 int chan_4op_2; /* second voice for 4op instrument */
161 int voice;
167 best[i].voice = -1;
185 /* allocate 4op voice */
191 /* kill one voice, CHEAP */
203 /* allocate 2op voice */
208 /* kill one voice on 2op channel, CHEAP */
216 bp->voice = i;
221 if (best[i].voice >= 0) {
223 printk(KERN_DEBUG "%s %iop allocation on voice %i\n",
225 best[i].voice);
227 return best[i].voice;
300 int voice;
331 /* in SEQ mode, drum voice numbers are notes on drum channel */
385 /* in SEQ mode, allocate voice on free OPL3 channel */
387 voice = opl3_get_voice(opl3, instr_4op, chan);
389 /* remap OSS voice */
390 voice = snd_opl3_oss_map[chan->number];
393 if (voice < MAX_OPL2_VOICES) {
396 voice_offset = voice;
401 voice_offset = voice - MAX_OPL2_VOICES;
405 /* kill voice on channel */
406 vp = &opl3->voices[voice];
413 vp2 = &opl3->voices[voice + 3];
472 /* Program the FM voice characteristics */
479 /* Set OPL3 AM_VIB register of requested voice/operator */
484 /* Set OPL3 KSL_LEVEL register of requested voice/operator */
489 /* Set OPL3 ATTACK_DECAY register of requested voice/operator */
494 /* Set OPL3 SUSTAIN_RELEASE register of requested voice/operator */
507 /* Set output voice connection */
519 /* Set output voice connection */
545 /* Set OPL3 FNUM_LOW register of requested voice */
549 opl3->voices[voice].keyon_reg = blocknum;
555 snd_printk(KERN_DEBUG " --> trigger voice %i\n", voice);
557 /* Set OPL3 KEYON_BLOCK register of requested voice */
563 opl3->voices[voice].note_off = jiffies +
566 opl3->voices[voice].note_off_check = 1;
568 opl3->voices[voice].note_off_check = 0;
581 vp2 = &opl3->voices[voice + 3];
588 /* 4op killed by 2op, release bounded voice */
589 vp2 = &opl3->voices[voice + 3];
597 debug_alloc(opl3, "note on ", voice);
618 static void snd_opl3_kill_voice(struct snd_opl3 *opl3, int voice)
626 if (snd_BUG_ON(voice >= MAX_OPL3_VOICES))
629 vp = &opl3->voices[voice];
630 if (voice < MAX_OPL2_VOICES) {
633 voice_offset = voice;
637 voice_offset = voice - MAX_OPL2_VOICES;
640 /* kill voice */
642 snd_printk(KERN_DEBUG " --> kill voice %i\n", voice);
652 vp2 = &opl3->voices[voice + 3];
659 debug_alloc(opl3, "note off", voice);
672 int voice;
689 for (voice = 0; voice < opl3->max_voices; voice++) {
690 vp = &opl3->voices[voice];
692 snd_opl3_kill_voice(opl3, voice);
698 voice = snd_opl3_oss_map[chan->number];
699 snd_opl3_kill_voice(opl3, voice);
743 static void snd_opl3_update_pitch(struct snd_opl3 *opl3, int voice)
753 if (snd_BUG_ON(voice >= MAX_OPL3_VOICES))
756 vp = &opl3->voices[voice];
760 if (voice < MAX_OPL2_VOICES) {
763 voice_offset = voice;
767 voice_offset = voice - MAX_OPL2_VOICES;
772 /* Set OPL3 FNUM_LOW register of requested voice */
781 /* Set OPL3 KEYON_BLOCK register of requested voice */
789 * Update voice pitch controller
793 int voice;
801 for (voice = 0; voice < opl3->max_voices; voice++) {
802 vp = &opl3->voices[voice];
804 snd_opl3_update_pitch(opl3, voice);
810 voice = snd_opl3_oss_map[chan->number];
811 snd_opl3_update_pitch(opl3, voice);