From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Chanho Min <chanho.min@lge.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
HyoJun Im <hyojun.im@lge.com>
Subject: Re: [PATCH] [media] uvcvideo: fix data type for pan/tilt control
Date: Sun, 29 Sep 2013 08:55:06 +0200 [thread overview]
Message-ID: <1512831.Q6pZeWPU68@avalon> (raw)
In-Reply-To: <1380257860-14075-1-git-send-email-chanho.min@lge.com>
Hi Chanho,
Thank you for the patch.
On Friday 27 September 2013 13:57:40 Chanho Min wrote:
> The pan/tilt absolute control value is signed value. If minimum value
> is minus, It will be changed to plus by clamp_t() as commit 64ae9958a62.
> ([media] uvcvideo: Fix control value clamping for unsigned integer
> controls).
>
> It leads to wrong setting of the control values. For example,
> when min and max are -36000 and 36000, the setting value between of this
> range is always 36000. So, Its data type should be changed to signed.
>
> Signed-off-by: Chanho Min <chanho.min@lge.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
I've taken the patch in my tree and will send a pull request for the next
kernel version.
> ---
> drivers/media/usb/uvc/uvc_ctrl.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_ctrl.c
> b/drivers/media/usb/uvc/uvc_ctrl.c index a2f4501..0eb82106 100644
> --- a/drivers/media/usb/uvc/uvc_ctrl.c
> +++ b/drivers/media/usb/uvc/uvc_ctrl.c
> @@ -664,7 +664,7 @@ static struct uvc_control_mapping uvc_ctrl_mappings[] =
> { .size = 32,
> .offset = 0,
> .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
> - .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED,
> + .data_type = UVC_CTRL_DATA_TYPE_SIGNED,
> },
> {
> .id = V4L2_CID_TILT_ABSOLUTE,
> @@ -674,7 +674,7 @@ static struct uvc_control_mapping uvc_ctrl_mappings[] =
> { .size = 32,
> .offset = 32,
> .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
> - .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED,
> + .data_type = UVC_CTRL_DATA_TYPE_SIGNED,
> },
> {
> .id = V4L2_CID_PRIVACY,
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2013-09-29 6:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-27 4:57 [PATCH] [media] uvcvideo: fix data type for pan/tilt control Chanho Min
2013-09-29 6:55 ` Laurent Pinchart [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=1512831.Q6pZeWPU68@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=chanho.min@lge.com \
--cc=hyojun.im@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@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