Lines Matching refs:substream
90 get_wavefront_midi (struct snd_rawmidi_substream *substream) in get_wavefront_midi() argument
96 if (substream == NULL || substream->rmidi == NULL) in get_wavefront_midi()
99 card = substream->rmidi->card; in get_wavefront_midi()
229 static int snd_wavefront_midi_input_open(struct snd_rawmidi_substream *substream) in snd_wavefront_midi_input_open() argument
235 if (snd_BUG_ON(!substream || !substream->rmidi)) in snd_wavefront_midi_input_open()
237 if (snd_BUG_ON(!substream->rmidi->private_data)) in snd_wavefront_midi_input_open()
240 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); in snd_wavefront_midi_input_open()
242 if ((midi = get_wavefront_midi (substream)) == NULL) in snd_wavefront_midi_input_open()
247 midi->substream_input[mpu] = substream; in snd_wavefront_midi_input_open()
253 static int snd_wavefront_midi_output_open(struct snd_rawmidi_substream *substream) in snd_wavefront_midi_output_open() argument
259 if (snd_BUG_ON(!substream || !substream->rmidi)) in snd_wavefront_midi_output_open()
261 if (snd_BUG_ON(!substream->rmidi->private_data)) in snd_wavefront_midi_output_open()
264 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); in snd_wavefront_midi_output_open()
266 if ((midi = get_wavefront_midi (substream)) == NULL) in snd_wavefront_midi_output_open()
271 midi->substream_output[mpu] = substream; in snd_wavefront_midi_output_open()
277 static int snd_wavefront_midi_input_close(struct snd_rawmidi_substream *substream) in snd_wavefront_midi_input_close() argument
283 if (snd_BUG_ON(!substream || !substream->rmidi)) in snd_wavefront_midi_input_close()
285 if (snd_BUG_ON(!substream->rmidi->private_data)) in snd_wavefront_midi_input_close()
288 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); in snd_wavefront_midi_input_close()
290 if ((midi = get_wavefront_midi (substream)) == NULL) in snd_wavefront_midi_input_close()
300 static int snd_wavefront_midi_output_close(struct snd_rawmidi_substream *substream) in snd_wavefront_midi_output_close() argument
306 if (snd_BUG_ON(!substream || !substream->rmidi)) in snd_wavefront_midi_output_close()
308 if (snd_BUG_ON(!substream->rmidi->private_data)) in snd_wavefront_midi_output_close()
311 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); in snd_wavefront_midi_output_close()
313 if ((midi = get_wavefront_midi (substream)) == NULL) in snd_wavefront_midi_output_close()
322 static void snd_wavefront_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) in snd_wavefront_midi_input_trigger() argument
328 if (substream == NULL || substream->rmidi == NULL) in snd_wavefront_midi_input_trigger()
331 if (substream->rmidi->private_data == NULL) in snd_wavefront_midi_input_trigger()
334 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); in snd_wavefront_midi_input_trigger()
336 if ((midi = get_wavefront_midi (substream)) == NULL) { in snd_wavefront_midi_input_trigger()
361 static void snd_wavefront_midi_output_trigger(struct snd_rawmidi_substream *substream, int up) in snd_wavefront_midi_output_trigger() argument
367 if (substream == NULL || substream->rmidi == NULL) in snd_wavefront_midi_output_trigger()
370 if (substream->rmidi->private_data == NULL) in snd_wavefront_midi_output_trigger()
373 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); in snd_wavefront_midi_output_trigger()
375 if ((midi = get_wavefront_midi (substream)) == NULL) { in snd_wavefront_midi_output_trigger()
397 snd_wavefront_midi_output_write((snd_wavefront_card_t *)substream->rmidi->card->private_data); in snd_wavefront_midi_output_trigger()
406 static struct snd_rawmidi_substream *substream = NULL; in snd_wavefront_midi_interrupt() local
426 substream = midi->substream_input[external_mpu]; in snd_wavefront_midi_interrupt()
429 substream = midi->substream_output[internal_mpu]; in snd_wavefront_midi_interrupt()
433 substream = midi->substream_input[internal_mpu]; in snd_wavefront_midi_interrupt()
437 if (substream == NULL) { in snd_wavefront_midi_interrupt()
442 snd_rawmidi_receive(substream, &byte, 1); in snd_wavefront_midi_interrupt()