#postmarketOS just landed the last MR needed to make the #libcamera + #PipeWire camera stack work on the #Librem5 and #PinePhone by default, using the new software ISP shipped in libcamera 0.3.
So if you have such a device: just update and go install apps like Snapshot, Warp, Decoder etc. You can even use it with Firefox and - very soon - Chromium.
Note that this does *not* replace #megapixels or #millipixels - those continue to be the default camera apps.
Don't expect too much for now: both image quality and performance are not quite where we want them to be.
That, however, also means that there are a lot of low hanging fruits where help is very welcome :)
We need to create #libcamera tuning files for the individual cameras, the swISP could be improved to use the GPU for debayering, there are WIP autofocus patches that could be tried and improved - and in Snapshot we need to reduce the number of copies before frames reach the screen or encoders.
Note that with all of this in place, camera support on a lot of other devices is in close reach. For example the #OnePlus6 and #SHIFT6mq should only need kernel patches enabling the camera sensors. The softwareISP should then - at least in theory - "just work". Well, fingers crossed :)
P.S.: the one device where this already worked is the #PinePhonePro - but until recently it broke audio. That was also fixed in the process.
P.S.S.: maybe I'm a bit too optimistic regarding QC devices, see below
If you're interested in the details: https://gitlab.com/postmarketOS/pmaports/-/issues/2787
@pavel Which missing parts do you have in mind? And would they be on the kernel or libcamera side?
P.S.: I was under the impression that the qcom-camss should work there as well - or that it at least wouldn't be missing much.
@greytheearthling It should be quite easy for Mobian to also ship the few necessary downstream patches - which will hopefully become redundant in one of the next libcamera releases. From then on any distro shipping Pipewire (with Wireplumber) and Libcamera by default should be mostly good.
There are some details around kernel configs etc. to still figure out, see e.g.
https://salsa.debian.org/Mobian-team/devices/kernels/librem5-linux/-/merge_requests/29
I don't plan to work on Mobian myself atm though, now that we have a clear example that can be copied.
@rmader @pavel OP6 needs the camss driver updated to support C-PHY on that platform, which currently only supports D-PHY.
Unfortunately - without the datasheets from qualcomm or some reverse engineering of the drivers in a binary implementation thats' quite difficult I think.
Once that's done - I believe we can run the IMX519 that is present on the OP6.
@libcamera @pavel Ah right. Yeah, need to talk @cas into coming over again for another session on that :) (or the shift, which IIRC uses D-PHY?)
Getting the Shift with D-PHY going would be really beneficial to finally confirm/fix/cleanup that imx519 driver. Then we'll have more confidence in the driver working well when the C-PHY is fixed or as part of fixing that.
Happy to support anyone working on the Shift / IMX519 driver bringup of course!
@rmader @libcamera @pavel yeah the 6mq is d-phy.
we'll also need the focus motor i guess xd
@libcamera @cas @pavel And then we need @Luigi311 to find time to finish the autofocus patches :)
@pavel No, but you don't seem to be the only person wondering: https://community.oneplus.com/thread/834532
Turns out that there were still two things missing to make this work OOTB. One thing was a missing package - already fixed - and the other will be fixed in Wireplumber 0.5.3, due in a couple of days.