|
发表于 2014-8-2 12:06:40
|
显示全部楼层
调用下边这个函数,返回错误导致的
static int ov7670_queryctrl(struct v4l2_subdev *sd,
struct v4l2_queryctrl *qc)
{
/* Fill in min, max, step and default value for these controls. */
switch (qc->id) {
case V4L2_CID_BRIGHTNESS:
return v4l2_ctrl_query_fill(qc, 0, 255, 1, 128);
case V4L2_CID_CONTRAST:
return v4l2_ctrl_query_fill(qc, 0, 127, 1, 64);
case V4L2_CID_VFLIP:
case V4L2_CID_HFLIP:
return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
// case V4L2_CID_SATURATION:
// return v4l2_ctrl_query_fill(qc, 0, 256, 1, 128);
// case V4L2_CID_HUE:
// return v4l2_ctrl_query_fill(qc, -180, 180, 5, 0);
case V4L2_CID_GAIN:
return v4l2_ctrl_query_fill(qc, 0, 255, 1, 128);
case V4L2_CID_AUTOGAIN:
return v4l2_ctrl_query_fill(qc, 0, 1, 1, 1);
case V4L2_CID_EXPOSURE:
return v4l2_ctrl_query_fill(qc, 0, 65535, 1, 500);
case V4L2_CID_EXPOSURE_AUTO:
return v4l2_ctrl_query_fill(qc, 0, 1, 1, 0);
case V4L2_CID_CAMERA_FLASH_MODE:
return v4l2_ctrl_query_fill(qc, 0, 4, 1, 0);
}
return -EINVAL;
}
|
|