Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3721437ybx; Mon, 4 Nov 2019 01:42:32 -0800 (PST) X-Google-Smtp-Source: APXvYqxEgPOUpzK1XTNG3P9pkXst/CHzXaeNiJZrrS86mZnEcfLAU+Sw7r+7asSFPkdvtZNsrUR5 X-Received: by 2002:a50:88a6:: with SMTP id d35mr28502386edd.111.1572860552852; Mon, 04 Nov 2019 01:42:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572860552; cv=none; d=google.com; s=arc-20160816; b=wb2VLET0HDZx7cdxx6wk/xNX4nMKRfS+BBqDddPhHd8IdwYnY8BsXTKBPiVnk4fgAF 2iTiH3E2w4NykkdNp+nUXPgWvjCwmZ5wkQeQvXQ1AJ3v2vBWEKyJwHrH4s7jDcrk8Rom vtyYeL1KffYiXYHDst2hEJv7QzMU9/gjzJHKKN5c1FTV1+bf4E9zCyOA10zWdUy7aXWa tO38rIzDhRsn0IljuoFcJ8nca+/LrfD1DanJprFi6I05eE21fky22Jv/EDn+MDGwaqHE SXN9STfdAA21+k0HG3uoizOfpVps75AZ+h8jYEECqL3TUCx2xSF4iouAWkXyPT8S17Cx DphA== 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:to:subject; bh=jhs9lqUFAPzRh1Xc02pBTjE6qM1IhyJuS+k0Ld3OIMw=; b=dI8VqroaySdNMycFgU63uCDOTkcFuuTq33RDI0GPMkOzlFjq0sqc/LbUrtf8KOMKvJ 8K4KPcmjHykWWEkwgh99CtUmKWwOcaey6Dpl1qlkEGssVOwqsXR7vesyt3waFTZM0k8P I1e1YOXFQUXlSUfDlIfGrbeZxRZUz7XU4JQKTK6btouOY+8ZqbBH7/TMX6+kNhQnSzt0 c49R8ZpThM6UxmpjYcUkBfnv41aU+fgfypRhR+z3hHzs0YTGE73QMjv+gV+HaPPvyLtj uiHUNWhZX/5UDSVS788wEvA4qPQeKhVZ4O4kToEriBWJdYA2BoI/2+8Qmf7/7/99Do7S nq2w== 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 v13si8511917edb.164.2019.11.04.01.42.06; Mon, 04 Nov 2019 01:42:32 -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 S1727993AbfKDJld (ORCPT + 99 others); Mon, 4 Nov 2019 04:41:33 -0500 Received: from lb3-smtp-cloud9.xs4all.net ([194.109.24.30]:53207 "EHLO lb3-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727553AbfKDJld (ORCPT ); Mon, 4 Nov 2019 04:41:33 -0500 Received: from [192.168.2.10] ([46.9.232.237]) by smtp-cloud9.xs4all.net with ESMTPA id RYrQia6J69P9bRYrViVSex; Mon, 04 Nov 2019 10:41:30 +0100 Subject: Re: [PATCH 4/4] v4l2-ctl: Support setting V4L2_CTRL_TYPE_AREA controls To: Ricardo Ribalda Delgado , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191101112509.29723-1-ribalda@kernel.org> <20191101112509.29723-4-ribalda@kernel.org> From: Hans Verkuil Message-ID: <31815641-550c-88ab-c037-2e743cea59b3@xs4all.nl> Date: Mon, 4 Nov 2019 10:41:20 +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: <20191101112509.29723-4-ribalda@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfLHx2lXm3zADOqbQZkkkD01AMPJ03Xm5aaOAeDjEfL6lIZPvSL2vMYiRWEQIlH0m0UG0JSdDG5JwQUhH16IMnAoVfGabqymDiL56uwuQwb4jjwkS+rpU XBoJO/1JWPZPxw8NC9bt1lHIgSqvND4zeJkh9OD1rmX9h3AGnkUgf2+2XDnsHWqKo+PyJPjrnm8AQHOgCQ7yiePxJu6OJWWgWysz8G9O655xNd+e9ZYqOn4+ jkJ/J/T7M08tkCtLKUcsFA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); >