Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2291403ybl; Thu, 15 Aug 2019 09:26:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9zhU1BP8BTJt98ta6jLVnx1u+VZUkwZynbtZdr/5qSpv0CrifLAFJjB6tY2K2b+b8UOxM X-Received: by 2002:a65:6850:: with SMTP id q16mr4229820pgt.423.1565886382062; Thu, 15 Aug 2019 09:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565886382; cv=none; d=google.com; s=arc-20160816; b=veLos3600Bk6tLa7sEEkfDGqjsyaOmiR+VXNgw8BX0jr3DwUFg91wAbLTSzG94/yUW AnAzELDfFhLnRdd7B2uljqI9rdcWiYFtfr4ni6GUEFWPxyUrm4omHoCqSg/3s86myMJ4 iulGWTvdP57cMlg/Ueq79rdJ1YSdjG8QIw/P3ybC0vbWR29ArdC2WF3FuX0q0ie5ejbH iARuW6FeSDPP3b6lheZ3q4Fa5Rd8ALhw6MngdNdCo5Qy0X5rghmJfeTuhJ8sjDTC4Qg6 CQEE4FKH+LOdK7ynMDKri5I1FswmSC4yN8wuxt9olc/fYpzvWN4VBdprfMDDDZrkPmPD i1Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gTok9Kmqj50l0xnf3hESPaNsOUnRTEuxG7Me7itIBLk=; b=idW9S4pQvaFPsY5IbMMZuKRmrFvX3WK0VupBzdhd7xlJZ+iC7hYzLNN+CImg2I66U5 LPIu/Akh6newWKpxoBCXr8fnPfD6FekIGQY0IY1qAYIMZOGbCB+cfpOdtnHPjwC9CrXo NR2fnX9LfvOIXVAb3H+l1//mmuO+jIPt3xaRyF/5CcwHpEOLMtykCuSFOa58sIusp6ag f9GWHsWsNb74+/MLlliqEyII+3xbpDFOwkjrXy14T+tdAUN57Nnzq1bASvCC9RJ5a0y1 EsAS5dZtcedaYJ5qbtcCXhp9iJJsDkN5aWF0qIsxXIX6CV7I6L+NMRq3/FZe5FWZwy/p +VOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=iI7FG4A3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9si2092248pgp.421.2019.08.15.09.26.06; Thu, 15 Aug 2019 09:26:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=iI7FG4A3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732510AbfHONsy (ORCPT + 99 others); Thu, 15 Aug 2019 09:48:54 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:46064 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732122AbfHONsy (ORCPT ); Thu, 15 Aug 2019 09:48:54 -0400 Received: from pendragon.ideasonboard.com (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E141C2AF; Thu, 15 Aug 2019 15:48:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1565876932; bh=xowyGRiP4/YVXIEzA/PZn8BUaXGf008qzpBzfZbm7g0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iI7FG4A3hy7aFaZLKOforRcR9n5x1GpjnRZ/oNE0bvk2jsJETaf/mnqUBcBZ80j9r MiZnTKuLSXk+YEgSIMXZsiXI7Cypb1cVOo3MLCcwrNBiGu3H0rMtvyW5IH/o8yWGrI K6tS3lSFCq/AVUarbp8nklxxuVRBkbeENn61GoOo= Date: Thu, 15 Aug 2019 16:48:48 +0300 From: Laurent Pinchart To: Hans Verkuil Cc: Jacopo Mondi , Mauro Carvalho Chehab , Sakari Ailus , "open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)" , open list Subject: Re: [RFC 2/5] media: v4l2-ctrl: Document V4L2_CID_LOCATION Message-ID: <20190815134848.GA20020@pendragon.ideasonboard.com> References: <20190814202815.32491-1-jacopo@jmondi.org> <20190814202815.32491-3-jacopo@jmondi.org> <02b40da5-c30c-f1f3-2351-c04da932e94a@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <02b40da5-c30c-f1f3-2351-c04da932e94a@xs4all.nl> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hans, On Thu, Aug 15, 2019 at 03:30:59PM +0200, Hans Verkuil wrote: > On 8/14/19 10:28 PM, Jacopo Mondi wrote: > > Add documentation for the V4L2_CID_LOCATION camera control. The newly > > added read-only control reports the camera device mounting position. > > > > Signed-off-by: Jacopo Mondi > > --- > > .../media/uapi/v4l/ext-ctrls-camera.rst | 23 +++++++++++++++++++ > > 1 file changed, 23 insertions(+) > > > > diff --git a/Documentation/media/uapi/v4l/ext-ctrls-camera.rst b/Documentation/media/uapi/v4l/ext-ctrls-camera.rst > > index 51c1d5c9eb00..fc0a02eee6d4 100644 > > --- a/Documentation/media/uapi/v4l/ext-ctrls-camera.rst > > +++ b/Documentation/media/uapi/v4l/ext-ctrls-camera.rst > > @@ -510,6 +510,29 @@ enum v4l2_scene_mode - > > value down. A value of zero stops the motion if one is in progress > > and has no effect otherwise. > > > > +``V4L2_CID_LOCATION (integer)`` > > + This read-only control describes the camera location by reporting its > > + mounting position on the device where the camera is installed. This > > + control is particularly meaningful for devices which have a well defined > > + orientation, such as phones, laptops and portable devices as the camera > > + location is expressed as a position relative to the device intended > > + usage position. In example, a camera installed on the user-facing side > > + of a phone device is said to be installed in the ``V4L2_LOCATION_FRONT`` > > + position. > > When should this control be created? If there is only one location (e.g. > all sensors are front-facing) would you still expose this? Or does it depend > on the type of device? Those are important questions that need to be answered :-) Going forward I think all camera sensors should expose this, and I'd like a helper function to create the control and set its value based on firmware properties that all (or most) camera sensor drivers should use. That helper function should also create the other mandatory or optional standard controls for camera sensors, such as the pixel rate or link frequency controls. > And is the sensor in a digital camera front or back facing? (Just curious > about what you think about that situation!) I think we should include here a list of supported device types, and for each device type, define what the front location is. All other locations are then derived from that. For a digital camera I would define the front side as facing the scene being photographed. > > + > > + > > + > > +.. flat-table:: > > + :header-rows: 0 > > + :stub-columns: 0 > > + > > + * - ``V4L2_LOCATION_FRONT`` > > + - The camera device is located on the front side of the device. > > + * - ``V4L2_LOCATION_BACK`` > > + - The camera device is located on the back side of the device. > > + > > + > > + > > .. [#f1] > > This control may be changed to a menu control in the future, if more > > options are required. -- Regards, Laurent Pinchart