Lines Matching refs:midiq
69 struct midi_queue *midiq; in emu10k1_mpuout_close() local
80 midiq = card_mpuout->firstmidiq; in emu10k1_mpuout_close()
81 midihdr = (struct midi_hdr *) midiq->refdata; in emu10k1_mpuout_close()
83 card_mpuout->firstmidiq = midiq->next; in emu10k1_mpuout_close()
87 kfree(midiq); in emu10k1_mpuout_close()
109 struct midi_queue *midiq; in emu10k1_mpuout_add_buffer() local
120 if ((midiq = (struct midi_queue *) kmalloc(sizeof(struct midi_queue), GFP_KERNEL)) == NULL) { in emu10k1_mpuout_add_buffer()
125 midiq->next = NULL; in emu10k1_mpuout_add_buffer()
126 midiq->qtype = 1; in emu10k1_mpuout_add_buffer()
127 midiq->length = midihdr->bufferlength; in emu10k1_mpuout_add_buffer()
128 midiq->sizeLeft = midihdr->bufferlength; in emu10k1_mpuout_add_buffer()
129 midiq->midibyte = midihdr->data; in emu10k1_mpuout_add_buffer()
131 midiq->refdata = (unsigned long) midihdr; in emu10k1_mpuout_add_buffer()
136 card_mpuout->firstmidiq = midiq; in emu10k1_mpuout_add_buffer()
137 card_mpuout->lastmidiq = midiq; in emu10k1_mpuout_add_buffer()
139 (card_mpuout->lastmidiq)->next = midiq; in emu10k1_mpuout_add_buffer()
140 card_mpuout->lastmidiq = midiq; in emu10k1_mpuout_add_buffer()
157 struct midi_queue *midiq; in emu10k1_mpuout_bh() local
164 midiq = card_mpuout->firstmidiq; in emu10k1_mpuout_bh()
166 while (cByteSent < 4 && midiq->sizeLeft) { in emu10k1_mpuout_bh()
167 if (emu10k1_mpu_write_data(card, *midiq->midibyte) < 0) { in emu10k1_mpuout_bh()
171 --midiq->sizeLeft; in emu10k1_mpuout_bh()
172 ++midiq->midibyte; in emu10k1_mpuout_bh()
176 if (midiq->sizeLeft == 0) { in emu10k1_mpuout_bh()
178 doneq = midiq; in emu10k1_mpuout_bh()
179 card_mpuout->firstmidiq = midiq->next; in emu10k1_mpuout_bh()
191 midiq = doneq; in emu10k1_mpuout_bh()
192 doneq = midiq->next; in emu10k1_mpuout_bh()
194 if (midiq->qtype) { in emu10k1_mpuout_bh()
196 callback_msg[1] = midiq->length; in emu10k1_mpuout_bh()
197 callback_msg[2] = midiq->refdata; in emu10k1_mpuout_bh()
200 } else if (((u8) midiq->refdata) < 0xF0 && ((u8) midiq->refdata) > 0x7F) in emu10k1_mpuout_bh()
201 card_mpuout->laststatus = (u8) midiq->refdata; in emu10k1_mpuout_bh()
203 kfree(midiq); in emu10k1_mpuout_bh()