[alsa-devel] [PATCH] ALSA: usb: refine delay information with USB frame counter

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Thu Aug 25 16:00:33 CEST 2011


> > +	if (frame_diff < 0)
> > +		frame_diff += 1024; /* handle 10-bit wrap-around */
> 
> After reading through some HCD source files, I deduced the following
> wrap-arounds:
> 
> EHCI: 8-10 bits (default 9)
> FHCI: 11 bits
> IMX21: 16 bits
> ISP1760: 10 bits
> OHCI: 16 bits
> OXU210HP: 10 bits
> R8A66597: 10 bits
> SL811: 5 bits(!?)
> UHCI: 32 bits
> xHCI: ?
> 
> As long as there isn't an API that tells us about the valid range of
> the
> frame counter, we should probably mask off all except the lowest few
> bits.

Argh. Good catch, thanks for looking into this. 
If we only used the 8 least-significant bits, it'd still leave us with up to
256 ms. That should work I guess. But the SL811 with 5 bits is a problem,
that makes 32ms, this is probably too low. In that case we'd need to fall
back to the existing scheme and ignore the frame counter information.
-Pierre



More information about the Alsa-devel mailing list