Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342626
b: refs/heads/master
c: 28acb12
h: refs/heads/master
v: v3
  • Loading branch information
Eldad Zack authored and Takashi Iwai committed Nov 29, 2012
1 parent 076b7c5 commit 9ebe35f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fde854bdaf603a99a80b9545c0aaca9ccd02dd31
refs/heads/master: 28acb12014fb0c3e1edfdab1b1e3e266cf651550
9 changes: 6 additions & 3 deletions trunk/sound/usb/endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,15 +1018,18 @@ void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
/*
* Iterate through the inbound packet and prepare the lengths
* for the output packet. The OUT packet we are about to send
* will have the same amount of payload bytes than the IN
* packet we just received.
* will have the same amount of payload bytes per stride as the
* IN packet we just received. Since the actual size is scaled
* by the stride, use the sender stride to calculate the length
* in case the number of channels differ between the implicitly
* fed-back endpoint and the synchronizing endpoint.
*/

out_packet->packets = in_ctx->packets;
for (i = 0; i < in_ctx->packets; i++) {
if (urb->iso_frame_desc[i].status == 0)
out_packet->packet_size[i] =
urb->iso_frame_desc[i].actual_length / ep->stride;
urb->iso_frame_desc[i].actual_length / sender->stride;
else
out_packet->packet_size[i] = 0;
}
Expand Down

0 comments on commit 9ebe35f

Please sign in to comment.