RE: UAC2 gadget not recognized on Windows 10

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

 



Hi,

Robert Bielik <Robert.Bielik@xxxxxxxxx> writes:
>> > It seems such a feedback endpoint is now required by the standard:
>> > "The USB 2.0 specification states that if isochronous OUT data
>> > endpoint uses the asynchronous synchronization, an isochronous
>> > feedback endpoint is needed."
>> 
>> We actually have both EP IN and EP OUT on the UAC2 function:
>> 
>>     272:static struct usb_endpoint_descriptor fs_epout_desc = {
>>     282:static struct usb_endpoint_descriptor hs_epout_desc = {
>>     349:static struct usb_endpoint_descriptor fs_epin_desc = {
>>     359:static struct usb_endpoint_descriptor hs_epin_desc = {
>
> Yes, but that isn't the issue AFAIU ? In the USB 2.0 standard related
> to synchronization
> (http://sdphca.ucsd.edu/lab_equip_manuals/usb_20.pdf chapter 5.12.4),
> an isochronous OUT ep with asynchronous synchronization is *required*
> (at least by Microsoft) to have a feedback IN ep, to be able to report
> to the host the rate so no under- or overrun condition occurs.

Indeed, that's also mandated by USB spec. Seems like we need to patch
f_uac2.c. Can you check if setting the IN endpoint as implicit feedback
data is enough?

modified   drivers/usb/gadget/function/f_uac2.c
@@ -351,7 +351,8 @@ static struct usb_endpoint_descriptor fs_epin_desc = {
 	.bDescriptorType = USB_DT_ENDPOINT,
 
 	.bEndpointAddress = USB_DIR_IN,
-	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
+	.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC |
+			USB_ENDPOINT_USAGE_IMPLICIT_FB,
 	.wMaxPacketSize = cpu_to_le16(1023),
 	.bInterval = 1,
 };
@@ -360,7 +361,8 @@ static struct usb_endpoint_descriptor hs_epin_desc = {
 	.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_ASYNC |
+			USB_ENDPOINT_USAGE_IMPLICIT_FB,
 	.wMaxPacketSize = cpu_to_le16(1024),
 	.bInterval = 4,
 };


-- 
balbi

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux