[PATCH v3 4/4] usb: gadget: f_uac2: send reasonably sized packets

2014-08-26 Thread Daniel Mack
The UAC2 function driver currently responds to all packets at all times with wMaxPacketSize packets. That results in way too fast audio playback as the function driver (which is in fact supposed to define the audio stream pace) delivers as fast as it can. Fix this by pre-calculating the size of

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

2014-08-26 Thread Jassi Brar
On Tue, Aug 26, 2014 at 1:46 PM, Daniel Mack zon...@gmail.com wrote: +static void +afunc_set_p_pktsize(struct usb_gadget *gadget, struct audio_dev *agdev) +{ + unsigned i, residue, rate, factor, interval, framesize, pktsize, len; + struct snd_uac2_chip *uac2 = agdev-uac2; +