Lines Matching refs:chan
41 int *notep, int vel, struct snd_midi_channel *chan,
43 static int get_bank(struct snd_emux_port *port, struct snd_midi_channel *chan);
45 struct snd_midi_channel *chan, int free);
60 snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan) in snd_emux_note_on() argument
70 if (snd_BUG_ON(!port || !chan)) in snd_emux_note_on()
78 nvoices = get_zone(emu, port, ¬e, vel, chan, table); in snd_emux_note_on()
91 terminate_note1(emu, key, chan, 0); in snd_emux_note_on()
110 vp->chan = chan; in snd_emux_note_on()
135 vp->chan == chan) { in snd_emux_note_on()
146 struct snd_emux_effect_table *fx = chan->private; in snd_emux_note_on()
159 snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan) in snd_emux_note_off() argument
168 if (snd_BUG_ON(!port || !chan)) in snd_emux_note_off()
179 vp->chan == chan && vp->key == note) { in snd_emux_note_off()
236 snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan) in snd_emux_key_press() argument
245 if (snd_BUG_ON(!port || !chan)) in snd_emux_key_press()
256 vp->chan == chan && vp->key == note) { in snd_emux_key_press()
269 snd_emux_update_channel(struct snd_emux_port *port, struct snd_midi_channel *chan, int update) in snd_emux_update_channel() argument
286 if (vp->chan == chan) in snd_emux_update_channel()
325 snd_emux_control(void *p, int type, struct snd_midi_channel *chan) in snd_emux_control() argument
330 if (snd_BUG_ON(!port || !chan)) in snd_emux_control()
336 snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_VOLUME); in snd_emux_control()
340 snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_PAN); in snd_emux_control()
346 if (chan->control[type] >= 64) in snd_emux_control()
347 snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, -160, in snd_emux_control()
350 snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, 0, in snd_emux_control()
356 snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_PITCH); in snd_emux_control()
361 snd_emux_update_channel(port, chan, in snd_emux_control()
369 snd_emux_xg_control(port, chan, type); in snd_emux_control()
378 terminate_note1(struct snd_emux *emu, int note, struct snd_midi_channel *chan, int free) in terminate_note1() argument
387 if (STATE_IS_PLAYING(vp->state) && vp->chan == chan && in terminate_note1()
399 snd_emux_terminate_note(void *p, int note, struct snd_midi_channel *chan) in snd_emux_terminate_note() argument
405 if (snd_BUG_ON(!port || !chan)) in snd_emux_terminate_note()
412 terminate_note1(emu, note, chan, 1); in snd_emux_terminate_note()
511 vp->chan = NULL; in terminate_voice()
530 if (vp->chan == NULL || vp->port == NULL) in update_voice()
655 struct snd_midi_channel *chan = vp->chan; in calc_pan() local
662 pan = chan->control[MIDI_CTL_MSB_PAN] - 64; in calc_pan()
758 struct snd_midi_channel *chan = vp->chan; in calc_volume() local
761 expression_vol = chan->control[MIDI_CTL_MSB_EXPRESSION]; in calc_volume()
766 main_vol = chan->control[MIDI_CTL_MSB_MAIN_VOLUME]; in calc_volume()
776 main_vol = chan->control[MIDI_CTL_MSB_MAIN_VOLUME] * vp->reg.amplitude / 127; in calc_volume()
791 if (chan->private) { in calc_volume()
792 struct snd_emux_effect_table *fx = chan->private; in calc_volume()
802 if (!SF_IS_DRUM_BANK(get_bank(port, chan)) in calc_volume()
827 struct snd_midi_channel *chan = vp->chan; in calc_pitch() local
838 if (chan->midi_pitchbend != 0) { in calc_pitch()
840 offset += chan->midi_pitchbend * chan->gm_rpn_pitch_bend_range / 3072; in calc_pitch()
848 offset += chan->gm_rpn_coarse_tuning * 4096 / (12 * 128); in calc_pitch()
849 offset += chan->gm_rpn_fine_tuning / 24; in calc_pitch()
853 if (chan->private) { in calc_pitch()
854 struct snd_emux_effect_table *fx = chan->private; in calc_pitch()
874 get_bank(struct snd_emux_port *port, struct snd_midi_channel *chan) in get_bank() argument
880 val = chan->control[MIDI_CTL_MSB_BANK]; in get_bank()
883 return chan->control[MIDI_CTL_LSB_BANK]; in get_bank()
886 if (chan->drum_channel) in get_bank()
889 return chan->control[MIDI_CTL_MSB_BANK]; in get_bank()
892 if (chan->drum_channel) in get_bank()
894 return chan->control[MIDI_CTL_MSB_BANK]; in get_bank()
904 int *notep, int vel, struct snd_midi_channel *chan, in get_zone() argument
909 bank = get_bank(port, chan); in get_zone()
910 preset = chan->midi_program; in get_zone()
939 vp->chan = NULL; in snd_emux_init_voices()