Lines Matching refs:cdev

28 	struct snd_usb_caiaqdev *cdev = substream->rmidi->private_data;  in snd_usb_caiaq_midi_input_trigger()  local
30 if (!cdev) in snd_usb_caiaq_midi_input_trigger()
33 cdev->midi_receive_substream = up ? substream : NULL; in snd_usb_caiaq_midi_input_trigger()
44 struct snd_usb_caiaqdev *cdev = substream->rmidi->private_data; in snd_usb_caiaq_midi_output_close() local
45 if (cdev->midi_out_active) { in snd_usb_caiaq_midi_output_close()
46 usb_kill_urb(&cdev->midi_out_urb); in snd_usb_caiaq_midi_output_close()
47 cdev->midi_out_active = 0; in snd_usb_caiaq_midi_output_close()
52 static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *cdev, in snd_usb_caiaq_midi_send() argument
56 struct device *dev = caiaqdev_to_dev(cdev); in snd_usb_caiaq_midi_send()
58 cdev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE; in snd_usb_caiaq_midi_send()
59 cdev->midi_out_buf[1] = 0; /* port */ in snd_usb_caiaq_midi_send()
60 len = snd_rawmidi_transmit(substream, cdev->midi_out_buf + 3, in snd_usb_caiaq_midi_send()
66 cdev->midi_out_buf[2] = len; in snd_usb_caiaq_midi_send()
67 cdev->midi_out_urb.transfer_buffer_length = len+3; in snd_usb_caiaq_midi_send()
69 ret = usb_submit_urb(&cdev->midi_out_urb, GFP_ATOMIC); in snd_usb_caiaq_midi_send()
75 cdev->midi_out_active = 1; in snd_usb_caiaq_midi_send()
80 struct snd_usb_caiaqdev *cdev = substream->rmidi->private_data; in snd_usb_caiaq_midi_output_trigger() local
83 cdev->midi_out_substream = substream; in snd_usb_caiaq_midi_output_trigger()
84 if (!cdev->midi_out_active) in snd_usb_caiaq_midi_output_trigger()
85 snd_usb_caiaq_midi_send(cdev, substream); in snd_usb_caiaq_midi_output_trigger()
87 cdev->midi_out_substream = NULL; in snd_usb_caiaq_midi_output_trigger()
106 void snd_usb_caiaq_midi_handle_input(struct snd_usb_caiaqdev *cdev, in snd_usb_caiaq_midi_handle_input() argument
109 if (!cdev->midi_receive_substream) in snd_usb_caiaq_midi_handle_input()
112 snd_rawmidi_receive(cdev->midi_receive_substream, buf, len); in snd_usb_caiaq_midi_handle_input()
152 struct snd_usb_caiaqdev *cdev = urb->context; in snd_usb_caiaq_midi_output_done() local
154 cdev->midi_out_active = 0; in snd_usb_caiaq_midi_output_done()
158 if (!cdev->midi_out_substream) in snd_usb_caiaq_midi_output_done()
161 snd_usb_caiaq_midi_send(cdev, cdev->midi_out_substream); in snd_usb_caiaq_midi_output_done()