From 48e33c5c8b27c0c5ea996da785b512593468aede Mon Sep 17 00:00:00 2001 From: Shuzhen Wang Date: Wed, 15 Feb 2023 16:48:33 -0800 Subject: Camera: document multiResolution raw behavior MultiResolution raw streams can be supported without the logical camera supports RAW capability. In addition, fix a typo and a mako formatting bug. Bug: 269221911 Bug: 266438441 Test: Build and read docs Change-Id: I4cef306a9aefdbc968e19fa36ca559426dda631f Merged-In: I4cef306a9aefdbc968e19fa36ca559426dda631f --- camera/docs/docs.html | 41 +++++++++++++++++----------------- camera/docs/metadata_definitions.xml | 43 ++++++++++++++++++------------------ 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/camera/docs/docs.html b/camera/docs/docs.html index 8b035a46..44bef143 100644 --- a/camera/docs/docs.html +++ b/camera/docs/docs.html @@ -19223,24 +19223,25 @@ wide-ultrawide lens configuration where the wide lens is the default, when camera's crop region is set to maximum size, the FOV of the physical streams for the ultrawide lens will be the same as the logical stream, by making the crop region smaller than its active array size to compensate for the smaller focal length.

-

There are two ways for the application to capture RAW images from a logical camera -with RAW capability:

+

For a logical camera, typically the underlying physical cameras have different RAW +capabilities (such as resolution or CFA pattern). There are two ways for the +application to capture RAW images from the logical camera:

The capture request and result metadata tags required for backward compatible camera functionalities will be solely based on the logical camera capability. On the other @@ -24013,7 +24014,7 @@ device.

An array of mandatory stream combinations which are applicable when device support the 10-bit output capability CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT -This is an app-readable conversion of the maximum resolution mandatory stream combination +This is an app-readable conversion of the 10 bit output mandatory stream combination tables.

@@ -24090,8 +24091,8 @@ device.

An array of mandatory stream combinations which are applicable when device lists {@code PREVIEW_STABILIZATION} in android.control.availableVideoStabilizationModes. -This is an app-readable conversion of the maximum resolution mandatory stream combination -tables.

+This is an app-readable conversion of the preview stabilization mandatory stream +combination tables.

diff --git a/camera/docs/metadata_definitions.xml b/camera/docs/metadata_definitions.xml index ce12f11c..10f997df 100644 --- a/camera/docs/metadata_definitions.xml +++ b/camera/docs/metadata_definitions.xml @@ -6117,24 +6117,25 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata ultrawide lens will be the same as the logical stream, by making the crop region smaller than its active array size to compensate for the smaller focal length. - There are two ways for the application to capture RAW images from a logical camera - with RAW capability: - - * Because the underlying physical cameras may have different RAW capabilities (such - as resolution or CFA pattern), to maintain backward compatibility, when a RAW stream - is configured, the camera device makes sure the default active physical camera remains - active and does not switch to other physical cameras. (One exception is that, if the - logical camera consists of identical image sensors and advertises multiple focalLength - due to different lenses, the camera device may generate RAW images from different - physical cameras based on the focalLength being set by the application.) This - backward-compatible approach usually results in loss of optical zoom, to telephoto - lens or to ultrawide lens. - * Alternatively, to take advantage of the full zoomRatio range of the logical camera, - the application should use {@link android.hardware.camera2.MultiResolutionImageReader} - to capture RAW images from the currently active physical camera. Because different - physical camera may have different RAW characteristics, the application needs to use - the characteristics and result metadata of the active physical camera for the - relevant RAW metadata. + For a logical camera, typically the underlying physical cameras have different RAW + capabilities (such as resolution or CFA pattern). There are two ways for the + application to capture RAW images from the logical camera: + + * If the logical camera has RAW capability, the application can create and use RAW + streams in the same way as before. In case a RAW stream is configured, to maintain + backward compatibility, the camera device makes sure the default active physical + camera remains active and does not switch to other physical cameras. (One exception + is that, if the logical camera consists of identical image sensors and advertises + multiple focalLength due to different lenses, the camera device may generate RAW + images from different physical cameras based on the focalLength being set by the + application.) This backward-compatible approach usually results in loss of optical + zoom, to telephoto lens or to ultrawide lens. + * Alternatively, if supported by the device, + {@link android.hardware.camera2.MultiResolutionImageReader} + can be used to capture RAW images from one of the underlying physical cameras ( + depending on current zoom level). Because different physical cameras may have + different RAW characteristics, the application needs to use the characteristics + and result metadata of the active physical camera for the relevant RAW metadata. The capture request and result metadata tags required for backward compatible camera functionalities will be solely based on the logical camera capability. On the other @@ -8515,7 +8516,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata An array of mandatory stream combinations which are applicable when device support the 10-bit output capability {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT} - This is an app-readable conversion of the maximum resolution mandatory stream combination + This is an app-readable conversion of the 10 bit output mandatory stream combination {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.
@@ -8546,8 +8547,8 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata An array of mandatory stream combinations which are applicable when device lists {@code PREVIEW_STABILIZATION} in android.control.availableVideoStabilizationModes. - This is an app-readable conversion of the maximum resolution mandatory stream combination - {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}. + This is an app-readable conversion of the preview stabilization mandatory stream + combination {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.
The array of -- cgit v1.2.3 From 28c0e60414056c26a936ed8ea13753b42c1b9d28 Mon Sep 17 00:00:00 2001 From: Andy Hung Date: Thu, 9 Mar 2023 20:43:35 -0800 Subject: Spatial Audio: Add SPATIALIZER_PARAM_FOLD_STATE Test: adb logcat, verify spatializer effect messages Bug: 271595745 Change-Id: I59e32980516ce524028bb5792b2d2c7466632b7e --- .../system/audio_effects/effect_spatializer.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/audio/include/system/audio_effects/effect_spatializer.h b/audio/include/system/audio_effects/effect_spatializer.h index 2f853ea7..971d0e3c 100644 --- a/audio/include/system/audio_effects/effect_spatializer.h +++ b/audio/include/system/audio_effects/effect_spatializer.h @@ -47,8 +47,27 @@ typedef enum SPATIALIZER_PARAM_HEAD_TO_STAGE, // foldable device hinge angle as a float value in rad SPATIALIZER_PARAM_HINGE_ANGLE, - // Display orientation as a float value in rad + + // The default display orientation as reported by DisplayManager. + // + // The DisplayManager reports 0, 90, 180, 270 degrees, + // here it is reported as a float value in radians. + // Only 4 values 0, PI/2, PI, 3PI/2 will be sent as of Android 14 (U). + // Due to precision, compare with an epsilon range, suggest + // rounding to the nearest integer degree for practical use. + // + // Notes: + // 1) A device may have more than one display. + // 2) A display may be locked which prevents the application from rotating. SPATIALIZER_PARAM_DISPLAY_ORIENTATION, + + // The fold state as reported by DeviceStateManager for a foldable. + // This is an integer value of either 0 (open) or 1 (folded). + // + // The device fold state may affect which display is active (if any). + // The open/closed logical state differs than the hinge angle, + // which may be reported by a hinge sensor. + SPATIALIZER_PARAM_FOLD_STATE, } t_virtualizer_stage_params; // See SpatializationLevel.aidl -- cgit v1.2.3