diff options
Diffstat (limited to 'sound/firewire/amdtp.c')
-rw-r--r-- | sound/firewire/amdtp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c index 5e13b3f15516..28ee3d86164d 100644 --- a/sound/firewire/amdtp.c +++ b/sound/firewire/amdtp.c @@ -78,6 +78,8 @@ int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit, s->callbacked = false; s->sync_slave = NULL; + s->rx_blocks_for_midi = UINT_MAX; + return 0; } EXPORT_SYMBOL(amdtp_stream_init); @@ -472,7 +474,8 @@ static void amdtp_fill_midi(struct amdtp_stream *s, b = (u8 *)&buffer[s->midi_position]; port = (s->data_block_counter + f) % 8; - if ((s->midi[port] == NULL) || + if ((f >= s->rx_blocks_for_midi) || + (s->midi[port] == NULL) || (snd_rawmidi_transmit(s->midi[port], b + 1, 1) <= 0)) b[0] = 0x80; else |