From: Clemens Ladisch Date: Mon, 13 Jul 2009 11:50:17 +0000 (+0200) Subject: sound: seq_midi: do not send MIDI reset when closing X-Git-Tag: firefly_0821_release~12220^2~25^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b86c87288c2205376ee213d6a03ac9422faf014a;p=firefly-linux-kernel-4.4.55.git sound: seq_midi: do not send MIDI reset when closing Sending a MIDI reset message when closing a port is wrong because we only want to shut the device up, not to reset all settings. Furthermore, many devices ignore this message. Fortunately, the RawMIDI layer already shuts the device up, so we can ignore this matter here. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai --- diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c index 3810c52f652e..45cf5c144e39 100644 --- a/sound/core/seq/seq_midi.c +++ b/sound/core/seq/seq_midi.c @@ -249,12 +249,9 @@ static int midisynth_use(void *private_data, struct snd_seq_port_subscribe *info static int midisynth_unuse(void *private_data, struct snd_seq_port_subscribe *info) { struct seq_midisynth *msynth = private_data; - unsigned char buf = 0xff; /* MIDI reset */ if (snd_BUG_ON(!msynth->output_rfile.output)) return -EINVAL; - /* sending single MIDI reset message to shut the device up */ - snd_rawmidi_kernel_write(msynth->output_rfile.output, &buf, 1); snd_rawmidi_drain_output(msynth->output_rfile.output); return snd_rawmidi_kernel_release(&msynth->output_rfile); }