Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3845894ybx; Mon, 4 Nov 2019 03:53:41 -0800 (PST) X-Google-Smtp-Source: APXvYqzdrdG/nabA56oM50NxRpkBk4OmDYdje8mdmEEoIy5aOnqM8yYz/CLKHQFVIQgocym4Gexn X-Received: by 2002:aa7:d391:: with SMTP id x17mr2635578edq.43.1572868421067; Mon, 04 Nov 2019 03:53:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572868421; cv=none; d=google.com; s=arc-20160816; b=x0pm8LjLFECNJd8xiq0pFaxKu6wBiHvdUiiCysT27lEei6mA4snWpCVV0boI6mp56k UpEpQbEe1WhQ9t5r7E9iNNC3g8EBFN+9LXkUHs2Y9o2PA2a6PY05bq9og92PD9HleOCc 4VgCfrtOW2MX9z8S6cWXQVkiRpymJnpn2PkDdvLgk2IAKfwrEV3/4pnWFLjJh5iMmXZl dV/g5wvETV/4kjx577txTAiNGwanSEHIc2bYn3Et/c4tTXOm75DH5dMXZzuBIPQ975lF hT6MS3dqCRkVJzy0mEolO8IiyOwNBg1yTsluvKCkMRCo19P9yK8bL0fV0CKk19+w3kMt jpRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Jr9CNN/FtVX7SQsPNnAE80gtDHUgo/aFkEU0b0jVjuY=; b=seEZRjAButc54yTsP+f0cR2dd0+CTt52Oia0IzeKMvkcX2mTv0uo0oHkPUFr8UYnFq Wrx/TFLfUgY+8IYMQ3pS48AqGL/04LO0KZWImZBF3O3iKUTxTCrej/uEM/DnqbtAvT9O l7JejL51u42WmMAdlsLAEjKneF3dI1u8JjR89FUAqSb/wiUo0IGM7DHBXwaQXQn3/5kH jeW0YWir258nj41QH46Wov80zxtk3UuYPa9NiXwOiOkaHHVqEEfMnJ0Vfx0zN4SKGSEa loK2vaHqdaGybpMXT2ftsa0lU+q4nWCbIr6seMUNWJGswBNBmNxIcW1oHtYfmKmfOdrX 1Urw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11si10832911ejj.11.2019.11.04.03.53.17; Mon, 04 Nov 2019 03:53:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728671AbfKDLwo (ORCPT + 99 others); Mon, 4 Nov 2019 06:52:44 -0500 Received: from lb3-smtp-cloud8.xs4all.net ([194.109.24.29]:34911 "EHLO lb3-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727782AbfKDLwn (ORCPT ); Mon, 4 Nov 2019 06:52:43 -0500 Received: from [192.168.2.10] ([46.9.232.237]) by smtp-cloud8.xs4all.net with ESMTPA id RauUi817QTzKrRauXiltg7; Mon, 04 Nov 2019 12:52:41 +0100 Subject: Re: [PATCH 4/4] v4l2-ctl: Support setting V4L2_CTRL_TYPE_AREA controls To: Ricardo Ribalda Delgado Cc: linux-media , LKML References: <20191101112509.29723-1-ribalda@kernel.org> <20191101112509.29723-4-ribalda@kernel.org> <31815641-550c-88ab-c037-2e743cea59b3@xs4all.nl> From: Hans Verkuil Message-ID: <82bd9ce8-bf1e-7071-914e-f321a8467476@xs4all.nl> Date: Mon, 4 Nov 2019 12:52:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfGrkqGV2Xg+2z6dntFkrabUjC190MQDxXDgUm2QiUL25QOkDz+O+drfg7ijgBwJ/kqmPHcMNcrPTa+qrQNppMdOFVKDygZ5vLzEejArpVXgj9tcM4Q01 pGnuMHaceaLStm7LfKKjmjVD7Ug6y2y1kSpNgoUFTN3BeYynavXX2b+WL+Qlb46Cs048riFWIBkfshlhnUJHgiPG2LnffOTAgeLfNchb+yP4ne0FE5dR91ac O+TfZthAKVIOzMbjG80/LQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/4/19 12:21 PM, Ricardo Ribalda Delgado wrote: > Hi Hans > > Sure I will fix this. Shall I resend it once you have updated the > headers on v4l-utils? Don't wait for that, just resend. I can merge this as soon as the new headers are in. Regards, Hans > > Best regards > > On Mon, Nov 4, 2019 at 10:41 AM Hans Verkuil wrote: >> >> On 11/1/19 12:25 PM, Ricardo Ribalda Delgado wrote: >>> $ v4l2-ctl -d /dev/video1 -c area=123123x233 >>> >>> Signed-off-by: Ricardo Ribalda Delgado >>> --- >>> utils/v4l2-ctl/v4l2-ctl-common.cpp | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp >>> index 95339561..676b05e0 100644 >>> --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp >>> +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp >>> @@ -973,6 +973,10 @@ void common_set(cv4l_fd &_fd) >>> strncpy(ctrl.string, iter->second.c_str(), qc.maximum); >>> ctrl.string[qc.maximum] = 0; >>> break; >>> + case V4L2_CTRL_TYPE_AREA: >>> + sscanf(iter->second.c_str(), "%dx%d", >> >> Use %ux%u since these are unsigned values. >> >> Regards, >> >> Hans >> >>> + &ctrl.p_area->width, &ctrl.p_area->height); >>> + break; >>> default: >>> fprintf(stderr, "%s: unsupported payload type\n", >>> qc.name); >>> >>