From patchwork Mon Aug 17 20:26:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 9332 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 0A816BD87C for ; Mon, 17 Aug 2020 20:26:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9D78161ACF; Mon, 17 Aug 2020 22:26:42 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=uajain.com header.i=@uajain.com header.b="ZMxkGgPK"; dkim-atps=neutral Received: from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 460E1616B1 for ; Mon, 17 Aug 2020 22:26:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding; s=s1; bh=bDhthrO6iz7youdFrsP8Xzu7GFBabmYGQfFNjuzf8Lc=; b=ZMxkGgPKx71iSBCEPP5+WnmOf14IvfhvFcvqUjGcBdPHbGVMN34n6fibRB3/yyrl1Z3Q /u2tP9+16JTg6UA9BDbOnZk2DYBsnjePEYSlQD5KBhFBdpC9g447YeTeJ4hv5XOHlKXkL1 eq+r7NjtRBLY1LI7Dy2PuKaNbFsABJ46I= Received: by filterdrecv-p3las1-5785d94c6b-bvlsc with SMTP id filterdrecv-p3las1-5785d94c6b-bvlsc-18-5F3AE7FC-5D 2020-08-17 20:26:37.107163937 +0000 UTC m=+359830.985496349 Received: from mail.uajain.com (unknown) by ismtpd0004p1hnd1.sendgrid.net (SG) with ESMTP id LlweKJuDSfO0WtCXrc15ig Mon, 17 Aug 2020 20:26:36.758 +0000 (UTC) From: Umang Jain Date: Mon, 17 Aug 2020 20:26:37 +0000 (UTC) Message-Id: <20200817202629.4277-2-email@uajain.com> In-Reply-To: <20200817202629.4277-1-email@uajain.com> References: <20200817202629.4277-1-email@uajain.com> Mime-Version: 1.0 X-SG-EID: 1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcQ/i1ji5k4eTSSnQ1oTeZ4i1aWIanNJ7JI05Ha9PbbrgFf8kpucW9yJ2zlas7vnBB5xuFZNKxHpNRM4jDaPQToCquzxL8LZehSOkCzCCtGrVKx25DlgKo4bbaKkoH+D1GsueEkEB/bKoC08mPIlNYFsSGhIsp2jZJtcMxcXeywBJuhuI/jTjFFJcNzRYtZ/LSxnv3K1gg0lwTYYSTZvMZhw== To: libcamera-devel@lists.libcamera.org Subject: [libcamera-devel] [PATCH v3 1/5] libcamera: pipeline: uvcvideo: Treat all UVC cameras as external 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" We currently have no way to identify if the UVC device is external or internal(i.e. non-removable) to the system to set this property. Until we have a starting point to resolve this, treat all UVC cameras. Add a \todo explaining the situation for the same. Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp index bc892ec..bafe6f1 100644 --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -500,6 +501,12 @@ int UVCCameraData::init(MediaEntity *entity) video_->bufferReady.connect(this, &UVCCameraData::bufferReady); + /* + * \todo Find a way to tell internal and external UVC cameras apart. + * Until then, treat all UVC cameras as external. + */ + properties_.set(properties::Location, properties::CameraLocationExternal); + /* Initialise the supported controls. */ ControlInfoMap::Map ctrls;