camera: enable the FP6 ultra-wide pipeline (kernel config + patched libcamera)
All checks were successful
image / image (push) Successful in 1h51m52s

Kernel config: CONFIG_VIDEO_OV13B10=m + CONFIG_VIDEO_DW9714=m — the camss
core, CAMCC and CCI were already enabled; the sensor and VCM drivers were
the only missing pieces. The camera carries themselves land via
milos-linux combined-stable (merge of the 'camera' topic branch,
nondescriptpointer's 5 patches, authorship preserved).

libcamera: new temp/ aport overriding pmOS 99990.7.2-r1 with -r2, adding
nondescriptpointer's OV13B10 sensor helper (gain = code/128, enables the
software-ISP AGC/AWB) and sensor properties patches on top of the pmOS
0.7.2 APKBUILD. Patch sha512s re-recorded from the actual files (his
APKBUILD diff carried stale hashes); all four patches verified to apply
against the v0.7.2 tarball.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jorijn van der Graaf 2026-08-16 04:07:48 +02:00
commit 34cfc098d8
16 changed files with 578 additions and 2 deletions

View file

@ -0,0 +1,34 @@
From be67f67c4ac44b571d1740c1da10669fe6a5c75b Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
Date: Wed, 1 May 2024 18:12:02 +0200
Subject: [PATCH 1/2] libcamera: simple: Enable softISP for the Pinephone
In theory the PP should be able to use the actual HW ISP, however in
practice this does not work well yet - especially as the driver for the
front camera in Megi differs heavily from the upstream one.
Thus enable the swISP to make both cameras work reliably for now. This
is essentially what Megapixels does as well. If the HW ISP situation
improves, this can be dropped again.
Signed-off-by: Robert Mader <robert.mader@collabora.com>
---
src/libcamera/pipeline/simple/simple.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index e26f438d9..24538649c 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -264,7 +264,7 @@ static const SimplePipelineInfo supportedDevices[] = {
{ "mtk-seninf", { { "mtk-mdp", 3 } }, false },
{ "mxc-isi", {}, false },
{ "qcom-camss", {}, true },
- { "sun6i-csi", {}, false },
+ { "sun6i-csi", {}, true },
};
bool isRaw(const StreamConfiguration &cfg)
--
2.55.0

View file

@ -0,0 +1,34 @@
From dc471142932b1f2b0bf596c3ae83dba8bd4b4021 Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
Date: Mon, 6 May 2024 21:21:57 +0200
Subject: [PATCH 2/2] libcamera: simple: Skip hwISP formats if swISP is active
On devices like the Pinephone libcamera will advertise support for
formats provided by the HW ISP and the SW ISP at the same time. The
reason why we enable the SW ISP in the first place is, however, that the
HW ISP does not work reliable atm. Thus filter out formats from the HW
ISP when the SW ISP is enabled, to ensure we use the later.
Signed-off-by: Robert Mader <robert.mader@collabora.com>
---
src/libcamera/pipeline/simple/simple.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 24538649c..b96b8b529 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -745,9 +745,7 @@ void SimpleCameraData::tryPipeline(unsigned int code, const Size &size)
config.outputFormats = swIsp_->formats(pixelFormat);
config.outputSizes = swIsp_->sizes(pixelFormat, format.size);
if (config.outputFormats.empty()) {
- /* Do not use swIsp for unsupported pixelFormat's. */
- config.outputFormats = { pixelFormat };
- config.outputSizes = config.captureSize;
+ continue;
}
} else {
config.outputFormats = { pixelFormat };
--
2.55.0

View file

@ -0,0 +1,33 @@
From: nondescriptpointer <public@nondescriptpointer.com>
Date: Tue, 21 Jul 2026 00:00:00 +0000
Subject: [PATCH] libipa: Add camera sensor helper for OV13B10
The OV13B10 (ultra-wide sensor on the Fairphone 6 / milos) needs a
CameraSensorHelper so the software ISP AGC can map the analogue gain
register code to a real gain multiplier. Without it libcamera logs
"IPASoft: Failed to create camera sensor helper for ov13b10" and
auto-exposure/AWB do not converge. Like the other recent OmniVision
sensors the analogue gain is linear with 0x80 (128) == 1x.
---
src/ipa/libipa/camera_sensor_helper.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -827,6 +827,16 @@
};
REGISTER_CAMERA_SENSOR_HELPER("ov13858", CameraSensorHelperOv13858)
+class CameraSensorHelperOv13b10 : public CameraSensorHelper
+{
+public:
+ CameraSensorHelperOv13b10()
+ {
+ gain_ = AnalogueGainLinear{ 1, 0, 0, 128 };
+ }
+};
+REGISTER_CAMERA_SENSOR_HELPER("ov13b10", CameraSensorHelperOv13b10)
+
class CameraSensorHelperVd55g1 : public CameraSensorHelper
{
public:

View file

@ -0,0 +1,28 @@
From: nondescriptpointer <public@nondescriptpointer.com>
Date: Tue, 21 Jul 2026 00:00:00 +0000
Subject: [PATCH] libcamera: sensor: Add OV13B10 sensor properties
Adds the OV13B10 (Fairphone 6 ultra-wide) to the sensor properties
database: 1.12um unit cell and its test-pattern mode mapping. Removes
the "No static properties available for 'ov13b10'" warning.
---
src/libcamera/sensor/camera_sensor_properties.cpp | 7 +++++++
1 file changed, 7 insertions(+)
--- a/src/libcamera/sensor/camera_sensor_properties.cpp
+++ b/src/libcamera/sensor/camera_sensor_properties.cpp
@@ -503,6 +503,14 @@
},
.sensorDelays = { },
} },
+ { "ov13b10", {
+ .unitCellSize = { 1120, 1120 },
+ .testPatternModes = {
+ { controls::draft::TestPatternModeOff, 0 },
+ { controls::draft::TestPatternModeColorBars, 1 },
+ },
+ .sensorDelays = { },
+ } },
{ "vd55g1", {
.unitCellSize = { 2160, 2160 },
.testPatternModes = {

View file

@ -0,0 +1,191 @@
# Forked from Alpine for temporary downstream patches
maintainer="Robert Mader <robert.mader@collabora.com>"
pkgname=libcamera
_pkgver=0.7.2
pkgver=9999$_pkgver
pkgrel=2
pkgdesc="Linux camera framework"
url="https://libcamera.org/"
arch="all"
license="LGPL-2.1-or-later AND GPL-2.0-or-later"
# upstream calls 'date' with a non-POSIX option so we pull in coreutils
makedepends="
coreutils
doxygen
eudev-dev
glib-dev
gnutls-dev
graphviz
gst-plugins-base-dev
gtest-dev
libevent-dev
libpisp-dev
libunwind-dev
libyuv-dev
linux-headers
meson
py3-jinja2
py3-ply
py3-pybind11-dev
py3-sphinx
py3-sphinxcontrib-doxylink
py3-yaml
python3-dev
qt6-qtbase-dev
qt6-qttools-dev
yaml-dev
"
subpackages="
$pkgname-dbg
$pkgname-dev
qcam
$pkgname-gstreamer
$pkgname-v4l2
$pkgname-tools
py3-$pkgname-pyc:pyc
py3-$pkgname:py3
"
_tuning_files="
hi846.yaml
imx355.yaml
imx363.yaml
imx371.yaml
imx376.yaml
imx519.yaml
imx858.yaml
s5k3l6xx.yaml
s5kjn1.yaml
"
source="https://gitlab.freedesktop.org/camera/libcamera/-/archive/v$_pkgver/libcamera-v$_pkgver.tar.gz
0001-libcamera-simple-Enable-softISP-for-the-Pinephone.patch
0002-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch
0003-libipa-Add-OV13B10-camera-sensor-helper.patch
0004-libcamera-sensor-Add-OV13B10-sensor-properties.patch
qcam.desktop
$_tuning_files
"
builddir="$srcdir/$pkgname-v$_pkgver"
# gstreamer tests fail
# manual strip because ipa .sign files depend on the file contents- have to re-sign after strip
options="!strip !check"
case "$CARCH" in
arm*|aarch64)
subpackages="$subpackages $pkgname-raspberrypi"
;;
esac
case "$CARCH" in
ppc64le|s390x|riscv64|loongarch64)
# doesn't install any ipa
;;
*)
depends="$pkgname-ipa=$pkgver-r$pkgrel"
subpackages="$subpackages $pkgname-ipa"
;;
esac
build() {
abuild-meson \
-Dpipelines=auto,virtual \
-Dv4l2=true \
-Dwerror=false \
-Ddocumentation=disabled \
. output
meson compile -C output
}
check() {
meson test -C output --print-errorlogs
}
package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
install -Dm644 -t "$pkgdir"/usr/share/applications "$srcdir"/qcam.desktop
# manual strip first..
scanelf --recursive \
--nobanner \
--etype "ET_DYN,ET_EXEC" \
--format "%F" \
"$pkgdir" \
| while read -r file; do
strip "$file"
done
}
ipa() {
depends=""
amove usr/lib/libcamera
amove usr/share/libcamera/ipa
for _tuning_file in $_tuning_files; do
install -Dm644 -t "$subpkgdir"/usr/share/libcamera/ipa/simple \
"$srcdir"/"$_tuning_file"
done
# then sign ipa's
local ipa
for ipa in "$subpkgdir"/usr/lib/libcamera/ipa/ipa*.so; do
msg "signing $ipa"
"$builddir"/src/ipa/ipa-sign.sh \
"$(find "$builddir"/output -type f -iname "*ipa-priv-key.pem")" \
"$ipa" \
"$ipa".sign
done
}
qcam() {
depends=""
amove usr/bin/qcam
amove usr/share/applications/qcam.desktop
}
gstreamer() {
depends=""
amove usr/lib/gstreamer-1.0
}
v4l2() {
depends=""
amove usr/libexec/libcamera/v4l2-compat.so
}
raspberrypi() {
depends=""
amove usr/share/libcamera/ipa/rpi
amove usr/libexec/libcamera/raspberrypi_ipa_proxy
amove usr/share/libcamera/pipeline/rpi/vc4
}
tools() {
depends=""
amove usr/bin/cam
amove usr/bin/lc-compliance
}
py3() {
pkgdesc="$pkgname (python bindings)"
depends="python3"
amove usr/lib/python*
}
sha512sums="
b317cdc96f61682ee0bf26dfb7c4d6441db9a9c5b93ab53528121a8cd44862b3d59cbaa3881bb0837e3e381564c184c7b742124aef4267eea754c6083de353c1 libcamera-v0.7.2.tar.gz
eef5e38efc874f2049d17f08b04d9f21c3e4616f66873358cd2c446e651f78d6952ae25ee13a6ef917e3f85bc7b6a6991152e42c8efd8c7f5bff69829a518826 0001-libcamera-simple-Enable-softISP-for-the-Pinephone.patch
191dfa09cfd08bcdf0d0d07410d17af590cf78b8bc8f8b7587fd2dc1c645a9ca07f2926b5d98381c011319b1f4e1d6195dd0d6dba65fd8c723882e6be0d6117d 0002-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch
594e2c31bd51dac8f5f184b026301028431b1c67e48edb245790444713b64e927fac99cb8a33f0b7042c9689359079158b3f1d344b250904472c977f1313f83e 0003-libipa-Add-OV13B10-camera-sensor-helper.patch
89e0fc4a12aa4d5fbdc77b50e28b0a6d2cf8dfeb884b536507b6c24aa2ae5c616a32a517deb086e3284c72a82e6d6ddcf6eaa88f6c1c021adc6a0167194b7711 0004-libcamera-sensor-Add-OV13B10-sensor-properties.patch
22167a4eceb6d1b40b0b7c45fdf116c71684f5340de7f767535cb8e160ad9d2ae0f00cb3d461f73a344520a48a4641cf46226841d78bee06bfbfd2a91337f754 qcam.desktop
2ee566653b17d565d2c0de67cbe6ebad25df5aac6051cad78e6bae52016fa2ca0247e964d735ac776b3e0bd447ead9c4fcb26cd7629228cdba3ceb91b46f378f hi846.yaml
55dab9dcb9b1982143b9d63e4e51138c5bffd7c8f4a8e4e122750b3ad9d475446956bc297d9f564819ade4be75a575d06633a064e14f8ba3ef77986783c5f067 imx355.yaml
285c6d0d712df341c0117c3762ddc139f53f44e6be36c3388d1a62696429175e2916f392163131e21f410c3676f02f5d125f375171f45f8d82ad278aa5076c62 imx363.yaml
2ee566653b17d565d2c0de67cbe6ebad25df5aac6051cad78e6bae52016fa2ca0247e964d735ac776b3e0bd447ead9c4fcb26cd7629228cdba3ceb91b46f378f imx371.yaml
55dab9dcb9b1982143b9d63e4e51138c5bffd7c8f4a8e4e122750b3ad9d475446956bc297d9f564819ade4be75a575d06633a064e14f8ba3ef77986783c5f067 imx376.yaml
2ee566653b17d565d2c0de67cbe6ebad25df5aac6051cad78e6bae52016fa2ca0247e964d735ac776b3e0bd447ead9c4fcb26cd7629228cdba3ceb91b46f378f imx519.yaml
55dab9dcb9b1982143b9d63e4e51138c5bffd7c8f4a8e4e122750b3ad9d475446956bc297d9f564819ade4be75a575d06633a064e14f8ba3ef77986783c5f067 imx858.yaml
2ee566653b17d565d2c0de67cbe6ebad25df5aac6051cad78e6bae52016fa2ca0247e964d735ac776b3e0bd447ead9c4fcb26cd7629228cdba3ceb91b46f378f s5k3l6xx.yaml
d59020e62520ee622282c85ce7bcdfe453c99becf48cc1005c5f8a4bb8b2511b19c89f38fb3c994e7c6a79d1f84e2ed5f5a09b4c5bdc1dc4a44b071dbccf0d44 s5kjn1.yaml
"

View file

@ -0,0 +1,11 @@
# SPDX-License-Identifier: CC0-1.0
%YAML 1.1
---
version: 1
algorithms:
- BlackLevel:
blackLevel: 4096
- Awb:
- Adjust:
- Agc:
...

View file

@ -0,0 +1,42 @@
# SPDX-License-Identifier: CC0-1.0
%YAML 1.1
---
version: 1
algorithms:
- BlackLevel:
blackLevel: 4096
- Awb:
- Ccm:
# copied from s5kjn1.yaml
ccms:
- ct: 2676
ccm: [ 2.02152, -0.41859, -0.60292,
-0.59481, 2.21509, -0.62029,
-0.44029, -1.16865, 2.60894 ]
- ct: 2710
ccm: [ 2.01597, -0.46478, -0.55119,
-0.59047, 2.14717, -0.55671,
-0.40793, -1.19946, 2.60739 ]
- ct: 2719
ccm: [ 1.99894, -0.41626, -0.58268,
-0.59321, 2.18167, -0.58846,
-0.42518, -1.21384, 2.63903 ]
- ct: 2867
ccm: [ 1.95177, -0.35904, -0.59274,
-0.44282, 1.97362, -0.53079,
-0.49059, -1.35379, 2.84439 ]
- ct: 3474
ccm: [ 1.97712, -0.60854, -0.36858,
-0.47723, 1.91142, -0.43418,
-0.23092, -0.72246, 1.95339 ]
- ct: 3761
ccm: [ 2.29903, -0.94652, -0.35251,
-0.51661, 1.90311, -0.38651,
-0.25114, -0.67501, 1.92615 ]
- ct: 6890
ccm: [ 1.93867, -0.67486, -0.26381,
-0.43049, 2.00702, -0.57652,
-0.15696, -0.51345, 1.67041 ]
- Adjust:
- Agc:
...

View file

@ -0,0 +1,37 @@
# SPDX-License-Identifier: CC0-1.0
%YAML 1.1
---
version: 1
algorithms:
- BlackLevel:
blackLevel: 4096
- Awb:
- Ccm:
ccms:
- ct: 2701
ccm: [ 1.66951, -0.35271, -0.31679,
-0.33594, 1.69731, -0.36137,
0.07843, -1.25185, 2.17341 ]
- ct: 2789
ccm: [ 1.74401, -0.44379, -0.30022,
-0.33322, 1.69889, -0.36567,
0.09074, -1.27168, 2.18093 ]
- ct: 3025
ccm: [ 1.71956, -0.37493, -0.34462,
-0.46994, 1.83453, -0.36459,
0.01838, -1.03863, 2.02024 ]
- ct: 4021
ccm: [ 1.65286, -0.42348, -0.22938,
-0.34752, 1.63472, -0.28719,
-0.02119, -0.65164, 1.67283 ]
- ct: 4125
ccm: [ 1.89736, -0.65796, -0.23941,
-0.36603, 1.62015, -0.25412,
0.01202, -0.66114, 1.64912 ]
- ct: 6521
ccm: [ 1.64464, -0.50901, -0.13564,
-0.28189, 1.73169, -0.44979,
-0.02601, -0.51457, 1.54058 ]
- Adjust:
- Agc:
...

View file

@ -0,0 +1,11 @@
# SPDX-License-Identifier: CC0-1.0
%YAML 1.1
---
version: 1
algorithms:
- BlackLevel:
blackLevel: 4096
- Awb:
- Adjust:
- Agc:
...

View file

@ -0,0 +1,42 @@
# SPDX-License-Identifier: CC0-1.0
%YAML 1.1
---
version: 1
algorithms:
- BlackLevel:
blackLevel: 4096
- Awb:
- Ccm:
# copied from s5kjn1.yaml
ccms:
- ct: 2676
ccm: [ 2.02152, -0.41859, -0.60292,
-0.59481, 2.21509, -0.62029,
-0.44029, -1.16865, 2.60894 ]
- ct: 2710
ccm: [ 2.01597, -0.46478, -0.55119,
-0.59047, 2.14717, -0.55671,
-0.40793, -1.19946, 2.60739 ]
- ct: 2719
ccm: [ 1.99894, -0.41626, -0.58268,
-0.59321, 2.18167, -0.58846,
-0.42518, -1.21384, 2.63903 ]
- ct: 2867
ccm: [ 1.95177, -0.35904, -0.59274,
-0.44282, 1.97362, -0.53079,
-0.49059, -1.35379, 2.84439 ]
- ct: 3474
ccm: [ 1.97712, -0.60854, -0.36858,
-0.47723, 1.91142, -0.43418,
-0.23092, -0.72246, 1.95339 ]
- ct: 3761
ccm: [ 2.29903, -0.94652, -0.35251,
-0.51661, 1.90311, -0.38651,
-0.25114, -0.67501, 1.92615 ]
- ct: 6890
ccm: [ 1.93867, -0.67486, -0.26381,
-0.43049, 2.00702, -0.57652,
-0.15696, -0.51345, 1.67041 ]
- Adjust:
- Agc:
...

View file

@ -0,0 +1,11 @@
# SPDX-License-Identifier: CC0-1.0
%YAML 1.1
---
version: 1
algorithms:
- BlackLevel:
blackLevel: 4096
- Awb:
- Adjust:
- Agc:
...

View file

@ -0,0 +1,42 @@
# SPDX-License-Identifier: CC0-1.0
%YAML 1.1
---
version: 1
algorithms:
- BlackLevel:
blackLevel: 4096
- Awb:
- Ccm:
# copied from s5kjn1.yaml
ccms:
- ct: 2676
ccm: [ 2.02152, -0.41859, -0.60292,
-0.59481, 2.21509, -0.62029,
-0.44029, -1.16865, 2.60894 ]
- ct: 2710
ccm: [ 2.01597, -0.46478, -0.55119,
-0.59047, 2.14717, -0.55671,
-0.40793, -1.19946, 2.60739 ]
- ct: 2719
ccm: [ 1.99894, -0.41626, -0.58268,
-0.59321, 2.18167, -0.58846,
-0.42518, -1.21384, 2.63903 ]
- ct: 2867
ccm: [ 1.95177, -0.35904, -0.59274,
-0.44282, 1.97362, -0.53079,
-0.49059, -1.35379, 2.84439 ]
- ct: 3474
ccm: [ 1.97712, -0.60854, -0.36858,
-0.47723, 1.91142, -0.43418,
-0.23092, -0.72246, 1.95339 ]
- ct: 3761
ccm: [ 2.29903, -0.94652, -0.35251,
-0.51661, 1.90311, -0.38651,
-0.25114, -0.67501, 1.92615 ]
- ct: 6890
ccm: [ 1.93867, -0.67486, -0.26381,
-0.43049, 2.00702, -0.57652,
-0.15696, -0.51345, 1.67041 ]
- Adjust:
- Agc:
...

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Name=QCam
GenericName=Camera Demo App
Comment=Take photos with camera exposed by libcamera
Exec=qcam
Type=Application
Terminal=false
StartupNotify=true

View file

@ -0,0 +1,11 @@
# SPDX-License-Identifier: CC0-1.0
%YAML 1.1
---
version: 1
algorithms:
- BlackLevel:
blackLevel: 4096
- Awb:
- Adjust:
- Agc:
...

View file

@ -0,0 +1,41 @@
# SPDX-License-Identifier: CC0-1.0
%YAML 1.1
---
version: 1
algorithms:
- BlackLevel:
blackLevel: 4096
- Awb:
- Ccm:
ccms:
- ct: 2676
ccm: [ 2.02152, -0.41859, -0.60292,
-0.59481, 2.21509, -0.62029,
-0.44029, -1.16865, 2.60894 ]
- ct: 2710
ccm: [ 2.01597, -0.46478, -0.55119,
-0.59047, 2.14717, -0.55671,
-0.40793, -1.19946, 2.60739 ]
- ct: 2719
ccm: [ 1.99894, -0.41626, -0.58268,
-0.59321, 2.18167, -0.58846,
-0.42518, -1.21384, 2.63903 ]
- ct: 2867
ccm: [ 1.95177, -0.35904, -0.59274,
-0.44282, 1.97362, -0.53079,
-0.49059, -1.35379, 2.84439 ]
- ct: 3474
ccm: [ 1.97712, -0.60854, -0.36858,
-0.47723, 1.91142, -0.43418,
-0.23092, -0.72246, 1.95339 ]
- ct: 3761
ccm: [ 2.29903, -0.94652, -0.35251,
-0.51661, 1.90311, -0.38651,
-0.25114, -0.67501, 1.92615 ]
- ct: 6890
ccm: [ 1.93867, -0.67486, -0.26381,
-0.43049, 2.00702, -0.57652,
-0.15696, -0.51345, 1.67041 ]
- Adjust:
- Agc:
...