aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2011-05-11 04:48:24 -0400
committerTakashi Iwai <tiwai@suse.de>2011-05-11 08:51:13 -0400
commit898732d1f1c7181fd3e94e7d7a784edb48d09d95 (patch)
treeac77de85f17d58a4a387364681bbb0d5b342125d
parent03c29680d49662859d14d64f8673550fa3fb2ed1 (diff)
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 <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/firewire/isight.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/firewire/isight.c b/sound/firewire/isight.c
index 0230605c917e..4e334919a70f 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,
198 } 198 }
199 } 199 }
200 200
201 if (++index >= QUEUE_LENGTH)
202 index = 0;
203
204 err = fw_iso_context_queue(isight->context, &audio_packet, 201 err = fw_iso_context_queue(isight->context, &audio_packet,
205 &isight->buffer.iso_buffer, 202 &isight->buffer.iso_buffer,
206 isight->buffer.packets[index].offset); 203 isight->buffer.packets[index].offset);
@@ -211,6 +208,8 @@ static void isight_packet(struct fw_iso_context *context, u32 cycle,
211 return; 208 return;
212 } 209 }
213 210
211 if (++index >= QUEUE_LENGTH)
212 index = 0;
214 isight->packet_index = index; 213 isight->packet_index = index;
215} 214}
216 215