Browse Source

Add workaround for OV5640 capture mode not being set on first start after reboot

opengl
Benjamin Schaaf 2 months ago
parent
commit
207aabf16a
  1. 2
      config/pine64,pinephone-1.0.ini
  2. 2
      config/pine64,pinephone-1.1.ini
  3. 2
      config/pine64,pinephone-1.2.ini
  4. 6
      src/io_pipeline.c

2
config/pine64,pinephone-1.0.ini

@ -11,7 +11,7 @@ capture-rate=10
capture-fmt=BGGR8
preview-width=1280
preview-height=720
preview-rate=60
preview-rate=30
preview-fmt=BGGR8
rotate=270
colormatrix=1.384,-0.3203,-0.0124,-0.2728,1.049,0.1556,-0.0506,0.2577,0.8050

2
config/pine64,pinephone-1.1.ini

@ -11,7 +11,7 @@ capture-rate=10
capture-fmt=BGGR8
preview-width=1280
preview-height=720
preview-rate=60
preview-rate=30
preview-fmt=BGGR8
rotate=270
colormatrix=1.384,-0.3203,-0.0124,-0.2728,1.049,0.1556,-0.0506,0.2577,0.8050

2
config/pine64,pinephone-1.2.ini

@ -11,7 +11,7 @@ capture-rate=10
capture-fmt=BGGR8
preview-width=1280
preview-height=720
preview-rate=60
preview-rate=30
preview-fmt=BGGR8
rotate=270
mirrored=false

6
src/io_pipeline.c

@ -185,6 +185,12 @@ setup_camera(MPDeviceList **device_list, const struct mp_camera_config *config)
info->camera = mp_camera_new(dev_info->video_fd, info->fd);
// Start with the capture format, this works around a bug with
// the ov5640 driver where it won't allow setting the preview
// format initially.
MPCameraMode mode = config->capture_mode;
mp_camera_set_mode(info->camera, &mode);
// Trigger continuous auto focus if the sensor supports it
if (mp_camera_query_control(info->camera, V4L2_CID_FOCUS_AUTO,
NULL)) {

Loading…
Cancel
Save