This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

where is V4L2_STD_VGA?

Other Parts Discussed in Thread: TVP7002

I would like to set VGA to my CMOS sensor. so have made a device driver for my CMOS sensor which was modified a sample device driver in DVSDK 4.02.

I don't know how to set v4l2_input.std value in board-dm365-evm.c, because there isn't V4L2_STD_VGA in davincihd.h

Could you know me how to find it or solve it ?

 

------ board-dm365-evm.c ------------------

/* Inputs available at the TVP7002 */
static struct v4l2_input tvp7002_inputs[] = {
     {
         .index = 0,
         .name = "Component",
         .type = V4L2_INPUT_TYPE_CAMERA,
         .std = TVP7002_STD_ALL,
     },
};

 #define TVP7002_STD_ALL        (V4L2_STD_525P_60   | V4L2_STD_625P_50   |\
                 V4L2_STD_NTSC      | V4L2_STD_PAL       |\
                 V4L2_STD_720P_50   | V4L2_STD_720P_60   |\
                 V4L2_STD_1080I_50  | V4L2_STD_1080I_60  |\
                 V4L2_STD_1080P_50  | V4L2_STD_1080P_60)

------ davincihd.h ------------------

#define V4L2_STD_525P_60        ((v4l2_std_id)(0x0001000000000000ULL))
#define V4L2_STD_625P_50        ((v4l2_std_id)(0x0002000000000000ULL))
#define V4L2_STD_720P_60        ((v4l2_std_id)(0x0004000000000000ULL))
#define V4L2_STD_720P_50        ((v4l2_std_id)(0x0008000000000000ULL))
#define V4L2_STD_1080I_60       ((v4l2_std_id)(0x0010000000000000ULL))
#define V4L2_STD_1080I_50       ((v4l2_std_id)(0x0020000000000000ULL))
#define V4L2_STD_1080P_60       ((v4l2_std_id)(0x0040000000000000ULL))
#define V4L2_STD_1080P_50       ((v4l2_std_id)(0x0080000000000000ULL))
#define V4L2_STD_720P_30        ((v4l2_std_id)(0x0100000000000000ULL))
#define V4L2_STD_1080I_30       ((v4l2_std_id)(0x0200000000000000ULL))
#define V4L2_STD_1080P_30       ((v4l2_std_id)(0x0400000000000000ULL))

  • You can refer to Arago code(link provided below), sensor supports many standards,  you can use the same method for your use-case.

    ------------------------------------Code----------------------------------------------------

    #define V4L2_STD_MT9P031_STD_ALL (V4L2_STD_525_60\
    447 |V4L2_STD_625_50|V4L2_STD_525P_60\
    448 |V4L2_STD_625P_50|V4L2_STD_720P_30\
    449 |V4L2_STD_720P_50|V4L2_STD_720P_60\
    450 |V4L2_STD_1080I_30|V4L2_STD_1080I_50\
    451 |V4L2_STD_1080I_60|V4L2_STD_1080P_30\
    452 |V4L2_STD_1080P_50|V4L2_STD_1080P_60)
    453
    454 /* Input available at the mt9p031 */
    455 static struct v4l2_input mt9p031_inputs[] = {
    456 {
    457 .index = 0,
    458 .name = "Camera",
    459 .type = V4L2_INPUT_TYPE_CAMERA,
    460 .std = V4L2_STD_MT9P031_STD_ALL,
    461 }
    462 };

    ----------------------------------------Code--------------------------------------------------

    http://arago-project.org/git/projects/?p=linux-davinci.git;a=blob;f=arch/arm/mach-davinci/board-dm365-evm.c;h=b434833a94f06aa40cc169d26612c305872d02d7;hb=3df7eda25fe6477a6005556fce821dbe86475c8d

  • Thank you for your answer.

    I have one more question. Why V4L2 doesn't have V4L2_STD_VGA?

    Best Regards

    Lee

  • Hi,

     

    V4L2 supports NTSC and PAL  and variants of NTSC/PAL modes. A new interface is now added in V4L2 to support other modes. This interface allows to program timing information of the mode, so there is no need to have V4L2_STD_VGA.

     

    Thanks,

    Brijesh Jadav