You are here

UVC - wMaxPacketSize confusion | Cypress Semiconductor

UVC - wMaxPacketSize confusion

Summary: 1 Reply, Latest post by Serendip7 on 20 May 2014 02:04 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
Serendip7's picture
5 posts

 I'm trying to modify the videoclass firmware that comes with the SDK to work with NV12 instead of JPEG.  I ran into a problem with wMaxPacketSize on OSX.  USB Prober on OSX complains that the wMaxPacketSize field of the ISO endpoint descriptor is 0x1400.  The message is:

"0x1400: Illegal value for wMaxPacketSize for a SuperSpeed Isochronous endpoint (has to be between 0 and 1024)"

I looked up the field in the USB 3.0 spec and found this...

"For interrupt and isochronous endpoints this field shall be set to 1024 if this endpoint defines a value in the bMaxBurst field greater than zero. If the value in the bMaxBurst field is set to zero then this field can have any value from 0 to 1024 for an isochronous endpoint and 1 to 1024 for an interrupt endpoint."

I then looked through the cypress firmware (cyfxuvcdscr.c) and traced the problem to CY_FX_EP_ISO_VIDEO_PKT_SIZE_H being defined as the size of the packet OR'd with the number of packets...

"#define CY_FX_EP_ISO_VIDEO_PKT_SIZE_H  (uint8_t)(((CY_FX_EP_ISO_VIDEO_PKT_SIZE & 0xFF00) >> 8)  \

                                                 | ((CY_FX_EP_ISO_VIDEO_PKTS_COUNT-1) << 3))"


so this looks like a bug with the Cypress firmware but then I found that if I force the value to 0x0400 then OSX doesn't complain anymore but Windows 8.1 starts complaining.  AMCap gives the message..

"Unable to render the video preview stream.  The parameter is incorrect. [0x80070057/11878]"

What's going on here?  What's the right value for wMaxPacketSize?  Any pointers would be appreciated.






Serendip7's picture
5 posts

 Looks like the AMCap message is unrelated to the wMaxPacketSize problem.  AMCap is reponding to the NV12 format I was trying.  AMCap works with wMaxPacketSize set to 1024.  Looks like Microsoft is tolerant of the USB 3.0 violation in the Cypress fw.

Log in to post new comments.