Video Control Feature in UVC Firmware – KBA225062

Version 4

    Author: YangyangC_06           Version: **

     

    Translation - Japanese: UVCファームウェアのビデオコントロール機能 - KBA225062 - Community Translated (JA)

     

    Question:

    How can I add video control feature in UVC firmware?

     

    Answer:

    Consider the UVC example project to which you will add the video control feature.

    Cypress provides UVC example project which is at C:\Program Files (x86)\Cypress\EZ-USB FX3\SDK\1.3\firmware\ cx3_examples. Build the Cx3UvcOV5640 project, and then download the image file to the Denebola board. In the MPC-HC viewer, notice that none of the video control feature is enabled (Figure 1).

    Figure 1. Disabled Video Controls

    This knowledge base article will explain the procedure to enable brightness control. You can enable other video control features in the same way.

    Follow these steps to enable the brightness control feature in this firmware:

    1. The brightness control is defined in the processing unit. As mentioned in the UVC specification V1.1, enable brightness control by setting D0 of bmControls to 1 in the cycx3_uvcdscr.c file.
      1.png
    2. Define the macros of feature selector and processing unit ID.
      2.png
    3. Write the call back switch branch in CyCx3AppUSBSetupCB.
      3.png
      4.png
    4. Create an EP0 thread to handle the event which is set when the video control targeted command is received.
      5.png
    5. Write the code to implement EP0 thread
      6.png
      7.png
      8.png
      9.png
    6. According to UVC specification v1.1, the firmware must support Set_Cur, Get_Cur, Get_Min, Get_Max, Get_Res, Get_Info, and Get_Def. Define UVCHandleProcessingUnitRqts as shown in the code snippet.
      10.png
      11.png
      12.png
    7. Build and download the firmware on to the Denebola board. Brightness control is now enabled in the panel (see Figure 2).

    Figure 2. Enabled Brightness Control