Lines Matching refs:voice

61 static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice);
126 struct snd_dm_fm_voice voice; in snd_opl3_ioctl() local
127 if (copy_from_user(&voice, argp, sizeof(struct snd_dm_fm_voice))) in snd_opl3_ioctl()
129 return snd_opl3_set_voice(opl3, &voice); in snd_opl3_ioctl()
400 if (note->voice >= ((opl3->fm_mode == SNDRV_DM_FM_MODE_OPL3) ? in snd_opl3_play_note()
405 if (note->voice < MAX_OPL2_VOICES) { in snd_opl3_play_note()
408 voice_offset = note->voice; in snd_opl3_play_note()
412 voice_offset = note->voice - MAX_OPL2_VOICES; in snd_opl3_play_note()
437 static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice) in snd_opl3_set_voice() argument
447 if (voice->op > 1) in snd_opl3_set_voice()
451 if (voice->voice >= ((opl3->fm_mode == SNDRV_DM_FM_MODE_OPL3) ? in snd_opl3_set_voice()
456 if (voice->voice < MAX_OPL2_VOICES) { in snd_opl3_set_voice()
459 voice_offset = voice->voice; in snd_opl3_set_voice()
463 voice_offset = voice->voice - MAX_OPL2_VOICES; in snd_opl3_set_voice()
467 voice_op = array_index_nospec(voice->op, 4); in snd_opl3_set_voice()
472 if (voice->am) in snd_opl3_set_voice()
475 if (voice->vibrato) in snd_opl3_set_voice()
478 if (voice->do_sustain) in snd_opl3_set_voice()
481 if (voice->kbd_scale) in snd_opl3_set_voice()
484 reg_val |= voice->harmonic & OPL3_MULTIPLE_MASK; in snd_opl3_set_voice()
491 reg_val = (voice->scale_level << 6) & OPL3_KSL_MASK; in snd_opl3_set_voice()
493 reg_val |= ~voice->volume & OPL3_TOTAL_LEVEL_MASK; in snd_opl3_set_voice()
500 reg_val = (voice->attack << 4) & OPL3_ATTACK_MASK; in snd_opl3_set_voice()
502 reg_val |= voice->decay & OPL3_DECAY_MASK; in snd_opl3_set_voice()
509 reg_val = (voice->sustain << 4) & OPL3_SUSTAIN_MASK; in snd_opl3_set_voice()
511 reg_val |= voice->release & OPL3_RELEASE_MASK; in snd_opl3_set_voice()
518 reg_val = (voice->feedback << 1) & OPL3_FEEDBACK_MASK; in snd_opl3_set_voice()
520 if (voice->connection) in snd_opl3_set_voice()
524 if (voice->left) in snd_opl3_set_voice()
526 if (voice->right) in snd_opl3_set_voice()
534 reg_val = voice->waveform & OPL3_WAVE_SELECT_MASK; in snd_opl3_set_voice()