All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-media@vger.kernel.org, m.szyprowski@samsung.com,
	kyungmin.park@samsung.com, laurent.pinchart@ideasonboard.com,
	sw0312.kim@samsung.com, riverful.kim@samsung.com
Subject: Re: [PATCH v1 3/3] v4l: Add v4l2 subdev driver for S5K6AAFX sensor
Date: Wed, 21 Sep 2011 12:25:09 +0200	[thread overview]
Message-ID: <4E79BB85.50306@samsung.com> (raw)
In-Reply-To: <20110920221033.GO1845@valkosipuli.localdomain>

Hi Sakari,

On 09/21/2011 12:10 AM, Sakari Ailus wrote:
> On Tue, Sep 20, 2011 at 01:58:59PM +0200, Sylwester Nawrocki wrote:
>> This driver exposes preview mode operation of the S5K6AAFX sensor with
>> embedded SoC ISP. It uses one of the five user predefined configuration
>> register sets. There is yet no support for capture (snapshot) operation.
>> Following controls are supported:
>> manual/auto exposure and gain, power line frequency (anti-flicker),
>> saturation, sharpness, brightness, contrast, white balance temperature,
>> color effects. horizontal/vertical image flip, frame interval.
> 
> Thanks for the patch, Sylwester!
> 
> [clip]
>> +	v4l2_ctrl_new_std_menu(hdl, ops, V4L2_CID_POWER_LINE_FREQUENCY,
>> +			       V4L2_CID_POWER_LINE_FREQUENCY_AUTO, 0,
>> +			       V4L2_CID_POWER_LINE_FREQUENCY_50HZ);
>> +
>> +	v4l2_ctrl_new_std_menu(hdl, ops, V4L2_CID_COLORFX,
>> +			       V4L2_COLORFX_SKETCH, 0x3D0, V4L2_COLORFX_NONE);
> 
> New items may be added to standard menus so you should mask out also
> undefined bits. Say, ~0x42f (hope I got that right).

Sure, that's an important detail. ~0x42 look like the right value. Thanks for
pointing this out.

> 
> Youd also don't need to check for invalid menu ids; the control framework
> does this for you.

Right, good catch. I'll modify accordingly.

> 
>> +	v4l2_ctrl_new_std(hdl, ops, V4L2_CID_WHITE_BALANCE_TEMPERATURE,
>> +			  0, 256, 1, 0);
>> +
>> +	v4l2_ctrl_new_std(hdl, ops, V4L2_CID_SATURATION, -127, 127, 1, 0);
>> +	v4l2_ctrl_new_std(hdl, ops, V4L2_CID_SHARPNESS, -127, 127, 1, 0);
>> +	v4l2_ctrl_new_std(hdl, ops, V4L2_CID_BRIGHTNESS, -127, 127, 1, 0);
>> +	v4l2_ctrl_new_std(hdl, ops, V4L2_CID_CONTRAST, -127, 127, 1, 0);
>> +
>> +	s5k6aa->sd.ctrl_handler = hdl;
> 
> Shoudln't this assignment be done after checking for the error?

Indeed, seems much more appropriate.

> 
>> +	if (hdl->error) {
>> +		ret = hdl->error;
>> +		v4l2_ctrl_handler_free(hdl);
>> +	}
>> +	return ret;

--
Thanks!
Sylwester
-- 
Sylwester Nawrocki
Samsung Poland R&D Center

      reply	other threads:[~2011-09-21 10:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-20 11:58 [PATCH v1 0/3] Add v4l2 subdev driver for S5K6AAFX sensor with embedded SoC ISP Sylwester Nawrocki
2011-09-20 11:58 ` [PATCH v1 1/3] v4l: Extend V4L2_CID_COLORFX control with AQUA effect Sylwester Nawrocki
2011-09-20 11:58 ` [PATCH v1 2/3] v4l: Add AUTO option for the V4L2_CID_POWER_LINE_FREQUENCY control Sylwester Nawrocki
2011-09-20 20:57   ` Sakari Ailus
2011-09-20 21:25     ` Sylwester Nawrocki
2011-09-20 22:17       ` Sakari Ailus
2011-09-21 12:28         ` Sylwester Nawrocki
2011-09-21 12:47           ` Laurent Pinchart
2011-09-21 17:20             ` Sakari Ailus
2011-09-20 11:58 ` [PATCH v1 3/3] v4l: Add v4l2 subdev driver for S5K6AAFX sensor Sylwester Nawrocki
2011-09-20 22:10   ` Sakari Ailus
2011-09-21 10:25     ` Sylwester Nawrocki [this message]

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=4E79BB85.50306@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=riverful.kim@samsung.com \
    --cc=sakari.ailus@iki.fi \
    --cc=sw0312.kim@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.