[{"id":1740,"web_url":"https://patchwork.libcamera.org/comment/1740/","msgid":"<20190603113102.GE4933@pendragon.ideasonboard.com>","date":"2019-06-03T11:31:02","subject":"Re: [libcamera-devel] [PATCH 1/6] libcamera: camera_sensor: Add\n\tdev() operation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Sun, Jun 02, 2019 at 03:04:30PM +0200, Jacopo Mondi wrote:\n> Add dev() operation to the CameraSensor class to access the\n> V4L2Subdevice backing the camera sensor.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/camera_sensor.cpp       | 6 ++++++\n>  src/libcamera/include/camera_sensor.h | 1 +\n>  2 files changed, 7 insertions(+)\n> \n> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> index 2b9d8fa593c1..8cbef8bccbef 100644\n> --- a/src/libcamera/camera_sensor.cpp\n> +++ b/src/libcamera/camera_sensor.cpp\n> @@ -130,6 +130,12 @@ int CameraSensor::init()\n>   * \\return The sensor media entity\n>   */\n>  \n> +/**\n> + * \\fn CameraSensor::dev()\n\nShouldn't this be called device() ? What if the camera sensor is exposed\nthrough multiple subdevs ?\n\n> + * \\brief Retrieve the sensor V4L2 subdevice\n> + * \\return The sensor V4L2 subdevice\n> + */\n> +\n>  /**\n>   * \\fn CameraSensor::mbusCodes()\n>   * \\brief Retrieve the media bus codes supported by the camera sensor\n> diff --git a/src/libcamera/include/camera_sensor.h b/src/libcamera/include/camera_sensor.h\n> index b823480241a7..6cdf833a27bf 100644\n> --- a/src/libcamera/include/camera_sensor.h\n> +++ b/src/libcamera/include/camera_sensor.h\n> @@ -33,6 +33,7 @@ public:\n>  \tint init();\n>  \n>  \tconst MediaEntity *entity() const { return entity_; }\n> +\tV4L2Subdevice *dev() const { return subdev_; }\n>  \tconst std::vector<unsigned int> &mbusCodes() const { return mbusCodes_; }\n>  \tconst std::vector<Size> &sizes() const { return sizes_; }\n>  \tconst Size &resolution() const;","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CAD6060BD7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Jun 2019 13:31:15 +0200 (CEST)","from pendragon.ideasonboard.com (unknown\n\t[IPv6:2a02:2788:668:163:5bb7:9f6c:564c:d55e])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5BD14530;\n\tMon,  3 Jun 2019 13:31:15 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1559561475;\n\tbh=x18WZvTWxsplJNRPG984fswo62aRE8ySV9cZSq4JFU4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=vwDAM2MJlLPcdh8PgA5Ea7FBLV3ED0a01BrBlKGS+lANokF2zcSX/P6dap8oami9H\n\tE8I2WteSOO0FGRqaHjDydSR+l3RpxyPVsK1H54qVz/8imgSuHR4O9ITc54Aa14UVw6\n\tPJX2r54GFAspzPwjfTWAi/dS5Pz4RRrBJ3RXZZRw=","Date":"Mon, 3 Jun 2019 14:31:02 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190603113102.GE4933@pendragon.ideasonboard.com>","References":"<20190602130435.18780-1-jacopo@jmondi.org>\n\t<20190602130435.18780-2-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190602130435.18780-2-jacopo@jmondi.org>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 1/6] libcamera: camera_sensor: Add\n\tdev() operation","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 03 Jun 2019 11:31:16 -0000"}},{"id":1798,"web_url":"https://patchwork.libcamera.org/comment/1798/","msgid":"<bf9fe78f-05cd-1c22-188d-7cee87aa127f@ideasonboard.com>","date":"2019-06-09T00:05:13","subject":"Re: [libcamera-devel] [PATCH 1/6] libcamera: camera_sensor: Add\n\tdev() operation","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 03/06/2019 12:31, Laurent Pinchart wrote:\n> Hi Jacopo,\n> \n> Thank you for the patch.\n> \n> On Sun, Jun 02, 2019 at 03:04:30PM +0200, Jacopo Mondi wrote:\n>> Add dev() operation to the CameraSensor class to access the\n>> V4L2Subdevice backing the camera sensor.\n>>\n>> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n>> ---\n>>  src/libcamera/camera_sensor.cpp       | 6 ++++++\n>>  src/libcamera/include/camera_sensor.h | 1 +\n>>  2 files changed, 7 insertions(+)\n>>\n>> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n>> index 2b9d8fa593c1..8cbef8bccbef 100644\n>> --- a/src/libcamera/camera_sensor.cpp\n>> +++ b/src/libcamera/camera_sensor.cpp\n>> @@ -130,6 +130,12 @@ int CameraSensor::init()\n>>   * \\return The sensor media entity\n>>   */\n>>  \n>> +/**\n>> + * \\fn CameraSensor::dev()\n> \n> Shouldn't this be called device() ?\n\nOr perhaps even ::subdev() as that is the field which is returned.\n\n> What if the camera sensor is exposed\n> through multiple subdevs ?\n\nCameraSensor only supports a single subdev currently ... so I guess that\nwould then be considered if CameraSensor were to ever be extended?\n\nCan you imagine a CameraSensor exposing more than one subdev in the near\nfuture?\n\n(In the context of needing to set controls on each subdev specifically?)\n\nWe might have separate subdevs for handling say, flash-light controls,\nbut I think perhaps we would handle that in a separate class?\n\n\n>> + * \\brief Retrieve the sensor V4L2 subdevice\n>> + * \\return The sensor V4L2 subdevice\n>> + */\n>> +\n>>  /**\n>>   * \\fn CameraSensor::mbusCodes()\n>>   * \\brief Retrieve the media bus codes supported by the camera sensor\n>> diff --git a/src/libcamera/include/camera_sensor.h b/src/libcamera/include/camera_sensor.h\n>> index b823480241a7..6cdf833a27bf 100644\n>> --- a/src/libcamera/include/camera_sensor.h\n>> +++ b/src/libcamera/include/camera_sensor.h\n>> @@ -33,6 +33,7 @@ public:\n>>  \tint init();\n>>  \n>>  \tconst MediaEntity *entity() const { return entity_; }\n>> +\tV4L2Subdevice *dev() const { return subdev_; }\n>>  \tconst std::vector<unsigned int> &mbusCodes() const { return mbusCodes_; }\n>>  \tconst std::vector<Size> &sizes() const { return sizes_; }\n>>  \tconst Size &resolution() const;\n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0644A6C94F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  9 Jun 2019 02:05:16 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 50D2D5D;\n\tSun,  9 Jun 2019 02:05:15 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1560038715;\n\tbh=ftjsvHDI7oC6w8GeG2wHT7X/jT22I/760Pv9CCpEZaM=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=u1jSDnONQ5+tOxt/VofkAvU+3PHBAJlPPli/Ssb0JKKn8fGQxqILE+iz/I1pY8qW4\n\tybNwW2xWm1DPtXk9zBMmQqR3GkLlqTUiRou9g6HGCT98DHw3nRxMo+ItcCGrd1M9h0\n\tO//Qowm+h3oCO6SVFl5liHWjPjXT+mGH40ZFxkTE=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tJacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20190602130435.18780-1-jacopo@jmondi.org>\n\t<20190602130435.18780-2-jacopo@jmondi.org>\n\t<20190603113102.GE4933@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+T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ar6g5m4xGqa+Xfzi9tRkwC29KMCoQOag1BhHChgqYaUH3yo\n\tUzaPwT/fY75iVI+yD0ih/e6j8qYvP8pvGwMQfrmN9YB0zB39YzCSdaUaNrWGD3iCBxg6lwSO\n\tLKeRhxxfiXCIYEf3vwOsP3YMx2JkD5doseXmWBGW1U0T/oJF+DVfKB6mv5UfsTzpVhJRgee7\n\t4jkjqFq4qsUGxcvF2xtRkfHFpZDbRgRlVmiWkqDkT4qMA+4q1y/dWwshSKi/uwVZNycuLsz+\n\t+OD8xPNCsMTqeUkAKfbD8xW4LCay3r/dD2ckoxRxtMD9eOAyu5wYzo/ydIPTh1QEj9SYyvp8\n\tO0g6CpxEwyHUQtF5oh15O018z3ZLztFJKR3RD42VKVsrnNDKnoY0f4U0z7eJv2NeF8xHMuiU\n\tRCIzqxX1GVYaNkKTnb/Qja8hnYnkUzY1Lc+OtwiGmXTwYsPZjjAaDX35J/RSKAoy5wGo/YFA\n\tJxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<bf9fe78f-05cd-1c22-188d-7cee87aa127f@ideasonboard.com>","Date":"Sun, 9 Jun 2019 01:05:13 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.7.0","MIME-Version":"1.0","In-Reply-To":"<20190603113102.GE4933@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 1/6] libcamera: camera_sensor: Add\n\tdev() operation","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sun, 09 Jun 2019 00:05:16 -0000"}},{"id":1801,"web_url":"https://patchwork.libcamera.org/comment/1801/","msgid":"<20190609102117.GC4778@pendragon.ideasonboard.com>","date":"2019-06-09T10:21:17","subject":"Re: [libcamera-devel] [PATCH 1/6] libcamera: camera_sensor: Add\n\tdev() operation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Sun, Jun 09, 2019 at 01:05:13AM +0100, Kieran Bingham wrote:\n> On 03/06/2019 12:31, Laurent Pinchart wrote:\n> > On Sun, Jun 02, 2019 at 03:04:30PM +0200, Jacopo Mondi wrote:\n> >> Add dev() operation to the CameraSensor class to access the\n> >> V4L2Subdevice backing the camera sensor.\n> >>\n> >> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> >> ---\n> >>  src/libcamera/camera_sensor.cpp       | 6 ++++++\n> >>  src/libcamera/include/camera_sensor.h | 1 +\n> >>  2 files changed, 7 insertions(+)\n> >>\n> >> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> >> index 2b9d8fa593c1..8cbef8bccbef 100644\n> >> --- a/src/libcamera/camera_sensor.cpp\n> >> +++ b/src/libcamera/camera_sensor.cpp\n> >> @@ -130,6 +130,12 @@ int CameraSensor::init()\n> >>   * \\return The sensor media entity\n> >>   */\n> >>  \n> >> +/**\n> >> + * \\fn CameraSensor::dev()\n> > \n> > Shouldn't this be called device() ?\n> \n> Or perhaps even ::subdev() as that is the field which is returned.\n> \n> > What if the camera sensor is exposed\n> > through multiple subdevs ?\n> \n> CameraSensor only supports a single subdev currently ... so I guess that\n> would then be considered if CameraSensor were to ever be extended?\n> \n> Can you imagine a CameraSensor exposing more than one subdev in the near\n> future?\n\nThe smiapp driver exposes sensors through multiple subdevs, so that's\ncertainly something we'll need to support at some point.\n\n> (In the context of needing to set controls on each subdev specifically?)\n\nI'm thinking it could be a good idea to abstract sensor controls in the\nCameraSensor class, and avoiding accessing the subdevs directly.\n\n> We might have separate subdevs for handling say, flash-light controls,\n> but I think perhaps we would handle that in a separate class?\n\nYes, that would be handled separately.\n\n> >> + * \\brief Retrieve the sensor V4L2 subdevice\n> >> + * \\return The sensor V4L2 subdevice\n> >> + */\n> >> +\n> >>  /**\n> >>   * \\fn CameraSensor::mbusCodes()\n> >>   * \\brief Retrieve the media bus codes supported by the camera sensor\n> >> diff --git a/src/libcamera/include/camera_sensor.h b/src/libcamera/include/camera_sensor.h\n> >> index b823480241a7..6cdf833a27bf 100644\n> >> --- a/src/libcamera/include/camera_sensor.h\n> >> +++ b/src/libcamera/include/camera_sensor.h\n> >> @@ -33,6 +33,7 @@ public:\n> >>  \tint init();\n> >>  \n> >>  \tconst MediaEntity *entity() const { return entity_; }\n> >> +\tV4L2Subdevice *dev() const { return subdev_; }\n> >>  \tconst std::vector<unsigned int> &mbusCodes() const { return mbusCodes_; }\n> >>  \tconst std::vector<Size> &sizes() const { return sizes_; }\n> >>  \tconst Size &resolution() const;","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 412EB69F14\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  9 Jun 2019 12:21:32 +0200 (CEST)","from pendragon.ideasonboard.com (unknown\n\t[IPv6:2a02:a03f:44f0:8500:ca05:8177:199c:fed4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id ADB275D;\n\tSun,  9 Jun 2019 12:21:31 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1560075691;\n\tbh=y5tP5aFQ2u0n3hb2HyHtjWh0ZvFMI6soZ7ZslL/H9cQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=WERItHp+7egjQr8yL+CIuCCDlj79Lde2aAjNQKipEmMFJGIMkiOnbJgooIMwSjQSz\n\tOPAkbKdF199RtYxM8nZsq/h0JUYSZSDH5Uk3nGfnehugE9ztaVRMdOsOnBSk8F/1NG\n\tZY9ovCIA3XwQM3AskrdyYUFzLUuniFaH6PEBfauY=","Date":"Sun, 9 Jun 2019 13:21:17 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo@jmondi.org>, libcamera-devel@lists.libcamera.org","Message-ID":"<20190609102117.GC4778@pendragon.ideasonboard.com>","References":"<20190602130435.18780-1-jacopo@jmondi.org>\n\t<20190602130435.18780-2-jacopo@jmondi.org>\n\t<20190603113102.GE4933@pendragon.ideasonboard.com>\n\t<bf9fe78f-05cd-1c22-188d-7cee87aa127f@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<bf9fe78f-05cd-1c22-188d-7cee87aa127f@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 1/6] libcamera: camera_sensor: Add\n\tdev() operation","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sun, 09 Jun 2019 10:21:32 -0000"}},{"id":1810,"web_url":"https://patchwork.libcamera.org/comment/1810/","msgid":"<20190610065944.ncnhbsit4vuf7qpn@uno.localdomain>","date":"2019-06-10T06:59:44","subject":"Re: [libcamera-devel] [PATCH 1/6] libcamera: camera_sensor: Add\n\tdev() operation","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Sun, Jun 09, 2019 at 01:21:17PM +0300, Laurent Pinchart wrote:\n> Hi Kieran,\n>\n> On Sun, Jun 09, 2019 at 01:05:13AM +0100, Kieran Bingham wrote:\n> > On 03/06/2019 12:31, Laurent Pinchart wrote:\n> > > On Sun, Jun 02, 2019 at 03:04:30PM +0200, Jacopo Mondi wrote:\n> > >> Add dev() operation to the CameraSensor class to access the\n> > >> V4L2Subdevice backing the camera sensor.\n> > >>\n> > >> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > >> ---\n> > >>  src/libcamera/camera_sensor.cpp       | 6 ++++++\n> > >>  src/libcamera/include/camera_sensor.h | 1 +\n> > >>  2 files changed, 7 insertions(+)\n> > >>\n> > >> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> > >> index 2b9d8fa593c1..8cbef8bccbef 100644\n> > >> --- a/src/libcamera/camera_sensor.cpp\n> > >> +++ b/src/libcamera/camera_sensor.cpp\n> > >> @@ -130,6 +130,12 @@ int CameraSensor::init()\n> > >>   * \\return The sensor media entity\n> > >>   */\n> > >>\n> > >> +/**\n> > >> + * \\fn CameraSensor::dev()\n> > >\n> > > Shouldn't this be called device() ?\n> >\n> > Or perhaps even ::subdev() as that is the field which is returned.\n> >\n> > > What if the camera sensor is exposed\n> > > through multiple subdevs ?\n> >\n> > CameraSensor only supports a single subdev currently ... so I guess that\n> > would then be considered if CameraSensor were to ever be extended?\n> >\n> > Can you imagine a CameraSensor exposing more than one subdev in the near\n> > future?\n>\n> The smiapp driver exposes sensors through multiple subdevs, so that's\n> certainly something we'll need to support at some point.\n>\n\nOh, I see.\n\n> > (In the context of needing to set controls on each subdev specifically?)\n>\n> I'm thinking it could be a good idea to abstract sensor controls in the\n> CameraSensor class, and avoiding accessing the subdevs directly.\n>\n\nConsidering it is likely CameraSensor will be subclassed by pipeline\nhandlers that need to do so so, providing a set/getControl that can be\nspecialized and applied on as many subdevices as necessary for the\nsensor might be a good idea. I think I need to have it in this series\nif we are to drop the here introduced \"dev()\" method.\n\n> > We might have separate subdevs for handling say, flash-light controls,\n> > but I think perhaps we would handle that in a separate class?\n>\n> Yes, that would be handled separately.\n>\n\nSeparate class or sensor-specific sub-class ?\n\n> > >> + * \\brief Retrieve the sensor V4L2 subdevice\n> > >> + * \\return The sensor V4L2 subdevice\n> > >> + */\n> > >> +\n> > >>  /**\n> > >>   * \\fn CameraSensor::mbusCodes()\n> > >>   * \\brief Retrieve the media bus codes supported by the camera sensor\n> > >> diff --git a/src/libcamera/include/camera_sensor.h b/src/libcamera/include/camera_sensor.h\n> > >> index b823480241a7..6cdf833a27bf 100644\n> > >> --- a/src/libcamera/include/camera_sensor.h\n> > >> +++ b/src/libcamera/include/camera_sensor.h\n> > >> @@ -33,6 +33,7 @@ public:\n> > >>  \tint init();\n> > >>\n> > >>  \tconst MediaEntity *entity() const { return entity_; }\n> > >> +\tV4L2Subdevice *dev() const { return subdev_; }\n> > >>  \tconst std::vector<unsigned int> &mbusCodes() const { return mbusCodes_; }\n> > >>  \tconst std::vector<Size> &sizes() const { return sizes_; }\n> > >>  \tconst Size &resolution() const;\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 52DFA6376D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Jun 2019 08:58:31 +0200 (CEST)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id AB338200012;\n\tMon, 10 Jun 2019 06:58:30 +0000 (UTC)"],"Date":"Mon, 10 Jun 2019 08:59:44 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20190610065944.ncnhbsit4vuf7qpn@uno.localdomain>","References":"<20190602130435.18780-1-jacopo@jmondi.org>\n\t<20190602130435.18780-2-jacopo@jmondi.org>\n\t<20190603113102.GE4933@pendragon.ideasonboard.com>\n\t<bf9fe78f-05cd-1c22-188d-7cee87aa127f@ideasonboard.com>\n\t<20190609102117.GC4778@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"z4fcsqaldavllzg2\"","Content-Disposition":"inline","In-Reply-To":"<20190609102117.GC4778@pendragon.ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH 1/6] libcamera: camera_sensor: Add\n\tdev() operation","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 10 Jun 2019 06:58:31 -0000"}},{"id":1817,"web_url":"https://patchwork.libcamera.org/comment/1817/","msgid":"<20190610072457.GI4806@pendragon.ideasonboard.com>","date":"2019-06-10T07:24:57","subject":"Re: [libcamera-devel] [PATCH 1/6] libcamera: camera_sensor: Add\n\tdev() operation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Mon, Jun 10, 2019 at 08:59:44AM +0200, Jacopo Mondi wrote:\n> On Sun, Jun 09, 2019 at 01:21:17PM +0300, Laurent Pinchart wrote:\n> > On Sun, Jun 09, 2019 at 01:05:13AM +0100, Kieran Bingham wrote:\n> >> On 03/06/2019 12:31, Laurent Pinchart wrote:\n> >>> On Sun, Jun 02, 2019 at 03:04:30PM +0200, Jacopo Mondi wrote:\n> >>>> Add dev() operation to the CameraSensor class to access the\n> >>>> V4L2Subdevice backing the camera sensor.\n> >>>>\n> >>>> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> >>>> ---\n> >>>>  src/libcamera/camera_sensor.cpp       | 6 ++++++\n> >>>>  src/libcamera/include/camera_sensor.h | 1 +\n> >>>>  2 files changed, 7 insertions(+)\n> >>>>\n> >>>> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> >>>> index 2b9d8fa593c1..8cbef8bccbef 100644\n> >>>> --- a/src/libcamera/camera_sensor.cpp\n> >>>> +++ b/src/libcamera/camera_sensor.cpp\n> >>>> @@ -130,6 +130,12 @@ int CameraSensor::init()\n> >>>>   * \\return The sensor media entity\n> >>>>   */\n> >>>>\n> >>>> +/**\n> >>>> + * \\fn CameraSensor::dev()\n> >>>\n> >>> Shouldn't this be called device() ?\n> >>\n> >> Or perhaps even ::subdev() as that is the field which is returned.\n> >>\n> >>> What if the camera sensor is exposed\n> >>> through multiple subdevs ?\n> >>\n> >> CameraSensor only supports a single subdev currently ... so I guess that\n> >> would then be considered if CameraSensor were to ever be extended?\n> >>\n> >> Can you imagine a CameraSensor exposing more than one subdev in the near\n> >> future?\n> >\n> > The smiapp driver exposes sensors through multiple subdevs, so that's\n> > certainly something we'll need to support at some point.\n> >\n> \n> Oh, I see.\n> \n> >> (In the context of needing to set controls on each subdev specifically?)\n> >\n> > I'm thinking it could be a good idea to abstract sensor controls in the\n> > CameraSensor class, and avoiding accessing the subdevs directly.\n> >\n> \n> Considering it is likely CameraSensor will be subclassed by pipeline\n> handlers that need to do so so,\n\nI don't think so, I expect it to be subclassed by implemetations\nspecific to sensor devices. Pipeline handlers should not subclass\nCameraSensor.\n\n> providing a set/getControl that can be\n> specialized and applied on as many subdevices as necessary for the\n> sensor might be a good idea. I think I need to have it in this series\n> if we are to drop the here introduced \"dev()\" method.\n\nIf it's not too difficult to add in this series I think it would be a\ngood idea. Note that in that case CameraSensor should expose libcamera\ncontrols (and possibly even sensor controls that are not exposed to\napplications), not V4L2 controls.\n\n> >> We might have separate subdevs for handling say, flash-light controls,\n> >> but I think perhaps we would handle that in a separate class?\n> >\n> > Yes, that would be handled separately.\n> \n> Separate class or sensor-specific sub-class ?\n\nI think separate classes, possibly with cross-pointers between them.\n\n> >>>> + * \\brief Retrieve the sensor V4L2 subdevice\n> >>>> + * \\return The sensor V4L2 subdevice\n> >>>> + */\n> >>>> +\n> >>>>  /**\n> >>>>   * \\fn CameraSensor::mbusCodes()\n> >>>>   * \\brief Retrieve the media bus codes supported by the camera sensor\n> >>>> diff --git a/src/libcamera/include/camera_sensor.h b/src/libcamera/include/camera_sensor.h\n> >>>> index b823480241a7..6cdf833a27bf 100644\n> >>>> --- a/src/libcamera/include/camera_sensor.h\n> >>>> +++ b/src/libcamera/include/camera_sensor.h\n> >>>> @@ -33,6 +33,7 @@ public:\n> >>>>  \tint init();\n> >>>>\n> >>>>  \tconst MediaEntity *entity() const { return entity_; }\n> >>>> +\tV4L2Subdevice *dev() const { return subdev_; }\n> >>>>  \tconst std::vector<unsigned int> &mbusCodes() const { return mbusCodes_; }\n> >>>>  \tconst std::vector<Size> &sizes() const { return sizes_; }\n> >>>>  \tconst Size &resolution() const;","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EDFF36376F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Jun 2019 09:25:20 +0200 (CEST)","from pendragon.ideasonboard.com (85-76-134-17-nat.elisa-mobile.fi\n\t[85.76.134.17])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3C4FD569;\n\tMon, 10 Jun 2019 09:25:18 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1560151520;\n\tbh=QL/zN8QKHLqTOe5aVmZLGOg9/tQDjPgv3xX69ldlsoM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=bV77630b5Zfq9HMr97aYQ3+X+4+3qaDtuRujDUld+4YViOtwIhfHe1jFh2xJfOyrn\n\tlOoIR0UE79Q7ds/q09PXfDjUU5c1tazta7HdZZy+7Gq6OIK+7+6G3rvPfI6+e3DYjJ\n\tspRbE3xK7ODxhzsfB0VNrTdZ46cryNJfWjtcd/XA=","Date":"Mon, 10 Jun 2019 10:24:57 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20190610072457.GI4806@pendragon.ideasonboard.com>","References":"<20190602130435.18780-1-jacopo@jmondi.org>\n\t<20190602130435.18780-2-jacopo@jmondi.org>\n\t<20190603113102.GE4933@pendragon.ideasonboard.com>\n\t<bf9fe78f-05cd-1c22-188d-7cee87aa127f@ideasonboard.com>\n\t<20190609102117.GC4778@pendragon.ideasonboard.com>\n\t<20190610065944.ncnhbsit4vuf7qpn@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190610065944.ncnhbsit4vuf7qpn@uno.localdomain>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 1/6] libcamera: camera_sensor: Add\n\tdev() operation","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 10 Jun 2019 07:25:21 -0000"}}]