Camera test on Phosh
You can find me on IRC, Discord and Twitter

Are there any instructions? I tried the below guide but no luck capturing any images.
Played around with the commands in the previous link and everything seems to work - except outputting an image or video. Also, installed a modified ffmpeg but still no luck.

Appears the pmOS example is using python and opencv so the below tool might work. Unfortunately, it won't build for me - debphosh is on the bullseye release which has moved onto newer versions of required packages libopencv-dev and python-opencv.

Tried downgrading but resulted in unmet dependency mess. Just posting the info in case it helps someone get it working.
(05-03-2020, 03:41 PM)Luke Wrote:

Can you link the python app?
Any information on the driver used for camera access?

On Mobian, only /dev/video1 claims video capture capability via the sun6i driver and no controls are reported.

mobian@mobian:~$ v4l2-ctl --list-devices
cedrus (platform:cedrus):

sun6i-csi (platform:csi):

mobian@mobian:~$ v4l2-ctl -d /dev/video0 -D
Driver Info:
Driver name      : cedrus
Card type        : cedrus
Bus info         : platform:cedrus
Driver version   : 5.6.0
Capabilities     : 0x84208000
Video Memory-to-Memory
Extended Pix Format
Device Capabilities
Device Caps      : 0x04208000
Video Memory-to-Memory
Extended Pix Format
Media Driver Info:
Driver name      : cedrus
Model            : cedrus
Serial           :
Bus info         : platform:cedrus
Media version    : 5.6.0
Hardware revision: 0x00000000 (0)
Driver version   : 5.6.0
Interface Info:
ID               : 0x0300000c
Type             : V4L Video
Entity Info:
ID               : 0x00000001 (1)
Name             : cedrus-source
Function         : V4L2 I/O
Pad 0x01000002   : 0: Source
 Link 0x02000008: to remote pad 0x1000004 of entity 'cedrus-proc': Data, Enabled, Immutable
mobian@mobian:~$ v4l2-ctl -d /dev/media0 -D
Unable to detect what device /dev/media0 is, exiting.
mobian@mobian:~$ v4l2-ctl -d /dev/video1 -D
Driver Info:
Driver name      : sun6i-video
Card type        : sun6i-csi
Bus info         : platform:csi
Driver version   : 5.6.0
Capabilities     : 0x84200001
Video Capture
Extended Pix Format
Device Capabilities
Device Caps      : 0x04200001
Video Capture
Extended Pix Format
mobian@mobian:~$ v4l2-ctl -L

Codec Controls

       mpeg_2_slice_parameters 0x009909fa (unknown): type=103 flags=has-payload
  mpeg_2_quantization_matrices 0x009909fb (unknown): type=104 flags=has-payload
   h264_sequence_parameter_set 0x00990ce8 (unknown): type=110 flags=has-payload
    h264_picture_parameter_set 0x00990ce9 (unknown): type=111 flags=has-payload
           h264_scaling_matrix 0x00990cea (unknown): type=112 flags=has-payload
         h264_slice_parameters 0x00990ceb (unknown): type=113 flags=has-payload
        h264_decode_parameters 0x00990cec (unknown): type=114 flags=has-payload
              h264_decode_mode 0x00990ced (menu)   : min=0 max=0 default=0 value=0
0: Slice-Based
               h264_start_code 0x00990cee (menu)   : min=0 max=0 default=0 value=0
0: No Start Code
   hevc_sequence_parameter_set 0x00990cf0 (unknown): type=120 flags=has-payload
    hevc_picture_parameter_set 0x00990cf1 (unknown): type=121 flags=has-payload
         hevc_slice_parameters 0x00990cf2 (unknown): type=122 flags=has-payload
              hevc_decode_mode 0x00990cf7 (menu)   : min=0 max=0 default=0 value=0
0: Slice-Based
               hevc_start_code 0x00990cf8 (menu)   : min=0 max=0 default=0 value=0
0: No Start Code
mobian@mobian:~$ v4l2-ctl --list-formats-ext
Type: Video Capture

[0]: 'ST12' (Sunxi Tiled NV12 Format, compressed)
[1]: 'NV12' (Y/CbCr 4:2:0) appears to use the ov5640 driver.
Poked around a bit more and there is a dmesg error for the ov5640 device for Mobian.

On pmOS, the camera "works" as a video device without autofocus. A video player is used for the viewfinder and can be used to "take photos".
Yes, last I checked the driver is loaded, but it can't init the camera, not sure what the problem is yet

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using sway along phosh fdlamotte 1 294 01-24-2021, 02:23 AM
Last Post: fdlamotte
  Seems like Phosh is in downgrade mode... ryo 10 1,278 01-13-2021, 04:07 PM
Last Post: ryo
  Command to test vibration motor? Zebulon Walton 0 244 01-10-2021, 05:31 PM
Last Post: Zebulon Walton
  Camera app down, megapixels up daniel 4 1,343 09-22-2020, 07:34 AM
Last Post: bcnaz
  Enabling nighlight in mobian phosh joz_mak 2 1,070 09-18-2020, 06:11 PM
Last Post: joz_mak
  debian+phosh running on PinePhone a-wai 548 156,682 09-03-2020, 08:27 AM
Last Post: thisishuey
  Camera support progress a-wai 73 22,551 08-18-2020, 02:46 PM
Last Post: bcnaz
  Xwayland on Phosh works? paju1986 1 768 08-03-2020, 08:06 AM
Last Post: wibble
  Camera use on Mobian/Brave Heart bcnaz 6 2,181 07-08-2020, 02:37 PM
Last Post: bcnaz

Forum Jump:

Users browsing this thread: 1 Guest(s)