Skip to content

Commit

Permalink
ALSA: isight: fix packet requeueing
Browse files Browse the repository at this point in the history
After handling a received packet, we want to resubmit the same packet,
so do not increase the packet index too early.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Clemens Ladisch authored and Takashi Iwai committed May 11, 2011
1 parent 03c2968 commit 898732d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sound/firewire/isight.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ static void isight_packet(struct fw_iso_context *context, u32 cycle,
}
}

if (++index >= QUEUE_LENGTH)
index = 0;

err = fw_iso_context_queue(isight->context, &audio_packet,
&isight->buffer.iso_buffer,
isight->buffer.packets[index].offset);
Expand All @@ -211,6 +208,8 @@ static void isight_packet(struct fw_iso_context *context, u32 cycle,
return;
}

if (++index >= QUEUE_LENGTH)
index = 0;
isight->packet_index = index;
}

Expand Down

0 comments on commit 898732d

Please sign in to comment.