diff --git a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h index e46e5b4f52..0ca6a58f06 100644 --- a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h +++ b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h @@ -1014,9 +1014,8 @@ class StreamWriter : public StreamWorker { if (mDataPosition == 0) mOnDataStart(); const size_t dataSize = std::min(mData.size() - mDataPosition, mDataMQ->availableToWrite()); bool success = mDataMQ->write(mData.data() + mDataPosition, dataSize); + bool wrapped = false; ALOGE_IF(!success, "data message queue write failed"); - mDataPosition += dataSize; - if (mDataPosition >= mData.size()) mDataPosition = 0; mEfGroup->wake(static_cast(MessageQueueFlagBits::NOT_EMPTY)); uint32_t efState = 0; @@ -1034,6 +1033,11 @@ class StreamWriter : public StreamWorker { ALOGE("bad write status: %d", writeStatus.retval); success = false; } + mDataPosition += writeStatus.reply.written; + if (mDataPosition >= mData.size()) { + mDataPosition = 0; + wrapped = true; + } } if (ret == -EAGAIN || ret == -EINTR) { // Spurious wakeup. This normally retries no more than once. @@ -1042,7 +1046,7 @@ class StreamWriter : public StreamWorker { ALOGE("bad wait status: %d", ret); success = false; } - if (success && mDataPosition == 0) { + if (wrapped) { success = mOnDataWrap(); } return success; diff --git a/audio/policy/1.0/xml/api/current.txt b/audio/policy/1.0/xml/api/current.txt index 0b77d45539..84a2b710b8 100644 --- a/audio/policy/1.0/xml/api/current.txt +++ b/audio/policy/1.0/xml/api/current.txt @@ -217,6 +217,10 @@ package audio.policy.V1_0 { enum_constant public static final audio.policy.V1_0.UsageEnumType AUDIO_USAGE_GAME; enum_constant public static final audio.policy.V1_0.UsageEnumType AUDIO_USAGE_MEDIA; enum_constant public static final audio.policy.V1_0.UsageEnumType AUDIO_USAGE_NOTIFICATION; + enum_constant public static final audio.policy.V1_0.UsageEnumType AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED; + enum_constant public static final audio.policy.V1_0.UsageEnumType AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT; + enum_constant public static final audio.policy.V1_0.UsageEnumType AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST; + enum_constant public static final audio.policy.V1_0.UsageEnumType AUDIO_USAGE_NOTIFICATION_EVENT; enum_constant public static final audio.policy.V1_0.UsageEnumType AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE; enum_constant public static final audio.policy.V1_0.UsageEnumType AUDIO_USAGE_UNKNOWN; enum_constant public static final audio.policy.V1_0.UsageEnumType AUDIO_USAGE_VIRTUAL_SOURCE; diff --git a/audio/policy/1.0/xml/audio_policy_engine_configuration.xsd b/audio/policy/1.0/xml/audio_policy_engine_configuration.xsd index 3ce12e709b..b58a6c84fb 100644 --- a/audio/policy/1.0/xml/audio_policy_engine_configuration.xsd +++ b/audio/policy/1.0/xml/audio_policy_engine_configuration.xsd @@ -347,6 +347,11 @@ + + + + + diff --git a/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp b/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp index 623438f70e..18a33292d8 100644 --- a/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp +++ b/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp @@ -250,8 +250,7 @@ protected: // Stream configurations are found in metadata RawStreamConfig *ptr = reinterpret_cast(streamCfgs.data.i32); for (unsigned offset = 0; offset < streamCfgs.count; offset += kStreamCfgSz) { - if (ptr->direction == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT && - ptr->format == HAL_PIXEL_FORMAT_RGBA_8888) { + if (ptr->direction == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT) { targetCfg.width = ptr->width; targetCfg.height = ptr->height; targetCfg.format = static_cast(ptr->format); @@ -2017,13 +2016,12 @@ TEST_P(EvsHidlTest, CameraUseStreamConfigToDisplay) { // Stream configurations are found in metadata RawStreamConfig *ptr = reinterpret_cast(streamCfgs.data.i32); for (unsigned offset = 0; offset < streamCfgs.count; offset += kStreamCfgSz) { - if (ptr->direction == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT && - ptr->format == HAL_PIXEL_FORMAT_RGBA_8888) { - + if (ptr->direction == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT) { if (ptr->width * ptr->height > maxArea && ptr->framerate >= minReqFps) { targetCfg.width = ptr->width; targetCfg.height = ptr->height; + targetCfg.format = static_cast(ptr->format); maxArea = ptr->width * ptr->height; foundCfg = true; @@ -2032,8 +2030,6 @@ TEST_P(EvsHidlTest, CameraUseStreamConfigToDisplay) { ++ptr; } } - targetCfg.format = - static_cast(HAL_PIXEL_FORMAT_RGBA_8888); if (!foundCfg) { // Current EVS camera does not provide stream configurations in the @@ -2120,13 +2116,12 @@ TEST_P(EvsHidlTest, MultiCameraStreamUseConfig) { // Stream configurations are found in metadata RawStreamConfig *ptr = reinterpret_cast(streamCfgs.data.i32); for (unsigned offset = 0; offset < streamCfgs.count; offset += kStreamCfgSz) { - if (ptr->direction == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT && - ptr->format == HAL_PIXEL_FORMAT_RGBA_8888) { - + if (ptr->direction == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT) { if (ptr->width * ptr->height > maxArea && ptr->framerate >= minReqFps) { targetCfg.width = ptr->width; targetCfg.height = ptr->height; + targetCfg.format = static_cast(ptr->format); maxArea = ptr->width * ptr->height; foundCfg = true; @@ -2135,8 +2130,6 @@ TEST_P(EvsHidlTest, MultiCameraStreamUseConfig) { ++ptr; } } - targetCfg.format = - static_cast(HAL_PIXEL_FORMAT_RGBA_8888); if (!foundCfg) { LOG(INFO) << "Device " << cam.v1.cameraId diff --git a/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp b/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp index 9c6c573174..3ea1eaa6fe 100644 --- a/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp +++ b/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp @@ -231,8 +231,7 @@ class EvsAidlTest : public ::testing::TestWithParam { // Stream configurations are found in metadata RawStreamConfig* ptr = reinterpret_cast(streamCfgs.data.i32); for (unsigned offset = 0; offset < streamCfgs.count; offset += kStreamCfgSz) { - if (ptr->direction == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT && - ptr->format == HAL_PIXEL_FORMAT_RGBA_8888) { + if (ptr->direction == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT) { targetCfg.width = ptr->width; targetCfg.height = ptr->height; targetCfg.format = static_cast(ptr->format); @@ -1732,11 +1731,11 @@ TEST_P(EvsAidlTest, CameraUseStreamConfigToDisplay) { // Stream configurations are found in metadata RawStreamConfig* ptr = reinterpret_cast(streamCfgs.data.i32); for (unsigned offset = 0; offset < streamCfgs.count; offset += kStreamCfgSz) { - if (ptr->direction == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT && - ptr->format == HAL_PIXEL_FORMAT_RGBA_8888) { + if (ptr->direction == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT) { if (ptr->width * ptr->height > maxArea && ptr->framerate >= minReqFps) { targetCfg.width = ptr->width; targetCfg.height = ptr->height; + targetCfg.format = static_cast(ptr->format); maxArea = ptr->width * ptr->height; foundCfg = true; @@ -1745,7 +1744,6 @@ TEST_P(EvsAidlTest, CameraUseStreamConfigToDisplay) { ++ptr; } } - targetCfg.format = static_cast(HAL_PIXEL_FORMAT_RGBA_8888); if (!foundCfg) { // Current EVS camera does not provide stream configurations in the @@ -1829,11 +1827,11 @@ TEST_P(EvsAidlTest, MultiCameraStreamUseConfig) { // Stream configurations are found in metadata RawStreamConfig* ptr = reinterpret_cast(streamCfgs.data.i32); for (unsigned offset = 0; offset < streamCfgs.count; offset += kStreamCfgSz) { - if (ptr->direction == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT && - ptr->format == HAL_PIXEL_FORMAT_RGBA_8888) { + if (ptr->direction == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT) { if (ptr->width * ptr->height > maxArea && ptr->framerate >= minReqFps) { targetCfg.width = ptr->width; targetCfg.height = ptr->height; + targetCfg.format = static_cast(ptr->format); maxArea = ptr->width * ptr->height; foundCfg = true; @@ -1842,7 +1840,6 @@ TEST_P(EvsAidlTest, MultiCameraStreamUseConfig) { ++ptr; } } - targetCfg.format = static_cast(HAL_PIXEL_FORMAT_RGBA_8888); if (!foundCfg) { LOG(INFO) << "Device " << cam.id diff --git a/bluetooth/1.1/vts/functional/VtsHalBluetoothV1_1TargetTest.xml b/bluetooth/1.1/vts/functional/VtsHalBluetoothV1_1TargetTest.xml index d64751a119..98b62ef0ac 100644 --- a/bluetooth/1.1/vts/functional/VtsHalBluetoothV1_1TargetTest.xml +++ b/bluetooth/1.1/vts/functional/VtsHalBluetoothV1_1TargetTest.xml @@ -20,8 +20,11 @@ - -