summaryrefslogtreecommitdiffstats
path: root/sound/firewire/amdtp-am824.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/firewire/amdtp-am824.c')
-rw-r--r--sound/firewire/amdtp-am824.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/firewire/amdtp-am824.c b/sound/firewire/amdtp-am824.c
index fd5d6b8ac557..99c567ded7a3 100644
--- a/sound/firewire/amdtp-am824.c
+++ b/sound/firewire/amdtp-am824.c
@@ -315,12 +315,16 @@ static void read_midi_messages(struct amdtp_stream *s,
315 __be32 *buffer, unsigned int frames) 315 __be32 *buffer, unsigned int frames)
316{ 316{
317 struct amdtp_am824 *p = s->protocol; 317 struct amdtp_am824 *p = s->protocol;
318 unsigned int f, port;
319 int len; 318 int len;
320 u8 *b; 319 u8 *b;
320 int f;
321 321
322 for (f = 0; f < frames; f++) { 322 for (f = 0; f < frames; f++) {
323 port = (8 - s->ctx_data.tx.first_dbc + s->data_block_counter + f) % 8; 323 unsigned int port = f;
324
325 if (!(s->flags & CIP_UNALIGHED_DBC))
326 port += s->data_block_counter;
327 port %= 8;
324 b = (u8 *)&buffer[p->midi_position]; 328 b = (u8 *)&buffer[p->midi_position];
325 329
326 len = b[0] - 0x80; 330 len = b[0] - 0x80;