VirtualBox

Changeset 58165 in vbox for trunk/src/VBox/Devices/USB


Ignore:
Timestamp:
Oct 9, 2015 9:46:40 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103273
Message:

USB/Darwin: Attempt to fix high-speed isochronous transfers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/darwin/USBProxyDevice-darwin.cpp

    r57990 r58165  
    162162    /** The endpoint interval. (interrupt) */
    163163    uint8_t                 u8Interval;
     164    /** Full-speed device indicator (isochronous pipes only). */
     165    bool                    fIsFullSpeed;
    164166    /** The max packet size. */
    165167    uint16_t                u16MaxPacketSize;
     
    732734     */
    733735    int rc = VINF_SUCCESS;
     736    bool fFullSpeed;
     737    UInt32 u32UsecInFrame;
    734738    UInt8 cPipes;
    735739    IOReturn irc = (*pIf->ppIfI)->GetNumEndpoints(pIf->ppIfI, &cPipes);
     
    746750    pIf->cPipes = cPipes + 1;
    747751
     752    /* Find out if this is a full-speed interface (needed for isochronous support). */
     753    irc = (*pIf->ppIfI)->GetFrameListTime(pIf->ppIfI, &u32UsecInFrame);
     754    if (irc != kIOReturnSuccess)
     755    {
     756        pIf->cPipes = 0;
     757        if (irc == kIOReturnNoDevice)
     758            rc = VERR_VUSB_DEVICE_NOT_ATTACHED;
     759        else
     760            rc = RTErrConvertFromDarwin(irc);
     761        return rc;
     762    }
     763    fFullSpeed = u32UsecInFrame == kUSBFullSpeedMicrosecondsInFrame;
     764
    748765    /*
    749766     * Get the properties of each pipe.
     
    752769    {
    753770        pIf->aPipes[i].u8PipeRef = i;
     771        pIf->aPipes[i].fIsFullSpeed = fFullSpeed;
    754772        pIf->aPipes[i].u64NextFrameNo = 0;
    755773        irc = (*pIf->ppIfI)->GetPipeProperties(pIf->ppIfI, i,
     
    17421760                         pUrb->pszDesc, pPipe->u64NextFrameNo, FrameNo, pUrb->cIsocPkts, j, u8PipeRef));
    17431761                    if (irc == kIOReturnSuccess)
    1744                         pPipe->u64NextFrameNo = FrameNo + pUrb->cIsocPkts;
     1762                    {
     1763                        if (pPipe->fIsFullSpeed)
     1764                            pPipe->u64NextFrameNo = FrameNo + pUrb->cIsocPkts;
     1765                        else
     1766                            pPipe->u64NextFrameNo = FrameNo + 1;
     1767                    }
    17451768                    break;
    17461769                }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette