Re: [PATCH v2 3/4] usb: gadget: f_uac2: send reasonably sized packets

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

 



On Tue, 26 Aug 2014, Daniel Mack wrote:

> On 08/26/2014 05:08 PM, Alan Stern wrote:
> > The normal approach is to perform a simple runtime calculation (no 
> > pre-allocated pattern).  It's not complex.
> > 
> > Let S be the number of samples per second at the nominal transfer rate 
> > (for example, S = 44100).  Let R be the number of packets per second 
> > (1000 because you transfer one packet every millisecond).
> 
> [...]
> 
> Yes, I thought about that too. The pre-allocated approach is not much
> code either, and it also gives accurate values for all common audio
> sample rates, but maybe the runtime calculation nicer and easier to read
> in the end. I'll give that a try later.

It has the advantage of working for all audio rates, not just the
common ones.  And it doesn't require preallocation of quite so many
transfer buffers (although they are generally small enough not to
matter much).

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