From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DE0FC3A5A4 for ; Sun, 1 Sep 2019 17:25:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5E34E22CE9 for ; Sun, 1 Sep 2019 17:25:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729061AbfIARZB (ORCPT ); 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-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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