Re: [alsa-devel] Buffer size for ALSA USB PCM audio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 12 Aug 2013, Alan Stern wrote:

> On Mon, 12 Aug 2013, Takashi Iwai wrote:
> 
> > So... Clemens, Daniel, Eldad, could you guys review the latest version
> > of Alan's patch?  I'd love to sort this out for 3.12.
> 
> Here's a revised version of the patch (still untested).  The difference
> is that this version tries always to keep a period's worth of bytes in
> the USB hardware queue.  This will provide better protection against
> underruns when the period is larger than the queue's minimum
> requirement.

After more thought, I decided that patch does too much.  It's not 
necessary to keep track of the number of packets.  Instead, the driver 
should always try to keep as much data in the USB hardware queue as it 
is allowed to.

In other words, there should be enough URBs so that an entire ALSA 
buffer can be queued at any time, subject only to the limit on the 
maximum number of URBs and packets.  It doesn't make sense to allocate 
just enough URBs to cover a single period.

Does this seem reasonable?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux