[alsa-devel] Missing exactly 3 of 8 audio packets?

Daniel Griscom griscom at suitable.com
Tue Nov 27 21:10:45 CET 2012

At 8:46 PM +0100 11/27/12, Clemens Ladisch wrote:
>Daniel Griscom wrote:
>>  We are using a bInterval value of 1 (on a high-speed device). We've
>>  recently tried bumping this up to 2, and the problem was no longer
>>  evident
>This might indicate that the controller has problems reading the
>packet data from memory; there's a considerable overhead for each
>memory transaction, and the controller needs to update the DMA lists.
>(The pattern might be caused by some data, which arrives too late,
>interfering with the reading of the next packet.)

So, might this whole thing have been caused by setting bInterval to 1 
in the device descriptor?

>If 2 is the first save interval, consider using 4.

Interval lengths are 2 ^ (bInterval - 1) microframes, so we went from 
1 microframe to 2. Should I go right to a bInterval of 2 (4 

>  For that matter,
>full-speed devices work fine with one packet per frame.  There isn't
>a problem with buffering one millisecond of data in the device, is it?

We are indeed trying to squeeze the milliseconds out of the audio 
chain, but getting it robust is obviously the priority.

>(The only reason to use smaller intervals is if you really require sub-
>millisecond latencies, or if the bigger packets would eat up too much
>bandwidth in one of the microframes.  The cost of smaller intervals is
>more overhead on the host, on the bus, and in the device.)

We have plenty of bus bandwidth, and I'd thought we had plenty of CPU 
power, but perhaps not.


Daniel T. Griscom             griscom at suitable.com
Suitable Systems              http://www.suitable.com/
1 Centre Street, Suite 204    (781) 665-0053
Wakefield, MA  01880-2400

More information about the Alsa-devel mailing list