On Wed, Nov 11, 2020 at 11:18 AM Peter Chen <peter.chen@xxxxxxx> wrote: > > On 20-11-08 02:18:30, Ruslan Bilovol wrote: > > Current f_uac2 USB OUT (aka 'capture') synchronization > > implements 'ASYNC' scenario which means USB Gadget has > > it's own freerunning clock and can update Host about > > real clock frequency through feedback endpoint so Host > > can align number of samples sent to the USB gadget to > > prevent overruns/underruns > > > > In case if Gadget can has no it's internal clock and > > can consume audio samples at any rate (for example, > > on the Gadget side someone records audio directly to > > a file, or audio samples are played through an > > external DAC as soon as they arrive), UAC2 spec > > suggests 'ADAPTIVE' synchronization type. > > > > Change UAC2 driver to make it configurable through > > additional 'c_sync' configfs file. > > > > Default remains 'asynchronous' with possibility to > > switch it to 'adaptive' > > > > Signed-off-by: Ruslan Bilovol <ruslan.bilovol@xxxxxxxxx> > > --- > > Documentation/ABI/testing/configfs-usb-gadget-uac2 | 1 + > > Documentation/usb/gadget-testing.rst | 1 + > > drivers/usb/gadget/function/f_uac2.c | 96 ++++++++++++++++++++-- > > drivers/usb/gadget/function/u_uac2.h | 2 + > > 4 files changed, 91 insertions(+), 9 deletions(-) > > > > diff --git a/Documentation/ABI/testing/configfs-usb-gadget-uac2 b/Documentation/ABI/testing/configfs-usb-gadget-uac2 > > index 2bfdd4e..4fbff96 100644 > > --- a/Documentation/ABI/testing/configfs-usb-gadget-uac2 > > +++ b/Documentation/ABI/testing/configfs-usb-gadget-uac2 > > @@ -7,6 +7,7 @@ Description: > > c_chmask - capture channel mask > > c_srate - capture sampling rate > > c_ssize - capture sample size (bytes) > > + c_sync - capture synchronization type (async/adaptive) > > Can't apply it based on the latest code, this file has changed. This patch set is based on Felipe's -next branch which seems to be a little bit outdated. Thanks, Ruslan