I don't know how others "do it", but this clock synchronization method (ISO
Sync) is very easy to do in hardware
you simply infer the USB host's clock by accurately timing SOF<>SOF in hardware
(not via MCU ISR) and dynamically (but slowly) adjust your local master audio
clock to manage audio buffers... you can achieve a very accurate "water level"
using this method of synchronization
ISO Async is a completely different synchronization method, but has the
advantage of low jitter audio master clock (since the synchronization method
above is removed and feedback is solved other ways)
It's in now way extremely tricky problem... but, in the early days of UAC for
some reason this problem was left up to the software engineer to solve on the
UAC Device, which led to the whole add/drop audio sample debacle - which is
completely unacceptable...
<please keep in mind, not of what I have type is related to how Windows deals
with all this ---- strictly how USB system handles this, for anything ISO
transfer related - no matter UAC, UVC, etc)
From: Tim Roberts <timr@xxxxxxxxx>
To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Wednesday, October 18, 2017 2:41 PM
Subject: [wdmaudiodev] Re: Windows Clock Compensation
Akshaykeerti Sharma wrote:
One possible solution we implemented for usb-audio using synchronous
mode was to adjust the reference clocks on the micro-controller in
realtime by a very small amount to ensure that there are no
underflow/overflow conditions that manifest themselves as
pops/clicks(we did have pops and clicks otherwise)