summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libcamera/internal/delayed_controls.h4
-rw-r--r--src/libcamera/delayed_controls.cpp9
2 files changed, 8 insertions, 5 deletions
diff --git a/include/libcamera/internal/delayed_controls.h b/include/libcamera/internal/delayed_controls.h
index 564d9f2e..2a6a912b 100644
--- a/include/libcamera/internal/delayed_controls.h
+++ b/include/libcamera/internal/delayed_controls.h
@@ -43,8 +43,8 @@ private:
{
}
- Info(const ControlValue &v)
- : ControlValue(v), updated(true)
+ Info(const ControlValue &v, bool updated_ = true)
+ : ControlValue(v), updated(updated_)
{
}
diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp
index fb9e6c42..a2af4a29 100644
--- a/src/libcamera/delayed_controls.cpp
+++ b/src/libcamera/delayed_controls.cpp
@@ -111,7 +111,11 @@ void DelayedControls::reset()
values_.clear();
for (const auto &ctrl : controls) {
const ControlId *id = device_->controls().idmap().at(ctrl.first);
- values_[id][0] = Info(ctrl.second);
+ /*
+ * Do not mark this control value as updated, it does not need
+ * to be written to to device on startup.
+ */
+ values_[id][0] = Info(ctrl.second, false);
}
}
@@ -150,8 +154,7 @@ bool DelayedControls::push(const ControlList &controls)
Info &info = values_[id][queueCount_];
- info = control.second;
- info.updated = true;
+ info = Info(control.second);
LOG(DelayedControls, Debug)
<< "Queuing " << id->name()