Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp270258ybe; Mon, 2 Sep 2019 01:02:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqybB78hADDTHYfzC2hAzxYXgi8FJEFr3xTUQXpKbj5k8eBSB8JT5ONNg+B+ZGwqzTJHE+e5 X-Received: by 2002:a17:90a:8911:: with SMTP id u17mr2436832pjn.128.1567411361593; Mon, 02 Sep 2019 01:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567411361; cv=none; d=google.com; s=arc-20160816; b=d8OQpTwOytSbpKD3Fue2MbVnIus4TwrFox9HjUhHzZdUcxV6lHRBS5SQ0ZGe+By3j3 tXCMs8sn1Dk6HvcifCr8jAbybDcfeGgLd36Zn8jFVaouBAtm1Fc3hiQ8GlPmHXIV2O8c QHBnAWsOnau6xumnkxVHu5WYSstf27os/AI0PoohzHWqsvUGv3gYi9fd+yQmZ0aN8Dlc xtcpbGhumo09HJQrKbE+YA/B0rhYM7d6R69w82MjypXUq6NWPwH0se19imUNsx9uo+Jo MASBj76XWQqjjMx8Oo0cHcLY5g71X3i2NHBW6jikw2Ol0+Fe7AD5ZV5NW9X+mXtnde2p 7b4A== 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=B+aEdjN5pX4RLUXjlEoSXjF43WQ9KPpR+dsGbt9PqIY=; b=ohxdBQxF3dqPdm7J7mO3UOFbPT7Nw24r/V0GRgaqjrV9g476H7B5izGrVt3hRg8Dfu lYB9ip/HPd9cKSutgEKyuGhwsQ9p4PyRVe69QU06l8TJSafn6qdUsNsPkxSuwqxLcRc3 COw/wajKGntdEhmAnQERk5ZMoUDCDanMlAbqlHxkcHtjDXXBsiU93kQQJNpKYuigTKLp ZGdBH73RBXsXrB1XUpI6fa33foGtA4KUjWLYh9NGHwBy8i65ERLpJAsjwn2zVk8udkcR cT79P84aAEGRvRMBIA2LhqUZMUQQcZdRYTOHbLhDIKqJyqZWtVT2cq8pluJSQ0Uwa0Sp k9SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=TVizoMOI; 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 e79si1195656pfh.68.2019.09.02.01.02.25; Mon, 02 Sep 2019 01:02:41 -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=TVizoMOI; 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 S1729979AbfIBIAK (ORCPT + 99 others); Mon, 2 Sep 2019 04:00:10 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:58266 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729535AbfIBIAK (ORCPT ); Mon, 2 Sep 2019 04:00:10 -0400 Received: from pendragon.ideasonboard.com (231.125-247-81.adsl-dyn.isp.belgacom.be [81.247.125.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C978A303; Mon, 2 Sep 2019 10:00:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1567411207; bh=U+9BdVklBawHPdtmd1jDm2xYgA2xb6dvC4qDJJQPuj4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TVizoMOIVAQ91Rw3rlYiZsHsYYnwHTkOuzT4MXo5mnFmEwlvJv6jVeWaSXVG6vxAD eoYN6fUEgo98vTplt75lwjnNW8l0uf3XatutwyxQVCNHYt7Yv95GMnPLUabENdQF8H OVuIGS3nheSDeXX7ioLBaeilkIxDAVH94aDirHoA= Date: Mon, 2 Sep 2019 11:00:02 +0300 From: Laurent Pinchart To: Pavel Machek Cc: Hans Verkuil , 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: <20190902080002.GC4777@pendragon.ideasonboard.com> 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: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190901172457.GC1047@bug> 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 Pavel, On Sun, Sep 01, 2019 at 07:24:57PM +0200, Pavel Machek wrote: > >>>>>> @@ -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. Out of curiosity, what phones are those ? -- Regards, Laurent Pinchart