External USB camera device not getting detected on NXP i.MX 8Q board built with Android 11 r40

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

External USB camera device not getting detected on NXP i.MX 8Q board built with Android 11 r40

787件の閲覧回数
swayamdhondge10
Contributor II

Hello Everyone,

I have Android Automotive 11 revision 40 built on the NXP i.MX 8q board.

I am currently building an Android Camera application which uses External USB camera. I had followed the documentation available for External USB Camera. (https://source.android.com/docs/core/camera/external-usb-cameras).

  

    1. Verified the below kernal level parameter. It was already present and enabled in the kernal configuration file. 

+CONFIG_USB_VIDEO_CLASS=y
+CONFIG_MEDIA_USB_SUPPORT=y

    2.  Added the external camera config file and external camera library to the path: device/nxp/imx8q/mek_8q/mek_8q_car.mk

+PRODUCT_PACKAGES += android.hardware.camera.provider@2.4-impl
+PRODUCT_PACKAGES += android.hardware.camera.provider@2.4-external-service

+PRODUCT_COPY_FILES += \
+device/nxp/imx8q/mek_8q/external_camera_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/external_camera_config.xml

 

    3. Added the external camera provider to the compatibility_matrix.xml and manifest_car.xml present at: device/nxp/imx8q/mek_8q

<hal format="hidl">
   <name>android.hardware.camera.provider</name>
   <transport arch="32+64">passthrough</transport>
   <impl level="generic"></impl>
   <version>2.4</version>
   <interface>
       <name>ICameraProvider</name>
       <instance>legacy/0</instance>
+       <instance>external/0</instance>
   </interface>
</hal>
 

 

    4. Added the sepolicy (Created new file: cameraserver.te) to the path: device/nxp/imx8q/mek_8q/sepolicy_car.

+# for external camera
+allow cameraserver device:dir r_dir_perms;
+allow cameraserver video_device:dir r_dir_perms;
+allow cameraserver video_device:chr_file rw_file_perms;

 

        5. Configured the external_camera_config.xml present at: device/nxp/imx8q/mek_8q with the provider

<Provider>
        <ignore> <!-- Internal video devices to be ignored by external camera HAL -->
            <id>0</id> <!-- No leading/trailing spaces -->
            <id>1</id>
        </ignore>
    </Provider>
 

 

After building the AOSP image and flashing it on NXP i.MX 8q board, I am receiving the below error while running the Camera2Basic default application:

files are incompatible: Framework manifest and device compatibility matrix are in
compatible: HALs incompatible. The following requirements are not met:
checkvintf E 07-19 12:20:09   116   116 check_vintf.cpp:554] android.hardware.camera.provider:
checkvintf E 07-19 12:20:09   116   116 check_vintf.cpp:554]     required: (@2.4::ICameraProvider/external/0 AND @2.4::ICameraProvider/legacy/
0)

------------------------------------------------------------------------------------------------------------------------------------------

  • I had tried changing the target level present in the device compatibility matrix from 5 to 6. However, it didn't worked for me.
  • Currently, I am testing camera device with Camera2Basic default application. It uses Android camera2 library.
  • I had connected and tested Camera device (Logitech C270 USB A) on both the Type C port and micro USB port available on NXP board. 

Could someone please help or suggest if I am doing something wrong? How to fix this such that camera device gets detected on Android application? 

0 件の賞賛
返信
1 返信

768件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @swayamdhondge10,

I hope you are doing well.

This issue seems to be due to an incompatible camera provider version.

Please refer to below documents for more information.

Compatibility Matrixes

One can try using the latest camera provider version.

Please try adding the below line in mek_8q_car.mk file

+PRODUCT_PACKAGES += android.hardware.camera.provider@2.4-external-service.rc

 Thanks & Regards,
 Dhruvit Vasavada

0 件の賞賛
返信