From patchwork Fri Oct 28 03:17:26 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: 17722 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 7FFE6C3285 for ; Fri, 28 Oct 2022 03:17:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 226ED62FD8; Fri, 28 Oct 2022 05:17:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1666927066; bh=E2M2gE8AdzSxU0S2gGSqFrwSOir8BrV38NvTiVWiZDo=; 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=pKbMVbAvErYF1cZRlrbM8d02t3UwvxGdyc4KSagfsqPWAaNF4zPP0kLY3YHH6PemG l2gxn/Oh/QZTPjYf2SmxTY+adHCIvgodG8TWhYZ4/CEKBVS5xbzyhGGAwTbrl7PUfx 7UDzObvNeEJfG/uymVf7UfavStVxUHNkLJm0/Qgk//d1FXq56dU5dBHefE3FerMRzp S9OknsFKWMwtWD4aNzWRWrC9DbrOUz+x3rCtmZpkAtZ0kCU4dlmIEwiknUA7MveTS8 inDqHRrxelBv/Gy7HA7KuWsjn+sjxSM6o51hFi3eaq6AYRZeJ+SGL2Y5kopGBkGSGI 2uVMQijSdjpEw== Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 215D762FC1 for ; Fri, 28 Oct 2022 05:17:38 +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="G0ZYeWyj"; dkim-atps=neutral Received: by mail-oi1-x22c.google.com with SMTP id s206so4940364oie.3 for ; Thu, 27 Oct 2022 20:17:38 -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=6K1PGdxqOtEtfDSAankUdXcm6R3lz9nnSvzIKD/QrHE=; b=G0ZYeWyjriyowYFISGtueEhWmh7Aa6afJ8YAMnQH8bLrxKE8KzPkl73qVNrzJ+gypi IRkGxVV496jvuA4rifpv1y8bCpAM9JNguP6Yu3sr/PQqoaa92xn+OEdbnGH5o9GklL1Q 3IMRN40miVeNV6H7V5U6nhthA3W9SxUnbdl1ZPMnLZmltlqX5e/QO3rgTjRgNE5xHKRw 15G1AzNn15KJ80OlD9KraCJtEkW217z82rv6ZtgnviBuqLi+Tvhnb6KUTX4GDRSuKkB2 JAa2KzV1wFGfVHscRsR8oy8SOy9ChIL5veDEeTsMvB5Z9dgYqsYcFEeapTSV7QG/EzA1 ksSA== 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=6K1PGdxqOtEtfDSAankUdXcm6R3lz9nnSvzIKD/QrHE=; b=IMQP9gp25C/GOgeB+GJX/XkgaKk/U5mVG3o5F+PAXoOYCfuzCMezZtXj9XOiM68GtS 8UpBBatswebXTgFdbA1lOBACQU9omYm166ahOa1pMAW5NLu5wE8gfMuJuxaI4pAoLdqC JJ8pQuQmw0TDImyQJmb6stuwGKho8BXgurNv4m1aDTbICbwhpvvAwvXwnXlo1cvFnjpn CF3b2rLqs0OoxrHkE78JJpZU53gg1MJXdqPNRWa1V/mhHfKkxLvvTlGV7INgXkxPjMeB QsPZoAs2K6sTCI/GyzXVkMrONxdlbeZoGYUQV6bwGzW5UOqGG0FgVFLepYHyCBw2Fob9 3aiQ== X-Gm-Message-State: ACrzQf3Bw8ssbhorf8QVcfHm+/AeneWHS91586FaqhIRJlxY0sXp+IrM odmzlNDOnZHB6gU+pwrc676U7nJSMFc9ai+8HGk= X-Google-Smtp-Source: AMsMyM4VBniTC3qa91E45hMqewZ4I8MQA+E+4m5arVS1SoTrRlAoHGr4IBf3ksrAo0NZqOtG0dprdA== X-Received: by 2002:a05:6808:1a21:b0:355:2173:7975 with SMTP id bk33-20020a0568081a2100b0035521737975mr7150380oib.116.1666927056485; Thu, 27 Oct 2022 20:17:36 -0700 (PDT) Received: from nroth-pc.attlocal.net ([2600:1700:20:20c0:293a:90ce:6463:244d]) by smtp.gmail.com with ESMTPSA id fp19-20020a056870659300b0013626c1a5f6sm1527738oab.10.2022.10.27.20.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 20:17:36 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 27 Oct 2022 22:17:26 -0500 Message-Id: <20221028031726.4849-11-nicholas@rothemail.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221028031726.4849-1-nicholas@rothemail.net> References: <20221027224135.348115-1-nicholas@rothemail.net> <20221028031726.4849-1-nicholas@rothemail.net> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 10/10] android: libcamera: add useful debug prints 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 I identified opportunities to make libcamera's log output easier to understand while working to get it working on my Android device as a HAL. These additional logging statements came out of that and will hopefully prove useful to Android distribution maintainers with the same goal as mine and to users who attempt to debug tools like Waydroid. Signed-off-by: Nicholas Roth Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- src/android/camera_capabilities.cpp | 12 +++++++++--- src/android/camera_hal_manager.cpp | 3 ++- 2 files changed, 11 insertions(+), 4 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..b229e2d5 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 " << cam->id() << "failed to load"; return; }