Lines Matching refs:chan
27 int *notep, int vel, struct snd_midi_channel *chan,
29 static int get_bank(struct snd_emux_port *port, struct snd_midi_channel *chan);
31 struct snd_midi_channel *chan, int free);
46 snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan) in snd_emux_note_on() argument
56 if (snd_BUG_ON(!port || !chan)) in snd_emux_note_on()
64 nvoices = get_zone(emu, port, ¬e, vel, chan, table); in snd_emux_note_on()
77 terminate_note1(emu, key, chan, 0); in snd_emux_note_on()
96 vp->chan = chan; in snd_emux_note_on()
121 vp->chan == chan) { in snd_emux_note_on()
132 struct snd_emux_effect_table *fx = chan->private; in snd_emux_note_on()
145 snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan) in snd_emux_note_off() argument
154 if (snd_BUG_ON(!port || !chan)) in snd_emux_note_off()
165 vp->chan == chan && vp->key == note) { in snd_emux_note_off()
222 snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan) in snd_emux_key_press() argument
231 if (snd_BUG_ON(!port || !chan)) in snd_emux_key_press()
242 vp->chan == chan && vp->key == note) { in snd_emux_key_press()
255 snd_emux_update_channel(struct snd_emux_port *port, struct snd_midi_channel *chan, int update) in snd_emux_update_channel() argument
272 if (vp->chan == chan) in snd_emux_update_channel()
311 snd_emux_control(void *p, int type, struct snd_midi_channel *chan) in snd_emux_control() argument
316 if (snd_BUG_ON(!port || !chan)) in snd_emux_control()
322 snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_VOLUME); in snd_emux_control()
326 snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_PAN); in snd_emux_control()
332 if (chan->control[type] >= 64) in snd_emux_control()
333 snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, -160, in snd_emux_control()
336 snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, 0, in snd_emux_control()
342 snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_PITCH); in snd_emux_control()
347 snd_emux_update_channel(port, chan, in snd_emux_control()
355 snd_emux_xg_control(port, chan, type); in snd_emux_control()
364 terminate_note1(struct snd_emux *emu, int note, struct snd_midi_channel *chan, int free) in terminate_note1() argument
373 if (STATE_IS_PLAYING(vp->state) && vp->chan == chan && in terminate_note1()
385 snd_emux_terminate_note(void *p, int note, struct snd_midi_channel *chan) in snd_emux_terminate_note() argument
391 if (snd_BUG_ON(!port || !chan)) in snd_emux_terminate_note()
398 terminate_note1(emu, note, chan, 1); in snd_emux_terminate_note()
497 vp->chan = NULL; in terminate_voice()
516 if (vp->chan == NULL || vp->port == NULL) in update_voice()
641 struct snd_midi_channel *chan = vp->chan; in calc_pan() local
648 pan = chan->control[MIDI_CTL_MSB_PAN] - 64; in calc_pan()
744 struct snd_midi_channel *chan = vp->chan; in calc_volume() local
747 expression_vol = chan->control[MIDI_CTL_MSB_EXPRESSION]; in calc_volume()
752 main_vol = chan->control[MIDI_CTL_MSB_MAIN_VOLUME]; in calc_volume()
762 main_vol = chan->control[MIDI_CTL_MSB_MAIN_VOLUME] * vp->reg.amplitude / 127; in calc_volume()
777 if (chan->private) { in calc_volume()
778 struct snd_emux_effect_table *fx = chan->private; in calc_volume()
788 if (!SF_IS_DRUM_BANK(get_bank(port, chan)) in calc_volume()
813 struct snd_midi_channel *chan = vp->chan; in calc_pitch() local
824 if (chan->midi_pitchbend != 0) { in calc_pitch()
826 offset += chan->midi_pitchbend * chan->gm_rpn_pitch_bend_range / 3072; in calc_pitch()
834 offset += chan->gm_rpn_coarse_tuning * 4096 / (12 * 128); in calc_pitch()
835 offset += chan->gm_rpn_fine_tuning / 24; in calc_pitch()
839 if (chan->private) { in calc_pitch()
840 struct snd_emux_effect_table *fx = chan->private; in calc_pitch()
860 get_bank(struct snd_emux_port *port, struct snd_midi_channel *chan) in get_bank() argument
866 val = chan->control[MIDI_CTL_MSB_BANK]; in get_bank()
869 return chan->control[MIDI_CTL_LSB_BANK]; in get_bank()
872 if (chan->drum_channel) in get_bank()
875 return chan->control[MIDI_CTL_MSB_BANK]; in get_bank()
878 if (chan->drum_channel) in get_bank()
880 return chan->control[MIDI_CTL_MSB_BANK]; in get_bank()
890 int *notep, int vel, struct snd_midi_channel *chan, in get_zone() argument
895 bank = get_bank(port, chan); in get_zone()
896 preset = chan->midi_program; in get_zone()
925 vp->chan = NULL; in snd_emux_init_voices()