aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2007-08-10 03:39:14 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:58:36 -0400
commit0b664f7206fac9676559e0012d8accc2dc0fc9fd (patch)
tree4a7e5945aa12976dc6719d29a4ffe078ea9631c9 /sound/core
parent394d051686d846c6cd86fe086166a4ea5507ccb5 (diff)
[ALSA] seq_midi_event: prevent running status after system messages
Reset the event type after encoding a system message to prevent any following data bytes from being interpreted as data for a running status system message, which is not allowed in MIDI. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/seq/seq_midi_event.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c
index cb38ff33f628..45ba6fc4646a 100644
--- a/sound/core/seq/seq_midi_event.c
+++ b/sound/core/seq/seq_midi_event.c
@@ -283,6 +283,8 @@ int snd_midi_event_encode_byte(struct snd_midi_event *dev, int c,
283 ev->flags |= SNDRV_SEQ_EVENT_LENGTH_FIXED; 283 ev->flags |= SNDRV_SEQ_EVENT_LENGTH_FIXED;
284 if (status_event[dev->type].encode) /* set data values */ 284 if (status_event[dev->type].encode) /* set data values */
285 status_event[dev->type].encode(dev, ev); 285 status_event[dev->type].encode(dev, ev);
286 if (dev->type >= ST_SPECIAL)
287 dev->type = ST_INVALID;
286 rc = 1; 288 rc = 1;
287 } else if (dev->type == ST_SYSEX) { 289 } else if (dev->type == ST_SYSEX) {
288 if (c == MIDI_CMD_COMMON_SYSEX_END || 290 if (c == MIDI_CMD_COMMON_SYSEX_END ||