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

Message ID 20200718132324.867815-8-niklas.soderlund@ragnatech.se
State Superseded
Delegated to: Niklas Söderlund
Headers show
Series
  • libcamera: camera: Add camera ID
Related show

Commit Message

Niklas Söderlund July 18, 2020, 1:23 p.m. UTC
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@ragnatech.se>
---
 src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

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));