Lines Matching defs:chset
37 struct snd_midi_channel_set *chset,
42 struct snd_midi_channel_set *chset);
45 struct snd_midi_channel_set *chset);
48 int len, struct snd_midi_channel_set *chset);
54 static void reset_all_channels(struct snd_midi_channel_set *chset);
259 struct snd_midi_channel_set *chset,
315 rpn(ops, drv, chan, chset);
317 nrpn(ops, drv, chan, chset);
337 if (chset->midi_mode == SNDRV_MIDI_MODE_XG) {
378 snd_midi_channel_set_clear(struct snd_midi_channel_set *chset)
382 chset->midi_mode = SNDRV_MIDI_MODE_GM;
383 chset->gs_master_volume = 127;
385 for (i = 0; i < chset->max_channels; i++) {
386 struct snd_midi_channel *chan = chset->channels + i;
411 struct snd_midi_channel_set *chset)
416 if (chset->midi_mode != SNDRV_MIDI_MODE_NONE) {
451 struct snd_midi_channel_set *chset)
455 ops->nrpn(drv, chan, chset);
479 struct snd_midi_channel_set *chset)
510 if (chset->midi_mode != SNDRV_MIDI_MODE_GS &&
511 chset->midi_mode != SNDRV_MIDI_MODE_XG) {
512 chset->midi_mode = SNDRV_MIDI_MODE_GM;
513 reset_all_channels(chset);
521 if (chset->midi_mode != SNDRV_MIDI_MODE_GS &&
522 chset->midi_mode != SNDRV_MIDI_MODE_XG)
523 chset->midi_mode = SNDRV_MIDI_MODE_GS;
528 reset_all_channels(chset);
534 if (p < chset->max_channels) {
537 chset->channels[p].drum_channel = 1;
539 chset->channels[p].drum_channel = 0;
545 if (p < chset->max_channels &&
546 ! chset->channels[p].drum_channel) {
548 chset->channels[p].midi_program = buf[7];
554 chset->gs_reverb_mode = buf[7];
559 chset->gs_chorus_mode = buf[7];
564 chset->gs_master_volume = buf[7];
573 chset->midi_mode = SNDRV_MIDI_MODE_XG;
576 for (i = 0; i < chset->max_channels; i++) {
577 if (chset->channels[i].drum_channel)
578 chset->channels[i].control[MIDI_CTL_MSB_BANK] = 127;
580 chset->channels[i].control[MIDI_CTL_MSB_BANK] = 0;
585 ops->sysex(private, buf - 1, len + 1, parsed, chset);
666 reset_all_channels(struct snd_midi_channel_set *chset)
669 for (ch = 0; ch < chset->max_channels; ch++) {
670 struct snd_midi_channel *chan = chset->channels + ch;
689 struct snd_midi_channel_set *chset;
691 chset = kmalloc(sizeof(*chset), GFP_KERNEL);
692 if (chset) {
693 chset->channels = snd_midi_channel_init_set(n);
694 chset->private_data = NULL;
695 chset->max_channels = n;
697 return chset;
716 void snd_midi_channel_free_set(struct snd_midi_channel_set *chset)
718 if (chset == NULL)
720 kfree(chset->channels);
721 kfree(chset);