Lines Matching refs:substream
10 static int midi_capture_open(struct snd_rawmidi_substream *substream) in midi_capture_open() argument
16 static int midi_playback_open(struct snd_rawmidi_substream *substream) in midi_playback_open() argument
18 struct snd_ff *ff = substream->rmidi->private_data; in midi_playback_open()
21 ff->on_sysex[substream->number] = 0; in midi_playback_open()
22 ff->rx_midi_error[substream->number] = false; in midi_playback_open()
24 WRITE_ONCE(ff->rx_midi_substreams[substream->number], substream); in midi_playback_open()
29 static int midi_capture_close(struct snd_rawmidi_substream *substream) in midi_capture_close() argument
35 static int midi_playback_close(struct snd_rawmidi_substream *substream) in midi_playback_close() argument
37 struct snd_ff *ff = substream->rmidi->private_data; in midi_playback_close()
39 cancel_work_sync(&ff->rx_midi_work[substream->number]); in midi_playback_close()
40 WRITE_ONCE(ff->rx_midi_substreams[substream->number], NULL); in midi_playback_close()
45 static void midi_capture_trigger(struct snd_rawmidi_substream *substream, in midi_capture_trigger() argument
48 struct snd_ff *ff = substream->rmidi->private_data; in midi_capture_trigger()
54 WRITE_ONCE(ff->tx_midi_substreams[substream->number], in midi_capture_trigger()
55 substream); in midi_capture_trigger()
57 WRITE_ONCE(ff->tx_midi_substreams[substream->number], NULL); in midi_capture_trigger()
62 static void midi_playback_trigger(struct snd_rawmidi_substream *substream, in midi_playback_trigger() argument
65 struct snd_ff *ff = substream->rmidi->private_data; in midi_playback_trigger()
70 if (up || !ff->rx_midi_error[substream->number]) in midi_playback_trigger()
71 schedule_work(&ff->rx_midi_work[substream->number]); in midi_playback_trigger()
79 struct snd_rawmidi_substream *substream; in set_midi_substream_names() local
81 list_for_each_entry(substream, &stream->substreams, list) { in set_midi_substream_names()
82 scnprintf(substream->name, sizeof(substream->name), in set_midi_substream_names()
83 "%s MIDI %d", name, substream->number + 1); in set_midi_substream_names()