8 Replies Latest reply on Jul 13, 2017 12:48 PM by Intel Corporation

    Anyone managed to get the Caspa 4k camera working in Ubuntu?

    fnoop

      There seems to be a long list of dependencies, some of which I can find no information about, particularly libcamhal.

        • 1. Re: Anyone managed to get the Caspa 4k camera working in Ubuntu?
          fnoop

          I've got the kernel and firmware loaded for ipu4.  Looks like gstreamer component icamerasrc is required to get the video, but it looks to be almost impossible to build - it depends on components that don't seem to be available anywhere else:

          Prerequisites? · Issue #1 · 01org/icamerasrc · GitHub

          • 2. Re: Anyone managed to get the Caspa 4k camera working in Ubuntu?
            Intel Corporation
            This message was posted on behalf of Intel Corporation

            Hello fnoop,

            Thanks for reaching out!

            It is important to point out what wli58 mentioned in https://github.com/01org/icamerasrc/issues/1, this package (icamerasrc) was not developed for Ubuntu, therefore it may have issues on this OS. So, in order to get a more accurate answer regarding other project support, I believe it's best to follow wli58's advise.

            In https://github.com/01org/icamerasrc, it is mentioned that you have to install the prerequisite packages with rpm. Have you tried following the instructions found in rpm/README? In case you haven't, why don't you give it a go?

            I hope this information helps you,
            Pedro M.

            • 3. Re: Anyone managed to get the Caspa 4k camera working in Ubuntu?
              fnoop

              rpm is for Redhat/Fedora, so that's clearly not relevant here.

               

              I've followed the bitbake breadcrumbs as best I can and compiled icamerasrc (the particular version for the joule), but I get errors when trying to run it:

              (gst-inspect-1.0:17041): GLib-GObject-CRITICAL **: g_param_spec_enum: assertion 'g_enum_get_value (enum_class, default_value) != NULL' failed

              (gst-inspect-1.0:17041): GLib-GObject-CRITICAL **: g_object_class_install_property: assertion 'G_IS_PARAM_SPEC (pspec)' failed

               

              I do get the expected output from gst-inspect-1.0 icamerasrc:

              Factory Details:

                Rank                     none (0)

                Long-name                icamerasrc

                Klass                    Source/Video

                Description              CameraSource Element

                Author                   Intel

               

              Plugin Details:

                Name                     icamerasrc

                Description              Template icamerasrc

                Filename                 /srv/maverick/software/gstreamer/lib/gstreamer-1.0/libgsticamerasrc.so

                Version                  1.0.0

                License                  LGPL

                Source module            my-plugin-package

                Binary package           GStreamer

                Origin URL               http://gstreamer.net/

               

              GObject

              +----GInitiallyUnowned

                     +----GstObject

                           +----GstElement

                                 +----GstBaseSrc

                                       +----GstPushSrc

                                             +----Gstcamerasrc

               

              Implemented Interfaces:

                GstCamerasrc3AInterface

               

              Pad Templates:

                SRC template: 'src'

                  Availability: Always

                  Capabilities:

                    EMPTY

               

              Element Flags:

                no flags set

               

              Element Implementation:

                Has change_state() function: 0x7f21cf5dc920

               

              Element has no clocking capabilities.

              Element has no URI handling capabilities.

               

              Pads:

                SRC: 'src'

                  Pad Template: 'src'

               

              Element Properties:

                name                : The name of the object

                                      flags: readable, writable

                                      String. Default: "camerasrc0"

                parent              : The parent of the object

                                      flags: readable, writable

                                      Object of type "GstObject"

                blocksize           : Size in bytes to read per buffer (-1 = default)

                                      flags: readable, writable

                                      Unsigned Integer. Range: 0 - 4294967295 Default: 4096

                num-buffers         : Number of buffers to output before sending EOS (-1 = unlimited)

                                      flags: readable, writable

                                      Integer. Range: -1 - 2147483647 Default: -1

                typefind            : Run typefind before negotiating

                                      flags: readable, writable

                                      Boolean. Default: false

                do-timestamp        : Apply current stream time to buffers

                                      flags: readable, writable

               

              etc etc, but there is no 'device-name' as indicated in the suggested test pipeline:

              gst-launch-1.0 icamerasrc device-name=0 io-mode=3 ! video/x-raw,format=NV12,width=1920,height=1080 ! vaapisink dmabuf-alloc-tiled=true 

              So when I try to run it:

              [dev] [mav@maverick-joule ~]$ gst-launch-1.0 icamerasrc device-name=0 io-mode=3 ! video/x-raw,format=NV12,width=1920,height=1080 ! vaapisink dmabuf-alloc-tiled=true

               

               

              (gst-launch-1.0:17538): GLib-GObject-CRITICAL **: g_param_spec_enum: assertion 'g_enum_get_value (enum_class, default_value) != NULL' failed

               

               

              (gst-launch-1.0:17538): GLib-GObject-CRITICAL **: g_object_class_install_property: assertion 'G_IS_PARAM_SPEC (pspec)' failed

              libva info: VA-API version 0.39.2

              libva info: va_getDriverName() returns 0

              libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so

              libva info: Found init function __vaDriverInit_0_39

              libva info: va_openDriver() returns 0

              libva info: VA-API version 0.39.2

              libva info: va_getDriverName() returns 0

              libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so

              libva info: Found init function __vaDriverInit_0_39

              libva info: va_openDriver() returns 0

              WARNING: erroneous pipeline: no property "device-name" in element "camerasrc0"

              • 4. Re: Anyone managed to get the Caspa 4k camera working in Ubuntu?
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                I understand, could you please share a step by step explanation of what you tried, we would like to see if we can replicate the behavior. Please also include the environmental details, like the OS version that you are using and any other detail you deem relevant.

                Pedro M.

                • 5. Re: Anyone managed to get the Caspa 4k camera working in Ubuntu?
                  fnoop

                  OK it looks like the gstreamer error:

                  (gst-launch-1.0:17538): GLib-GObject-CRITICAL **: g_param_spec_enum: assertion 'g_enum_get_value (enum_class, default_value) != NULL' failed

                  is due to the fact that camerahal isn't returning any devices, so the icamerasrc gstreamer element has nothing to enumerate.

                  The difference between Ubuntu (joule) and RefOS is that Ubuntu sees 4 fewer v4l2 subdevices:

                  Jun 30 19:02:40 maverick-joule camerahal[7073]: CAMHAL_MediaController:@findEntities: 56 media entities found 

                   

                  Jun 30 13:54:25 intel-5xx-64 camerahal[1050]: CAMHAL_MediaController:@findEntities: 60 media entities found 

                   

                  RefOS has these subdevices, which Ubuntu doesn't:

                  /dev/v4l-subdev14

                  /dev/v4l-subdev10

                  /dev/v4l-subdev11

                  /dev/v4l-subdev12

                  /dev/v4l-subdev13

                  And so camerahal fails:

                  Jun 30 19:01:31 maverick-joule camerahal[7009]: CAMHAL_PlatformData:ERROR no sensor driver registered in media controller!

                  Jun 30 19:01:31 maverick-joule camerahal[7009]: CAMHAL_Profiles:No sensor Info available, exit parsing

                  Jun 30 19:01:31 maverick-joule camerahal[7009]: CAMHAL_AndroidProfiles:CameraProfiles base init error:-2147483648

                  Jun 30 19:01:31 maverick-joule camerahal[7009]: CAMHAL_PlatformData:Failed to initialize Camera profiles

                  Jun 30 19:01:31 maverick-joule camerahal[7009]: ICAMERA_ICameraAdapter:@camera_hal_init: Cannot get stream configuration from static metadata.

                  I can't find camerhal source anywhere (proprietary? It appears to be a linux port of android camera3hal), but I don't think it's at fault here - I'm guessing the kernel is missing some patches in the v4l2 subsystem.

                  This is frustrating, as I have everything else now installed and working, I think it's just these missing subdevices.  The camera itself is available:

                   

                  [dev] [mav@maverick-joule /var/tmp]$ v4l2-ctl --all -d /dev/video41

                  Driver Info (not using libv4l2):

                  Driver name   : intel-ipu4-isys

                  Card type     : ipu4/Broxton B

                  Bus info      : pci:0000:00:03.0

                  Driver version: 4.4.67

                  Capabilities  : 0x84203001

                  Video Capture

                  Video Capture Multiplanar

                  Video Output Multiplanar

                  Streaming

                  Extended Pix Format

                  Device Capabilities

                  Device Caps   : 0x04200001

                  Video Capture

                  Streaming

                  Extended Pix Format

                  • 6. Re: Anyone managed to get the Caspa 4k camera working in Ubuntu?
                    fnoop

                    This is using the latest joule ubuntu image/kernel:

                    Linux maverick-joule 4.4.0-1003-joule #8-Ubuntu SMP PREEMPT Wed Jun 14 16:53:53 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

                    • 7. Re: Anyone managed to get the Caspa 4k camera working in Ubuntu?
                      Intel Corporation
                      This message was posted on behalf of Intel Corporation

                      Thanks a lot for sharing this information with us. Please let us analyze it to see if we can determine what might be happening. If we are able to find anything useful, we'll make sure to share it with you in this thread.

                      Pedro M.

                      • 8. Re: Anyone managed to get the Caspa 4k camera working in Ubuntu?
                        Intel Corporation
                        This message was posted on behalf of Intel Corporation

                        Hello fnoop,

                        Unfortunately, adding support for the MIPI cameras to Ubuntu is not something we can do. We suggest using the Ref-OS as it supports the MIPI cameras and is officially supported by Intel.

                        We will continue to help you in your other thread https://communities.intel.com/thread/115997 where you are indeed using the Ref-IoT-OS.

                        Pedro M.