USB / Audio Class 1.0 driver - miscalculates bRefresh of endpoint

Originator:dom.peklo
Number:rdar://11981665 Date Originated:29-Jul-2012 10:39 AM
Status:Open Resolved:
Product:Mac OS X Product Version:10.8
Classification:Serious Bug Reproducible:Always
 
Summary:
USB driver / Audio Class 1.0 driver services ISO IN endpoint at a wrong rate - exactly double the rate as specified in endpoint descriptor's bRefresh field.
Our USB Audio Class 1.0 device utilizes asynchronous sink method for audio playback. The streaming data rate is controlled via isochronous sync endpoint, which is supposed to be polled every 32ms as per the endpoint descriptor's bRefresh = 5 value (2^5=32ms). Our device calculates the feedback number every 31st frame since last polling of the sync endpoint. This event will never happen because OS X 10.8 polls the endpoint every 16ms, contrary to the descriptor specification. The net result is broken playback with periodic buffer under/overruns.

Steps to Reproduce:
Have a USB Audio 1.0 Full Speed device with one asynchronous iso OUT endpoint and one associated iso IN sync endpoint. Set bRefresh field in sync endpoint descriptor to N, requesting servicing every 2^N ms/frames.

Expected Results:
Sync endpoint should receive iso IN transfer request every 2^N ms/frames.

Actual Results:
Sync endpoint actually receives iso IN transfer request every 2^(N-1) ms/frames.

Regression:
It has been reported by our customers that they experience the same symptoms when using our product with their new Macs featuring USB 3.0 ports, even when running the OS X 10.7 build that shipped with their machines.
On machines without USB 3.0 ports, there was no problem in any OS X version prior to 10.8 Mountain Lion.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!