Lines Matching refs:substream
93 get_wavefront_midi (struct snd_rawmidi_substream *substream) in get_wavefront_midi() argument
99 if (substream == NULL || substream->rmidi == NULL) in get_wavefront_midi()
102 card = substream->rmidi->card; in get_wavefront_midi()
232 static int snd_wavefront_midi_input_open(struct snd_rawmidi_substream *substream) in snd_wavefront_midi_input_open() argument
238 if (snd_BUG_ON(!substream || !substream->rmidi)) in snd_wavefront_midi_input_open()
240 if (snd_BUG_ON(!substream->rmidi->private_data)) in snd_wavefront_midi_input_open()
243 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); in snd_wavefront_midi_input_open()
245 if ((midi = get_wavefront_midi (substream)) == NULL) in snd_wavefront_midi_input_open()
250 midi->substream_input[mpu] = substream; in snd_wavefront_midi_input_open()
256 static int snd_wavefront_midi_output_open(struct snd_rawmidi_substream *substream) in snd_wavefront_midi_output_open() argument
262 if (snd_BUG_ON(!substream || !substream->rmidi)) in snd_wavefront_midi_output_open()
264 if (snd_BUG_ON(!substream->rmidi->private_data)) in snd_wavefront_midi_output_open()
267 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); in snd_wavefront_midi_output_open()
269 if ((midi = get_wavefront_midi (substream)) == NULL) in snd_wavefront_midi_output_open()
274 midi->substream_output[mpu] = substream; in snd_wavefront_midi_output_open()
280 static int snd_wavefront_midi_input_close(struct snd_rawmidi_substream *substream) in snd_wavefront_midi_input_close() argument
286 if (snd_BUG_ON(!substream || !substream->rmidi)) in snd_wavefront_midi_input_close()
288 if (snd_BUG_ON(!substream->rmidi->private_data)) in snd_wavefront_midi_input_close()
291 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); in snd_wavefront_midi_input_close()
293 if ((midi = get_wavefront_midi (substream)) == NULL) in snd_wavefront_midi_input_close()
303 static int snd_wavefront_midi_output_close(struct snd_rawmidi_substream *substream) in snd_wavefront_midi_output_close() argument
309 if (snd_BUG_ON(!substream || !substream->rmidi)) in snd_wavefront_midi_output_close()
311 if (snd_BUG_ON(!substream->rmidi->private_data)) in snd_wavefront_midi_output_close()
314 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); in snd_wavefront_midi_output_close()
316 if ((midi = get_wavefront_midi (substream)) == NULL) in snd_wavefront_midi_output_close()
325 static void snd_wavefront_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) in snd_wavefront_midi_input_trigger() argument
331 if (substream == NULL || substream->rmidi == NULL) in snd_wavefront_midi_input_trigger()
334 if (substream->rmidi->private_data == NULL) in snd_wavefront_midi_input_trigger()
337 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); in snd_wavefront_midi_input_trigger()
339 if ((midi = get_wavefront_midi (substream)) == NULL) { in snd_wavefront_midi_input_trigger()
365 static void snd_wavefront_midi_output_trigger(struct snd_rawmidi_substream *substream, int up) in snd_wavefront_midi_output_trigger() argument
371 if (substream == NULL || substream->rmidi == NULL) in snd_wavefront_midi_output_trigger()
374 if (substream->rmidi->private_data == NULL) in snd_wavefront_midi_output_trigger()
377 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); in snd_wavefront_midi_output_trigger()
379 if ((midi = get_wavefront_midi (substream)) == NULL) { in snd_wavefront_midi_output_trigger()
389 midi->timer.data = (unsigned long) substream->rmidi->card->private_data; in snd_wavefront_midi_output_trigger()
402 snd_wavefront_midi_output_write((snd_wavefront_card_t *)substream->rmidi->card->private_data); in snd_wavefront_midi_output_trigger()
411 static struct snd_rawmidi_substream *substream = NULL; in snd_wavefront_midi_interrupt() local
431 substream = midi->substream_input[external_mpu]; in snd_wavefront_midi_interrupt()
434 substream = midi->substream_output[internal_mpu]; in snd_wavefront_midi_interrupt()
438 substream = midi->substream_input[internal_mpu]; in snd_wavefront_midi_interrupt()
442 if (substream == NULL) { in snd_wavefront_midi_interrupt()
447 snd_rawmidi_receive(substream, &byte, 1); in snd_wavefront_midi_interrupt()