• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/sound/core/seq/

Lines Matching defs:msynth

78 	struct seq_midisynth *msynth;
86 msynth = runtime->private_data;
87 if (msynth == NULL)
94 if (msynth->parser == NULL)
98 count = snd_midi_event_encode(msynth->parser, pbuf, res, &ev);
104 ev.source.port = msynth->seq_port;
106 snd_seq_kernel_client_dispatch(msynth->seq_client, &ev, 1, 0);
135 struct seq_midisynth *msynth = private_data;
140 if (snd_BUG_ON(!msynth))
142 substream = msynth->output_rfile.output;
152 snd_midi_event_reset_decode(msynth->parser);
154 if (msynth->parser == NULL)
156 len = snd_midi_event_decode(msynth->parser, msg, sizeof(msg), ev);
160 snd_midi_event_reset_decode(msynth->parser);
166 static int snd_seq_midisynth_new(struct seq_midisynth *msynth,
171 if (snd_midi_event_new(MAX_MIDI_EVENT_BUF, &msynth->parser) < 0)
173 msynth->card = card;
174 msynth->device = device;
175 msynth->subdevice = subdevice;
183 struct seq_midisynth *msynth = private_data;
188 if ((err = snd_rawmidi_kernel_open(msynth->card, msynth->device,
189 msynth->subdevice,
191 &msynth->input_rfile)) < 0) {
195 runtime = msynth->input_rfile.input->runtime;
199 if ((err = snd_rawmidi_input_params(msynth->input_rfile.input, &params)) < 0) {
200 snd_rawmidi_kernel_release(&msynth->input_rfile);
203 snd_midi_event_reset_encode(msynth->parser);
205 runtime->private_data = msynth;
206 snd_rawmidi_kernel_read(msynth->input_rfile.input, NULL, 0);
214 struct seq_midisynth *msynth = private_data;
216 if (snd_BUG_ON(!msynth->input_rfile.input))
218 err = snd_rawmidi_kernel_release(&msynth->input_rfile);
226 struct seq_midisynth *msynth = private_data;
230 if ((err = snd_rawmidi_kernel_open(msynth->card, msynth->device,
231 msynth->subdevice,
233 &msynth->output_rfile)) < 0) {
241 if ((err = snd_rawmidi_output_params(msynth->output_rfile.output, &params)) < 0) {
242 snd_rawmidi_kernel_release(&msynth->output_rfile);
245 snd_midi_event_reset_decode(msynth->parser);
252 struct seq_midisynth *msynth = private_data;
254 if (snd_BUG_ON(!msynth->output_rfile.output))
256 snd_rawmidi_drain_output(msynth->output_rfile.output);
257 return snd_rawmidi_kernel_release(&msynth->output_rfile);
261 static void snd_seq_midisynth_delete(struct seq_midisynth *msynth)
263 if (msynth == NULL)
266 if (msynth->seq_client > 0) {
268 snd_seq_event_port_detach(msynth->seq_client, msynth->seq_port);
271 if (msynth->parser)
272 snd_midi_event_free(msynth->parser);
280 struct seq_midisynth *msynth, *ms;
337 msynth = kcalloc(ports, sizeof(struct seq_midisynth), GFP_KERNEL);
339 if (msynth == NULL || port == NULL)
343 ms = &msynth[p];
404 client->ports[device] = msynth;
414 if (msynth != NULL) {
416 snd_seq_midisynth_delete(&msynth[p]);
417 kfree(msynth);
434 struct seq_midisynth *msynth;
446 msynth = client->ports[device];
449 snd_seq_midisynth_delete(&msynth[p]);
450 kfree(msynth);