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)
56 if (snd_BUG_ON(!port || !chan))
64 nvoices = get_zone(emu, port, &note, vel, chan, table);
77 terminate_note1(emu, key, chan, 0);
96 vp->chan = chan;
121 vp->chan == chan) {
132 struct snd_emux_effect_table *fx = chan->private;
145 snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan)
154 if (snd_BUG_ON(!port || !chan))
165 vp->chan == chan && vp->key == note) {
222 snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan)
231 if (snd_BUG_ON(!port || !chan))
242 vp->chan == chan && vp->key == note) {
255 snd_emux_update_channel(struct snd_emux_port *port, struct snd_midi_channel *chan, int update)
272 if (vp->chan == chan)
311 snd_emux_control(void *p, int type, struct snd_midi_channel *chan)
316 if (snd_BUG_ON(!port || !chan))
322 snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_VOLUME);
326 snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_PAN);
332 if (chan->control[type] >= 64)
333 snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, -160,
336 snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, 0,
342 snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_PITCH);
347 snd_emux_update_channel(port, chan,
355 snd_emux_xg_control(port, chan, type);
364 terminate_note1(struct snd_emux *emu, int note, struct snd_midi_channel *chan, int free)
373 if (STATE_IS_PLAYING(vp->state) && vp->chan == chan &&
385 snd_emux_terminate_note(void *p, int note, struct snd_midi_channel *chan)
391 if (snd_BUG_ON(!port || !chan))
398 terminate_note1(emu, note, chan, 1);
497 vp->chan = NULL;
516 if (vp->chan == NULL || vp->port == NULL)
641 struct snd_midi_channel *chan = vp->chan;
648 pan = chan->control[MIDI_CTL_MSB_PAN] - 64;
744 struct snd_midi_channel *chan = vp->chan;
747 expression_vol = chan->control[MIDI_CTL_MSB_EXPRESSION];
752 main_vol = chan->control[MIDI_CTL_MSB_MAIN_VOLUME];
762 main_vol = chan->control[MIDI_CTL_MSB_MAIN_VOLUME] * vp->reg.amplitude / 127;
777 if (chan->private) {
778 struct snd_emux_effect_table *fx = chan->private;
788 if (!SF_IS_DRUM_BANK(get_bank(port, chan))
813 struct snd_midi_channel *chan = vp->chan;
824 if (chan->midi_pitchbend != 0) {
826 offset += chan->midi_pitchbend * chan->gm_rpn_pitch_bend_range / 3072;
834 offset += chan->gm_rpn_coarse_tuning * 4096 / (12 * 128);
835 offset += chan->gm_rpn_fine_tuning / 24;
839 if (chan->private) {
840 struct snd_emux_effect_table *fx = chan->private;
861 get_bank(struct snd_emux_port *port, struct snd_midi_channel *chan)
867 val = chan->control[MIDI_CTL_MSB_BANK];
870 return chan->control[MIDI_CTL_LSB_BANK];
873 if (chan->drum_channel)
876 return chan->control[MIDI_CTL_MSB_BANK];
879 if (chan->drum_channel)
881 return chan->control[MIDI_CTL_MSB_BANK];
891 int *notep, int vel, struct snd_midi_channel *chan,
896 bank = get_bank(port, chan);
897 preset = chan->midi_program;
926 vp->chan = NULL;