linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Frank Schäfer" <fschaefer.oss@googlemail.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 4/4] gspca_pac7302: add support for green balance adjustment
Date: Wed, 19 Sep 2012 22:34:26 +0200	[thread overview]
Message-ID: <505A2C52.4040001@redhat.com> (raw)
In-Reply-To: <5059FFF1.30104@googlemail.com>

Hi,

On 09/19/2012 07:25 PM, Frank Schäfer wrote:
> Am 16.09.2012 18:00, schrieb Frank Schäfer:
>> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
>> ---
>>   drivers/media/usb/gspca/pac7302.c |   23 ++++++++++++++++++++++-
>>   1 files changed, 22 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/media/usb/gspca/pac7302.c b/drivers/media/usb/gspca/pac7302.c
>> index 8a0f4d6..9b62b74 100644
>> --- a/drivers/media/usb/gspca/pac7302.c
>> +++ b/drivers/media/usb/gspca/pac7302.c
>> @@ -78,6 +78,7 @@
>>    * Page | Register   | Function
>>    * -----+------------+---------------------------------------------------
>>    *  0   | 0x01       | setredbalance()
>> + *  0   | 0x02       | setgreenbalance()
>>    *  0   | 0x03       | setbluebalance()
>>    *  0   | 0x0f..0x20 | setcolors()
>>    *  0   | 0xa2..0xab | setbrightcont()
>> @@ -121,6 +122,7 @@ struct sd {
>>   	struct v4l2_ctrl *saturation;
>>   	struct v4l2_ctrl *white_balance;
>>   	struct v4l2_ctrl *red_balance;
>> +	struct v4l2_ctrl *green_balance;
>>   	struct v4l2_ctrl *blue_balance;
>>   	struct { /* flip cluster */
>>   		struct v4l2_ctrl *hflip;
>> @@ -470,6 +472,17 @@ static void setredbalance(struct gspca_dev *gspca_dev)
>>   	reg_w(gspca_dev, 0xdc, 0x01);
>>   }
>>
>> +static void setgreenbalance(struct gspca_dev *gspca_dev)
>> +{
>> +	struct sd *sd = (struct sd *) gspca_dev;
>> +
>> +	reg_w(gspca_dev, 0xff, 0x00);			/* page 0 */
>> +	reg_w(gspca_dev, 0x02,
>> +	      rgbbalance_ctrl_to_reg_value(sd->green_balance->val));
>> +
>> +	reg_w(gspca_dev, 0xdc, 0x01);
>> +}
>> +
>>   static void setbluebalance(struct gspca_dev *gspca_dev)
>>   {
>>   	struct sd *sd = (struct sd *) gspca_dev;
>> @@ -620,6 +633,9 @@ static int sd_s_ctrl(struct v4l2_ctrl *ctrl)
>>   	case V4L2_CID_RED_BALANCE:
>>   		setredbalance(gspca_dev);
>>   		break;
>> +	case V4L2_CID_GREEN_BALANCE:
>> +		setgreenbalance(gspca_dev);
>> +		break;
>>   	case V4L2_CID_BLUE_BALANCE:
>>   		setbluebalance(gspca_dev);
>>   		break;
>> @@ -652,7 +668,7 @@ static int sd_init_controls(struct gspca_dev *gspca_dev)
>>   	struct v4l2_ctrl_handler *hdl = &gspca_dev->ctrl_handler;
>>
>>   	gspca_dev->vdev.ctrl_handler = hdl;
>> -	v4l2_ctrl_handler_init(hdl, 12);
>> +	v4l2_ctrl_handler_init(hdl, 13);
>>
>>   	sd->brightness = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
>>   					V4L2_CID_BRIGHTNESS, 0, 32, 1, 16);
>> @@ -669,6 +685,11 @@ static int sd_init_controls(struct gspca_dev *gspca_dev)
>>   					PAC7302_RGB_BALANCE_MIN,
>>   					PAC7302_RGB_BALANCE_MAX,
>>   					1, PAC7302_RGB_BALANCE_DEFAULT);
>> +	sd->green_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
>> +					V4L2_CID_GREEN_BALANCE,
>> +					PAC7302_RGB_BALANCE_MIN,
>> +					PAC7302_RGB_BALANCE_MAX,
>> +					1, PAC7302_RGB_BALANCE_DEFAULT);
>>   	sd->blue_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
>>   					V4L2_CID_BLUE_BALANCE,
>>   					PAC7302_RGB_BALANCE_MIN,
>
> Hans, it seems like you didn't pick up these patches up yet...
> Is there anything wrong with them ?

I've somehow completely missed them. Can you resend the entire set please?

Thanks,

Hans

  reply	other threads:[~2012-09-19 20:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-16 16:00 [PATCH 1/4] gspca_pac7302: correct register documentation Frank Schäfer
2012-09-16 16:00 ` [PATCH 2/4] gspca_pac7302: use registers 0x01 and 0x03 for red and blue balance controls Frank Schäfer
2012-09-16 16:00 ` [PATCH 3/4] v4l2-ctrl: add a control for green balance Frank Schäfer
2012-09-16 16:00 ` [PATCH 4/4] gspca_pac7302: add support for green balance adjustment Frank Schäfer
2012-09-19 17:25   ` Frank Schäfer
2012-09-19 20:34     ` Hans de Goede [this message]
2012-09-19 20:54       ` Frank Schäfer
2012-09-20  9:08         ` Hans de Goede
2012-09-20 11:54           ` Frank Schäfer
2012-09-23 13:27             ` Frank Schäfer
2012-09-24 10:47             ` Hans de Goede
2012-09-24 13:36               ` Frank Schäfer
2012-09-24 14:07                 ` Hans de Goede

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=505A2C52.4040001@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=fschaefer.oss@googlemail.com \
    --cc=linux-media@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).