zeus: overlay: Use logical camera in aperture

Change-Id: Iac84535f59d194335c8b1efb659821a3416267da
This commit is contained in:
Arian 2024-08-14 12:53:38 +02:00 committed by Bartłomiej Rudecki
parent 27ea387625
commit 1aaf950dee

View file

@ -1,44 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-FileCopyrightText: 2023 The LineageOS Project
SPDX-FileCopyrightText: 2023-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Enable auxiliary cameras selector. -->
<bool name="config_enableAuxCameras">true</bool>
<!-- List of ID of auxiliary cameras that must be ignored by the app. -->
<string-array name="config_ignoredAuxCameraIds">
<item>0</item>
<item>2</item>
<item>3</item>
<item>5</item>
<item>6</item>
<item>7</item>
</string-array>
<!-- An array of triplets made of (camera ID, qualities, framerates).
<!-- Decide whether to ignore auxiliary cameras that
are logical (made of multiple physical sensors).
Set this to false if your camera HAL doesn't expose
one or more aux cameras as a standalone camera device.
Note that you will probably need to add
more camera IDs to ignoreCameraIds. -->
<bool name="config_ignoreLogicalAuxCameras">false</bool>
<!-- An array of triplets made of (camera ID, qualities, frame rates).
These video modes will be added to the available
quality/framerate combinations of a camera device.
quality/frame rate combinations of a camera device.
Make sure the device is able to handle those configurations
and maintain a stable framerate at any condition.
and maintain a stable frame rate at any condition.
Note that you can't add video qualities that aren't
exposed by the camera, only new framerates.
exposed by the camera, only new frame rates.
Valid values of resolution are:
- "sd" (480p)
- "hd" (720p)
- "fhd" (1080p)
- "uhd" (2160p)
Valid values of framerate are:
Valid values of frame rate are:
- "24"
- "30"
- "60"
- "120"
Additionally you can prepend `-` to frame rate to mark it as unsupported.
Example:
<string-array name="config_additionalVideoConfigurations">
<item>0</item> <item>sd|hd|fhd</item> <item>60|120</item>
<item>0</item> <item>uhd</item> <item>-60</item>
<item>1</item> <item>sd|hd|fhd</item> <item>60</item>
</string-array>
-->
<string-array name="config_additionalVideoConfigurations">
<item>0</item> <item>sd|hd|fhd|uhd</item> <item>60</item>
<item>1</item> <item>sd|hd|fhd</item> <item>60</item>
<item>2</item> <item>sd|hd|fhd|uhd</item> <item>60</item>
<item>3</item> <item>sd|hd|fhd|uhd</item> <item>60</item>
<item>4</item> <item>sd|hd|fhd|uhd</item> <item>60</item>
</string-array>
<!-- An array of triplets made of (camera ID, approximate zoom ratio, exact zoom ratio).
These values will be added to the lens selector if one or more cameras uses the
multi-camera API to let the user select which lens to use.
It's highly recommended to leave config_enableAuxCameras to false, since with
multi-camera API you only use a single camera device for all sensors.
You may enable it if you need auxiliary camera devices for a set of cameras on one
of the device's side (e.g. logical main back camera but multiple physical camera
devices on front), in that case if a main device side's lens is referenced here
all the auxiliary camera devices of that side will be ignored.
You may be able to get the exact zoom ratio needed to trigger the lens switch from
your stock camera app and observing the zoom ratio it sets with the following command:
adb shell dumpsys media.camera | grep 'android.control.zoomRatio' -1
Example for Google Pixel 7 Pro's back camera configuration:
<string-array name="config_logicalZoomRatios">
<item>0</item> <item>0.5</item> <item>0.55632502</item>
<item>0</item> <item>2.0</item> <item>2.0</item>
<item>0</item> <item>5.0</item> <item>5.0</item>
</string-array>
-->
<string-array name="config_logicalZoomRatios">
<item>4</item> <item>0.6</item> <item>0.64999998</item>
<item>4</item> <item>2.0</item> <item>2.0</item>
</string-array>
</resources>