Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3313491ybl; Sun, 1 Sep 2019 10:26:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfOUEkU970kiXZ+gaoezYWls/JXYqtFWzFf9as86HR6RM2MBG1BAHJrx1+iBB0yS0aZ2Di X-Received: by 2002:a17:902:7b97:: with SMTP id w23mr26097367pll.283.1567358788056; Sun, 01 Sep 2019 10:26:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567358788; cv=none; d=google.com; s=arc-20160816; b=Wsa6LLmSy7U7h9QtN4ZuV+sY3XxWVDFlBvIJAF1vCfsW0rS2OoVONFOk3bjDntPobD 5V3j83+FMA9OFuOynndcBdWtEcf2qtyX9ch5fOygsVXKuZZd32FT/8bc/gfl8J/ZqIaq LFaoA37t0nN9prhj+s+liCiLtsdiFv9BTIfJfjTZyMcpAUbfnPK9aRVk8uDfJef7UijC 0i0GgH8dpUQ638mz9lGvozFQQGRc+X+hrI8/xmiIEyGWohDIpanTFEcALhj0TGWlwnRs /RJFioykIOLBfyt9tXOz1X5KP+vu0K9BsBz54+Hs+Uw+ipLAHBgNstSaFngsmrAHMo+v d8pg== 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; bh=Py/j7EtfFxx4yHq4JZBO9l+uR4JqyH0XC3qbJpmugIw=; b=vRRmoWeXTe3cDEYaufpZ++Aq1T8VvyYxH97OisiZIbdYoW3rKvIB/djqpgXStM4OtX 7xuvazBGDpl1poL0SASH1bJ6c+GWwbzD6muuzRGreK8xkPc1f/9cP6BU46DsqvrIcsIL odfx8CTkJ+3uaWFCwkCSlRO7HM//q230j/L4mCofpQCic5OKAxWHCU6n+IHk6i7i6T3B yl8mYUCxLtKOcPwG4efww+GDSHRn06wOuARfzY6GRNZnZw4LM/dHOIpKKSxYKMdwc6Dv EhOA2R85bKyUVT5cTLtPCjWBxQdxi6lk9KwSd6/xtei/k1Id/3NxU2BxIEwbW0ifRusw fpwQ== ARC-Authentication-Results: i=1; mx.google.com; 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 n2si9436093pga.426.2019.09.01.10.26.13; Sun, 01 Sep 2019 10:26:28 -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; 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 S1729074AbfIARZB (ORCPT + 99 others); Sun, 1 Sep 2019 13:25:01 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:39401 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728570AbfIARZA (ORCPT ); Sun, 1 Sep 2019 13:25:00 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id B003281716; Sun, 1 Sep 2019 19:24:44 +0200 (CEST) Date: Sun, 1 Sep 2019 19:24:57 +0200 From: Pavel Machek To: Hans Verkuil Cc: Jacopo Mondi , Laurent Pinchart , 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: <20190901172457.GC1047@bug> References: <20190814202815.32491-1-jacopo@jmondi.org> <20190814202815.32491-3-jacopo@jmondi.org> <20190814224340.GD5015@pendragon.ideasonboard.com> <664fe7b3-9051-30da-736e-710a4e9cecde@xs4all.nl> <20190815143423.vaoswb4jvzd2blxp@uno.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > >>>>> @@ -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)`` > >>>> > >>>> Maybe V4L2_CID_CAMERA_SENSOR_LOCATION ? Same for the values below. > >>> > >>> Probably a better name, if a bit long. But we might need other location > >>> controls in the future (e.g. flash location), so CID_LOCATION is just too > >>> generic. > >> > > > > Thanks for the feedback. > > > >> Note that the location defines themselves can most likely be used with any > >> LOCATION control, so V4L2_LOCATION_FRONT would be fine with any control. > >> > > > > What do you think instead of the control type? Would a single integer > > control do or an integer menu one would be better? I see merit in both > > proposals actually... > > Single integer. It's read-only, so it just reports the location. > > It would be different if this was a writable control: then you need to > know which locations are possible to set, and that requires a menu type. > > But it doesn't make sense to set the location from software. However, the > location might change as a result of other changes: e.g. if the camera > has motor control of the tilt and the tilt changes from forward facing to > downward facing, then the driver might change the location from FRONT > to DOWN. A convoluted example perhaps, but this is just brainstorming. There are phones with exactly such camera setup. And yes, it makes sense to be writable in that case, as software can move the camera in such case. Pavel