RESOLUTIONS CHANGE IN STATIC FRAME FROM BULK TRANSFER EXAMPLE

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

cross mob
lock attach
Attachments are accessible only for community members.
clinton
Level 2
Level 2
First solution authored 5 questions asked 25 sign-ins

HELLO DEVLOPERS 
I AM NEW TO USB CAMERAS  I AM IN LEARNING STAGE I WANT TO ADD RESOLUTION FOR 1280x720p AND 640x480p .

MODIFIED THE DESCRIPTORS TOO ITS SHOWING WHILE I STREAM THE BOARD SO I WANNA HELP FOR SETTING THE USBSETUP MODIFICATION AND APPTHREAD ENTRY KINDLY GUIIDE ME TO REACH THERE I AM ATTACHING THE WORK TILL I DONE @Rashi_Vatsa @bojankoce 

THANKS IN ADVANCE

SINCERLY

SRINIVAS

0 Likes
1 Solution
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

Please refer to an example probe/commit structure.

uint8_t glProbeCtrl720p[CY_FX_UVC_MAX_PROBE_SETTING] = {
    0x00, 0x00,                 /* bmHint : no hit */
    0x01,                       /* Use 1st Video format index */
    UVC_SS_720P_FRAME_INDEX,                       /* Use 1st Video frame index */
    0x15, 0x16, 0x05, 0x00,     /* Desired frame interval in the unit of 100ns: 30 fps */
    0x00, 0x00,                 /* Key frame rate in key frame/video frame units: only applicable
                                   to video streaming with adjustable compression parameters */
    0x00, 0x00,                 /* PFrame rate in PFrame / key frame units: only applicable to
                                   video streaming with adjustable compression parameters */
    0x00, 0x00,                 /* Compression quality control: only applicable to video streaming
                                   with adjustable compression parameters */
    0x00, 0x00,                 /* Window size for average bit rate: only applicable to video
                                   streaming with adjustable compression parameters */
    0x00, 0x00,                 /* Internal video streaming i/f latency in ms */
    0x00, 0x48, 0x3F, 0x00,     /* Max video frame size in bytes */
    0x00, 0x40, 0x00, 0x00,      /* No. of bytes device can rx in single payload = 16 KB */

#ifndef FX3_UVC_1_0_SUPPORT
    /* UVC 1.1 Probe Control has additional fields from UVC 1.0 */
    0x00, 0x60, 0xE3, 0x16,             /* Device Clock */
    0x00,                               /* Framing Information - Ignored for uncompressed format*/
    0x00,                               /* Preferred payload format version */
    0x00,                               /* Minimum payload format version */
    0x00                                /* Maximum payload format version */
#endif

From the above structure,

3rd byte is for Video format index and 4th byte is for Video frame index.

Please confirm if you have similar implementation.

If yes, please explain your issue a bit more in detail.

Best Regards,
AliAsgar

View solution in original post

0 Likes
7 Replies
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Srinivas,

Please refer to AN75779 UVC firmware which shows implementation of two video resolutions.

Going through your .c file, I found some issues.

1. When a PROBE/COMMIT GET_CUR is been sent to the device, wValue is checked for 720p or 480p, however wValue does not contain that information. The current video probe structure contains that information and frame size in the structure needs to be checked for the current video frame resolution. 

2.  When PROBE SET_CUR is received, copy the contents of the structure sent on EP0 endpoint to the probe structure in the firmware. This is not being done in your firmware. 

3. When COMMIT SET_CUR request is sent, camera registers have to be configured depending on the resolution selected. 

Please refer to AN75779 firmware implementation as a reference to solve the above issues.

Best Regards,
AliAsgar

 

0 Likes

Hi AliAsgar thanks for the reply 

1 ->  then what parameter need to  be check for the setting the apropirate resolution?

i will describe my understanding while changing the resolution in streaming application host sends the request to device. device has to take care of assigning the resolution so what parameters should take care 

i reffered to AN75779 i ididnt get enough info 

@AliAsgar 

Best Regards 

srinivas

 

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Srinivas,

1. 3rd byte of the commit control structure sent from the host can be used to set the frame resolution of the probe control structure in the firmware.

On the FX3 product page, there is a AN75779 firmware project folder along with the AN75779 application note. https://www.infineon.com/dgdl/Infineon-AN75779-ApplicationNotes-v13_00-EN.zip?fileId=8ac78c8c7cdc391....

Please download the firmware and check for the implementation of PROBE/COMMIT requests in the UVCHandleVideoStreamingRqts () function.

Best Regards,
AliAsgar

lock attach
Attachments are accessible only for community members.
clinton
Level 2
Level 2
First solution authored 5 questions asked 25 sign-ins

HI   @AliAsgar 

THANKS FOR THAT NOW I AM ABLE TO STREAM 

I ADDED 3 MORE RESOLUTIONS ITS WORKING FINE NOW 

BUT THING IS NOW I WANT TO ADD ANOTHER FORMAT FOR THIS FILE  DEVICE UNABLE TO ENUMERATE 

I ATACHED THE SCREEN SHOT TO THIS FILE CAN YOU FIND OUT WHERE SHOULD I MODIFY I  TAKEN CARE OF ALL DESCRIPTORS LENGTHS TOO

THANKS IN ADVANCE..

BEST REGARDS

SRINIVAS

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Srinivas,

From the screenshot, it looks like the VC specific VS video input  header descriptor length is 14 bytes. However, it must be 17 bytes. Please do the above changes and let us know if you face enumeration issues. If yes, please share the desciptor source file with us.

Best Regards,
AliAsgar

0 Likes

Hii @AliAsgar 

Thanks for the reply 

I sorted out the issue and added multiple resolution and multiple format its streaming know
But thing is in commit control struture 2nd byte for the format index .Am  i correct  ??
using debugprints i cross checked format index value not reflecting in the commit control request however its streaming in that format also
FORMATS   : 1-> YUY2 and 2-> UYVY  formats  i added the support what should i do for this

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

Please refer to an example probe/commit structure.

uint8_t glProbeCtrl720p[CY_FX_UVC_MAX_PROBE_SETTING] = {
    0x00, 0x00,                 /* bmHint : no hit */
    0x01,                       /* Use 1st Video format index */
    UVC_SS_720P_FRAME_INDEX,                       /* Use 1st Video frame index */
    0x15, 0x16, 0x05, 0x00,     /* Desired frame interval in the unit of 100ns: 30 fps */
    0x00, 0x00,                 /* Key frame rate in key frame/video frame units: only applicable
                                   to video streaming with adjustable compression parameters */
    0x00, 0x00,                 /* PFrame rate in PFrame / key frame units: only applicable to
                                   video streaming with adjustable compression parameters */
    0x00, 0x00,                 /* Compression quality control: only applicable to video streaming
                                   with adjustable compression parameters */
    0x00, 0x00,                 /* Window size for average bit rate: only applicable to video
                                   streaming with adjustable compression parameters */
    0x00, 0x00,                 /* Internal video streaming i/f latency in ms */
    0x00, 0x48, 0x3F, 0x00,     /* Max video frame size in bytes */
    0x00, 0x40, 0x00, 0x00,      /* No. of bytes device can rx in single payload = 16 KB */

#ifndef FX3_UVC_1_0_SUPPORT
    /* UVC 1.1 Probe Control has additional fields from UVC 1.0 */
    0x00, 0x60, 0xE3, 0x16,             /* Device Clock */
    0x00,                               /* Framing Information - Ignored for uncompressed format*/
    0x00,                               /* Preferred payload format version */
    0x00,                               /* Minimum payload format version */
    0x00                                /* Maximum payload format version */
#endif

From the above structure,

3rd byte is for Video format index and 4th byte is for Video frame index.

Please confirm if you have similar implementation.

If yes, please explain your issue a bit more in detail.

Best Regards,
AliAsgar

0 Likes