Lines Matching refs:substream

289 					struct snd_rawmidi_substream *substream)  in snd_mtpav_output_port_write()  argument
295 if (snd_rawmidi_transmit(substream, &outbyte, 1) != 1) in snd_mtpav_output_port_write()
320 } while (snd_rawmidi_transmit(substream, &outbyte, 1) == 1); in snd_mtpav_output_port_write()
323 static void snd_mtpav_output_write(struct snd_rawmidi_substream *substream) in snd_mtpav_output_write() argument
325 struct mtpav *mtp_card = substream->rmidi->private_data; in snd_mtpav_output_write()
326 struct mtpav_port *portp = &mtp_card->ports[substream->number]; in snd_mtpav_output_write()
330 snd_mtpav_output_port_write(mtp_card, portp, substream); in snd_mtpav_output_write()
353 static int snd_mtpav_input_open(struct snd_rawmidi_substream *substream) in snd_mtpav_input_open() argument
355 struct mtpav *mtp_card = substream->rmidi->private_data; in snd_mtpav_input_open()
356 struct mtpav_port *portp = &mtp_card->ports[substream->number]; in snd_mtpav_input_open()
361 portp->input = substream; in snd_mtpav_input_open()
371 static int snd_mtpav_input_close(struct snd_rawmidi_substream *substream) in snd_mtpav_input_close() argument
373 struct mtpav *mtp_card = substream->rmidi->private_data; in snd_mtpav_input_close()
374 struct mtpav_port *portp = &mtp_card->ports[substream->number]; in snd_mtpav_input_close()
389 static void snd_mtpav_input_trigger(struct snd_rawmidi_substream *substream, int up) in snd_mtpav_input_trigger() argument
391 struct mtpav *mtp_card = substream->rmidi->private_data; in snd_mtpav_input_trigger()
392 struct mtpav_port *portp = &mtp_card->ports[substream->number]; in snd_mtpav_input_trigger()
442 static int snd_mtpav_output_open(struct snd_rawmidi_substream *substream) in snd_mtpav_output_open() argument
444 struct mtpav *mtp_card = substream->rmidi->private_data; in snd_mtpav_output_open()
445 struct mtpav_port *portp = &mtp_card->ports[substream->number]; in snd_mtpav_output_open()
450 portp->output = substream; in snd_mtpav_output_open()
458 static int snd_mtpav_output_close(struct snd_rawmidi_substream *substream) in snd_mtpav_output_close() argument
460 struct mtpav *mtp_card = substream->rmidi->private_data; in snd_mtpav_output_close()
461 struct mtpav_port *portp = &mtp_card->ports[substream->number]; in snd_mtpav_output_close()
474 static void snd_mtpav_output_trigger(struct snd_rawmidi_substream *substream, int up) in snd_mtpav_output_trigger() argument
476 struct mtpav *mtp_card = substream->rmidi->private_data; in snd_mtpav_output_trigger()
477 struct mtpav_port *portp = &mtp_card->ports[substream->number]; in snd_mtpav_output_trigger()
495 snd_mtpav_output_write(substream); in snd_mtpav_output_trigger()
621 struct snd_rawmidi_substream *substream) in snd_mtpav_set_name() argument
623 if (substream->number >= 0 && substream->number < chip->num_ports) in snd_mtpav_set_name()
624 sprintf(substream->name, "MTP direct %d", (substream->number % chip->num_ports) + 1); in snd_mtpav_set_name()
625 else if (substream->number >= 8 && substream->number < chip->num_ports * 2) in snd_mtpav_set_name()
626 sprintf(substream->name, "MTP remote %d", (substream->number % chip->num_ports) + 1); in snd_mtpav_set_name()
627 else if (substream->number == chip->num_ports * 2) in snd_mtpav_set_name()
628 strcpy(substream->name, "MTP computer"); in snd_mtpav_set_name()
629 else if (substream->number == chip->num_ports * 2 + 1) in snd_mtpav_set_name()
630 strcpy(substream->name, "MTP ADAT"); in snd_mtpav_set_name()
632 strcpy(substream->name, "MTP broadcast"); in snd_mtpav_set_name()
639 struct snd_rawmidi_substream *substream; in snd_mtpav_get_RAWMIDI() local
657 substream = list_entry(list, struct snd_rawmidi_substream, list); in snd_mtpav_get_RAWMIDI()
658 snd_mtpav_set_name(mcard, substream); in snd_mtpav_get_RAWMIDI()
659 substream->ops = &snd_mtpav_input; in snd_mtpav_get_RAWMIDI()
662 substream = list_entry(list, struct snd_rawmidi_substream, list); in snd_mtpav_get_RAWMIDI()
663 snd_mtpav_set_name(mcard, substream); in snd_mtpav_get_RAWMIDI()
664 substream->ops = &snd_mtpav_output; in snd_mtpav_get_RAWMIDI()
665 mcard->ports[substream->number].hwport = translate_subdevice_to_hwport(mcard, substream->number); in snd_mtpav_get_RAWMIDI()