我尝试让运行 Ubuntu 23.10 的 XPS 14 9440 上的网络摄像头正常工作。由于笔记本电脑基于 Meteor Lake,因此我必须使用当前内核(>= 6.7)才能获得适当的 Meteor Lake 支持。我使用 6.8 主线内核。
$ uname -a
Linux christoph-XPS-14-9440 6.8.1-060801-generic #202403151937 SMP PREEMPT_DYNAMIC Fri Mar 15 19:52:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
不幸的是,没有适用于内核 >= 6.7 的预构建 IPU6 驱动程序,因为目前(2024 年 3 月 29 日)有开放的 PR(https://github.com/intel/ivsc-driver/pull/44,https://github.com/intel/ipu6-drivers/pull/213) 是使它们在当前内核上运行所必需的。
我怎样才能让驱动程序正常工作?
我完全搞不清楚所有东西的作用以及它们如何协同工作以使网络摄像头工作。我主要只是按照自述文件操作,而不太了解所有东西是如何连接的。那么,ipu6
实际的驱动程序是什么icamera
,IPU6 HAL
以及它们如何连接才能Gstreamer
使网络摄像头在应用程序中工作?
所以我尝试自己编译它,并且它成功地与ipu6-drivers
(包括ivsc-driver
)一起工作。据我所知,它们已成功编译和加载。
$ sudo dmesg | grep ipu6
[ 2.930531] intel_ipu6: loading out-of-tree module taints kernel.
[ 2.930538] intel_ipu6: module verification failed: signature and/or required key missing - tainting kernel
[ 2.952118] intel-ipu6 0000:00:05.0: enabling device (0000 -> 0002)
[ 2.953006] intel-ipu6 0000:00:05.0: Device 0x7d19 (rev: 0x4)
[ 2.953039] intel-ipu6 0000:00:05.0: physical base address 0x5a2c000000
[ 2.953043] intel-ipu6 0000:00:05.0: mapped as: 0x00000000dd7e4357
[ 2.953110] intel-ipu6 0000:00:05.0: IPU in secure mode
[ 2.953114] intel-ipu6 0000:00:05.0: IPU secure touch = 0x80000000
[ 2.953115] intel-ipu6 0000:00:05.0: IPU camera mask = 0x0
[ 2.964890] intel-ipu6 0000:00:05.0: IPC reset done
[ 2.964895] intel-ipu6 0000:00:05.0: cpd file name: intel/ipu6epmtl_fw.bin
[ 3.029032] intel-ipu6 0000:00:05.0: FW version: 20230925
[ 3.053964] intel-ipu6 0000:00:05.0: Found supported sensor OVTI02C1:00
[ 3.054199] intel-ipu6 0000:00:05.0: Connected 1 cameras
[ 3.055424] intel-ipu6 0000:00:05.0: Sending BOOT_LOAD to CSE
[ 3.090594] intel-ipu6 0000:00:05.0: Sending AUTHENTICATE_RUN to CSE
[ 3.137096] intel-ipu6 0000:00:05.0: CSE authenticate_run done
[ 3.137135] intel-ipu6 0000:00:05.0: IPU6-v4 driver version 1.0
[ 4.221346] intel-ipu6-psys intel-ipu6-psys0: pkg_dir entry count:8
[ 4.223677] intel-ipu6-psys intel-ipu6-psys0: psys probe minor: 0
$ lsmod | grep ipu6
intel_ipu6_isys 159744 0
videobuf2_dma_contig 24576 1 intel_ipu6_isys
videobuf2_v4l2 40960 1 intel_ipu6_isys
videobuf2_common 86016 4 videobuf2_dma_contig,videobuf2_v4l2,intel_ipu6_isys,videobuf2_memops
intel_ipu6_psys 110592 0
v4l2_fwnode 40960 2 ov02c10,intel_ipu6_isys
v4l2_async 28672 3 v4l2_fwnode,ov02c10,intel_ipu6_isys
videodev 364544 5 v4l2_async,v4l2_fwnode,videobuf2_v4l2,ov02c10,intel_ipu6_isys
intel_ipu6 122880 2 intel_ipu6_isys,intel_ipu6_psys
mc 86016 7 v4l2_async,videodev,snd_usb_audio,videobuf2_v4l2,ov02c10,intel_ipu6_isys,videobuf2_common
不过,据我所知,我还必须另外ipu6-camera-hal
编译icamerasrc
(https://github.com/intel/ipu6-drivers)才能让网络摄像头在应用程序中真正工作(对我来说,Google Chrome 是最重要的)。
我克隆了https://github.com/intel/ipu6-camera-hal
它并将其放在icamerasrc_slim_api
相机库正如自述文件中所提到的。
#from readme https://github.com/intel/ipu6-camera-hal?tab=readme-ov-file#build-instructions
cp build.sh .. && cd ..
# work
# ├── build.sh
# ├── icamerasrc
# ├── ipu6-camera-hal
# └── out
$ ls
build.sh icamerasrc ipu6-camera-hal out
当我现在尝试运行时,build.sh
它似乎成功构建ipu6-camera-hal
但却失败了icamerasrc
。
mv -f .deps/libgsticamerasrc_la-gstcampushsrc.Tpo .deps/libgsticamerasrc_la-gstcampushsrc.Plo
utils.cpp: In function 'gboolean CameraSrcUtils::gst_video_info_from_dma_drm_caps(GstVideoInfo*, const GstCaps*)':
utils.cpp:361:8: error: 'gst_video_is_dma_drm_caps' was not declared in this scope; did you mean 'gst_video_info_from_caps'?
361 | if (!gst_video_is_dma_drm_caps(caps)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| gst_video_info_from_caps
utils.cpp:366:5: error: 'GstVideoInfoDmaDrm' was not declared in this scope; did you mean 'GstVideoInfo'?
366 | GstVideoInfoDmaDrm drm_info;
| ^~~~~~~~~~~~~~~~~~
| GstVideoInfo
utils.cpp:367:44: error: 'drm_info' was not declared in this scope; did you mean 'g_info'?
367 | if (!gst_video_info_dma_drm_from_caps(&drm_info, caps)) {
| ^~~~~~~~
| g_info
我以前也遇到过类似的问题,但我能找到缺少的软件包,需要安装这些软件包才能提供缺少的库。但在这种情况下,我找不到解决方法。