Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Armbian build PR] - kernel: sunxi: bring back autofocus support for ov5640 camera

Featured Replies

Description

We had autofocus patches for ov5640 camera in allwinner current and edge kernel that were disabled due to patch application failure. This PR fixes the patch application failure and re-enables the same

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • [X] Checked that patches applies on 6.4 kernel
  • [X] Checked that patches applies on 6.4 kernel
  • [X] Tested that autofocus works with 6.1 kernel on NanoPi Duo2

The following procedure was used to test autofocus with 6.1 kernel

  1. Compiled and enabled device tree overlay for ov5640 camera taken from the forum post
  2. Took the ov5640_af_2.bin autofocus firmware and placed it in /lib/firmware directory with filename ov5640_af.bin
  3. Ran the following commands to start a camera stream
# v4l2-ctl --device /dev/video1 --set-fmt-video=width=640,height=480,pixelformat=YUYV
# media-ctl --device /dev/media1 --set-v4l2 '"ov5640 0-003c":0[fmt:YUYV8_2X8/640x480]'
# ffmpeg -i /dev/video1 -q 10 -pix_fmt yuv420p -video_size 640x480 -r 5 -listen 1 -f avi http://192.168.29.128:8080/stream&
# v4l2-ctl --device /dev/v4l-subdev0 -c auto_focus_start=1
  1. Verified that autofocus firmware loaded successfully from dmesg output
# dmesg | grep ov5640
[    8.022346] ov5640 0-003c: supply DOVDD not found, using dummy regulator
[    8.022698] ov5640 0-003c: supply AVDD not found, using dummy regulator
[    8.022928] ov5640 0-003c: supply DVDD not found, using dummy regulator
[ 2808.787047] ov5640 0-003c: firmware upload success
[ 2808.787609] ov5640 0-003c: fw started after 0 ms
  1. verified that camera lens moves to focus when moving the subject

Checklist:

  • [ ] My code follows the style guidelines of this project
  • [ ] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [X] My changes generate no new warnings
  • [ ] Any dependent changes have been merged and published in downstream modules

View the full article

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.