From 4f22847d7d25ccb5caedfa8b72bc18167c9fabee Mon Sep 17 00:00:00 2001
From: Vegard Storheil Eriksen <zyp@jvnv.net>
Date: Tue, 12 Mar 2013 23:30:05 +0800
Subject: [PATCH] Darwin: Do not assume HS when submitting isochronous
 transfer

---
 libusb/os/darwin_usb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c
index ed4a933..8575162 100644
--- a/libusb/os/darwin_usb.c
+++ b/libusb/os/darwin_usb.c
@@ -1443,7 +1443,10 @@ static int submit_iso_transfer(struct usbi_transfer *itransfer) {
                                                               transfer->num_iso_packets, tpriv->isoc_framelist, darwin_async_io_callback,
                                                               itransfer);
 
-  cInterface->frames[transfer->endpoint] = frame + transfer->num_iso_packets / 8;
+  if (transfer->dev_handle->dev->speed == LIBUSB_SPEED_FULL)
+    cInterface->frames[transfer->endpoint] = frame + transfer->num_iso_packets;
+  else
+    cInterface->frames[transfer->endpoint] = frame + transfer->num_iso_packets / 8;
 
   if (kresult != kIOReturnSuccess) {
     usbi_err (TRANSFER_CTX (transfer), "isochronous transfer failed (dir: %s): %s", IS_XFERIN(transfer) ? "In" : "Out",
-- 
1.7.12.4 (Apple Git-37)

