Message ID | 20200602013909.3170593-3-niklas.soderlund@ragnatech.se |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Hi Niklas, On Tue, Jun 02, 2020 at 03:39:01AM +0200, Niklas Söderlund wrote: > The id in the camera name is confusing and is of little use for users. > Camera names are not (yet) required to be unique and appending which > numerical CIO2 unit the sensor is attached to is just as good as > depending on the i2c bus information already present in the entity name. > > Before this change, > > $ cam -l > Available cameras: > 1: ov13858 2-0010 0 > 2: ov5670 4-0036 1 > > After this change, > > $ cam -l > Available cameras: > 1: ov13858 2-0010 > 2: ov5670 4-0036 As the i2c bus info been added later ? I recall we added the cio2 index to avoid name clashing, but I guess we're now safe. Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Thanks j > > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> > --- > src/libcamera/pipeline/ipu3/ipu3.cpp | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp > index b805fea71c2d812d..6df1e29281941ebf 100644 > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp > @@ -949,8 +949,7 @@ int PipelineHandlerIPU3::registerCameras() > &IPU3CameraData::imguOutputBufferReady); > > /* Create and register the Camera instance. */ > - std::string cameraName = cio2->sensor_->entity()->name() + " " > - + std::to_string(id); > + std::string cameraName = cio2->sensor_->entity()->name(); > std::shared_ptr<Camera> camera = Camera::create(this, > cameraName, > streams); > -- > 2.26.2 > > _______________________________________________ > libcamera-devel mailing list > libcamera-devel@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel
Hi Niklas, Thank you for the patch. On Tue, Jun 02, 2020 at 03:39:01AM +0200, Niklas Söderlund wrote: > The id in the camera name is confusing and is of little use for users. > Camera names are not (yet) required to be unique and appending which > numerical CIO2 unit the sensor is attached to is just as good as > depending on the i2c bus information already present in the entity name. > > Before this change, > > $ cam -l > Available cameras: > 1: ov13858 2-0010 0 > 2: ov5670 4-0036 1 > > After this change, > > $ cam -l > Available cameras: > 1: ov13858 2-0010 > 2: ov5670 4-0036 > > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Can't wait to fix the camera naming issue though :-) > --- > src/libcamera/pipeline/ipu3/ipu3.cpp | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp > index b805fea71c2d812d..6df1e29281941ebf 100644 > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp > @@ -949,8 +949,7 @@ int PipelineHandlerIPU3::registerCameras() > &IPU3CameraData::imguOutputBufferReady); > > /* Create and register the Camera instance. */ > - std::string cameraName = cio2->sensor_->entity()->name() + " " > - + std::to_string(id); > + std::string cameraName = cio2->sensor_->entity()->name(); > std::shared_ptr<Camera> camera = Camera::create(this, > cameraName, > streams);
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index b805fea71c2d812d..6df1e29281941ebf 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -949,8 +949,7 @@ int PipelineHandlerIPU3::registerCameras() &IPU3CameraData::imguOutputBufferReady); /* Create and register the Camera instance. */ - std::string cameraName = cio2->sensor_->entity()->name() + " " - + std::to_string(id); + std::string cameraName = cio2->sensor_->entity()->name(); std::shared_ptr<Camera> camera = Camera::create(this, cameraName, streams);
The id in the camera name is confusing and is of little use for users. Camera names are not (yet) required to be unique and appending which numerical CIO2 unit the sensor is attached to is just as good as depending on the i2c bus information already present in the entity name. Before this change, $ cam -l Available cameras: 1: ov13858 2-0010 0 2: ov5670 4-0036 1 After this change, $ cam -l Available cameras: 1: ov13858 2-0010 2: ov5670 4-0036 Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> --- src/libcamera/pipeline/ipu3/ipu3.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)