Re: Synchronizing with the actual USB device audio clock
Re: Synchronizing with the actual USB device audio clock
- Subject: Re: Synchronizing with the actual USB device audio clock
- From: Markus Medau <email@hidden>
- Date: Sat, 24 Dec 2005 00:46:19 +0100
Hi Philippe,
> It seems that the Apple driver implements the "explicit" feedback
> endpoint synchronization method. I suppose that some buffering is
> needed at device level. Any idea of the amount of buffering (it has
> an impact on the latency of the system and it's an important point
> for us)?
Our "USB2 Audio Junction" unit is able to buffer 128 samples which
works fine in USB1.1 class mode at 32kHz / 44.1kHz / 48kHz
(supported samplerates) using a feedback pipe on Windows XP.
This is only "scientific" tests here and we stopped further class audio
support development due to a crackle problem on Mac OS X.
Sad as it is it doesn't matter too much to us since we're using our own
vendor kernel drivers, so we don't need to care about the operating system
class compliant stuff.
Using subframes for audio in our USB2.0 "vendor" mode we make
sure that the same number of samples is sent as is received, so we
don't need any further feedback. As the whole thing is subframe based,
less memory is needed for asynchronous audio even on higher samplerates
in USB2.0.
(This means a slightly higher samplerate leads to more bytes to be sent,
slighly lower less bytes, the pattern returns, so we're in sync.)
> Beside the use of a "feedback endpoint", the standard points on the
> possibility to use "implicit feedback" provided that the device
> complies to some "constraints" on its endpoints (satisfied by my
> device). If I have correctly understood, the principle is to deduce
> the data rate to use on the OUT stream from the data rate measured on
> the IN stream.
>From USB audio class specification input and output are basically independent
and not locked. If you want to lock to an external samplerate you need an
adaptive in endpoint (so the computer follows) and an asyncronous out endpoint
providing feedback about if you currently need a higher, same or lower samplerate
to not run into buffer underruns or overruns on firmware side.
> Hence my question: does the AppleUSBAudio driver
> implements this "implicit feedback" algorithm?
It's implemented but according to our experience it crackles from time to time.
It crackles more often in Panther compared to Tiger, the number of crackles
seems to be dependant on the feedback samplerate's delta. E.g. I had a
crackle every ten minutes, half the delta gave me a crackle every twenty
minutes, double the delta every five minutes (Tiger)....
> If yes, would it work also with "old" Apple computers which are
> "only" 1.1 USB host (e.g. G4 MDD)?
Yes, of course.
Cheers
Markus
_______________________________________________
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