From 898732d1f1c7181fd3e94e7d7a784edb48d09d95 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Wed, 11 May 2011 10:48:24 +0200 Subject: ALSA: isight: fix packet requeueing 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 Signed-off-by: Takashi Iwai --- sound/firewire/isight.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sound/firewire') diff --git a/sound/firewire/isight.c b/sound/firewire/isight.c index 0230605c917..4e334919a70 100644 --- a/sound/firewire/isight.c +++ b/sound/firewire/isight.c @@ -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); @@ -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; } -- cgit v1.2.3-70-g09d2