Did libcamera 'rotation' parameter change? And how to focus on-the-fly?

Today, I did an ‘apt update’ and ‘apt upgrade’…and as in the past, this broke my Arducam 64mp Hawkeye camera functionality, at least partially. The first failure I noticed was the loss of focus control, which depends on /dev/v4l-subdev1 . That device was listed, but it wouldn’t function. The attempts to use focus controls would yield an error of “Invalid argument.” The fix for this was to completely reinstall all the libcamera components, using the latest instructions from Arducam, then rebooting.

However, the second problem still exists: Since the Raspberry Pi upgrade, my camera suddenly flipped the image upside-down. I was using a “libcamera-vid” command that has worked for months without issue, but all of a sudden now, the image is flipped. I can ‘fix’ this easily enough by changing the “–rotation” option on the command line from “0” to “180”. But my question is – Why did this OS update change the behavior of the “–rotation” option? It worries me that I may discover other libcamera parameters that have changed. I have this system configured to automatically stream on a weekly basis. I guess I just need to be careful when doing any OS updates in the future.

A second question is one I have asked before – nearly a year ago – but I haven’t seen any updates from Arducam about this yet. Is there a way to manually adjust focus and other parameters on-the-fly while libcamera-vid is running? With the older legacy “v4l2-ctl” drivers, you could change almost any parameter during a live stream, which was wonderful for tweaking the image. But with the newer libcamera drivers, you are VERY limited in making changes during a live stream. I thought libcamera was supposed to be a better method, but it seems very limited in features and capabilities so far. I can set parameters on the command line when libcamera-vid starts, but I can’t find a way to adjust them (hence adjust the picture quality, focus, brightness, etc.) unless I stop the stream, change the command-line values, and then restart the stream. Am I missing something?

My system is a Pi 4 with the latest Bullseye, running a Hawkeye 64mp camera.

@ldwellman

Yes, upgrading the system will also cause all device trees to be replaced, and some content may not be updated.

Which version of the kernel did you upgrade from? What is your current kernel version?
We may need to verify this question.

The new version can also use v4l2-ctl to control, but it needs to be specified, use -d /dev/v4l-subdev0 to control some information such as brightness, use -d /dev/v4l-subdev1 to control focus

Hi, Edward – thanks for replying.

Regarding the V4l2 controls, I do use subdev0 and subdev1 in some of my scripts, but I’m just saying there aren’t AS MANY options as I had before. Some of the controls no longer allow “on-the-fly” changes after ‘libcamera-vid’ starts running.

But regarding the change to the “–rotation” parameter, here’s the info below from my Pi. I’m not certain what my previous kernel was, but I generally keep this device updated, so I assume it was the previous version from the newest current version. Here’s some info on the device status NOW:

pi@pi4:~ $ cat /proc/version
Linux version 6.1.21-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023
pi@pi4:~ $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

@ldwellman

Generally speaking, this should not be the case. You can tell me which specific parameters cannot be controlled after the camera is turned on.

This is what the firmware does, and normally there shouldn’t be any changes. Are you upgrading from a very old version? We generally don’t change the firmware unless we fix some problems. The same is true for v4l2 control, which is written in the firmware and has not been changed for a long time.