From patchwork Mon Oct 24 05:55:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dufresne via libcamera-devel X-Patchwork-Id: 17686 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 E2DFEBD16B for ; Mon, 24 Oct 2022 05:56:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 76D2462F10; Mon, 24 Oct 2022 07:56:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1666590968; bh=HUrqt4wqP8i1FlW/s6geLVzyP/5YAcKzD5Wz9hdN3T0=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=w4O4X70XIEJypD3Q0Td1qw3uqlhUjhbrAQlFcKeFrBsvNoYs9scrQxTv7onYEpWtN iV0QgiwvOzlQaArZCSQ6CunJ3aGlHt/1ZRrg3DH1izEIwXDNMw9//+eK/9W3HF3Uyp eA4QXjnAj1BsypgA7WEhsq7tfi1TW8IISpEJt79fF4MYU3aXYQN2QeeOMkoPiv978T nI/EkG6EI7VbQFul8l9dnYUMC+xfB802FP41if7DYEhCBZ2etzEeXoNLao6rTBxfYG q//9dJEtTallhlrlr5+JrTTGf92DLjN0hePVHbtSpRI3gAedYqTRce856eO+KfbZud tyQTq+FvJ5GAw== Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AB4F962EFD for ; Mon, 24 Oct 2022 07:56:02 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=rothemail-net.20210112.gappssmtp.com header.i=@rothemail-net.20210112.gappssmtp.com header.b="Z5U275JO"; dkim-atps=neutral Received: by mail-ot1-x331.google.com with SMTP id r13-20020a056830418d00b0065601df69c0so5363325otu.7 for ; Sun, 23 Oct 2022 22:56:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothemail-net.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=d2Wxn9GxD9kN8fj4nu1ugggjmE6Wwm8g2qACyX8n20Y=; b=Z5U275JOHe4cFOgze2NusWxZx7MkPDKEBu+QQC1J67CwcfAZilUPDZom3Tq38u/pAD TtizbHIXFqtXq70Y2NzW6MAZOwNi7ehAFS/nLqzlyXDChkpvWpGwNbdKO32EGhYbeRAN Ug6r3eOBCzGF26zwf4VRdfixa+PWu2Um/IavYNyBbXDoairfuA2GT9ywlAJ0pilLGoyD bLskI3Dr/s5pL29qpwx1/fe7OIyQBs26G5ixZqAaniRxd+b8LhBzLSO1D2vk8d01HdK4 5MT9OkxHuB0qt1h9uXu0f1Tll5hp4eCM+NKqdcimhF0VcWLWT6LlCjUbF6uN7oxUySSi Sprg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=d2Wxn9GxD9kN8fj4nu1ugggjmE6Wwm8g2qACyX8n20Y=; b=PwjcVqnNWNMzlrsrSVJLwW+j8fi8jsRN3muPVdxk02IgNa85T9g+ap2P8/WdzTqFZH wVGaKvkKiUtHkbNVVZkaCZoYeiM/rOuTvhsEY1trCFs2uaj65ECm23OYikfXqJ0d8YN2 rrvigXxHNZwZClY4KIeXUfJtkKZuCSoc49Ph1Wigv5E6UE4gpjC4Uu2TcqbwoKcox1nO o5HxyceNi85MgJW+4Q324qfvZGwPeToSveA0VS08YR5oiSIN4vKUpwtnIHXB9tlWk4dF qzY+y6H2H3Dy/kRwW1MHZUAsA7aq0sNivWBGJAPxEY2ID0geVPlHrBrPVDm7rTsWMm0q Wz5Q== X-Gm-Message-State: ACrzQf0VX3K2wfk/hYroClr3DQ9cqEYrMC2Pyud5mF6YJZ0uksJr99CD XrIeGdsX0GsjjIUhA7cNmVf8nAxPv5UIayaB X-Google-Smtp-Source: AMsMyM7G70LX2W6tsmg6V8E3gcRLd5mUy/nUQrLVkW0gMIjx0BjLDaACYbU7DBPPBERFK589QHuwLw== X-Received: by 2002:a05:6830:6002:b0:660:7be2:59b2 with SMTP id bx2-20020a056830600200b006607be259b2mr15353176otb.183.1666590961980; Sun, 23 Oct 2022 22:56:01 -0700 (PDT) Received: from nroth-pc.attlocal.net ([2600:1700:20:20c0:7bc3:aed3:676f:10a0]) by smtp.gmail.com with ESMTPSA id x15-20020a9d628f000000b0066193df8edasm3980278otk.34.2022.10.23.22.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Oct 2022 22:56:01 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Mon, 24 Oct 2022 00:55:43 -0500 Message-Id: <20221024055543.116040-12-nicholas@rothemail.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221024055543.116040-1-nicholas@rothemail.net> References: <20221024055543.116040-1-nicholas@rothemail.net> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 11/11] Adds useful debug print statements. 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: , X-Patchwork-Original-From: Nicholas Roth via libcamera-devel From: Nicolas Dufresne via libcamera-devel Reply-To: libcamera-devel@lists.libcamera.org Cc: nicholas@rothemail.net Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Nicholas Roth --- src/android/camera_capabilities.cpp | 12 +++++++++--- src/android/camera_hal_manager.cpp | 3 ++- src/libcamera/base/log.cpp | 6 +++++- src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 2 ++ src/libcamera/v4l2_subdevice.cpp | 3 ++- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 64bd8dde..ef0d10d0 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -374,14 +374,20 @@ void CameraCapabilities::computeHwLevel( camera_metadata_enum_android_info_supported_hardware_level hwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL; - if (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR)) + if (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR)) { + LOG(HAL, Info) << noFull << "missing manual sensor"; hwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED; + } - if (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING)) + if (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING)) { + LOG(HAL, Info) << noFull << "missing manual post processing"; hwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED; + } - if (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE)) + if (!caps.count(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE)) { + LOG(HAL, Info) << noFull << "missing burst capture"; hwLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED; + } found = staticMetadata_->getEntry(ANDROID_SYNC_MAX_LATENCY, &entry); if (!found || *entry.data.i32 != 0) { diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp index 7512cc4e..7fac4e3f 100644 --- a/src/android/camera_hal_manager.cpp +++ b/src/android/camera_hal_manager.cpp @@ -140,7 +140,8 @@ void CameraHalManager::cameraAdded(std::shared_ptr cam) */ if (!isCameraExternal && !halConfig_.exists()) { LOG(HAL, Error) - << "HAL configuration file is mandatory for internal cameras"; + << "HAL configuration file is mandatory for internal cameras." + << " Camera NOT loaded: \"" << cam->id() << "\""; return; } diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp index 55fbd7b0..b8c2c99f 100644 --- a/src/libcamera/base/log.cpp +++ b/src/libcamera/base/log.cpp @@ -625,8 +625,12 @@ void Logger::parseLogFile() void Logger::parseLogLevels() { const char *debug = utils::secure_getenv("LIBCAMERA_LOG_LEVELS"); - if (!debug) + if (!debug) { + syslog(LOG_INFO, "Could not find LIBCAMERA_LOG_LEVELS in env"); return; + } else { + syslog(LOG_INFO, "LIBCAMERA_LOG_LEVELS is %s", debug); + } for (const char *pair = debug; *debug != '\0'; pair = debug) { const char *comma = strchrnul(debug, ','); diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp index 2d38f0fb..a2038704 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp @@ -33,10 +33,12 @@ bool RkISP1Path::init(MediaDevice *media) std::string resizer = std::string("rkisp1_resizer_") + name_ + "path"; std::string video = std::string("rkisp1_") + name_ + "path"; + LOG(RkISP1, Debug) << "Creating " << resizer; resizer_ = V4L2Subdevice::fromEntityName(media, resizer); if (resizer_->open() < 0) return false; + LOG(RkISP1, Debug) << "Creating " << video; video_ = V4L2VideoDevice::fromEntityName(media, video); if (video_->open() < 0) return false; diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp index 15e8206a..8f86387b 100644 --- a/src/libcamera/v4l2_subdevice.cpp +++ b/src/libcamera/v4l2_subdevice.cpp @@ -392,7 +392,8 @@ int V4L2Subdevice::getSelection(unsigned int pad, unsigned int target, if (ret < 0) { LOG(V4L2, Error) << "Unable to get rectangle " << target << " on pad " - << pad << ": " << strerror(-ret); + << pad << ": " << strerror(-ret) << "." + << "device path: " << devicePath() << " device node: " << deviceNode(); return ret; }