Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3934104ybx; Mon, 4 Nov 2019 05:14:56 -0800 (PST) X-Google-Smtp-Source: APXvYqw9f8QIbgRq4yaI8TJuSOL7rduov3MaDdevaB0wytjxHlOUrbIZEX99vLG7PcxJoN4EiJ5A X-Received: by 2002:a17:906:3ec8:: with SMTP id d8mr24186136ejj.40.1572873296218; Mon, 04 Nov 2019 05:14:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572873296; cv=none; d=google.com; s=arc-20160816; b=zAU6sv+Jrf9xdxBxZS96Igvr1sAWom1XI1pQyHELrgbhFTGUFFIsX6u493fSF+zzwv XtZVpkQrlU2KSlxKnJbMNUdVUGogvxEv+xEyMDQBFxzYalhNnEova6ERFD+5r5sK5tNS fE/gZGiVoozK4YIWMQpX2YOI7AHzw4ElWf8FSEUS/GSAHV62r/NvSZm99cbsyCmAdSWu jXqbd1miZbwEw5Ix9mAtbjvCavT0/7KbLWtbMkB4jFpNg1YGn+uYemZya7iRXvURIvMo Frwby0zzbgXUGpzeXgw/Sa0gnYysdirhRv7zyhnmgToMlY2gXhlHG3wmb0qqmewMV1Lu h52A== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VqMrwoYt+5Te3Fp0RTQohq/LCLMxxZa1B7gKAbWNkJo=; b=FngpcA90HCC+A8i9cdWZ9G/EFMP/IGQiV7etVpqYe3vEcdVJgUs4D45ryVNxTOS8MB dEXP7i657snaOcW/UNC0mrd1+kI1TlzTnpxEftApjqzScL4iaZn6bOHj6+tTuCisOi58 8I+6/OuBl9ZK7kbJhDqIDrNBXgcs2KWhWYzKBgjktv6xts0ry1H15Bgm/+1NnH1d7/f6 /05qBEMkUkpx7IE7NP1TAwXm6unleKNUKAJ7GrNOweQbh8iCgis7lxFMnzC8MOzlGqRX 5fDyKGs0+xRC2DcmlGeAC0sGwVKYh8zAdxPZOG1KaMXOppvAWneQhD9eKXz0P883D3Ck KlZw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s7si6895510eds.215.2019.11.04.05.14.22; Mon, 04 Nov 2019 05:14:56 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729269AbfKDNKN (ORCPT + 99 others); Mon, 4 Nov 2019 08:10:13 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:44032 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729252AbfKDNKL (ORCPT ); Mon, 4 Nov 2019 08:10:11 -0500 Received: by mail-lf1-f68.google.com with SMTP id v4so12192009lfd.11; Mon, 04 Nov 2019 05:10:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VqMrwoYt+5Te3Fp0RTQohq/LCLMxxZa1B7gKAbWNkJo=; b=r/lVsDNgdTDGSHejiSjIrVqVkLlvN4erS8w9vtwjGPfRIcBAQzUDrqda25O7PnZHjI gfuNnZsLC/DrzqaU0k9RQ1ZeqFcLaw3Z7y/cXlaRCvXP3+JDOFydXPz2y3t2BfqIJJbU P936hdjxwxJQsX78F6laRsLcGIjtnpIO8E7zWmfRwAlJBufs/CEFgVvy6sB4PodAfu49 YV5EhNOox8qBjRoatgHlgyWB//YPSsDInz/YxE99aaMopHqEZxkPQCZNwh+HYUq646vC 8JoZy0NunGU1Xpb6hf5c3lW6SmTzmbWPMkQLiUEj0g8ry/c7nJYfgaSpP2VNH81a6kg8 NTXQ== X-Gm-Message-State: APjAAAWd6gk4Re97JWHod28+vI/O8qYLkMCjsxCoquVTNuHqlogOJodb lW42Dqv/eJneUSOrzdWljeQ= X-Received: by 2002:a19:9116:: with SMTP id t22mr15917787lfd.99.1572873009470; Mon, 04 Nov 2019 05:10:09 -0800 (PST) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id z3sm5931801ljz.51.2019.11.04.05.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2019 05:10:08 -0800 (PST) From: Ricardo Ribalda Delgado To: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH v2 3/3] v4l2-ctl: Support setting V4L2_CTRL_TYPE_AREA controls Date: Mon, 4 Nov 2019 14:10:00 +0100 Message-Id: <20191104131000.22359-3-ribalda@kernel.org> X-Mailer: git-send-email 2.24.0.rc1 In-Reply-To: <20191104131000.22359-1-ribalda@kernel.org> References: <20191104131000.22359-1-ribalda@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org $ 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..e079c274 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(), "%ux%u", + &ctrl.p_area->width, &ctrl.p_area->height); + break; default: fprintf(stderr, "%s: unsupported payload type\n", qc.name); -- 2.24.0.rc1