From patchwork Tue Jul 21 22:01:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 8911 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 6EAB0C2E68 for ; Tue, 21 Jul 2020 22:01:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8FB67609A2; Wed, 22 Jul 2020 00:01:36 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="a62ZyhAF"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B586B6093B for ; Wed, 22 Jul 2020 00:01:32 +0200 (CEST) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 613ECA58; Wed, 22 Jul 2020 00:01:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1595368891; bh=WDrrFmfz091GJHNh2ME1Ki/sACWbRrIOaIjhNnjAkto=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a62ZyhAFrUgbAV0tc8kttgfW5Um2f7IaSQy2EKoxzS5RPabLWKvOZHPnHf5N+MmWD wH0N7WpL2TY3QT0IQsU/Nv3G4X3r+Jv/M6odRHEr4DR7WKZscJxdjNpe+QQ5RmqI6d zZPOjJTl5nRl3q5qqeUwrejhPdiAobD90JlkiVsk= From: Kieran Bingham To: libcamera devel Date: Tue, 21 Jul 2020 23:01:22 +0100 Message-Id: <20200721220126.202065-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200721220126.202065-1-kieran.bingham@ideasonboard.com> References: <20200721220126.202065-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 2/6] android: camera_device: Report configuration changes from validate() 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" When we call validate on a configuration, if there are any adjustments on the configuration, we fail without showing why. Display the stream configuration after the validate stage to aid debugging stream startup failures. Signed-off-by: Kieran Bingham --- src/android/camera_device.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index f51542b282d5..3f3d7857f0ab 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1032,6 +1032,14 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list) break; case CameraConfiguration::Adjusted: LOG(HAL, Info) << "Camera configuration adjusted"; + + for (unsigned int i = 0; i < stream_list->num_streams; ++i) { + CameraStream *cameraStream = &streams_[i]; + StreamConfiguration &cfg = config_->at(cameraStream->index); + + LOG(HAL, Info) << i << " : " << cfg.toString(); + } + config_.reset(); return -EINVAL; case CameraConfiguration::Invalid: