summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/function/u_uac2.h
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@nxp.com>2017-01-04 10:19:23 +0800
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-01-24 11:04:21 +0200
commite92b9d449d0490800160bfeb5ee1175a02979f47 (patch)
treee6a52e9d53ab3e42e90979aea3473f0ec3935015 /drivers/usb/gadget/function/u_uac2.h
parentec33efe28f9f87e51cc79ce060ae0101eedd5a19 (diff)
downloadlinux-e92b9d449d0490800160bfeb5ee1175a02979f47.tar.bz2
usb: gadget: uac2: add req_number as parameter
There are only two requests for uac2, it may not be enough at high loading system which usb interrupt handler can't be serviced on time, then the data will be lost since it is isoc transfer for audio. In this patch, we introduce a parameter for the number for usb request, and the user can override it if current number for request is not enough for his/her use case. Besides, update this parameter for legacy audio gadget and documentation. Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/function/u_uac2.h')
-rw-r--r--drivers/usb/gadget/function/u_uac2.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/u_uac2.h b/drivers/usb/gadget/function/u_uac2.h
index 78dd37279bd4..19eeb83538a5 100644
--- a/drivers/usb/gadget/function/u_uac2.h
+++ b/drivers/usb/gadget/function/u_uac2.h
@@ -24,6 +24,7 @@
#define UAC2_DEF_CCHMASK 0x3
#define UAC2_DEF_CSRATE 64000
#define UAC2_DEF_CSSIZE 2
+#define UAC2_DEF_REQ_NUM 2
struct f_uac2_opts {
struct usb_function_instance func_inst;
@@ -33,6 +34,7 @@ struct f_uac2_opts {
int c_chmask;
int c_srate;
int c_ssize;
+ int req_number;
bool bound;
struct mutex lock;