Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/v4l2/MediaControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1162,9 +1162,11 @@ int MediaControl::getI2CBusAddress(const string& sensorEntityName, const string&
}
}

// entityName example: "imx319 10-0010", sensorEntityName example: "imx319"
if (entityName && (strlen(entityName) > (sensorEntityNameLen + 1U))) {
*i2cBus = entityName + sensorEntityNameLen + 1;
// VIDEO_PIXEL_ARRAY is the sensor entity. Find it through the topology,
// matching this specific candidate's exact name instead of the shared
// name prefix, since multiple sensor instances (e.g. wf/uf) can share it.
if (checkHasSource(sinkEntity, std::string(entity.info.name))) {
*i2cBus = entity.info.name + sensorEntityPrefix.length();
LOG1("i2cBus is %s", i2cBus->c_str());
return OK;
}
Expand Down