mirror of https://gitee.com/openkylin/linux.git
9bb87f1689
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 sizing each packet correctly with the following steps: a) Set the packet's size by dividing the nominal data rate by the playback endpoint's interval. b) If there is a residual value from the calculation in a), add it to a accumulator to keep track of it across packets. c) If the accumulator has gathered at least the number of bytes that are needed for one sample frame, increase the packet size. This way, the packet size calculation will get rid of any kind of imprecision that would otherwise occur with a simple division over time. Some of the variables that are needed while processing each packet are pre-computed for performance reasons. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com> |
||
---|---|---|
.. | ||
Makefile | ||
f_acm.c | ||
f_ecm.c | ||
f_eem.c | ||
f_fs.c | ||
f_hid.c | ||
f_loopback.c | ||
f_mass_storage.c | ||
f_mass_storage.h | ||
f_midi.c | ||
f_ncm.c | ||
f_obex.c | ||
f_phonet.c | ||
f_rndis.c | ||
f_serial.c | ||
f_sourcesink.c | ||
f_subset.c | ||
f_uac1.c | ||
f_uac2.c | ||
f_uvc.c | ||
f_uvc.h | ||
g_zero.h | ||
ndis.h | ||
rndis.c | ||
rndis.h | ||
storage_common.c | ||
storage_common.h | ||
u_ecm.h | ||
u_eem.h | ||
u_ether.c | ||
u_ether.h | ||
u_ether_configfs.h | ||
u_fs.h | ||
u_gether.h | ||
u_ncm.h | ||
u_phonet.h | ||
u_rndis.h | ||
u_serial.c | ||
u_serial.h | ||
u_uac1.c | ||
u_uac1.h | ||
u_uac2.h | ||
uvc.h | ||
uvc_queue.c | ||
uvc_queue.h | ||
uvc_v4l2.c | ||
uvc_video.c |