• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/sound/core/seq/

Lines Matching defs:vmidi

57 static void snd_virmidi_init_event(struct snd_virmidi *vmidi,
61 ev->source.port = vmidi->port;
62 switch (vmidi->seq_mode) {
67 ev->dest.client = vmidi->client;
68 ev->dest.port = vmidi->port;
80 struct snd_virmidi *vmidi;
85 list_for_each_entry(vmidi, &rdev->filelist, list) {
86 if (!vmidi->trigger)
91 snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)snd_rawmidi_receive, vmidi->substream);
93 len = snd_midi_event_decode(vmidi->parser, msg, sizeof(msg), ev);
95 snd_rawmidi_receive(vmidi->substream, msg, len);
130 struct snd_virmidi *vmidi = substream->runtime->private_data;
133 vmidi->trigger = 1;
135 vmidi->trigger = 0;
144 struct snd_virmidi *vmidi = substream->runtime->private_data;
149 vmidi->trigger = 1;
150 if (vmidi->seq_mode == SNDRV_VIRMIDI_SEQ_DISPATCH &&
151 !(vmidi->rdev->flags & SNDRV_VIRMIDI_SUBSCRIBE)) {
155 if (vmidi->event.type != SNDRV_SEQ_EVENT_NONE) {
156 if (snd_seq_kernel_client_dispatch(vmidi->client, &vmidi->event, in_atomic(), 0) < 0)
158 vmidi->event.type = SNDRV_SEQ_EVENT_NONE;
166 res = snd_midi_event_encode(vmidi->parser, pbuf, count, &vmidi->event);
168 snd_midi_event_reset_encode(vmidi->parser);
174 if (vmidi->event.type != SNDRV_SEQ_EVENT_NONE) {
175 if (snd_seq_kernel_client_dispatch(vmidi->client, &vmidi->event, in_atomic(), 0) < 0)
177 vmidi->event.type = SNDRV_SEQ_EVENT_NONE;
182 vmidi->trigger = 0;
193 struct snd_virmidi *vmidi;
196 vmidi = kzalloc(sizeof(*vmidi), GFP_KERNEL);
197 if (vmidi == NULL)
199 vmidi->substream = substream;
200 if (snd_midi_event_new(0, &vmidi->parser) < 0) {
201 kfree(vmidi);
204 vmidi->seq_mode = rdev->seq_mode;
205 vmidi->client = rdev->client;
206 vmidi->port = rdev->port;
207 runtime->private_data = vmidi;
209 list_add_tail(&vmidi->list, &rdev->filelist);
211 vmidi->rdev = rdev;
222 struct snd_virmidi *vmidi;
224 vmidi = kzalloc(sizeof(*vmidi), GFP_KERNEL);
225 if (vmidi == NULL)
227 vmidi->substream = substream;
228 if (snd_midi_event_new(MAX_MIDI_EVENT_BUF, &vmidi->parser) < 0) {
229 kfree(vmidi);
232 vmidi->seq_mode = rdev->seq_mode;
233 vmidi->client = rdev->client;
234 vmidi->port = rdev->port;
235 snd_virmidi_init_event(vmidi, &vmidi->event);
236 vmidi->rdev = rdev;
237 runtime->private_data = vmidi;
246 struct snd_virmidi *vmidi = substream->runtime->private_data;
247 snd_midi_event_free(vmidi->parser);
248 list_del(&vmidi->list);
250 kfree(vmidi);
259 struct snd_virmidi *vmidi = substream->runtime->private_data;
260 snd_midi_event_free(vmidi->parser);
262 kfree(vmidi);