On Mon, Mar 30, 2015 at 10:03:07AM -0400, Alan Stern wrote: > On Mon, 30 Mar 2015, Peter Chen wrote: > > > > That's strange. Can you please post the /sys/kernel/debug/usb/devices > > > file (with the UAC2 gadget plugged in), and also collect a usbmon trace > > > of the test? > > > > > > > It should be UAC2 gadget or chipidea driver problem, it is ok if I plug > > in USB audio card, but most of current audio cards support 44.1k+ > > frame rate, it can't handle the 3rd endpoint (176-184 bytes / endpoint), > > I don't know how to let it only read/writes 64 bytes, anyway, I will fix > > the UAC2 gadget problem first. > > > > Device file for UAC2: > > T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 14 Spd=12 MxCh= 0 > > D: Ver= 0.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 > > P: Vendor=15a2 ProdID=0054 Rev= 4.00 > > S: Manufacturer=Freescale > > S: Product=FSL i.mx6q sabreSD Board > > S: SerialNumber=123456ABCDEF > > C:* #Ifs= 3 Cfg#= 1 Atr=80 MxPwr= 6mA > > A: FirstIf#= 0 IfCount= 3 Cls=01(audio) Sub=00 Prot=20 > > I:* If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=20 > > Driver=snd-usb-audio > > I:* If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=20 > > Driver=snd-usb-audio > > I: If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 > > Driver=snd-usb-audio > > E: Ad=01(O) Atr=05(Isoc) MxPS=1023 Ivl=1ms > > I:* If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=20 > > Driver=snd-usb-audio > > I: If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 > > Driver=snd-usb-audio > > E: Ad=81(I) Atr=05(Isoc) MxPS=1023 Ivl=1ms > > This is bad. All the endpoints have maxpacket = 1023, and that's much > too big for this test. We need a maxpacket size of 64 (maybe a little > bigger but not much). Thanks, after changing maxpacket to 64, this problem is fixed. Go back to UAC2 spec, it defines wMaxPacketSize like below: Maximum packet size this endpoint is capable of sending or receiving when this configuration is selected. This is determined by the audio bandwidth constraints of the endpoint. So, the UAC2 should calculate maxpacket according to frame rate, and channel number. I will see if I can reproduce your case today. > > It may be possible to test the hardware without actually plugging in a > USB audio device. I can write a testing patch for ehci-hcd that will > cause it to create all the appropriate siTDs and link them into the > periodic schedule. > > All you will need is a full-speed hub. The host controller will send > the isochronous packets to the hub and you should be able to watch them > on a bus analyzer. There won't be any response to the packets > (obviously!), but for isochronous that's okay. > > Does that sound like it will work? > > Alan Stern > -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html