Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: USBNotSent2Err and how to recover?



At 4:34 PM -0600 2/24/06, Mark Cookson wrote:
On the 17" Intel Core Duo iMac a couple of our USB audio devices get the
USBNotSent2Err on one of their interfaces.

After getting this error (in frStatus
the completion routine) my standard bit of error correction isn't able to
get things going again, though no errors are reported from the pipe->Read()
call that's made after this error is returned.

What's causing this error in the first place?  And how should I try to
recover from it?

I'm hoping that this means that my error correction is missing a case, but
I'm not seeing it.  I'm hoping someone on this list can tell me more about
what the USBNotSent2Err means and how I should try to recover from it.

USBNotSent1Err and USBNotSent2Err happen when your isoc read is issued too late (the start frame has already passed by the time the request got to the head of the queue).


You don't need to do anything to recover from them other than make a note that you dropped a packet (and possibly to check the current USB frame count to make sure you're not _way_ off).

When starting an isoc stream, I generally start issuing requests for the next frame and just expect to see USBNotSent1Err and USBNotSent2Err for some number of frames until the stream starts up -- if I receive too many, I recalculate my "next frame to read" count and try again.

IIRC, I get USBNotSent1Err on high speed and USBNotSent2Err on full speed, but YMMV.

If you see these errors in the middle of the stream, it means you're not keeping enough async reads in flight or your completion handling thread was pre-empted for too long.

For a starting point, our video drivers keep 20 reads of 8 frames (or 64 high speed transfers) in flight with a buffer pool of 3 video frames in size -- roughly 200 buffers.

If you try to put too many reads in flight, the USB stack will run out of transfer descriptors and you'll start getting errors.

HTH,

-Steve
--
_________________________________________________________________________
Steve Sisak, CTO                                 email@hidden
IOXperts, Inc.                                            +1 617 876-2572
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden
References: 
 >USBNotSent2Err and how to recover? (From: Mark Cookson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.