]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sound: rawmidi: disable active-sensing-on-close by default
authorClemens Ladisch <clemens@ladisch.de>
Mon, 13 Jul 2009 11:52:46 +0000 (13:52 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Dec 2009 18:21:03 +0000 (10:21 -0800)
commit 2d4b842014dc76a81abced47ef27177eedb9deba upstream.

Sending an Active Sensing message when closing a port can interfere with
the following data if the port is reopened and a note-on is sent before
the device's timeout has elapsed.  Therefore, it is better to disable
this setting by default.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/rawmidi.c
sound/core/seq/seq_midi.c

index 473247c8e6d3e22c2e3466e80443e6e6e3054680..c0adc14c91f0ad31b2f42084c794d7f1a70957a5 100644 (file)
@@ -274,7 +274,7 @@ static int open_substream(struct snd_rawmidi *rmidi,
                return err;
        substream->opened = 1;
        if (substream->use_count++ == 0)
-               substream->active_sensing = 1;
+               substream->active_sensing = 0;
        if (mode & SNDRV_RAWMIDI_LFLG_APPEND)
                substream->append = 1;
        rmidi->streams[substream->stream].substream_opened++;
index 4d26146a62ccd8fd2fff0c73ea25507ff4a6550f..90356b880dbbff368c0ef0644f8552cf2112ba2c 100644 (file)
@@ -236,6 +236,7 @@ static int midisynth_use(void *private_data, struct snd_seq_port_subscribe *info
        memset(&params, 0, sizeof(params));
        params.avail_min = 1;
        params.buffer_size = output_buffer_size;
+       params.no_active_sensing = 1;
        if ((err = snd_rawmidi_output_params(msynth->output_rfile.output, &params)) < 0) {
                snd_rawmidi_kernel_release(&msynth->output_rfile);
                return err;