Merge "Clean and reorder operation enums."
diff --git a/audio/5.0/config/api/current.txt b/audio/5.0/config/api/current.txt
index 822237e..17f38c1 100644
--- a/audio/5.0/config/api/current.txt
+++ b/audio/5.0/config/api/current.txt
@@ -20,8 +20,10 @@
enum_constant public static final audio.policy.configuration.V5_0.AudioDevice AUDIO_DEVICE_IN_COMMUNICATION;
enum_constant public static final audio.policy.configuration.V5_0.AudioDevice AUDIO_DEVICE_IN_DEFAULT;
enum_constant public static final audio.policy.configuration.V5_0.AudioDevice AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET;
+ enum_constant public static final audio.policy.configuration.V5_0.AudioDevice AUDIO_DEVICE_IN_ECHO_REFERENCE;
enum_constant public static final audio.policy.configuration.V5_0.AudioDevice AUDIO_DEVICE_IN_FM_TUNER;
enum_constant public static final audio.policy.configuration.V5_0.AudioDevice AUDIO_DEVICE_IN_HDMI;
+ enum_constant public static final audio.policy.configuration.V5_0.AudioDevice AUDIO_DEVICE_IN_HDMI_ARC;
enum_constant public static final audio.policy.configuration.V5_0.AudioDevice AUDIO_DEVICE_IN_IP;
enum_constant public static final audio.policy.configuration.V5_0.AudioDevice AUDIO_DEVICE_IN_LINE;
enum_constant public static final audio.policy.configuration.V5_0.AudioDevice AUDIO_DEVICE_IN_LOOPBACK;
@@ -91,6 +93,10 @@
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_AAC_ERLC;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_AAC_HE_V1;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_AAC_HE_V2;
+ enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_AAC_LATM;
+ enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_AAC_LATM_HE_V1;
+ enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_AAC_LATM_HE_V2;
+ enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_AAC_LATM_LC;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_AAC_LC;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_AAC_LD;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_AAC_LTP;
@@ -106,7 +112,9 @@
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_AMR_WB_PLUS;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_APE;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_APTX;
+ enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_APTX_ADAPTIVE;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_APTX_HD;
+ enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_CELT;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_DOLBY_TRUEHD;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_DSD;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_DTS;
@@ -122,6 +130,8 @@
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_HE_AAC_V2;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_IEC61937;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_LDAC;
+ enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_LHDC;
+ enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_LHDC_LL;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_MAT_1_0;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_MAT_2_0;
enum_constant public static final audio.policy.configuration.V5_0.AudioFormat AUDIO_FORMAT_MAT_2_1;
diff --git a/audio/5.0/config/audio_policy_configuration.xsd b/audio/5.0/config/audio_policy_configuration.xsd
index efe93b3..ee3a437 100644
--- a/audio/5.0/config/audio_policy_configuration.xsd
+++ b/audio/5.0/config/audio_policy_configuration.xsd
@@ -277,6 +277,8 @@
<xs:enumeration value="AUDIO_DEVICE_IN_PROXY"/>
<xs:enumeration value="AUDIO_DEVICE_IN_USB_HEADSET"/>
<xs:enumeration value="AUDIO_DEVICE_IN_BLUETOOTH_BLE"/>
+ <xs:enumeration value="AUDIO_DEVICE_IN_HDMI_ARC"/>
+ <xs:enumeration value="AUDIO_DEVICE_IN_ECHO_REFERENCE"/>
<xs:enumeration value="AUDIO_DEVICE_IN_DEFAULT"/>
<xs:enumeration value="AUDIO_DEVICE_IN_STUB"/>
</xs:restriction>
@@ -364,6 +366,14 @@
<xs:enumeration value="AUDIO_FORMAT_MAT_2_1"/>
<xs:enumeration value="AUDIO_FORMAT_AAC_XHE"/>
<xs:enumeration value="AUDIO_FORMAT_AAC_ADTS_XHE"/>
+ <xs:enumeration value="AUDIO_FORMAT_AAC_LATM"/>
+ <xs:enumeration value="AUDIO_FORMAT_AAC_LATM_LC"/>
+ <xs:enumeration value="AUDIO_FORMAT_AAC_LATM_HE_V1"/>
+ <xs:enumeration value="AUDIO_FORMAT_AAC_LATM_HE_V2"/>
+ <xs:enumeration value="AUDIO_FORMAT_CELT"/>
+ <xs:enumeration value="AUDIO_FORMAT_APTX_ADAPTIVE"/>
+ <xs:enumeration value="AUDIO_FORMAT_LHDC"/>
+ <xs:enumeration value="AUDIO_FORMAT_LHDC_LL"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="extendableAudioFormat">
diff --git a/audio/common/5.0/types.hal b/audio/common/5.0/types.hal
index b4e9470..ffe4506 100644
--- a/audio/common/5.0/types.hal
+++ b/audio/common/5.0/types.hal
@@ -235,6 +235,12 @@
LDAC = 0x23000000UL,
/** Dolby Metadata-enhanced Audio Transmission */
MAT = 0x24000000UL,
+ AAC_LATM = 0x25000000UL,
+ CELT = 0x26000000UL,
+ APTX_ADAPTIVE = 0x27000000UL,
+ LHDC = 0x28000000UL,
+ LHDC_LL = 0x29000000UL,
+
/** Deprecated */
MAIN_MASK = 0xFF000000UL,
SUB_MASK = 0x00FFFFFFUL,
@@ -306,6 +312,9 @@
MAT_1_0 = (MAT | MAT_SUB_1_0),
MAT_2_0 = (MAT | MAT_SUB_2_0),
MAT_2_1 = (MAT | MAT_SUB_2_1),
+ AAC_LATM_LC = (AAC_LATM | AAC_SUB_LC),
+ AAC_LATM_HE_V1 = (AAC_LATM | AAC_SUB_HE_V1),
+ AAC_LATM_HE_V2 = (AAC_LATM | AAC_SUB_HE_V2),
};
/**
diff --git a/audio/effect/2.0/xml/audio_effects_conf.xsd b/audio/effect/2.0/xml/audio_effects_conf.xsd
index df281b3..b97b847 100644
--- a/audio/effect/2.0/xml/audio_effects_conf.xsd
+++ b/audio/effect/2.0/xml/audio_effects_conf.xsd
@@ -39,6 +39,7 @@
<xs:enumeration value="voice_recognition"/>
<xs:enumeration value="voice_communication"/>
<xs:enumeration value="unprocessed"/>
+ <xs:enumeration value="voice_performance"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="streamOutputType">
diff --git a/audio/effect/5.0/xml/api/current.txt b/audio/effect/5.0/xml/api/current.txt
index 4a7f88b..473bb10 100644
--- a/audio/effect/5.0/xml/api/current.txt
+++ b/audio/effect/5.0/xml/api/current.txt
@@ -74,6 +74,7 @@
enum_constant public static final audio.effects.V5_0.StreamInputType voice_call;
enum_constant public static final audio.effects.V5_0.StreamInputType voice_communication;
enum_constant public static final audio.effects.V5_0.StreamInputType voice_downlink;
+ enum_constant public static final audio.effects.V5_0.StreamInputType voice_performance;
enum_constant public static final audio.effects.V5_0.StreamInputType voice_recognition;
enum_constant public static final audio.effects.V5_0.StreamInputType voice_uplink;
}
diff --git a/camera/metadata/3.4/types.hal b/camera/metadata/3.4/types.hal
index 61a399e..28c56c8 100644
--- a/camera/metadata/3.4/types.hal
+++ b/camera/metadata/3.4/types.hal
@@ -75,6 +75,14 @@
ANDROID_DEPTH_END_3_4,
+ /** android.logicalMultiCamera.activePhysicalId [dynamic, byte, public]
+ *
+ * <p>String containing the ID of the underlying active physical camera.</p>
+ */
+ ANDROID_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID = android.hardware.camera.metadata@3.3::CameraMetadataTag:ANDROID_LOGICAL_MULTI_CAMERA_END_3_3,
+
+ ANDROID_LOGICAL_MULTI_CAMERA_END_3_4,
+
};
/*
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index c98e328..1556c08 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -114,6 +114,8 @@
using ::android::hardware::camera::device::V1_0::FrameCallbackFlag;
using ::android::hardware::camera::device::V1_0::HandleTimestampMessage;
using ::android::hardware::camera::metadata::V3_4::CameraMetadataEnumAndroidSensorInfoColorFilterArrangement;
+using ::android::hardware::camera::metadata::V3_4::CameraMetadataTag;
+using ::android::hardware::camera::device::V3_4::PhysicalCameraMetadata;
using ::android::hardware::MessageQueue;
using ::android::hardware::kSynchronizedReadWrite;
using ::android::hidl::allocator::V1_0::IAllocator;
@@ -587,8 +589,8 @@
};
struct DeviceCb : public V3_5::ICameraDeviceCallback {
- DeviceCb(CameraHidlTest *parent, bool checkMonochromeResult) : mParent(parent),
- mCheckMonochromeResult(checkMonochromeResult) {}
+ DeviceCb(CameraHidlTest *parent, int deviceVersion, const camera_metadata_t *staticMeta) :
+ mParent(parent), mDeviceVersion(deviceVersion), mStaticMetadata(staticMeta) {}
Return<void> processCaptureResult_3_4(
const hidl_vec<V3_4::CaptureResult>& results) override;
@@ -607,10 +609,12 @@
void waitForBuffersReturned();
private:
- bool processCaptureResultLocked(const CaptureResult& results);
+ bool processCaptureResultLocked(const CaptureResult& results,
+ hidl_vec<PhysicalCameraMetadata> physicalCameraMetadata);
CameraHidlTest *mParent; // Parent object
- bool mCheckMonochromeResult;
+ int mDeviceVersion;
+ const camera_metadata_t *mStaticMetadata;
bool hasOutstandingBuffersLocked();
/* members for requestStreamBuffers() and returnStreamBuffers()*/
@@ -755,6 +759,8 @@
void verifyStreamCombination(sp<device::V3_5::ICameraDevice> cameraDevice3_5,
const ::android::hardware::camera::device::V3_4::StreamConfiguration &config3_4,
bool expectedStatus);
+ void verifyLogicalCameraResult(const camera_metadata_t* staticMetadata,
+ const ::android::hardware::camera::common::V1_0::helper::CameraMetadata& resultMetadata);
void verifyBuffersReturned(sp<device::V3_2::ICameraDeviceSession> session,
int deviceVerison, int32_t streamId, sp<DeviceCb> cb,
@@ -1008,7 +1014,7 @@
bool notify = false;
std::unique_lock<std::mutex> l(mParent->mLock);
for (size_t i = 0 ; i < results.size(); i++) {
- notify = processCaptureResultLocked(results[i].v3_2);
+ notify = processCaptureResultLocked(results[i].v3_2, results[i].physicalCameraMetadata);
}
l.unlock();
@@ -1027,8 +1033,9 @@
bool notify = false;
std::unique_lock<std::mutex> l(mParent->mLock);
+ ::android::hardware::hidl_vec<PhysicalCameraMetadata> noPhysMetadata;
for (size_t i = 0 ; i < results.size(); i++) {
- notify = processCaptureResultLocked(results[i]);
+ notify = processCaptureResultLocked(results[i], noPhysMetadata);
}
l.unlock();
@@ -1039,7 +1046,8 @@
return Void();
}
-bool CameraHidlTest::DeviceCb::processCaptureResultLocked(const CaptureResult& results) {
+bool CameraHidlTest::DeviceCb::processCaptureResultLocked(const CaptureResult& results,
+ hidl_vec<PhysicalCameraMetadata> physicalCameraMetadata) {
bool notify = false;
uint32_t frameNumber = results.frameNumber;
@@ -1080,6 +1088,20 @@
ADD_FAILURE();
return notify;
}
+
+ std::vector<::android::hardware::camera::device::V3_2::CameraMetadata> physResultMetadata;
+ physResultMetadata.resize(physicalCameraMetadata.size());
+ for (size_t i = 0; i < physicalCameraMetadata.size(); i++) {
+ physResultMetadata[i].resize(physicalCameraMetadata[i].fmqMetadataSize);
+ if (!request->resultQueue->read(physResultMetadata[i].data(),
+ physicalCameraMetadata[i].fmqMetadataSize)) {
+ ALOGE("%s: Frame %d: Cannot read physical camera metadata from fmq,"
+ "size = %" PRIu64, __func__, frameNumber,
+ physicalCameraMetadata[i].fmqMetadataSize);
+ ADD_FAILURE();
+ return notify;
+ }
+ }
resultSize = resultMetadata.size();
} else if (results.result.size() > 0) {
resultMetadata.setToExternal(const_cast<uint8_t *>(
@@ -1137,8 +1159,20 @@
request->collectedResult.sort();
// Verify final result metadata
- if (mCheckMonochromeResult) {
- mParent->verifyMonochromeCameraResult(request->collectedResult);
+ bool isAtLeast_3_5 = mDeviceVersion >= CAMERA_DEVICE_API_VERSION_3_5;
+ if (isAtLeast_3_5) {
+ bool isMonochrome = Status::OK ==
+ CameraHidlTest::isMonochromeCamera(mStaticMetadata);
+ if (isMonochrome) {
+ mParent->verifyMonochromeCameraResult(request->collectedResult);
+ }
+
+ // Verify logical camera result metadata
+ bool isLogicalCamera =
+ Status::OK == CameraHidlTest::isLogicalMultiCamera(mStaticMetadata);
+ if (isLogicalCamera) {
+ mParent->verifyLogicalCameraResult(mStaticMetadata, request->collectedResult);
+ }
}
}
@@ -5058,7 +5092,7 @@
ASSERT_EQ(Status::OK, s);
staticMeta = clone_camera_metadata(
reinterpret_cast<const camera_metadata_t*>(metadata.data()));
- ASSERT_NE(nullptr, staticMeta);
+ ASSERT_NE(nullptr, staticMeta);
});
ASSERT_TRUE(ret.isOk());
@@ -5070,9 +5104,7 @@
*supportsPartialResults = (*partialResultCount > 1);
}
- bool checkMonochromeResultTags = Status::OK == isMonochromeCamera(staticMeta) &&
- deviceVersion >= CAMERA_DEVICE_API_VERSION_3_5;
- sp<DeviceCb> cb = new DeviceCb(this, checkMonochromeResultTags);
+ sp<DeviceCb> cb = new DeviceCb(this, deviceVersion, staticMeta);
sp<ICameraDeviceSession> session;
ret = device3_x->open(
cb,
@@ -5210,9 +5242,7 @@
*supportsPartialResults = (*partialResultCount > 1);
}
- bool checkMonochromeResultTags = Status::OK == isMonochromeCamera(staticMeta) &&
- deviceVersion >= CAMERA_DEVICE_API_VERSION_3_5;
- sp<DeviceCb> cb = new DeviceCb(this, checkMonochromeResultTags);
+ sp<DeviceCb> cb = new DeviceCb(this, deviceVersion, staticMeta);
ret = device3_x->open(
cb,
[&](auto status, const auto& newSession) {
@@ -5441,6 +5471,22 @@
});
ASSERT_TRUE(ret.isOk());
}
+
+ // Make sure ANDROID_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID is available in
+ // result keys.
+ if (deviceVersion >= CAMERA_DEVICE_API_VERSION_3_5) {
+ camera_metadata_ro_entry entry;
+ int retcode = find_camera_metadata_ro_entry(metadata,
+ ANDROID_REQUEST_AVAILABLE_RESULT_KEYS, &entry);
+ if ((0 == retcode) && (entry.count > 0)) {
+ ASSERT_NE(std::find(entry.data.i32, entry.data.i32 + entry.count,
+ static_cast<int32_t>(
+ CameraMetadataTag::ANDROID_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID)),
+ entry.data.i32 + entry.count);
+ } else {
+ ADD_FAILURE() << "Get camera availableResultKeys failed!";
+ }
+ }
}
void CameraHidlTest::verifyCameraCharacteristics(Status status, const CameraMetadata& chars) {
@@ -5649,6 +5695,24 @@
cb->waitForBuffersReturned();
}
+void CameraHidlTest::verifyLogicalCameraResult(const camera_metadata_t* staticMetadata,
+ const ::android::hardware::camera::common::V1_0::helper::CameraMetadata& resultMetadata) {
+ std::unordered_set<std::string> physicalIds;
+ Status rc = getPhysicalCameraIds(staticMetadata, &physicalIds);
+ ASSERT_TRUE(Status::OK == rc);
+ ASSERT_TRUE(physicalIds.size() > 1);
+
+ camera_metadata_ro_entry entry;
+ // Check mainPhysicalId
+ entry = resultMetadata.find(ANDROID_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID);
+ if (entry.count > 0) {
+ std::string mainPhysicalId(reinterpret_cast<const char *>(entry.data.u8));
+ ASSERT_NE(physicalIds.find(mainPhysicalId), physicalIds.end());
+ } else {
+ ADD_FAILURE() << "Get LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID failed!";
+ }
+}
+
// Open a device session with empty callbacks and return static metadata.
void CameraHidlTest::openEmptyDeviceSession(const std::string &name, sp<ICameraProvider> provider,
sp<ICameraDeviceSession> *session /*out*/, camera_metadata_t **staticMeta /*out*/,
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index 049dfa4..94ffe80 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -345,7 +345,8 @@
</hal>
<hal format="hidl" optional="true">
<name>android.hardware.radio</name>
- <version>1.4</version>
+ <!-- Todo<b/123249760> Allow only 1.4 for Q-->
+ <version>1.3-4</version>
<interface>
<name>IRadio</name>
<instance>slot1</instance>
@@ -442,7 +443,7 @@
</hal>
<hal format="hidl" optional="true">
<name>android.hardware.usb</name>
- <version>1.0-1</version>
+ <version>1.0-2</version>
<interface>
<name>IUsb</name>
<instance>default</instance>
diff --git a/drm/1.2/IDrmFactory.hal b/drm/1.2/IDrmFactory.hal
index c94e4bb..682889c 100644
--- a/drm/1.2/IDrmFactory.hal
+++ b/drm/1.2/IDrmFactory.hal
@@ -17,6 +17,7 @@
import @1.1::IDrmFactory;
import @1.1::IDrmPlugin;
+import @1.1::SecurityLevel;
/**
* IDrmFactory is the main entry point for interacting with a vendor's
@@ -35,4 +36,16 @@
*/
interface IDrmFactory extends @1.1::IDrmFactory {
+ /**
+ * Determine if a specific security level is supported by the device.
+ * This method only differs from @1.0 isCryptoSchemeSupported
+ * by the addition of a security level.
+ *
+ * @param uuid identifies the crypto scheme in question
+ * @param mimeType identifies the mime type in question
+ * @param securityLevel specifies the security level required
+ * @return isSupported must be true only if the scheme is supported
+ */
+ isCryptoSchemeSupported_1_2(uint8_t[16] uuid, string mimeType,
+ @1.1::SecurityLevel securityLevel) generates(bool isSupported);
};
diff --git a/graphics/allocator/3.0/IAllocator.hal b/graphics/allocator/3.0/IAllocator.hal
index 3651e91..34b08e7 100644
--- a/graphics/allocator/3.0/IAllocator.hal
+++ b/graphics/allocator/3.0/IAllocator.hal
@@ -30,6 +30,9 @@
/**
* Allocates buffers with the properties specified by the descriptor.
*
+ * Allocations should be optimized for usage bits provided in the
+ * descriptor.
+ *
* @param descriptor Properties of the buffers to allocate. This must be
* obtained from IMapper::createDescriptor().
* @param count The number of buffers to allocate.
diff --git a/graphics/mapper/2.1/utils/passthrough/include/mapper-passthrough/2.1/Gralloc1Hal.h b/graphics/mapper/2.1/utils/passthrough/include/mapper-passthrough/2.1/Gralloc1Hal.h
index 08d604e..c9836e5 100644
--- a/graphics/mapper/2.1/utils/passthrough/include/mapper-passthrough/2.1/Gralloc1Hal.h
+++ b/graphics/mapper/2.1/utils/passthrough/include/mapper-passthrough/2.1/Gralloc1Hal.h
@@ -28,7 +28,7 @@
using V2_0::BufferDescriptor;
using V2_0::Error;
-using android::hardware::graphics::common::V1_0::BufferUsage;
+using android::hardware::graphics::common::V1_1::BufferUsage;
namespace detail {
@@ -72,6 +72,8 @@
Error createDescriptor_2_1(const IMapper::BufferDescriptorInfo& descriptorInfo,
BufferDescriptor* outDescriptor) override {
+ if (gralloc1UsageUnsupported(descriptorInfo.usage))
+ return Error::BAD_DESCRIPTOR;
return createDescriptor(
V2_0::IMapper::BufferDescriptorInfo{
descriptorInfo.width, descriptorInfo.height, descriptorInfo.layerCount,
@@ -163,6 +165,16 @@
return consumerUsage;
}
+ static bool gralloc1UsageUnsupported(uint64_t usage) {
+ // Certain newer public usage bits should not be used with gralloc1.
+ // We use a blacklist instead of a whitelist here in order to avoid
+ // breaking private usage flags.
+ constexpr uint64_t unsupportedMask = BufferUsage::GPU_CUBE_MAP |
+ BufferUsage::GPU_MIPMAP_COMPLETE;
+
+ return usage & unsupportedMask;
+ }
+
private:
using BaseType2_0 = V2_0::passthrough::detail::Gralloc1HalImpl<Hal>;
using BaseType2_0::createDescriptor;
diff --git a/graphics/mapper/3.0/IMapper.hal b/graphics/mapper/3.0/IMapper.hal
index e399045..a0e4d7a 100644
--- a/graphics/mapper/3.0/IMapper.hal
+++ b/graphics/mapper/3.0/IMapper.hal
@@ -183,6 +183,9 @@
* buffer content in an indeterminate state or returning an error are both
* acceptable.
*
+ * 1D buffers (width = size in bytes, height = 1, pixel_format = BLOB) must
+ * "lock in place". The buffers must be directly accessible via mapping.
+ *
* The client must not modify the content of the buffer outside of
* @p accessRegion, and the device need not guarantee that content outside
* of @p accessRegion is valid for reading. The result of reading or writing
@@ -193,6 +196,12 @@
* memory. This address will represent the top-left corner of the entire
* buffer, even if @p accessRegion does not begin at the top-left corner.
*
+ * On success, bytesPerPixel must contain the number of bytes per pixel in
+ * the buffer. If the bytesPerPixel is unknown or variable, a value of -1
+ * should be returned. bytesPerStride must contain the bytes per stride of
+ * the buffer. If the bytesPerStride is unknown or variable, a value of -1
+ * should be returned.
+ *
* @param buffer Buffer to lock.
* @param cpuUsage CPU usage flags to request. See +ndk
* libnativewindow#AHardwareBuffer_UsageFlags for possible values.
@@ -211,13 +220,17 @@
* - `NO_RESOURCES` if the buffer cannot be locked at this time. Note
* that locking may succeed at a later time.
* @return data CPU-accessible pointer to the buffer data.
+ * @return bytesPerPixel the number of bytes per pixel in the buffer
+ * @return bytesPerStride the number of bytes per stride of the buffer
*/
lock(pointer buffer,
uint64_t cpuUsage,
Rect accessRegion,
handle acquireFence)
generates (Error error,
- pointer data);
+ pointer data,
+ int32_t bytesPerPixel,
+ int32_t bytesPerStride);
/**
* Locks a YCbCr buffer for the specified CPU usage.
@@ -272,5 +285,20 @@
*/
unlock(pointer buffer) generates (Error error, handle releaseFence);
+ /**
+ * Test whether the given BufferDescriptorInfo is allocatable.
+ *
+ * If this function returns true, it means that a buffer with the given
+ * description can be allocated on this implementation, unless resource
+ * exhaustion occurs. If this function returns false, it means that the
+ * allocation of the given description will never succeed.
+ *
+ * @param description the description of the buffer
+ * @return supported whether the description is supported
+ */
+ isSupported(BufferDescriptorInfo description)
+ generates (Error error,
+ bool supported);
+
};
diff --git a/graphics/mapper/3.0/utils/vts/MapperVts.cpp b/graphics/mapper/3.0/utils/vts/MapperVts.cpp
index 8428403..f2b7594 100644
--- a/graphics/mapper/3.0/utils/vts/MapperVts.cpp
+++ b/graphics/mapper/3.0/utils/vts/MapperVts.cpp
@@ -164,7 +164,8 @@
}
void* Gralloc::lock(const native_handle_t* bufferHandle, uint64_t cpuUsage,
- const IMapper::Rect& accessRegion, int acquireFence) {
+ const IMapper::Rect& accessRegion, int acquireFence, int32_t* outBytesPerPixel,
+ int32_t* outBytesPerStride) {
auto buffer = const_cast<native_handle_t*>(bufferHandle);
NATIVE_HANDLE_DECLARE_STORAGE(acquireFenceStorage, 1, 0);
@@ -175,11 +176,17 @@
acquireFenceHandle = h;
}
+ *outBytesPerPixel = -1;
+ *outBytesPerStride = -1;
+
void* data = nullptr;
mMapper->lock(buffer, cpuUsage, accessRegion, acquireFenceHandle,
- [&](const auto& tmpError, const auto& tmpData) {
+ [&](const auto& tmpError, const auto& tmpData, int32_t tmpBytesPerPixel,
+ int32_t tmpBytesPerStride) {
ASSERT_EQ(Error::NONE, tmpError) << "failed to lock buffer " << buffer;
data = tmpData;
+ *outBytesPerPixel = tmpBytesPerPixel;
+ *outBytesPerStride = tmpBytesPerStride;
});
if (acquireFence >= 0) {
@@ -264,6 +271,15 @@
});
}
+bool Gralloc::isSupported(const IMapper::BufferDescriptorInfo& descriptorInfo) {
+ bool supported = false;
+ mMapper->isSupported(descriptorInfo, [&](const auto& tmpError, const auto& tmpSupported) {
+ ASSERT_EQ(Error::NONE, tmpError) << "failed to check is supported";
+ supported = tmpSupported;
+ });
+ return supported;
+}
+
} // namespace vts
} // namespace V3_0
} // namespace mapper
diff --git a/graphics/mapper/3.0/utils/vts/include/mapper-vts/3.0/MapperVts.h b/graphics/mapper/3.0/utils/vts/include/mapper-vts/3.0/MapperVts.h
index c94961c..ba79ca4 100644
--- a/graphics/mapper/3.0/utils/vts/include/mapper-vts/3.0/MapperVts.h
+++ b/graphics/mapper/3.0/utils/vts/include/mapper-vts/3.0/MapperVts.h
@@ -68,7 +68,8 @@
// in and out of the mapper. The ownership of the fd is always transferred
// with each of these functions.
void* lock(const native_handle_t* bufferHandle, uint64_t cpuUsage,
- const IMapper::Rect& accessRegion, int acquireFence);
+ const IMapper::Rect& accessRegion, int acquireFence, int32_t* outBytesPerPixel,
+ int32_t* outBytesPerStride);
YCbCrLayout lockYCbCr(const native_handle_t* bufferHandle, uint64_t cpuUsage,
const IMapper::Rect& accessRegion, int acquireFence);
int unlock(const native_handle_t* bufferHandle);
@@ -78,6 +79,8 @@
void getTransportSize(const native_handle_t* bufferHandle, uint32_t* outNumFds,
uint32_t* outNumInts);
+ bool isSupported(const IMapper::BufferDescriptorInfo& descriptorInfo);
+
private:
void init(const std::string& allocatorServiceName, const std::string& mapperServiceName);
const native_handle_t* cloneBuffer(const hidl_handle& rawHandle);
diff --git a/graphics/mapper/3.0/vts/functional/VtsHalGraphicsMapperV3_0TargetTest.cpp b/graphics/mapper/3.0/vts/functional/VtsHalGraphicsMapperV3_0TargetTest.cpp
index 430a526..cfae635 100644
--- a/graphics/mapper/3.0/vts/functional/VtsHalGraphicsMapperV3_0TargetTest.cpp
+++ b/graphics/mapper/3.0/vts/functional/VtsHalGraphicsMapperV3_0TargetTest.cpp
@@ -298,8 +298,15 @@
static_cast<int32_t>(info.height)};
int fence = -1;
uint8_t* data;
+ int32_t bytesPerPixel = -1;
+ int32_t bytesPerStride = -1;
ASSERT_NO_FATAL_FAILURE(
- data = static_cast<uint8_t*>(mGralloc->lock(bufferHandle, info.usage, region, fence)));
+ data = static_cast<uint8_t*>(mGralloc->lock(bufferHandle, info.usage, region, fence,
+ &bytesPerPixel, &bytesPerStride)));
+
+ // Valid return values are -1 for unsupported or the number bytes for supported which is >=0
+ EXPECT_GT(bytesPerPixel, -1);
+ EXPECT_GT(bytesPerStride, -1);
// RGBA_8888
size_t strideInBytes = stride * 4;
@@ -312,9 +319,13 @@
ASSERT_NO_FATAL_FAILURE(fence = mGralloc->unlock(bufferHandle));
+ bytesPerPixel = -1;
+ bytesPerStride = -1;
+
// lock again for reading
ASSERT_NO_FATAL_FAILURE(
- data = static_cast<uint8_t*>(mGralloc->lock(bufferHandle, info.usage, region, fence)));
+ data = static_cast<uint8_t*>(mGralloc->lock(bufferHandle, info.usage, region, fence,
+ &bytesPerPixel, &bytesPerStride)));
for (uint32_t y = 0; y < info.height; y++) {
for (size_t i = 0; i < writeInBytes; i++) {
EXPECT_EQ(static_cast<uint8_t>(y), data[i]);
@@ -322,6 +333,9 @@
data += strideInBytes;
}
+ EXPECT_GT(bytesPerPixel, -1);
+ EXPECT_GT(bytesPerStride, -1);
+
ASSERT_NO_FATAL_FAILURE(fence = mGralloc->unlock(bufferHandle));
if (fence >= 0) {
close(fence);
@@ -426,6 +440,40 @@
#endif
}
+/**
+ * Test IMapper::isSupported with required format RGBA_8888
+ */
+TEST_F(GraphicsMapperHidlTest, IsSupportedRGBA8888) {
+ const auto& info = mDummyDescriptorInfo;
+ bool supported = false;
+
+ ASSERT_NO_FATAL_FAILURE(supported = mGralloc->isSupported(info));
+ ASSERT_TRUE(supported);
+}
+
+/**
+ * Test IMapper::isSupported with required format YV12
+ */
+TEST_F(GraphicsMapperHidlTest, IsSupportedYV12) {
+ auto info = mDummyDescriptorInfo;
+ info.format = PixelFormat::YV12;
+ bool supported = false;
+
+ ASSERT_NO_FATAL_FAILURE(supported = mGralloc->isSupported(info));
+ ASSERT_TRUE(supported);
+}
+
+/**
+ * Test IMapper::isSupported with optional format Y16
+ */
+TEST_F(GraphicsMapperHidlTest, IsSupportedY16) {
+ auto info = mDummyDescriptorInfo;
+ info.format = PixelFormat::Y16;
+ bool supported = false;
+
+ ASSERT_NO_FATAL_FAILURE(supported = mGralloc->isSupported(info));
+}
+
} // namespace
} // namespace vts
} // namespace V3_0
diff --git a/neuralnetworks/1.0/vts/functional/Android.bp b/neuralnetworks/1.0/vts/functional/Android.bp
index dd6f934..2920cec 100644
--- a/neuralnetworks/1.0/vts/functional/Android.bp
+++ b/neuralnetworks/1.0/vts/functional/Android.bp
@@ -22,6 +22,9 @@
],
defaults: ["VtsHalTargetTestDefaults"],
export_include_dirs: ["."],
+ shared_libs: [
+ "libnativewindow",
+ ],
static_libs: [
"android.hardware.neuralnetworks@1.0",
"android.hardware.neuralnetworks@1.1",
@@ -47,6 +50,9 @@
"ValidateRequest.cpp",
"VtsHalNeuralnetworks.cpp",
],
+ shared_libs: [
+ "libnativewindow",
+ ],
static_libs: [
"android.hardware.neuralnetworks@1.0",
"android.hardware.neuralnetworks@1.1",
diff --git a/neuralnetworks/1.2/Android.bp b/neuralnetworks/1.2/Android.bp
index d8762b0..9057b94 100644
--- a/neuralnetworks/1.2/Android.bp
+++ b/neuralnetworks/1.2/Android.bp
@@ -8,6 +8,8 @@
},
srcs: [
"types.hal",
+ "IBurstCallback.hal",
+ "IBurstContext.hal",
"IDevice.hal",
"IExecutionCallback.hal",
"IPreparedModel.hal",
@@ -20,6 +22,9 @@
"android.hidl.safe_union@1.0",
],
types: [
+ "DeviceType",
+ "FmqRequestDatum",
+ "FmqResultDatum",
"Model",
"Operand",
"OperandType",
@@ -28,6 +33,7 @@
"OperationType",
"OperationTypeRange",
"OutputShape",
+ "SymmPerChannelQuantParams",
],
gen_java: false,
}
diff --git a/neuralnetworks/1.2/IBurstCallback.hal b/neuralnetworks/1.2/IBurstCallback.hal
new file mode 100644
index 0000000..3f82e31
--- /dev/null
+++ b/neuralnetworks/1.2/IBurstCallback.hal
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2019 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.neuralnetworks@1.2;
+
+import @1.0::ErrorStatus;
+
+/**
+ * Callback object used by a service to retreive memory objects based on unique
+ * identifiers ("slots").
+ */
+interface IBurstCallback {
+ /**
+ * Get the memory regions that correspond to slot ids. The slot ids are are
+ * unique to the burst object.
+ *
+ * @param slots Values uniquely identifying memory regions within a Burst.
+ * @return status Indicates whether the memories were successfully returned;
+ * must be:
+ * - NONE if the memory region was successfully retrieved
+ * - GENERAL_FAILURE if there is an unspecified error
+ * - INVALID_ARGUMENT if a slot number is invalid
+ * @return buffers Memory buffers corresponding to the slot numbers. If an
+ * error occurs, an empty vector must be returned for
+ * buffers, otherwise slots.size() == buffers.size().
+ */
+ getMemories(vec<int32_t> slots) generates (ErrorStatus status, vec<memory> buffers);
+};
diff --git a/neuralnetworks/1.2/IBurstContext.hal b/neuralnetworks/1.2/IBurstContext.hal
new file mode 100644
index 0000000..60bf53b
--- /dev/null
+++ b/neuralnetworks/1.2/IBurstContext.hal
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2019 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.neuralnetworks@1.2;
+
+/**
+ * Context object to manage the resources of a burst.
+ */
+interface IBurstContext {
+ /**
+ * freeMemory is used by the client to signal to the service that a memory
+ * buffer corresponding to a slot number is no longer needed by the client.
+ *
+ * The slot ids are unique to the burst object.
+ *
+ * @param slot Value uniquely identifying a memory region.
+ */
+ freeMemory(int32_t slot);
+};
diff --git a/neuralnetworks/1.2/IPreparedModel.hal b/neuralnetworks/1.2/IPreparedModel.hal
index 044ca28..2d4e572 100644
--- a/neuralnetworks/1.2/IPreparedModel.hal
+++ b/neuralnetworks/1.2/IPreparedModel.hal
@@ -19,6 +19,8 @@
import @1.0::ErrorStatus;
import @1.0::IPreparedModel;
import @1.0::Request;
+import IBurstCallback;
+import IBurstContext;
import IExecutionCallback;
/**
@@ -113,4 +115,34 @@
*/
executeSynchronously(Request request)
generates (ErrorStatus status, vec<OutputShape> outputShapes);
+
+ /**
+ * Configure a Burst object used to execute multiple inferences on a
+ * prepared model in rapid succession.
+ *
+ * @param callback A callback object used to retrieve memory resources
+ * corresponding to a unique identifiers ("slots").
+ * @param requestChannel Used by the client to send a serialized Request to
+ * the Burst for execution. requestChannel must not be
+ * used to pass a second Request object until a result
+ * has been received from resultChannel.
+ * @param resultChannel Used by the service to return the results of an
+ * execution to the client: the status of the execution
+ * and OutputShape of all output tensors. resultChannel
+ * must be used to return the results if a Request was
+ * sent through the requestChannel.
+ * @return status Error status of configuring the execution burst, must be:
+ * - NONE if the burst is successfully configured
+ * - DEVICE_UNAVAILABLE if driver is offline or busy
+ * - GENERAL_FAILURE if there is an unspecified error
+ * - INVALID_ARGUMENT if one of the input arguments is
+ * invalid
+ * @return context Object containing all resources (such as cached
+ * hidl_memory) related to a Burst if successful, otherwise
+ * nullptr.
+ */
+ configureExecutionBurst(IBurstCallback callback,
+ fmq_sync<FmqRequestDatum> requestChannel,
+ fmq_sync<FmqResultDatum> resultChannel)
+ generates (ErrorStatus status, IBurstContext context);
};
diff --git a/neuralnetworks/1.2/types.hal b/neuralnetworks/1.2/types.hal
index c2d10b9..5bf21a9 100644
--- a/neuralnetworks/1.2/types.hal
+++ b/neuralnetworks/1.2/types.hal
@@ -17,6 +17,7 @@
package android.hardware.neuralnetworks@1.2;
import @1.0::DataLocation;
+import @1.0::ErrorStatus;
import @1.0::OperandLifeTime;
import @1.0::OperandType;
import @1.0::PerformanceInfo;
@@ -440,3 +441,195 @@
*/
bool isSufficient;
};
+
+/**
+ * FmqRequestDatum is a single element of a serialized representation of a
+ * {@link @1.0::Request} object which is sent across FastMessageQueue.
+ *
+ * The serialized representation for a particular execution is referred to later
+ * in these descriptions as a 'packet'.
+ *
+ * FastMessageQueue can only pass HIDL-defined types that do not involve nested
+ * buffers, handles, or interfaces.
+ *
+ * The {@link @1.0::Request} is serialized as follows:
+ * 1) 'packetInformation'
+ * 2) For each input operand:
+ * 2.1) 'inputOperandInformation'
+ * 2.2) For each dimension element of the operand:
+ * 2.2.1) 'inputOperandDimensionValue'
+ * 3) For each output operand:
+ * 3.1) 'outputOperandInformation'
+ * 3.2) For each dimension element of the operand:
+ * 3.2.1) 'outputOperandDimensionValue'
+ * 4) For each pool:
+ * 4.1) 'poolIdentifier'
+ */
+safe_union FmqRequestDatum {
+ /**
+ * Type to describe the high-level layout of the packet.
+ */
+ struct PacketInformation {
+ /**
+ * How many elements the packet contains, including the
+ * "packetInformation" datum.
+ */
+ uint32_t packetSize;
+
+ /**
+ * Number of input operands.
+ */
+ uint32_t numberOfInputOperands;
+
+ /**
+ * Number of output operands.
+ */
+ uint32_t numberOfOutputOperands;
+
+ /**
+ * Number of pool identifiers.
+ */
+ uint32_t numberOfPools;
+ };
+
+ /**
+ * Type representing the information for each operand.
+ */
+ struct OperandInformation {
+ /**
+ * If true, the argument does not have a value. This can be used for
+ * operations that take optional arguments. If true, the fields of
+ * 'location' are set to 0, 'numberOfDimensions' is set to 0, and the
+ * dimensions information is omitted from the serialization.
+ */
+ bool hasNoValue;
+
+ /**
+ * The location within one of the memory pools passed in the Request.
+ */
+ DataLocation location;
+
+ /**
+ * Number of subsequent elements that belong to the dimensions vector.
+ */
+ uint32_t numberOfDimensions;
+ };
+
+ /**
+ * packetInformation is the first element of the packet and describes the
+ * remainder of the packet.
+ */
+ PacketInformation packetInformation;
+
+ /**
+ * Information for each input operand.
+ */
+ OperandInformation inputOperandInformation;
+
+ /**
+ * Element of the dimensions vector.
+ */
+ uint32_t inputOperandDimensionValue;
+
+ /**
+ * Information for each output operand.
+ */
+ OperandInformation outputOperandInformation;
+
+ /**
+ * Element of the dimensions vector.
+ */
+ uint32_t outputOperandDimensionValue;
+
+ /**
+ * Unique identifier for a pool.
+ *
+ * A {@link @1.0::Request} passes across one or more pools of shared memory
+ * for the inputs and outputs of an execution. However, these memory pools
+ * are not able to be sent across FastMessageQueue directly. Instead, the
+ * producing side of the FMQ represents each different pool with a unique
+ * identifier, and sends this identifier across the FMQ. Whenever the
+ * consuming side of the FMQ needs the memory corresponding to this unique
+ * identifier, it can pass the identifier to
+ * {@link IBurstCallback::getMemories} to retreive the memory. Although this
+ * HIDL Binder call is expensive compared to communication across FMQ, it is
+ * only needed in the cases when the consumer does not recognize the unique
+ * identifier.
+ */
+ int32_t poolIdentifier;
+};
+
+/**
+ * FmqResultDatum is a single element of a serialized representation of the
+ * values returned from an execution ({@link @1.0::ErrorStatus} and
+ * vec<{@link OutputShape}>) which is returned via FastMessageQueue.
+ *
+ * The serialized representation for a particular execution is referred to later
+ * in these descriptions as a 'packet'.
+ *
+ * FastMessageQueue can only pass HIDL-defined types that do not involve nested
+ * buffers, handles, or interfaces.
+ *
+ * The execution return values ({@link @1.0::ErrorStatus} and
+ * vec<{@link OutputShape}>) are serialized as follows:
+ * 1) 'packetInformation'
+ * 2) For each returned operand:
+ * 2.1) 'operandInformation'
+ * 2.2) For each dimension element of the operand:
+ * 2.2.1) 'operandDimensionValue'
+ */
+safe_union FmqResultDatum {
+ /**
+ * Type to describe the high-level layout of the packet.
+ */
+ struct PacketInformation {
+ /**
+ * How many elements the packet contains, including the
+ * "packetInformation" datum.
+ */
+ uint32_t packetSize;
+
+ /**
+ * Status of the execution.
+ */
+ ErrorStatus errorStatus;
+
+ /**
+ * Number of returned operands.
+ */
+ uint32_t numberOfOperands;
+ };
+
+ /**
+ * Type representing the information for each operand.
+ */
+ struct OperandInformation {
+ /**
+ * Indicates whether the operand's output buffer is large enough to
+ * store the operand's result data.
+ */
+ bool isSufficient;
+
+ /**
+ * Number of subsequent elements that belong to the dimensions vector.
+ */
+ uint32_t numberOfDimensions;
+ };
+
+ /**
+ * packetInformation is the first element of the packet and describes the
+ * remainder of the packet. It additionally includes the status of the
+ * execution.
+ */
+ PacketInformation packetInformation;
+
+ /**
+ * Information for each returned operand.
+ */
+ OperandInformation operandInformation;
+
+ /**
+ * Element of the dimensions vector.
+ */
+ uint32_t operandDimensionValue;
+};
diff --git a/radio/1.4/IRadio.hal b/radio/1.4/IRadio.hal
index dd69607..21c5097 100644
--- a/radio/1.4/IRadio.hal
+++ b/radio/1.4/IRadio.hal
@@ -128,6 +128,10 @@
* does not support the emergency service category or emergency uniform resource names, the
* field 'categories' or 'urns' may be ignored.
*
+ * 'fromEmergencyDialer' indicates if this request originated from emergency dialer/shortcut,
+ * which means an explicit intent from the user to dial an emergency number. The modem must
+ * treat this as an actual emergency dial and not try to disambiguate.
+ *
* If 'isTesting' is true, this request is for testing purpose, and must not be sent to a real
* emergency service; otherwise it's for a real emergency call request.
*
@@ -142,12 +146,14 @@
* of the call.
* @param urns the emergency Uniform Resource Names (URN)
* @param routing @1.4::EmergencyCallRouting the emergency call routing information.
+ * @param fromEmergencyDialer Flag indicating if this request originated from emergency dialer.
+ * @param isTesting Flag indicating if this request is for testing purpose.
*
* Response function is IRadioResponse.emergencyDialResponse()
*/
oneway emergencyDial(int32_t serial, Dial dialInfo,
bitfield<EmergencyServiceCategory> categories, vec<string> urns,
- EmergencyCallRouting routing, bool isTesting);
+ EmergencyCallRouting routing, bool fromEmergencyDialer, bool isTesting);
/**
* Starts a network scan
diff --git a/radio/1.4/IRadioResponse.hal b/radio/1.4/IRadioResponse.hal
index 77aad03..6b8977d 100644
--- a/radio/1.4/IRadioResponse.hal
+++ b/radio/1.4/IRadioResponse.hal
@@ -40,7 +40,6 @@
* RadioError:DIAL_MODIFIED_TO_SS
* RadioError:DIAL_MODIFIED_TO_DIAL
* RadioError:INVALID_ARGUMENTS
- * RadioError:NO_MEMORY
* RadioError:NO_RESOURCES
* RadioError:INTERNAL_ERR
* RadioError:FDN_CHECK_FAILURE
@@ -51,7 +50,6 @@
* RadioError:DEVICE_IN_USE
* RadioError:ABORTED
* RadioError:INVALID_MODEM_STATE
- * RadioError:CANCELLED
*/
oneway emergencyDialResponse(RadioResponseInfo info);
@@ -66,7 +64,6 @@
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:DEVICE_IN_USE
* RadioError:INTERNAL_ERR
- * RadioError:NO_MEMORY
* RadioError:MODEM_ERR
* RadioError:INVALID_ARGUMENTS
*/
@@ -105,9 +102,7 @@
* RadioError:NONE
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:INTERNAL_ERR
- * RadioError:NO_MEMORY
* RadioError:NO_RESOURCES
- * RadioError:CANCELLED
* RadioError:REQUEST_NOT_SUPPORTED
*/
oneway getIccCardStatusResponse_1_4(RadioResponseInfo info, CardStatus cardStatus);
@@ -119,14 +114,11 @@
* Valid errors returned:
* RadioError:NONE
* RadioError:RADIO_NOT_AVAILABLE
- * RadioError:NO_MEMORY
* RadioError:INTERNAL_ERR
- * RadioError:SYSTEM_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:MODEM_ERR
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:NO_RESOURCES
- * RadioError:CANCELLED
*/
oneway getPreferredNetworkTypeBitmapResponse(RadioResponseInfo info,
bitfield<RadioAccessFamily> networkTypeBitmap);
@@ -141,14 +133,11 @@
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:OPERATION_NOT_ALLOWED
* RadioError:MODE_NOT_SUPPORTED
- * RadioError:NO_MEMORY
* RadioError:INTERNAL_ERR
- * RadioError:SYSTEM_ERR
* RadioError:INVALID_ARGUMENTS
* RadioError:MODEM_ERR
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:NO_RESOURCES
- * RadioError:CANCELLED
*/
oneway setPreferredNetworkTypeBitmapResponse(RadioResponseInfo info);
@@ -160,9 +149,7 @@
* RadioError:NONE
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:INTERNAL_ERR
- * RadioError:NO_MEMORY
* RadioError:NO_RESOURCES
- * RadioError:CANCELLED
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:SIM_ABSENT
*/
@@ -182,9 +169,7 @@
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:INVALID_ARGUMENTS
* RadioError:INTERNAL_ERR
- * RadioError:NO_MEMORY
* RadioError:NO_RESOURCES
- * RadioError:CANCELLED
* RadioError:SIM_ABSENT
*/
oneway setupDataCallResponse_1_4(RadioResponseInfo info, SetupDataCallResult dcResponse);
diff --git a/radio/1.4/types.hal b/radio/1.4/types.hal
index 76e8403..6fa7ebd 100644
--- a/radio/1.4/types.hal
+++ b/radio/1.4/types.hal
@@ -230,7 +230,7 @@
* Network has already initiated the activation, modification, or deactivation of bearer
* resources that was requested by the UE.
*/
- COLLISION_WITH_NW_INIT_REQ = 0x38,
+ COLLISION_WITH_NETWORK_INITIATED_REQUEST = 0x38,
/**
* Network supports IPv4v6 PDP type only. Non-IP type is not allowed. In LTE mode of operation,
* this is a PDN throttling cause code, meaning the UE may throttle further requests to the
@@ -244,7 +244,7 @@
*/
ONLY_NON_IP_ALLOWED = 0x3A,
/**
- * QCI indicated in the UE request cannot be supported.
+ * QCI (QoS Class Identifier) indicated in the UE request cannot be supported.
*/
UNSUPPORTED_QCI_VALUE = 0x3B,
/**
@@ -258,7 +258,7 @@
/**
* Not receiving either a PCSCF or a DNS address, one of them being mandatory.
*/
- INVALID_PCSCF_DNS_ADDR = 0x7C,
+ INVALID_PCSCF_OR_DNS_ADDRESS = 0x7C,
/**
* Emergency call bring up on a different ePDG.
*/
@@ -266,128 +266,136 @@
/**
* UE performs a detach or disconnect PDN action based on TE requirements.
*/
- UE_INIT_DETACH_OR_DISCONNECT = 0x80,
+ UE_INITIATED_DETACH_OR_DISCONNECT = 0x80,
/**
- * Reason unspecified for foreign agent rejected MIP registration.
+ * Reason unspecified for foreign agent rejected MIP (Mobile IP) registration.
*/
MIP_FA_REASON_UNSPECIFIED = 0x7D0,
/**
- * Foreign agent administratively prohibited MIP registration.
+ * Foreign agent administratively prohibited MIP (Mobile IP) registration.
*/
MIP_FA_ADMIN_PROHIBITED = 0x7D1,
/**
- * Foreign agent rejected MIP registration because of insufficient resources.
+ * Foreign agent rejected MIP (Mobile IP) registration because of insufficient resources.
*/
MIP_FA_INSUFFICIENT_RESOURCES = 0x7D2,
/**
- * Foreign agent rejected MIP registration because of MN-AAA authenticator was wrong.
+ * Foreign agent rejected MIP (Mobile IP) registration because of MN-AAA authenticator was
+ * wrong.
*/
- MIP_FA_MOBILE_NODE_AUTH_FAILURE = 0x7D3,
+ MIP_FA_MOBILE_NODE_AUTHENTICATION_FAILURE = 0x7D3,
/**
- * Foreign agent rejected MIP registration because of home agent authentication failure.
+ * Foreign agent rejected MIP (Mobile IP) registration because of home agent authentication
+ * failure.
*/
- MIP_FA_HA_AUTH_FAILURE = 0x7D4,
+ MIP_FA_HOME_AGENT_AUTHENTICATION_FAILURE = 0x7D4,
/**
- * Foreign agent rejected MIP registration because of requested lifetime was too long.
+ * Foreign agent rejected MIP (Mobile IP) registration because of requested lifetime was too
+ * long.
*/
- MIP_FA_REQ_LIFETIME_TOO_LONG = 0x7D5,
+ MIP_FA_REQUESTED_LIFETIME_TOO_LONG = 0x7D5,
/**
- * Foreign agent rejected MIP registration because of malformed request.
+ * Foreign agent rejected MIP (Mobile IP) registration because of malformed request.
*/
MIP_FA_MALFORMED_REQUEST = 0x7D6,
/**
- * Foreign agent rejected MIP registration because of malformed reply.
+ * Foreign agent rejected MIP (Mobile IP) registration because of malformed reply.
*/
MIP_FA_MALFORMED_REPLY = 0x7D7,
/**
- * Foreign agent rejected MIP registration because of requested encapsulation was unavailable.
+ * Foreign agent rejected MIP (Mobile IP) registration because of requested encapsulation was
+ * unavailable.
*/
MIP_FA_ENCAPSULATION_UNAVAILABLE = 0x7D8,
/**
- * Foreign agent rejected MIP registration of VJ Header Compression was unavailable.
+ * Foreign agent rejected MIP (Mobile IP) registration of VJ Header Compression was unavailable.
*/
- MIP_FA_VJHC_UNAVAILABLE = 0x7D9,
+ MIP_FA_VJ_HEADER_COMPRESSION_UNAVAILABLE = 0x7D9,
/**
- * Foreign agent rejected MIP registration because of reverse tunnel was unavailable.
+ * Foreign agent rejected MIP (Mobile IP) registration because of reverse tunnel was
+ * unavailable.
*/
- MIP_FA_REV_TUNNEL_UNAVAILABLE = 0x7DA,
+ MIP_FA_REVERSE_TUNNEL_UNAVAILABLE = 0x7DA,
/**
- * Foreign agent rejected MIP registration because of reverse tunnel was mandatory but not
- * requested by device.
+ * Foreign agent rejected MIP (Mobile IP) registration because of reverse tunnel was mandatory
+ * but not requested by device.
*/
- MIP_FA_REV_TUNNEL_IS_MAND_AND_T_BIT_NOT_SET = 0x7DB,
+ MIP_FA_REVERSE_TUNNEL_IS_MANDATORY = 0x7DB,
/**
- * Foreign agent rejected MIP registration because of delivery style was not supported.
+ * Foreign agent rejected MIP (Mobile IP) registration because of delivery style was not
+ * supported.
*/
- MIP_FA_DELIVERY_STYLE_NOT_SUPP = 0x7DC,
+ MIP_FA_DELIVERY_STYLE_NOT_SUPPORTED = 0x7DC,
/**
- * Foreign agent rejected MIP registration because of missing NAI.
+ * Foreign agent rejected MIP (Mobile IP) registration because of missing NAI (Network Access
+ * Identifier).
*/
MIP_FA_MISSING_NAI = 0x7DD,
/**
- * Foreign agent rejected MIP registration because of missing Home Agent.
+ * Foreign agent rejected MIP (Mobile IP) registration because of missing Home Agent.
*/
- MIP_FA_MISSING_HA = 0x7DE,
+ MIP_FA_MISSING_HOME_AGENT = 0x7DE,
/**
- * Foreign agent rejected MIP registration because of missing Home Address.
+ * Foreign agent rejected MIP (Mobile IP) registration because of missing Home Address.
*/
- MIP_FA_MISSING_HOME_ADDR = 0x7DF,
+ MIP_FA_MISSING_HOME_ADDRESS = 0x7DF,
/**
- * Foreign agent rejected MIP registration because of unknown challenge.
+ * Foreign agent rejected MIP (Mobile IP) registration because of unknown challenge.
*/
MIP_FA_UNKNOWN_CHALLENGE = 0x7E0,
/**
- * Foreign agent rejected MIP registration because of missing challenge.
+ * Foreign agent rejected MIP (Mobile IP) registration because of missing challenge.
*/
MIP_FA_MISSING_CHALLENGE = 0x7E1,
/**
- * Foreign agent rejected MIP registration because of stale challenge.
+ * Foreign agent rejected MIP (Mobile IP) registration because of stale challenge.
*/
MIP_FA_STALE_CHALLENGE = 0x7E2,
/**
- * Reason unspecified for home agent rejected MIP registration.
+ * Reason unspecified for home agent rejected MIP (Mobile IP) registration.
*/
MIP_HA_REASON_UNSPECIFIED = 0x7E3,
/**
- * Home agent administratively prohibited MIP registration.
+ * Home agent administratively prohibited MIP (Mobile IP) registration.
*/
MIP_HA_ADMIN_PROHIBITED = 0x7E4,
/**
- * Home agent rejected MIP registration because of insufficient resources.
+ * Home agent rejected MIP (Mobile IP) registration because of insufficient resources.
*/
MIP_HA_INSUFFICIENT_RESOURCES = 0x7E5,
/**
- * Home agent rejected MIP registration because of MN-HA authenticator was wrong.
+ * Home agent rejected MIP (Mobile IP) registration because of MN-HA authenticator was wrong.
*/
- MIP_HA_MOBILE_NODE_AUTH_FAILURE = 0x7E6,
+ MIP_HA_MOBILE_NODE_AUTHENTICATION_FAILURE = 0x7E6,
/**
- * Home agent rejected MIP registration because of foreign agent authentication failure.
+ * Home agent rejected MIP (Mobile IP) registration because of foreign agent authentication
+ * failure.
*/
- MIP_HA_FA_AUTH_FAILURE = 0x7E7,
+ MIP_HA_FOREIGN_AGENT_AUTHENTICATION_FAILURE = 0x7E7,
/**
- * Home agent rejected MIP registration because of registration id mismatch.
+ * Home agent rejected MIP (Mobile IP) registration because of registration id mismatch.
*/
MIP_HA_REGISTRATION_ID_MISMATCH = 0x7E8,
/**
- * Home agent rejected MIP registration because of malformed request.
+ * Home agent rejected MIP (Mobile IP) registration because of malformed request.
*/
MIP_HA_MALFORMED_REQUEST = 0x7E9,
/**
- * Home agent rejected MIP registration because of unknown home agent address.
+ * Home agent rejected MIP (Mobile IP) registration because of unknown home agent address.
*/
- MIP_HA_UNKNOWN_HA_ADDR = 0x7EA,
+ MIP_HA_UNKNOWN_HOME_AGENT_ADDRESS = 0x7EA,
/**
- * Home agent rejected MIP registration because of reverse tunnel was unavailable.
+ * Home agent rejected MIP (Mobile IP) registration because of reverse tunnel was unavailable.
*/
- MIP_HA_REV_TUNNEL_UNAVAILABLE = 0x7EB,
+ MIP_HA_REVERSE_TUNNEL_UNAVAILABLE = 0x7EB,
/**
- * Home agent rejected MIP registration because of reverse tunnel is mandatory but not
- * requested by device.
+ * Home agent rejected MIP (Mobile IP) registration because of reverse tunnel is mandatory but
+ * not requested by device.
*/
- MIP_HA_REV_TUNNEL_IS_MANDATORY_AND_T_BIT_NOT_SET = 0x7EC,
+ MIP_HA_REVERSE_TUNNEL_IS_MANDATORY = 0x7EC,
/**
- * Home agent rejected MIP registration because of encapsulation unavailable.
+ * Home agent rejected MIP (Mobile IP) registration because of encapsulation unavailable.
*/
MIP_HA_ENCAPSULATION_UNAVAILABLE = 0x7ED,
/**
@@ -397,29 +405,29 @@
/**
* Brought down by the network.
*/
- NW_INITIATED_TERMINATION = 0x7EF,
+ NETWORK_INITIATED_TERMINATION = 0x7EF,
/**
* Another application in modem preempts the data call.
*/
MODEM_APP_PREEMPTED = 0x7F0,
/**
- * V4 PDN is in throttled state due to network providing only V6 address during the previous
+ * IPV4 PDN is in throttled state due to network providing only IPV6 address during the previous
* VSNCP bringup (subs_limited_to_v6).
*/
- ERR_PDN_IPV4_CALL_DISALLOWED = 0x7F1,
+ PDN_IPV4_CALL_DISALLOWED = 0x7F1,
/**
- * V4 PDN is in throttled state due to previous VSNCP bringup failure(s).
+ * IPV4 PDN is in throttled state due to previous VSNCP bringup failure(s).
*/
- ERR_PDN_IPV4_CALL_THROTTLED = 0x7F2,
+ PDN_IPV4_CALL_THROTTLED = 0x7F2,
/**
- * V6 PDN is in throttled state due to network providing only V4 address during the previous
+ * IPV6 PDN is in throttled state due to network providing only IPV4 address during the previous
* VSNCP bringup (subs_limited_to_v4).
*/
- ERR_PDN_IPV6_CALL_DISALLOWED = 0x7F3,
+ PDN_IPV6_CALL_DISALLOWED = 0x7F3,
/**
- * V6 PDN is in throttled state due to previous VSNCP bringup failure(s).
+ * IPV6 PDN is in throttled state due to previous VSNCP bringup failure(s).
*/
- ERR_PDN_IPV6_CALL_THROTTLED = 0x7F4,
+ PDN_IPV6_CALL_THROTTLED = 0x7F4,
/**
* Modem restart.
*/
@@ -435,7 +443,7 @@
/**
* Physical link is in the process of cleanup.
*/
- PHYS_LINK_CLOSE_IN_PROGRESS = 0x7F8,
+ PHYSICAL_LINK_CLOSE_IN_PROGRESS = 0x7F8,
/**
* Interface bring up is attempted for an APN that is yet to be handed over to target RAT.
*/
@@ -447,11 +455,11 @@
/**
* Card was refreshed or removed.
*/
- SIM_CARD_EVT = 0x7FB,
+ SIM_CARD_CHANGED = 0x7FB,
/**
* Device is going into lower power mode or powering down.
*/
- LPM_OR_PWR_DOWN = 0x7FC,
+ LOW_POWER_MODE_OR_POWERING_DOWN = 0x7FC,
/**
* APN has been disabled.
*/
@@ -463,7 +471,7 @@
/**
* IPv6 address transfer failed.
*/
- IPV6_ADDR_TRANSFER_FAILED = 0x7FF,
+ IPV6_ADDRESS_TRANSFER_FAILED = 0x7FF,
/**
* Target RAT swap failed.
*/
@@ -485,12 +493,12 @@
* IPv4 data call bring up is rejected because the UE already maintains the allotted maximum
* number of IPv4 data connections.
*/
- MAX_V4_CONNECTIONS = 0x804,
+ MAX_IPV4_CONNECTIONS = 0x804,
/**
* IPv6 data call bring up is rejected because the UE already maintains the allotted maximum
* number of IPv6 data connections.
*/
- MAX_V6_CONNECTIONS = 0x805,
+ MAX_IPV6_CONNECTIONS = 0x805,
/**
* New PDN bring up is rejected during interface selection because the UE has already allotted
* the available interfaces for other PDNs.
@@ -512,835 +520,834 @@
/**
* The current interface is being in use.
*/
- IFACE_IN_USE = 0x80A,
+ INTERFACE_IN_USE = 0x80A,
/**
* PDN connection to the APN is disallowed on the roaming network.
*/
- APN_DISALLOWED_ON_ROAMING = 0x80C,
+ APN_DISALLOWED_ON_ROAMING = 0x80B,
/**
* APN-related parameters are changed.
*/
- APN_PARAM_CHANGED = 0x80D,
+ APN_PARAMETERS_CHANGED = 0x80C,
/**
* PDN is attempted to be brought up with NULL APN but NULL APN is not supported.
*/
- NULL_APN_DISALLOWED = 0x80E,
+ NULL_APN_DISALLOWED = 0x80D,
/**
* Thermal level increases and causes calls to be torn down when normal mode of operation is
* not allowed.
*/
- THERMAL_MITIGATION = 0x80F,
+ THERMAL_MITIGATION = 0x80E,
/**
* PDN Connection to a given APN is disallowed because data is disabled from the device user
* interface settings.
*/
- DATA_SETTINGS_DISABLED = 0x810,
+ DATA_SETTINGS_DISABLED = 0x80F,
/**
* PDN Connection to a given APN is disallowed because data roaming is disabled from the device
* user interface settings and the UE is roaming.
*/
- DATA_ROAMING_SETTINGS_DISABLED = 0x811,
+ DATA_ROAMING_SETTINGS_DISABLED = 0x810,
/**
- * Default data subscription switch occurs.
+ * DDS (Default data subscription) switch occurs.
*/
- DDS_CALL_ABORT = 0x812,
+ DDS_SWITCHED = 0x811,
/**
* PDN being brought up with an APN that is part of forbidden APN Name list.
*/
- INVALID_APN_NAME = 0x813,
+ FORBIDDEN_APN_NAME = 0x812,
/**
* Default data subscription switch is in progress.
*/
- DDS_SWITCH_IN_PROGRESS = 0x814,
+ DDS_SWITCH_IN_PROGRESS = 0x813,
/**
* Roaming is disallowed during call bring up.
*/
- CALL_DISALLOWED_IN_ROAMING = 0x815,
+ CALL_DISALLOWED_IN_ROAMING = 0x814,
/**
* UE is unable to bring up a non-IP data call because the device is not camped on a NB1 cell.
*/
- NON_IP_NOT_SUPPORTED = 0x816,
+ NON_IP_NOT_SUPPORTED = 0x815,
/**
* Non-IP PDN is in throttled state due to previous VSNCP bringup failure(s).
*/
- ERR_PDN_NON_IP_CALL_THROTTLED = 0x817,
+ PDN_NON_IP_CALL_THROTTLED = 0x816,
/**
* Non-IP PDN is in disallowed state due to the network providing only an IP address.
*/
- ERR_PDN_NON_IP_CALL_DISALLOWED = 0x818,
+ PDN_NON_IP_CALL_DISALLOWED = 0x817,
/**
* Device in CDMA locked state.
*/
- CDMA_LOCK = 0x819,
+ CDMA_LOCK = 0x818,
/**
* Received an intercept order from the base station.
*/
- CDMA_INTERCEPT = 0x81A,
+ CDMA_INTERCEPT = 0x819,
/**
* Receiving a reorder from the base station.
*/
- CDMA_REORDER = 0x81B,
+ CDMA_REORDER = 0x81A,
/**
- * Receiving a release from the base station with a SO Reject reason.
+ * Receiving a release from the base station with a SO (Service Option) Reject reason.
*/
- CDMA_REL_SO_REJ = 0x81C,
+ CDMA_RELEASE_DUE_TO_SO_REJECTION = 0x81B,
/**
* Receiving an incoming call from the base station.
*/
- CDMA_INCOM_CALL = 0x81D,
+ CDMA_INCOMING_CALL = 0x81C,
/**
- * RL/FL fade or receiving a call release from the base station.
+ * Received an alert stop from the base station due to incoming only.
*/
- CDMA_ALERT_STOP = 0x81E,
+ CDMA_ALERT_STOP = 0x81D,
/**
* Channel acquisition failures. This indicates that device has failed acquiring all the
* channels in the PRL.
*/
- CHANNEL_ACQUISITION_FAILURE = 0x81F,
+ CHANNEL_ACQUISITION_FAILURE = 0x81E,
/**
* Maximum access probes transmitted.
*/
- MAX_ACCESS_PROBE = 0x820,
+ MAX_ACCESS_PROBE = 0x81F,
/**
* Concurrent service is not supported by base station.
*/
- CCS_NOT_SUPPORTED_BY_BS = 0x821,
+ CONCURRENT_SERVICE_NOT_SUPPORTED_BY_BASE_STATION = 0x820,
/**
* There was no response received from the base station.
*/
- NO_RESPONSE_FROM_BS = 0x822,
+ NO_RESPONSE_FROM_BASE_STATION = 0x821,
/**
* The base station rejecting the call.
*/
- REJECTED_BY_BS = 0x823,
+ REJECTED_BY_BASE_STATION = 0x822,
/**
* The concurrent services requested were not compatible.
*/
- CCS_INCOMPATIBLE = 0x824,
+ CONCURRENT_SERVICES_INCOMPATIBLE = 0x823,
/**
* Device does not have CDMA service.
*/
- NO_CDMA_SRV = 0x825,
+ NO_CDMA_SERVICE = 0x824,
/**
* RUIM not being present.
*/
- UIM_NOT_PRESENT = 0x826,
+ RUIM_NOT_PRESENT = 0x825,
/**
* Receiving a retry order from the base station.
*/
- CDMA_RETRY_ORDER = 0x827,
+ CDMA_RETRY_ORDER = 0x826,
/**
* Access blocked by the base station.
*/
- ACCESS_BLOCK = 0x828,
+ ACCESS_BLOCK = 0x827,
/**
* Access blocked by the base station for all mobile devices.
*/
- ACCESS_BLOCK_ALL = 0x829,
+ ACCESS_BLOCK_ALL = 0x828,
/**
* Maximum access probes for the IS-707B call.
*/
- IS707B_MAX_ACC = 0x82A,
+ IS707B_MAX_ACCESS_PROBES = 0x829,
/**
* Put device in thermal emergency.
*/
- THERMAL_EMERGENCY = 0x82B,
+ THERMAL_EMERGENCY = 0x82A,
/**
* In favor of a voice call or SMS when concurrent voice and data are not supported.
*/
- CCS_NOT_ALLOWED = 0x82C,
+ CONCURRENT_SERVICES_NOT_ALLOWED = 0x82B,
/**
* The other clients rejected incoming call.
*/
- INCOM_REJ = 0x82D,
+ INCOMING_CALL_REJECTED = 0x82C,
/**
* No service on the gateway.
*/
- NO_GATEWAY_SRV = 0x82E,
+ NO_SERVICE_ON_GATEWAY = 0x82D,
/**
* GPRS context is not available.
*/
- NO_GPRS_CONTEXT = 0x82F,
+ NO_GPRS_CONTEXT = 0x82E,
/**
* Network refuses service to the MS because either an identity of the MS is not acceptable to
* the network or the MS does not pass the authentication check.
*/
- ILLEGAL_MS = 0x830,
+ ILLEGAL_MS = 0x82F,
/**
* ME could not be authenticated and the ME used is not acceptable to the network.
*/
- ILLEGAL_ME = 0x831,
+ ILLEGAL_ME = 0x830,
/**
* Not allowed to operate either GPRS or non-GPRS services.
*/
- GPRS_SERVICES_AND_NON_GPRS_SERVICES_NOT_ALLOWED = 0x832,
+ GPRS_SERVICES_AND_NON_GPRS_SERVICES_NOT_ALLOWED = 0x831,
/**
* MS is not allowed to operate GPRS services.
*/
- GPRS_SERVICES_NOT_ALLOWED = 0x833,
+ GPRS_SERVICES_NOT_ALLOWED = 0x832,
/**
* No matching identity or context could be found in the network.
*/
- MS_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK = 0x834,
+ MS_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK = 0x833,
/**
- * Mobile reachable timer has expired, or the GMM context data related to the subscription dose
+ * Mobile reachable timer has expired, or the GMM context data related to the subscription does
* not exist in the SGSN.
*/
- IMPLICITLY_DETACHED = 0x835,
+ IMPLICITLY_DETACHED = 0x834,
/**
* UE requests GPRS service, or the network initiates a detach request in a PLMN which does not
* offer roaming for GPRS services to that MS.
*/
- PLMN_NOT_ALLOWED = 0x836,
+ PLMN_NOT_ALLOWED = 0x835,
/**
* MS requests service, or the network initiates a detach request, in a location area where the
* HPLMN determines that the MS, by subscription, is not allowed to operate.
*/
- LA_NOT_ALLOWED = 0x837,
+ LOCATION_AREA_NOT_ALLOWED = 0x836,
/**
* UE requests GPRS service or the network initiates a detach request in a PLMN that does not
* offer roaming for GPRS services.
*/
- GPRS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN = 0x838,
+ GPRS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN = 0x837,
/**
* PDP context already exists.
*/
- PDP_DUPLICATE = 0x839,
+ PDP_DUPLICATE = 0x838,
/**
* RAT change on the UE.
*/
- UE_RAT_CHANGE = 0x83A,
+ UE_RAT_CHANGE = 0x839,
/**
* Network cannot serve a request from the MS due to congestion.
*/
- CONGESTION = 0x83B,
+ CONGESTION = 0x83A,
/**
* MS requests an establishment of the radio access bearers for all active PDP contexts by
* sending a service request message indicating data to the network, but the SGSN does not have
* any active PDP context.
*/
- NO_PDP_CONTEXT_ACTIVATED = 0x83C,
+ NO_PDP_CONTEXT_ACTIVATED = 0x83B,
/**
* Access class blocking restrictions for the current camped cell.
*/
- ACCESS_CLASS_DSAC_REJECTION = 0x83D,
+ ACCESS_CLASS_DSAC_REJECTION = 0x83C,
/**
* SM attempts PDP activation for a maximum of four attempts.
*/
- PDP_ACTIVATE_MAX_RETRY_FAILED = 0x83E,
+ PDP_ACTIVATE_MAX_RETRY_FAILED = 0x83D,
/**
* Radio access bearer failure.
*/
- RAB_FAILURE = 0x83F,
+ RADIO_ACCESS_BEARER_FAILURE = 0x83E,
/**
* Invalid EPS bearer identity in the request.
*/
- ESM_UNKNOWN_EPS_BEARER_CONTEXT = 0x840,
+ ESM_UNKNOWN_EPS_BEARER_CONTEXT = 0x83F,
/**
* Data radio bearer is released by the RRC.
*/
- DRB_RELEASED_AT_RRC = 0x841,
+ DRB_RELEASED_BY_RRC = 0x840,
/**
* Indicate the connection was released.
*/
- NAS_SIG_CONN_RELEASED = 0x842,
+ CONNECTION_RELEASED = 0x841,
/**
* UE is detached.
*/
- EMM_DETACHED = 0x843,
+ EMM_DETACHED = 0x842,
/**
* Attach procedure is rejected by the network.
*/
- EMM_ATTACH_FAILED = 0x844,
+ EMM_ATTACH_FAILED = 0x843,
/**
* Attach procedure is started for EMC purposes.
*/
- EMM_ATTACH_STARTED = 0x845,
+ EMM_ATTACH_STARTED = 0x844,
/**
* Service request procedure failure.
*/
- LTE_NAS_SERVICE_REQ_FAILED = 0x846,
+ LTE_NAS_SERVICE_REQUEST_FAILED = 0x845,
/**
- * Active dedication bearer was requested using the same default bearer ID.
+ * Active dedicated bearer was requested using the same default bearer ID.
*/
- ESM_ACTIVE_DEDICATED_BEARER_REACTIVATED_BY_NW = 0x847,
+ DUPLICATE_BEARER_ID = 0x846,
/**
* Collision scenarios for the UE and network-initiated procedures.
*/
- ESM_LOWER_LAYER_FAILURE = 0x848,
+ ESM_COLLISION_SCENARIOS = 0x847,
/**
* Bearer must be deactivated to synchronize with the network.
*/
- ESM_SYNC_UP_WITH_NW = 0x849,
+ ESM_BEARER_DEACTIVATED_TO_SYNC_WITH_NETWORK = 0x848,
/**
- * Active dedication bearer was requested for an existing default bearer.
+ * Active dedicated bearer was requested for an existing default bearer.
*/
- ESM_NW_ACTIVATED_DED_BEARER_WITH_ID_OF_DEF_BEARER = 0x84A,
+ ESM_NW_ACTIVATED_DED_BEARER_WITH_ID_OF_DEF_BEARER = 0x849,
/**
* Bad OTA message is received from the network.
*/
- ESM_BAD_OTA_MESSAGE = 0x84B,
+ ESM_BAD_OTA_MESSAGE = 0x84A,
/**
* Download server rejected the call.
*/
- ESM_DS_REJECTED_THE_CALL = 0x84C,
+ ESM_DOWNLOAD_SERVER_REJECTED_THE_CALL = 0x84B,
/**
* PDN was disconnected by the downlaod server due to IRAT.
*/
- ESM_CONTEXT_TRANSFERED_DUE_TO_IRAT = 0x84D,
+ ESM_CONTEXT_TRANSFERRED_DUE_TO_IRAT = 0x84C,
/**
* Dedicated bearer will be deactivated regardless of the network response.
*/
- DS_EXPLICIT_DEACT = 0x84E,
+ DS_EXPLICIT_DEACTIVATION = 0x84D,
/**
* No specific local cause is mentioned, usually a valid OTA cause.
*/
- ESM_LOCAL_CAUSE_NONE = 0x84F,
+ ESM_LOCAL_CAUSE_NONE = 0x84E,
/**
* Throttling is not needed for this service request failure.
*/
- LTE_NAS_SERVICE_REQ_FAILED_NO_THROTTLE = 0x850,
+ LTE_THROTTLING_NOT_REQUIRED = 0x84F,
/**
* Access control list check failure at the lower layer.
*/
- ACCESS_CONTROL_LIST_CHECK_FAILURE = 0x851,
+ ACCESS_CONTROL_LIST_CHECK_FAILURE = 0x850,
/**
* Service is not allowed on the requested PLMN.
*/
- LTE_NAS_SERVICE_REQ_FAILED_DS_DISALLOW = 0x852,
+ SERVICE_NOT_ALLOWED_ON_PLMN = 0x851,
/**
* T3417 timer expiration of the service request procedure.
*/
- EMM_T3417_EXPIRED = 0x853,
+ EMM_T3417_EXPIRED = 0x852,
/**
* Extended service request fails due to expiration of the T3417 EXT timer.
*/
- EMM_T3417_EXT_EXPIRED = 0x854,
+ EMM_T3417_EXT_EXPIRED = 0x853,
/**
- * Transmission failure of uplink data.
+ * Transmission failure of radio resource control (RRC) uplink data.
*/
- LRRC_UL_DATA_CNF_FAILURE_TXN = 0x855,
+ RRC_UPLINK_DATA_TRANSMISSION_FAILURE = 0x854,
/**
- * Uplink data delivery failed due to a handover.
+ * Radio resource control (RRC) uplink data delivery failed due to a handover.
*/
- LRRC_UL_DATA_CNF_FAILURE_HO = 0x856,
+ RRC_UPLINK_DELIVERY_FAILED_DUE_TO_HANDOVER = 0x855,
/**
- * Uplink data delivery failed due to a connection release.
+ * Radio resource control (RRC) uplink data delivery failed due to a connection release.
*/
- LRRC_UL_DATA_CNF_FAILURE_CONN_REL = 0x857,
+ RRC_UPLINK_CONNECTION_RELEASE = 0x856,
/**
- * Uplink data delivery failed due to a radio link failure.
+ * Radio resource control (RRC) uplink data delivery failed due to a radio link failure.
*/
- LRRC_UL_DATA_CNF_FAILURE_RLF = 0x858,
+ RRC_UPLINK_RADIO_LINK_FAILURE = 0x857,
/**
- * RRC is not connected but the NAS sends an uplink data request.
+ * Radio resource control (RRC) is not connected but the non-access stratum (NAS) sends an
+ * uplink data request.
*/
- LRRC_UL_DATA_CNF_FAILURE_CTRL_NOT_CONN = 0x859,
+ RRC_UPLINK_ERROR_REQUEST_FROM_NAS = 0x858,
/**
- * Connection failure at access stratum.
+ * Radio resource control (RRC) connection failure at access stratum.
*/
- LRRC_CONN_EST_FAILURE = 0x85A,
+ RRC_CONNECTION_ACCESS_STRATUM_FAILURE = 0x859,
/**
- * Connection establishment is aborted due to another procedure.
+ * Radio resource control (RRC) connection establishment is aborted due to another procedure.
*/
- LRRC_CONN_EST_FAILURE_ABORTED = 0x85B,
+ RRC_CONNECTION_ANOTHER_PROCEDURE_IN_PROGRESS = 0x85A,
/**
- * Connection establishment failed due to a lower layer RRC connection failure.
+ * Radio resource control (RRC) connection establishment failed due to access barrred.
*/
- LRRC_CONN_EST_FAILURE_ACCESS_BARRED = 0x85C,
+ RRC_CONNECTION_ACCESS_BARRED = 0x85B,
/**
- * Connection establishment failed due to cell reselection at access stratum.
+ * Radio resource control (RRC) connection establishment failed due to cell reselection at
+ * access stratum.
*/
- LRRC_CONN_EST_FAILURE_CELL_RESEL = 0x85D,
+ RRC_CONNECTION_CELL_RESELECTION = 0x85C,
/**
- * Connection establishment failed due to configuration failure at the RRC.
+ * Connection establishment failed due to configuration failure at the radio resource control
+ * (RRC).
*/
- LRRC_CONN_EST_FAILURE_CONFIG_FAILURE = 0x85E,
+ RRC_CONNECTION_CONFIG_FAILURE = 0x85D,
/**
- * Connection could not be established in the time limit.
+ * Radio resource control (RRC) connection could not be established in the time limit.
*/
- LRRC_CONN_EST_FAILURE_TIMER_EXPIRED = 0x85F,
+ RRC_CONNECTION_TIMER_EXPIRED = 0x85E,
/**
- * Connection establishment failed due to a link failure at the RRC.
+ * Connection establishment failed due to a link failure at the radio resource control (RRC).
*/
- LRRC_CONN_EST_FAILURE_LINK_FAILURE = 0x860,
+ RRC_CONNECTION_LINK_FAILURE = 0x85F,
/**
- * Connection establishment failed as the RRC is not camped on any cell.
+ * Connection establishment failed as the radio resource control (RRC) is not camped on any
+ * cell.
*/
- LRRC_CONN_EST_FAILURE_NOT_CAMPED = 0x861,
+ RRC_CONNECTION_CELL_NOT_CAMPED = 0x860,
/**
- * Connection establishment failed due to a service interval failure at the RRC.
+ * Connection establishment failed due to a service interval failure at the radio resource
+ * control (RRC).
*/
- LRRC_CONN_EST_FAILURE_SI_FAILURE = 0x862,
+ RRC_CONNECTION_SYSTEM_INTERVAL_FAILURE = 0x861,
/**
- * Connection establishment failed due to the network rejecting the UE connection request.
+ * Radio resource control (RRC) connection establishment failed due to the network rejecting the
+ * UE connection request.
*/
- LRRC_CONN_EST_FAILURE_CONN_REJECT = 0x863,
+ RRC_CONNECTION_REJECT_BY_NETWORK = 0x862,
/**
- * Normal connection release.
+ * Normal radio resource control (RRC) connection release.
*/
- LRRC_CONN_REL_NORMAL = 0x864,
+ RRC_CONNECTION_NORMAL_RELEASE = 0x863,
/**
- * Connection release failed due to radio link failure conditions.
+ * Radio resource control (RRC) connection release failed due to radio link failure conditions.
*/
- LRRC_CONN_REL_RLF = 0x865,
+ RRC_CONNECTION_RADIO_LINK_FAILURE = 0x864,
/**
- * Connection reestablishment failure.
+ * Radio resource control (RRC) connection re-establishment failure.
*/
- LRRC_CONN_REL_CRE_FAILURE = 0x866,
+ RRC_CONNECTION_REESTABLISHMENT_FAILURE = 0x865,
/**
* UE is out of service during the call register.
*/
- LRRC_CONN_REL_OOS_DURING_CRE = 0x867,
+ RRC_CONNECTION_OUT_OF_SERVICE_DURING_CELL_REGISTER = 0x866,
/**
- * Connection has been released by the RRC due to an abort request.
+ * Connection has been released by the radio resource control (RRC) due to an abort request.
*/
- LRRC_CONN_REL_ABORTED = 0x868,
+ RRC_CONNECTION_ABORT_REQUEST = 0x867,
/**
- * Connection released due to a system information block read error.
+ * Radio resource control (RRC) connection released due to a system information block read
+ * error.
*/
- LRRC_CONN_REL_SIB_READ_ERROR = 0x869,
+ RRC_CONNECTION_SYSTEM_INFORMATION_BLOCK_READ_ERROR = 0x868,
/**
* Network-initiated detach with reattach.
*/
- DETACH_WITH_REATTACH_LTE_NW_DETACH = 0x86A,
+ NETWORK_INITIATED_DETACH_WITH_AUTO_REATTACH = 0x869,
/**
* Network-initiated detach without reattach.
*/
- DETACH_WITHOUT_REATTACH_LTE_NW_DETACH = 0x86B,
+ NETWORK_INITIATED_DETACH_NO_AUTO_REATTACH = 0x86A,
/**
* ESM procedure maximum attempt timeout failure.
*/
- ESM_PROC_TIME_OUT = 0x86C,
+ ESM_PROCEDURE_TIME_OUT = 0x86B,
/**
* No PDP exists with the given connection ID while modifying or deactivating or activation for
* an already active PDP.
*/
- INVALID_CONNECTION_ID = 0x86D,
+ INVALID_CONNECTION_ID = 0x86C,
/**
* Maximum NSAPIs have been exceeded during PDP activation.
*/
- INVALID_NSAPI = 0x86E,
+ MAXIMIUM_NSAPIS_EXCEEDED = 0x86D,
/**
* Primary context for NSAPI does not exist.
*/
- INVALID_PRI_NSAPI = 0x86F,
+ INVALID_PRIMARY_NSAPI = 0x86E,
/**
* Unable to encode the OTA message for MT PDP or deactivate PDP.
*/
- INVALID_FIELD = 0x870,
+ CANNOT_ENCODE_OTA_MESSAGE = 0x86F,
/**
* Radio access bearer is not established by the lower layers during activation, modification,
* or deactivation.
*/
- RAB_SETUP_FAILURE = 0x871,
+ RADIO_ACCESS_BEARER_SETUP_FAILURE = 0x870,
/**
* Expiration of the PDP establish timer with a maximum of five retries.
*/
- PDP_ESTABLISH_MAX_TIMEOUT = 0x872,
+ PDP_ESTABLISH_TIMEOUT_EXPIRED = 0x871,
/**
* Expiration of the PDP modify timer with a maximum of four retries.
*/
- PDP_MODIFY_MAX_TIMEOUT = 0x873,
+ PDP_MODIFY_TIMEOUT_EXPIRED = 0x872,
/**
* Expiration of the PDP deactivate timer with a maximum of four retries.
*/
- PDP_INACTIVE_MAX_TIMEOUT = 0x874,
+ PDP_INACTIVE_TIMEOUT_EXPIRED = 0x873,
/**
* PDP activation failed due to RRC_ABORT or a forbidden PLMN.
*/
- PDP_LOWERLAYER_ERROR = 0x875,
+ PDP_LOWERLAYER_ERROR = 0x874,
/**
* MO PDP modify collision when the MT PDP is already in progress.
*/
- PDP_MODIFY_COLLISION = 0x876,
- /**
- * Radio resource is not available.
- */
- SM_NO_RADIO_AVAILABLE = 0x877,
- /**
- * Abort due to service not available.
- */
- SM_ABORT_SERVICE_NOT_AVAILABLE = 0x878,
+ PDP_MODIFY_COLLISION = 0x875,
/**
* Maximum size of the L2 message was exceeded.
*/
- MESSAGE_EXCEED_MAX_L2_LIMIT = 0x879,
+ MAXINUM_SIZE_OF_L2_MESSAGE_EXCEEDED = 0x876,
/**
- * NAS request was rejected by the network.
+ * Non-access stratum (NAS) request was rejected by the network.
*/
- SM_NAS_SRV_REQ_FAILURE = 0x87A,
+ NAS_REQUEST_REJECTED_BY_NETWORK = 0x877,
/**
- * RRC connection establishment failure due to an error in the request message.
+ * Radio resource control (RRC) connection establishment failure due to an error in the request
+ * message.
*/
- RRC_CONN_EST_FAILURE_REQ_ERROR = 0x87B,
+ RRC_CONNECTION_INVALID_REQUEST = 0x878,
/**
- * RRC connection establishment failure due to a change in the tracking area ID.
+ * Radio resource control (RRC) connection establishment failure due to a change in the tracking
+ * area ID.
*/
- RRC_CONN_EST_FAILURE_TAI_CHANGE = 0x87C,
+ RRC_CONNECTION_TRACKING_AREA_ID_CHANGED = 0x879,
/**
- * RRC connection establishment failure because the RF was unavailable.
+ * Radio resource control (RRC) connection establishment failure due to the RF was unavailable.
*/
- RRC_CONN_EST_FAILURE_RF_UNAVAILABLE = 0x87D,
+ RRC_CONNECTION_RF_UNAVAILABLE = 0x87A,
/**
- * Connection was aborted before deactivating the LTE stack due to a successful LX IRAT.
- * (e.g., after IRAT handovers)
+ * Radio resource control (RRC) connection was aborted before deactivating the LTE stack due to
+ * a successful LTE to WCDMA/GSM/TD-SCDMA IRAT change.
*/
- RRC_CONN_REL_ABORTED_IRAT_SUCCESS = 0x87E,
+ RRC_CONNECTION_ABORTED_DUE_TO_IRAT_CHANGE = 0x87B,
/**
- * If the UE has an LTE radio link failure before security is established, the connection must
- * be released and the UE must return to idle.
+ * If the UE has an LTE radio link failure before security is established, the radio resource
+ * control (RRC) connection must be released and the UE must return to idle.
*/
- RRC_CONN_REL_RLF_SEC_NOT_ACTIVE = 0x87F,
+ RRC_CONNECTION_RELEASED_SECURITY_NOT_ACTIVE = 0x87C,
/**
- * Connection was aborted by the NAS after an IRAT to LTE IRAT handover.
+ * Radio resource control (RRC) connection was aborted by the non-access stratum (NAS) after an
+ * IRAT to LTE IRAT handover.
*/
- RRC_CONN_REL_IRAT_TO_LTE_ABORTED = 0x880,
+ RRC_CONNECTION_ABORTED_AFTER_HANDOVER = 0x87D,
/**
- * Connection was aborted before deactivating the LTE stack after a successful LR IRAT cell
+ * Radio resource control (RRC) connection was aborted before deactivating the LTE stack after a
+ * successful LTE to GSM/EDGE IRAT cell change order procedure.
+ */
+ RRC_CONNECTION_ABORTED_AFTER_IRAT_CELL_CHANGE = 0x87E,
+ /**
+ * Radio resource control (RRC) connection was aborted in the middle of a LTE to GSM IRAT cell
* change order procedure.
*/
- RRC_CONN_REL_IRAT_FROM_LTE_TO_G_CCO_SUCCESS = 0x881,
- /**
- * Connection was aborted in the middle of a LG IRAT cell change order.
- */
- RRC_CONN_REL_IRAT_FROM_LTE_TO_G_CCO_ABORTED = 0x882,
+ RRC_CONNECTION_ABORTED_DURING_IRAT_CELL_CHANGE = 0x87F,
/**
* IMSI present in the UE is unknown in the home subscriber server.
*/
- IMSI_UNKNOWN_IN_HSS = 0x883,
+ IMSI_UNKNOWN_IN_HOME_SUBSCRIBER_SERVER = 0x880,
/**
* IMEI of the UE is not accepted by the network.
*/
- IMEI_NOT_ACCEPTED = 0x884,
+ IMEI_NOT_ACCEPTED = 0x881,
/**
* EPS and non-EPS services are not allowed by the network.
*/
- EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED = 0x885,
+ EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED = 0x882,
/**
* EPS services are not allowed in the PLMN.
*/
- EPS_SERVICES_NOT_ALLOWED_IN_PLMN = 0x886,
+ EPS_SERVICES_NOT_ALLOWED_IN_PLMN = 0x883,
/**
* Mobile switching center is temporarily unreachable.
*/
- MSC_TEMPORARILY_NOT_REACHABLE = 0x887,
+ MSC_TEMPORARILY_NOT_REACHABLE = 0x884,
/**
* CS domain is not available.
*/
- CS_DOMAIN_NOT_AVAILABLE = 0x888,
+ CS_DOMAIN_NOT_AVAILABLE = 0x885,
/**
* ESM level failure.
*/
- ESM_FAILURE = 0x889,
+ ESM_FAILURE = 0x886,
/**
* MAC level failure.
*/
- MAC_FAILURE = 0x88A,
+ MAC_FAILURE = 0x887,
/**
* Synchronization failure.
*/
- SYNCH_FAILURE = 0x88B,
+ SYNCHRONIZATION_FAILURE = 0x888,
/**
* UE security capabilities mismatch.
*/
- UE_SECURITY_CAPABILITIES_MISMATCH = 0x88C,
+ UE_SECURITY_CAPABILITIES_MISMATCH = 0x889,
/**
* Unspecified security mode reject.
*/
- SECURITY_MODE_REJ_UNSPECIFIED = 0x88D,
+ SECURITY_MODE_REJECTED = 0x88A,
/**
* Unacceptable non-EPS authentication.
*/
- NON_EPS_AUTH_UNACCEPTABLE = 0x88E,
+ UNACCEPTABLE_NON_EPS_AUTHENTICATION = 0x88B,
/**
* CS fallback call establishment is not allowed.
*/
- CS_FALLBACK_CALL_EST_NOT_ALLOWED = 0x88F,
+ CS_FALLBACK_CALL_ESTABLISHMENT_NOT_ALLOWED = 0x88C,
/**
* No EPS bearer context was activated.
*/
- NO_EPS_BEARER_CONTEXT_ACTIVATED = 0x890,
+ NO_EPS_BEARER_CONTEXT_ACTIVATED = 0x88D,
/**
* Invalid EMM state.
*/
- EMM_INVALID_STATE = 0x891,
+ INVALID_EMM_STATE = 0x88E,
/**
* Non-Access Spectrum layer failure.
*/
- NAS_LAYER_FAILURE = 0x892,
+ NAS_LAYER_FAILURE = 0x88F,
/**
* Multiple PDP call feature is disabled.
*/
- MULTI_PDN_NOT_ALLOWED = 0x893,
+ MULTIPLE_PDP_CALL_NOT_ALLOWED = 0x890,
/**
* Data call has been brought down because EMBMS is not enabled at the RRC layer.
*/
- EMBMS_NOT_ENABLED = 0x894,
+ EMBMS_NOT_ENABLED = 0x891,
/**
* Data call was unsuccessfully transferred during the IRAT handover.
*/
- PENDING_REDIAL_CALL_CLEANUP = 0x895,
+ IRAT_HANDOVER_FAILED = 0x892,
/**
* EMBMS data call has been successfully brought down.
*/
- EMBMS_REGULAR_DEACTIVATION = 0x896,
+ EMBMS_REGULAR_DEACTIVATION = 0x893,
/**
* Test loop-back data call has been successfully brought down.
*/
- TLB_REGULAR_DEACTIVATION = 0x897,
+ TEST_LOOPBACK_REGULAR_DEACTIVATION = 0x894,
/**
* Lower layer registration failure.
*/
- LOWER_LAYER_REGISTRATION_FAILURE = 0x898,
+ LOWER_LAYER_REGISTRATION_FAILURE = 0x895,
/**
- * Network initiates a detach on LTE with error cause ""data plan has been replenished or has
- * expired.
+ * Network initiates a detach on LTE with error cause "data plan has been replenished or has
+ * expired".
*/
- DETACH_EPS_SERVICES_NOT_ALLOWED = 0x899,
+ DATA_PLAN_EXPIRED = 0x896,
/**
* UMTS interface is brought down due to handover from UMTS to iWLAN.
*/
- SM_INTERNAL_PDP_DEACTIVATION = 0x89A,
+ UMTS_HANDOVER_TO_IWLAN = 0x897,
/**
- * The reception of a connection deny message with a deny code of general or network busy.
+ * Received a connection deny due to general or network busy on EVDO network.
*/
- CD_GEN_OR_BUSY = 0x89B,
+ EVDO_CONNECTION_DENY_BY_GENERAL_OR_NETWORK_BUSY = 0x898,
/**
- * The reception of a connection deny message with a deny code of billing failure or
- * authentication failure.
+ * Received a connection deny due to billing or authentication failure on EVDO network.
*/
- CD_BILL_OR_AUTH = 0x89C,
+ EVDO_CONNECTION_DENY_BY_BILLING_OR_AUTHENTICATION_FAILURE = 0x899,
/**
* HDR system has been changed due to redirection or the PRL was not preferred.
*/
- HDR_CHANGED = 0x89D,
+ EVDO_HDR_CHANGED = 0x89A,
/**
* Device exited HDR due to redirection or the PRL was not preferred.
*/
- HDR_EXITED = 0x89E,
+ EVDO_HDR_EXITED = 0x89B,
/**
* Device does not have an HDR session.
*/
- HDR_NO_SESSION = 0x89F,
+ EVDO_HDR_NO_SESSION = 0x89C,
/**
* It is ending an HDR call origination in favor of a GPS fix.
*/
- HDR_ORIG_DURING_GPS_FIX = 0x8A0,
+ EVDO_USING_GPS_FIX_INSTEAD_OF_HDR_CALL = 0x89D,
/**
* Connection setup on the HDR system was time out.
*/
- HDR_CS_TIMEOUT = 0x8A1,
+ EVDO_HDR_CONNECTION_SETUP_TIMEOUT = 0x89E,
/**
* Device failed to acquire a co-located HDR for origination.
*/
- COLLOC_ACQ_FAIL = 0x8A2,
+ FAILED_TO_ACQUIRE_COLOCATED_HDR = 0x89F,
/**
* OTASP commit is in progress.
*/
- OTASP_COMMIT_IN_PROG = 0x8A3,
+ OTASP_COMMIT_IN_PROGRESS = 0x8A0,
/**
* Device has no hybrid HDR service.
*/
- NO_HYBR_HDR_SRV = 0x8A4,
+ NO_HYBRID_HDR_SERVICE = 0x8A1,
/**
* HDR module could not be obtained because of the RF locked.
*/
- HDR_NO_LOCK_GRANTED = 0x8A5,
+ HDR_NO_LOCK_GRANTED = 0x8A2,
/**
* DBM or SMS is in progress.
*/
- HOLD_OTHER_IN_PROG = 0x8A6,
+ DBM_OR_SMS_IN_PROGRESS = 0x8A3,
/**
* HDR module released the call due to fade.
*/
- HDR_FADE = 0x8A7,
+ HDR_FADE = 0x8A4,
/**
* HDR system access failure.
*/
- HDR_ACC_FAIL = 0x8A8,
+ HDR_ACCESS_FAILURE = 0x8A5,
/**
* P_rev supported by 1 base station is less than 6, which is not supported for a 1X data call.
* The UE must be in the footprint of BS which has p_rev >= 6 to support this SO33 call.
*/
- UNSUPPORTED_1X_PREV = 0x8A9,
+ UNSUPPORTED_1X_PREV = 0x8A6,
/**
* Client ended the data call.
*/
- LOCAL_END = 0x8AA,
+ LOCAL_END = 0x8A7,
/**
* Device has no service.
*/
- NO_SRV = 0x8AB,
+ NO_SERVICE = 0x8A8,
/**
* Device lost the system due to fade.
*/
- FADE = 0x8AC,
+ FADE = 0x8A9,
/**
* Receiving a release from the base station with no reason.
*/
- REL_NORMAL = 0x8AD,
+ NORMAL_RELEASE = 0x8AA,
/**
* Access attempt is already in progress.
*/
- ACC_IN_PROG = 0x8AE,
- /**
- * Access failure.
- */
- ACC_FAIL = 0x8AF,
+ ACCESS_ATTEMPT_ALREADY_IN_PROGRESS = 0x8AB,
/**
* Device is in the process of redirecting or handing off to a different target system.
*/
- REDIR_OR_HANDOFF = 0x8B0,
+ REDIRECTION_OR_HANDOFF_IN_PROGRESS = 0x8AC,
/**
* Device is operating in Emergency mode.
*/
- EMERGENCY_MODE = 0x8B1,
+ EMERGENCY_MODE = 0x8AD,
/**
* Device is in use (e.g., voice call).
*/
- PHONE_IN_USE = 0x8B2,
+ PHONE_IN_USE = 0x8AE,
/**
- * Device operational mode is different from the mode requested in the traffic channel bring up
+ * Device operational mode is different from the mode requested in the traffic channel bring up.
*/
- INVALID_MODE = 0x8B3,
+ INVALID_MODE = 0x8AF,
/**
* SIM was marked by the network as invalid for the circuit and/or packet service domain.
*/
- INVALID_SIM_STATE = 0x8B4,
+ INVALID_SIM_STATE = 0x8B0,
/**
* There is no co-located HDR.
*/
- NO_COLLOC_HDR = 0x8B5,
+ NO_COLLOCATED_HDR = 0x8B1,
/**
* UE is entering power save mode.
*/
- EMM_DETACHED_PSM = 0x8B6,
+ UE_IS_ENTERING_POWERSAVE_MODE = 0x8B2,
/**
* Dual switch from single standby to dual standby is in progress.
*/
- DUAL_SWITCH = 0x8B7,
+ DUAL_SWITCH = 0x8B3,
/**
- * Data call bring up fails in the PPP setup due to a timeout.
- * (e.g., an LCP conf ack was not received from the network)
+ * Data call bring up fails in the PPP setup due to a timeout. (e.g., an LCP conf ack was not
+ * received from the network)
*/
- PPP_TIMEOUT = 0x8B8,
+ PPP_TIMEOUT = 0x8B4,
/**
* Data call bring up fails in the PPP setup due to an authorization failure.
* (e.g., authorization is required, but not negotiated with the network during an LCP phase)
*/
- PPP_AUTH_FAILURE = 0x8B9,
+ PPP_AUTH_FAILURE = 0x8B5,
/**
* Data call bring up fails in the PPP setup due to an option mismatch.
*/
- PPP_OPTION_MISMATCH = 0x8BA,
+ PPP_OPTION_MISMATCH = 0x8B6,
/**
* Data call bring up fails in the PPP setup due to a PAP failure.
*/
- PPP_PAP_FAILURE = 0x8BB,
+ PPP_PAP_FAILURE = 0x8B7,
/**
* Data call bring up fails in the PPP setup due to a CHAP failure.
*/
- PPP_CHAP_FAILURE = 0x8BC,
+ PPP_CHAP_FAILURE = 0x8B8,
/**
* Data call bring up fails in the PPP setup because the PPP is in the process of cleaning the
* previous PPP session.
*/
- PPP_ERR_CLOSE_IN_PROGRESS = 0x8BD,
+ PPP_CLOSE_IN_PROGRESS = 0x8B9,
/**
* IPv6 interface bring up fails because the network provided only the IPv4 address for the
* upcoming PDN permanent client can reattempt a IPv6 call bring up after the IPv4 interface is
* also brought down. However, there is no guarantee that the network will provide a IPv6
* address.
*/
- EHRPD_SUBS_LIMITED_TO_V4 = 0x8BE,
+ LIMITED_TO_IPV4 = 0x8BA,
/**
* IPv4 interface bring up fails because the network provided only the IPv6 address for the
* upcoming PDN permanent client can reattempt a IPv4 call bring up after the IPv6 interface is
* also brought down. However there is no guarantee that the network will provide a IPv4
* address.
*/
- EHRPD_SUBS_LIMITED_TO_V6 = 0x8BF,
+ LIMITED_TO_IPV6 = 0x8BB,
/**
* Data call bring up fails in the VSNCP phase due to a VSNCP timeout error.
*/
- EHRPD_VSNCP_TIMEOUT = 0x8C0,
+ VSNCP_TIMEOUT = 0x8BC,
/**
- * Data call bring up fails in the VSNCP phase due to a general error
+ * Data call bring up fails in the VSNCP phase due to a general error. It's used when there is
+ * no other specific error code available to report the failure.
*/
- EHRPD_VSNCP_GEN_ERROR = 0x8C1,
+ VSNCP_GEN_ERROR = 0x8BD,
/**
* Data call bring up fails in the VSNCP phase due to a network rejection of the VSNCP
* configuration request because the requested APN is unauthorized.
*/
- EHRPD_VSNCP_UNAUTH_APN = 0x8C2,
+ VSNCP_APN_UNATHORIZED = 0x8BE,
/**
* Data call bring up fails in the VSNCP phase due to a network rejection of the VSNCP
* configuration request because the PDN limit has been exceeded.
*/
- EHRPD_VSNCP_PDN_LIMIT_EXCEED = 0x8C3,
+ VSNCP_PDN_LIMIT_EXCEEDED = 0x8BF,
/**
- * Data call bring up fails in the VSNCP phase because the network rejected the VSNCP
- * configuration request due to no PDN gateway.
+ * Data call bring up fails in the VSNCP phase due to the network rejected the VSNCP
+ * configuration request due to no PDN gateway address.
*/
- EHRPD_VSNCP_NO_PDN_GW = 0x8C4,
+ VSNCP_NO_PDN_GATEWAY_ADDRESS = 0x8C0,
/**
* Data call bring up fails in the VSNCP phase due to a network rejection of the VSNCP
* configuration request because the PDN gateway is unreachable.
*/
- EHRPD_VSNCP_PDN_GW_UNREACH = 0x8C5,
+ VSNCP_PDN_GATEWAY_UNREACHABLE = 0x8C1,
/**
* Data call bring up fails in the VSNCP phase due to a network rejection of the VSNCP
* configuration request due to a PDN gateway reject.
*/
- EHRPD_VSNCP_PDN_GW_REJ = 0x8C6,
+ VSNCP_PDN_GATEWAY_REJECT = 0x8C2,
/**
* Data call bring up fails in the VSNCP phase due to a network rejection of the VSNCP
* configuration request with the reason of insufficient parameter.
*/
- EHRPD_VSNCP_INSUFF_PARAM = 0x8C7,
+ VSNCP_INSUFFICIENT_PARAMETERS = 0x8C3,
/**
* Data call bring up fails in the VSNCP phase due to a network rejection of the VSNCP
* configuration request with the reason of resource unavailable.
*/
- EHRPD_VSNCP_RESOURCE_UNAVAIL = 0x8C8,
+ VSNCP_RESOURCE_UNAVAILABLE = 0x8C4,
/**
* Data call bring up fails in the VSNCP phase due to a network rejection of the VSNCP
- * configuration request with the reason of admin prohibited.
+ * configuration request with the reason of administratively prohibited at the HSGW.
*/
- EHRPD_VSNCP_ADMIN_PROHIBIT = 0x8C9,
+ VSNCP_ADMINISTRATIVELY_PROHIBITED = 0x8C5,
/**
* Data call bring up fails in the VSNCP phase due to a network rejection of PDN ID in use, or
* all existing PDNs are brought down with this end reason because one of the PDN bring up was
* rejected by the network with the reason of PDN ID in use.
*/
- EHRPD_VSNCP_PDN_ID_IN_USE = 0x8CA,
+ VSNCP_PDN_ID_IN_USE = 0x8C6,
/**
* Data call bring up fails in the VSNCP phase due to a network rejection of the VSNCP
* configuration request for the reason of subscriber limitation.
*/
- EHRPD_VSNCP_SUBSCR_LIMITATION = 0x8CB,
+ VSNCP_SUBSCRIBER_LIMITATION = 0x8C7,
/**
* Data call bring up fails in the VSNCP phase due to a network rejection of the VSNCP
* configuration request because the PDN exists for this APN.
*/
- EHRPD_VSNCP_PDN_EXISTS_FOR_THIS_APN = 0x8CC,
+ VSNCP_PDN_EXISTS_FOR_THIS_APN = 0x8C8,
/**
* Data call bring up fails in the VSNCP phase due to a network rejection of the VSNCP
* configuration request with reconnect to this PDN not allowed, or an active data call is
* terminated by the network because reconnection to this PDN is not allowed. Upon receiving
- * this error code from the network, the modem infinitely throttles the PDN until the next
- * power cycle.
+ * this error code from the network, the modem infinitely throttles the PDN until the next power
+ * cycle.
*/
- EHRPD_VSNCP_RECONNECT_NOT_ALLOWED = 0x8CD,
+ VSNCP_RECONNECT_NOT_ALLOWED = 0x8C9,
/**
* Device failure to obtain the prefix from the network.
*/
- IPV6_PREFIX_UNAVAILABLE = 0x8CE,
+ IPV6_PREFIX_UNAVAILABLE = 0x8CA,
/**
* System preference change back to SRAT during handoff
*/
- HANDOFF_PREF_SYS_BACK_TO_SRAT = 0x8CF,
+ HANDOFF_PREFERENCE_CHANGED = 0x8CB,
};
/**
@@ -1390,13 +1397,9 @@
*/
NON_IP = 4,
/**
- * Ethernet protocol
- */
- ETHERNET = 5,
- /**
* Transfer of Unstructured data to the Data Network via N6
*/
- UNSTRUCTURED = 6,
+ UNSTRUCTURED = 5,
};
safe_union RadioFrequencyInfo {
diff --git a/sensors/2.0/default/Android.bp b/sensors/2.0/default/Android.bp
index db0b148..d83a9c3 100644
--- a/sensors/2.0/default/Android.bp
+++ b/sensors/2.0/default/Android.bp
@@ -35,4 +35,5 @@
"libpower",
"libutils",
],
+ vintf_fragments: ["android.hardware.sensors@2.0.xml"],
}
diff --git a/sensors/2.0/default/android.hardware.sensors@2.0.xml b/sensors/2.0/default/android.hardware.sensors@2.0.xml
new file mode 100644
index 0000000..1acc8e6
--- /dev/null
+++ b/sensors/2.0/default/android.hardware.sensors@2.0.xml
@@ -0,0 +1,11 @@
+<manifest version="1.0" type="device">
+ <hal format="hidl">
+ <name>android.hardware.sensors</name>
+ <transport>hwbinder</transport>
+ <version>2.0</version>
+ <interface>
+ <name>ISensors</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+</manifest>
diff --git a/tv/cec/2.0/Android.bp b/tv/cec/2.0/Android.bp
new file mode 100644
index 0000000..998cb23
--- /dev/null
+++ b/tv/cec/2.0/Android.bp
@@ -0,0 +1,46 @@
+// This file is autogenerated by hidl-gen -Landroidbp.
+
+hidl_interface {
+ name: "android.hardware.tv.cec@2.0",
+ root: "android.hardware",
+ vndk: {
+ enabled: true,
+ },
+ srcs: [
+ "types.hal",
+ "IHdmiCec.hal",
+ "IHdmiCecCallback.hal",
+ ],
+ interfaces: [
+ "android.hidl.base@1.0",
+ "android.hidl.safe_union@1.0",
+ ],
+ types: [
+ "AbortReason",
+ "CecAllDeviceTypeValue",
+ "CecDeviceFeature",
+ "CecDeviceInfo",
+ "CecDeviceType",
+ "CecLogicalAddress",
+ "CecMessage",
+ "CecMessageType",
+ "CecPowerState",
+ "CecRcProfile",
+ "CecRcProfile1",
+ "CecRcProfileId",
+ "CecRcProfileSource",
+ "CecTopologyEvent",
+ "CecTopologyEventType",
+ "CecUICommandCodes",
+ "CecVersion",
+ "HdmiPortInfo",
+ "HdmiPortType",
+ "HotplugEvent",
+ "MaxLength",
+ "OptionKey",
+ "Result",
+ "SendMessageResult",
+ ],
+ gen_java: true,
+}
+
diff --git a/tv/cec/2.0/IHdmiCec.hal b/tv/cec/2.0/IHdmiCec.hal
new file mode 100644
index 0000000..0723bad
--- /dev/null
+++ b/tv/cec/2.0/IHdmiCec.hal
@@ -0,0 +1,209 @@
+/*
+ * Copyright (C) 2019 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.tv.cec@2.0;
+
+import IHdmiCecCallback;
+
+/**
+ * HDMI-CEC HAL interface definition.
+ */
+interface IHdmiCec {
+ /**
+ * Passes Primary Device Type that must be used in this system.
+ *
+ * HAL must use it to allocate logical address as specified in CEC section
+ * 11.3.2 of the CEC spec 2.0b. Then CEC commands addressed the given
+ * logical address can be filtered in.
+ * This method shall be able to be called up to twice to support two Primary
+ * Device Type as specified in CEC Table 11-8 of the CEC spec 2.0b.
+ *
+ * @param deviceType that must be used in this system. It must be a valid
+ * value in CecDeviceType for the call to succeed.
+ * @return result Result status of the operation. SUCCESS if successful,
+ * FAILURE_INVALID_ARGS if the given device type is invalid,
+ * FAILURE_BUSY if device or resource is busy
+ */
+ @callflow(next={"*"})
+ addDeviceType(CecDeviceType deviceType) generates (Result result);
+
+ /**
+ * Clears all Primary Device Types.
+ *
+ * It is used when the system plan to reconfigure Primary Device Type,
+ * hence to tell HAL to release all logical address associated to them,
+ * and change the state back to the beginning.
+ */
+ @callflow(next="addDeviceType")
+ @exit
+ clearDeviceTypes();
+
+ /**
+ * Set All Device Types for a Primary Device Type.
+ *
+ * This value must be used in REPORT_FEATURES message to response
+ * GIVE_FEATURES message in HAL.
+ *
+ * @param allDeviceTypes device all device types for a Primary Device Type.
+ */
+ @callflow(next="addDeviceType")
+ setAllDeviceTypes(CecAllDeviceTypes allDeviceTypes);
+
+ /**
+ * Set Device Features for a Primary Device Type.
+ *
+ * This value must be used in REPORT_FEATURES message to response
+ * GIVE_FEATURES message in HAL.
+ *
+ * @param deviceType The device Primary Device Type.
+ * @param deviceFeatures device features for a Primary Device Type.
+ */
+ @callflow(next="addDeviceType")
+ setDeviceFeatures(CecDeviceType deviceType,
+ CecDeviceFeatures deviceFeatures);
+
+ /**
+ * Set Remote Control Profile for a Primary Device Type.
+ *
+ * This value must be used in REPORT_FEATURES message to response
+ * GIVE_FEATURES message in HAL.
+ *
+ * @param deviceType The device Primary Device Type.
+ * @param rcProliles remote control profiles for a Primary Device Type.
+ */
+ @callflow(next="addDeviceType")
+ setRcProfile(CecDeviceType deviceType, CecRcProfile rcProfile);
+
+ /**
+ * Retrieve CEC device information.
+ *
+ * CEC section 11.3 of the CEC spec 2.0b specify that a device should not
+ * ask for static information that another device has already supplied.
+ * Therefore, CEC 2.0 software stack need a map to store all cec
+ * devices’ information of current CEC network.
+ * The device information is broadcasted by a device after it allocates a
+ * logical address. Messages used to send out these information are
+ * REPORT_FEATURES, REPORT_PHYSICAL_ADDRESS, DEVICE_VENDOR_ID.
+ * The spec also requires less than 1 second between REPORT_FEATURES and
+ * REPORT_PHYSICAL_ADDRESS message, and less than 2 second between
+ * REPORT_PHYSICAL_ADDRESS and DEVICE_VENDOR_ID. An Implementation of
+ * device information map in hal can help to meet the timing constraints.
+ * Logical addressing is part of the process to build this map, so the
+ * implementation shall include allocating logical address too.
+ * Whenever a device plug/unplug, the topology of CEC network changes.
+ * The hal implementation shall update devices’ information map, and
+ * send out onTopologyEvent to Android system. Then Android system
+ * will use readDeviceInfo to retreive latest devices’ information of CEC
+ * network.
+ * If SYSTEM_CEC_CONTROL is false, the hal implementation need continue to
+ * maintain and update device information map, and send out pending
+ * onTopologyEvent to Android system when SYSTEM_CEC_CONTROL is
+ * changed to true.
+ *
+ * @param logicalAddress logical address of CEC device.
+ * @param physicalAddress physical address of CEC device.
+ * @return CecDeviceInfo from device information map.
+ * @return result Result status of the operation. SUCCESS if successful,
+ * FAILURE_INVALID_ARGS if logical or physical address is invalid.
+ * FAILURE_INVALID_STATE if device information isn't available yet.
+ */
+ @callflow(next="onTopologyChangeEvent")
+ readDeviceInfo(CecLogicalAddress logicalAddress,
+ CecPhysicalAddress physicalAddress)
+ generates (Result result, CecDeviceInfo deviceInfo);
+
+ /**
+ * Transmits HDMI-CEC message to other HDMI device.
+ *
+ * The method must be designed to return in a certain amount of time and not
+ * hanging forever. This method MUST complete with in 1 second.
+ *
+ * It must try retransmission at least once as specified in the section '7.1
+ * Frame Re-transmissions' of the CEC Spec 1.4b.
+ *
+ * @param message CEC message to be sent to other HDMI device.
+ * @return result Result status of the operation. SUCCESS if successful,
+ * NACK if the sent message is not acknowledged,
+ * BUSY if the CEC bus is busy.
+ */
+ @callflow(next="*")
+ sendMessage(CecMessage message) generates (SendMessageResult result);
+
+ /**
+ * Set the callback
+ *
+ * It is used by the framework to receive CecMessages, HDMI hotplug event
+ * and topology update event. Only one callback client is supported.
+ *
+ * @param callback Callback object to pass hdmi events to the system. The
+ * previously registered callback must be replaced with this one.
+ */
+ @callflow(next={"*"})
+ @entry
+ setCallback(IHdmiCecCallback callback);
+
+ /**
+ * Gets the hdmi port information of underlying hardware.
+ *
+ * @return infos The list of HDMI port information
+ */
+ @callflow(next={"*"})
+ getPortInfo() generates (vec<HdmiPortInfo> infos);
+
+ /**
+ * Sets flags controlling the way HDMI-CEC service works down to HAL
+ * implementation. Those flags must be used in case the feature needs update
+ * in HAL itself, firmware or microcontroller.
+ *
+ * @param key The key of the option to be updated with a new value.
+ * @param value Value to be set.
+ */
+ @callflow(next="*")
+ setOption(OptionKey key, bool value);
+
+ /**
+ * Passes the updated language information of Android system. Contains
+ * three-letter code as defined in ISO/FDIS 639-2. Must be used for HAL to
+ * respond to <Get Menu Language> while in standby mode.
+ *
+ * @param language Three-letter code defined in ISO/FDIS 639-2. Must be
+ * lowercase letters. (e.g., eng for English)
+ */
+ @callflow(next="*")
+ setLanguage(string language);
+
+ /**
+ * Configures ARC circuit in the hardware logic to start or stop the
+ * feature.
+ *
+ * @param portId Port id to be configured.
+ * @param enable Flag must be either true to start the feature or false to
+ * stop it.
+ */
+ @callflow(next="*")
+ enableAudioReturnChannel(HdmiPortId portId, bool enable);
+
+ /**
+ * Gets the connection status of the specified port.
+ *
+ * It's specified in CEC section 10.8 of the CEC spec 2.0b
+ *
+ * @param portId Port id to be inspected for the connection status.
+ * @return status True if a device is connected, otherwise false.
+ */
+ @callflow(next="*")
+ isConnected(HdmiPortId portId) generates (bool connected);
+};
diff --git a/tv/cec/2.0/IHdmiCecCallback.hal b/tv/cec/2.0/IHdmiCecCallback.hal
new file mode 100644
index 0000000..1a8a489
--- /dev/null
+++ b/tv/cec/2.0/IHdmiCecCallback.hal
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2019 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.tv.cec@2.0;
+
+interface IHdmiCecCallback {
+ /**
+ * The callback function that must be called by HAL implementation to notify
+ * the system of new CEC message arrival.
+ */
+ oneway onCecMessage(CecMessage message);
+
+ /**
+ * The callback function that must be called by HAL implementation to notify
+ * the system of new hotplug event.
+ */
+ oneway onHotplugEvent(HotplugEvent event);
+
+ /**
+ * The callback function must be called by HAL implementation to notify the
+ * system whenever CEC device information of CEC network change.
+ * HAL shall be ready for readDeviceInfo call before invoke this callback.
+ * This event is triggered by topology change of whole CEC network. It's
+ * different from HotplugEvent which is triggered between devices which are
+ * connected directly through HDMI cable.
+ */
+ oneway onTopologyEvent(CecTopologyEvent event);
+};
diff --git a/tv/cec/2.0/default/Android.bp b/tv/cec/2.0/default/Android.bp
new file mode 100644
index 0000000..6e624e3
--- /dev/null
+++ b/tv/cec/2.0/default/Android.bp
@@ -0,0 +1,42 @@
+cc_library_shared {
+ name: "android.hardware.tv.cec@2.0-impl",
+ defaults: ["hidl_defaults"],
+ vendor: true,
+ relative_install_path: "hw",
+ srcs: ["HdmiCec.cpp"],
+
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "liblog",
+ "libbase",
+ "libutils",
+ "libhardware",
+ "android.hardware.tv.cec@2.0",
+ ],
+
+}
+
+cc_binary {
+ name: "android.hardware.tv.cec@2.0-service",
+ vintf_fragments: ["android.hardware.tv.cec@2.0-service.xml"],
+ defaults: ["hidl_defaults"],
+ relative_install_path: "hw",
+ vendor: true,
+ init_rc: ["android.hardware.tv.cec@2.0-service.rc"],
+ srcs: ["service.cpp"],
+
+ shared_libs: [
+ "liblog",
+ "libcutils",
+ "libdl",
+ "libbase",
+ "libutils",
+ "libhardware_legacy",
+ "libhardware",
+ "libhidlbase",
+ "libhidltransport",
+ "android.hardware.tv.cec@2.0",
+ ],
+
+}
diff --git a/tv/cec/2.0/default/HdmiCec.cpp b/tv/cec/2.0/default/HdmiCec.cpp
new file mode 100644
index 0000000..f451719
--- /dev/null
+++ b/tv/cec/2.0/default/HdmiCec.cpp
@@ -0,0 +1,421 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+#define LOG_TAG "android.hardware.tv.cec@2.0-impl"
+#include <android-base/logging.h>
+
+#include <hardware/hardware.h>
+#include <hardware/hdmi_cec.h>
+#include "HdmiCec.h"
+
+namespace android {
+namespace hardware {
+namespace tv {
+namespace cec {
+namespace V2_0 {
+namespace implementation {
+
+static_assert(CEC_DEVICE_INACTIVE == static_cast<int>(CecDeviceType::INACTIVE),
+ "CecDeviceType::INACTIVE must match legacy value.");
+static_assert(CEC_DEVICE_TV == static_cast<int>(CecDeviceType::TV),
+ "CecDeviceType::TV must match legacy value.");
+static_assert(CEC_DEVICE_RECORDER == static_cast<int>(CecDeviceType::RECORDER),
+ "CecDeviceType::RECORDER must match legacy value.");
+static_assert(CEC_DEVICE_TUNER == static_cast<int>(CecDeviceType::TUNER),
+ "CecDeviceType::TUNER must match legacy value.");
+static_assert(CEC_DEVICE_PLAYBACK == static_cast<int>(CecDeviceType::PLAYBACK),
+ "CecDeviceType::PLAYBACK must match legacy value.");
+static_assert(CEC_DEVICE_AUDIO_SYSTEM == static_cast<int>(CecDeviceType::AUDIO_SYSTEM),
+ "CecDeviceType::AUDIO_SYSTEM must match legacy value.");
+/* TODO: Adjust for cec@2.0
+static_assert(CEC_DEVICE_MAX == static_cast<int>(CecDeviceType::MAX),
+ "CecDeviceType::MAX must match legacy value.");
+*/
+static_assert(CEC_ADDR_TV == static_cast<int>(CecLogicalAddress::TV),
+ "CecLogicalAddress::TV must match legacy value.");
+static_assert(CEC_ADDR_RECORDER_1 == static_cast<int>(CecLogicalAddress::RECORDER_1),
+ "CecLogicalAddress::RECORDER_1 must match legacy value.");
+static_assert(CEC_ADDR_RECORDER_2 == static_cast<int>(CecLogicalAddress::RECORDER_2),
+ "CecLogicalAddress::RECORDER_2 must match legacy value.");
+static_assert(CEC_ADDR_TUNER_1 == static_cast<int>(CecLogicalAddress::TUNER_1),
+ "CecLogicalAddress::TUNER_1 must match legacy value.");
+static_assert(CEC_ADDR_PLAYBACK_1 == static_cast<int>(CecLogicalAddress::PLAYBACK_1),
+ "CecLogicalAddress::PLAYBACK_1 must match legacy value.");
+static_assert(CEC_ADDR_AUDIO_SYSTEM == static_cast<int>(CecLogicalAddress::AUDIO_SYSTEM),
+ "CecLogicalAddress::AUDIO_SYSTEM must match legacy value.");
+static_assert(CEC_ADDR_TUNER_2 == static_cast<int>(CecLogicalAddress::TUNER_2),
+ "CecLogicalAddress::TUNER_2 must match legacy value.");
+static_assert(CEC_ADDR_TUNER_3 == static_cast<int>(CecLogicalAddress::TUNER_3),
+ "CecLogicalAddress::TUNER_3 must match legacy value.");
+static_assert(CEC_ADDR_PLAYBACK_2 == static_cast<int>(CecLogicalAddress::PLAYBACK_2),
+ "CecLogicalAddress::PLAYBACK_2 must match legacy value.");
+static_assert(CEC_ADDR_RECORDER_3 == static_cast<int>(CecLogicalAddress::RECORDER_3),
+ "CecLogicalAddress::RECORDER_3 must match legacy value.");
+static_assert(CEC_ADDR_TUNER_4 == static_cast<int>(CecLogicalAddress::TUNER_4),
+ "CecLogicalAddress::TUNER_4 must match legacy value.");
+static_assert(CEC_ADDR_PLAYBACK_3 == static_cast<int>(CecLogicalAddress::PLAYBACK_3),
+ "CecLogicalAddress::PLAYBACK_3 must match legacy value.");
+/* TODO: Adjust for cec@2.0
+static_assert(CEC_ADDR_FREE_USE == static_cast<int>(CecLogicalAddress::FREE_USE),
+ "CecLogicalAddress::FREE_USE must match legacy value.");
+*/
+static_assert(CEC_ADDR_UNREGISTERED == static_cast<int>(CecLogicalAddress::UNREGISTERED),
+ "CecLogicalAddress::UNREGISTERED must match legacy value.");
+static_assert(CEC_ADDR_BROADCAST == static_cast<int>(CecLogicalAddress::BROADCAST),
+ "CecLogicalAddress::BROADCAST must match legacy value.");
+
+static_assert(CEC_MESSAGE_FEATURE_ABORT == static_cast<int>(CecMessageType::FEATURE_ABORT),
+ "CecMessageType::FEATURE_ABORT must match legacy value.");
+static_assert(CEC_MESSAGE_IMAGE_VIEW_ON == static_cast<int>(CecMessageType::IMAGE_VIEW_ON),
+ "CecMessageType::IMAGE_VIEW_ON must match legacy value.");
+static_assert(CEC_MESSAGE_TUNER_STEP_INCREMENT ==
+ static_cast<int>(CecMessageType::TUNER_STEP_INCREMENT),
+ "CecMessageType::TUNER_STEP_INCREMENT must match legacy value.");
+static_assert(CEC_MESSAGE_TUNER_STEP_DECREMENT ==
+ static_cast<int>(CecMessageType::TUNER_STEP_DECREMENT),
+ "CecMessageType::TUNER_STEP_DECREMENT must match legacy value.");
+static_assert(CEC_MESSAGE_TUNER_DEVICE_STATUS ==
+ static_cast<int>(CecMessageType::TUNER_DEVICE_STATUS),
+ "CecMessageType::TUNER_DEVICE_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_TUNER_DEVICE_STATUS ==
+ static_cast<int>(CecMessageType::GIVE_TUNER_DEVICE_STATUS),
+ "CecMessageType::GIVE_TUNER_DEVICE_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_RECORD_ON == static_cast<int>(CecMessageType::RECORD_ON),
+ "CecMessageType::RECORD_ON must match legacy value.");
+static_assert(CEC_MESSAGE_RECORD_STATUS == static_cast<int>(CecMessageType::RECORD_STATUS),
+ "CecMessageType::RECORD_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_RECORD_OFF == static_cast<int>(CecMessageType::RECORD_OFF),
+ "CecMessageType::RECORD_OFF must match legacy value.");
+static_assert(CEC_MESSAGE_TEXT_VIEW_ON == static_cast<int>(CecMessageType::TEXT_VIEW_ON),
+ "CecMessageType::TEXT_VIEW_ON must match legacy value.");
+static_assert(CEC_MESSAGE_RECORD_TV_SCREEN == static_cast<int>(CecMessageType::RECORD_TV_SCREEN),
+ "CecMessageType::RECORD_TV_SCREEN must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_DECK_STATUS == static_cast<int>(CecMessageType::GIVE_DECK_STATUS),
+ "CecMessageType::GIVE_DECK_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_STANDBY == static_cast<int>(CecMessageType::STANDBY),
+ "CecMessageType::STANDBY must match legacy value.");
+static_assert(CEC_MESSAGE_PLAY == static_cast<int>(CecMessageType::PLAY),
+ "CecMessageType::PLAY must match legacy value.");
+static_assert(CEC_MESSAGE_DECK_CONTROL == static_cast<int>(CecMessageType::DECK_CONTROL),
+ "CecMessageType::DECK_CONTROL must match legacy value.");
+static_assert(CEC_MESSAGE_TIMER_CLEARED_STATUS ==
+ static_cast<int>(CecMessageType::TIMER_CLEARED_STATUS),
+ "CecMessageType::TIMER_CLEARED_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_USER_CONTROL_PRESSED ==
+ static_cast<int>(CecMessageType::USER_CONTROL_PRESSED),
+ "CecMessageType::USER_CONTROL_PRESSED must match legacy value.");
+static_assert(CEC_MESSAGE_USER_CONTROL_RELEASED ==
+ static_cast<int>(CecMessageType::USER_CONTROL_RELEASED),
+ "CecMessageType::USER_CONTROL_RELEASED must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_OSD_NAME == static_cast<int>(CecMessageType::GIVE_OSD_NAME),
+ "CecMessageType::GIVE_OSD_NAME must match legacy value.");
+static_assert(CEC_MESSAGE_SET_OSD_NAME == static_cast<int>(CecMessageType::SET_OSD_NAME),
+ "CecMessageType::SET_OSD_NAME must match legacy value.");
+static_assert(CEC_MESSAGE_SYSTEM_AUDIO_MODE_REQUEST ==
+ static_cast<int>(CecMessageType::SYSTEM_AUDIO_MODE_REQUEST),
+ "CecMessageType::SYSTEM_AUDIO_MODE_REQUEST must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_AUDIO_STATUS == static_cast<int>(CecMessageType::GIVE_AUDIO_STATUS),
+ "CecMessageType::GIVE_AUDIO_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_SET_SYSTEM_AUDIO_MODE ==
+ static_cast<int>(CecMessageType::SET_SYSTEM_AUDIO_MODE),
+ "CecMessageType::SET_SYSTEM_AUDIO_MODE must match legacy value.");
+static_assert(CEC_MESSAGE_REPORT_AUDIO_STATUS ==
+ static_cast<int>(CecMessageType::REPORT_AUDIO_STATUS),
+ "CecMessageType::REPORT_AUDIO_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_SYSTEM_AUDIO_MODE_STATUS ==
+ static_cast<int>(CecMessageType::GIVE_SYSTEM_AUDIO_MODE_STATUS),
+ "CecMessageType::GIVE_SYSTEM_AUDIO_MODE_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_SYSTEM_AUDIO_MODE_STATUS ==
+ static_cast<int>(CecMessageType::SYSTEM_AUDIO_MODE_STATUS),
+ "CecMessageType::SYSTEM_AUDIO_MODE_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_ROUTING_CHANGE == static_cast<int>(CecMessageType::ROUTING_CHANGE),
+ "CecMessageType::ROUTING_CHANGE must match legacy value.");
+static_assert(CEC_MESSAGE_ROUTING_INFORMATION ==
+ static_cast<int>(CecMessageType::ROUTING_INFORMATION),
+ "CecMessageType::ROUTING_INFORMATION must match legacy value.");
+static_assert(CEC_MESSAGE_ACTIVE_SOURCE == static_cast<int>(CecMessageType::ACTIVE_SOURCE),
+ "CecMessageType::ACTIVE_SOURCE must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_PHYSICAL_ADDRESS ==
+ static_cast<int>(CecMessageType::GIVE_PHYSICAL_ADDRESS),
+ "CecMessageType::GIVE_PHYSICAL_ADDRESS must match legacy value.");
+static_assert(CEC_MESSAGE_REPORT_PHYSICAL_ADDRESS ==
+ static_cast<int>(CecMessageType::REPORT_PHYSICAL_ADDRESS),
+ "CecMessageType::REPORT_PHYSICAL_ADDRESS must match legacy value.");
+static_assert(CEC_MESSAGE_REQUEST_ACTIVE_SOURCE ==
+ static_cast<int>(CecMessageType::REQUEST_ACTIVE_SOURCE),
+ "CecMessageType::REQUEST_ACTIVE_SOURCE must match legacy value.");
+static_assert(CEC_MESSAGE_SET_STREAM_PATH == static_cast<int>(CecMessageType::SET_STREAM_PATH),
+ "CecMessageType::SET_STREAM_PATH must match legacy value.");
+static_assert(CEC_MESSAGE_DEVICE_VENDOR_ID == static_cast<int>(CecMessageType::DEVICE_VENDOR_ID),
+ "CecMessageType::DEVICE_VENDOR_ID must match legacy value.");
+static_assert(CEC_MESSAGE_VENDOR_COMMAND == static_cast<int>(CecMessageType::VENDOR_COMMAND),
+ "CecMessageType::VENDOR_COMMAND must match legacy value.");
+static_assert(CEC_MESSAGE_VENDOR_REMOTE_BUTTON_DOWN ==
+ static_cast<int>(CecMessageType::VENDOR_REMOTE_BUTTON_DOWN),
+ "CecMessageType::VENDOR_REMOTE_BUTTON_DOWN must match legacy value.");
+static_assert(CEC_MESSAGE_VENDOR_REMOTE_BUTTON_UP ==
+ static_cast<int>(CecMessageType::VENDOR_REMOTE_BUTTON_UP),
+ "CecMessageType::VENDOR_REMOTE_BUTTON_UP must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_DEVICE_VENDOR_ID ==
+ static_cast<int>(CecMessageType::GIVE_DEVICE_VENDOR_ID),
+ "CecMessageType::GIVE_DEVICE_VENDOR_ID must match legacy value.");
+static_assert(CEC_MESSAGE_MENU_REQUEST == static_cast<int>(CecMessageType::MENU_REQUEST),
+ "CecMessageType::MENU_REQUEST must match legacy value.");
+static_assert(CEC_MESSAGE_MENU_STATUS == static_cast<int>(CecMessageType::MENU_STATUS),
+ "CecMessageType::MENU_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_DEVICE_POWER_STATUS ==
+ static_cast<int>(CecMessageType::GIVE_DEVICE_POWER_STATUS),
+ "CecMessageType::GIVE_DEVICE_POWER_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_REPORT_POWER_STATUS ==
+ static_cast<int>(CecMessageType::REPORT_POWER_STATUS),
+ "CecMessageType::REPORT_POWER_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_GET_MENU_LANGUAGE == static_cast<int>(CecMessageType::GET_MENU_LANGUAGE),
+ "CecMessageType::GET_MENU_LANGUAGE must match legacy value.");
+static_assert(CEC_MESSAGE_SELECT_ANALOG_SERVICE ==
+ static_cast<int>(CecMessageType::SELECT_ANALOG_SERVICE),
+ "CecMessageType::SELECT_ANALOG_SERVICE must match legacy value.");
+static_assert(CEC_MESSAGE_SELECT_DIGITAL_SERVICE ==
+ static_cast<int>(CecMessageType::SELECT_DIGITAL_SERVICE),
+ "CecMessageType::SELECT_DIGITAL_SERVICE must match legacy value.");
+static_assert(CEC_MESSAGE_SET_DIGITAL_TIMER == static_cast<int>(CecMessageType::SET_DIGITAL_TIMER),
+ "CecMessageType::SET_DIGITAL_TIMER must match legacy value.");
+static_assert(CEC_MESSAGE_CLEAR_DIGITAL_TIMER ==
+ static_cast<int>(CecMessageType::CLEAR_DIGITAL_TIMER),
+ "CecMessageType::CLEAR_DIGITAL_TIMER must match legacy value.");
+static_assert(CEC_MESSAGE_SET_AUDIO_RATE == static_cast<int>(CecMessageType::SET_AUDIO_RATE),
+ "CecMessageType::SET_AUDIO_RATE must match legacy value.");
+static_assert(CEC_MESSAGE_INACTIVE_SOURCE == static_cast<int>(CecMessageType::INACTIVE_SOURCE),
+ "CecMessageType::INACTIVE_SOURCE must match legacy value.");
+static_assert(CEC_MESSAGE_CEC_VERSION == static_cast<int>(CecMessageType::CEC_VERSION),
+ "CecMessageType::CEC_VERSION must match legacy value.");
+static_assert(CEC_MESSAGE_GET_CEC_VERSION == static_cast<int>(CecMessageType::GET_CEC_VERSION),
+ "CecMessageType::GET_CEC_VERSION must match legacy value.");
+static_assert(CEC_MESSAGE_VENDOR_COMMAND_WITH_ID ==
+ static_cast<int>(CecMessageType::VENDOR_COMMAND_WITH_ID),
+ "CecMessageType::VENDOR_COMMAND_WITH_ID must match legacy value.");
+static_assert(CEC_MESSAGE_CLEAR_EXTERNAL_TIMER ==
+ static_cast<int>(CecMessageType::CLEAR_EXTERNAL_TIMER),
+ "CecMessageType::CLEAR_EXTERNAL_TIMER must match legacy value.");
+static_assert(CEC_MESSAGE_SET_EXTERNAL_TIMER ==
+ static_cast<int>(CecMessageType::SET_EXTERNAL_TIMER),
+ "CecMessageType::SET_EXTERNAL_TIMER must match legacy value.");
+static_assert(CEC_MESSAGE_INITIATE_ARC == static_cast<int>(CecMessageType::INITIATE_ARC),
+ "CecMessageType::INITIATE_ARC must match legacy value.");
+static_assert(CEC_MESSAGE_REPORT_ARC_INITIATED ==
+ static_cast<int>(CecMessageType::REPORT_ARC_INITIATED),
+ "CecMessageType::REPORT_ARC_INITIATED must match legacy value.");
+static_assert(CEC_MESSAGE_REPORT_ARC_TERMINATED ==
+ static_cast<int>(CecMessageType::REPORT_ARC_TERMINATED),
+ "CecMessageType::REPORT_ARC_TERMINATED must match legacy value.");
+static_assert(CEC_MESSAGE_REQUEST_ARC_INITIATION ==
+ static_cast<int>(CecMessageType::REQUEST_ARC_INITIATION),
+ "CecMessageType::REQUEST_ARC_INITIATION must match legacy value.");
+static_assert(CEC_MESSAGE_REQUEST_ARC_TERMINATION ==
+ static_cast<int>(CecMessageType::REQUEST_ARC_TERMINATION),
+ "CecMessageType::REQUEST_ARC_TERMINATION must match legacy value.");
+static_assert(CEC_MESSAGE_TERMINATE_ARC == static_cast<int>(CecMessageType::TERMINATE_ARC),
+ "CecMessageType::TERMINATE_ARC must match legacy value.");
+static_assert(CEC_MESSAGE_ABORT == static_cast<int>(CecMessageType::ABORT),
+ "CecMessageType::ABORT must match legacy value.");
+
+static_assert(ABORT_UNRECOGNIZED_MODE == static_cast<int>(AbortReason::UNRECOGNIZED_MODE),
+ "AbortReason::UNRECOGNIZED_MODE must match legacy value.");
+static_assert(ABORT_NOT_IN_CORRECT_MODE == static_cast<int>(AbortReason::NOT_IN_CORRECT_MODE),
+ "AbortReason::NOT_IN_CORRECT_MODE must match legacy value.");
+static_assert(ABORT_CANNOT_PROVIDE_SOURCE == static_cast<int>(AbortReason::CANNOT_PROVIDE_SOURCE),
+ "AbortReason::CANNOT_PROVIDE_SOURCE must match legacy value.");
+static_assert(ABORT_INVALID_OPERAND == static_cast<int>(AbortReason::INVALID_OPERAND),
+ "AbortReason::INVALID_OPERAND must match legacy value.");
+static_assert(ABORT_REFUSED == static_cast<int>(AbortReason::REFUSED),
+ "AbortReason::REFUSED must match legacy value.");
+static_assert(ABORT_UNABLE_TO_DETERMINE == static_cast<int>(AbortReason::UNABLE_TO_DETERMINE),
+ "AbortReason::UNABLE_TO_DETERMINE must match legacy value.");
+
+static_assert(HDMI_RESULT_SUCCESS == static_cast<int>(SendMessageResult::SUCCESS),
+ "SendMessageResult::SUCCESS must match legacy value.");
+static_assert(HDMI_RESULT_NACK == static_cast<int>(SendMessageResult::NACK),
+ "SendMessageResult::NACK must match legacy value.");
+static_assert(HDMI_RESULT_BUSY == static_cast<int>(SendMessageResult::BUSY),
+ "SendMessageResult::BUSY must match legacy value.");
+static_assert(HDMI_RESULT_FAIL == static_cast<int>(SendMessageResult::FAIL),
+ "SendMessageResult::FAIL must match legacy value.");
+
+static_assert(HDMI_INPUT == static_cast<int>(HdmiPortType::INPUT),
+ "HdmiPortType::INPUT must match legacy value.");
+static_assert(HDMI_OUTPUT == static_cast<int>(HdmiPortType::OUTPUT),
+ "HdmiPortType::OUTPUT must match legacy value.");
+
+static_assert(HDMI_OPTION_WAKEUP == static_cast<int>(OptionKey::WAKEUP),
+ "OptionKey::WAKEUP must match legacy value.");
+static_assert(HDMI_OPTION_ENABLE_CEC == static_cast<int>(OptionKey::ENABLE_CEC),
+ "OptionKey::ENABLE_CEC must match legacy value.");
+static_assert(HDMI_OPTION_SYSTEM_CEC_CONTROL == static_cast<int>(OptionKey::SYSTEM_CEC_CONTROL),
+ "OptionKey::SYSTEM_CEC_CONTROL must match legacy value.");
+
+sp<IHdmiCecCallback> HdmiCec::mCallback = nullptr;
+
+HdmiCec::HdmiCec(hdmi_cec_device_t* device) : mDevice(device) {}
+
+// Methods from ::android::hardware::tv::cec::V2_0::IHdmiCec follow.
+Return<Result> HdmiCec::addDeviceType(CecDeviceType deviceType) {
+ // TODO implement
+ if (deviceType <= CecDeviceType::MAX) {
+ return Result::SUCCESS;
+ } else {
+ return Result::FAILURE_INVALID_ARGS;
+ }
+}
+
+Return<void> HdmiCec::clearDeviceTypes() {
+ // TODO implement
+ return Void();
+}
+
+Return<void> HdmiCec::setAllDeviceTypes(CecAllDeviceTypes allDeviceTypes) {
+ // TODO implement
+ if (allDeviceTypes == 1) {
+ }
+ return Void();
+}
+
+Return<void> HdmiCec::setDeviceFeatures(CecDeviceType deviceType,
+ CecDeviceFeatures /* deviceFeatures */) {
+ // TODO implement
+ if (deviceType != CecDeviceType::MAX) {
+ }
+ return Void();
+}
+
+Return<void> HdmiCec::setRcProfile(CecDeviceType deviceType, const CecRcProfile& /* rcProfile */) {
+ // TODO implement
+ if (deviceType != CecDeviceType::MAX) {
+ }
+ return Void();
+}
+
+Return<void> HdmiCec::readDeviceInfo(CecLogicalAddress logicalAddress,
+ CecPhysicalAddress physicalAddress,
+ const readDeviceInfo_cb _hidl_cb) {
+ // TODO implement
+ CecDeviceInfo deviceInfo;
+
+ if (logicalAddress == CecLogicalAddress::TV) {
+ _hidl_cb(Result::SUCCESS, deviceInfo);
+ if (physicalAddress) {
+ }
+ }
+ return Void();
+}
+
+Return<SendMessageResult> HdmiCec::sendMessage(const CecMessage& message) {
+ cec_message_t legacyMessage{
+ .initiator = static_cast<cec_logical_address_t>(message.initiator),
+ .destination = static_cast<cec_logical_address_t>(message.destination),
+ .length = message.body.size(),
+ };
+ for (size_t i = 0; i < message.body.size(); ++i) {
+ legacyMessage.body[i] = static_cast<unsigned char>(message.body[i]);
+ }
+ return static_cast<SendMessageResult>(mDevice->send_message(mDevice, &legacyMessage));
+}
+
+Return<void> HdmiCec::setCallback(const sp<IHdmiCecCallback>& callback) {
+ if (mCallback != nullptr) {
+ mCallback->unlinkToDeath(this);
+ mCallback = nullptr;
+ }
+
+ if (callback != nullptr) {
+ mCallback = callback;
+ mCallback->linkToDeath(this, 0 /*cookie*/);
+ mDevice->register_event_callback(mDevice, eventCallback, nullptr);
+ }
+ return Void();
+}
+
+Return<void> HdmiCec::getPortInfo(getPortInfo_cb _hidl_cb) {
+ struct hdmi_port_info* legacyPorts;
+ int numPorts;
+ hidl_vec<HdmiPortInfo> portInfos;
+ mDevice->get_port_info(mDevice, &legacyPorts, &numPorts);
+ portInfos.resize(numPorts);
+ for (int i = 0; i < numPorts; ++i) {
+ portInfos[i] = {.type = static_cast<HdmiPortType>(legacyPorts[i].type),
+ .portId = static_cast<HdmiPortId>(legacyPorts[i].port_id),
+ .cecSupported = legacyPorts[i].cec_supported != 0,
+ .arcSupported = legacyPorts[i].arc_supported != 0,
+ .physicalAddress = legacyPorts[i].physical_address};
+ }
+ _hidl_cb(portInfos);
+ return Void();
+}
+
+Return<void> HdmiCec::setOption(OptionKey key, bool value) {
+ mDevice->set_option(mDevice, static_cast<int>(key), value ? 1 : 0);
+ return Void();
+}
+
+Return<void> HdmiCec::setLanguage(const hidl_string& language) {
+ if (language.size() != 3) {
+ LOG(ERROR) << "Wrong language code: expected 3 letters, but it was " << language.size()
+ << ".";
+ return Void();
+ }
+ const char* languageStr = language.c_str();
+ int convertedLanguage = ((languageStr[0] & 0xFF) << 16) | ((languageStr[1] & 0xFF) << 8) |
+ (languageStr[2] & 0xFF);
+ mDevice->set_option(mDevice, HDMI_OPTION_SET_LANG, convertedLanguage);
+ return Void();
+}
+
+Return<void> HdmiCec::enableAudioReturnChannel(HdmiPortId portId, bool enable) {
+ mDevice->set_audio_return_channel(mDevice, portId, enable ? 1 : 0);
+ return Void();
+}
+
+Return<bool> HdmiCec::isConnected(HdmiPortId portId) {
+ return mDevice->is_connected(mDevice, portId) > 0;
+}
+
+IHdmiCec* HIDL_FETCH_IHdmiCec(const char* hal) {
+ hdmi_cec_device_t* hdmi_cec_device;
+ int ret = 0;
+ const hw_module_t* hw_module = nullptr;
+
+ ret = hw_get_module(HDMI_CEC_HARDWARE_MODULE_ID, &hw_module);
+ if (ret == 0) {
+ ret = hdmi_cec_open(hw_module, &hdmi_cec_device);
+ if (ret != 0) {
+ LOG(ERROR) << "hdmi_cec_open " << hal << " failed: " << ret;
+ }
+ } else {
+ LOG(ERROR) << "hw_get_module " << hal << " failed: " << ret;
+ }
+
+ if (ret == 0) {
+ return new HdmiCec(hdmi_cec_device);
+ } else {
+ LOG(ERROR) << "Passthrough failed to load legacy HAL.";
+ return nullptr;
+ }
+}
+
+} // namespace implementation
+} // namespace V2_0
+} // namespace cec
+} // namespace tv
+} // namespace hardware
+} // namespace android
diff --git a/tv/cec/2.0/default/HdmiCec.h b/tv/cec/2.0/default/HdmiCec.h
new file mode 100644
index 0000000..ab54770
--- /dev/null
+++ b/tv/cec/2.0/default/HdmiCec.h
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+#ifndef ANDROID_HARDWARE_TV_CEC_V2_0_HDMICEC_H
+#define ANDROID_HARDWARE_TV_CEC_V2_0_HDMICEC_H
+
+#include <algorithm>
+
+#include <android/hardware/tv/cec/2.0/IHdmiCec.h>
+#include <hardware/hardware.h>
+#include <hardware/hdmi_cec.h>
+#include <hidl/Status.h>
+
+#include <hidl/MQDescriptor.h>
+namespace android {
+namespace hardware {
+namespace tv {
+namespace cec {
+namespace V2_0 {
+namespace implementation {
+
+using ::android::sp;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::hardware::tv::cec::V2_0::CecLogicalAddress;
+using ::android::hardware::tv::cec::V2_0::CecMessage;
+using ::android::hardware::tv::cec::V2_0::CecPhysicalAddress;
+using ::android::hardware::tv::cec::V2_0::HdmiPortId;
+using ::android::hardware::tv::cec::V2_0::HdmiPortInfo;
+using ::android::hardware::tv::cec::V2_0::IHdmiCec;
+using ::android::hardware::tv::cec::V2_0::IHdmiCecCallback;
+using ::android::hardware::tv::cec::V2_0::MaxLength;
+using ::android::hardware::tv::cec::V2_0::OptionKey;
+using ::android::hardware::tv::cec::V2_0::Result;
+using ::android::hardware::tv::cec::V2_0::SendMessageResult;
+
+struct HdmiCec : public IHdmiCec, public hidl_death_recipient {
+ HdmiCec(hdmi_cec_device_t* device);
+ // Methods from ::android::hardware::tv::cec::V2_0::IHdmiCec follow.
+ Return<Result> addDeviceType(CecDeviceType deviceType) override;
+ Return<void> clearDeviceTypes() override;
+ Return<void> setAllDeviceTypes(CecAllDeviceTypes allDeviceTypes) override;
+ Return<void> setDeviceFeatures(CecDeviceType deviceType,
+ CecDeviceFeatures /* deviceFeatures */) override;
+ Return<void> setRcProfile(CecDeviceType deviceType,
+ const CecRcProfile& /* rcProfile */) override;
+ Return<void> readDeviceInfo(CecLogicalAddress logicalAddress,
+ CecPhysicalAddress physicalAddress,
+ const readDeviceInfo_cb _hidl_cb) override;
+ Return<SendMessageResult> sendMessage(const CecMessage& message) override;
+ Return<void> setCallback(const sp<IHdmiCecCallback>& callback) override;
+ Return<void> getPortInfo(getPortInfo_cb _hidl_cb) override;
+ Return<void> setOption(OptionKey key, bool value) override;
+ Return<void> setLanguage(const hidl_string& language) override;
+ Return<void> enableAudioReturnChannel(HdmiPortId portId, bool enable) override;
+ Return<bool> isConnected(HdmiPortId portId) override;
+
+ static void eventCallback(const hdmi_event_t* event, void* /* arg */) {
+ if (mCallback != nullptr && event != nullptr) {
+ if (event->type == HDMI_EVENT_CEC_MESSAGE) {
+ size_t length =
+ std::min(event->cec.length, static_cast<size_t>(MaxLength::MESSAGE_BODY));
+ CecMessage cecMessage{
+ .initiator = static_cast<CecLogicalAddress>(event->cec.initiator),
+ .destination = static_cast<CecLogicalAddress>(event->cec.destination),
+ };
+ cecMessage.body.resize(length);
+ for (size_t i = 0; i < length; ++i) {
+ cecMessage.body[i] = static_cast<uint8_t>(event->cec.body[i]);
+ }
+ mCallback->onCecMessage(cecMessage);
+ } else if (event->type == HDMI_EVENT_HOT_PLUG) {
+ HotplugEvent hotplugEvent{
+ .connected = event->hotplug.connected > 0,
+ .portId = static_cast<HdmiPortId>(event->hotplug.port_id)};
+ mCallback->onHotplugEvent(hotplugEvent);
+ }
+ }
+ }
+
+ virtual void serviceDied(uint64_t /*cookie*/,
+ const wp<::android::hidl::base::V1_0::IBase>& /*who*/) {
+ setCallback(nullptr);
+ }
+
+ private:
+ static sp<IHdmiCecCallback> mCallback;
+ const hdmi_cec_device_t* mDevice;
+};
+
+extern "C" IHdmiCec* HIDL_FETCH_IHdmiCec(const char* name);
+
+} // namespace implementation
+} // namespace V2_0
+} // namespace cec
+} // namespace tv
+} // namespace hardware
+} // namespace android
+
+#endif // ANDROID_HARDWARE_TV_CEC_V2_0_HDMICEC_H
diff --git a/tv/cec/2.0/default/OWNERS b/tv/cec/2.0/default/OWNERS
new file mode 100644
index 0000000..1b3d095
--- /dev/null
+++ b/tv/cec/2.0/default/OWNERS
@@ -0,0 +1,4 @@
+nchalko@google.com
+amyjojo@google.com
+shubang@google.com
+quxiangfang@google.com
diff --git a/tv/cec/2.0/default/android.hardware.tv.cec@2.0-service.rc b/tv/cec/2.0/default/android.hardware.tv.cec@2.0-service.rc
new file mode 100644
index 0000000..1e8cd80
--- /dev/null
+++ b/tv/cec/2.0/default/android.hardware.tv.cec@2.0-service.rc
@@ -0,0 +1,4 @@
+service vendor.cec-hal-2-0 /vendor/bin/hw/android.hardware.tv.cec@2.0-service
+ class hal
+ user system
+ group system
diff --git a/tv/cec/2.0/default/android.hardware.tv.cec@2.0-service.xml b/tv/cec/2.0/default/android.hardware.tv.cec@2.0-service.xml
new file mode 100644
index 0000000..61fb1bb
--- /dev/null
+++ b/tv/cec/2.0/default/android.hardware.tv.cec@2.0-service.xml
@@ -0,0 +1,11 @@
+<manifest version="1.0" type="device">
+ <hal format="hidl">
+ <name>android.hardware.tv.cec</name>
+ <transport>hwbinder</transport>
+ <version>2.0</version>
+ <interface>
+ <name>IHdmiCec</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+</manifest>
diff --git a/tv/cec/2.0/default/service.cpp b/tv/cec/2.0/default/service.cpp
new file mode 100644
index 0000000..dacc38c
--- /dev/null
+++ b/tv/cec/2.0/default/service.cpp
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+#define LOG_TAG "android.hardware.tv.cec@2.0-service"
+
+#include <android/hardware/tv/cec/2.0/IHdmiCec.h>
+#include <hidl/LegacySupport.h>
+
+using android::hardware::defaultPassthroughServiceImplementation;
+using android::hardware::tv::cec::V2_0::IHdmiCec;
+
+int main() {
+ return defaultPassthroughServiceImplementation<IHdmiCec>();
+}
diff --git a/tv/cec/2.0/types.hal b/tv/cec/2.0/types.hal
new file mode 100644
index 0000000..cad6c39
--- /dev/null
+++ b/tv/cec/2.0/types.hal
@@ -0,0 +1,548 @@
+/*
+ * Copyright (C) 2019 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.tv.cec@2.0;
+
+import android.hidl.safe_union@1.0;
+
+/**
+ * CEC device type as specified in CEC Table 11-7 of the CEC spec 2.0b.
+ */
+enum CecDeviceType : int32_t {
+ INACTIVE = -1,
+ TV = 0,
+ RECORDER = 1,
+ TUNER = 3,
+ PLAYBACK = 4,
+ AUDIO_SYSTEM = 5,
+ PURE_CEC_SWITCH = 6,
+ PROCESSOR = 7,
+ MAX = PROCESSOR,
+};
+
+/**
+ * CEC logical address as specified in CEC Table 11-9 of the CEC spec 2.0b.
+ */
+enum CecLogicalAddress : int32_t {
+ TV = 0,
+ RECORDER_1 = 1,
+ RECORDER_2 = 2,
+ TUNER_1 = 3,
+ PLAYBACK_1 = 4,
+ AUDIO_SYSTEM = 5,
+ TUNER_2 = 6,
+ TUNER_3 = 7,
+ PLAYBACK_2 = 8,
+ RECORDER_3 = 9,
+ TUNER_4 = 10,
+ PLAYBACK_3 = 11,
+ BACKUP_1 = 12, // backup1 for Playback/Recording/Tuner/Processor device
+ BACKUP_2 = 13, // backup2 for Playback/Recording/Tuner/Processor device
+ SPECIFIC_USE = 14,
+ UNREGISTERED = 15, // as Initiator address
+ BROADCAST = 15, // as Destination address
+};
+
+/**
+ * HDMI CEC message types.
+ *
+ * The assigned values represent opcode used in CEC frame as specified in
+ * Section 11.10 of the CEC spec 2.0b on top of Section CEC 15 of the CEC
+ * Spec 1.4b.
+ */
+enum CecMessageType : int32_t {
+ FEATURE_ABORT = 0x00,
+ IMAGE_VIEW_ON = 0x04,
+ TUNER_STEP_INCREMENT = 0x05,
+ TUNER_STEP_DECREMENT = 0x06,
+ TUNER_DEVICE_STATUS = 0x07,
+ GIVE_TUNER_DEVICE_STATUS = 0x08,
+ RECORD_ON = 0x09,
+ RECORD_STATUS = 0x0A,
+ RECORD_OFF = 0x0B,
+ TEXT_VIEW_ON = 0x0D,
+ RECORD_TV_SCREEN = 0x0F,
+ GIVE_DECK_STATUS = 0x1A,
+ DECK_STATUS = 0x1B,
+ SET_MENU_LANGUAGE = 0x32,
+ CLEAR_ANALOG_TIMER = 0x33,
+ SET_ANALOG_TIMER = 0x34,
+ TIMER_STATUS = 0x35,
+ STANDBY = 0x36,
+ PLAY = 0x41,
+ DECK_CONTROL = 0x42,
+ TIMER_CLEARED_STATUS = 0x43,
+ USER_CONTROL_PRESSED = 0x44,
+ USER_CONTROL_RELEASED = 0x45,
+ GIVE_OSD_NAME = 0x46,
+ SET_OSD_NAME = 0x47,
+ SET_OSD_STRING = 0x64,
+ SET_TIMER_PROGRAM_TITLE = 0x67,
+ SYSTEM_AUDIO_MODE_REQUEST = 0x70,
+ GIVE_AUDIO_STATUS = 0x71,
+ SET_SYSTEM_AUDIO_MODE = 0x72,
+ REPORT_AUDIO_STATUS = 0x7A,
+ GIVE_SYSTEM_AUDIO_MODE_STATUS = 0x7D,
+ SYSTEM_AUDIO_MODE_STATUS = 0x7E,
+ ROUTING_CHANGE = 0x80,
+ ROUTING_INFORMATION = 0x81,
+ ACTIVE_SOURCE = 0x82,
+ GIVE_PHYSICAL_ADDRESS = 0x83,
+ REPORT_PHYSICAL_ADDRESS = 0x84,
+ REQUEST_ACTIVE_SOURCE = 0x85,
+ SET_STREAM_PATH = 0x86,
+ DEVICE_VENDOR_ID = 0x87,
+ VENDOR_COMMAND = 0x89,
+ VENDOR_REMOTE_BUTTON_DOWN = 0x8A,
+ VENDOR_REMOTE_BUTTON_UP = 0x8B,
+ GIVE_DEVICE_VENDOR_ID = 0x8C,
+ MENU_REQUEST = 0x8D,
+ MENU_STATUS = 0x8E,
+ GIVE_DEVICE_POWER_STATUS = 0x8F,
+ REPORT_POWER_STATUS = 0x90,
+ GET_MENU_LANGUAGE = 0x91,
+ SELECT_ANALOG_SERVICE = 0x92,
+ SELECT_DIGITAL_SERVICE = 0x93,
+ SET_DIGITAL_TIMER = 0x97,
+ CLEAR_DIGITAL_TIMER = 0x99,
+ SET_AUDIO_RATE = 0x9A,
+ INACTIVE_SOURCE = 0x9D,
+ CEC_VERSION = 0x9E,
+ GET_CEC_VERSION = 0x9F,
+ VENDOR_COMMAND_WITH_ID = 0xA0,
+ CLEAR_EXTERNAL_TIMER = 0xA1,
+ SET_EXTERNAL_TIMER = 0xA2,
+ REPORT_SHORT_AUDIO_DESCRIPTOR = 0xA3,
+ REQUEST_SHORT_AUDIO_DESCRIPTOR = 0xA4,
+ GIVE_FEATURES = 0XA5,
+ REPORT_FEATURES = 0xA6,
+ REQUEST_CURRENT_LATENCY = 0xA7,
+ REPORT_CURRENT_LATENCY = 0xA8,
+ INITIATE_ARC = 0xC0,
+ REPORT_ARC_INITIATED = 0xC1,
+ REPORT_ARC_TERMINATED = 0xC2,
+ REQUEST_ARC_INITIATION = 0xC3,
+ REQUEST_ARC_TERMINATION = 0xC4,
+ TERMINATE_ARC = 0xC5,
+ ABORT = 0xFF,
+ POLLING_MESSAGE = 0xFFFFFF00, // used for cec polling message
+};
+
+/**
+ * Abort Reason as specified in CEC Table 29 of the CEC spec 1.4b.
+ */
+enum AbortReason : int32_t {
+ UNRECOGNIZED_MODE = 0,
+ NOT_IN_CORRECT_MODE = 1,
+ CANNOT_PROVIDE_SOURCE = 2,
+ INVALID_OPERAND = 3,
+ REFUSED = 4,
+ UNABLE_TO_DETERMINE = 5,
+};
+
+enum MaxLength : int32_t {
+ MESSAGE_BODY = 14,
+};
+
+struct CecMessage {
+ /** logical address of sender */
+ CecLogicalAddress initiator;
+
+ /** logical address of receiver */
+ CecLogicalAddress destination;
+
+ /** cec message type */
+ CecMessageType cecMessageType;
+
+ /**
+ * The maximum size of body is 14 (MaxLength::MESSAGE_BODY) as specified in
+ * the section 6 of the CEC Spec 1.4b. Overflowed data must be ignored.
+ */
+ vec<uint8_t> body;
+};
+
+/**
+ * error code used for send_message.
+ */
+enum SendMessageResult : int32_t {
+ SUCCESS = 0,
+ NACK = 1, // not acknowledged
+ BUSY = 2, // bus is busy
+ FAIL = 3,
+};
+
+/**
+ * CEC All Device Type Value as specified in Table 11-30 of the CEC spec 2.0b.
+ */
+enum CecAllDeviceTypeValue : uint8_t {
+ RESERVED_DEVICE_2 = 1 << 0,
+ RESERVED_DEVICE_1 = 1 << 1,
+ CEC_SWITCH_DEVICE = 1 << 2,
+ AUDIO_DEVICE = 1 << 3,
+ PLAYBACK_DEVICE = 1 << 4,
+ TUNER_DEVICE = 1 << 5,
+ RECORDING_DEVICE = 1 << 6,
+ TV_DEVICE = 1 << 7,
+};
+
+/**
+ * CEC All Device Types
+ *
+ * It is a combination of all supported type from CecAllDeviceTypeValue.
+ * For example a record with tuner functionalitye,
+ * cecAllDeviceTypes = ((CecAllDeviceTypeValue::RECORDING_DEVICE)
+ * |(CecAllDeviceTypeValue::TUNER_DEVICE))
+ */
+typedef bitfield<CecAllDeviceTypeValue> CecAllDeviceTypes;
+
+/**
+ * CEC Versions as specified in CEC Table 11-30 of the CEC spec 2.0b.
+ */
+enum CecVersion : int32_t {
+ V_1_3_A = 0x04,
+ V_1_4 = 0x05, // indicate CEC 1.4, 1.4a or 1.4b
+ V_2_0 = 0x06,
+};
+
+/**
+ * Device Feature
+ *
+ * It is specified in CEC Table 11-30 of the CEC spec 2.0b. As a uint32 there
+ * is room for future extensions aka DeviceFeature2 through DeviceFeature4.
+ */
+enum CecDeviceFeature : uint32_t {
+ RESERVED = 1 << 0,
+ SOURCE_SUPPORT_ARC_RX = 1 << 1,
+ SINK_SUPPORT_ARC_TX = 1 << 2,
+ SOURCE_SUPPORT_SET_AUDIO_RATE = 1 << 3,
+ SUPPORT_CONTROLLED_BY_DECK = 1 << 4,
+ TV_SUPPORT_SET_OSD_STRINGS = 1 << 5,
+ TV_SUPPORT_RECORD_TV_SCREEN = 1 << 6,
+};
+
+/**
+ * CEC Device Features
+ *
+ * It is a combination of all supported features from CecDeviceFeature.
+ * For example a TV with OSD and ARC capabilities,
+ * CecDeviceFeatures = ((CecDeviceFeature::TV_SUPPORT_SET_OSD_STRINGS)
+ * |(CecDeviceFeature::SINK_SUPPORT_ARC_TX))
+ */
+typedef bitfield<CecDeviceFeature> CecDeviceFeatures;
+
+/**
+ * Remote Control Profile
+ *
+ * It is specified in CEC Table 11-30 of the CEC spec 2.0b.
+ */
+enum CecRcProfileId : uint8_t {
+ NONE = 0, // TV doesn’t support any of these profiles
+ RC_PROFILE_1 = 0x02, // minimalistic zapper (low button count)
+ RC_PROFILE_2 = 0x06, // intermediate between profile 1 and profile 3
+ RC_PROFILE_3 = 0x0A, // typical TV remote
+ RC_PROFILE_4 = 0x0E, // extended form of profile 3
+};
+
+/**
+ * Remote Control Profile Source
+ *
+ * It is specified in CEC Table 11-30 of the CEC spec 2.0b.
+ */
+enum CecRcProfileSource : uint8_t {
+ MEDIA_CONTEXT_SENSITIVE = 1 << 0, // source can handle UI command 0x11
+ MEDIA_TO = 1 << 1, // source can handle UI command 0x10
+ CONTENTS = 1 << 2, // source can handle UI command 0x0B
+ DEVICE_SETUP = 1 << 3, // source can handle UI command 0x0A
+ DEVICE_ROOT = 1 << 4, // source can handle UI command 0x09
+ SOURCE_FLAG = 1 << 6, // Indicate the profile is for source
+};
+
+/**
+ * Remote Control Profile for either TV or Source.
+ */
+safe_union CecRcProfile1 {
+ /** CEC remote control profile for TV. */
+ CecRcProfileId profileId;
+
+ /* CEC remote control profile for source
+ *
+ * It is a combination of all supported profiles from CecRcProfileSource.
+ * For example a playback device support root menu and setup menu,
+ * profileSource = ((CecRcProfileSource::DEVICE_ROOT)
+ * |(CecRcProfileSource::DEVICE_SETUP)
+ * |(CecRcProfileSource::SOURCE_FLAG))
+ */
+ bitfield<CecRcProfileSource> profileSource;
+};
+
+/**
+ * CEC Remote Control Profiles
+ *
+ * CEC 2.0 only use one byte to represent Remote Control Profile.
+ */
+struct CecRcProfile {
+ CecRcProfile1 rcProfile1;
+};
+
+/**
+ * CEC device power states as specified in CEC Table 11-10 of the CEC spec 2.0b
+ */
+enum CecPowerState : int8_t {
+ ON = 0,
+ STANDBY = 1,
+ ON_TO_STANDBY = 2,
+ STANDBY_TO_ON = 4,
+ UNKNOWN = 0xFF, // some devices may not report power status
+};
+
+/** CEC physical address of device */
+typedef uint16_t CecPhysicalAddress;
+
+/**
+ * CEC device information
+ *
+ * It is initially built during addressing specified in CEC section 11.3 of
+ * the CEC spec 2.0b. It may be updated with cec devices's status changed.
+ */
+struct CecDeviceInfo {
+ /** CEC version which device supports */
+ CecVersion version;
+
+ /** CEC device primary type */
+ CecDeviceType devceType;
+
+ /** CEC all device types */
+ CecAllDeviceTypes allDeviceTypes;
+
+ /** CEC device features */
+ CecDeviceFeatures deviceFeatures;
+
+ /** CEC Device Remote Control Profile */
+ CecRcProfile rcProfile;
+
+ /** CEC Device Vendor ID */
+ uint32_t vendorId;
+
+ /** logical address of device */
+ CecLogicalAddress logicalAddress;
+
+ /** physical of device */
+ CecPhysicalAddress physicalAddress;
+
+ /** power status of device */
+ CecPowerState powerState;
+};
+
+/**
+ * Topology Event Type.
+ */
+enum CecTopologyEventType : int32_t {
+ DEVICE_ADDED,
+ DEVICE_REMOVED,
+ DEVICE_UPDATED,
+};
+
+/**
+ * Topology Event.
+ */
+struct CecTopologyEvent {
+ CecTopologyEventType eventType;
+ CecLogicalAddress logicalAddress;
+ CecPhysicalAddress physicalAddress;
+
+ /** true if the event is about the device which the system run on */
+ bool isHostDevice;
+};
+
+
+/**
+ * CEC UI Command Codes as specified in CEC Table 11-31 of the CEC spec 2.0b
+ */
+enum CecUICommandCodes : int32_t {
+ SELECT_OK = 0x00,
+ UP = 0x01,
+ DOWN = 0x02,
+ LEFT = 0x03,
+ RIGHT = 0x04,
+ RIGHT_UP = 0x05,
+ RIGHT_DOWN = 0x06,
+ LEFT_UP = 0x07,
+ LEFT_DOWN = 0x08,
+ DEVICE_ROOT_MENU = 0x09,
+ DEVICE_SETUP_MENU = 0x0A,
+ CONTENTS_MENU = 0x0B,
+ FAVORITE_MENU = 0x0C,
+ BACK = 0x0D,
+ MEDIA_TOP_MENU = 0x10,
+ MEDIA_CONTEXT_SENSITIVE_MENU = 0x11,
+ NUMBER_ENTRY_MODE = 0x1D,
+ NUMBER_11 = 0x1E,
+ NUMBER_12 = 0x1F,
+ NUMBER_0 = 0x20, // or NUMBER 10
+ NUMBER_1 = 0x21,
+ NUMBER_2 = 0x22,
+ NUMBER_3 = 0x23,
+ NUMBER_4 = 0x24,
+ NUMBER_5 = 0x25,
+ NUMBER_6 = 0x26,
+ NUMBER_7 = 0x27,
+ NUMBER_8 = 0x28,
+ NUMBER_9 = 0x29,
+ DOT = 0x2A,
+ ENTER = 0x2B,
+ CLEAR = 0x2C,
+ NEXT_FAVORITE = 0x2F,
+ CHANNEL_UP = 0x30,
+ CHANNEL_DOWN = 0x31,
+ PREVIOUS_CHANNEL = 0x32,
+ SOUND_SELECT = 0x33,
+ INPUT_SELECT = 0x34,
+ DISPLAY_INFORMATION = 0x35,
+ HELP = 0x36,
+ PAGE_UP = 0x37,
+ PAGE_DOWN = 0x38,
+ POWER = 0x40,
+ VOLUME_UP = 0x41,
+ VOLUME_DOWN = 0x42,
+ MUTE = 0x43,
+ PLAY = 0x44,
+ STOP = 0x45,
+ PAUSE = 0x46,
+ RECORD = 0x47,
+ REWIND = 0x48,
+ FAST_FORWARD = 0x49,
+ EJECT = 0x4A,
+ SKIP_FORWARD = 0x4B,
+ SKIP_BACKWARD = 0x4C,
+ STOP_RECORD = 0x4D,
+ PAUSE_RECORD = 0x4E,
+ ANGLE = 0x50,
+ SUB_PICTURE = 0x51,
+ VIDEO_ON_DEMAND = 0x52,
+ ELECTRONIC_PROGRAM_GUIDE = 0x53,
+ TIMER_PROGRAMMING = 0x54,
+ INITIAL_CONFIGURATION = 0x55,
+ SELECT_BROADCAST_TYPE = 0x56,
+ SELECT_SOUND_PRESENTATION = 0x57,
+ AUDIO_DESCRIPTION = 0x58,
+ INTERNET = 0x59,
+ THREE_DIMENSIONAL_MODE = 0x5A,
+ PLAY_FUNCTION = 0x60,
+ PAUSE_PLAY_FUNCTION = 0x61,
+ RECORD_FUNCTION = 0x62,
+ PAUSE_RECORD_FUNCTION = 0x63,
+ STOP_FUNCTION = 0x64,
+ MUTE_FUNCTION = 0x65,
+ RESTORE_VOLUME_FUNCTION = 0x66,
+ TUNE_FUNCTION = 0x67,
+ SELECT_MEDIA_FUNCTION = 0x68,
+ SELECT_AV_INPUT_FUNCTION = 0x69,
+ SELECT_AUDIO_INPUT_FUNCTION = 0x6A,
+ POWER_TOGGLE_FUNCTION = 0x6B,
+ POWER_OFF_FUNCTION = 0x6C,
+ POWER_ON_FUNCTION = 0x6D,
+ F1 = 0x71, // BLUE
+ F2 = 0x72, // RED
+ F3 = 0x73, // GREEN
+ F4 = 0x74, // YELLOW
+ F5 = 0x75,
+ DATA = 0x76,
+};
+
+/**
+ * HDMI port type.
+ */
+enum HdmiPortType : int32_t {
+ INPUT = 0,
+ OUTPUT = 1,
+};
+
+/**
+ * Options used for IHdmiCec.setOption()
+ */
+enum OptionKey : int32_t {
+ /**
+ * When set to false, HAL does not wake up the system upon receiving <Image
+ * View On> or <Text View On>. Used when user changes the TV settings to
+ * disable the auto TV on functionality.
+ * Deprecated since <Image View On> and <Text View On> become mandatory
+ * featrues for CEC device. Use ENABLE_CEC OptionKey to disable CEC
+ * functionality instead.
+ * True by Default
+ */
+ WAKEUP = 1,
+
+ /**
+ * When set to false, all the CEC commands are discarded. if logical address
+ * is ever used, it shall be released. Used when user changes the TV
+ * settings to disable CEC functionality.
+ * True by default.
+ *
+ */
+ ENABLE_CEC = 2,
+
+ /**
+ * Setting this flag to false means Android system must stop handling CEC
+ * service and yield the control over to the microprocessor that is powered
+ * on through the standby mode.The microprocessor shall keep current logical
+ * and physical address. It shall response POLLING_MESSAGE, GIVE_FEATURES,
+ * GIVE_DEVICE_POWER_STATUS,GIVE_DEVICE_VENDOR_ID and GIVE_PHYSICAL_ADDRESS
+ * to allow other CEC devices to build CEC devices map specified in CEC
+ * section 11.3 of the CEC spec 2.0b.
+ * When set to true, the system must gain the control over, hence telling
+ * the microprocessor to start forwarding CEC messages to Android system.
+ * For example, this may be called when system goes in and out of
+ * standby mode to notify the microprocessor that it should start/stop
+ * handling CEC commands on behalf of the system.
+ * True by default.
+ */
+ SYSTEM_CEC_CONTROL = 3,
+
+ /* Option 4 not used */
+};
+
+/**
+ * Hdmi port ID.
+ *
+ * It shall start from 1 which corresponds to HDMI "port 1".
+ */
+typedef uint32_t HdmiPortId;
+
+/** Hdmi hotplug event */
+struct HotplugEvent {
+ bool connected;
+ HdmiPortId portId;
+};
+
+/**
+ * HDMI port descriptor
+ */
+struct HdmiPortInfo {
+ HdmiPortType type;
+ HdmiPortId portId;
+ bool cecSupported;
+ bool arcSupported;
+ CecPhysicalAddress physicalAddress;
+};
+
+enum Result : int32_t {
+ SUCCESS = 0,
+ FAILURE_UNKNOWN = 1,
+ FAILURE_INVALID_ARGS = 2,
+ FAILURE_INVALID_STATE = 3,
+ FAILURE_NOT_SUPPORTED = 4,
+ FAILURE_BUSY = 5,
+};
diff --git a/usb/1.2/Android.bp b/usb/1.2/Android.bp
new file mode 100644
index 0000000..55ffad0
--- /dev/null
+++ b/usb/1.2/Android.bp
@@ -0,0 +1,29 @@
+// This file is autogenerated by hidl-gen -Landroidbp.
+
+hidl_interface {
+ name: "android.hardware.usb@1.2",
+ root: "android.hardware",
+ vndk: {
+ enabled: true,
+ },
+ srcs: [
+ "types.hal",
+ "IUsb.hal",
+ "IUsbCallback.hal",
+ ],
+ interfaces: [
+ "android.hardware.usb@1.0",
+ "android.hardware.usb@1.1",
+ "android.hidl.base@1.0",
+ ],
+ types: [
+ "ContaminantDetectionStatus",
+ "ContaminantProtectionMode",
+ "ContaminantProtectionStatus",
+ "PortStatus",
+ "Status",
+ ],
+ gen_java: true,
+ gen_java_constants: true,
+}
+
diff --git a/usb/1.2/IUsb.hal b/usb/1.2/IUsb.hal
new file mode 100644
index 0000000..ecc911e
--- /dev/null
+++ b/usb/1.2/IUsb.hal
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 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.usb@1.2;
+
+import android.hardware.usb@1.1::IUsb;
+
+/**
+ * The setCallback function in V1_0 is used to register the V1_2
+ * IUsbCallback object as well. The implementation can use the
+ * castFrom method to cast the IUsbCallback object.
+ */
+interface IUsb extends @1.1::IUsb {
+ /**
+ * When supportsEnableContaminantPresenceDetection is true,
+ * enableContaminantPresenceDetection enables/disables contaminant
+ * presence detection algorithm. Calling enableContaminantPresenceDetection
+ * when supportsEnableContaminantPresenceDetection is false does
+ * not have any effect.
+ * Change in contantaminant presence status should notify should
+ * be notified to the client via notifyPortStatusChange_1_2 through
+ * PortStatus.
+ *
+ * @param portName name of the port.
+ * @param enable true Enable contaminant presence detection algorithm.
+ * false Disable contaminant presence detection algorithm.
+ */
+ oneway enableContaminantPresenceDetection(string portName, bool enable);
+
+ /**
+ * When supportsEnableContaminantPresenceProtection is true,
+ * enableContaminantPresenceProtection enables/disables contaminant
+ * presence protection algorithm. Calling
+ * enableContaminantPresenceProtection
+ * when supportsEnableContaminantPresenceProtection is false does
+ * not have any effect.
+ * Used to enable/disable contaminant presence protection algorithm.
+ * Enabling port protection algoritm must make the lower layers to autonomously
+ * act on taking the corresponding preventive measure mentioned at
+ * ContaminantProtectionModes when contaminant is detected on the USB Port.
+ * Calling this method with enable set to true must set to contaminantProtectionEnabled
+ * to true upon success and vice versa.
+ * currentContaminantProtectionMode should be updated whenever there is a
+ * change in the status of contaminant presence protection algorithm.
+ *
+ * @param portName name of the port.
+ * @param enable true Reduce capabilities of the port to protect port
+ * from damage due to contaminant presence.
+ * false No action is taken upon contaminant presence.
+ */
+ oneway enableContaminantPresenceProtection(string portName, bool enable);
+};
diff --git a/usb/1.2/IUsbCallback.hal b/usb/1.2/IUsbCallback.hal
new file mode 100644
index 0000000..8cc16df
--- /dev/null
+++ b/usb/1.2/IUsbCallback.hal
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 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.usb@1.2;
+
+import android.hardware.usb@1.1::IUsbCallback;
+import android.hardware.usb@1.0::Status;
+
+/**
+ * Callback object used for all the IUsb async methods which expects a result.
+ * Caller is expected to register the callback object using setCallback method
+ * to receive updates on the PortStatus.
+ */
+interface IUsbCallback extends @1.1::IUsbCallback {
+ /**
+ * Used to convey the current port status to the caller.
+ * Must be called either when PortState changes due to the port partner or
+ * when caller requested for the PortStatus update through queryPortStatus.
+ *
+ * @param currentPortStatus vector object of current status(PortStatus
+ * of all the typeC ports in the device.
+ * @param retval SUCCESS when the required information was enquired form
+ * kernel and the PortStatus_1_2 object was built.
+ * ERROR otherwise.
+ */
+ oneway notifyPortStatusChange_1_2(vec<PortStatus> currentPortStatus,
+ @1.0::Status retval);
+};
+
diff --git a/usb/1.2/types.hal b/usb/1.2/types.hal
new file mode 100644
index 0000000..081a643
--- /dev/null
+++ b/usb/1.2/types.hal
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 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.usb@1.2;
+
+import android.hardware.usb@1.1::PortStatus_1_1;
+import android.hardware.usb@1.0::Status;
+
+enum Status : @1.0::Status {
+ /**
+ * Error value returned when the operation is not supported.
+ */
+ NOT_SUPPORTED = 4,
+};
+
+@export
+enum ContaminantDetectionStatus : uint32_t {
+ /**
+ * Contaminant presence detection is not supported.
+ */
+ NOT_SUPPORTED = 0,
+
+ /**
+ * Contaminant presence detection is supported but disabled.
+ */
+ DISABLED = 1,
+
+ /**
+ * Contaminant presence detection is enabled and contaminant not detected.
+ */
+ NOT_DETECTED = 2,
+
+ /**
+ * Contaminant presence detection is enabled and contaminant detected.
+ */
+ DETECTED = 3,
+};
+
+@export
+enum ContaminantProtectionMode : uint32_t {
+ /**
+ * No action performed upon detection of contaminant presence.
+ */
+ NONE = 0,
+
+ /**
+ * Upon detection of contaminant presence, Port is forced to sink only
+ * mode where a port shall only detect chargers until contaminant presence
+ * is no longer detected.
+ */
+ FORCE_SINK = 1 << 0,
+
+ /**
+ * Upon detection of contaminant presence, Port is forced to source only
+ * mode where a port shall only detect usb accessories such as headsets
+ * until contaminant presence is no longer detected.
+ */
+ FORCE_SOURCE = 1 << 1,
+
+ /**
+ * Upon detection of contaminant presence, port is disabled until contaminant
+ * presence is no longer detected. In the disabled state port will
+ * not respond to connection of chargers or usb accessories.
+ */
+ FORCE_DISABLE = 1 << 2,
+};
+
+@export
+enum ContaminantProtectionStatus : ContaminantProtectionMode {
+ /**
+ * Client disabled cotaminant protection by calling
+ * enableContaminantPresencePortProtection set to false. Low level drivers should
+ * not autmomously take any corrective action when contaminant presence is detected.
+ */
+ DISABLED = 1 << 3,
+};
+
+struct PortStatus {
+ PortStatus_1_1 status_1_1;
+
+ /**
+ * Contaminant presence protection modes supported by the port.
+ */
+ bitfield<ContaminantProtectionMode> supportedContaminantProtectionModes;
+
+ /**
+ * Client can enable/disable contaminant presence protection through
+ * enableContaminantPresenceProtection when true.
+ */
+ bool supportsEnableContaminantPresenceProtection;
+
+ /**
+ * Contaminant presence protection modes currently active for the port.
+ */
+ ContaminantProtectionStatus contaminantProtectionStatus;
+
+ /**
+ * Client can enable/disable contaminant presence detection through
+ * enableContaminantPresenceDetection when true.
+ */
+ bool supportsEnableContaminantPresenceDetection;
+
+ /**
+ * Current status of contaminant detection algorithm.
+ */
+ ContaminantDetectionStatus contaminantDetectionStatus;
+};
diff --git a/wifi/1.3/IWifiChip.hal b/wifi/1.3/IWifiChip.hal
index be00ee5..fc6dbac 100644
--- a/wifi/1.3/IWifiChip.hal
+++ b/wifi/1.3/IWifiChip.hal
@@ -31,7 +31,12 @@
/**
* Set Latency Mode.
*/
- SET_LATENCY_MODE = 1 << 12
+ SET_LATENCY_MODE = 1 << 12,
+
+ /**
+ * Support P2P MAC randomization
+ */
+ P2P_RAND_MAC = 1 << 13
};
/**
diff --git a/wifi/1.3/default/hidl_struct_util.cpp b/wifi/1.3/default/hidl_struct_util.cpp
index a102def..49c1477 100644
--- a/wifi/1.3/default/hidl_struct_util.cpp
+++ b/wifi/1.3/default/hidl_struct_util.cpp
@@ -83,6 +83,8 @@
return HidlChipCaps::D2AP_RTT;
case WIFI_FEATURE_SET_LATENCY_MODE:
return HidlChipCaps::SET_LATENCY_MODE;
+ case WIFI_FEATURE_P2P_RAND_MAC:
+ return HidlChipCaps::P2P_RAND_MAC;
};
CHECK(false) << "Unknown legacy feature: " << feature;
return {};
@@ -141,14 +143,18 @@
convertLegacyLoggerFeatureToHidlChipCapability(feature);
}
}
- for (const auto feature :
- {WIFI_FEATURE_SET_TX_POWER_LIMIT, WIFI_FEATURE_USE_BODY_HEAD_SAR,
- WIFI_FEATURE_D2D_RTT, WIFI_FEATURE_D2AP_RTT,
- WIFI_FEATURE_SET_LATENCY_MODE}) {
+ std::vector<uint32_t> features = {WIFI_FEATURE_SET_TX_POWER_LIMIT,
+ WIFI_FEATURE_USE_BODY_HEAD_SAR,
+ WIFI_FEATURE_D2D_RTT,
+ WIFI_FEATURE_D2AP_RTT,
+ WIFI_FEATURE_SET_LATENCY_MODE,
+ WIFI_FEATURE_P2P_RAND_MAC};
+ for (const auto feature : features) {
if (feature & legacy_feature_set) {
*hidl_caps |= convertLegacyFeatureToHidlChipCapability(feature);
}
}
+
// There are no flags for these 3 in the legacy feature set. Adding them to
// the set because all the current devices support it.
*hidl_caps |= HidlChipCaps::DEBUG_RING_BUFFER_VENDOR_DATA;
diff --git a/wifi/supplicant/1.2/ISupplicantP2pIface.hal b/wifi/supplicant/1.2/ISupplicantP2pIface.hal
index 7f6970f..d58f46b 100644
--- a/wifi/supplicant/1.2/ISupplicantP2pIface.hal
+++ b/wifi/supplicant/1.2/ISupplicantP2pIface.hal
@@ -68,4 +68,16 @@
addGroup_1_2(Ssid ssid, string pskPassphrase, bool persistent,
uint32_t freq, MacAddress peerAddress, bool joinExistingGroup)
generates (SupplicantStatus status);
+
+ /**
+ * Set MAC randomization enabled/disabled.
+ *
+ * @param enable true to enable, false to disable.
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |SupplicantStatusCode.SUCCESS|,
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ */
+ setMacRandomization(bool enable) generates (SupplicantStatus status);
};
diff --git a/wifi/supplicant/1.2/vts/functional/supplicant_p2p_iface_hidl_test.cpp b/wifi/supplicant/1.2/vts/functional/supplicant_p2p_iface_hidl_test.cpp
index 46b4087..9249045 100644
--- a/wifi/supplicant/1.2/vts/functional/supplicant_p2p_iface_hidl_test.cpp
+++ b/wifi/supplicant/1.2/vts/functional/supplicant_p2p_iface_hidl_test.cpp
@@ -126,3 +126,26 @@
EXPECT_EQ(SupplicantStatusCode::FAILURE_UNKNOWN, status.code);
});
}
+
+/*
+ * Verify that setMacRandomization successes.
+ */
+TEST_F(SupplicantP2pIfaceHidlTest, EnableMacRandomization) {
+ p2p_iface_->setMacRandomization(true, [](const SupplicantStatus& status) {
+ EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
+ });
+
+ // enable twice
+ p2p_iface_->setMacRandomization(true, [](const SupplicantStatus& status) {
+ EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
+ });
+
+ p2p_iface_->setMacRandomization(false, [](const SupplicantStatus& status) {
+ EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
+ });
+
+ // disable twice
+ p2p_iface_->setMacRandomization(false, [](const SupplicantStatus& status) {
+ EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
+ });
+}