[libcamera-devel] [PATCH 7/9] libcamera: pipeline: raspberrypi: Align camera name

Niklas Söderlund niklas.soderlund at ragnatech.se
Sat Jul 18 15:23:22 CEST 2020


The raspberrypi pipeline uses the sensor model as the camera name where
other pipelines who has a sensor uses the sensors entity name. Align the
raspberrypi pipeline to also use the entity name.

The sensor model is derived from the entity name but in case the sensor
is attached to an i2c bus the i2c information is dropped from the entity
name to create the model.

Before this change the camera name was

'imx219'

After this change the camera name is

'imx219 10-0010'

Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
 src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 487dc819daa1d0ec..bead2a6220e207f5 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -975,7 +975,7 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)
 	/* Create and register the camera. */
 	std::shared_ptr<Camera> camera = Camera::create(this,
 							data->sensor_->id(),
-							data->sensor_->model(),
+							data->sensor_->entity()->name(),
 							streams);
 	registerCamera(std::move(camera), std::move(data));
 
-- 
2.27.0



More information about the libcamera-devel mailing list