CX3 multiple framerate support in same resolution

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AnWa_3863696
Level 2
Level 2
First like given

Hi, I saw there is a link for this discussionResolutions with multiple Frame rates in CX3 UVC-CDC ,

I try the suggested solution, and update the value " the length of Class-specific Video Streaming Input Header Descriptor and the total length of CyCx3USBSSConfigDscr"(

I assume the new length is original length+4 for both values in this solution setting). After apply this setting, in the device manager, system report the device cannot start with error code 10. Could someone give me a simple project files to check what I am missing for the multiple framerate setting?

0 Likes
1 Solution

Yes, I calculate it again. The legth is correct. I checked the descr file again and have found the root cause.

In frame descriptor, you need to set Max bits/s first then Min bits/s. For the frame intervals, you should set the smallest one in first order.

Change the desscriptor below

    /* Class specific Uncompressed VS Frame Descriptor 1 - VGA */

    0x22,                               /* Descriptor size */

    CX3_CS_INTRFC_DESCR,                /* Descriptor type*/

    0x05,                               /* Subtype:  frame interface*/

    0x01,                               /* Frame Descriptor Index: 1 */

    0x00,                               /* No Still image capture method supported */

    0x80,0x02,                         /* Width in pixel:  640 */

    0xe0,0x01,                         /* Height in pixel: 480 */

    0x00,0x00,0x77,0x01,             /* Min bit rate (bits/s): 640 x 480 x No Of Bits per Pixel x FrameRate = 49152000 */

    0x00,0x00,0xee,0x02,             /* Max bit rate (bits/s): Fixed rate so same as Min */

    0x00,0x60,0x09,0x00,             /* Maximum video or still frame size in bytes(Deprecated): 640 x 480 x 2 */

    0x40,0x42,0x0f,0x00,             /* Default frame interval (in 100ns units): (1/30)x10^7 */

    0x02,                               /* Frame interval type : No of discrete intervals */

    0x80,0x84,0x1e,0x00,             /* 5 fps */

    0x40,0x42,0x0f,0x00,             /* Frame interval 3: Same as Default frame interval */

to

    0x22,                               /* Descriptor size */

    CX3_CS_INTRFC_DESCR,                /* Descriptor type*/

    0x05,                               /* Subtype:  frame interface*/

    0x01,                               /* Frame Descriptor Index: 1 */

    0x00,                               /* No Still image capture method supported */

    0x80,0x02,                         /* Width in pixel:  640 */

    0xe0,0x01,                         /* Height in pixel: 480 */

    0x00,0x00,0xee,0x02,             /* Max bit rate (bits/s): Fixed rate so same as Min */

    0x00,0x00,0x77,0x01,             /* Min bit rate (bits/s): 640 x 480 x No Of Bits per Pixel x FrameRate = 49152000 */

    0x00,0x60,0x09,0x00,             /* Maximum video or still frame size in bytes(Deprecated): 640 x 480 x 2 */

    0x40,0x42,0x0f,0x00,             /* Default frame interval (in 100ns units): (1/30)x10^7 */

    0x02,                               /* Frame interval type : No of discrete intervals */

    0x40,0x42,0x0f,0x00,             /* Frame interval 3: Same as Default frame interval */

    0x80,0x84,0x1e,0x00,             /* 5 fps */

View solution in original post

6 Replies
YangyangC_06
Employee
Employee
750 replies posted 500 replies posted 250 replies posted

You may get something wrong in configuration desscriptor. Please share the descriptor file for checking.

0 Likes
lock attach
Attachments are accessible only for community members.

Hi, here I attached the description file. The test file is for checking this UVC description can be recognized by window system only.

Thanks

Angus

0 Likes

The total length is incorrect. Re-calculate it.

Snipaste_2019-08-02_10-00-39.png

0 Likes
lock attach
Attachments are accessible only for community members.

Hi, Thanks for your feedback. I have re-calculate the total length of descriptor. It is correct. And I use wireshark to capture USB traffic. The length of the descriptor is the same as I count( 0xD2 for USBHSConfDscr). You can observe wireshark packet No.8 to check,

And I observe that the last two byes(0x04 0x00) in wireshark are not the same as written in code.

Angus

0 Likes

Yes, I calculate it again. The legth is correct. I checked the descr file again and have found the root cause.

In frame descriptor, you need to set Max bits/s first then Min bits/s. For the frame intervals, you should set the smallest one in first order.

Change the desscriptor below

    /* Class specific Uncompressed VS Frame Descriptor 1 - VGA */

    0x22,                               /* Descriptor size */

    CX3_CS_INTRFC_DESCR,                /* Descriptor type*/

    0x05,                               /* Subtype:  frame interface*/

    0x01,                               /* Frame Descriptor Index: 1 */

    0x00,                               /* No Still image capture method supported */

    0x80,0x02,                         /* Width in pixel:  640 */

    0xe0,0x01,                         /* Height in pixel: 480 */

    0x00,0x00,0x77,0x01,             /* Min bit rate (bits/s): 640 x 480 x No Of Bits per Pixel x FrameRate = 49152000 */

    0x00,0x00,0xee,0x02,             /* Max bit rate (bits/s): Fixed rate so same as Min */

    0x00,0x60,0x09,0x00,             /* Maximum video or still frame size in bytes(Deprecated): 640 x 480 x 2 */

    0x40,0x42,0x0f,0x00,             /* Default frame interval (in 100ns units): (1/30)x10^7 */

    0x02,                               /* Frame interval type : No of discrete intervals */

    0x80,0x84,0x1e,0x00,             /* 5 fps */

    0x40,0x42,0x0f,0x00,             /* Frame interval 3: Same as Default frame interval */

to

    0x22,                               /* Descriptor size */

    CX3_CS_INTRFC_DESCR,                /* Descriptor type*/

    0x05,                               /* Subtype:  frame interface*/

    0x01,                               /* Frame Descriptor Index: 1 */

    0x00,                               /* No Still image capture method supported */

    0x80,0x02,                         /* Width in pixel:  640 */

    0xe0,0x01,                         /* Height in pixel: 480 */

    0x00,0x00,0xee,0x02,             /* Max bit rate (bits/s): Fixed rate so same as Min */

    0x00,0x00,0x77,0x01,             /* Min bit rate (bits/s): 640 x 480 x No Of Bits per Pixel x FrameRate = 49152000 */

    0x00,0x60,0x09,0x00,             /* Maximum video or still frame size in bytes(Deprecated): 640 x 480 x 2 */

    0x40,0x42,0x0f,0x00,             /* Default frame interval (in 100ns units): (1/30)x10^7 */

    0x02,                               /* Frame interval type : No of discrete intervals */

    0x40,0x42,0x0f,0x00,             /* Frame interval 3: Same as Default frame interval */

    0x80,0x84,0x1e,0x00,             /* 5 fps */

Thanks. It's working now.

Angus

0 Likes