<div dir="ltr">Hi<div><br></div><div>I'm very pleased to see some other teams start to think about autofocus!</div><div><br></div><div>One thing we need to do is decide what the libcamera API for autofocus looks like, otherwise there is of course no way to drive it! I tried to start this discussion a little while ago (check for emails from me to this mailing list on Thursday 21 October), so I'd be delighted to get some feedback on this subject and hear other people's ideas.</div><div><br></div><div>Thanks!</div><div><br></div><div>David</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 28 Oct 2021 at 11:03, Han-Lin Chen <<a href="mailto:hanlinchen@chromium.org">hanlinchen@chromium.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">IPU3Event and IPU3Action use single ControlList for both libcamera and V4L2<br>
controls, and it's content could be either one based on the context.<br>
Extend IPU3Event and IPU3Action for sensor and lens V4L2 controls, and preserve<br>
the original one for only libcamera Controls to make the content of an event<br>
more specific.<br>
<br>
Signed-off-by: Han-Lin Chen <<a href="mailto:hanlinchen@chromium.com" target="_blank">hanlinchen@chromium.com</a>><br>
---<br>
include/libcamera/ipa/ipu3.mojom | 4 ++++<br>
src/ipa/ipu3/ipu3.cpp | 2 +-<br>
src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +-<br>
3 files changed, 6 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/include/libcamera/ipa/ipu3.mojom b/include/libcamera/ipa/ipu3.mojom<br>
index 2f254ed4..cc0d822f 100644<br>
--- a/include/libcamera/ipa/ipu3.mojom<br>
+++ b/include/libcamera/ipa/ipu3.mojom<br>
@@ -23,11 +23,15 @@ struct IPU3Event {<br>
int64 frameTimestamp;<br>
uint32 bufferId;<br>
libcamera.ControlList controls;<br>
+ libcamera.ControlList sensorControls;<br>
+ libcamera.ControlList lensControls;<br>
};<br>
<br>
struct IPU3Action {<br>
IPU3Operations op;<br>
libcamera.ControlList controls;<br>
+ libcamera.ControlList sensorControls;<br>
+ libcamera.ControlList lensControls;<br>
};<br>
<br>
struct IPAConfigInfo {<br>
diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp<br>
index 5c51607d..6775570e 100644<br>
--- a/src/ipa/ipu3/ipu3.cpp<br>
+++ b/src/ipa/ipu3/ipu3.cpp<br>
@@ -646,7 +646,7 @@ void IPAIPU3::setControls(unsigned int frame)<br>
ControlList ctrls(ctrls_);<br>
ctrls.set(V4L2_CID_EXPOSURE, static_cast<int32_t>(exposure_));<br>
ctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast<int32_t>(gain_));<br>
- op.controls = ctrls;<br>
+ op.sensorControls = ctrls;<br>
<br>
queueFrameAction.emit(frame, op);<br>
}<br>
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp<br>
index eb714aa6..8816efc5 100644<br>
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp<br>
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp<br>
@@ -1248,7 +1248,7 @@ void IPU3CameraData::queueFrameAction(unsigned int id,<br>
{<br>
switch (action.op) {<br>
case ipa::ipu3::ActionSetSensorControls: {<br>
- const ControlList &controls = action.controls;<br>
+ const ControlList &controls = action.sensorControls;<br>
delayedCtrls_->push(controls);<br>
break;<br>
}<br>
-- <br>
2.33.1.1089.g2158813163f-goog<br>
<br>
</blockquote></div>