Skip to content

hi846 selfie cam: improvements

this implements register overwrite basically very similar to how @dorota.czaplejewicz does it for the big cam (thanks for saving me work!)

example script for overwriting a few registers (with only 1 reg/value entry as an example, you can add a whole list, "redo" what the driver does by default and change whatever you want):

#!/bin/bash
path="/sys/kernel/debug/hi846/"

echo 1 > "$path/clear"

# these register values are overwriting the default settings when
# starting to stream
#     REG                                VALUE
echo "0x0902" > "$path/address" && echo "0x4319" > "$path/add_value"
# you can put a reg/value table here

record 1 frame (after $skip preceding frames. the first one sometimes is black)

v4l2-ctl -d /dev/v4l/by-path/platform-30a90000.csi1_bridge-video-index0 --set-fmt-video=width=640,height=480,pixelformat=0
v4l2-ctl -d /dev/v4l/by-path/platform-30a90000.csi1_bridge-video-index0 --stream-mmap --stream-to=640.raw --stream-skip=$skip --stream-count=1

this is now only improvements I'm happy with to merge

Edited by Martin Kepplinger

Merge request reports