Web lists-archives.org

Re: [RFC PATCH 4/8] Add support for the MT9M001 camera




On Wed, 23 Jan 2008, Guennadi Liakhovetski wrote:
> +static int mt9m001_try_fmt_cap(struct soc_camera_device *icd,
> +			       struct v4l2_format *f)
> +{
> +	if (f->fmt.pix.height < 32 + icd->y_skip_top)
> +		f->fmt.pix.height = 32 + icd->y_skip_top;
> +	if (f->fmt.pix.height > 1024 + icd->y_skip_top)
> +		f->fmt.pix.height = 1024 + icd->y_skip_top;
> +	if (f->fmt.pix.width < 48)
> +		f->fmt.pix.width = 48;
> +	if (f->fmt.pix.width > 1280)
> +		f->fmt.pix.width = 1280;

Didn't the cropcap ioctl in your soc_camera driver assume the resolution
was 640x480?  Looks like this camera does 1280x1024.

> +		.id		= V4L2_CID_PRIVATE_BASE,
> +		.type		= V4L2_CTRL_TYPE_INTEGER,
> +		.name		= "Register access",
> +		.minimum	= reg_to_int(REG_READ, 0, 0),
> +		.maximum	= reg_to_int(REG_WRITE, 0xff, (1 << 16) - 1),
> +		.step		= 1,
> +		.default_value	= 1,

There are already ioctls for direct register reading/writing, you should
use them.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list