From patchwork Mon Oct 26 16:56:40 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 28641 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 2E488C324C for ; Mon, 26 Oct 2026 16:56:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 16B9D6900E; Mon, 26 Oct 2026 17:56:46 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="oRoeRigi"; 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 C559568FD7 for ; Mon, 26 Oct 2026 17:56:44 +0100 (CET) Received: from Monstersaurus.lan (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3F3F334; Mon, 26 Oct 2026 17:54:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1793033673; bh=1l9hD4lSXfskiVR3cg7hTHvVh1oG7vC1df2BkgeOIbU=; h=From:To:Cc:Subject:Date:From; b=oRoeRigi/5YEh4UXAqNwzbIo5TV0XwlnDlpa4agcMHuZynuquk0E1D22paEkeuExW 7Pz3t5DS4/5OUunYMiP3xW90a8u83nFlPbZ40lMnQaVnHUHfNHuBiQIkKfYHXohY80 eOIPW7m9FMzM50l5/PwRH3QH627K4rVmeRV2sZeI= From: Kieran Bingham To: libcamera devel Cc: Kieran Bingham Subject: [PATCH] libcamera: camera_manager: Non-fatal duplicate id detection Date: Mon, 26 Oct 2026 16:56:40 +0000 Message-ID: <20261026165640.3755874-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.52.0 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" There are some hardware configurations which currently generate a duplicate camera ID when the camera is on a shared but multiplexed bus. At present this is somewhat difficult to adapt to ensure a consistent and unique id. While this case is undesired, it presently causes libcamera to hit a Fatal asssertion on real world hardware which then causes pipewire to close. This behaviour is even less desirable, and we can easily continue to operate libcamera without a potentially duplicate camera. Reduce the Fatal log level to an Error allowing the code to continue without constructing this duplicate camera. Closes: https://gitlab.freedesktop.org/camera/libcamera/-/work_items/303 Signed-off-by: Kieran Bingham Reviewed-by: Barnabás Pőcze --- src/libcamera/camera_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp index 0dd4e0c590a1..9c9073053710 100644 --- a/src/libcamera/camera_manager.cpp +++ b/src/libcamera/camera_manager.cpp @@ -210,7 +210,7 @@ void CameraManager::Private::addCamera(std::shared_ptr camera) for (const std::shared_ptr &c : cameras_) { if (c->id() == camera->id()) { - LOG(Camera, Fatal) + LOG(Camera, Error) << "Trying to register a camera with a duplicated ID '" << camera->id() << "'"; return;