Lines Matching refs:midiq
130 struct midi_queue *midiq; in emu10k1_mpuin_add_buffer() local
139 if ((midiq = (struct midi_queue *) kmalloc(sizeof(struct midi_queue), GFP_ATOMIC)) == NULL) { in emu10k1_mpuin_add_buffer()
144 midiq->next = NULL; in emu10k1_mpuin_add_buffer()
145 midiq->qtype = 1; in emu10k1_mpuin_add_buffer()
146 midiq->length = midihdr->bufferlength; in emu10k1_mpuin_add_buffer()
147 midiq->sizeLeft = midihdr->bufferlength; in emu10k1_mpuin_add_buffer()
148 midiq->midibyte = midihdr->data; in emu10k1_mpuin_add_buffer()
149 midiq->refdata = (unsigned long) midihdr; in emu10k1_mpuin_add_buffer()
154 card_mpuin->firstmidiq = midiq; in emu10k1_mpuin_add_buffer()
155 card_mpuin->lastmidiq = midiq; in emu10k1_mpuin_add_buffer()
157 (card_mpuin->lastmidiq)->next = midiq; in emu10k1_mpuin_add_buffer()
158 card_mpuin->lastmidiq = midiq; in emu10k1_mpuin_add_buffer()
205 struct midi_queue *midiq; in emu10k1_mpuin_stop() local
217 midiq = card_mpuin->firstmidiq; in emu10k1_mpuin_stop()
218 if (midiq != NULL) { in emu10k1_mpuin_stop()
219 if (midiq->sizeLeft == midiq->length) in emu10k1_mpuin_stop()
220 midiq = NULL; in emu10k1_mpuin_stop()
222 card_mpuin->firstmidiq = midiq->next; in emu10k1_mpuin_stop()
230 if (midiq) { in emu10k1_mpuin_stop()
231 emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INLONGERROR, (unsigned long) midiq, 0); in emu10k1_mpuin_stop()
232 kfree(midiq); in emu10k1_mpuin_stop()
245 struct midi_queue *midiq; in emu10k1_mpuin_reset() local
252 midiq = card_mpuin->firstmidiq; in emu10k1_mpuin_reset()
253 card_mpuin->firstmidiq = midiq->next; in emu10k1_mpuin_reset()
255 if (midiq->sizeLeft == midiq->length) in emu10k1_mpuin_reset()
256 emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INLONGDATA, (unsigned long) midiq, 0); in emu10k1_mpuin_reset()
258 emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INLONGERROR, (unsigned long) midiq, 0); in emu10k1_mpuin_reset()
260 kfree(midiq); in emu10k1_mpuin_reset()
275 struct midi_queue *midiq; in emu10k1_mpuin_callback() local
295 midiq = (struct midi_queue *) data; in emu10k1_mpuin_callback()
296 midihdr = (struct midi_hdr *) midiq->refdata; in emu10k1_mpuin_callback()
298 callback_msg[1] = midiq->length - midiq->sizeLeft; in emu10k1_mpuin_callback()
299 callback_msg[2] = midiq->refdata; in emu10k1_mpuin_callback()
303 midihdr->bytesrecorded = midiq->length - midiq->sizeLeft; in emu10k1_mpuin_callback()
322 data = card_mpuin->midiq[idx].data; in emu10k1_mpuin_bh()
323 card_mpuin->timein = card_mpuin->midiq[idx].timein; in emu10k1_mpuin_bh()
355 card_mpuin->midiq[idx].data = MPUIvalue; in emu10k1_mpuin_irqhandler()
356 card_mpuin->midiq[idx].timein = (jiffies * 1000) / HZ; in emu10k1_mpuin_irqhandler()
420 struct midi_queue *midiq; in sblive_miStateParse() local
422 midiq = card_mpuin->firstmidiq; in sblive_miStateParse()
423 *midiq->midibyte = data; in sblive_miStateParse()
424 --midiq->sizeLeft; in sblive_miStateParse()
425 ++midiq->midibyte; in sblive_miStateParse()
726 struct midi_queue *midiq; in sblive_miStateSysExNorm() local
728 midiq = card_mpuin->firstmidiq; in sblive_miStateSysExNorm()
729 *midiq->midibyte = data; in sblive_miStateSysExNorm()
730 --midiq->sizeLeft; in sblive_miStateSysExNorm()
731 ++midiq->midibyte; in sblive_miStateSysExNorm()
735 card_mpuin->firstmidiq = midiq->next; in sblive_miStateSysExNorm()
741 emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INLONGERROR, (unsigned long) midiq, 0); in sblive_miStateSysExNorm()
743 kfree(midiq); in sblive_miStateSysExNorm()
750 struct midi_queue *midiq; in sblive_miStateSysExNorm() local
752 midiq = card_mpuin->firstmidiq; in sblive_miStateSysExNorm()
753 *midiq->midibyte = data; in sblive_miStateSysExNorm()
754 --midiq->sizeLeft; in sblive_miStateSysExNorm()
755 ++midiq->midibyte; in sblive_miStateSysExNorm()
765 struct midi_queue *midiq; in sblive_miStateSysExNorm() local
767 midiq = card_mpuin->firstmidiq; in sblive_miStateSysExNorm()
771 card_mpuin->firstmidiq = midiq->next; in sblive_miStateSysExNorm()
777 emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INLONGDATA, (unsigned long) midiq, 0); in sblive_miStateSysExNorm()
779 kfree(midiq); in sblive_miStateSysExNorm()
786 struct midi_queue *midiq; in sblive_miStateSysExNorm() local
788 midiq = card_mpuin->firstmidiq; in sblive_miStateSysExNorm()
790 if (midiq->sizeLeft == 0) { in sblive_miStateSysExNorm()
795 card_mpuin->firstmidiq = midiq->next; in sblive_miStateSysExNorm()
801 emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INLONGDATA, (unsigned long) midiq, 0); in sblive_miStateSysExNorm()
803 kfree(midiq); in sblive_miStateSysExNorm()