[alsa-devel] Buffer size for ALSA USB PCM audio
eldad at fogrefinery.com
Wed Aug 14 22:50:29 CEST 2013
On Tue, 13 Aug 2013, Daniel Mack wrote:
> Hi Alan,
> On 13.08.2013 23:06, Alan Stern wrote:
> > 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?
> I think so, yes. But I'd like to comment on the actual patch, and also
> give it a try first of course. It took me some days to gather my setup
> again, but if you send a revised version, I hope to be able to test it
> in the next days.
I can also test the revised patch on the weekend. My device uses
implicit feedback though.
More information about the Alsa-devel