From patchwork Thu Dec 23 08:01:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 15217 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 7903DC3258 for ; Thu, 23 Dec 2021 08:01:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A07CD60908; Thu, 23 Dec 2021 09:01:53 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="jAUfGyaw"; dkim-atps=neutral Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7023F608E9 for ; Thu, 23 Dec 2021 09:01:50 +0100 (CET) Received: by mail-wm1-x32f.google.com with SMTP id c66so3077876wma.5 for ; Thu, 23 Dec 2021 00:01:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rfKOot9GmUhxezKsQbyuCgb3G0DBk/IKhALkQP2p3VU=; b=jAUfGyaw/LZdEcSqY7votC9beJtZ9nTIm/UckTgDF733s2XKeI8DLj9R6/crAClO3v Lhpm4+sKX9YuJQ9VTKGsnT8KjPFLPMWw+tMlrwd7LDRDOnDIwQN2U3hTNWIQXYA2qCi1 TA6+ew4v4tciJOw5ZhWkLiszhNt+5Kxp2EcnK3PnVuClvqivbbL241EB3Jg7k3eDJg/9 KMTDpljDXnCJB2aGTW67RT2RcbRGRxkrKe7tLlLxkkwesShmJwbfpvlTL5MgwxwsJj6x jwYCt9rVeOPBf/Trob+lEEUtdMa7IC9T7eJ4TaAziEK52iaGgIdgg0XxXV/i4PJgvvou PJSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rfKOot9GmUhxezKsQbyuCgb3G0DBk/IKhALkQP2p3VU=; b=3H1bE1bt8FWJm+Ka+Zwzss3LFvNgt+Q0ssiY06VMRqNuMPlt8/t3AS/BPPBkS4f0JV aKbsRxDHK/M7F6MgAGOFtinJIoLWGVYoBWlMAX0nd2pHGFesveFLje29kocotW/Z4vBf Vkom6Gesm1A6NCD16RG/nFGfkyaApARSElYgYEEOMcGrS+3ouHKEZrxPr0B+8fbiOB5F DiChPnuo2gWptqLDrwQelbA//xkqDADgvkYryVY/zA3IUtNU861Cqvu8hOUSMXag+4xG /ZH7kdttMN0Pn16eawI6szLDdhWock1OwQMHkkuzRfdMJLZCjWLFme3o76ckJ48JHntg pfoA== X-Gm-Message-State: AOAM532g6tEUYAfk82bg40vpWv1LRdeh0heJsWV3xURF5rxFCezO51Kp VTHOzr+oYbpUpl79rTXQ69h/x3cbgjb8oA== X-Google-Smtp-Source: ABdhPJwBJj65SC+tr6VqGJ+HEDVccznj5PThgqnFQOh0jWW331QLAwspkpjHaAHQukYMBjZ0teQ5VA== X-Received: by 2002:a1c:f304:: with SMTP id q4mr771754wmq.162.1640246509961; Thu, 23 Dec 2021 00:01:49 -0800 (PST) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id a3sm4692730wri.98.2021.12.23.00.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Dec 2021 00:01:49 -0800 (PST) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Thu, 23 Dec 2021 08:01:09 +0000 Message-Id: <20211223080110.9766-3-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211223080110.9766-1-david.plowman@raspberrypi.com> References: <20211223080110.9766-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/3] libcamera: v4l2_device: Add support for integer array controls X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Signed-off-by: David Plowman --- src/libcamera/v4l2_device.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp index 62c91779..6f9de8ad 100644 --- a/src/libcamera/v4l2_device.cpp +++ b/src/libcamera/v4l2_device.cpp @@ -316,6 +316,18 @@ int V4L2Device::setControls(ControlList *ctrls) break; } + case ControlTypeInteger32: { + if (value.isArray()) { + Span data = value.data(); + v4l2Ctrl.p_u32 = reinterpret_cast(data.data()); + v4l2Ctrl.size = data.size(); + } else { + v4l2Ctrl.value = value.get(); + } + + break; + } + default: /* \todo To be changed to support strings. */ v4l2Ctrl.value = value.get();