Hello!
I work with DM368, DVSDK_4_02, linux-2.6.32, GStreamer and CMOS OmniVision OV2715.
I write driver for OV2715 and add it descrition in vpfe_sub_devs[] (file arch/arm/mach-davinci/board-dm365-evm.c), after loading modules I see what vpfe register matrix as subdevice - v4l2 sub device ov2715 registered. But after running Gstreamer pipeline I get error "Failed to create capture handle".
I add debug output in vpfe_capture.c and see what my matrix registered as 4 v4l2 subdev, but ticapturesrc set in driver 3 subdev:
v4l2Input.type = V4L2_INPUT_TYPE_CAMERA; v4l2Input.index = 0; do { if (ioctl(fd, VIDIOC_ENUMINPUT, &v4l2Input) != 0) { Dmai_err2("%s input not found (%s)\n", captureInputString[attrs->videoInput], strerror(errno)); return Dmai_EFAIL; } v4l2Input.index++; } while (strcmp((Char *) v4l2Input.name, captureInputString[attrs->videoInput]) != 0); input = --v4l2Input.index; Dmai_dbg1("%s input selected\n", v4l2Input.name); if (ioctl(fd, VIDIOC_S_INPUT, &input) == -1) { Dmai_err2("Failed to set video input to %d (%s)\n", input, strerror(errno)); return Dmai_EFAIL; } if (ioctl(fd, VIDIOC_G_INPUT, &queryInput) == -1) { Dmai_err0("Failed to retrieve video input setting\n"); return Dmai_EFAIL; } if (input != queryInput) { Dmai_dbg2("Attempted to set video input to %d, but it still has a" "setting of %d\n", input, queryInput); return Dmai_EFAIL; }
As result driver found what 3 subdev is not active and return error.
Now I solve problem very simple, I think this is a dirty hack, move my matrix description above in vpfe_sub_devs[]. After this driver found my matrix as actived, but how can solve this problem if I need supported few matrix for device? Now I see only one way - rewrite vpfe_get_subdev_input_index, and may be vpfe_s_input, function in driver/char/vpfe_capture.c. Or may be there is other way?
Thank you and excuse me my bad enfglish.