aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2009-07-13 07:50:17 -0400
committerTakashi Iwai <tiwai@suse.de>2009-07-15 05:56:58 -0400
commitb86c87288c2205376ee213d6a03ac9422faf014a (patch)
treeaa1792c67fe0b2a9006c45c644b8b46f6e9c2286 /sound/core/seq
parentf907ed94f993b0cd366c26eaa88b90c5454203ae (diff)
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 <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq')
-rw-r--r--sound/core/seq/seq_midi.c3
1 files changed, 0 insertions, 3 deletions
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
249static int midisynth_unuse(void *private_data, struct snd_seq_port_subscribe *info) 249static int midisynth_unuse(void *private_data, struct snd_seq_port_subscribe *info)
250{ 250{
251 struct seq_midisynth *msynth = private_data; 251 struct seq_midisynth *msynth = private_data;
252 unsigned char buf = 0xff; /* MIDI reset */
253 252
254 if (snd_BUG_ON(!msynth->output_rfile.output)) 253 if (snd_BUG_ON(!msynth->output_rfile.output))
255 return -EINVAL; 254 return -EINVAL;
256 /* sending single MIDI reset message to shut the device up */
257 snd_rawmidi_kernel_write(msynth->output_rfile.output, &buf, 1);
258 snd_rawmidi_drain_output(msynth->output_rfile.output); 255 snd_rawmidi_drain_output(msynth->output_rfile.output);
259 return snd_rawmidi_kernel_release(&msynth->output_rfile); 256 return snd_rawmidi_kernel_release(&msynth->output_rfile);
260} 257}