Re: [RFC PATCH 4/8] Add support for the MT9M001 camera
- Date: Fri, 25 Jan 2008 12:23:59 +0100 (CET)
- From: Guennadi Liakhovetski <g.liakhovetski@xxxxxxxxxxxxxx>
- Subject: Re: [RFC PATCH 4/8] Add support for the MT9M001 camera
On Thu, 24 Jan 2008, Trent Piepho wrote:
> 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.
in soc_camera I have
a->bounds.width = icd->width_max;
a->bounds.height = icd->height_max;
...
a->defrect.width = 640;
a->defrect.height = 480;
so, bounds are as provided by the camera driver, and only "default" I set
to VGA. Does it make much difference what default is set to? What should
it be?
> > + .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.
Right, will use them.
Thanks
Guennadi
---
Guennadi Liakhovetski
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list