Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions config/linux/ipu8/libcamhal_configs.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"availableSensors": [
"ov13b10-wf-0",
"ov13b10-uf-2",
"ov08x40-uf-0",
"lt6911gxd-1-0",
"lt6911gxd-2-2",
"isx031-1-0",
Expand Down
14 changes: 13 additions & 1 deletion config/linux/ipu8/sensors/ov08x40-uf.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,26 @@
"name": "ov08x40 $I2CBUS", "pad": 0, "width": 3856, "height": 2176,
"format": "V4L2_MBUS_FMT_SGRBG10_1X10"
},
{
"name": "Intel CVS", "pad": 0, "width": 3856, "height": 2176,
"format": "V4L2_MBUS_FMT_SGRBG10_1X10"
},
{
"name": "Intel CVS", "pad": 1, "width": 3856, "height": 2176,
"format": "V4L2_MBUS_FMT_SGRBG10_1X10"
},
{
"name": "Intel IPU7 CSI2 $CSI_PORT", "pad": 0, "width": 3856, "height": 2176,
"format": "V4L2_MBUS_FMT_SGRBG10_1X10"
}
],
"link": [
{
"srcName": "ov08x40 $I2CBUS", "srcPad": 0, "sinkName": "Intel IPU7 CSI2 $CSI_PORT",
"srcName": "ov08x40 $I2CBUS", "srcPad": 0, "sinkName": "Intel CVS",
"sinkPad": 0, "enable": true
},
{
"srcName": "Intel CVS", "srcPad": 1, "sinkName": "Intel IPU7 CSI2 $CSI_PORT",
"sinkPad": 0, "enable": true
},
{
Expand Down
28 changes: 28 additions & 0 deletions src/v4l2/MediaControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ struct MediaEntity {
char devname[32];
};

static const string icvsName = "Intel CVS CSI";
MediaControl* MediaControl::sInstance = nullptr;
Mutex MediaControl::sLock;

Expand Down Expand Up @@ -983,6 +984,33 @@ int MediaControl::mediaCtlSetup(int cameraId, MediaCtlConf* mc, int width, int h
}
}

MediaEntity* icvs = getEntityByName(icvsName.c_str());
if (icvs) {
for (uint32_t i = 0; i < icvs->numLinks; ++i) {
if (icvs->links[i].sink->entity == icvs) {
MediaEntity* sensor = icvs->links[i].source->entity;
int sensor_entity_id = sensor->info.id;
LOG1("@%s, found %s -> %s", __func__, sensor->info.name, icvsName.c_str());
for (McLink& link : mc->links) {
if (link.srcEntity == sensor_entity_id) {
LOG1("@%s, skip %s, link %s -> %s", __func__, link.srcEntityName.c_str(),
icvsName.c_str(), link.sinkEntityName.c_str());
link.srcEntity = icvs->info.id;
link.srcEntityName = icvsName;
for (uint32_t j = 0; j < icvs->info.pads; ++j) {
if (icvs->pads[j].flags & MEDIA_PAD_FL_SOURCE) {
link.srcPad = j;
break;
}
}
break;
}
}
break;
}
}
}

/* Set link in format Configuration */
ret = setMediaMcLink(mc->links);
CheckAndLogError(ret != OK, ret, "set MediaCtlConf McLink failed: ret = %d", ret);
Expand Down