• 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:opl3

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);
131 for (i = 0; i < opl3->max_voices; i++)
132 printk("%c", *(str + opl3->voices[i].state + 1));
140 static int opl3_get_voice(struct snd_opl3 *opl3, int instr_4op,
171 for (i = 0; i < opl3->max_voices; i++) {
172 vp = &opl3->voices[i];
195 vp2 = &opl3->voices[i + 3];
242 struct snd_opl3 *opl3 = (struct snd_opl3 *)data;
247 spin_lock_irqsave(&opl3->voice_lock, flags);
248 for (i = 0; i < opl3->max_voices; i++) {
249 struct snd_opl3_voice *vp = &opl3->voices[i];
252 snd_opl3_note_off_unsafe(opl3, vp->note, 0,
258 spin_unlock_irqrestore(&opl3->voice_lock, flags);
260 spin_lock_irqsave(&opl3->sys_timer_lock, flags);
262 opl3->tlist.expires = jiffies + 1; /* invoke again */
263 add_timer(&opl3->tlist);
265 opl3->sys_timer_status = 0;
267 spin_unlock_irqrestore(&opl3->sys_timer_lock, flags);
273 static void snd_opl3_start_timer(struct snd_opl3 *opl3)
276 spin_lock_irqsave(&opl3->sys_timer_lock, flags);
277 if (! opl3->sys_timer_status) {
278 opl3->tlist.expires = jiffies + 1;
279 add_timer(&opl3->tlist);
280 opl3->sys_timer_status = 1;
282 spin_unlock_irqrestore(&opl3->sys_timer_lock, flags);
297 struct snd_opl3 *opl3;
323 opl3 = p;
332 if (opl3->synth_mode == SNDRV_OPL3_MODE_SEQ) {
351 spin_lock_irqsave(&opl3->voice_lock, flags);
354 snd_opl3_drum_switch(opl3, note, vel, 1, chan);
355 spin_unlock_irqrestore(&opl3->voice_lock, flags);
360 patch = snd_opl3_find_patch(opl3, prg, bank, 0);
362 spin_unlock_irqrestore(&opl3->voice_lock, flags);
372 if (opl3->hardware >= OPL3_HW_OPL3) {
377 spin_unlock_irqrestore(&opl3->voice_lock, flags);
386 if (opl3->synth_mode == SNDRV_OPL3_MODE_SEQ) {
387 voice = opl3_get_voice(opl3, instr_4op, chan);
406 vp = &opl3->voices[voice];
410 opl3->command(opl3, opl3_reg, reg_val);
413 vp2 = &opl3->voices[voice + 3];
418 opl3->command(opl3, opl3_reg, reg_val);
424 if ((opl3->connection_reg ^ connect_mask) & connect_mask) {
425 opl3->connection_reg |= connect_mask;
428 opl3->command(opl3, opl3_reg, opl3->connection_reg);
431 if ((opl3->connection_reg ^ ~connect_mask) & connect_mask) {
432 opl3->connection_reg &= ~connect_mask;
435 opl3->command(opl3, opl3_reg, opl3->connection_reg);
441 opl3->connection_reg);
445 * between FM operators (see include/opl3.h)
482 opl3->command(opl3, opl3_reg, reg_val);
487 opl3->command(opl3, opl3_reg, reg_val);
492 opl3->command(opl3, opl3_reg, reg_val);
497 opl3->command(opl3, opl3_reg, reg_val);
502 opl3->command(opl3, opl3_reg, reg_val);
514 opl3->command(opl3, opl3_reg, reg_val);
527 opl3->command(opl3, opl3_reg, reg_val);
547 opl3->command(opl3, opl3_reg, fnum);
549 opl3->voices[voice].keyon_reg = blocknum;
559 opl3->command(opl3, opl3_reg, blocknum);
563 opl3->voices[voice].note_off = jiffies +
565 snd_opl3_start_timer(opl3);
566 opl3->voices[voice].note_off_check = 1;
568 opl3->voices[voice].note_off_check = 0;
574 vp->time = opl3->use_time++;
581 vp2 = &opl3->voices[voice + 3];
582 vp2->time = opl3->use_time++;
589 vp2 = &opl3->voices[voice + 3];
590 vp2->time = opl3->use_time++;
597 debug_alloc(opl3, "note on ", voice);
615 spin_unlock_irqrestore(&opl3->voice_lock, flags);
618 static void snd_opl3_kill_voice(struct snd_opl3 *opl3, int voice)
629 vp = &opl3->voices[voice];
646 opl3->command(opl3, opl3_reg, vp->keyon_reg);
649 vp->time = opl3->use_time++;
652 vp2 = &opl3->voices[voice + 3];
654 vp2->time = opl3->use_time++;
659 debug_alloc(opl3, "note off", voice);
670 struct snd_opl3 *opl3;
675 opl3 = p;
682 if (opl3->synth_mode == SNDRV_OPL3_MODE_SEQ) {
684 snd_opl3_drum_switch(opl3, note, vel, 0, chan);
689 for (voice = 0; voice < opl3->max_voices; voice++) {
690 vp = &opl3->voices[voice];
692 snd_opl3_kill_voice(opl3, voice);
699 snd_opl3_kill_voice(opl3, voice);
707 struct snd_opl3 *opl3 = p;
710 spin_lock_irqsave(&opl3->voice_lock, flags);
712 spin_unlock_irqrestore(&opl3->voice_lock, flags);
720 struct snd_opl3 *opl3;
722 opl3 = p;
734 struct snd_opl3 *opl3;
736 opl3 = p;
743 static void snd_opl3_update_pitch(struct snd_opl3 *opl3, int voice)
756 vp = &opl3->voices[voice];
774 opl3->command(opl3, opl3_reg, fnum);
783 opl3->command(opl3, opl3_reg, blocknum);
785 vp->time = opl3->use_time++;
791 static void snd_opl3_pitch_ctrl(struct snd_opl3 *opl3, struct snd_midi_channel *chan)
798 spin_lock_irqsave(&opl3->voice_lock, flags);
800 if (opl3->synth_mode == SNDRV_OPL3_MODE_SEQ) {
801 for (voice = 0; voice < opl3->max_voices; voice++) {
802 vp = &opl3->voices[voice];
804 snd_opl3_update_pitch(opl3, voice);
811 snd_opl3_update_pitch(opl3, voice);
814 spin_unlock_irqrestore(&opl3->voice_lock, flags);
823 struct snd_opl3 *opl3;
825 opl3 = p;
834 opl3->drum_reg |= OPL3_VIBRATO_DEPTH;
836 opl3->drum_reg &= ~OPL3_VIBRATO_DEPTH;
837 opl3->command(opl3, OPL3_LEFT | OPL3_REG_PERCUSSION,
838 opl3->drum_reg);
842 opl3->drum_reg |= OPL3_TREMOLO_DEPTH;
844 opl3->drum_reg &= ~OPL3_TREMOLO_DEPTH;
845 opl3->command(opl3, OPL3_LEFT | OPL3_REG_PERCUSSION,
846 opl3->drum_reg);
849 snd_opl3_pitch_ctrl(opl3, chan);
860 struct snd_opl3 *opl3;
862 opl3 = p;
875 struct snd_opl3 *opl3;
877 opl3 = p;