From patchwork Fri Aug 21 14:46:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 9342 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 F40ABBD87C for ; Fri, 21 Aug 2020 14:46:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5169F61FE7; Fri, 21 Aug 2020 16:46:11 +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="WaqZTsY2"; 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 5C25360383 for ; Fri, 21 Aug 2020 16:46:08 +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=WaqZTsY2hutRcHqoJGwgw4ttEFkCewsijvh29xo7SUHRYq79vzRitpW61g5TIzfnI8LM 9jXFPDcBXrHl+7dlz6C/cwBQ0QlZCw/8f3bjexoa+XQP9vSECRTJsRhvZ2QKXMZgTi6DRw EuTBVgiW6xCrZnGpHz0QLbtKILpXETfKs= Received: by filterdrecv-p3iad2-86945d9569-xwnpr with SMTP id filterdrecv-p3iad2-86945d9569-xwnpr-20-5F3FDE2E-87 2020-08-21 14:46:06.855812348 +0000 UTC m=+74586.787788678 Received: from mail.uajain.com (unknown) by ismtpd0008p1hnd1.sendgrid.net (SG) with ESMTP id AVVJrOyqR2SNmZOB4qEiJQ Fri, 21 Aug 2020 14:46:06.357 +0000 (UTC) From: Umang Jain Date: Fri, 21 Aug 2020 14:46:06 +0000 (UTC) Message-Id: <20200821144601.67860-2-email@uajain.com> In-Reply-To: <20200821144601.67860-1-email@uajain.com> References: <20200821144601.67860-1-email@uajain.com> Mime-Version: 1.0 X-SG-EID: 1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcREc2X1LpIgLW8oEasGbeg5/y0q7HvjiQWMRkTS5oElgo/JeCQCPn9EsF5tlGGDhq4LXmXWmJEuIPcNbZFdW6/7ePNjbBuCTboxcjujj2FW5MfpQbnUlVW/RIJKgm6hxW+ID3GLS63dyLAUBmso/UPP+45SSrTl0CGQs5UC7AFpTnGMWLQ5NryqcjNx5h3qFJ688qzzkMoyS+k2XfODpE8Q== To: libcamera-devel@lists.libcamera.org Subject: [libcamera-devel] [PATCH v4 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;