From patchwork Fri Feb 1 15:42:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 474 X-Patchwork-Delegate: jacopo@jmondi.org Return-Path: Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 39DD660B10 for ; Fri, 1 Feb 2019 16:42:40 +0100 (CET) X-Originating-IP: 91.183.179.147 Received: from uno.localdomain (unknown [91.183.179.147]) (Authenticated sender: jacopo@jmondi.org) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id DD2621BF207; Fri, 1 Feb 2019 15:42:39 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Fri, 1 Feb 2019 16:42:43 +0100 Message-Id: <20190201154248.15006-3-jacopo@jmondi.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190201154248.15006-1-jacopo@jmondi.org> References: <20190201154248.15006-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/7] libcamera: v4l2_device: Fix getFormatSingleplane ioclt X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2019 15:42:40 -0000 The single plane getFormat() function wrongly used the VIDIOC_S_FMT ioctl. Fix that by using the more opportune VIDIOC_G_FMT one. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- src/libcamera/v4l2_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp index 26b6ff3..5ba89b9 100644 --- a/src/libcamera/v4l2_device.cpp +++ b/src/libcamera/v4l2_device.cpp @@ -305,7 +305,7 @@ int V4L2Device::getFormatSingleplane(V4L2DeviceFormat *fmt) int ret; v4l2Fmt.type = bufferType_; - ret = ioctl(fd_, VIDIOC_S_FMT, &v4l2Fmt); + ret = ioctl(fd_, VIDIOC_G_FMT, &v4l2Fmt); if (ret) { ret = -errno; LOG(Error) << "Unable to get format: " << strerror(-ret);