From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: video4linux-list@redhat.com
Subject: Re: [PATCH 2/2] Add support for Micron MT9M111 camera.
Date: Sun, 03 Aug 2008 12:49:23 +0200 [thread overview]
Message-ID: <87vdyipe4s.fsf@free.fr> (raw)
In-Reply-To: <Pine.LNX.4.64.0808022224490.27474@axis700.grange> (Guennadi Liakhovetski's message of "Sat\, 2 Aug 2008 22\:44\:03 +0200 \(CEST\)")
Guennadi Liakhovetski <g.liakhovetski@gmx.de> writes:
> Nice! Not knowing this specific camera, I can only provide a couple of
> nitpicks:
> Please reformat this comment to
>
> /*
> * mt9m111 i2c address is 0x5d or 0x48 (depending on SAddr pin)
> * The platform has to define i2c_board_info
> * and call i2c_register_board_info()
> */
OK for next submit.
>> +#define MT9M111_OUTFMT_SWAP_YCbCr_Cb_Cr (1<<0)
>
> Please, add spaces around the "<<" in all defines above (except where they
> are already there, of course:-))
OK for next submit.
>
>> +static const struct soc_camera_data_format mt9m111_colour_formats[] = {
>> + COL_FMT("YCrYCb 8 bit", 8, V4L2_PIX_FMT_YUYV, V4L2_COLORSPACE_JPEG),
>> + RGB_FMT("RGB 565", 16, V4L2_PIX_FMT_RGB565),
>> + RGB_FMT("RGB 555", 16, V4L2_PIX_FMT_RGB555),
>> + RGB_FMT("Bayer (sRGB) 10 bit", 10, V4L2_PIX_FMT_SBGGR16),
>> + RGB_FMT("Bayer (sRGB) 8 bit", 8, V4L2_PIX_FMT_SBGGR8),
>> +};
>
> This is where you would add all those swapped pixel formats.
Let's finish the dicussion in the other thread "[RFC] soc-camera: endianness
between camera and its host".
> Is it really a good idea to keep the camera active all the time? Maybe
> only call enable / disable here, not on init / release?
Well, I think so.
The idea here is the camera evaluates its environment to adjust its internal
gain values. This a kind of PLL which provides Automatic White Balance,
Automatic Gamma, Automatic Defect Correction.
So, my idea is that once a user opens /dev/videoX, the camera gets activated and
calculates the values. In that case, when he submits buffers to the V4L2 stack,
the camera is really ready.
But I can change that to activate the camera only on capture, I'm not very set
on this. The user can start capturing, and then wait a couple of seconds for the
camera to settle. So what do you think, should I move camera activation into
start_capture / stop_capture ?
>> + .maximum = 63*2*2,
>> + .step = 1,
>> + .default_value = 32,
>> + .flags = V4L2_CTRL_FLAG_SLIDER,
>
> Come on, be generous, add a couple of spaces around that multiplication
> above.
OK for next submit.
>
> [snip]
>> + if ((gain >= 64*2) && (gain < 63*2*2))
>> + val = (1 << 10) | (1 << 9) | (gain / 4);
>> + else if ((gain >= 64) && (gain < 64*2))
> And here too, please.
OK for next submit.
>
> [snip]
>
>> +/* Interface active, can use i2c. If it fails, it can indeed mean, that
>> + * this wasn't our capture interface, so, we wait for the right one */
>
> Reformat the comment, please.
OK for next submit.
--
Robert
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-08-03 10:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-02 16:29 Micron MT9M111 driver Robert Jarzmik
2008-08-02 16:30 ` [PATCH 1/2] Add Micron mt9m111 chip ID in V4L2 identifiers Robert Jarzmik
2008-08-02 16:30 ` [PATCH 2/2] Add support for Micron MT9M111 camera Robert Jarzmik
2008-08-02 20:44 ` Guennadi Liakhovetski
2008-08-03 10:49 ` Robert Jarzmik [this message]
2008-08-11 21:56 ` [PATCH] " Robert Jarzmik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vdyipe4s.fsf@free.fr \
--to=robert.jarzmik@free.fr \
--cc=g.liakhovetski@gmx.de \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox