Kernel on N900 is few lines of patches away from usable camera. v4l-utils needs more work, but with some patches it can adjust gain, focus, and take raw or jpeg picture. Is someone interested in packaging it for pmOS?
Related: Your talk Cheap Complex Cameras. I found it quite interesting!
Thats an interesting talk. Also kinda unrelated to this issue: Isn't it better to have a seperate kernel interface for still camera's instead of "misusing" v4l2 for it? In that way you can use v4l2 for the preview window or other stuff that require low quality video like skype and use the stills kernel interface to do the actual good quality camera stuff. Maybe in that way its possible to abstract some of the hardware accelerated operations so you can use them on multiple devices since I guess this is a common problem with cellphone camera's. Then you can write camera apps against that interface.
Wouldn't it also be possible to actually correctly set the exposure on the first try if the interface has absolute values assuming you can get a reasonably accurate linear light measurement from the sensor? Maybe some code from magiclantern could be borrowed for this.
Well, short answers... No, I don't think separate kernel interface
would be easy, as we don't have separate hardware. Eventually
component allowing multiple access to single camera will be
neccessary, but I suspect that's not going to be in kernel. Anyway,
that's kinda unrelated, and kernel interface is so hard to change you
may consider it fixed.
Assuming you could get linear measurement you could do that, but you
can't. Sensor is likely to be completely black or compeletely
saturated for most of the dynamic range. So you do "assume its linear,
and use that as the next setting", that will still result in iterative
search.
How do SailfishOS, former Ubuntu Touch & Firefox OS deal with this? They must have shipped with a working camera app.. all via libhybris?
Edit:
com.jolla.camera.photo: no source
https://github.com/ubports/camera-app
https://developer.mozilla.org/en-US/docs/Archive/B2G_OS/API/Camera_API implementation: ?
Firefox os just used the android stack directly I guess. Ubuntu Touch uses the libhybris compat layer inside their android system image and SailfishOS and Plasma Mobile use a gstreamer libhybris plugin.
thanks @JBBgameich — so that's not so helpful for our cause.
Eventually component allowing multiple access to single camera will be neccessary, but I suspect that's not going to be in kernel
Just for the records, I believe android is not covering that use case either, for the moment at least.
And even [desktop] windows, I think only since last year or so supports this (through a "middleman server" between actual hardware and applications)
So what should be done to get it working?
Ok, steps would be:
a) get recent kernel to work. Enable these config options:
MEDIA_SUBDRV_AUTOSELECT=n!!
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_SOC_CAMERA=y
CONFIG_SOC_CAMERA_PLATFORM=y
CONFIG_VIDEO_V4L2_SUBDEV_API=y
CONFIG_VIDEO_OMAP3=y
CONFIG_MEDIA_CONTROLLER=y
CONFIG_VIDEO_MUX=y
CONFIG_VIDEO_BUS_SWITCH=y
CONFIG_VIDEO_SMIAREGS=y
CONFIG_VIDEO_ET8EK8=y
CONFIG_VIDEOBUF2_CORE=y
CONFIG_VIDEOBUF2_MEMOPS=y
CONFIG_VIDEOBUF2_DMA_CONTIG=y
CONFIG_VIDEO_OMAP3=y
CONFIG_VIDEO_SMIAPP_PLL=y
CONFIG_VIDEO_SMIAPP=y
b) get v4l-utils from https://gitlab.com/tui/v4l-utils . This version
should work
https://gitlab.com/tui/v4l-utils/commit/33343d50216c27ce00b58bc4f1fd46839f832d67
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Most helpful comment
Related: Your talk Cheap Complex Cameras. I found it quite interesting!