int snd_rawmidi_drop_output(struct snd_rawmidi_substream *substream) { unsigned long flags; struct snd_rawmidi_runtime *runtime = substream->runtime; snd_rawmidi_output_trigger(substream, 0); runtime->drain = 0; spin_lock_irqsave(&runtime->lock, flags); runtime->appl_ptr = runtime->hw_ptr = 0; runtime->avail = runtime->buffer_size; spin_unlock_irqrestore(&runtime->lock, flags); return 0; }
int snd_rawmidi_drop_output(struct snd_rawmidi_substream *substream) { snd_rawmidi_output_trigger(substream, 0); reset_runtime_ptrs(substream->runtime, false); return 0; }