PINE64
Camera support progress - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Debian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: Camera support progress (/showthread.php?tid=10578)

Pages: 1 2 3 4 5 6 7 8


RE: Camera support progress - bcnaz - 07-07-2020

(07-07-2020, 01:35 PM)jwestman Wrote: This is not working for me, on my Braveheart PinePhone. Here's the dmesg output:


Code:
mobian ~$ dmesg | grep -E "(csi|ov5640)"
[    1.425837] dovdd-csi: Bringing 3300000uV into 1800000-1800000uV
[    1.428194] avdd-csi: Bringing 2900000uV into 2800000-2800000uV
[    1.430261] dvdd-csi: Bringing 700000uV into 1800000-1800000uV
[    4.172849] i2c-gpio i2c-csi: using lines 141 (SDA) and 140 (SCL)
[    8.972532] sun6i-csi 1cb0000.csi: creating ov5640 3-004c:0 -> sun6i-csi:0 link
[    8.979971] sun6i-csi 1cb0000.csi: creating gc2145 3-003c:0 -> sun6i-csi:0 link
[    9.918406] ov5640 3-004c: ov5640_init_slave_id: failed with -6
[  11.526450] ov5640 3-004c: ov5640_init_slave_id: failed with -6
[  39.310878] ov5640 3-004c: ov5640_init_slave_id: failed with -6
[  40.475398] ov5640 3-004c: ov5640_init_slave_id: failed with -6

Camera shows a test pattern when I run it, indicating that no cameras are detected at all.

I flashed Mobian to my SD card from the mobian-pinephone-20200707 image, then upgraded using "sudo apt upgrade" (only one package, pinephone-tweaks, was updated), then restarted.
*
 I also have a Brave Heart,   I am still running from the SD card.

I downloaded the 20200707 nightly build,  then installed to SD using etcher. (re-sized to max on 32gb San Disk card using 'disks' )

  ( The default setting is  'auto-update'  but I do not think it did an update.)

The camera does  'just work'  using GUI on my phone.  It is low resolution, but pictures are not bad.
  Any chance your privacy switches were changed ?  I always look for the simplest answers first, then, work up from there.

Good Luck, BC


RE: Camera support progress - aancel - 07-08-2020

Hello,

I am running mobian-pinephone-20200704 flashed to the eMMC, and updated via apt to the latest version as of now,
however I am not able to get the camera working.
When I launch the camera app, I can hear some clicking now (like a shutter opening ?) about 3 times, but the viewfinder stays black and if I click the capture button, no images seems to be captured.

Here are the output of the commands from the following post (https://forum.pine64.org/showthread.php?tid=10578&pid=71117#pid71117)

Code:
dmesg | grep -E "(csi|ov5640)"

[    0.381331] dovdd-csi: Bringing 3300000uV into 1800000-1800000uV
[    0.383956] avdd-csi: Bringing 2900000uV into 2800000-2800000uV
[    0.386000] dvdd-csi: Bringing 700000uV into 1800000-1800000uV
[    6.132369] i2c-gpio i2c-csi: using lines 141 (SDA) and 140 (SCL)
[    7.647639] sun6i-csi 1cb0000.csi: creating ov5640 3-004c:0 -> sun6i-csi:0 link
[    7.663053] sun6i-csi 1cb0000.csi: creating gc2145 3-003c:0 -> sun6i-csi:0 link
[   32.556110] sun6i-csi 1cb0000.csi: Unsupported pixformat: 0x56595559 with mbus code: 0x2006!
[   52.163468] sun6i-csi 1cb0000.csi: Unsupported pixformat: 0x56595559 with mbus code: 0x2006!

Code:
sudo systemctl status pinephone-camera-setup

pinephone-camera-setup.service - Configure PinePhone Camera
     Loaded: loaded (/lib/systemd/system/pinephone-camera-setup.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2020-07-08 21:09:30 CEST; 33min ago
   Main PID: 2286 (code=exited, status=1/FAILURE)

Jul 08 21:09:30 mobian systemd[1]: Starting Configure PinePhone Camera...
Jul 08 21:09:30 mobian pinephone-camera-setup.sh[2286]:  is not a character device, quitting...
Jul 08 21:09:30 mobian systemd[1]: pinephone-camera-setup.service: Main process exited, code=exited, status=1/FAILURE
Jul 08 21:09:30 mobian systemd[1]: pinephone-camera-setup.service: Failed with result 'exit-code'.
Jul 08 21:09:30 mobian systemd[1]: Failed to start Configure PinePhone Camera.

Code:
media-ctl -p

Media controller API version 5.7.0

Media device information
------------------------
driver          cedrus
model           cedrus
serial         
bus info        platform:cedrus
hw revision     0x0
driver version  5.7.0

Device topology
- entity 1: cedrus-source (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Source
                -> "cedrus-proc":0 [ENABLED,IMMUTABLE]

- entity 3: cedrus-proc (2 pads, 2 links)
            type Node subtype Unknown flags 0
        pad0: Sink
                <- "cedrus-source":0 [ENABLED,IMMUTABLE]
        pad1: Source
                -> "cedrus-sink":0 [ENABLED,IMMUTABLE]

- entity 6: cedrus-sink (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "cedrus-proc":1 [ENABLED,IMMUTABLE]


The pinephone-camera-setup service seems to have failed starting. If I attempt a restart, it ends up dead:

Code:
sudo systemctl restart pinephone-camera-setup

pinephone-camera-setup.service - Configure PinePhone Camera
     Loaded: loaded (/lib/systemd/system/pinephone-camera-setup.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Wed 2020-07-08 21:55:02 CEST; 37s ago
    Process: 14744 ExecStart=/usr/bin/pinephone-camera-setup.sh (code=exited, status=0/SUCCESS)
   Main PID: 14744 (code=exited, status=0/SUCCESS)

Jul 08 21:55:01 mobian systemd[1]: Starting Configure PinePhone Camera...
Jul 08 21:55:02 mobian pinephone-camera-setup.sh[14751]: Unable to setup formats: Invalid argument (22)
Jul 08 21:55:02 mobian systemd[1]: pinephone-camera-setup.service: Succeeded.
Jul 08 21:55:02 mobian systemd[1]: Finished Configure PinePhone Camera.

There seem to be an argument issue to a setup script on my side. Does anyone has an idea on how I could fix this ?

Thanks in advance !


RE: Camera support progress - aancel - 07-08-2020

I've toyed a bit with the /usr/bin/pinephone-camera-setup.sh script.

I am able to get the front camera working by supplying the "front" argument to the script, then opening the camera app ! (The image is vertically flipped apparently)

Not supplying arguments should end up in using the back camera if I understand well ?
In my case, I end up in the same situation as I have previously described (a few clicking noises and then no image in the camera app)

Do tell me if I can test anything to help debug this issue !


RE: Camera support progress - a-wai - 07-09-2020

(07-08-2020, 02:17 PM)aancel Wrote: Not supplying arguments should end up in using the back camera if I understand well ?
That's what would be expected, yes. Can you paste the ouput from 'media-ctl -p -d /dev/media1' and 'v4l2-ctl --list-devices' please?


RE: Camera support progress - aancel - 07-09-2020

Thanks for the answer ! Here are the command outputs:



Code:
media-ctl -p -d /dev/media1

Media controller API version 5.7.0

Media device information
------------------------
driver          sun6i-csi
model           Allwinner Video Capture Device
serial         
bus info       
hw revision     0x0
driver version  5.7.0

Device topology
- entity 1: sun6i-csi (1 pad, 2 links)
            type Node subtype V4L flags 0
            device node name /dev/video1
        pad0: Sink
                <- "ov5640 3-004c":0 [ENABLED]
                <- "gc2145 3-003c":0 []

- entity 5: ov5640 3-004c (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev0
        pad0: Source
                [fmt:YUYV8_2X8/1280x720@1/30 colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
                -> "sun6i-csi":0 [ENABLED]

- entity 7: gc2145 3-003c (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev1
        pad0: Source
                [fmt:YUYV8_2X8/1280x720@1/60 field:none colorspace:srgb]
                -> "sun6i-csi":0 []



Code:
v4l2-ctl --list-devices

cedrus (platform:cedrus):
        /dev/video0
        /dev/media0

sun6i-csi (platform:csi):
        /dev/video1

Allwinner Video Capture Device (platform:sun6i-csi):
        /dev/media1




Let me know if I can try something else to get the camera working !

(I've tried modifying the pinephone-camera-setup.sh script but still without success, are there other places I can have a look at ?)


RE: Camera support progress - a-wai - 07-13-2020

IMPORTANT: after discussing with the gnome-camera maintainer, we agreed to rename the package to "pinhole" (not an official GNOME software, and we needed a less generic name than "camera" for future integration in Debian)

Therefore, "gnome-camera" won't be updated anymore, and you have to install the new package manually using `sudo apt install pinhole`

Note: next upgrade WILL break gnome-camera


RE: Camera support progress - paju1986 - 07-13-2020

(07-13-2020, 05:28 AM)a-wai Wrote: IMPORTANT: after discussing with the gnome-camera maintainer, we agreed to rename the package to "pinhole" (not an official GNOME software, and we needed a less generic name than "camera" for future integration in Debian)

Therefore, "gnome-camera" won't be updated anymore, and you have to install the new package manually using `sudo apt install pinhole`

Note: next upgrade WILL break gnome-camera

Why not just upstream the needed patches to gnome camera instead of making a fork??


RE: Camera support progress - a-wai - 07-13-2020

(07-13-2020, 05:41 AM)paju1986 Wrote: Why not just upstream the needed patches to gnome camera instead of making a fork??
It's not a fork: upstream has been renamed from "gnome-camera" to "camera".
Naming it "pinhole" for Debian/Mobian doesn't require any patch, and it's a joint decision between the upstream author and myself (a package named "camera" would likely not be accepted in Debian, as the name is far too generic).


RE: Camera support progress - aancel - 07-14-2020

Hello,

Regarding the issue I'm encountering (see the previous posts), I've switched to the pinhole application, but I'm still encountering the same issue as before.

Just to help me eliminate or confirm a potential hardware issue with my device, can anyone having success with using the camera confirm me or not that they here a clicking noise (located around the camera in the back) at some point either during bootup or during the camera app launch ?   
(I'm hearing at least 3 during the camera app launch, and one at boot)

I'm also able to consistently reproduce this "noise" using the following command:
Code:
while true; do sudo /usr/bin/pinephone-camera-setup.sh; sleep 1; done

Thanks in advance for you help !


RE: Camera support progress - a-wai - 07-14-2020

The clicking sounds are normal, yes.
Also, the logs you pasted in your previous message look perfectly normal, I have no idea why it's not working for you tbh...