Merge "Add additional enums to NasProtocolMessage" into main
diff --git a/audio/aidl/common/tests/utils_tests.cpp b/audio/aidl/common/tests/utils_tests.cpp
index 1b8b8df..1522d7e 100644
--- a/audio/aidl/common/tests/utils_tests.cpp
+++ b/audio/aidl/common/tests/utils_tests.cpp
@@ -86,7 +86,7 @@
std::make_pair(6UL, AudioChannelLayout::LAYOUT_5POINT1),
std::make_pair(8UL, AudioChannelLayout::LAYOUT_7POINT1),
std::make_pair(16UL, AudioChannelLayout::LAYOUT_9POINT1POINT6),
- std::make_pair(13UL, AudioChannelLayout::LAYOUT_13POINT_360RA),
+ std::make_pair(13UL, AudioChannelLayout::LAYOUT_13POINT0),
std::make_pair(24UL, AudioChannelLayout::LAYOUT_22POINT2),
std::make_pair(3UL, AudioChannelLayout::LAYOUT_STEREO_HAPTIC_A),
std::make_pair(4UL, AudioChannelLayout::LAYOUT_STEREO_HAPTIC_AB)};
diff --git a/audio/aidl/default/Android.bp b/audio/aidl/default/Android.bp
index 967d0b9..687d8fc 100644
--- a/audio/aidl/default/Android.bp
+++ b/audio/aidl/default/Android.bp
@@ -121,6 +121,52 @@
],
}
+cc_library {
+ name: "libeffectconfig",
+ srcs: [
+ "EffectConfig.cpp",
+ ],
+ defaults: [
+ "latest_android_hardware_audio_effect_ndk_shared",
+ "latest_android_media_audio_common_types_ndk_shared",
+ ],
+ shared_libs: [
+ "libaudioutils",
+ "libaudio_aidl_conversion_common_ndk",
+ "libbase",
+ "libbinder_ndk",
+ "liblog",
+ "libmedia_helper",
+ "libtinyxml2",
+ "libutils",
+ ],
+ header_libs: [
+ "libaudio_system_headers",
+ "libaudioaidl_headers",
+ ],
+ export_shared_lib_headers: [
+ "libtinyxml2",
+ ],
+ export_include_dirs: [
+ "include",
+ ],
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ "-DBACKEND_NDK",
+ ],
+ vendor: true,
+ host_supported: true,
+ target: {
+ android: {
+ shared_libs: [
+ "libapexsupport",
+ ],
+ },
+ },
+}
+
cc_binary {
name: "android.hardware.audio.service-aidl.example",
relative_install_path: "hw",
@@ -290,10 +336,9 @@
defaults: ["aidlaudioeffectservice_defaults"],
shared_libs: [
"libapexsupport",
- "libtinyxml2",
+ "libeffectconfig",
],
srcs: [
- "EffectConfig.cpp",
"EffectFactory.cpp",
"EffectMain.cpp",
],
diff --git a/audio/aidl/default/EffectConfig.cpp b/audio/aidl/default/EffectConfig.cpp
index 9c335ba..fa12056 100644
--- a/audio/aidl/default/EffectConfig.cpp
+++ b/audio/aidl/default/EffectConfig.cpp
@@ -106,6 +106,7 @@
}
bool EffectConfig::resolveLibrary(const std::string& path, std::string* resolvedPath) {
+#ifdef __ANDROID_APEX__
if constexpr (__ANDROID_VENDOR_API__ >= 202404) {
AApexInfo *apexInfo;
if (AApexInfo_create(&apexInfo) == AAPEXINFO_OK) {
@@ -122,6 +123,7 @@
} else {
LOG(DEBUG) << __func__ << " libapexsupport is not supported";
}
+#endif
// If audio effects libs are not in vendor apex, locate them in kEffectLibPath
for (auto* libraryDirectory : kEffectLibPath) {
diff --git a/audio/aidl/default/Module.cpp b/audio/aidl/default/Module.cpp
index e96cf81..f9fa799 100644
--- a/audio/aidl/default/Module.cpp
+++ b/audio/aidl/default/Module.cpp
@@ -184,8 +184,12 @@
const int32_t nominalLatencyMs = getNominalLatencyMs(*portConfigIt);
// Since this is a private method, it is assumed that
// validity of the portConfigId has already been checked.
- const int32_t minimumStreamBufferSizeFrames =
- calculateBufferSizeFrames(nominalLatencyMs, portConfigIt->sampleRate.value().value);
+ int32_t minimumStreamBufferSizeFrames = 0;
+ if (!calculateBufferSizeFrames(
+ portConfigIt->format.value(), nominalLatencyMs,
+ portConfigIt->sampleRate.value().value, &minimumStreamBufferSizeFrames).isOk()) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
if (in_bufferSizeFrames < minimumStreamBufferSizeFrames) {
LOG(ERROR) << __func__ << ": " << mType << ": insufficient buffer size "
<< in_bufferSizeFrames << ", must be at least " << minimumStreamBufferSizeFrames;
@@ -378,6 +382,18 @@
return kLatencyMs;
}
+ndk::ScopedAStatus Module::calculateBufferSizeFrames(
+ const ::aidl::android::media::audio::common::AudioFormatDescription &format,
+ int32_t latencyMs, int32_t sampleRateHz, int32_t *bufferSizeFrames) {
+ if (format.type == AudioFormatType::PCM) {
+ *bufferSizeFrames = calculateBufferSizeFramesForPcm(latencyMs, sampleRateHz);
+ return ndk::ScopedAStatus::ok();
+ }
+ LOG(ERROR) << __func__ << ": " << mType << ": format " << format.toString()
+ << " is not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
ndk::ScopedAStatus Module::createMmapBuffer(
const ::aidl::android::hardware::audio::core::StreamContext& context __unused,
::aidl::android::hardware::audio::core::StreamDescriptor* desc __unused) {
@@ -1123,8 +1139,14 @@
*_aidl_return = in_requested;
auto maxSampleRateIt = std::max_element(sampleRates.begin(), sampleRates.end());
const int32_t latencyMs = getNominalLatencyMs(*(maxSampleRateIt->second));
- _aidl_return->minimumStreamBufferSizeFrames =
- calculateBufferSizeFrames(latencyMs, maxSampleRateIt->first);
+ if (!calculateBufferSizeFrames(
+ maxSampleRateIt->second->format.value(), latencyMs, maxSampleRateIt->first,
+ &_aidl_return->minimumStreamBufferSizeFrames).isOk()) {
+ if (patchesBackup.has_value()) {
+ mPatches = std::move(*patchesBackup);
+ }
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
_aidl_return->latenciesMs.clear();
_aidl_return->latenciesMs.insert(_aidl_return->latenciesMs.end(),
_aidl_return->sinkPortConfigIds.size(), latencyMs);
diff --git a/audio/aidl/default/config/audioPolicy/api/current.txt b/audio/aidl/default/config/audioPolicy/api/current.txt
index 1249a09..c675820 100644
--- a/audio/aidl/default/config/audioPolicy/api/current.txt
+++ b/audio/aidl/default/config/audioPolicy/api/current.txt
@@ -50,7 +50,7 @@
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_NONE;
- enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_OUT_13POINT_360RA;
+ enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_OUT_13POINT0;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_OUT_22POINT2;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_OUT_2POINT0POINT2;
enum_constant public static final android.audio.policy.configuration.AudioChannelMask AUDIO_CHANNEL_OUT_2POINT1;
diff --git a/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd b/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
index 8adac8c..94856a5 100644
--- a/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
+++ b/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
@@ -476,7 +476,7 @@
<xs:enumeration value="AUDIO_CHANNEL_OUT_7POINT1POINT4"/>
<xs:enumeration value="AUDIO_CHANNEL_OUT_9POINT1POINT4"/>
<xs:enumeration value="AUDIO_CHANNEL_OUT_9POINT1POINT6"/>
- <xs:enumeration value="AUDIO_CHANNEL_OUT_13POINT_360RA"/>
+ <xs:enumeration value="AUDIO_CHANNEL_OUT_13POINT0"/>
<xs:enumeration value="AUDIO_CHANNEL_OUT_22POINT2"/>
<xs:enumeration value="AUDIO_CHANNEL_OUT_MONO_HAPTIC_A"/>
<xs:enumeration value="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A"/>
diff --git a/audio/aidl/default/include/core-impl/Module.h b/audio/aidl/default/include/core-impl/Module.h
index d03598a..cbc13d1 100644
--- a/audio/aidl/default/include/core-impl/Module.h
+++ b/audio/aidl/default/include/core-impl/Module.h
@@ -207,12 +207,15 @@
virtual std::unique_ptr<Configuration> initializeConfig();
virtual int32_t getNominalLatencyMs(
const ::aidl::android::media::audio::common::AudioPortConfig& portConfig);
+ virtual ndk::ScopedAStatus calculateBufferSizeFrames(
+ const ::aidl::android::media::audio::common::AudioFormatDescription &format,
+ int32_t latencyMs, int32_t sampleRateHz, int32_t *bufferSizeFrames);
virtual ndk::ScopedAStatus createMmapBuffer(
const ::aidl::android::hardware::audio::core::StreamContext& context,
::aidl::android::hardware::audio::core::StreamDescriptor* desc);
// Utility and helper functions accessible to subclasses.
- static int32_t calculateBufferSizeFrames(int32_t latencyMs, int32_t sampleRateHz) {
+ static int32_t calculateBufferSizeFramesForPcm(int32_t latencyMs, int32_t sampleRateHz) {
const int32_t rawSizeFrames =
aidl::android::hardware::audio::common::frameCountFromDurationMs(latencyMs,
sampleRateHz);
diff --git a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
index bf22839..322fdc0 100644
--- a/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalDownmixTargetTest.cpp
@@ -52,7 +52,7 @@
AudioChannelLayout::LAYOUT_5POINT1POINT4, AudioChannelLayout::LAYOUT_6POINT1,
AudioChannelLayout::LAYOUT_7POINT1, AudioChannelLayout::LAYOUT_7POINT1POINT2,
AudioChannelLayout::LAYOUT_7POINT1POINT4, AudioChannelLayout::LAYOUT_9POINT1POINT4,
- AudioChannelLayout::LAYOUT_9POINT1POINT6, AudioChannelLayout::LAYOUT_13POINT_360RA,
+ AudioChannelLayout::LAYOUT_9POINT1POINT6, AudioChannelLayout::LAYOUT_13POINT0,
AudioChannelLayout::LAYOUT_22POINT2};
static const std::vector<int32_t> kChannels = {
diff --git a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
index a29920e..bf48a87 100644
--- a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
@@ -43,13 +43,13 @@
static const std::vector<TagVectorPair> kParamsIncreasingVector = {
{EnvironmentalReverb::roomLevelMb, {-3500, -2800, -2100, -1400, -700, 0}},
{EnvironmentalReverb::roomHfLevelMb, {-4000, -3200, -2400, -1600, -800, 0}},
- {EnvironmentalReverb::decayTimeMs, {800, 1600, 2400, 3200, 4000}},
- {EnvironmentalReverb::decayHfRatioPm, {100, 600, 1100, 1600, 2000}},
+ {EnvironmentalReverb::decayTimeMs, {400, 800, 1200, 1600, 2000}},
+ {EnvironmentalReverb::decayHfRatioPm, {1000, 900, 800, 700}},
{EnvironmentalReverb::levelMb, {-3500, -2800, -2100, -1400, -700, 0}},
};
static const TagVectorPair kDiffusionParam = {EnvironmentalReverb::diffusionPm,
- {200, 400, 600, 800, 1000}};
+ {100, 300, 500, 700, 900}};
static const TagVectorPair kDensityParam = {EnvironmentalReverb::densityPm,
{0, 200, 400, 600, 800, 1000}};
@@ -281,7 +281,7 @@
static constexpr int kDurationMilliSec = 500;
static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
- static constexpr int kInputFrequency = 1000;
+ static constexpr int kInputFrequency = 2000;
int mStereoChannelCount =
getChannelCount(AudioChannelLayout::make<AudioChannelLayout::layoutMask>(
diff --git a/biometrics/fingerprint/aidl/default/Fingerprint.cpp b/biometrics/fingerprint/aidl/default/Fingerprint.cpp
index 3055da1..143e231 100644
--- a/biometrics/fingerprint/aidl/default/Fingerprint.cpp
+++ b/biometrics/fingerprint/aidl/default/Fingerprint.cpp
@@ -50,6 +50,9 @@
} else if (sensorTypeProp == "udfps") {
mSensorType = FingerprintSensorType::UNDER_DISPLAY_OPTICAL;
mEngine = std::make_unique<FakeFingerprintEngineUdfps>();
+ } else if (sensorTypeProp == "udfps-us") {
+ mSensorType = FingerprintSensorType::UNDER_DISPLAY_ULTRASONIC;
+ mEngine = std::make_unique<FakeFingerprintEngineUdfps>();
} else if (sensorTypeProp == "side") {
mSensorType = FingerprintSensorType::POWER_BUTTON;
mEngine = std::make_unique<FakeFingerprintEngineSide>();
@@ -220,7 +223,7 @@
case FingerprintSensorType::UNDER_DISPLAY_OPTICAL:
return "udfps";
case FingerprintSensorType::UNDER_DISPLAY_ULTRASONIC:
- return "udfps";
+ return "udfps-us";
default:
return "unknown";
}
diff --git a/biometrics/fingerprint/aidl/default/api/android.hardware.biometrics.fingerprint.VirtualProps-current.txt b/biometrics/fingerprint/aidl/default/api/android.hardware.biometrics.fingerprint.VirtualProps-current.txt
index 8c02a68..ad6f9e0 100644
--- a/biometrics/fingerprint/aidl/default/api/android.hardware.biometrics.fingerprint.VirtualProps-current.txt
+++ b/biometrics/fingerprint/aidl/default/api/android.hardware.biometrics.fingerprint.VirtualProps-current.txt
@@ -173,6 +173,6 @@
type: String
access: ReadWrite
prop_name: "persist.vendor.fingerprint.virtual.type"
- enum_values: "default|rear|udfps|side"
+ enum_values: "default|rear|udfps|udfps-us|side"
}
}
diff --git a/biometrics/fingerprint/aidl/default/fingerprint.sysprop b/biometrics/fingerprint/aidl/default/fingerprint.sysprop
index eb33432..1d64c48 100644
--- a/biometrics/fingerprint/aidl/default/fingerprint.sysprop
+++ b/biometrics/fingerprint/aidl/default/fingerprint.sysprop
@@ -9,7 +9,7 @@
type: String
scope: Public
access: ReadWrite
- enum_values: "default|rear|udfps|side"
+ enum_values: "default|rear|udfps|udfps-us|side"
api_name: "type"
}
diff --git a/biometrics/fingerprint/aidl/default/tests/VirtualHalTest.cpp b/biometrics/fingerprint/aidl/default/tests/VirtualHalTest.cpp
index 8ffc96b..25abffe 100644
--- a/biometrics/fingerprint/aidl/default/tests/VirtualHalTest.cpp
+++ b/biometrics/fingerprint/aidl/default/tests/VirtualHalTest.cpp
@@ -152,7 +152,7 @@
} typeMap[] = {{FingerprintSensorType::REAR, "rear"},
{FingerprintSensorType::POWER_BUTTON, "side"},
{FingerprintSensorType::UNDER_DISPLAY_OPTICAL, "udfps"},
- {FingerprintSensorType::UNDER_DISPLAY_ULTRASONIC, "udfps"},
+ {FingerprintSensorType::UNDER_DISPLAY_ULTRASONIC, "udfps-us"},
{FingerprintSensorType::UNKNOWN, "unknown"}};
for (auto const& x : typeMap) {
mVhal->setType(x.type);
diff --git a/bluetooth/aidl/Android.bp b/bluetooth/aidl/Android.bp
index c6a592f..721be73 100644
--- a/bluetooth/aidl/Android.bp
+++ b/bluetooth/aidl/Android.bp
@@ -23,6 +23,9 @@
// translate code.
enabled: true,
},
+ rust: {
+ enabled: true,
+ },
java: {
sdk_version: "module_current",
},
diff --git a/bluetooth/audio/aidl/Android.bp b/bluetooth/audio/aidl/Android.bp
index ae55fa9..dbff368 100644
--- a/bluetooth/audio/aidl/Android.bp
+++ b/bluetooth/audio/aidl/Android.bp
@@ -38,6 +38,9 @@
cpp: {
enabled: false,
},
+ rust: {
+ enabled: true,
+ },
java: {
sdk_version: "module_current",
enabled: false,
@@ -86,7 +89,6 @@
],
frozen: false,
-
}
// Note: This should always be one version ahead of the last frozen version
diff --git a/compatibility_matrices/Android.bp b/compatibility_matrices/Android.bp
index 825c931..19f4839 100644
--- a/compatibility_matrices/Android.bp
+++ b/compatibility_matrices/Android.bp
@@ -147,6 +147,6 @@
stem: "compatibility_matrix.202504.xml",
srcs: ["compatibility_matrix.202504.xml"],
kernel_configs: [
- "kernel_config_w_6.12",
+ "kernel_config_b_6.12",
],
}
diff --git a/compatibility_matrices/bump.py b/compatibility_matrices/bump.py
index ee2fa88..bcb0fa6 100755
--- a/compatibility_matrices/bump.py
+++ b/compatibility_matrices/bump.py
@@ -181,14 +181,14 @@
help="VINTF level of the next version (e.g. 202504)")
parser.add_argument("current_letter",
type=str,
- help="Letter of the API level of the current version (e.g. v)")
+ help="Letter of the API level of the current version (e.g. b)")
parser.add_argument("next_letter",
type=str,
- help="Letter of the API level of the next version (e.g. w)")
+ help="Letter of the API level of the next version (e.g. c)")
parser.add_argument("platform_version",
type=str,
nargs="?",
- help="Android release version number number (e.g. 15)")
+ help="Android release version number number (e.g. 16)")
cmdline_args = parser.parse_args()
Bump(cmdline_args).run()
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
index e89f4ee..38cb33b 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
@@ -16,7 +16,6 @@
#include <android-base/logging.h>
#include <android/hardware/radio/1.2/IRadio.h>
-#include <gtest/gtest.h>
#include <radio_hidl_hal_utils_v1_0.h>
using namespace ::android::hardware::radio::V1_0;
@@ -73,16 +72,11 @@
CellIdentityTdscdma cit = cellIdentities.cellIdentityTdscdma[0];
hidl_mcc = cit.mcc;
hidl_mnc = cit.mnc;
- } else if (cellInfoType == CellInfoType::CDMA) {
+ } else {
// CellIndentityCdma has no mcc and mnc.
EXPECT_EQ(CellInfoType::CDMA, cellInfoType);
EXPECT_EQ(1, cellIdentities.cellIdentityCdma.size());
checkMccMnc = false;
- } else {
- // This test can be skipped for newer networks if a new RAT (e.g. 5g) that was not
- // supported in this version is added to the response from a modem that supports a new
- // version of this interface.
- GTEST_SKIP() << "Exempt from 1.0 test: camped on a new network:" << (int)cellInfoType;
}
// Check only one CellIdentity is size 1, and others must be 0.
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
index 51ca967..2bce2f9 100644
--- a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
@@ -807,16 +807,11 @@
cellIdentities.cellIdentityTdscdma[0];
hidl_mcc = cit.base.mcc;
hidl_mnc = cit.base.mnc;
- } else if (cellInfoType == CellInfoType::CDMA) {
+ } else {
// CellIndentityCdma has no mcc and mnc.
EXPECT_EQ(CellInfoType::CDMA, cellInfoType);
EXPECT_EQ(1, cellIdentities.cellIdentityCdma.size());
checkMccMnc = false;
- } else {
- // This test can be skipped for newer networks if a new RAT (e.g. 5g) that was not
- // supported in this version is added to the response from a modem that supports a new
- // version of this interface.
- GTEST_SKIP() << "Exempt from 1.2 test: camped on a new network:" << (int)cellInfoType;
}
// Check only one CellIdentity is size 1, and others must be 0.
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
index 9f530b3..f909676 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
@@ -239,18 +239,13 @@
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
- if (getRadioHalCapabilities()) {
- ASSERT_TRUE(CheckAnyOfErrors(
- radioRsp_v1_6->rspInfo.error,
- {::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED}));
- } else {
- ASSERT_TRUE(
- CheckAnyOfErrors(radioRsp_v1_6->rspInfo.error,
- {::android::hardware::radio::V1_6::RadioError::NONE,
- ::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE,
- ::android::hardware::radio::V1_6::RadioError::INTERNAL_ERR,
- ::android::hardware::radio::V1_6::RadioError::MODEM_ERR}));
- }
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioRsp_v1_6->rspInfo.error,
+ {::android::hardware::radio::V1_6::RadioError::NONE,
+ ::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED,
+ ::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE,
+ ::android::hardware::radio::V1_6::RadioError::INTERNAL_ERR,
+ ::android::hardware::radio::V1_6::RadioError::MODEM_ERR}));
}
/*
diff --git a/security/secretkeeper/aidl/vts/dice_sample.rs b/security/secretkeeper/aidl/vts/dice_sample.rs
index 4ef396a..d6379e5 100644
--- a/security/secretkeeper/aidl/vts/dice_sample.rs
+++ b/security/secretkeeper/aidl/vts/dice_sample.rs
@@ -283,7 +283,7 @@
SUBCOMPONENT_AUTHORITY_HASH => hex::decode("ed255ae9ea98826f3f3a966849f0aaaf356d140c766a869048016e0ba10141af039fec5c53658ddebdad9c2339587c5ef5487bde89237ca79802238d91aebba8").unwrap(),
},
{
- SUBCOMPONENT_NAME => "apex:com.android.btservices",
+ SUBCOMPONENT_NAME => "apex:com.android.bt",
SUBCOMPONENT_SECURITY_VERSION => 990090000,
SUBCOMPONENT_CODE_HASH => hex::decode("d7aa86dfdf92e662d2210cd2b3ad4e4522c917e9e287268363aa90e20f9ae16c").unwrap(),
SUBCOMPONENT_AUTHORITY_HASH => hex::decode("a0d577d4a56cfad09aaa7abcd2355cd78872df85672f2faf9ac2fdf15c06147394e704c7473f28bed737803581a3d097275cc26d8095a4a896ee76167f9ee40e").unwrap(),
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightColorFormat.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightColorFormat.aidl
new file mode 100644
index 0000000..9ee9dcc
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightColorFormat.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.tv.mediaquality;
+@VintfStability
+union AmbientBacklightColorFormat {
+ int RGB888;
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
index bbdfd62..2ea3198 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
@@ -36,5 +36,5 @@
parcelable AmbientBacklightMetadata {
android.hardware.tv.mediaquality.AmbientBacklightSettings settings;
android.hardware.tv.mediaquality.AmbientBacklightCompressAlgorithm compressAlgorithm;
- int[] zonesColors;
+ android.hardware.tv.mediaquality.AmbientBacklightColorFormat[] zonesColors;
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DigitalOutput.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DigitalOutput.aidl
index a6e8b91..dad0e96 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DigitalOutput.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DigitalOutput.aidl
@@ -37,4 +37,7 @@
AUTO,
BYPASS,
PCM,
+ DolbyDigitalPlus,
+ DolbyDigital,
+ DolbyMat,
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
index c29ae18..f21243c 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
@@ -37,11 +37,14 @@
android.hardware.tv.mediaquality.DolbyAudioProcessing.SoundMode soundMode;
boolean volumeLeveler;
boolean surroundVirtualizer;
- boolean doblyAtmos;
+ boolean dolbyAtmos;
enum SoundMode {
GAME,
MOVIE,
MUSIC,
NEWS,
+ STADIUM,
+ STANDARD,
+ USER,
}
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
index 9b413d4..1923043 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
@@ -38,4 +38,5 @@
oneway void onParamCapabilityChanged(long pictureProfileId, in android.hardware.tv.mediaquality.ParamCapability[] caps);
oneway void onVendorParamCapabilityChanged(long pictureProfileId, in android.hardware.tv.mediaquality.VendorParamCapability[] caps);
oneway void requestPictureParameters(long pictureProfileId);
+ oneway void onStreamStatusChanged(long pictureProfileId, android.hardware.tv.mediaquality.StreamStatus status);
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterName.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterName.aidl
index 711e270..522b8e6 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterName.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterName.aidl
@@ -61,6 +61,58 @@
GLOBE_DIMMING,
AUTO_PICTUREQUALITY_ENABLED,
AUTO_SUPER_RESOLUTION_ENABLED,
+ LEVEL_RANGE,
+ GAMUT_MAPPING,
+ PC_MODE,
+ LOW_LATENCY,
+ VRR,
+ CVRR,
+ HDMI_RGB_RANGE,
+ COLOR_SPACE,
+ PANEL_INIT_MAX_LUMINCE_VALID,
+ GAMMA,
+ COLOR_TEMPERATURE_RED_GAIN,
+ COLOR_TEMPERATURE_GREEN_GAIN,
+ COLOR_TEMPERATURE_BLUE_GAIN,
+ COLOR_TEMPERATURE_RED_OFFSET,
+ COLOR_TEMPERATURE_GREEN_OFFSET,
+ COLOR_TEMPERATURE_BLUE_OFFSET,
+ ELEVEN_POINT_RED,
+ ELEVEN_POINT_GREEN,
+ ELEVEN_POINT_BLUE,
+ LOW_BLUE_LIGHT,
+ LD_MODE,
+ OSD_RED_GAIN,
+ OSD_GREEN_GAIN,
+ OSD_BLUE_GAIN,
+ OSD_RED_OFFSET,
+ OSD_GREEN_OFFSET,
+ OSD_BLUE_OFFSET,
+ OSD_HUE,
+ OSD_SATURATION,
+ OSD_CONTRAST,
+ COLOR_TUNER_SWITCH,
+ COLOR_TUNER_HUE_RED,
+ COLOR_TUNER_HUE_GREEN,
+ COLOR_TUNER_HUE_BLUE,
+ COLOR_TUNER_HUE_CYAN,
+ COLOR_TUNER_HUE_MAGENTA,
+ COLOR_TUNER_HUE_YELLOW,
+ COLOR_TUNER_HUE_FLESH,
+ COLOR_TUNER_SATURATION_RED,
+ COLOR_TUNER_SATURATION_GREEN,
+ COLOR_TUNER_SATURATION_BLUE,
+ COLOR_TUNER_SATURATION_CYAN,
+ COLOR_TUNER_SATURATION_MAGENTA,
+ COLOR_TUNER_SATURATION_YELLOW,
+ COLOR_TUNER_SATURATION_FLESH,
+ COLOR_TUNER_LUMINANCE_RED,
+ COLOR_TUNER_LUMINANCE_GREEN,
+ COLOR_TUNER_LUMINANCE_BLUE,
+ COLOR_TUNER_LUMINANCE_CYAN,
+ COLOR_TUNER_LUMINANCE_MAGENTA,
+ COLOR_TUNER_LUMINANCE_YELLOW,
+ COLOR_TUNER_LUMINANCE_FLESH,
BALANCE,
BASS,
TREBLE,
@@ -77,4 +129,5 @@
DTS_VIRTUAL_X,
DIGITAL_OUTPUT,
DIGITAL_OUTPUT_DELAY_MS,
+ SOUND_STYLE,
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl
index c38e96f..3a9e4e4 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl
@@ -71,4 +71,48 @@
int panelInitMaxLuminceNits;
boolean panelInitMaxLuminceValid;
android.hardware.tv.mediaquality.Gamma gamma;
+ int colorTemperatureRedGain;
+ int colorTemperatureGreenGain;
+ int colorTemperatureBlueGain;
+ int colorTemperatureRedOffset;
+ int colorTemperatureGreenOffset;
+ int colorTemperatureBlueOffset;
+ int[11] elevenPointRed;
+ int[11] elevenPointGreen;
+ int[11] elevenPointBlue;
+ android.hardware.tv.mediaquality.QualityLevel lowBlueLight;
+ android.hardware.tv.mediaquality.QualityLevel LdMode;
+ int osdRedGain;
+ int osdGreenGain;
+ int osdBlueGain;
+ int osdRedOffset;
+ int osdGreenOffset;
+ int osdBlueOffset;
+ int osdHue;
+ int osdSaturation;
+ int osdContrast;
+ boolean colorTunerSwitch;
+ int colorTunerHueRed;
+ int colorTunerHueGreen;
+ int colorTunerHueBlue;
+ int colorTunerHueCyan;
+ int colorTunerHueMagenta;
+ int colorTunerHueYellow;
+ int colorTunerHueFlesh;
+ int colorTunerSaturationRed;
+ int colorTunerSaturationGreen;
+ int colorTunerSaturationBlue;
+ int colorTunerSaturationCyan;
+ int colorTunerSaturationMagenta;
+ int colorTunerSaturationYellow;
+ int colorTunerSaturationFlesh;
+ int colorTunerLuminanceRed;
+ int colorTunerLuminanceGreen;
+ int colorTunerLuminanceBlue;
+ int colorTunerLuminanceCyan;
+ int colorTunerLuminanceMagenta;
+ int colorTunerLuminanceYellow;
+ int colorTunerLuminanceFlesh;
+ boolean activeProfile;
+ android.hardware.tv.mediaquality.PictureQualityEventType pictureQualityEventType;
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureQualityEventType.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureQualityEventType.aidl
new file mode 100644
index 0000000..11001f6
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureQualityEventType.aidl
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.tv.mediaquality;
+@VintfStability
+enum PictureQualityEventType {
+ NONE,
+ BBD_RESULT,
+ VIDEO_DELAY_CHANGE,
+ CAPTUREPOINT_INFO_CHANGE,
+ VIDEOPATH_CHANGE,
+ EXTRA_FRAME_CHANGE,
+ DOLBY_IQ_CHANGE,
+ DOLBY_APO_CHANGE,
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundParameter.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundParameter.aidl
index 63eb55f..8c0eaaf 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundParameter.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundParameter.aidl
@@ -50,4 +50,6 @@
@nullable android.hardware.tv.mediaquality.DtsVirtualX dtsVirtualX;
android.hardware.tv.mediaquality.DigitalOutput digitalOutput;
int digitalOutputDelayMs;
+ boolean activeProfile;
+ android.hardware.tv.mediaquality.SoundStyle soundStyle;
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundStyle.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundStyle.aidl
new file mode 100644
index 0000000..1dbaf2c
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundStyle.aidl
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.tv.mediaquality;
+@VintfStability
+enum SoundStyle {
+ USER,
+ STANDARD,
+ VIVID,
+ SPORTS,
+ MOVIE,
+ MUSIC,
+ NEWS,
+ AUTO,
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/StreamStatus.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/StreamStatus.aidl
new file mode 100644
index 0000000..23e584b
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/StreamStatus.aidl
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2024 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.tv.mediaquality;
+@VintfStability
+enum StreamStatus {
+ SDR,
+ DOLBYVISION,
+ HDR10,
+ TCH,
+ HLG,
+ HDR10PLUS,
+ HDRVIVID,
+ IMAXSDR,
+ IMAXHDR10,
+ IMAXHDR10PLUS,
+ FMMSDR,
+ FMMHDR10,
+ FMMHDR10PLUS,
+ FMMHLG,
+ FMMDOLBY,
+ FMMTCH,
+ FMMHDRVIVID,
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightColorFormat.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightColorFormat.aidl
new file mode 100644
index 0000000..f29de45
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightColorFormat.aidl
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2024 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.mediaquality;
+
+@VintfStability
+union AmbientBacklightColorFormat {
+ /**
+ * The color format is RGB888.
+ */
+ int RGB888;
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
index 49b3a28..d2599bd 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
@@ -16,6 +16,7 @@
package android.hardware.tv.mediaquality;
+import android.hardware.tv.mediaquality.AmbientBacklightColorFormat;
import android.hardware.tv.mediaquality.AmbientBacklightCompressAlgorithm;
import android.hardware.tv.mediaquality.AmbientBacklightSettings;
@@ -32,8 +33,7 @@
AmbientBacklightCompressAlgorithm compressAlgorithm;
/**
- * The colors for the zones. Format of the color will be indicated in the
- * AmbientBacklightSettings::colorFormat.
+ * The colors for the zones. Formats of the color will be AmbientBacklightColorFormat.
*/
- int[] zonesColors;
+ AmbientBacklightColorFormat[] zonesColors;
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl
index fd19f7c..79bf02b 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl
@@ -42,12 +42,12 @@
PixelFormat colorFormat;
/**
- * The number of zones in horizontal direction.
+ * The number of logical zones in horizontal direction desire by the package.
*/
int hZonesNumber;
/**
- * The number of zones in vertical direction.
+ * The number of logical zones in vertical direction desire by the package.
*/
int vZonesNumber;
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DigitalOutput.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DigitalOutput.aidl
index 1a46ae6..a58ad79 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DigitalOutput.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DigitalOutput.aidl
@@ -22,6 +22,8 @@
* Automatically selects the best audio format to send to the connected audio device
* based on the incoming audio stream. This mode prioritizes high-quality formats
* like Dolby Digital or DTS if supported by the device, otherwise falls back to PCM.
+ *
+ * This is the default value for digital output.
*/
AUTO,
@@ -38,4 +40,23 @@
* range of devices but sacrifices surround sound capabilities.
*/
PCM,
+
+ /**
+ * Dolby Digital Plus (E-AC-3) output. An enhanced version of Dolby Digital
+ * supporting more channels (up to 7.1 surround sound) and higher bitrates.
+ * Commonly used for streaming and online content.
+ */
+ DolbyDigitalPlus,
+
+ /**
+ * Dolby Digital (AC-3) output. Provides up to 5.1 channels
+ * of surround sound, a standard for DVDs, Blu-rays, and TV broadcasts.
+ */
+ DolbyDigital,
+
+ /**
+ * Dolby Multistream Audio (MAT) output. Carries multiple audio streams
+ * (e.g., different languages, audio descriptions) within a Dolby Digital Plus bitstream.
+ */
+ DolbyMat,
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
index d56848c..3454556 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
@@ -18,11 +18,15 @@
@VintfStability
parcelable DolbyAudioProcessing {
+ /* The default value for sound mode is standard. */
enum SoundMode {
GAME,
MOVIE,
MUSIC,
NEWS,
+ STADIUM,
+ STANDARD,
+ USER,
}
/**
@@ -60,5 +64,5 @@
* mixed in Dolby Atmos and a compatible sound system with upward-firing speakers
* or a Dolby Atmos soundbar.
*/
- boolean doblyAtmos;
+ boolean dolbyAtmos;
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
index c8c7e68..0e11fb0 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
@@ -18,6 +18,7 @@
import android.hardware.tv.mediaquality.ParamCapability;
import android.hardware.tv.mediaquality.PictureProfile;
+import android.hardware.tv.mediaquality.StreamStatus;
import android.hardware.tv.mediaquality.VendorParamCapability;
@VintfStability
@@ -60,4 +61,13 @@
* @param pictureProfileId The PictureProfile id that associate with the PictureProfile.
*/
void requestPictureParameters(long pictureProfileId);
+
+ /**
+ * Notifies Media Quality Manager when stream status changed.
+ *
+ * @param pictureProfileId the ID of the profile used by the media content. -1 if there
+ * is no associated profile.
+ * @param status the status of the current stream.
+ */
+ void onStreamStatusChanged(long pictureProfileId, StreamStatus status);
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileChangedListener.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileChangedListener.aidl
index 35112e1..7fc7ab2 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileChangedListener.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileChangedListener.aidl
@@ -21,10 +21,9 @@
@VintfStability
oneway interface IPictureProfileChangedListener {
/**
- * Notifies the composer HAL that the picture profile has changed. For picture profile details,
- * check PictureProfile.
+ * Notifies the service that the picture profile has changed.
*
- * @param pictureProfile Picture profile passed to the composer HAL.
+ * @param pictureProfile Picture profile that should be cached by the service.
*/
void onPictureProfileChanged(in PictureProfile pictureProfile);
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterName.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterName.aidl
index 0a3c97b..d451590 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterName.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterName.aidl
@@ -51,6 +51,58 @@
GLOBE_DIMMING,
AUTO_PICTUREQUALITY_ENABLED,
AUTO_SUPER_RESOLUTION_ENABLED,
+ LEVEL_RANGE,
+ GAMUT_MAPPING,
+ PC_MODE,
+ LOW_LATENCY,
+ VRR,
+ CVRR,
+ HDMI_RGB_RANGE,
+ COLOR_SPACE,
+ PANEL_INIT_MAX_LUMINCE_VALID,
+ GAMMA,
+ COLOR_TEMPERATURE_RED_GAIN,
+ COLOR_TEMPERATURE_GREEN_GAIN,
+ COLOR_TEMPERATURE_BLUE_GAIN,
+ COLOR_TEMPERATURE_RED_OFFSET,
+ COLOR_TEMPERATURE_GREEN_OFFSET,
+ COLOR_TEMPERATURE_BLUE_OFFSET,
+ ELEVEN_POINT_RED,
+ ELEVEN_POINT_GREEN,
+ ELEVEN_POINT_BLUE,
+ LOW_BLUE_LIGHT,
+ LD_MODE,
+ OSD_RED_GAIN,
+ OSD_GREEN_GAIN,
+ OSD_BLUE_GAIN,
+ OSD_RED_OFFSET,
+ OSD_GREEN_OFFSET,
+ OSD_BLUE_OFFSET,
+ OSD_HUE,
+ OSD_SATURATION,
+ OSD_CONTRAST,
+ COLOR_TUNER_SWITCH,
+ COLOR_TUNER_HUE_RED,
+ COLOR_TUNER_HUE_GREEN,
+ COLOR_TUNER_HUE_BLUE,
+ COLOR_TUNER_HUE_CYAN,
+ COLOR_TUNER_HUE_MAGENTA,
+ COLOR_TUNER_HUE_YELLOW,
+ COLOR_TUNER_HUE_FLESH,
+ COLOR_TUNER_SATURATION_RED,
+ COLOR_TUNER_SATURATION_GREEN,
+ COLOR_TUNER_SATURATION_BLUE,
+ COLOR_TUNER_SATURATION_CYAN,
+ COLOR_TUNER_SATURATION_MAGENTA,
+ COLOR_TUNER_SATURATION_YELLOW,
+ COLOR_TUNER_SATURATION_FLESH,
+ COLOR_TUNER_LUMINANCE_RED,
+ COLOR_TUNER_LUMINANCE_GREEN,
+ COLOR_TUNER_LUMINANCE_BLUE,
+ COLOR_TUNER_LUMINANCE_CYAN,
+ COLOR_TUNER_LUMINANCE_MAGENTA,
+ COLOR_TUNER_LUMINANCE_YELLOW,
+ COLOR_TUNER_LUMINANCE_FLESH,
BALANCE,
BASS,
@@ -68,4 +120,5 @@
DTS_VIRTUAL_X,
DIGITAL_OUTPUT,
DIGITAL_OUTPUT_DELAY_MS,
+ SOUND_STYLE,
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl
index b7f2a11..2443d65 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl
@@ -20,6 +20,7 @@
import android.hardware.tv.mediaquality.ColorSpace;
import android.hardware.tv.mediaquality.ColorTemperature;
import android.hardware.tv.mediaquality.Gamma;
+import android.hardware.tv.mediaquality.PictureQualityEventType;
import android.hardware.tv.mediaquality.QualityLevel;
/**
@@ -253,4 +254,198 @@
/* The gamma curve used for the display. */
Gamma gamma;
+
+ /**
+ * The color gain value for color temperature adjustment.
+ * The value adjusts the intensity of color in the bright areas on the TV.
+ *
+ * The value range is from -100 to 100 where -100 would eliminate that color
+ * and 100 would significantly boost that color.
+ *
+ * The default/unmodified value is 0. No adjustment is applied to that color.
+ */
+ int colorTemperatureRedGain;
+
+ int colorTemperatureGreenGain;
+
+ int colorTemperatureBlueGain;
+
+ /**
+ * The color offset value for color temperature adjustment.
+ * This value adjusts the intensity of color in the dark areas on the TV.
+ *
+ * The value range is from -100 to 100 where -100 would eliminate that color
+ * and 100 would significantly boost that color.
+ *
+ * The default/unmodified value is 0. No adjustment is applied to that color.
+ */
+ int colorTemperatureRedOffset;
+
+ int colorTemperatureGreenOffset;
+
+ int colorTemperatureBlueOffset;
+
+ /**
+ * The parameters in this section is for 11-point white balance in advanced TV picture setting.
+ * 11-Point White Balance allows for very precise adjustment of the color temperature of the
+ * TV. It aims to make sure white looks truly white, without any unwanted color tints, across
+ * the entire range of brightness levels.
+ *
+ * The "11 points" refer to 11 different brightness levels from 0 (black) to 10 (white).
+ * At each of these points, we can fine-tune the mixture of red, green and blue to achieve
+ * neutral white.
+ *
+ * These parameters specifically control the amount of red, blue or green at each of the 11
+ * brightness points. The parameter type is an int array with a fix size of 11. The indexes
+ * 0 - 10 are the 11 different points. For example, elevenPointRed[0] adjusts the red level
+ * at the darkest black level. elevenPointRed[1] adjusts red at the next brightness level up,
+ * and so on.
+ *
+ * The value range is from 0 - 100 for each indexes, where 0 is the minimum intensity of
+ * that color(red, green, blue) at a specific brightness point and 100 is the maximum intensity
+ * of that color at that point.
+ *
+ * The default/unmodified value is 50. It can be other values depends on different TVs.
+ */
+ int[11] elevenPointRed;
+
+ int[11] elevenPointGreen;
+
+ int[11] elevenPointBlue;
+
+ /**
+ * Adjust gamma blue gain/offset.
+ *
+ * The default value is middle. Can be different depends on different TVs.
+ */
+ QualityLevel lowBlueLight;
+
+ /**
+ * Advance setting for local dimming level.
+ *
+ * The default value is off. Can be different depends on different TVs.
+ */
+ QualityLevel LdMode;
+
+ /**
+ * The parameter in this section is for on-screen display color gain and offset.
+ *
+ * Color gain is to adjust the intensity of that color (red, blue, green) in the brighter
+ * part of the image.
+ * Color offset is to adjust the intensity of that color in the darker part of the image.
+ *
+ * For example, increase OSD (on-screen display) red gain will make brighter reds even more
+ * intense, while decreasing it will make them less vibrant. Increase OSD red offset will add
+ * more red to the darker areas, while decreasing it will reduce the red in the shadows.
+ *
+ * The value range is from 0 to 2047. (11-bit resolution for the adjustment)
+ * The default value depends on different TVs.
+ */
+ int osdRedGain;
+
+ int osdGreenGain;
+
+ int osdBlueGain;
+
+ int osdRedOffset;
+
+ int osdGreenOffset;
+
+ int osdBlueOffset;
+
+ /* The value range is 0-100 */
+ int osdHue;
+
+ /* The value range is 0-255 */
+ int osdSaturation;
+
+ int osdContrast;
+
+ /**
+ * Enable/disable color tuner.
+ *
+ * The color tuner can adjust color temperature and picture color.
+ * The default is enabled.
+ */
+ boolean colorTunerSwitch;
+
+ /**
+ * The parameters in this section adjust the hue of each color.
+ *
+ * For example, increase colorTunerHueRed will make the image more purplish-red or more
+ * orange-red. increase colorTunerHueGreen will make the image more yellowish-green or
+ * more bluish-green. Flesh is a special one, it can make skin tones appear warmer (reddish)
+ * or cooler (more yellowish).
+ *
+ * The value range is from 0 - 100, and the default value is 50.
+ */
+ int colorTunerHueRed;
+
+ int colorTunerHueGreen;
+
+ int colorTunerHueBlue;
+
+ int colorTunerHueCyan;
+
+ int colorTunerHueMagenta;
+
+ int colorTunerHueYellow;
+
+ int colorTunerHueFlesh;
+
+ /**
+ * The parameters in this section adjust the saturation of each color.
+ *
+ * For example, increase colorTunerSaturationBlue will make the color blue more deeper
+ * and richer. Decrease will make the color blue more washed-out blues.
+ *
+ * The value range is from 0 -100, and the default value is 50.
+ */
+ int colorTunerSaturationRed;
+
+ int colorTunerSaturationGreen;
+
+ int colorTunerSaturationBlue;
+
+ int colorTunerSaturationCyan;
+
+ int colorTunerSaturationMagenta;
+
+ int colorTunerSaturationYellow;
+
+ int colorTunerSaturationFlesh;
+
+ /**
+ * The parameters in this section adjust the luminance (brightness) of each color.
+ *
+ * For example, increase colorTunerLuminanceRed will makes red appear brighter. Decrease
+ * will makes red appear darker.
+ *
+ * The value range is from 0 -100, and the default value is 50.
+ */
+ int colorTunerLuminanceRed;
+
+ int colorTunerLuminanceGreen;
+
+ int colorTunerLuminanceBlue;
+
+ int colorTunerLuminanceCyan;
+
+ int colorTunerLuminanceMagenta;
+
+ int colorTunerLuminanceYellow;
+
+ int colorTunerLuminanceFlesh;
+
+ /**
+ * Determines whether the current profile is actively in use or not.
+ */
+ boolean activeProfile;
+
+ /**
+ * This indicates non picture parameter status change about a profile.
+ *
+ * Those status can be found in PictureQualityEventType.
+ */
+ PictureQualityEventType pictureQualityEventType;
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureQualityEventType.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureQualityEventType.aidl
new file mode 100644
index 0000000..4985707
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureQualityEventType.aidl
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2024 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.mediaquality;
+
+@VintfStability
+enum PictureQualityEventType {
+ /* No status change */
+ NONE,
+
+ /**
+ * Black bar detection Event.
+ *
+ * TV has detected or lost track of black bars, potentially triggering a change in aspect
+ * ratio.
+ */
+ BBD_RESULT,
+
+ /**
+ * Video delay change event.
+ *
+ * This signifies a change in the video processing delay, might due to enabling or disabling
+ * certain picture quality features.
+ */
+ VIDEO_DELAY_CHANGE,
+
+ /**
+ * Capture point change event.
+ *
+ * A change in video processing pipeline the image is being captured for display. Changes here
+ * relates to switching between different video sources.
+ */
+ CAPTUREPOINT_INFO_CHANGE,
+
+ /**
+ * Video path change event.
+ *
+ * Indicates a change in the video signal path. This could involve switching between
+ * different input sources.
+ */
+ VIDEOPATH_CHANGE,
+
+ /**
+ * Extra frame change event.
+ *
+ * Some TVs use techniques like frame interpolation (inserting extra frames) to smooth motion.
+ * Change means the function is turned on or off.
+ */
+ EXTRA_FRAME_CHANGE,
+
+ /**
+ * Dolby Vision IQ change event.
+ *
+ * Dolby Vision IQ is a technology that adjusts HDR video based on the ambient light in the
+ * room. A change means the function is turned on or off.
+ */
+ DOLBY_IQ_CHANGE,
+
+ /**
+ * Dolby Vision audio processing object change event.
+ *
+ * This event might be triggered by changes in audio settings that affect the picture quality,
+ * such as enabling or disabling a feature that synchronizes audio and video processing.
+ */
+ DOLBY_APO_CHANGE,
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundParameter.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundParameter.aidl
index 4714ad2..7a8a031 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundParameter.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundParameter.aidl
@@ -22,6 +22,7 @@
import android.hardware.tv.mediaquality.DtsVirtualX;
import android.hardware.tv.mediaquality.EqualizerDetail;
import android.hardware.tv.mediaquality.QualityLevel;
+import android.hardware.tv.mediaquality.SoundStyle;
/**
* The parameters for Sound Profile.
@@ -92,4 +93,16 @@
/* Digital output delay in ms. */
int digitalOutputDelayMs;
+
+ /**
+ * Determines whether the current profile is actively in use or not.
+ */
+ boolean activeProfile;
+
+ /*
+ * Sound style of the profile.
+ *
+ * The default value is user customized profile.
+ */
+ SoundStyle soundStyle;
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundStyle.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundStyle.aidl
new file mode 100644
index 0000000..b8650d2
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundStyle.aidl
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2024 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.mediaquality;
+
+@VintfStability
+enum SoundStyle {
+ /* User custom style is the default value for sound style */
+ USER,
+ STANDARD,
+ VIVID,
+ SPORTS,
+ MOVIE,
+ MUSIC,
+ NEWS,
+ AUTO,
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/StreamStatus.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/StreamStatus.aidl
new file mode 100644
index 0000000..ec3b995
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/StreamStatus.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2024 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.mediaquality;
+
+@VintfStability
+enum StreamStatus {
+ SDR,
+ DOLBYVISION,
+ HDR10,
+ TCH,
+ HLG,
+ HDR10PLUS,
+ HDRVIVID,
+ IMAXSDR,
+ IMAXHDR10,
+ IMAXHDR10PLUS,
+ FMMSDR,
+ FMMHDR10,
+ FMMHDR10PLUS,
+ FMMHLG,
+ FMMDOLBY,
+ FMMTCH,
+ FMMHDRVIVID,
+}
diff --git a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
index 3be471b..f785cad 100644
--- a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
+++ b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
@@ -29,6 +29,7 @@
#include <aidl/android/hardware/tv/mediaquality/SoundParameter.h>
#include <aidl/android/hardware/tv/mediaquality/SoundParameters.h>
#include <aidl/android/hardware/tv/mediaquality/SoundProfile.h>
+#include <aidl/android/hardware/tv/mediaquality/StreamStatus.h>
#include <android/binder_auto_utils.h>
#include <android/binder_manager.h>
@@ -51,6 +52,7 @@
using aidl::android::hardware::tv::mediaquality::SoundParameter;
using aidl::android::hardware::tv::mediaquality::SoundParameters;
using aidl::android::hardware::tv::mediaquality::SoundProfile;
+using aidl::android::hardware::tv::mediaquality::StreamStatus;
using aidl::android::hardware::tv::mediaquality::VendorParamCapability;
using aidl::android::hardware::tv::mediaquality::VendorParameterIdentifier;
using android::ProcessState;
@@ -97,6 +99,8 @@
ScopedAStatus requestPictureParameters(int64_t) { return ScopedAStatus::ok(); }
+ ScopedAStatus onStreamStatusChanged(int64_t, StreamStatus) { return ScopedAStatus::ok(); }
+
private:
std::function<void(const PictureProfile& pictureProfile)> on_hal_picture_profile_adjust_;
};
diff --git a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp
index 2b39bc6..158e4f1 100644
--- a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp
+++ b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp
@@ -100,7 +100,9 @@
ASSERT_TRUE(mFilterTests.configFilter(filterReconf.settings, filterId));
ASSERT_TRUE(mFilterTests.startFilter(filterId));
ASSERT_TRUE(mFrontendTests.tuneFrontend(frontendConf, true /*testWithDemux*/));
- ASSERT_TRUE(mFilterTests.startIdTest(filterId));
+ if (!isPassthroughFilter(filterReconf)) {
+ ASSERT_TRUE(mFilterTests.startIdTest(filterId));
+ }
ASSERT_TRUE(mFrontendTests.stopTuneFrontend(true /*testWithDemux*/));
ASSERT_TRUE(mFilterTests.stopFilter(filterId));
ASSERT_TRUE(mFilterTests.closeFilter(filterId));
@@ -152,7 +154,9 @@
ASSERT_TRUE(mFilterTests.startFilter(filterId));
// tune test
ASSERT_TRUE(mFrontendTests.tuneFrontend(frontendConf, true /*testWithDemux*/));
- ASSERT_TRUE(filterDataOutputTest());
+ if (!isPassthroughFilter(filterConf)) {
+ ASSERT_TRUE(filterDataOutputTest());
+ }
ASSERT_TRUE(mFrontendTests.stopTuneFrontend(true /*testWithDemux*/));
ASSERT_TRUE(mFilterTests.stopFilter(filterId));
ASSERT_TRUE(mFilterTests.closeFilter(filterId));
@@ -210,7 +214,9 @@
ASSERT_TRUE(mFilterTests.startFilter(filterId));
// tune test
ASSERT_TRUE(mFrontendTests.tuneFrontend(frontendConf, true /*testWithDemux*/));
- ASSERT_TRUE(filterDataOutputTest());
+ if (!isPassthroughFilter(filterConf)) {
+ ASSERT_TRUE(filterDataOutputTest());
+ }
ASSERT_TRUE(mFrontendTests.stopTuneFrontend(true /*testWithDemux*/));
ASSERT_TRUE(mFilterTests.stopFilter(filterId));
ASSERT_TRUE(mFilterTests.releaseShareAvHandle(filterId));
diff --git a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.h b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.h
index be9b996..5fdc3dc 100644
--- a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.h
+++ b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.h
@@ -89,6 +89,28 @@
sectionFilterIds.clear();
}
+bool isPassthroughFilter(FilterConfig filterConfig) {
+ auto type = filterConfig.type;
+ if (type.mainType == DemuxFilterMainType::TS) {
+ auto subType = type.subType.get<DemuxFilterSubType::Tag::tsFilterType>();
+ if (subType == DemuxTsFilterType::AUDIO || subType == DemuxTsFilterType::VIDEO) {
+ auto tsFilterSettings = filterConfig.settings.get<DemuxFilterSettings::Tag::ts>();
+ auto avSettings = tsFilterSettings.filterSettings
+ .get<DemuxTsFilterSettingsFilterSettings::Tag::av>();
+ return avSettings.isPassthrough;
+ }
+ } else if (filterConfig.type.mainType != DemuxFilterMainType::MMTP) {
+ auto subType = type.subType.get<DemuxFilterSubType::Tag::mmtpFilterType>();
+ if (subType == DemuxMmtpFilterType::AUDIO || subType == DemuxMmtpFilterType::VIDEO) {
+ auto mmtpFilterSettings = filterConfig.settings.get<DemuxFilterSettings::Tag::mmtp>();
+ auto avSettings = mmtpFilterSettings.filterSettings
+ .get<DemuxMmtpFilterSettingsFilterSettings::Tag::av>();
+ return avSettings.isPassthrough;
+ }
+ }
+ return false;
+}
+
enum class Dataflow_Context { LNBRECORD, RECORD, DESCRAMBLING, LNBDESCRAMBLING };
class TunerLnbAidlTest : public testing::TestWithParam<std::string> {
diff --git a/wifi/aidl/default/aidl_struct_util.cpp b/wifi/aidl/default/aidl_struct_util.cpp
index a404853..6bd5a7f 100644
--- a/wifi/aidl/default/aidl_struct_util.cpp
+++ b/wifi/aidl/default/aidl_struct_util.cpp
@@ -2815,6 +2815,138 @@
return true;
}
+long convertLegacyAkmsToAidl(legacy_hal::wifi_rtt_akm akms) {
+ long aidl_akms = Akm::NONE;
+ if ((akms & legacy_hal::WPA_KEY_MGMT_PASN) != 0) {
+ aidl_akms |= Akm::PASN;
+ }
+ if ((akms & legacy_hal::WPA_KEY_MGMT_SAE) != 0) {
+ aidl_akms |= Akm::SAE;
+ }
+ if ((akms & legacy_hal::WPA_KEY_MGMT_EAP_FT_SHA256) != 0) {
+ aidl_akms |= Akm::FT_EAP_SHA256;
+ }
+ if ((akms & legacy_hal::WPA_KEY_MGMT_FT_PSK_SHA256) != 0) {
+ aidl_akms |= Akm::FT_PSK_SHA256;
+ }
+ if ((akms & legacy_hal::WPA_KEY_MGMT_EAP_FT_SHA384) != 0) {
+ aidl_akms |= Akm::FT_EAP_SHA384;
+ }
+ if ((akms & legacy_hal::WPA_KEY_MGMT_FT_PSK_SHA384) != 0) {
+ aidl_akms |= Akm::FT_PSK_SHA384;
+ }
+ if ((akms & legacy_hal::WPA_KEY_MGMT_EAP_FILS_SHA256) != 0) {
+ aidl_akms |= Akm::FILS_EAP_SHA256;
+ }
+ if ((akms & legacy_hal::WPA_KEY_MGMT_EAP_FILS_SHA384) != 0) {
+ aidl_akms |= Akm::FILS_EAP_SHA384;
+ }
+ return aidl_akms;
+}
+
+legacy_hal::wifi_rtt_akm convertAidlAkmToLegacy(long akm) {
+ switch (akm) {
+ case Akm::PASN:
+ return legacy_hal::WPA_KEY_MGMT_PASN;
+ case Akm::SAE:
+ return legacy_hal::WPA_KEY_MGMT_SAE;
+ case Akm::FT_EAP_SHA256:
+ return legacy_hal::WPA_KEY_MGMT_EAP_FT_SHA256;
+ case Akm::FT_PSK_SHA256:
+ return legacy_hal::WPA_KEY_MGMT_FT_PSK_SHA256;
+ case Akm::FT_EAP_SHA384:
+ return legacy_hal::WPA_KEY_MGMT_EAP_FT_SHA384;
+ case Akm::FT_PSK_SHA384:
+ return legacy_hal::WPA_KEY_MGMT_FT_PSK_SHA384;
+ case Akm::FILS_EAP_SHA256:
+ return legacy_hal::WPA_KEY_MGMT_EAP_FILS_SHA256;
+ case Akm::FILS_EAP_SHA384:
+ return legacy_hal::WPA_KEY_MGMT_EAP_FILS_SHA384;
+ default:
+ return legacy_hal::WPA_KEY_MGMT_NONE;
+ }
+}
+
+long convertLegacyCipherSuitesToAidl(legacy_hal::wifi_rtt_cipher_suite ciphers) {
+ long aidl_ciphers = CipherSuite::NONE;
+ if ((ciphers & legacy_hal::WPA_CIPHER_CCMP_128) != 0) {
+ aidl_ciphers |= CipherSuite::CCMP_128;
+ }
+ if ((ciphers & legacy_hal::WPA_CIPHER_CCMP_256) != 0) {
+ aidl_ciphers |= CipherSuite::CCMP_256;
+ }
+ if ((ciphers & legacy_hal::WPA_CIPHER_GCMP_128) != 0) {
+ aidl_ciphers |= CipherSuite::GCMP_128;
+ }
+ if ((ciphers & legacy_hal::WPA_CIPHER_GCMP_256) != 0) {
+ aidl_ciphers |= CipherSuite::GCMP_256;
+ }
+ return aidl_ciphers;
+}
+
+legacy_hal::wifi_rtt_cipher_suite convertAidlCipherSuiteToLegacy(long cipher) {
+ switch (cipher) {
+ case CipherSuite::CCMP_128:
+ return WPA_CIPHER_CCMP_128;
+ case CipherSuite::CCMP_256:
+ return WPA_CIPHER_CCMP_256;
+ case CipherSuite::GCMP_128:
+ return WPA_CIPHER_GCMP_128;
+ case CipherSuite::GCMP_256:
+ return WPA_CIPHER_GCMP_256;
+ default:
+ return WPA_CIPHER_NONE;
+ }
+}
+
+bool convertAidlRttConfigToLegacyV4(const RttConfig& aidl_config,
+ legacy_hal::wifi_rtt_config_v4* legacy_config) {
+ if (!legacy_config) {
+ return false;
+ }
+ *legacy_config = {};
+ if (!convertAidlRttConfigToLegacyV3(aidl_config, &(legacy_config->rtt_config))) {
+ return false;
+ }
+ if (aidl_config.secureConfig.has_value()) {
+ legacy_config->rtt_secure_config.enable_secure_he_ltf =
+ aidl_config.secureConfig->enableSecureHeLtf;
+ legacy_config->rtt_secure_config.enable_ranging_frame_protection =
+ aidl_config.secureConfig->enableRangingFrameProtection;
+ if (aidl_config.secureConfig->pasnComebackCookie.has_value() &&
+ aidl_config.secureConfig->pasnComebackCookie->size() <= RTT_MAX_COOKIE_LEN) {
+ legacy_config->rtt_secure_config.pasn_config.comeback_cookie_len =
+ aidl_config.secureConfig->pasnComebackCookie->size();
+ memcpy(legacy_config->rtt_secure_config.pasn_config.comeback_cookie,
+ aidl_config.secureConfig->pasnComebackCookie->data(),
+ aidl_config.secureConfig->pasnComebackCookie->size());
+ }
+ legacy_config->rtt_secure_config.pasn_config.base_akm =
+ convertAidlAkmToLegacy(aidl_config.secureConfig->pasnConfig.baseAkm);
+ legacy_config->rtt_secure_config.pasn_config.pairwise_cipher_suite =
+ convertAidlCipherSuiteToLegacy(aidl_config.secureConfig->pasnConfig.cipherSuite);
+ if (aidl_config.secureConfig->pasnConfig.passphrase.has_value() &&
+ aidl_config.secureConfig->pasnConfig.passphrase->size() <=
+ RTT_SECURITY_MAX_PASSPHRASE_LEN) {
+ legacy_config->rtt_secure_config.pasn_config.passphrase_len =
+ aidl_config.secureConfig->pasnConfig.passphrase->size();
+ memcpy(legacy_config->rtt_secure_config.pasn_config.passphrase,
+ aidl_config.secureConfig->pasnConfig.passphrase->data(),
+ aidl_config.secureConfig->pasnConfig.passphrase->size());
+ }
+ if (aidl_config.secureConfig->pasnConfig.pmkid.has_value() &&
+ aidl_config.secureConfig->pasnConfig.pmkid->size() == PMKID_LEN) {
+ legacy_config->rtt_secure_config.pasn_config.pmkid_len =
+ aidl_config.secureConfig->pasnConfig.pmkid->size();
+ memcpy(legacy_config->rtt_secure_config.pasn_config.pmkid,
+ aidl_config.secureConfig->pasnConfig.pmkid->data(),
+ aidl_config.secureConfig->pasnConfig.pmkid->size());
+ }
+ }
+
+ return true;
+}
+
bool convertAidlVectorOfRttConfigToLegacy(
const std::vector<RttConfig>& aidl_configs,
std::vector<legacy_hal::wifi_rtt_config>* legacy_configs) {
@@ -2849,6 +2981,23 @@
return true;
}
+bool convertAidlVectorOfRttConfigToLegacyV4(
+ const std::vector<RttConfig>& aidl_configs,
+ std::vector<legacy_hal::wifi_rtt_config_v4>* legacy_configs) {
+ if (!legacy_configs) {
+ return false;
+ }
+ *legacy_configs = {};
+ for (const auto& aidl_config : aidl_configs) {
+ legacy_hal::wifi_rtt_config_v4 legacy_config;
+ if (!convertAidlRttConfigToLegacyV4(aidl_config, &legacy_config)) {
+ return false;
+ }
+ legacy_configs->push_back(legacy_config);
+ }
+ return true;
+}
+
bool convertAidlRttLciInformationToLegacy(const RttLciInformation& aidl_info,
legacy_hal::wifi_lci_information* legacy_info) {
if (!legacy_info) {
@@ -2959,6 +3108,12 @@
aidl_capabilities->azBwSupport = (int)RttBw::BW_UNSPECIFIED;
aidl_capabilities->ntbInitiatorSupported = false;
aidl_capabilities->ntbResponderSupported = false;
+ // Initialize 11az secure ranging parameters to default
+ aidl_capabilities->akmsSupported = Akm::NONE;
+ aidl_capabilities->cipherSuitesSupported = CipherSuite::NONE;
+ aidl_capabilities->secureHeLtfSupported = false;
+ aidl_capabilities->rangingFrameProtectionSupported = false;
+ aidl_capabilities->maxSupportedSecureHeLtfProtocolVersion = false;
return true;
}
@@ -2986,6 +3141,53 @@
(int)convertLegacyRttBwBitmapToAidl(legacy_capabilities_v3.az_bw_support);
aidl_capabilities->ntbInitiatorSupported = legacy_capabilities_v3.ntb_initiator_supported;
aidl_capabilities->ntbResponderSupported = legacy_capabilities_v3.ntb_responder_supported;
+ // Initialize 11az secure ranging parameters to default
+ aidl_capabilities->akmsSupported = Akm::NONE;
+ aidl_capabilities->cipherSuitesSupported = CipherSuite::NONE;
+ aidl_capabilities->secureHeLtfSupported = false;
+ aidl_capabilities->rangingFrameProtectionSupported = false;
+ aidl_capabilities->maxSupportedSecureHeLtfProtocolVersion = false;
+
+ return true;
+}
+
+bool convertLegacyRttCapabilitiesV4ToAidl(
+ const legacy_hal::wifi_rtt_capabilities_v4& legacy_capabilities_v4,
+ RttCapabilities* aidl_capabilities) {
+ if (!aidl_capabilities) {
+ return false;
+ }
+ *aidl_capabilities = {};
+ aidl_capabilities->rttOneSidedSupported =
+ legacy_capabilities_v4.rtt_capab_v3.rtt_capab.rtt_one_sided_supported;
+ aidl_capabilities->rttFtmSupported =
+ legacy_capabilities_v4.rtt_capab_v3.rtt_capab.rtt_ftm_supported;
+ aidl_capabilities->lciSupported = legacy_capabilities_v4.rtt_capab_v3.rtt_capab.lci_support;
+ aidl_capabilities->lcrSupported = legacy_capabilities_v4.rtt_capab_v3.rtt_capab.lcr_support;
+ aidl_capabilities->responderSupported =
+ legacy_capabilities_v4.rtt_capab_v3.rtt_capab.responder_supported;
+ aidl_capabilities->preambleSupport = convertLegacyRttPreambleBitmapToAidl(
+ legacy_capabilities_v4.rtt_capab_v3.rtt_capab.preamble_support);
+ aidl_capabilities->bwSupport = convertLegacyRttBwBitmapToAidl(
+ legacy_capabilities_v4.rtt_capab_v3.rtt_capab.bw_support);
+ aidl_capabilities->mcVersion = legacy_capabilities_v4.rtt_capab_v3.rtt_capab.mc_version;
+ aidl_capabilities->azPreambleSupport = (int)convertLegacyRttPreambleBitmapToAidl(
+ legacy_capabilities_v4.rtt_capab_v3.az_preamble_support);
+ aidl_capabilities->azBwSupport =
+ (int)convertLegacyRttBwBitmapToAidl(legacy_capabilities_v4.rtt_capab_v3.az_bw_support);
+ aidl_capabilities->ntbInitiatorSupported =
+ legacy_capabilities_v4.rtt_capab_v3.ntb_initiator_supported;
+ aidl_capabilities->ntbResponderSupported =
+ legacy_capabilities_v4.rtt_capab_v3.ntb_responder_supported;
+ aidl_capabilities->akmsSupported =
+ convertLegacyAkmsToAidl(legacy_capabilities_v4.supported_akms);
+ aidl_capabilities->cipherSuitesSupported =
+ convertLegacyCipherSuitesToAidl(legacy_capabilities_v4.supported_cipher_suites);
+ aidl_capabilities->secureHeLtfSupported = legacy_capabilities_v4.secure_he_ltf_supported;
+ aidl_capabilities->rangingFrameProtectionSupported =
+ legacy_capabilities_v4.ranging_fame_protection_supported;
+ aidl_capabilities->maxSupportedSecureHeLtfProtocolVersion =
+ legacy_capabilities_v4.max_supported_secure_he_ltf_protocol_ver;
return true;
}
@@ -3066,6 +3268,13 @@
aidl_result.ntbMaxMeasurementTime = 0;
aidl_result.numTxSpatialStreams = 0;
aidl_result.numRxSpatialStreams = 0;
+ aidl_result.isRangingFrameProtectionEnabled = false;
+ aidl_result.isSecureLtfEnabled = false;
+ aidl_result.baseAkm = Akm::NONE;
+ aidl_result.cipherSuite = CipherSuite::NONE;
+ aidl_result.secureHeLtfProtocolVersion = 0;
+ aidl_result.pasnComebackAfterMillis = 0;
+ aidl_result.pasnComebackCookie = std::nullopt;
aidl_results->push_back(aidl_result);
}
return true;
@@ -3092,6 +3301,13 @@
aidl_result.ntbMaxMeasurementTime = 0;
aidl_result.numTxSpatialStreams = 0;
aidl_result.numRxSpatialStreams = 0;
+ aidl_result.isRangingFrameProtectionEnabled = false;
+ aidl_result.isSecureLtfEnabled = false;
+ aidl_result.baseAkm = Akm::NONE;
+ aidl_result.cipherSuite = CipherSuite::NONE;
+ aidl_result.secureHeLtfProtocolVersion = 0;
+ aidl_result.pasnComebackAfterMillis = 0;
+ aidl_result.pasnComebackCookie = std::nullopt;
aidl_results->push_back(aidl_result);
}
return true;
@@ -3119,6 +3335,57 @@
aidl_result.ntbMaxMeasurementTime = legacy_result->ntb_max_measurement_time;
aidl_result.numTxSpatialStreams = legacy_result->num_tx_sts;
aidl_result.numRxSpatialStreams = legacy_result->num_rx_sts;
+ aidl_result.isRangingFrameProtectionEnabled = false;
+ aidl_result.isSecureLtfEnabled = false;
+ aidl_result.baseAkm = Akm::NONE;
+ aidl_result.cipherSuite = CipherSuite::NONE;
+ aidl_result.secureHeLtfProtocolVersion = 0;
+ aidl_result.pasnComebackAfterMillis = 0;
+ aidl_result.pasnComebackCookie = std::nullopt;
+ aidl_results->push_back(aidl_result);
+ }
+ return true;
+}
+
+bool convertLegacyVectorOfRttResultV4ToAidl(
+ const std::vector<const legacy_hal::wifi_rtt_result_v4*>& legacy_results,
+ std::vector<RttResult>* aidl_results) {
+ if (!aidl_results) {
+ return false;
+ }
+ *aidl_results = {};
+ for (const auto legacy_result : legacy_results) {
+ RttResult aidl_result;
+ if (!convertLegacyRttResultToAidl(legacy_result->rtt_result_v3.rtt_result.rtt_result,
+ &aidl_result)) {
+ return false;
+ }
+ aidl_result.channelFreqMHz =
+ legacy_result->rtt_result_v3.rtt_result.frequency != UNSPECIFIED
+ ? legacy_result->rtt_result_v3.rtt_result.frequency
+ : 0;
+ aidl_result.packetBw =
+ convertLegacyRttBwToAidl(legacy_result->rtt_result_v3.rtt_result.packet_bw);
+ aidl_result.i2rTxLtfRepetitionCount =
+ legacy_result->rtt_result_v3.i2r_tx_ltf_repetition_count;
+ aidl_result.r2iTxLtfRepetitionCount =
+ legacy_result->rtt_result_v3.r2i_tx_ltf_repetition_count;
+ aidl_result.ntbMinMeasurementTime = legacy_result->rtt_result_v3.ntb_min_measurement_time;
+ aidl_result.ntbMaxMeasurementTime = legacy_result->rtt_result_v3.ntb_max_measurement_time;
+ aidl_result.numTxSpatialStreams = legacy_result->rtt_result_v3.num_tx_sts;
+ aidl_result.numRxSpatialStreams = legacy_result->rtt_result_v3.num_rx_sts;
+ aidl_result.isRangingFrameProtectionEnabled = legacy_result->is_ranging_protection_enabled;
+ aidl_result.isSecureLtfEnabled = legacy_result->is_secure_he_ltf_enabled;
+ aidl_result.baseAkm = convertLegacyAkmsToAidl(legacy_result->base_akm);
+ aidl_result.cipherSuite = convertLegacyCipherSuitesToAidl(legacy_result->cipher_suite);
+ aidl_result.secureHeLtfProtocolVersion = legacy_result->secure_he_ltf_protocol_version;
+ aidl_result.pasnComebackAfterMillis = legacy_result->pasn_comeback_after_millis;
+ if (legacy_result->pasn_comeback_cookie_len > 0 &&
+ legacy_result->pasn_comeback_cookie_len <= RTT_MAX_COOKIE_LEN) {
+ aidl_result.pasnComebackCookie = std::vector<uint8_t>(
+ legacy_result->pasn_comeback_cookie,
+ legacy_result->pasn_comeback_cookie + legacy_result->pasn_comeback_cookie_len);
+ }
aidl_results->push_back(aidl_result);
}
return true;
diff --git a/wifi/aidl/default/aidl_struct_util.h b/wifi/aidl/default/aidl_struct_util.h
index 9a3c535..b6a06db 100644
--- a/wifi/aidl/default/aidl_struct_util.h
+++ b/wifi/aidl/default/aidl_struct_util.h
@@ -17,6 +17,8 @@
#ifndef AIDL_STRUCT_UTIL_H_
#define AIDL_STRUCT_UTIL_H_
+#include <aidl/android/hardware/wifi/Akm.h>
+#include <aidl/android/hardware/wifi/CipherSuite.h>
#include <aidl/android/hardware/wifi/IWifiChip.h>
#include <aidl/android/hardware/wifi/IWifiChipEventCallback.h>
#include <aidl/android/hardware/wifi/NanBandIndex.h>
@@ -153,6 +155,10 @@
const std::vector<RttConfig>& aidl_configs,
std::vector<legacy_hal::wifi_rtt_config_v3>* legacy_configs);
+bool convertAidlVectorOfRttConfigToLegacyV4(
+ const std::vector<RttConfig>& aidl_configs,
+ std::vector<legacy_hal::wifi_rtt_config_v4>* legacy_configs);
+
bool convertAidlRttLciInformationToLegacy(const RttLciInformation& aidl_info,
legacy_hal::wifi_lci_information* legacy_info);
bool convertAidlRttLcrInformationToLegacy(const RttLcrInformation& aidl_info,
@@ -169,6 +175,9 @@
bool convertLegacyRttCapabilitiesV3ToAidl(
const legacy_hal::wifi_rtt_capabilities_v3& legacy_capabilities_v3,
RttCapabilities* aidl_capabilities);
+bool convertLegacyRttCapabilitiesV4ToAidl(
+ const legacy_hal::wifi_rtt_capabilities_v4& legacy_capabilities_v4,
+ RttCapabilities* aidl_capabilities);
bool convertLegacyVectorOfRttResultToAidl(
const std::vector<const legacy_hal::wifi_rtt_result*>& legacy_results,
@@ -179,6 +188,9 @@
bool convertLegacyVectorOfRttResultV3ToAidl(
const std::vector<const legacy_hal::wifi_rtt_result_v3*>& legacy_results,
std::vector<RttResult>* aidl_results);
+bool convertLegacyVectorOfRttResultV4ToAidl(
+ const std::vector<const legacy_hal::wifi_rtt_result_v4*>& legacy_results,
+ std::vector<RttResult>* aidl_results);
uint32_t convertAidlWifiBandToLegacyMacBand(WifiBand band);
uint32_t convertAidlWifiIfaceModeToLegacy(uint32_t aidl_iface_mask);
uint32_t convertAidlUsableChannelFilterToLegacy(uint32_t aidl_filter_mask);
diff --git a/wifi/aidl/default/wifi_legacy_hal.cpp b/wifi/aidl/default/wifi_legacy_hal.cpp
index 8d69013..c6d6177 100644
--- a/wifi/aidl/default/wifi_legacy_hal.cpp
+++ b/wifi/aidl/default/wifi_legacy_hal.cpp
@@ -185,11 +185,14 @@
on_rtt_results_internal_callback_v2;
std::function<void(wifi_request_id, unsigned num_results, wifi_rtt_result_v3* rtt_results_v3[])>
on_rtt_results_internal_callback_v3;
+std::function<void(wifi_request_id, unsigned num_results, wifi_rtt_result_v4* rtt_results_v4[])>
+ on_rtt_results_internal_callback_v4;
void invalidateRttResultsCallbacks() {
on_rtt_results_internal_callback = nullptr;
on_rtt_results_internal_callback_v2 = nullptr;
on_rtt_results_internal_callback_v3 = nullptr;
+ on_rtt_results_internal_callback_v4 = nullptr;
};
void onAsyncRttResults(wifi_request_id id, unsigned num_results, wifi_rtt_result* rtt_results[]) {
@@ -218,6 +221,15 @@
}
}
+void onAsyncRttResultsV4(wifi_request_id id, unsigned num_results,
+ wifi_rtt_result_v4* rtt_results_v4[]) {
+ const auto lock = aidl_sync_util::acquireGlobalLock();
+ if (on_rtt_results_internal_callback_v4) {
+ on_rtt_results_internal_callback_v4(id, num_results, rtt_results_v4);
+ invalidateRttResultsCallbacks();
+ }
+}
+
// Callbacks for the various NAN operations.
// NOTE: These have very little conversions to perform before invoking the user
// callbacks.
@@ -1344,6 +1356,38 @@
return status;
}
+wifi_error WifiLegacyHal::startRttRangeRequestV4(
+ const std::string& iface_name, wifi_request_id id,
+ const std::vector<wifi_rtt_config_v4>& rtt_configs,
+ const on_rtt_results_callback_v4& on_results_user_callback_v4) {
+ if (on_rtt_results_internal_callback_v4) {
+ return WIFI_ERROR_NOT_AVAILABLE;
+ }
+
+ on_rtt_results_internal_callback_v4 = [on_results_user_callback_v4](
+ wifi_request_id id, unsigned num_results,
+ wifi_rtt_result_v4* rtt_results_v4[]) {
+ if (num_results > 0 && !rtt_results_v4) {
+ LOG(ERROR) << "Unexpected nullptr in RTT v4 results";
+ return;
+ }
+ std::vector<const wifi_rtt_result_v4*> rtt_results_vec_v4;
+ std::copy_if(rtt_results_v4, rtt_results_v4 + num_results,
+ back_inserter(rtt_results_vec_v4),
+ [](wifi_rtt_result_v4* rtt_result_v4) { return rtt_result_v4 != nullptr; });
+ on_results_user_callback_v4(id, rtt_results_vec_v4);
+ };
+
+ std::vector<wifi_rtt_config_v4> rtt_configs_internal(rtt_configs);
+ wifi_error status = global_func_table_.wifi_rtt_range_request_v4(
+ id, getIfaceHandle(iface_name), rtt_configs.size(), rtt_configs_internal.data(),
+ {onAsyncRttResultsV4});
+ if (status != WIFI_SUCCESS) {
+ invalidateRttResultsCallbacks();
+ }
+ return status;
+}
+
wifi_error WifiLegacyHal::startRttRangeRequestV3(
const std::string& iface_name, wifi_request_id id,
const std::vector<wifi_rtt_config_v3>& rtt_configs,
@@ -1460,6 +1504,14 @@
return {status, rtt_caps_v3};
}
+std::pair<wifi_error, wifi_rtt_capabilities_v4> WifiLegacyHal::getRttCapabilitiesV4(
+ const std::string& iface_name) {
+ wifi_rtt_capabilities_v4 rtt_caps_v4;
+ wifi_error status = global_func_table_.wifi_get_rtt_capabilities_v4(getIfaceHandle(iface_name),
+ &rtt_caps_v4);
+ return {status, rtt_caps_v4};
+}
+
std::pair<wifi_error, wifi_rtt_responder> WifiLegacyHal::getRttResponderInfo(
const std::string& iface_name) {
wifi_rtt_responder rtt_responder;
diff --git a/wifi/aidl/default/wifi_legacy_hal.h b/wifi/aidl/default/wifi_legacy_hal.h
index f603210..46bf790 100644
--- a/wifi/aidl/default/wifi_legacy_hal.h
+++ b/wifi/aidl/default/wifi_legacy_hal.h
@@ -350,6 +350,7 @@
using ::wifi_ring_buffer_status;
using ::wifi_roaming_capabilities;
using ::wifi_roaming_config;
+using ::wifi_rtt_akm;
using ::wifi_rtt_bw;
using ::WIFI_RTT_BW_10;
using ::WIFI_RTT_BW_160;
@@ -361,8 +362,11 @@
using ::WIFI_RTT_BW_UNSPECIFIED;
using ::wifi_rtt_capabilities;
using ::wifi_rtt_capabilities_v3;
+using ::wifi_rtt_capabilities_v4;
+using ::wifi_rtt_cipher_suite;
using ::wifi_rtt_config;
using ::wifi_rtt_config_v3;
+using ::wifi_rtt_config_v4;
using ::wifi_rtt_preamble;
using ::WIFI_RTT_PREAMBLE_EHT;
using ::WIFI_RTT_PREAMBLE_HE;
@@ -374,6 +378,7 @@
using ::wifi_rtt_result;
using ::wifi_rtt_result_v2;
using ::wifi_rtt_result_v3;
+using ::wifi_rtt_result_v4;
using ::wifi_rtt_status;
using ::wifi_rtt_type;
using ::wifi_rx_packet_fate;
@@ -399,6 +404,20 @@
using ::WLAN_MAC_5_0_BAND;
using ::WLAN_MAC_60_0_BAND;
using ::WLAN_MAC_6_0_BAND;
+using ::WPA_CIPHER_CCMP_128;
+using ::WPA_CIPHER_CCMP_256;
+using ::WPA_CIPHER_GCMP_128;
+using ::WPA_CIPHER_GCMP_256;
+using ::WPA_CIPHER_NONE;
+using ::WPA_KEY_MGMT_EAP_FILS_SHA256;
+using ::WPA_KEY_MGMT_EAP_FILS_SHA384;
+using ::WPA_KEY_MGMT_EAP_FT_SHA256;
+using ::WPA_KEY_MGMT_EAP_FT_SHA384;
+using ::WPA_KEY_MGMT_FT_PSK_SHA256;
+using ::WPA_KEY_MGMT_FT_PSK_SHA384;
+using ::WPA_KEY_MGMT_NONE;
+using ::WPA_KEY_MGMT_PASN;
+using ::WPA_KEY_MGMT_SAE;
// APF capabilities supported by the iface.
struct PacketFilterCapabilities {
@@ -517,6 +536,8 @@
std::function<void(wifi_request_id, const std::vector<const wifi_rtt_result_v2*>&)>;
using on_rtt_results_callback_v3 =
std::function<void(wifi_request_id, const std::vector<const wifi_rtt_result_v3*>&)>;
+using on_rtt_results_callback_v4 =
+ std::function<void(wifi_request_id, const std::vector<const wifi_rtt_result_v4*>&)>;
// Callback for ring buffer data.
using on_ring_buffer_data_callback = std::function<void(
@@ -705,12 +726,17 @@
wifi_error startRttRangeRequestV3(const std::string& iface_name, wifi_request_id id,
const std::vector<wifi_rtt_config_v3>& rtt_configs,
const on_rtt_results_callback_v3& on_results_callback);
+ wifi_error startRttRangeRequestV4(const std::string& iface_name, wifi_request_id id,
+ const std::vector<wifi_rtt_config_v4>& rtt_configs,
+ const on_rtt_results_callback_v4& on_results_callback);
wifi_error cancelRttRangeRequest(const std::string& iface_name, wifi_request_id id,
const std::vector<std::array<uint8_t, ETH_ALEN>>& mac_addrs);
std::pair<wifi_error, wifi_rtt_capabilities> getRttCapabilities(const std::string& iface_name);
std::pair<wifi_error, wifi_rtt_capabilities_v3> getRttCapabilitiesV3(
const std::string& iface_name);
+ std::pair<wifi_error, wifi_rtt_capabilities_v4> getRttCapabilitiesV4(
+ const std::string& iface_name);
std::pair<wifi_error, wifi_rtt_responder> getRttResponderInfo(const std::string& iface_name);
wifi_error enableRttResponder(const std::string& iface_name, wifi_request_id id,
const wifi_channel_info& channel_hint, uint32_t max_duration_secs,
diff --git a/wifi/aidl/default/wifi_legacy_hal_stubs.cpp b/wifi/aidl/default/wifi_legacy_hal_stubs.cpp
index 878abf0..d39894e 100644
--- a/wifi/aidl/default/wifi_legacy_hal_stubs.cpp
+++ b/wifi/aidl/default/wifi_legacy_hal_stubs.cpp
@@ -180,7 +180,9 @@
populateStubFor(&hal_fn->wifi_set_mlo_mode);
populateStubFor(&hal_fn->wifi_get_supported_iface_concurrency_matrix);
populateStubFor(&hal_fn->wifi_get_rtt_capabilities_v3);
+ populateStubFor(&hal_fn->wifi_get_rtt_capabilities_v4);
populateStubFor(&hal_fn->wifi_rtt_range_request_v3);
+ populateStubFor(&hal_fn->wifi_rtt_range_request_v4);
populateStubFor(&hal_fn->wifi_twt_get_capabilities);
populateStubFor(&hal_fn->wifi_twt_register_events);
populateStubFor(&hal_fn->wifi_twt_session_setup);
diff --git a/wifi/aidl/default/wifi_rtt_controller.cpp b/wifi/aidl/default/wifi_rtt_controller.cpp
index 9dee45c..99dafe8 100644
--- a/wifi/aidl/default/wifi_rtt_controller.cpp
+++ b/wifi/aidl/default/wifi_rtt_controller.cpp
@@ -136,13 +136,46 @@
ndk::ScopedAStatus WifiRttController::rangeRequestInternal(
int32_t cmd_id, const std::vector<RttConfig>& rtt_configs) {
- // Try 11mc & 11az ranging (v3)
+ // Try 11az secure, 11az non-secure & 11mc ranging (v4)
+ std::vector<legacy_hal::wifi_rtt_config_v4> legacy_configs_v4;
+ if (!aidl_struct_util::convertAidlVectorOfRttConfigToLegacyV4(rtt_configs,
+ &legacy_configs_v4)) {
+ return createWifiStatus(WifiStatusCode::ERROR_INVALID_ARGS);
+ }
+ std::weak_ptr<WifiRttController> weak_ptr_this = weak_ptr_this_;
+ const auto& on_results_callback_v4 =
+ [weak_ptr_this](legacy_hal::wifi_request_id id,
+ const std::vector<const legacy_hal::wifi_rtt_result_v4*>& results) {
+ const auto shared_ptr_this = weak_ptr_this.lock();
+ if (!shared_ptr_this.get() || !shared_ptr_this->isValid()) {
+ LOG(ERROR) << "v4 Callback invoked on an invalid object";
+ return;
+ }
+ std::vector<RttResult> aidl_results;
+ if (!aidl_struct_util::convertLegacyVectorOfRttResultV4ToAidl(results,
+ &aidl_results)) {
+ LOG(ERROR) << "Failed to convert rtt results v4 to AIDL structs";
+ return;
+ }
+ for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
+ if (!callback->onResults(id, aidl_results).isOk()) {
+ LOG(ERROR) << "Failed to invoke the v4 callback";
+ }
+ }
+ };
+ legacy_hal::wifi_error legacy_status = legacy_hal_.lock()->startRttRangeRequestV4(
+ ifname_, cmd_id, legacy_configs_v4, on_results_callback_v4);
+
+ if (legacy_status != legacy_hal::WIFI_ERROR_NOT_SUPPORTED) {
+ return createWifiStatusFromLegacyError(legacy_status);
+ }
+
+ // Fallback to 11az non-secure & 11mc ranging (v3)
std::vector<legacy_hal::wifi_rtt_config_v3> legacy_configs_v3;
if (!aidl_struct_util::convertAidlVectorOfRttConfigToLegacyV3(rtt_configs,
&legacy_configs_v3)) {
return createWifiStatus(WifiStatusCode::ERROR_INVALID_ARGS);
}
- std::weak_ptr<WifiRttController> weak_ptr_this = weak_ptr_this_;
const auto& on_results_callback_v3 =
[weak_ptr_this](legacy_hal::wifi_request_id id,
const std::vector<const legacy_hal::wifi_rtt_result_v3*>& results) {
@@ -163,8 +196,8 @@
}
}
};
- legacy_hal::wifi_error legacy_status = legacy_hal_.lock()->startRttRangeRequestV3(
- ifname_, cmd_id, legacy_configs_v3, on_results_callback_v3);
+ legacy_status = legacy_hal_.lock()->startRttRangeRequestV3(ifname_, cmd_id, legacy_configs_v3,
+ on_results_callback_v3);
if (legacy_status != legacy_hal::WIFI_ERROR_NOT_SUPPORTED) {
return createWifiStatusFromLegacyError(legacy_status);
@@ -236,31 +269,46 @@
std::pair<RttCapabilities, ndk::ScopedAStatus> WifiRttController::getCapabilitiesInternal() {
legacy_hal::wifi_error legacy_status;
legacy_hal::wifi_rtt_capabilities_v3 legacy_caps_v3;
- std::tie(legacy_status, legacy_caps_v3) = legacy_hal_.lock()->getRttCapabilitiesV3(ifname_);
- // Try v3 API first, if it is not supported fallback.
- if (legacy_status == legacy_hal::WIFI_ERROR_NOT_SUPPORTED) {
- legacy_hal::wifi_rtt_capabilities legacy_caps;
- std::tie(legacy_status, legacy_caps) = legacy_hal_.lock()->getRttCapabilities(ifname_);
- if (legacy_status != legacy_hal::WIFI_SUCCESS) {
- return {RttCapabilities{}, createWifiStatusFromLegacyError(legacy_status)};
- }
+ legacy_hal::wifi_rtt_capabilities_v4 legacy_caps_v4;
+ // Try v4 first
+ std::tie(legacy_status, legacy_caps_v4) = legacy_hal_.lock()->getRttCapabilitiesV4(ifname_);
+ if (legacy_status == legacy_hal::WIFI_SUCCESS) {
RttCapabilities aidl_caps;
- if (!aidl_struct_util::convertLegacyRttCapabilitiesToAidl(legacy_caps, &aidl_caps)) {
+ if (!aidl_struct_util::convertLegacyRttCapabilitiesV4ToAidl(legacy_caps_v4, &aidl_caps)) {
return {RttCapabilities{}, createWifiStatus(WifiStatusCode::ERROR_UNKNOWN)};
}
return {aidl_caps, ndk::ScopedAStatus::ok()};
}
- if (legacy_status != legacy_hal::WIFI_SUCCESS) {
- return {RttCapabilities{}, createWifiStatusFromLegacyError(legacy_status)};
+ // If not supported, fallback to v3
+ if (legacy_status == legacy_hal::WIFI_ERROR_NOT_SUPPORTED) {
+ std::tie(legacy_status, legacy_caps_v3) = legacy_hal_.lock()->getRttCapabilitiesV3(ifname_);
+ if (legacy_status == legacy_hal::WIFI_SUCCESS) {
+ RttCapabilities aidl_caps;
+ if (!aidl_struct_util::convertLegacyRttCapabilitiesV3ToAidl(legacy_caps_v3,
+ &aidl_caps)) {
+ return {RttCapabilities{}, createWifiStatus(WifiStatusCode::ERROR_UNKNOWN)};
+ }
+ return {aidl_caps, ndk::ScopedAStatus::ok()};
+ }
}
- RttCapabilities aidl_caps;
- if (!aidl_struct_util::convertLegacyRttCapabilitiesV3ToAidl(legacy_caps_v3, &aidl_caps)) {
- return {RttCapabilities{}, createWifiStatus(WifiStatusCode::ERROR_UNKNOWN)};
+ // If not supported, fallback to default
+ if (legacy_status == legacy_hal::WIFI_ERROR_NOT_SUPPORTED) {
+ legacy_hal::wifi_rtt_capabilities legacy_caps;
+ std::tie(legacy_status, legacy_caps) = legacy_hal_.lock()->getRttCapabilities(ifname_);
+ if (legacy_status == legacy_hal::WIFI_SUCCESS) {
+ RttCapabilities aidl_caps;
+ if (!aidl_struct_util::convertLegacyRttCapabilitiesToAidl(legacy_caps, &aidl_caps)) {
+ return {RttCapabilities{}, createWifiStatus(WifiStatusCode::ERROR_UNKNOWN)};
+ }
+ return {aidl_caps, ndk::ScopedAStatus::ok()};
+ }
}
- return {aidl_caps, ndk::ScopedAStatus::ok()};
+
+ // Error, if all failed
+ return {RttCapabilities{}, createWifiStatusFromLegacyError(legacy_status)};
}
ndk::ScopedAStatus WifiRttController::setLciInternal(int32_t cmd_id, const RttLciInformation& lci) {
diff --git a/wifi/legacy_headers/include/hardware_legacy/wifi_hal.h b/wifi/legacy_headers/include/hardware_legacy/wifi_hal.h
index c68cdf6..a757954 100644
--- a/wifi/legacy_headers/include/hardware_legacy/wifi_hal.h
+++ b/wifi/legacy_headers/include/hardware_legacy/wifi_hal.h
@@ -790,10 +790,13 @@
wifi_rtt_config[], wifi_rtt_event_handler);
wifi_error (* wifi_rtt_range_request_v3)(wifi_request_id, wifi_interface_handle, unsigned,
wifi_rtt_config_v3[], wifi_rtt_event_handler_v3);
+ wifi_error (*wifi_rtt_range_request_v4)(wifi_request_id, wifi_interface_handle, unsigned,
+ wifi_rtt_config_v4[], wifi_rtt_event_handler_v4);
wifi_error (* wifi_rtt_range_cancel)(wifi_request_id, wifi_interface_handle, unsigned,
mac_addr[]);
wifi_error (* wifi_get_rtt_capabilities)(wifi_interface_handle, wifi_rtt_capabilities *);
wifi_error (* wifi_get_rtt_capabilities_v3)(wifi_interface_handle, wifi_rtt_capabilities_v3 *);
+ wifi_error (*wifi_get_rtt_capabilities_v4)(wifi_interface_handle, wifi_rtt_capabilities_v4*);
wifi_error (* wifi_rtt_get_responder_info)(wifi_interface_handle iface,
wifi_rtt_responder *responder_info);
wifi_error (* wifi_enable_responder)(wifi_request_id id, wifi_interface_handle iface,
diff --git a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/UsdPublishConfig.aidl b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/UsdPublishConfig.aidl
index 791de52..99ac16d 100644
--- a/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/UsdPublishConfig.aidl
+++ b/wifi/supplicant/aidl/aidl_api/android.hardware.wifi.supplicant/current/android/hardware/wifi/supplicant/UsdPublishConfig.aidl
@@ -39,6 +39,7 @@
boolean isFsd;
int announcementPeriodMillis;
android.hardware.wifi.supplicant.UsdPublishTransmissionType transmissionType;
+ boolean eventsEnabled;
enum PublishType {
SOLICITED_ONLY = 0,
UNSOLICITED_ONLY = 1,
diff --git a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/UsdPublishConfig.aidl b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/UsdPublishConfig.aidl
index e04974b..222edce 100644
--- a/wifi/supplicant/aidl/android/hardware/wifi/supplicant/UsdPublishConfig.aidl
+++ b/wifi/supplicant/aidl/android/hardware/wifi/supplicant/UsdPublishConfig.aidl
@@ -68,4 +68,11 @@
* Type of the publish transmission (ex. unicast, multicast).
*/
UsdPublishTransmissionType transmissionType;
+
+ /**
+ * Whether to enable publish replied events. If disabled, then
+ * |ISupplicantStaIfaceCallback.onUsdPublishReplied| will not be
+ * called for this session.
+ */
+ boolean eventsEnabled;
}