Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge bsp_diff patches of iasw and base #2074

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions groups/camera-ext/aaos_iasw/BoardConfig.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
BOARD_CAMERA_USB_STANDALONE = true

# SELinux support for USB camera
BOARD_SEPOLICY_DIRS += $(INTEL_PATH_SEPOLICY)/camera-ext/ivi
2 changes: 2 additions & 0 deletions groups/camera-ext/aaos_iasw/files.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[extrafiles]
ivi_camera_config.xml: "ivihal camera parameters"
88 changes: 88 additions & 0 deletions groups/camera-ext/aaos_iasw/ivi_camera_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8" ?>
<IVICamera platform="ivi_config_1">
<Provider>
<CameraIdOffset>0</CameraIdOffset>
<CaptureManager>disable</CaptureManager>
<ignore> <!-- Internal video devices to be ignored by external camera HAL -->
<!--
<id>5</id>
<id>6</id>
<id>7</id>
-->
</ignore>
</Provider>
<!-- See ExternalCameraUtils.cpp for default values of Device configurations below
<Device>
<Path>/dev/video0</Path>
<Driver>intel-ipu6-isys</Driver>
<NumVideoBuffers count="2"/>
<NumStillBuffers count="2"/>
<Setting width="1920" height="1080" fps="30" format="UYVY"/>
<Bind>
<VirtId>10</VirtId>
</Bind>
</Device>
-->
<Device>
<Path>/dev/video1</Path>
<Driver>intel-ipu6-isys</Driver>
<NumVideoBuffers count="2"/>
<NumStillBuffers count="2"/>
<Setting width="1920" height="1080" fps="30" format="UYVY"/>
<Bind>
<VirtId>11</VirtId>
<VirtId>12</VirtId>
</Bind>
</Device>
<!--
<Device>
<Path>/dev/video5</Path>
<Driver>uvcvideo</Driver>
<NumVideoBuffers count="2"/>
<NumStillBuffers count="2"/>
<Setting width="1920" height="1080" fps="30" format="YUYV"/>
<Bind>
<VirtId>13</VirtId>
</Bind>
</Device>
-->

<Loopback>
<PairId>50</PairId>
<SrcCamera>/dev/video1</SrcCamera>
<Driver>v4l2 loopback</Driver>
<Setting width="1920" height="1080" fps="30" format="UYVY"/>
</Loopback>

<MediaCtlConfig id="1" platform="ivi_config_1">
<!-- IPU sensors -->
<format name="max9295a_dummy" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="max926717f_dummy" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>

<format name="max96722" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="max96722" pad="1" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="max96722" pad="4" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>

<format name="Intel IPU6 CSI-2 1" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="Intel IPU6 CSI-2 1" pad="1" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>

<format name="Intel IPU6 CSI2 BE SOC 0" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="Intel IPU6 CSI2 BE SOC 0" pad="1" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="Intel IPU6 CSI2 BE SOC 0" pad="2" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>

<format name="Intel IPU6 BE SOC capture 0" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="Intel IPU6 BE SOC capture 1" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>

<!-- DPIN -->

<link srcName="max96717f_dummy" srcPad="0" sinkName="max96722" sinkPad="0" enable="true"/>
<link srcName="max9295a_dummy" srcPad="0" sinkName="max96722" sinkPad="1" enable="true"/>
<link srcName="max96722" srcPad="4" sinkName="Intel IPU6 CSI-2 1" sinkPad="0" enable="true"/>

<link srcName="Intel IPU6 CSI-2 1" srcPad="1" sinkName="Intel IPU6 CSI2 BE SOC 0" sinkPad="0" enable="true"/>

<link srcName="Intel IPU6 CSI2 BE SOC 0" srcPad="2" sinkName="Intel IPU6 BE SOC capture 1" sinkPad="0" enable="true"/>
<link srcName="Intel IPU6 CSI2 BE SOC 0" srcPad="1" sinkName="Intel IPU6 BE SOC capture 0" sinkPad="0" enable="true"/>

</MediaCtlConfig>
</IVICamera>
17 changes: 17 additions & 0 deletions groups/camera-ext/aaos_iasw/product.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Camera: Device-specific configuration files.
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.camera.autofocus.xml:vendor/etc/permissions/android.hardware.camera.autofocus.xml \
frameworks/native/data/etc/android.hardware.camera.xml:vendor/etc/permissions/android.hardware.camera.xml \
$(LOCAL_PATH)/{{_extra_dir}}/ivi_camera_config.xml:vendor/etc/ivi_camera_config.xml

# External camera service

PRODUCT_PACKAGES += [email protected] \
[email protected] \
[email protected]

PRODUCT_PACKAGES += android.ia.hardware.camera.provider-ivi \
android.iacamera.provider-ivi-service

PRODUCT_PACKAGES += Camera2
PRODUCT_PACKAGES += MultiCameraApp
2 changes: 2 additions & 0 deletions groups/camera-ext/aaos_iasw/ueventd.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Camera
/dev/video* 0660 system camera
4 changes: 4 additions & 0 deletions groups/camera-ext/base_aaos/BoardConfig.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
BOARD_CAMERA_USB_STANDALONE = true

# SELinux support for USB camera
BOARD_SEPOLICY_DIRS += $(INTEL_PATH_SEPOLICY)/camera-ext/ivi
Empty file.
2 changes: 2 additions & 0 deletions groups/camera-ext/base_aaos/files.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[extrafiles]
ivi_camera_config.xml: "ivihal camera parameters"
86 changes: 86 additions & 0 deletions groups/camera-ext/base_aaos/ivi_camera_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<IVICamera platform="ivi_config_1">
<Provider>
<CameraIdOffset>0</CameraIdOffset>
<CaptureManager>disable</CaptureManager>
<ignore> <!-- Internal video devices to be ignored by external camera HAL -->
<id>1</id>
<id>2</id>
<id>3</id>
</ignore>
</Provider>
<!-- See ExternalCameraUtils.cpp for default values of Device configurations below
<Device>
<Path>/dev/video0</Path>
<Driver>intel-ipu6-isys</Driver>
<NumVideoBuffers count="2"/>
<NumStillBuffers count="2"/>
<Setting width="1920" height="1080" fps="30" format="UYVY"/>
<Bind>
<VirtId>10</VirtId>
</Bind>
</Device>
-->
<Device>
<Path>/dev/video1</Path>
<Driver>intel-ipu6-isys</Driver>
<NumVideoBuffers count="2"/>
<NumStillBuffers count="2"/>
<Setting width="1920" height="1080" fps="30" format="UYVY"/>
<Bind>
<VirtId>11</VirtId>
<VirtId>12</VirtId>
</Bind>
</Device>
<!--
<Device>
<Path>/dev/video5</Path>
<Driver>uvcvideo</Driver>
<NumVideoBuffers count="2"/>
<NumStillBuffers count="2"/>
<Setting width="1920" height="1080" fps="30" format="YUYV"/>
<Bind>
<VirtId>13</VirtId>
</Bind>
</Device>
-->

<Loopback>
<PairId>50</PairId>
<SrcCamera>/dev/video1</SrcCamera>
<Driver>v4l2 loopback</Driver>
<Setting width="1920" height="1080" fps="30" format="UYVY"/>
</Loopback>

<MediaCtlConfig id="1" platform="ivi_config_1">
<!-- IPU sensors -->
<format name="max9295a_dummy" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="max926717f_dummy" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>

<format name="max96722" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="max96722" pad="1" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="max96722" pad="4" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>

<format name="Intel IPU6 CSI-2 1" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="Intel IPU6 CSI-2 1" pad="1" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>

<format name="Intel IPU6 CSI2 BE SOC 0" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="Intel IPU6 CSI2 BE SOC 0" pad="1" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="Intel IPU6 CSI2 BE SOC 0" pad="2" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>

<format name="Intel IPU6 BE SOC capture 0" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>
<format name="Intel IPU6 BE SOC capture 1" pad="0" width="1920" height="1080" format="V4L2_MBUS_FMT_UYVY8_1X16"/>

<!-- DPIN -->

<link srcName="max96717f_dummy" srcPad="0" sinkName="max96722" sinkPad="0" enable="true"/>
<link srcName="max9295a_dummy" srcPad="0" sinkName="max96722" sinkPad="1" enable="true"/>
<link srcName="max96722" srcPad="4" sinkName="Intel IPU6 CSI-2 1" sinkPad="0" enable="true"/>

<link srcName="Intel IPU6 CSI-2 1" srcPad="1" sinkName="Intel IPU6 CSI2 BE SOC 0" sinkPad="0" enable="true"/>

<link srcName="Intel IPU6 CSI2 BE SOC 0" srcPad="2" sinkName="Intel IPU6 BE SOC capture 1" sinkPad="0" enable="true"/>
<link srcName="Intel IPU6 CSI2 BE SOC 0" srcPad="1" sinkName="Intel IPU6 BE SOC capture 0" sinkPad="0" enable="true"/>

</MediaCtlConfig>
</IVICamera>
16 changes: 16 additions & 0 deletions groups/camera-ext/base_aaos/product.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Camera: Device-specific configuration files.
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.camera.xml:vendor/etc/permissions/android.hardware.camera.xml \
$(LOCAL_PATH)/{{_extra_dir}}/ivi_camera_config.xml:vendor/etc/ivi_camera_config.xml

# External camera service

PRODUCT_PACKAGES += [email protected] \
[email protected] \
[email protected]

PRODUCT_PACKAGES += android.ia.hardware.camera.provider-ivi \
android.iacamera.provider-ivi-service

PRODUCT_PACKAGES += Camera2
PRODUCT_PACKAGES += MultiCameraApp
2 changes: 2 additions & 0 deletions groups/camera-ext/base_aaos/ueventd.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Camera
/dev/video* 0660 system camera