• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/sound/core/seq/

Lines Matching refs:vmidi

58 static void snd_virmidi_init_event(struct snd_virmidi *vmidi,
62 ev->source.port = vmidi->port;
63 switch (vmidi->seq_mode) {
68 ev->dest.client = vmidi->client;
69 ev->dest.port = vmidi->port;
81 struct snd_virmidi *vmidi;
86 list_for_each_entry(vmidi, &rdev->filelist, list) {
87 if (!vmidi->trigger)
92 snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)snd_rawmidi_receive, vmidi->substream);
94 len = snd_midi_event_decode(vmidi->parser, msg, sizeof(msg), ev);
96 snd_rawmidi_receive(vmidi->substream, msg, len);
131 struct snd_virmidi *vmidi = substream->runtime->private_data;
134 vmidi->trigger = 1;
136 vmidi->trigger = 0;
145 struct snd_virmidi *vmidi = substream->runtime->private_data;
150 vmidi->trigger = 1;
151 if (vmidi->seq_mode == SNDRV_VIRMIDI_SEQ_DISPATCH &&
152 !(vmidi->rdev->flags & SNDRV_VIRMIDI_SUBSCRIBE)) {
156 if (vmidi->event.type != SNDRV_SEQ_EVENT_NONE) {
157 if (snd_seq_kernel_client_dispatch(vmidi->client, &vmidi->event, in_atomic(), 0) < 0)
159 vmidi->event.type = SNDRV_SEQ_EVENT_NONE;
167 res = snd_midi_event_encode(vmidi->parser, pbuf, count, &vmidi->event);
169 snd_midi_event_reset_encode(vmidi->parser);
175 if (vmidi->event.type != SNDRV_SEQ_EVENT_NONE) {
176 if (snd_seq_kernel_client_dispatch(vmidi->client, &vmidi->event, in_atomic(), 0) < 0)
178 vmidi->event.type = SNDRV_SEQ_EVENT_NONE;
183 vmidi->trigger = 0;
194 struct snd_virmidi *vmidi;
197 vmidi = kzalloc(sizeof(*vmidi), GFP_KERNEL);
198 if (vmidi == NULL)
200 vmidi->substream = substream;
201 if (snd_midi_event_new(0, &vmidi->parser) < 0) {
202 kfree(vmidi);
205 vmidi->seq_mode = rdev->seq_mode;
206 vmidi->client = rdev->client;
207 vmidi->port = rdev->port;
208 runtime->private_data = vmidi;
210 list_add_tail(&vmidi->list, &rdev->filelist);
212 vmidi->rdev = rdev;
223 struct snd_virmidi *vmidi;
225 vmidi = kzalloc(sizeof(*vmidi), GFP_KERNEL);
226 if (vmidi == NULL)
228 vmidi->substream = substream;
229 if (snd_midi_event_new(MAX_MIDI_EVENT_BUF, &vmidi->parser) < 0) {
230 kfree(vmidi);
233 vmidi->seq_mode = rdev->seq_mode;
234 vmidi->client = rdev->client;
235 vmidi->port = rdev->port;
236 snd_virmidi_init_event(vmidi, &vmidi->event);
237 vmidi->rdev = rdev;
238 runtime->private_data = vmidi;
247 struct snd_virmidi *vmidi = substream->runtime->private_data;
248 snd_midi_event_free(vmidi->parser);
249 list_del(&vmidi->list);
251 kfree(vmidi);
260 struct snd_virmidi *vmidi = substream->runtime->private_data;
261 snd_midi_event_free(vmidi->parser);
263 kfree(vmidi);