diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2011-05-11 12:48:24 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-05-11 16:51:13 +0400 |
commit | 898732d1f1c7181fd3e94e7d7a784edb48d09d95 (patch) | |
tree | ac77de85f17d58a4a387364681bbb0d5b342125d /sound | |
parent | 03c29680d49662859d14d64f8673550fa3fb2ed1 (diff) | |
download | linux-898732d1f1c7181fd3e94e7d7a784edb48d09d95.tar.xz |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/firewire/isight.c | 5 |
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, } } - 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; } |