[PATCH] usb: gadget: f_uac2: EP OUT adaptive instead of async

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

 



The existing UAC2 implementation presents its EP OUT as
USB_ENDPOINT_SYNC_ASYNC.

However:
1) f_uac2 does not define any feedback endpoint

2) IMO in reality it is adaptive - the USB host is the one which sets
the pace of data.

Changing USB_ENDPOINT_SYNC_ASYNC to USB_ENDPOINT_SYNC_ADAPTIVE for the FS
and HS output endpoints corrects the config to reflect real functionality.

Also, the change makes the UAC2 gadget recognized and working
in MS Windows.

Signed-off-by: Pavel Hofman <pavel.hofman@xxxxxxxxxxx>
---
 drivers/usb/gadget/function/f_uac2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/function/f_uac2.c
b/drivers/usb/gadget/function/f_uac2.c
index db2d498..e8c9dd1 100644
--- a/drivers/usb/gadget/function/f_uac2.c
+++ b/drivers/usb/gadget/function/f_uac2.c
@@ -273,7 +273,7 @@ enum {
 	.bDescriptorType = USB_DT_ENDPOINT,

 	.bEndpointAddress = USB_DIR_OUT,
-	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
+	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ADAPTIVE,
 	.wMaxPacketSize = cpu_to_le16(1023),
 	.bInterval = 1,
 };
@@ -282,7 +282,7 @@ enum {
 	.bLength = USB_DT_ENDPOINT_SIZE,
 	.bDescriptorType = USB_DT_ENDPOINT,

-	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
+	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ADAPTIVE,
 	.wMaxPacketSize = cpu_to_le16(1024),
 	.bInterval = 4,
 };
-- 
1.9.1



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

  Powered by Linux