intel / icamerasrc

icamerasrc
24 stars 35 forks source link

failed to open libcamhal device #23

Open stolk opened 1 year ago

stolk commented 1 year ago

I am just trying to get the test pattern out of icamerasrc but it fails with:

$ gst-launch-1.0 -v icamerasrc device-name=tpg_ipu6 ! video/x-raw,format=YUY2,width=1280,height=720 ! videoconvert ! ximagesink
Setting pipeline to PAUSED ...
[10-29 11:47:46.853] CamHAL[INF] aiqb file name hm11b1.aiqb
[10-29 11:47:46.853] CamHAL[INF] aiqb file name hm11b1.aiqb
[10-29 11:47:46.853] CamHAL[INF] aiqb file name ov01a1s.aiqb
[10-29 11:47:46.854] CamHAL[INF] aiqb file name ov01a1s.aiqb
[10-29 11:47:46.854] CamHAL[INF] aiqb file name hm11b1.aiqb
[10-29 11:47:46.854] CamHAL[INF] aiqb file name hm11b1.aiqb
[10-29 11:47:46.856] CamHAL[ERR] MediaControl init failed
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...

The gstreamer command line is from the README.

OS: Ubuntu 22.10

branch: icamerasrc_slim_api

stolk commented 1 year ago

With more debug information: failed to open libcamhal device

[10-30 10:41:06.613] CamHAL[LV1] ENTER-int icamera::camera_device_open(int)
[10-30 10:41:06.613] CamHAL[LV1] <id2> @deviceOpen
[10-30 10:41:06.613] CamHAL[LV1] <id2>@CameraDevice
[10-30 10:41:06.613] CamHAL[LV1] <id2> @V4l2DeviceFactory
[10-30 10:41:06.613] CamHAL[LV1] @BufferProducer BufferProducer 0x55d1dbab52d0 created mMemType: 1
[10-30 10:41:06.613] CamHAL[LV1] <id2>CaptureUnit
[10-30 10:41:06.613] CamHAL[LV1] CaptureUnit, mFlushFd [8-9]
[10-30 10:41:06.613] CamHAL[LV1] SofSource: SofSource is constructed
[10-30 10:41:06.613] CamHAL[LV1] <id2>reset
[10-30 10:41:06.613] CamHAL[LV1] Failed to find devname for cameraId: 2, use default setting instead
[10-30 10:41:06.613] CamHAL[LV1] createSensorCtrl create a dummy sensor ctrl for camera id:2
[10-30 10:41:06.613] CamHAL[LV1] <id2> @SensorHwCtrl
[10-30 10:41:06.613] CamHAL[LV1] <id2>@createI3AControl
[10-30 10:41:06.613] CamHAL[LV1] <id2>AiqEngine
[10-30 10:41:06.615] CamHAL[LV1] @registerListener eventType: 5, listener: 0x55d1dba3bd10
[10-30 10:41:06.615] CamHAL[LV1] EXIT-int icamera::camera_device_open(int)
0:00:00.032185113 117883 0x55d1dbc482d0 ERROR             icamerasrc gstcamerasrc.cpp:2845:gst_camerasrc_start: CameraId=2 failed to open libcamhal device.
[10-30 10:41:06.615] CamHAL[LV1] ENTER-int icamera::camera_hal_deinit()
[10-30 10:41:06.615] CamHAL[LV1] @deinit
[10-30 10:41:06.615] CamHAL[LV1] @releaseInstance
[10-30 10:41:06.615] CamHAL[LV1] @~PlatformData
[10-30 10:41:06.618] CamHAL[LV1] @~AiqInitData
[10-30 10:41:06.618] CamHAL[LV1] ~AiqData, aiqd file name /usr/share/defaults/etc/camera/hm11b1.aiqb
[10-30 10:41:06.618] CamHAL[LV1] @~AiqInitData
[10-30 10:41:06.618] CamHAL[LV1] ~AiqData, aiqd file name /usr/share/defaults/etc/camera/ov01a1s.aiqb
[10-30 10:41:06.618] CamHAL[LV1] @~AiqInitData
[10-30 10:41:06.618] CamHAL[LV1] ~AiqData, aiqd file name /usr/share/defaults/etc/camera/hm11b1.aiqb
[10-30 10:41:06.618] CamHAL[LV1] EXIT-int icamera::camera_hal_deinit()
0:00:00.034912553 117883 0x55d1dbc482d0 WARN              CamBaseSrc gstcambasesrc.cpp:4192:gst_cam_base_src_activate_push:<camerasrc0> Failed to start in push mode
0:00:00.034920413 117883 0x55d1dbc482d0 WARN                GST_PADS gstpad.c:1141:gst_pad_set_active:<camerasrc0:src> Failed to activate pad
stolk commented 1 year ago

I think I have conflicting drivers on my system, because:

This seems to be caused by a rejected driver for /dev/media0 device. The Camera HAL is looking for a intel-ipu driver, but finds a uvcvideo driver when getting a Media Control instance.

ctrlcctrlv commented 1 year ago

Probably same root cause as #30. :woozy_face: