Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp351149ybx; Fri, 1 Nov 2019 04:37:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqycLvOnnOJzEqcYJgO7okgpQgYCpQZjM4FrZrgttTwhORBB6KQ8TTFqQO+2lm+1gz4kezrR X-Received: by 2002:aa7:d6ca:: with SMTP id x10mr12019826edr.27.1572608232826; Fri, 01 Nov 2019 04:37:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572608232; cv=none; d=google.com; s=arc-20160816; b=mao0NN7vaiFTeJxPzQR6hPdkxyFdQ+gosVgupgL9FlicYzgkxkaFfQ+bYAIlZK2H3Q Xe0/5Bwc4Ta9GaSsDVoebCtkX8hjMPnFFQIKhN9j0SmkYU9R4wzMLGPkuaW/zME/s2po 8tAvwabuSotUF0I20JK+Kqm2LJ/0VATFo/6+ezdIdjpBPvsgy8A6JvFRnmizD891D+6s auGKEsXmK6kfRpX12PRLCjUYX/BplMSbeccF8RfFFh4GDWuEX8E1XQV1Hbz37Pk6fEMr cxraF/JCHnFvqtbdWjQjrt93rmUKYCXG9E4lpEJU/SyxJFT7k7rgfOr+pZf6huAeEYNw fcig== 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=5kOelELcbXNl2QfySB87h5inDfmG0cvnFxe50Mfnt8I=; b=l/SOGA0/0g2KP68AVw1FOLma72vUJfcp8D2+ni4DEa1YUqhbERsCOga6OnZLgU1Y6i 9iDgKWtpsgsSHILvNtsO+epuNyrp1xQuUVqKVwRYshXmIcGlkZb47u8CtFDEopREDLjr pzFs/2GSMyfnGrlgdqUG1aAyGdQoMMqgKZi7N2RZMd7tvCQHT6qrajDltNMZ9r88032H BiHcgu+Hc16szbQnd+5VfNMD/VzdK0OJk3F7KVvKffEvLL7faDCo1bkMCixzKqnIJQl5 cTQpfr9An8pUug4Fc7iyWXm6rkel/pBRl8ANaM2ehkDLYRnlEa9slXnE64EF61RZl/v9 Kotg== 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 j15si5736393ejc.369.2019.11.01.04.36.49; Fri, 01 Nov 2019 04:37:12 -0700 (PDT) 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 S1730481AbfKALZU (ORCPT + 99 others); Fri, 1 Nov 2019 07:25:20 -0400 Received: from mail-lf1-f41.google.com ([209.85.167.41]:42382 "EHLO mail-lf1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730466AbfKALZT (ORCPT ); Fri, 1 Nov 2019 07:25:19 -0400 Received: by mail-lf1-f41.google.com with SMTP id z12so6983062lfj.9; Fri, 01 Nov 2019 04:25:17 -0700 (PDT) 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=5kOelELcbXNl2QfySB87h5inDfmG0cvnFxe50Mfnt8I=; b=BdFeAvn9UjHW1sa0tGN7V7K/SghzgYjlNFB/6LQMlM8R1L9gI0+Q1oWbh7wj79YGOo xDmIoeAG6uVQfw3FhmJRLHJiaU6howi2Q2gb2wWbJwNXzKvetRjXqcAvusP6fKXj6vdk MUUbrMyYfLvNO1VxJ4TBW8Xa71NN9jrh6A0h8u68/sHhgeUc2EfkU5JHtvQ0/OCCE9Zr ByELvkwh6lfqxWfQQ95umIn0q4eKw+wQWYQdEkpJavdwfxNQoBeylKyq7UeupwV4vxZq auwyhDfC1b7OiC1GW7+RHmS7eQai41lFJxa3Kv3COl8opHOE+e91PT2ND9iSml8a+cUc k32g== X-Gm-Message-State: APjAAAWo++6lFl7hxIi0rafIQ2crrdY78LFoS6Db5n/FKy0oMB/phfwh nFhaJlFGIzCmR31/UOd7pfinft5Q5ao= X-Received: by 2002:ac2:57cb:: with SMTP id k11mr6885656lfo.87.1572607516680; Fri, 01 Nov 2019 04:25:16 -0700 (PDT) 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 u13sm1851775ljl.71.2019.11.01.04.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2019 04:25:14 -0700 (PDT) From: Ricardo Ribalda Delgado To: Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH 4/4] v4l2-ctl: Support setting V4L2_CTRL_TYPE_AREA controls Date: Fri, 1 Nov 2019 12:25:09 +0100 Message-Id: <20191101112509.29723-4-ribalda@kernel.org> X-Mailer: git-send-email 2.24.0.rc1 In-Reply-To: <20191101112509.29723-1-ribalda@kernel.org> References: <20191101112509.29723-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..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", + &ctrl.p_area->width, &ctrl.p_area->height); + break; default: fprintf(stderr, "%s: unsupported payload type\n", qc.name); -- 2.24.0.rc1