pipeline: ipu3: Support IPA tuning file

Pass the path name of the YAML IPA tuning file to the IPA module. The
file name is derived from the sensor name ("${sensor_name}.yaml"), with
a fallback to "uncalibrated.yaml".

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart
2022-08-02 03:18:32 +03:00
parent 1a6c7477fd
commit 56555b22c3
+10 -2
View File
@@ -1243,8 +1243,16 @@ int IPU3CameraData::loadIPA()
if (ret)
return ret;
ret = ipa_->init(IPASettings{ "", sensor->model() }, sensorInfo,
sensor->controls(), &ipaControls_);
/*
* The API tuning file is made from the sensor name. If the tuning file
* isn't found, fall back to the 'uncalibrated' file.
*/
std::string ipaTuningFile = ipa_->configurationFile(sensor->model() + ".yaml");
if (ipaTuningFile.empty())
ipaTuningFile = ipa_->configurationFile("uncalibrated.yaml");
ret = ipa_->init(IPASettings{ ipaTuningFile, sensor->model() },
sensorInfo, sensor->controls(), &ipaControls_);
if (ret) {
LOG(IPU3, Error) << "Failed to initialise the IPU3 IPA";
return ret;