Re: [PATCH v2 11/11] usb: gadget: f_uac2: Determining bInterval for HS and SS

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

 



On Mon, Dec 20, 2021 at 10:11:30PM +0100, Pavel Hofman wrote:
> So far bInterval for HS and SS was fixed at 4, disallowing faster
> samplerates. The patch determines the largest bInterval (4 to 1) for
> which the required bandwidth of the max samplerate fits the max allowed
> packet size. If the required bandwidth exceeds max bandwidth for
> single-packet mode (ep->mc=1), bInterval is left at 1.

I'm not sure if this is desirable - there are more concerns around the
interval than just whether the bandwidth is available.

The nice thing about having the HS/SS interval at 4 when the FS value is
1 is that these both correspond to 1ms, which means the calculations for
minimum buffer & period sizes are the same for FS/HS/SS.

How do FS transfers work if the bandwidth requirements necessitate a
smaller interval for HS/SS?  Doesn't that mean the FS transfers must be
too big?

I don't think there has ever been a check that the configured sample
size, channel count and interval actually fit in the max packet size for
an endpoint.  Is that something that should be checked to give an error
on bind if the configuration can't work?

> The FS mode is left at fixed bInterval=1.
> 
> Signed-off-by: Pavel Hofman <pavel.hofman@xxxxxxxxxxx>



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

  Powered by Linux