From patchwork Thu Oct 23 10:56:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaac Scott X-Patchwork-Id: 24723 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 2B788C3331 for ; Thu, 23 Oct 2025 10:57:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0DFDB607DD; Thu, 23 Oct 2025 12:57:09 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="uHcool1f"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2358F607B3 for ; Thu, 23 Oct 2025 12:57:05 +0200 (CEST) Received: from isaac-ThinkPad-T16-Gen-2.infra.iob (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 32D77591; Thu, 23 Oct 2025 12:55:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761216920; bh=ZT1EbruWzhvbayV7rJvu0dBT8JZzRGSCkee99VVXE7c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uHcool1fG/oo10GjCpkZByzum5WgJIhLJ9OY7XkyCT3Lk8i/58hQqOvm2UvpAYnWL Y/uGZp2WEUKQtfn0QQAusTfGTJoQqxdYbiPPtnU39MauPkkud6tbvzTMfvs2rgnEzU zP0xW6d7T8vhMWcUzVyYG8goZSFAzPNfU4PUH9fc= From: Isaac Scott To: libcamera-devel@lists.libcamera.org Cc: Isaac Scott Subject: [PATCH 2/4] libcamera: controls: Add CAMERA_MODULE_IDENTIFIER Date: Thu, 23 Oct 2025 11:56:49 +0100 Message-ID: <20251023105651.78395-3-isaac.scott@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251023105651.78395-1-isaac.scott@ideasonboard.com> References: <20251023105651.78395-1-isaac.scott@ideasonboard.com> MIME-Version: 1.0 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" Add a string control, and the necessary V4L2_CID to support a read-only string payload. This can be used to store a string identifying a variant of a camera sensor (more accurately, a unique module including that camera sensor). The addition to v4l2-controls.h to add V4L2_CID_CAMERA_MODULE_IDENTIFIER has been posted upstream here: https://lore.kernel.org/linux-media/aPi9c_c9f0dkduLA@kekkonen.localdomain/ Signed-off-by: Isaac Scott --- include/linux/v4l2-controls.h | 2 ++ src/libcamera/property_ids_core.yaml | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h index 4cfae0414..b96142c46 100644 --- a/include/linux/v4l2-controls.h +++ b/include/linux/v4l2-controls.h @@ -1095,6 +1095,8 @@ enum v4l2_auto_focus_range { #define V4L2_CID_HDR_SENSOR_MODE (V4L2_CID_CAMERA_CLASS_BASE+36) +#define V4L2_CID_CAMERA_MODULE_IDENTIFIER (V4L2_CID_CAMERA_CLASS_BASE+37) + /* FM Modulator class control IDs */ #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) diff --git a/src/libcamera/property_ids_core.yaml b/src/libcamera/property_ids_core.yaml index 834454a4e..5f47a4ea7 100644 --- a/src/libcamera/property_ids_core.yaml +++ b/src/libcamera/property_ids_core.yaml @@ -701,4 +701,12 @@ controls: Different cameras may report identical devices. + - CameraModuleIdentifier: + type: string + description: | + Specify the camera module identifier. + + The camera module identifier is a string that uniquely identifies the + camera module. It is used to select the appropriate tuning file for + the camera device. ...