<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic External USB camera device not getting detected on NXP i.MX 8Q board built with Android 11 r40 in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/External-USB-camera-device-not-getting-detected-on-NXP-i-MX-8Q/m-p/1689093#M209392</link>
    <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I have Android Automotive 11 revision 40 built on the NXP i.MX 8q board.&lt;/P&gt;&lt;P&gt;I am currently building an Android Camera application which uses External USB camera. I had followed the documentation available for External USB Camera. (&lt;A title="https://source.android.com/docs/core/camera/external-usb-cameras" href="https://source.android.com/docs/core/camera/external-usb-cameras" target="_blank" rel="noreferrer noopener"&gt;https://source.android.com/docs/core/camera/external-usb-cameras&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 1. Verified the below kernal level parameter. It was already present and enabled in the kernal configuration file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;+CONFIG_USB_VIDEO_CLASS=y&lt;BR /&gt;+CONFIG_MEDIA_USB_SUPPORT=y&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 2. &amp;nbsp;Added the external camera config file and external camera library to the path: device/nxp/imx8q/mek_8q/mek_8q_car.mk&lt;/P&gt;&lt;PRE&gt;+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&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 3. Added the external camera provider to the compatibility_matrix.xml and manifest_car.xml present at: device/nxp/imx8q/mek_8q&lt;/P&gt;&lt;PRE&gt;&amp;lt;hal format="hidl"&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;android.hardware.camera.provider&amp;lt;/name&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;transport arch="32+64"&amp;gt;passthrough&amp;lt;/transport&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;impl level="generic"&amp;gt;&amp;lt;/impl&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;2.4&amp;lt;/version&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;interface&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;ICameraProvider&amp;lt;/name&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;instance&amp;gt;legacy/0&amp;lt;/instance&amp;gt;
+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;instance&amp;gt;external/0&amp;lt;/instance&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;/interface&amp;gt;
&amp;lt;/hal&amp;gt;
&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 4. Added the sepolicy (Created new file: cameraserver.te) to the path: device/nxp/imx8q/mek_8q/sepolicy_car.&lt;/P&gt;&lt;PRE&gt;+# 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;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5. Configured the external_camera_config.xml present at: device/nxp/imx8q/mek_8q with the provider&lt;/P&gt;&lt;PRE&gt;&amp;lt;Provider&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ignore&amp;gt; &amp;lt;!-- Internal video devices to be ignored by external camera HAL --&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;id&amp;gt;0&amp;lt;/id&amp;gt; &amp;lt;!-- No leading/trailing spaces --&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;id&amp;gt;1&amp;lt;/id&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ignore&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/Provider&amp;gt;
&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;files are incompatible: Framework manifest and device compatibility matrix are in&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;compatible: HALs incompatible. The following requirements are not met:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;checkvintf E 07-19 12:20:09&amp;nbsp;&amp;nbsp; 116&amp;nbsp;&amp;nbsp; 116 check_vintf.cpp:554] android.hardware.camera.provider:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;checkvintf E 07-19 12:20:09&amp;nbsp;&amp;nbsp; 116&amp;nbsp;&amp;nbsp; 116 check_vintf.cpp:554]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; required: (@2.4::ICameraProvider/external/0 AND @2.4::ICameraProvider/legacy/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;0)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I had tried changing the target level present in the device compatibility matrix from 5 to 6. However, it didn't worked for me.&lt;/LI&gt;&lt;LI&gt;Currently, I am testing camera device with Camera2Basic default application. It uses Android camera2 library.&lt;/LI&gt;&lt;LI&gt;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.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;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?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2023 07:19:23 GMT</pubDate>
    <dc:creator>swayamdhondge10</dc:creator>
    <dc:date>2023-07-20T07:19:23Z</dc:date>
    <item>
      <title>External USB camera device not getting detected on NXP i.MX 8Q board built with Android 11 r40</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/External-USB-camera-device-not-getting-detected-on-NXP-i-MX-8Q/m-p/1689093#M209392</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I have Android Automotive 11 revision 40 built on the NXP i.MX 8q board.&lt;/P&gt;&lt;P&gt;I am currently building an Android Camera application which uses External USB camera. I had followed the documentation available for External USB Camera. (&lt;A title="https://source.android.com/docs/core/camera/external-usb-cameras" href="https://source.android.com/docs/core/camera/external-usb-cameras" target="_blank" rel="noreferrer noopener"&gt;https://source.android.com/docs/core/camera/external-usb-cameras&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 1. Verified the below kernal level parameter. It was already present and enabled in the kernal configuration file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;+CONFIG_USB_VIDEO_CLASS=y&lt;BR /&gt;+CONFIG_MEDIA_USB_SUPPORT=y&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 2. &amp;nbsp;Added the external camera config file and external camera library to the path: device/nxp/imx8q/mek_8q/mek_8q_car.mk&lt;/P&gt;&lt;PRE&gt;+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&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 3. Added the external camera provider to the compatibility_matrix.xml and manifest_car.xml present at: device/nxp/imx8q/mek_8q&lt;/P&gt;&lt;PRE&gt;&amp;lt;hal format="hidl"&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;android.hardware.camera.provider&amp;lt;/name&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;transport arch="32+64"&amp;gt;passthrough&amp;lt;/transport&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;impl level="generic"&amp;gt;&amp;lt;/impl&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;2.4&amp;lt;/version&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;interface&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;ICameraProvider&amp;lt;/name&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;instance&amp;gt;legacy/0&amp;lt;/instance&amp;gt;
+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;instance&amp;gt;external/0&amp;lt;/instance&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;/interface&amp;gt;
&amp;lt;/hal&amp;gt;
&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 4. Added the sepolicy (Created new file: cameraserver.te) to the path: device/nxp/imx8q/mek_8q/sepolicy_car.&lt;/P&gt;&lt;PRE&gt;+# 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;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5. Configured the external_camera_config.xml present at: device/nxp/imx8q/mek_8q with the provider&lt;/P&gt;&lt;PRE&gt;&amp;lt;Provider&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ignore&amp;gt; &amp;lt;!-- Internal video devices to be ignored by external camera HAL --&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;id&amp;gt;0&amp;lt;/id&amp;gt; &amp;lt;!-- No leading/trailing spaces --&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;id&amp;gt;1&amp;lt;/id&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ignore&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/Provider&amp;gt;
&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;files are incompatible: Framework manifest and device compatibility matrix are in&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;compatible: HALs incompatible. The following requirements are not met:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;checkvintf E 07-19 12:20:09&amp;nbsp;&amp;nbsp; 116&amp;nbsp;&amp;nbsp; 116 check_vintf.cpp:554] android.hardware.camera.provider:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;checkvintf E 07-19 12:20:09&amp;nbsp;&amp;nbsp; 116&amp;nbsp;&amp;nbsp; 116 check_vintf.cpp:554]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; required: (@2.4::ICameraProvider/external/0 AND @2.4::ICameraProvider/legacy/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;0)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I had tried changing the target level present in the device compatibility matrix from 5 to 6. However, it didn't worked for me.&lt;/LI&gt;&lt;LI&gt;Currently, I am testing camera device with Camera2Basic default application. It uses Android camera2 library.&lt;/LI&gt;&lt;LI&gt;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.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;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?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 07:19:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/External-USB-camera-device-not-getting-detected-on-NXP-i-MX-8Q/m-p/1689093#M209392</guid>
      <dc:creator>swayamdhondge10</dc:creator>
      <dc:date>2023-07-20T07:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: External USB camera device not getting detected on NXP i.MX 8Q board built with Android 11 r40</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/External-USB-camera-device-not-getting-detected-on-NXP-i-MX-8Q/m-p/1690144#M209481</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/216691"&gt;@swayamdhondge10&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I hope you are doing well.&lt;/P&gt;
&lt;P&gt;This issue seems to be due to an incompatible camera provider version.&lt;/P&gt;
&lt;P&gt;Please refer to below documents for more information.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://source.android.com/docs/core/architecture/vintf/comp-matrices" target="_self"&gt;&lt;SPAN&gt;Compatibility Matrixes&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;One can try using the latest&amp;nbsp;camera provider version.&lt;/P&gt;
&lt;P&gt;Please try adding the below line in&amp;nbsp;&lt;SPAN&gt;mek_8q_car.mk file&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="" dir="ltr" translate="no"&gt;&lt;CODE dir="ltr"&gt;&lt;SPAN class="pun"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;PRODUCT_PACKAGES &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;+= &lt;SPAN&gt;android.hardware.camera.provider@2.4-external-service.rc&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Thanks &amp;amp; Regards,&lt;BR /&gt;&amp;nbsp;Dhruvit Vasavada&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 07:27:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/External-USB-camera-device-not-getting-detected-on-NXP-i-MX-8Q/m-p/1690144#M209481</guid>
      <dc:creator>Dhruvit</dc:creator>
      <dc:date>2023-07-21T07:27:04Z</dc:date>
    </item>
  </channel>
</rss>

