/* Terminate all voices that have the same exclusive class. This is mainly for drums.  */
static void exclusive_note_off(struct snd_emux *emu, struct snd_emux_port *port, int exclass)
/* Terminate all voices that have the same exclusive class. This is mainly for drums.  */
static void exclusive_note_off(struct snd_emux *emu, struct snd_emux_port *port, int exclass)
{
	struct snd_emux_voice *vp;
	int  i;
	unsigned long flags;
	spin_lock_irqsave(&emu->voice_lock, flags);
	for (i = 0; i < emu->max_voices; i++) {
		vp = &emu->voices[i];
		if (STATE_IS_PLAYING(vp->state) && vp->port == port &&
		    vp->reg.exclusiveClass == exclass) {
			terminate_voice(emu, vp, 0);
		}
	}
	spin_unlock_irqrestore(&emu->voice_lock, flags);
}