Re: Published! Technical Note TN2274: USB Audio on the Mac
Re: Published! Technical Note TN2274: USB Audio on the Mac
- Subject: Re: Published! Technical Note TN2274: USB Audio on the Mac
- From: Iain McCowan <email@hidden>
- Date: Tue, 10 Aug 2010 10:00:01 +1000
Not sure if this email belongs on the Core Audio list or some driver list, but seeing that the USB Driver Tech Note was posted here, am following up to that...
I am developing a USB audio device and am working hard to make it properly compliant with the class definition 1.0.
We have implemented the device following the synchronous endpoint model, so the device internally locks its ADC clock to the SOF signal. This has been tested and appears to work accurately.
The device is full-speed, 48 kHz, 24-bit, 7 channels, so at the upper limit of the allowable packet size for a full-speed device (1008 bytes). This is why we are doing a synchronous design, as the packet size cannot be increased by even one sample (=21 bytes) so must always be 1008 bytes. Of course going to Audio Class Definition 2.0 is a possibility, however other platforms still only support Audio 1.0, so our preference is to keep this for maximum compatibility.
The device enumerates correctly, and functions well on older Mac's (e.g. MacBookPro4,1 running 10.5.8), but not on a new Macbook (MacbookPro5,3 running 10.6.4). The device runs without obvious error, but when inspecting the audio there are constant artefacts causing audible crackle, including apparent frames of zeros and repeated samples.
In low-level debugging of our device, we note that the Mac is not reliably reading the packets from the USB device. According to USB spec this should happen every 1ms +/- 0.5ms jitter. On a CRO we observe that everything functions as expected for the first second or two, but after this several milliseconds pass with no apparent read by the USB host, and this is not compensated for by faster subsequent reads.
We have come to the end of our device debugging and are starting to wonder if there is some bug in the latest Apple USB Audio driver for synchronous endpoints, or else the SOF signal from new macbooks is outside the expected bounds (1kHz +/- 2500ppm).
As I say, it works on older machine - I am not sure if this is due to the hardware changes (I know from previous issues that older machines had less reliable USB controllers for high audio throughput), or due to the new driver?
I tried downloading and installing older versions of the IOUSBFamily drivers on my 10.6.4 system to see if this was the issue, but the install won't allow overwriting newer versions of the drivers.
Does anyone have advice to help us resolve this?
On Fri, Jun 18, 2010 at 3:24 AM, Alison Hughes
<email@hidden> wrote:
For USB audio device developers:
I have published a comprehensive guide to developing class compliant USB audio devices for the Mac here: http://developer.apple.com/mac/library/technotes/tn2010/tn2274.html
Topics include:
- AppleUSBAudio class driver overview
- Supported USB Audio 1.0 & 2.0 features
- Engine/stream architecture, sample synchronous i/o streams
- Endpoint synchronization types
- How to calculate max packet size
- How the driver determines what controls to publish
- Device originated status interrupts
- Descriptive naming of device/channels
- Ways to extend the class driver
Please keep an eye on this tech note as we will continue to update it with additional driver information and enhancements as they become available.
Thanks,
Alison
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (
email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden