Merge "mutateOperationOperandTypeSkip for new DEPTHWISE_CONV_2D variant."
diff --git a/.clang-format b/.clang-format
index 9b3f9d9..3494682 100644
--- a/.clang-format
+++ b/.clang-format
@@ -22,3 +22,4 @@
TabWidth: 4
UseTab: Never
IndentWidth: 4
+ContinuationIndentWidth: 8
diff --git a/bluetooth/audio/2.0/Android.bp b/bluetooth/audio/2.0/Android.bp
new file mode 100644
index 0000000..6049fe2
--- /dev/null
+++ b/bluetooth/audio/2.0/Android.bp
@@ -0,0 +1,32 @@
+hidl_interface {
+ name: "android.hardware.bluetooth.audio@2.0",
+ root: "android.hardware",
+ vndk: {
+ enabled: true,
+ },
+ srcs: [
+ "types.hal",
+ "IBluetoothAudioPort.hal",
+ "IBluetoothAudioProvider.hal",
+ "IBluetoothAudioProvidersFactory.hal",
+ ],
+ interfaces: [
+ "android.hidl.base@1.0",
+ "android.hardware.audio.common@5.0",
+ ],
+ types: [
+ "AacObjectType",
+ "BitsPerSample",
+ "ChannelMode",
+ "CodecConfiguration",
+ "CodecType",
+ "LdacChannelMode",
+ "SampleRate",
+ "SbcChannelMode",
+ "SessionType",
+ "Status",
+ "TimeSpec",
+ ],
+ gen_java: false,
+}
+
diff --git a/bluetooth/audio/2.0/IBluetoothAudioPort.hal b/bluetooth/audio/2.0/IBluetoothAudioPort.hal
new file mode 100644
index 0000000..17d13b8
--- /dev/null
+++ b/bluetooth/audio/2.0/IBluetoothAudioPort.hal
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.audio@2.0;
+
+import android.hardware.audio.common@5.0::SourceMetadata;
+
+/**
+ * HAL interface from the Audio HAL to the Bluetooth stack
+ *
+ * The Audio HAL calls methods in this interface to start, suspend, and stop
+ * an audio stream. These calls return immediately and the results, if any,
+ * are sent over the IBluetoothAudioProvider interface.
+ *
+ * Moreover, the Audio HAL can also get the presentation position of the stream
+ * and provide stream metadata.
+ */
+interface IBluetoothAudioPort {
+ /**
+ * This indicates that the caller of this method has opened the data path
+ * and wants to start an audio stream. The caller must wait for a
+ * IBluetoothAudioProvider.streamStarted(Status) call.
+ */
+ startStream();
+
+ /**
+ * This indicates that the caller of this method wants to suspend the audio
+ * stream. The caller must wait for the Bluetooth process to call
+ * IBluetoothAudioProvider.streamSuspended(Status). The caller still keeps
+ * the data path open.
+ */
+ suspendStream();
+
+ /**
+ * This indicates that the caller of this method wants to stop the audio
+ * stream. The data path will be closed after this call. There is no
+ * callback from the IBluetoothAudioProvider interface even though the
+ * teardown is asynchronous.
+ */
+ stopStream();
+
+ /**
+ * Get the audio presentation position.
+ *
+ * @return status the command status
+ * @return remoteDeviceAudioDelayNanos the audio delay from when the remote
+ * device (e.g. headset) receives audio data to when the device plays the
+ * sound. If the delay is unknown, the value is set to zero.
+ * @return transmittedOctets the number of audio data octets that were sent
+ * to a remote device. This excludes octets that have been written to the
+ * data path but have not been sent to the remote device. The count is
+ * not reset until stopStream() is called. If the software data path is
+ * unused (e.g. A2DP Hardware Offload), the value is set to 0.
+ * @return transmittedOctetsTimeStamp the value of CLOCK_MONOTONIC
+ * corresponding to transmittedOctets. If the software data path is
+ * unused (e.g., for A2DP Hardware Offload), the value is set to zero.
+ */
+ getPresentationPosition() generates (Status status,
+ uint64_t remoteDeviceAudioDelayNanos, uint64_t transmittedOctets,
+ TimeSpec transmittedOctetsTimeStamp);
+
+ /**
+ * Called when the metadata of the stream's source has been changed.
+ *
+ * @param sourceMetadata Description of the audio that is played by the
+ * clients.
+ */
+ updateMetadata(SourceMetadata sourceMetadata);
+};
diff --git a/bluetooth/audio/2.0/IBluetoothAudioProvider.hal b/bluetooth/audio/2.0/IBluetoothAudioProvider.hal
new file mode 100644
index 0000000..bb5eb1b
--- /dev/null
+++ b/bluetooth/audio/2.0/IBluetoothAudioProvider.hal
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.audio@2.0;
+
+import IBluetoothAudioPort;
+
+/**
+ * HAL interface from the Bluetooth stack to the Audio HAL
+ *
+ * The Bluetooth stack calls methods in this interface to start and end audio
+ * sessions and sends callback events to the Audio HAL.
+ */
+interface IBluetoothAudioProvider {
+
+ /**
+ * This method indicates that the Bluetooth stack is ready to stream audio.
+ * It registers an instance of IBluetoothAudioPort with and provides the
+ * current negotiated codec to the Audio HAL. After this method is called,
+ * the Audio HAL can invoke IBluetoothAudioPort.startStream().
+ *
+ * Note: endSession() must be called to unregister this IBluetoothAudioPort
+ *
+ * @param hostIf An instance of IBluetoothAudioPort for stream control
+ * @param codecConfig The codec configuration negotiated with the remote
+ * device
+ *
+ * @return status One of the following
+ * SUCCESS if this IBluetoothAudioPort was successfully registered with
+ * the Audio HAL
+ * UNSUPPORTED_CODEC_CONFIGURATION if the Audio HAL cannot register this
+ * IBluetoothAudioPort with the given codec configuration
+ * FAILURE if the Audio HAL cannot register this IBluetoothAudioPort for
+ * any other reason
+ * @return dataMQ The fast message queue for audio data from this provider.
+ * Audio data will be in PCM format as specified by the
+ * codecConfig.pcmDataConfiguration parameter.
+ * nullptr if streaming is offloaded to hardware or on failure.
+ */
+ startSession(IBluetoothAudioPort hostIf, CodecConfiguration codecConfig)
+ generates (Status status, fmq_sync<uint8_t> dataMQ);
+
+ /**
+ * Callback for IBluetoothAudioPort.startStream()
+ *
+ * @param status SUCCESS or FAILURE
+ */
+ streamStarted(Status status);
+
+ /**
+ * Callback for IBluetoothAudioPort.suspendStream()
+ *
+ * @param status SUCCESS or FAILURE
+ */
+ streamSuspended(Status status);
+
+ /**
+ * Ends the current session and unregisters the IBluetoothAudioPort
+ * interface.
+ */
+ endSession();
+};
diff --git a/bluetooth/audio/2.0/IBluetoothAudioProvidersFactory.hal b/bluetooth/audio/2.0/IBluetoothAudioProvidersFactory.hal
new file mode 100644
index 0000000..56b8594
--- /dev/null
+++ b/bluetooth/audio/2.0/IBluetoothAudioProvidersFactory.hal
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.audio@2.0;
+
+import IBluetoothAudioProvider;
+
+/**
+ * This factory allows a HAL implementation to be split into multiple
+ * independent providers.
+ *
+ * When the Bluetooth stack is ready to create an audio session, it must first
+ * obtain the IBluetoothAudioProvider for that session type by calling
+ * openProvider().
+ */
+interface IBluetoothAudioProvidersFactory {
+
+ /**
+ * Opens an audio provider for a session type. To close the provider, it is
+ * necessary to release references to the returned provider object.
+ *
+ * @param sessionType The session type (e.g.
+ * A2DP_SOFTWARE_ENCODING_DATAPATH).
+ *
+ * @return status One of the following
+ * SUCCESS if the Audio HAL successfully opens the provider with the
+ * given session type
+ * FAILURE if the Audio HAL cannot open the provider
+ * @return provider The provider of the specified session type
+ */
+ openProvider(SessionType sessionType)
+ generates (Status status, IBluetoothAudioProvider provider);
+};
diff --git a/bluetooth/audio/2.0/types.hal b/bluetooth/audio/2.0/types.hal
new file mode 100644
index 0000000..9286948
--- /dev/null
+++ b/bluetooth/audio/2.0/types.hal
@@ -0,0 +1,170 @@
+/*
+ * Copyright 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.bluetooth.audio@2.0;
+
+/**
+ * POSIX timespec.
+ */
+struct TimeSpec {
+ uint64_t tvSec; // seconds
+ uint64_t tvNSec; // nanoseconds
+};
+
+enum Status : uint8_t {
+ SUCCESS = 0x00,
+ /** Codec configuration not supported by the audio platform */
+ UNSUPPORTED_CODEC_CONFIGURATION,
+ /** Any other failure */
+ FAILURE,
+};
+
+enum SessionType : uint8_t {
+ UNKNOWN,
+ /** A2DP legacy that AVDTP media is encoded by Bluetooth Stack */
+ A2DP_SOFTWARE_ENCODING_DATAPATH,
+ /** The encoding of AVDTP media is done by HW and there is control only */
+ A2DP_HARDWARE_OFFLOAD_DATAPATH,
+ /** Used when encoded by Bluetooth Stack and streaming to Hearing Aid */
+ HEARING_AID_SOFTWARE_ENCODING_DATAPATH,
+};
+
+enum CodecType : uint32_t {
+ UNKNOWN = 0x00,
+ SBC = 0x01,
+ AAC = 0x02,
+ APTX = 0x04,
+ APTX_HD = 0x08,
+ LDAC = 0x10,
+};
+
+enum SampleRate : uint32_t {
+ RATE_UNKNOWN = 0x00,
+ RATE_44100 = 0x01,
+ RATE_48000 = 0x02,
+ RATE_88200 = 0x04,
+ RATE_96000 = 0x08,
+ RATE_176400 = 0x10,
+ RATE_192000 = 0x20,
+ RATE_16000 = 0x40,
+ RATE_24000 = 0x80,
+};
+
+enum BitsPerSample : uint8_t {
+ BITS_UNKNOWN = 0x00,
+ BITS_16 = 0x01,
+ BITS_24 = 0x02,
+ BITS_32 = 0x04,
+};
+
+enum ChannelMode : uint8_t {
+ UNKNOWN = 0x00,
+ MONO = 0x01,
+ STEREO = 0x02,
+};
+
+enum SbcChannelMode : uint8_t {
+ /** Channel Mode: 4 bits */
+ UNKNOWN = 0x00,
+ JOINT_STEREO = 0x01,
+ STEREO = 0x02,
+ DUAL = 0x04,
+ MONO = 0x08,
+};
+
+enum AacObjectType : uint8_t {
+ /** MPEG-2 Low Complexity. Support is Mandatory. */
+ MPEG2_LC = 0x80,
+ /** MPEG-4 Low Complexity. Support is Optional. */
+ MPEG4_LC = 0x40,
+ /** MPEG-4 Long Term Prediction. Support is Optional. */
+ MPEG4_LTP = 0x20,
+ /** MPEG-4 Scalable. Support is Optional. */
+ MPEG4_SCALABLE = 0x10,
+};
+
+enum LdacChannelMode : uint8_t {
+ /** Channel Mode: 3 bits */
+ UNKNOWN = 0x00,
+ STEREO = 0x01,
+ DUAL = 0x02,
+ MONO = 0x04,
+};
+
+struct CodecConfiguration {
+ /** Audio PCM data configuration */
+ struct PcmDataConfiguration {
+ /** Sampling rate for encoder */
+ SampleRate sampleRate;
+ /** Bits per sample for encoder */
+ BitsPerSample bitsPerSample;
+ /** Channel mode for encoder */
+ ChannelMode channelMode;
+ } pcmDataConfiguration;
+
+ /** Encoded audio data codec configuration. It is used only if the
+ * HAL is responsible for encoding the PCM audio data. */
+ struct EncodedDataConfiguration {
+ /** Bluetooth A2DP codec */
+ CodecType codecType;
+ /**
+ * The encoded audio bitrate in bits / second.
+ * 0x00000000 - The audio bitrate is not specified / unused
+ * 0x00000001 - 0x00FFFFFF - Encoded audio bitrate in bits/second
+ * 0x01000000 - 0xFFFFFFFF - Reserved
+ */
+ uint32_t encodedAudioBitrate;
+ /** Peer MTU (in octets) */
+ uint16_t peerMtu;
+ /** Content protection by SCMS-T */
+ bool isScmstEnabled;
+ safe_union CodecSpecific {
+ /**
+ * SBC Codec specific information
+ * Refer to SBC Codec specific information elements in A2DP v1.3
+ * Profile Specification.
+ */
+ struct SbcData {
+ /** Reserved: 4 bits | Channel Mode: 4 bits */
+ SbcChannelMode channelMode;
+ /** Block length: 4 bits | Subbands: 2 bits | Allocation Method: 2 bits */
+ uint8_t codecParameters;
+ /** Minimum bitpool value */
+ uint8_t minBitpool;
+ /** Maximum bitpool value */
+ uint8_t maxBitpool;
+ } sbcData;
+ struct AacData {
+ /** AAC Object Type */
+ AacObjectType aacObjectType;
+ /** True if Variable Bit Rate is enabled */
+ bool variableBitRateEnabled;
+ } aacData;
+ struct LdacData {
+ /** Reserved: 5 bits | Channel Mode: 3 bits */
+ LdacChannelMode channelMode;
+ /**
+ * LDAC bitrate index value:
+ * 0x00 - High
+ * 0x01 - Mid
+ * 0x02 - Low
+ * 0x7F - ABR (Adaptive Bit Rate)
+ */
+ uint8_t bitrateIndex;
+ } ldacData;
+ } codecSpecific;
+ } encodedDataConfiguration;
+};
diff --git a/camera/device/3.4/types.hal b/camera/device/3.4/types.hal
index bf2b3fc..8ee826b 100644
--- a/camera/device/3.4/types.hal
+++ b/camera/device/3.4/types.hal
@@ -164,6 +164,9 @@
* If non-zero, read settings from request queue instead
* (see ICameraDeviceSession.getCaptureRequestMetadataQueue).
* If zero, read settings from .settings field.
+ *
+ * The v3_2 settings metadata is read first from the FMQ, followed by
+ * the physical cameras' settings metadata starting from index 0.
*/
uint64_t fmqSettingsSize;
@@ -238,6 +241,9 @@
* If non-zero, read metadata from result metadata queue instead
* (see ICameraDeviceSession.getCaptureResultMetadataQueue).
* If zero, read metadata from .metadata field.
+ *
+ * The v3_2 CaptureResult metadata is read first from the FMQ, followed by
+ * the physical cameras' metadata starting from index 0.
*/
uint64_t fmqMetadataSize;
@@ -251,9 +257,6 @@
/**
* If fmqMetadataSize is zero, the metadata buffer contains the metadata
* for the physical device with physicalCameraId.
- *
- * The v3_2 CaptureResult metadata is read first from the FMQ, followed by
- * the physical cameras' metadata starting from index 0.
*/
CameraMetadata metadata;
};
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index 71b78f4..233c5d2 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -651,7 +651,8 @@
void createStreamConfiguration(const ::android::hardware::hidl_vec<V3_2::Stream>& streams3_2,
StreamConfigurationMode configMode,
::android::hardware::camera::device::V3_2::StreamConfiguration *config3_2,
- ::android::hardware::camera::device::V3_4::StreamConfiguration *config3_4);
+ ::android::hardware::camera::device::V3_4::StreamConfiguration *config3_4,
+ uint32_t jpegBufferSize = 0);
void configurePreviewStreams3_4(const std::string &name, int32_t deviceVersion,
sp<ICameraProvider> provider,
@@ -673,6 +674,8 @@
static Status getAvailableOutputStreams(camera_metadata_t *staticMeta,
std::vector<AvailableStream> &outputStreams,
const AvailableStream *threshold = nullptr);
+ static Status getJpegBufferSize(camera_metadata_t *staticMeta,
+ uint32_t* outBufSize);
static Status isConstrainedModeAvailable(camera_metadata_t *staticMeta);
static Status isLogicalMultiCamera(camera_metadata_t *staticMeta);
static Status getPhysicalCameraIds(camera_metadata_t *staticMeta,
@@ -2511,6 +2514,10 @@
ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta, outputStreams));
ASSERT_NE(0u, outputStreams.size());
+ uint32_t jpegBufferSize = 0;
+ ASSERT_EQ(Status::OK, getJpegBufferSize(staticMeta, &jpegBufferSize));
+ ASSERT_NE(0u, jpegBufferSize);
+
int32_t streamId = 0;
for (auto& it : outputStreams) {
V3_2::Stream stream3_2;
@@ -2527,7 +2534,7 @@
::android::hardware::camera::device::V3_4::StreamConfiguration config3_4;
::android::hardware::camera::device::V3_2::StreamConfiguration config3_2;
createStreamConfiguration(streams3_2, StreamConfigurationMode::NORMAL_MODE,
- &config3_2, &config3_4);
+ &config3_2, &config3_4, jpegBufferSize);
if (session3_4 != nullptr) {
ret = session3_4->configureStreams_3_4(config3_4,
[streamId](Status s, device::V3_4::HalStreamConfiguration halConfig) {
@@ -2587,6 +2594,10 @@
ASSERT_EQ(Status::OK, getAvailableOutputStreams(staticMeta, outputStreams));
ASSERT_NE(0u, outputStreams.size());
+ uint32_t jpegBufferSize = 0;
+ ASSERT_EQ(Status::OK, getJpegBufferSize(staticMeta, &jpegBufferSize));
+ ASSERT_NE(0u, jpegBufferSize);
+
int32_t streamId = 0;
V3_2::Stream stream3_2 = {streamId++,
StreamType::OUTPUT,
@@ -2600,7 +2611,7 @@
::android::hardware::camera::device::V3_4::StreamConfiguration config3_4;
::android::hardware::camera::device::V3_2::StreamConfiguration config3_2;
createStreamConfiguration(streams, StreamConfigurationMode::NORMAL_MODE,
- &config3_2, &config3_4);
+ &config3_2, &config3_4, jpegBufferSize);
if(session3_4 != nullptr) {
ret = session3_4->configureStreams_3_4(config3_4,
[](Status s, device::V3_4::HalStreamConfiguration) {
@@ -2632,7 +2643,7 @@
StreamRotation::ROTATION_0};
streams[0] = stream3_2;
createStreamConfiguration(streams, StreamConfigurationMode::NORMAL_MODE,
- &config3_2, &config3_4);
+ &config3_2, &config3_4, jpegBufferSize);
if(session3_4 != nullptr) {
ret = session3_4->configureStreams_3_4(config3_4, [](Status s,
device::V3_4::HalStreamConfiguration) {
@@ -2662,7 +2673,7 @@
StreamRotation::ROTATION_0};
streams[0] = stream3_2;
createStreamConfiguration(streams, StreamConfigurationMode::NORMAL_MODE,
- &config3_2, &config3_4);
+ &config3_2, &config3_4, jpegBufferSize);
if(session3_4 != nullptr) {
ret = session3_4->configureStreams_3_4(config3_4,
[](Status s, device::V3_4::HalStreamConfiguration) {
@@ -2691,7 +2702,7 @@
static_cast<StreamRotation>(UINT32_MAX)};
streams[0] = stream3_2;
createStreamConfiguration(streams, StreamConfigurationMode::NORMAL_MODE,
- &config3_2, &config3_4);
+ &config3_2, &config3_4, jpegBufferSize);
if(session3_4 != nullptr) {
ret = session3_4->configureStreams_3_4(config3_4,
[](Status s, device::V3_4::HalStreamConfiguration) {
@@ -2758,6 +2769,10 @@
ASSERT_EQ(Status::OK, getZSLInputOutputMap(staticMeta, inputOutputMap));
ASSERT_NE(0u, inputOutputMap.size());
+ uint32_t jpegBufferSize = 0;
+ ASSERT_EQ(Status::OK, getJpegBufferSize(staticMeta, &jpegBufferSize));
+ ASSERT_NE(0u, jpegBufferSize);
+
int32_t streamId = 0;
for (auto& inputIter : inputOutputMap) {
AvailableStream input;
@@ -2802,7 +2817,7 @@
::android::hardware::camera::device::V3_4::StreamConfiguration config3_4;
::android::hardware::camera::device::V3_2::StreamConfiguration config3_2;
createStreamConfiguration(streams, StreamConfigurationMode::NORMAL_MODE,
- &config3_2, &config3_4);
+ &config3_2, &config3_4, jpegBufferSize);
if (session3_4 != nullptr) {
ret = session3_4->configureStreams_3_4(config3_4,
[](Status s, device::V3_4::HalStreamConfiguration halConfig) {
@@ -2832,7 +2847,7 @@
}
}
-// Check wehether session parameters are supported. If Hal support for them
+// Check whether session parameters are supported. If Hal support for them
// exist, then try to configure a preview stream using them.
TEST_F(CameraHidlTest, configureStreamsWithSessionParameters) {
hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames(mProvider);
@@ -2894,6 +2909,7 @@
GRALLOC1_CONSUMER_USAGE_HWCOMPOSER,
0,
StreamRotation::ROTATION_0};
+ previewStream.bufferSize = 0;
::android::hardware::hidl_vec<V3_4::Stream> streams = {previewStream};
::android::hardware::camera::device::V3_4::StreamConfiguration config;
config.streams = streams;
@@ -2955,6 +2971,10 @@
&previewThreshold));
ASSERT_NE(0u, outputPreviewStreams.size());
+ uint32_t jpegBufferSize = 0;
+ ASSERT_EQ(Status::OK, getJpegBufferSize(staticMeta, &jpegBufferSize));
+ ASSERT_NE(0u, jpegBufferSize);
+
int32_t streamId = 0;
for (auto& blobIter : outputBlobStreams) {
for (auto& previewIter : outputPreviewStreams) {
@@ -2979,7 +2999,7 @@
::android::hardware::camera::device::V3_4::StreamConfiguration config3_4;
::android::hardware::camera::device::V3_2::StreamConfiguration config3_2;
createStreamConfiguration(streams, StreamConfigurationMode::NORMAL_MODE,
- &config3_2, &config3_4);
+ &config3_2, &config3_4, jpegBufferSize);
if (session3_4 != nullptr) {
ret = session3_4->configureStreams_3_4(config3_4,
[](Status s, device::V3_4::HalStreamConfiguration halConfig) {
@@ -3220,6 +3240,10 @@
&videoThreshold));
ASSERT_NE(0u, outputVideoStreams.size());
+ uint32_t jpegBufferSize = 0;
+ ASSERT_EQ(Status::OK, getJpegBufferSize(staticMeta, &jpegBufferSize));
+ ASSERT_NE(0u, jpegBufferSize);
+
int32_t streamId = 0;
for (auto& blobIter : outputBlobStreams) {
for (auto& videoIter : outputVideoStreams) {
@@ -3243,7 +3267,7 @@
::android::hardware::camera::device::V3_4::StreamConfiguration config3_4;
::android::hardware::camera::device::V3_2::StreamConfiguration config3_2;
createStreamConfiguration(streams, StreamConfigurationMode::NORMAL_MODE,
- &config3_2, &config3_4);
+ &config3_2, &config3_4, jpegBufferSize);
if (session3_4 != nullptr) {
ret = session3_4->configureStreams_3_4(config3_4,
[](Status s, device::V3_4::HalStreamConfiguration halConfig) {
@@ -4143,6 +4167,23 @@
return Status::OK;
}
+// Get max jpeg buffer size in android.jpeg.maxSize
+Status CameraHidlTest::getJpegBufferSize(camera_metadata_t *staticMeta, uint32_t* outBufSize) {
+ if (nullptr == staticMeta || nullptr == outBufSize) {
+ return Status::ILLEGAL_ARGUMENT;
+ }
+
+ camera_metadata_ro_entry entry;
+ int rc = find_camera_metadata_ro_entry(staticMeta,
+ ANDROID_JPEG_MAX_SIZE, &entry);
+ if ((0 != rc) || (1 != entry.count)) {
+ return Status::ILLEGAL_ARGUMENT;
+ }
+
+ *outBufSize = static_cast<uint32_t>(entry.data.i32[0]);
+ return Status::OK;
+}
+
// Check if the camera device has logical multi-camera capability.
Status CameraHidlTest::isLogicalMultiCamera(camera_metadata_t *staticMeta) {
Status ret = Status::METHOD_NOT_SUPPORTED;
@@ -4394,7 +4435,8 @@
const ::android::hardware::hidl_vec<V3_2::Stream>& streams3_2,
StreamConfigurationMode configMode,
::android::hardware::camera::device::V3_2::StreamConfiguration *config3_2 /*out*/,
- ::android::hardware::camera::device::V3_4::StreamConfiguration *config3_4 /*out*/) {
+ ::android::hardware::camera::device::V3_4::StreamConfiguration *config3_4 /*out*/,
+ uint32_t jpegBufferSize) {
ASSERT_NE(nullptr, config3_2);
ASSERT_NE(nullptr, config3_4);
@@ -4403,6 +4445,11 @@
for (auto& stream3_2 : streams3_2) {
V3_4::Stream stream;
stream.v3_2 = stream3_2;
+ stream.bufferSize = 0;
+ if (stream3_2.format == PixelFormat::BLOB &&
+ stream3_2.dataSpace == static_cast<V3_2::DataspaceFlags>(Dataspace::V0_JFIF)) {
+ stream.bufferSize = jpegBufferSize;
+ }
streams3_4[idx++] = stream;
}
*config3_4 = {streams3_4, configMode, {}};
@@ -4580,6 +4627,11 @@
outputPreviewStreams.clear();
auto rc = getAvailableOutputStreams(staticMeta,
outputPreviewStreams, previewThreshold);
+
+ uint32_t jpegBufferSize = 0;
+ ASSERT_EQ(Status::OK, getJpegBufferSize(staticMeta, &jpegBufferSize));
+ ASSERT_NE(0u, jpegBufferSize);
+
free_camera_metadata(staticMeta);
ASSERT_EQ(Status::OK, rc);
ASSERT_FALSE(outputPreviewStreams.empty());
@@ -4593,7 +4645,7 @@
::android::hardware::camera::device::V3_2::StreamConfiguration config3_2;
::android::hardware::camera::device::V3_4::StreamConfiguration config3_4;
createStreamConfiguration(streams3_2, StreamConfigurationMode::NORMAL_MODE,
- &config3_2, &config3_4);
+ &config3_2, &config3_4, jpegBufferSize);
if (session3_4 != nullptr) {
RequestTemplate reqTemplate = RequestTemplate::PREVIEW;
ret = session3_4->constructDefaultRequestSettings(reqTemplate,
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index 0bd297b..6fc3777 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -80,6 +80,14 @@
</interface>
</hal>
<hal format="hidl" optional="true">
+ <name>android.hardware.bluetooth.audio</name>
+ <version>2.0</version>
+ <interface>
+ <name>IBluetoothAudioProvidersFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
<name>android.hardware.boot</name>
<version>1.0</version>
<interface>
@@ -314,7 +322,7 @@
</hal>
<hal format="hidl" optional="true">
<name>android.hardware.radio</name>
- <version>1.0-2</version>
+ <version>1.4</version>
<interface>
<name>IRadio</name>
<instance>slot1</instance>
@@ -328,7 +336,7 @@
</hal>
<hal format="hidl" optional="true">
<name>android.hardware.radio.config</name>
- <version>1.0</version>
+ <version>1.2</version>
<interface>
<name>IRadioConfig</name>
<instance>default</instance>
diff --git a/current.txt b/current.txt
index 2e57feb..61dae6d 100644
--- a/current.txt
+++ b/current.txt
@@ -386,6 +386,7 @@
# ABI preserving changes to HALs during Android Q
f72d23278af99a2f6a9c1d40352b67dbf1f582282f799f88f7235dc7c13892b5 android.hardware.camera.device@3.2::ICameraDeviceSession
+e96190f635b8458b92525bd6e040fec4ccbac22fdd4bc7274a9794ab976362f7 android.hardware.camera.device@3.4::types
da33234403ff5d60f3473711917b9948e6484a4260b5247acdafb111193a9de2 android.hardware.configstore@1.0::ISurfaceFlingerConfigs
21165b8e30c4b2d52980e4728f661420adc16e38bbe73476c06b2085be908f4c android.hardware.gnss@1.0::IGnssCallback
d702fb01dc2a0733aa820b7eb65435ee3334f75632ef880bafd2fb8803a20a58 android.hardware.gnss@1.0::IGnssMeasurementCallback
diff --git a/graphics/allocator/2.0/default/OWNERS b/graphics/allocator/2.0/default/OWNERS
index 3aa5fa1..273cb4c 100644
--- a/graphics/allocator/2.0/default/OWNERS
+++ b/graphics/allocator/2.0/default/OWNERS
@@ -1,4 +1,4 @@
# Graphics team
jessehall@google.com
-olv@google.com
+marissaw@google.com
stoza@google.com
diff --git a/graphics/allocator/2.0/utils/OWNERS b/graphics/allocator/2.0/utils/OWNERS
index 3aa5fa1..273cb4c 100644
--- a/graphics/allocator/2.0/utils/OWNERS
+++ b/graphics/allocator/2.0/utils/OWNERS
@@ -1,4 +1,4 @@
# Graphics team
jessehall@google.com
-olv@google.com
+marissaw@google.com
stoza@google.com
diff --git a/graphics/composer/2.1/default/OWNERS b/graphics/composer/2.1/default/OWNERS
index 4714be2..db8fb80 100644
--- a/graphics/composer/2.1/default/OWNERS
+++ b/graphics/composer/2.1/default/OWNERS
@@ -1,5 +1,6 @@
# Graphics team
courtneygo@google.com
jessehall@google.com
-olv@google.com
+lpy@google.com
stoza@google.com
+vhau@google.com
diff --git a/graphics/composer/2.1/utils/OWNERS b/graphics/composer/2.1/utils/OWNERS
index d515a23..5acc631 100644
--- a/graphics/composer/2.1/utils/OWNERS
+++ b/graphics/composer/2.1/utils/OWNERS
@@ -1,4 +1,5 @@
courtneygo@google.com
jessehall@google.com
-olv@google.com
+lpy@google.com
stoza@google.com
+vhau@google.com
diff --git a/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp b/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp
index 366d641..3d138f7 100644
--- a/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp
+++ b/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp
@@ -1921,8 +1921,8 @@
mHwc1Id(0),
mHasUnsupportedPlaneAlpha(false) {}
-bool HWC2On1Adapter::SortLayersByZ::operator()(
- const std::shared_ptr<Layer>& lhs, const std::shared_ptr<Layer>& rhs) {
+bool HWC2On1Adapter::SortLayersByZ::operator()(const std::shared_ptr<Layer>& lhs,
+ const std::shared_ptr<Layer>& rhs) const {
return lhs->getZ() < rhs->getZ();
}
diff --git a/graphics/composer/2.1/utils/hwc2on1adapter/include/hwc2on1adapter/HWC2On1Adapter.h b/graphics/composer/2.1/utils/hwc2on1adapter/include/hwc2on1adapter/HWC2On1Adapter.h
index 3badfce..da771dc 100644
--- a/graphics/composer/2.1/utils/hwc2on1adapter/include/hwc2on1adapter/HWC2On1Adapter.h
+++ b/graphics/composer/2.1/utils/hwc2on1adapter/include/hwc2on1adapter/HWC2On1Adapter.h
@@ -130,8 +130,8 @@
class SortLayersByZ {
public:
- bool operator()(const std::shared_ptr<Layer>& lhs,
- const std::shared_ptr<Layer>& rhs);
+ bool operator()(const std::shared_ptr<Layer>& lhs,
+ const std::shared_ptr<Layer>& rhs) const;
};
// The semantics of the fences returned by the device differ between
diff --git a/graphics/composer/2.1/vts/OWNERS b/graphics/composer/2.1/vts/OWNERS
index ef69d7c..0b42d2e 100644
--- a/graphics/composer/2.1/vts/OWNERS
+++ b/graphics/composer/2.1/vts/OWNERS
@@ -1,6 +1,7 @@
# Graphics team
-olv@google.com
+lpy@google.com
+vhau@google.com
# VTS team
yim@google.com
-zhuoyao@google.com
\ No newline at end of file
+zhuoyao@google.com
diff --git a/graphics/composer/2.2/default/OWNERS b/graphics/composer/2.2/default/OWNERS
index 4714be2..db8fb80 100644
--- a/graphics/composer/2.2/default/OWNERS
+++ b/graphics/composer/2.2/default/OWNERS
@@ -1,5 +1,6 @@
# Graphics team
courtneygo@google.com
jessehall@google.com
-olv@google.com
+lpy@google.com
stoza@google.com
+vhau@google.com
diff --git a/graphics/composer/2.2/utils/OWNERS b/graphics/composer/2.2/utils/OWNERS
index 1beb074..a17a50c 100644
--- a/graphics/composer/2.2/utils/OWNERS
+++ b/graphics/composer/2.2/utils/OWNERS
@@ -1,7 +1,8 @@
# Graphics team
courtneygo@google.com
-olv@google.com
+lpy@google.com
stoza@google.com
+vhau@google.com
# VTS team
yim@google.com
diff --git a/graphics/composer/2.2/vts/functional/OWNERS b/graphics/composer/2.2/vts/functional/OWNERS
index 1beb074..a17a50c 100644
--- a/graphics/composer/2.2/vts/functional/OWNERS
+++ b/graphics/composer/2.2/vts/functional/OWNERS
@@ -1,7 +1,8 @@
# Graphics team
courtneygo@google.com
-olv@google.com
+lpy@google.com
stoza@google.com
+vhau@google.com
# VTS team
yim@google.com
diff --git a/graphics/mapper/2.0/default/OWNERS b/graphics/mapper/2.0/default/OWNERS
index 3aa5fa1..273cb4c 100644
--- a/graphics/mapper/2.0/default/OWNERS
+++ b/graphics/mapper/2.0/default/OWNERS
@@ -1,4 +1,4 @@
# Graphics team
jessehall@google.com
-olv@google.com
+marissaw@google.com
stoza@google.com
diff --git a/graphics/mapper/2.0/utils/OWNERS b/graphics/mapper/2.0/utils/OWNERS
index 3aa5fa1..273cb4c 100644
--- a/graphics/mapper/2.0/utils/OWNERS
+++ b/graphics/mapper/2.0/utils/OWNERS
@@ -1,4 +1,4 @@
# Graphics team
jessehall@google.com
-olv@google.com
+marissaw@google.com
stoza@google.com
diff --git a/graphics/mapper/2.0/vts/OWNERS b/graphics/mapper/2.0/vts/OWNERS
index ef69d7c..8e86f64 100644
--- a/graphics/mapper/2.0/vts/OWNERS
+++ b/graphics/mapper/2.0/vts/OWNERS
@@ -1,6 +1,6 @@
# Graphics team
-olv@google.com
+marissaw@google.com
# VTS team
yim@google.com
-zhuoyao@google.com
\ No newline at end of file
+zhuoyao@google.com
diff --git a/graphics/mapper/2.1/default/OWNERS b/graphics/mapper/2.1/default/OWNERS
index 3aa5fa1..273cb4c 100644
--- a/graphics/mapper/2.1/default/OWNERS
+++ b/graphics/mapper/2.1/default/OWNERS
@@ -1,4 +1,4 @@
# Graphics team
jessehall@google.com
-olv@google.com
+marissaw@google.com
stoza@google.com
diff --git a/graphics/mapper/2.1/utils/OWNERS b/graphics/mapper/2.1/utils/OWNERS
index 3aa5fa1..273cb4c 100644
--- a/graphics/mapper/2.1/utils/OWNERS
+++ b/graphics/mapper/2.1/utils/OWNERS
@@ -1,4 +1,4 @@
# Graphics team
jessehall@google.com
-olv@google.com
+marissaw@google.com
stoza@google.com
diff --git a/graphics/mapper/2.1/vts/OWNERS b/graphics/mapper/2.1/vts/OWNERS
index ef69d7c..8e86f64 100644
--- a/graphics/mapper/2.1/vts/OWNERS
+++ b/graphics/mapper/2.1/vts/OWNERS
@@ -1,6 +1,6 @@
# Graphics team
-olv@google.com
+marissaw@google.com
# VTS team
yim@google.com
-zhuoyao@google.com
\ No newline at end of file
+zhuoyao@google.com
diff --git a/radio/1.4/Android.bp b/radio/1.4/Android.bp
index ad114f3..32f9712 100644
--- a/radio/1.4/Android.bp
+++ b/radio/1.4/Android.bp
@@ -30,6 +30,7 @@
"DataConnActiveStatus",
"DataProfileInfo",
"DataRegStateResult",
+ "EmergencyCallRouting",
"EmergencyNumber",
"EmergencyNumberSource",
"EmergencyServiceCategory",
diff --git a/radio/1.4/IRadio.hal b/radio/1.4/IRadio.hal
index 8438777..511aa05 100644
--- a/radio/1.4/IRadio.hal
+++ b/radio/1.4/IRadio.hal
@@ -21,6 +21,7 @@
import @1.3::IRadio;
import @1.4::AccessNetwork;
import @1.4::DataProfileInfo;
+import @1.4::EmergencyCallRouting;
import @1.4::EmergencyServiceCategory;
import @1.4::RadioAccessFamily;
@@ -101,21 +102,26 @@
oneway setDataProfile_1_4(int32_t serial, vec<DataProfileInfo> profiles);
/**
- * Initiate emergency voice call, with zero or more emergency service category(s).
+ * Initiate emergency voice call, with zero or more emergency service category(s) and routing
+ * information for handling the call. Android uses this request to make its emergency call
+ * instead of using @1.0::IRadio.dial if the 'address' in the 'dialInfo' field is identified
+ * as an emergency number by Android.
*
- * Note this API is the same as IRadio.dial except using the
- * @1.4::EmergencyServiceCategory as the input param.
+ * In multi-sim senario, this radio request is sent through the IRadio service that serves
+ * the subscription the emergency number belongs to, no matter of the PUK/PIN state of the
+ * subscription and the service state.
*
- * If the number in the 'dialInfo' field is identified as an emergency number in Android,
- * Android use this request for its emergency call instead of @1.0::IRadio.dial. The
- * implementation decides how to handle the call (e.g. emergency routing or normal
- * routing).
+ * Some countries or carriers require some emergency numbers that must be handled with normal
+ * call routing or emergency routing. If the 'routing' field is specified as
+ * @1.4::EmergencyNumberRouting#NORMAL, the implementation must use normal call routing to
+ * handle the call; if it is specified as @1.4::EmergencyNumberRouting#EMERGENCY, the
+ * implementation must use emergency routing to handle the call; if it is
+ * @1.4::EmergencyNumberRouting#UNKNOWN, Android does not know how to handle the call.
*
* If the dialed emergency number does not have a specified emergency service category, the
- * 'categories' field is set to @1.4::EmergencyServiceCategory#UNSPECIFIED; iff either the
- * 'categories' field is set to @1.4::EmergencyServiceCategory#UNSPECIFIED or the underlying
+ * 'categories' field is set to @1.4::EmergencyServiceCategory#UNSPECIFIED; if the underlying
* technology used to request emergency services does not support the emergency service
- * category, the interpretation of the categories is defined by implementation.
+ * category, the categories may be ignored.
*
* Reference: 3gpp TS 22.101, Section 10 - Emergency Calls
*
@@ -123,11 +129,12 @@
* @param dialInfo the same @1.0::Dial information used by @1.0::IRadio.dial.
* @param categories bitfield<@1.4::EmergencyServiceCategory> the Emergency Service Category(s)
* of the call.
+ * @param routing @1.4::EmergencyCallRouting the emergency call routing information.
*
* Response function is IRadioResponse.emergencyDialResponse()
*/
oneway emergencyDial(int32_t serial, Dial dialInfo,
- bitfield<EmergencyServiceCategory> categories);
+ bitfield<EmergencyServiceCategory> categories, EmergencyCallRouting routing);
/**
* Query the preferred network type bitmap.
diff --git a/radio/1.4/IRadioIndication.hal b/radio/1.4/IRadioIndication.hal
index 626b494..a58d19c 100644
--- a/radio/1.4/IRadioIndication.hal
+++ b/radio/1.4/IRadioIndication.hal
@@ -27,17 +27,17 @@
* Report the current list of emergency numbers
*
* Each emergency number (@1.4::EmergencyNumber) in the emergency number list contains a
- * dialing number, zero or more service category(s), mobile country code, and source(s) that
- * indicate where it comes from.
+ * dialing number, zero or more service category(s), mobile country code, mobile network code,
+ * and source(s) that indicate where it comes from.
*
- * Radio must report all the valid emergency numbers with known mobile country code and
- * emergency service categories from all available sources including network signaling, sim,
- * modem/oem configuration, and default configuration (112 and 911 must be always available;
- * additionally, 000, 08, 110, 999, 118 and 119 must be available when sim is not present).
- * Radio shall not report emergency numbers that are invalid in the current locale. The
- * reported emergency number list must not have duplicate @1.4::EmergencyNumber entries. Please
- * refer the documentation of @1.4::EmergencyNumber to construct each emergency number to
- * report.
+ * Radio must report all the valid emergency numbers with known mobile country code, mobile
+ * network code and emergency service categories from all available sources including network
+ * signaling, sim, modem/oem configuration, and default configuration (112 and 911 must be
+ * always available; additionally, 000, 08, 110, 999, 118 and 119 must be available when sim
+ * is not present). Radio shall not report emergency numbers that are invalid in the current
+ * locale. The reported emergency number list must not have duplicate @1.4::EmergencyNumber
+ * entries. Please refer the documentation of @1.4::EmergencyNumber to construct each
+ * emergency number to report.
*
* Radio must report the complete list of emergency numbers whenever the emergency numbers in
* the list are changed or whenever the client and the radio server are connected.
diff --git a/radio/1.4/types.hal b/radio/1.4/types.hal
index d0eb0ac..cdfde9e 100644
--- a/radio/1.4/types.hal
+++ b/radio/1.4/types.hal
@@ -39,6 +39,7 @@
import @1.2::CellInfoWcdma;
import @1.2::CardStatus;
import @1.2::CellIdentity;
+import @1.2::CellConnectionStatus;
import @1.2::DataRegStateResult;
import @1.2::PhysicalChannelConfig;
@@ -53,7 +54,7 @@
/**
* Emergency number contains information of number, one or more service category(s), mobile country
- * code (mcc), and source(s) that indicate where it comes from.
+ * code (mcc), mobile network country (mnc) and source(s) that indicate where it comes from.
*
* If the source of the emergency number is associated with country, field ‘mcc’ must be provided;
* otherwise the field ‘mcc’ must be an empty string.
@@ -155,6 +156,25 @@
DEFAULT = 1 << 3,
};
+/**
+ * Indicates how the implementation should handle the emergency call if it is required by Android.
+ */
+enum EmergencyCallRouting : int32_t {
+ /**
+ * Indicates Android does not require how to handle the corresponding emergency call; it is
+ * decided by implementation.
+ */
+ UNKNOWN = 0,
+ /**
+ * Indicates the implementation must handle the call through emergency routing.
+ */
+ EMERGENCY = 1,
+ /**
+ * Indicates the implementation must handle the call through normal call routing.
+ */
+ NORMAL = 2,
+};
+
enum RadioTechnology : @1.0::RadioTechnology {
/** 5G NR. */
NR = 20,
@@ -1500,15 +1520,15 @@
/** Overwritten from @1.2::CellInfo in order to update the CellInfoLte to 1.4 version. */
struct CellInfo {
- /** Cell type for selecting from union CellInfo. */
- CellInfoType cellInfoType;
-
/**
* True if the phone is registered to a mobile network that provides service on this cell and
* this cell is being used or would be used for network signaling.
*/
bool isRegistered;
+ /** Connection status for the cell. */
+ CellConnectionStatus connectionStatus;
+
/** CellInfo details, cellInfoType can tell which cell info should be used. */
safe_union Info {
CellInfoGsm gsm;