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.

DM368 and OV10633 Issues

Other Parts Discussed in Thread: TVP7002

Hello,

I am attempting to use an OV10633 sensor with the DM368 Leopard board.  I have written a driver for the OV10633 using others as a reference and have the sensor outputting in UYVY Format.  I have the the camera itself configured much like the TVP7002 since setting is_camera will cause it to assume RAW instead of YUV:

{
	.module_name = "ov10633",
	.grp_id = VPFE_SUBDEV_OV10633,
	.num_inputs = ARRAY_SIZE(ov10633_inputs),
	.inputs = ov10633_inputs,
	.ccdc_if_params = {
		.if_type = VPFE_BT656,
		.hdpol = VPFE_PINPOL_POSITIVE,
		.vdpol = VPFE_PINPOL_POSITIVE,
	},
	.board_info = {
		I2C_BOARD_INFO("ov10633", 0x37),
		// this is for PCLK rising edge
		.platform_data = (void *)1,
	},
},

Things seem to initialize good and when i look at VSYNC, HSYNC, PCLK, and Data lines on a scope they all look good however when i run my pipeline i get no frames, it just initializes and sits there:

/ # gst-launch -e v4l2src input-src=ov10633 always-copy=false num-buffers=100 ! 'video/x-raw-yuv,format=(fourcc)NV12, width=1280, height=720, framerate=(fraction)30/1' ! queue ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=2 ! dmaiperf print-arm-load=true ! flvmux ! filesink location=/root/testNew.flv &
/ # Setting pipeline to PAUSED ...
davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124
OV10633: ov10633_get_fmt
vpfe-capture vpfe-capture: IPIPE Chained
vpfe-capture vpfe-capture: Resizer present
OV10633: ov10633_get_fmt
OV10633: ov10633_querystd
OV10633 : ov10633_s_std, std=800000000000000, norm=576460752303423488
OV10633: ov10633_s_std: V4L2_STD_720P_30
OV10633 : ov10633_s_std, std=00000000, norm=0
OV10633: ov10633_s_std: NOT FOUND
vpfe-capture vpfe-capture: Failed to set standard
OV10633: ov10633_s_stream
OV10633 : ov10633_configure
OV10633 : ov10633_get_pclk
OV10633: pclk=82666666, hts=1787, vts=771
OV10633: r3003=0x1F r3004=0x12
OV10633 : ov10633_software_reset
Pipeline is live and does not need PREROLL ...
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to set norm for device '/dev/video0'.
Additional debug info:
../../../src/sys/v4l2/v4l2_calls.c(743): gst_v4l2_set_norm (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: Invalid argument
WARNING: from element /GstPipeline:pipeline0/GstDmaiperf:dmaiperf0: Could not get/set settings from/on resource.
Additional debug info:
../../src/src/gsttidmaiperf.c(273): gst_dmaiperf_start (): /GstPipeline:pipeline0/GstDmaiperf:dmaiperf0:
Engine name not specified, not printing DSP information
Setting pipeline to PLAYING ...
New clock: GstSystemClock

I tried changing the polarities around, but no difference.  I put prints into vpfe_isr in vpfe_capture.c and they never print out, so it would seem no buffers are being received.  Any clues as to what i should looks at?  I am not sure where to go from here, maybe I am missing settings somewhere?  Or maybe someone has a working OV10633 setup for the leopard board?

  • Alright i was able to get this working, I had to set if_type to have an external sync:

    {
    	.module_name = "ov10633",
    	.grp_id = VPFE_SUBDEV_OV10633,
    	.num_inputs = ARRAY_SIZE(ov10633_inputs),
    	.inputs = ov10633_inputs,
    	.ccdc_if_params = {
    		.if_type = VPFE_YCBCR_SYNC_8,
    		.hdpol = VPFE_PINPOL_POSITIVE,
    		.vdpol = VPFE_PINPOL_POSITIVE,
    	},
    	.board_info = {
    		I2C_BOARD_INFO("ov10633", 0x37),
    		// this is for PCLK rising edge
    		.platform_data = &ov10633_pdata,
    	},
    },

    Then i realized I was using the opposite 8 input lines than were set by default so i had to change that (in dm365_ccdc.c):

    @@ -1312,7 +1312,7 @@
     
     	case VPFE_YCBCR_SYNC_8:
     		ccdcfg |= CCDC_DATA_PACK8;
    -		ccdcfg |= CCDC_YCINSWP_YCBCR;
    +		//ccdcfg |= CCDC_YCINSWP_YCBCR;
     		if (params->pix_fmt != CCDC_PIXFMT_YCBCR_8BIT) {
     			dev_dbg(dev, "Invalid pix_fmt(input mode)\n");
     			return -EINVAL;

    Finally had to get the standard changed.  I feel like there should be some way to do this in my gstreamer pipeline call but i could not figure it out.  In vpfe_capture.c it is set to 0 by default in both the functions 'vpfe_initialize_device' and 'vpfe_s_input' for is_camera=0 devices.  The only other place it can be changed for my is_camera=0 device setup is 'vpfe_s_std', which looks to be called via a VIDIOC_S_STD v4l2 IOCTL call (v4l2-ioctl.c).  This makes me believe there should be some gstreamer setting i can set to pass in the correct standard, but i could not figure it out.  GStreamer 1.0 has a norm parameter on v4l2src but i am using 0.10 which does not have this.  Anyways i just had to hardcode a change into the 'vpfe_s_std' function to change it by calling my querystd function of my OV10633 driver:

    @@ -1873,6 +1873,9 @@
     			v4l2_err(&vpfe_dev->v4l2_dev, "Failed to set filter for THS7353\n");
     			goto unlock_out;
     		}
    +	} else if (sdinfo->grp_id == VPFE_SUBDEV_OV10633) {
    +		ret = v4l2_device_call_until_err(&vpfe_dev->v4l2_dev, sdinfo->grp_id,
    +					 video, querystd, std_id);
     	}

    After those changes my pipeline worked and i had good frames coming through!  Is till have to adjust some sensor settings, but when i set it to Color Bar mode i get perfect color bars so my input from it seems to be correctly configured : ).

    If anyone has any idea of how to set the standard through gstreamer so i can remove that last hack I would be pumped to hear it!