Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp362727ybe; Mon, 2 Sep 2019 02:52:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0hOBNGlToHh9lMogAxIiOLQVSAXXf7vLxMofBsbuLXHId5IbQizczg8CkEbI3nCVOdq4r X-Received: by 2002:a62:e205:: with SMTP id a5mr33587503pfi.137.1567417964188; Mon, 02 Sep 2019 02:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567417964; cv=none; d=google.com; s=arc-20160816; b=bOTAoFR3KwIZ6Dw7pA5AzVACF/1OJ7KEHTxveWqdT1g8JwtYoPS7VzHadMJBIVBi8Q smww+h45crxZRgmeb796X/xRzCDDs03fR3VuUkAuc3SaQG8AYSA2Z2yBMkWJW3N1iM2L GAekYaeT4ZDp3lblIfr/f2R4eiA6DxuqKfb69DtoYA9cHl4MhXScj2GQb/ruOr1wu/ir lz3eHP6DDYkHc4uSDuJ7xugX02BIOU2YxGFI8BE+tstmNWooRTtQmxmc5tXw0StauNnK 6ETQz1HZP9mOO9o1c4DCbwV3k0fMuaGx7D5OrTGRvmnwHpvRp6zsS980y+VVRdSYT3Ow dL9g== 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=1qasp7VOMdJ9MQv0qS74lFgwHhwvb2b+4XGpmeisB8Q=; b=sbxrwLTLB6o5T5RLGk67kdAASDD5kI5jD0/wdkHHxCr8O3SLfng4pQLPE6EZ1QLCqc 2y2et83XypBdy3gzsHrqDqM6/ltmJ5jWMEOLw6MvtIDMx44pMWjTOVvZjQIzyUMvqMEJ 1Wzao6mnpKyQXUWhZKYffcJE0qpq0kV4N3Dk7uKXR6AzO8pIczclscxXCJ62WSUlEujf bA5RbQR0xGNggz8OIcmDW/s6pVG5FGM7iLNadxMgg/9fXW7rbfq6SMhhZHb8hlSUszZt JRxIhRL7qR9ep4BORE2NQGPsW2ki15FwpofOYrch7uNpyEncjOmAuZEMWn2lZio3kN+j 2QLg== 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 h17si403319pjq.101.2019.09.02.02.52.28; Mon, 02 Sep 2019 02:52:44 -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 S1731218AbfIBJjy (ORCPT + 99 others); Mon, 2 Sep 2019 05:39:54 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:45071 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729489AbfIBJjy (ORCPT ); Mon, 2 Sep 2019 05:39:54 -0400 X-Originating-IP: 2.224.242.101 Received: from uno.localdomain (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 99ED324000E; Mon, 2 Sep 2019 09:39:50 +0000 (UTC) Date: Mon, 2 Sep 2019 11:41:23 +0200 From: Jacopo Mondi To: Pavel Machek Cc: Hans Verkuil , 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: <20190902094123.wixtn5dm2dwd62bu@uno.localdomain> 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> <20190901172457.GC1047@bug> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zuavsfa6rq46r5dn" Content-Disposition: inline In-Reply-To: <20190901172457.GC1047@bug> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --zuavsfa6rq46r5dn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi Pavel, On Sun, Sep 01, 2019 at 07:24:57PM +0200, Pavel Machek wrote: > 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. Nice, I had no idea! Support for those kind of devices seems a bit far-fetched at the moment, and as Laurent suggested, I would make the control writable once we have a use case for that. But let's keep in mind that could happen sooner or later! Thanks j > > Pavel --zuavsfa6rq46r5dn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEtcQ9SICaIIqPWDjAcjQGjxahVjwFAl1s48MACgkQcjQGjxah VjySHxAAj0VW0JBKc19IKqZ8qF2HxYIjAq54yckaYChexDAFzMmmib9ABkgjvRHy 3rA+qxUp2J37b14bs+rksQCli9Aej6quziNeKB2pCayBFoFhFJIKEQjgRSkj2Pbq DABGGxWEAUg/NQzC0I/zbqch8yGE1KPy+Gw8OlgwwK7tqeffx5vVA3TC/ZE+7VhU w3qBW7SpaMNKDPgkUkTTrfy4wQpnsPMhgozSEJso93+Ryr5wrh+OjtUBdSAYRVoH xAw6Yq2lyNm1bl2R/G1QeOJ5yf8V+i5yYtlUWkSfnmrijWWaiEUD9JLxjd9VSSbA byMxrCI2mYVNzvYMNPiSnfwb0ECrdkme3Zs+jfTSnGWj8fKllogppWP1QEwWQsVw DmzJJbBnMivB8cygx4MUDBRDP0G4Op24V97x60m4wxJFShHcuKEDn2/e0Rj7QZH/ uNzu9ZvYXM8rN0fl5HP0uDXEqM2MmWu5khjHp7AP049t9NTyDrr9oyeK/WYQ8xO3 vUlG4yMr/8p9S6kniGmx5B9rpsBDlYxgmiamOBlhDALsEWM1cOzwP/qObxmrBz8K vhkgOFxiUodw4ny9tDB9VRPH3awT9ge1uD4AO3LdyYD22dHO/DzZ9VRz9RpG9s2i Bd+h47u7Jhk5WTz0KzXWvCykIYaKYu0fP+3zO1rwm+cj7JROg9g= =pHsq -----END PGP SIGNATURE----- --zuavsfa6rq46r5dn--