Merge "nfc(vts): Move NFC codebase to packages/modules/Nfc" 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/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/audio/aidl/default/LeAudioOffloadAudioProvider.cpp b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
index 18fc4b2..3f1f5f6 100644
--- a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
+++ b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
@@ -489,11 +489,11 @@
std::vector<AseDirectionConfiguration> getValidConfigurationsFromAllocation(
int req_allocation_bitmask,
std::vector<AseDirectionConfiguration>& valid_direction_configurations,
- bool is_exact) {
+ bool isExact) {
// Prefer the same allocation_bitmask
int channel_count = getCountFromBitmask(req_allocation_bitmask);
- if (is_exact) {
+ if (isExact) {
for (auto& cfg : valid_direction_configurations) {
int cfg_bitmask =
getLeAudioAseConfigurationAllocationBitmask(cfg.aseConfiguration);
@@ -747,12 +747,19 @@
std::vector<IBluetoothAudioProvider::LeAudioAseConfigurationSetting>&
matched_ase_configuration_settings,
const IBluetoothAudioProvider::LeAudioConfigurationRequirement& requirement,
- bool isMatchContext, bool isExact) {
+ bool isMatchContext, bool isExact, bool isMatchFlags) {
LOG(INFO) << __func__ << ": Trying to match for the requirement "
<< requirement.toString() << ", match context = " << isMatchContext
- << ", match exact = " << isExact;
+ << ", match exact = " << isExact
+ << ", match flags = " << isMatchFlags;
+ // Don't have to match with flag if requirements don't have flags.
+ auto requirement_flags_bitmask = 0;
+ if (isMatchFlags) {
+ if (!requirement.flags.has_value()) return std::nullopt;
+ requirement_flags_bitmask = requirement.flags.value().bitmask;
+ }
for (auto& setting : matched_ase_configuration_settings) {
- // Try to match context in metadata.
+ // Try to match context.
if (isMatchContext) {
if ((setting.audioContext.bitmask & requirement.audioContext.bitmask) !=
requirement.audioContext.bitmask)
@@ -761,6 +768,16 @@
<< getSettingOutputString(setting);
}
+ // Try to match configuration flags
+ if (isMatchFlags) {
+ if (!setting.flags.has_value()) continue;
+ if ((setting.flags.value().bitmask & requirement_flags_bitmask) !=
+ requirement_flags_bitmask)
+ continue;
+ LOG(DEBUG) << __func__ << ": Setting with matched flags: "
+ << getSettingOutputString(setting);
+ }
+
auto filtered_ase_configuration_setting =
getRequirementMatchedAseConfigurationSettings(setting, requirement,
isExact);
@@ -853,21 +870,25 @@
// If we cannot match, return an empty result.
// Matching priority list:
+ // Matched configuration flags, i.e. for asymmetric requirement.
// Preferred context - exact match with allocation
// Preferred context - loose match with allocation
// Any context - exact match with allocation
// Any context - loose match with allocation
bool found = false;
- for (bool match_context : {true, false}) {
- for (bool match_exact : {true, false}) {
- auto matched_setting =
- matchWithRequirement(matched_ase_configuration_settings,
- requirement, match_context, match_exact);
- if (matched_setting.has_value()) {
- result.push_back(matched_setting.value());
- found = true;
- break;
+ for (bool match_flag : {true, false}) {
+ for (bool match_context : {true, false}) {
+ for (bool match_exact : {true, false}) {
+ auto matched_setting = matchWithRequirement(
+ matched_ase_configuration_settings, requirement, match_context,
+ match_exact, match_flag);
+ if (matched_setting.has_value()) {
+ result.push_back(matched_setting.value());
+ found = true;
+ break;
+ }
}
+ if (found) break;
}
if (found) break;
}
@@ -881,7 +902,11 @@
}
}
- LOG(INFO) << __func__ << ": Found matches for all requirements!";
+ LOG(INFO) << __func__
+ << ": Found matches for all requirements, chosen settings:";
+ for (auto& setting : result) {
+ LOG(INFO) << __func__ << ": " << getSettingOutputString(setting);
+ }
*_aidl_return = result;
return ndk::ScopedAStatus::ok();
};
@@ -913,7 +938,13 @@
const IBluetoothAudioProvider::LeAudioAseQosConfigurationRequirement&
qosRequirement,
std::vector<LeAudioAseConfigurationSetting>& ase_configuration_settings,
- bool is_exact) {
+ bool isExact, bool isMatchFlags) {
+ auto requirement_flags_bitmask = 0;
+ if (isMatchFlags) {
+ if (!qosRequirement.flags.has_value()) return std::nullopt;
+ requirement_flags_bitmask = qosRequirement.flags.value().bitmask;
+ }
+
std::optional<AseQosDirectionRequirement> direction_qos_requirement =
std::nullopt;
@@ -929,9 +960,18 @@
if ((setting.audioContext.bitmask & qosRequirement.audioContext.bitmask) !=
qosRequirement.audioContext.bitmask)
continue;
+ LOG(DEBUG) << __func__ << ": Setting with matched context: "
+ << getSettingOutputString(setting);
// Match configuration flags
- // Currently configuration flags are not populated, ignore.
+ if (isMatchFlags) {
+ if (!setting.flags.has_value()) continue;
+ if ((setting.flags.value().bitmask & requirement_flags_bitmask) !=
+ requirement_flags_bitmask)
+ continue;
+ LOG(DEBUG) << __func__ << ": Setting with matched flags: "
+ << getSettingOutputString(setting);
+ }
// Get a list of all matched AseDirectionConfiguration
// for the input direction
@@ -980,7 +1020,7 @@
direction_qos_requirement.value().aseConfiguration);
// Get the best matching config based on channel allocation
auto req_valid_configs = getValidConfigurationsFromAllocation(
- qos_allocation_bitmask, temp, is_exact);
+ qos_allocation_bitmask, temp, isExact);
if (req_valid_configs.empty()) {
LOG(WARNING) << __func__
<< ": Cannot find matching allocation for bitmask "
@@ -1010,29 +1050,38 @@
if (in_qosRequirement.sinkAseQosRequirement.has_value()) {
if (!isValidQosRequirement(in_qosRequirement.sinkAseQosRequirement.value()))
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
- {
- // Try exact match first
- result.sinkQosConfiguration =
- getDirectionQosConfiguration(kLeAudioDirectionSink, in_qosRequirement,
- ase_configuration_settings, true);
- if (!result.sinkQosConfiguration.has_value()) {
- result.sinkQosConfiguration = getDirectionQosConfiguration(
+ bool found = false;
+ for (bool match_flag : {true, false}) {
+ for (bool match_exact : {true, false}) {
+ auto setting = getDirectionQosConfiguration(
kLeAudioDirectionSink, in_qosRequirement,
- ase_configuration_settings, false);
+ ase_configuration_settings, match_exact, match_flag);
+ if (setting.has_value()) {
+ found = true;
+ result.sinkQosConfiguration = setting;
+ break;
+ }
}
+ if (found) break;
}
}
if (in_qosRequirement.sourceAseQosRequirement.has_value()) {
if (!isValidQosRequirement(
in_qosRequirement.sourceAseQosRequirement.value()))
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
- result.sourceQosConfiguration =
- getDirectionQosConfiguration(kLeAudioDirectionSource, in_qosRequirement,
- ase_configuration_settings, true);
- if (!result.sourceQosConfiguration.has_value()) {
- result.sourceQosConfiguration = getDirectionQosConfiguration(
- kLeAudioDirectionSource, in_qosRequirement,
- ase_configuration_settings, false);
+ bool found = false;
+ for (bool match_flag : {true, false}) {
+ for (bool match_exact : {true, false}) {
+ auto setting = getDirectionQosConfiguration(
+ kLeAudioDirectionSource, in_qosRequirement,
+ ase_configuration_settings, match_exact, match_flag);
+ if (setting.has_value()) {
+ found = true;
+ result.sourceQosConfiguration = setting;
+ break;
+ }
+ }
+ if (found) break;
}
}
diff --git a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.h b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.h
index 3a82b73..8c4f543 100644
--- a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.h
+++ b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.h
@@ -164,7 +164,7 @@
const IBluetoothAudioProvider::LeAudioAseQosConfigurationRequirement&
qosRequirement,
std::vector<LeAudioAseConfigurationSetting>& ase_configuration_settings,
- bool is_exact);
+ bool isExact, bool isMatchedFlag);
bool isSubgroupConfigurationMatchedContext(
AudioContext requirement_context,
IBluetoothAudioProvider::BroadcastQuality quality,
@@ -175,7 +175,7 @@
matched_ase_configuration_settings,
const IBluetoothAudioProvider::LeAudioConfigurationRequirement&
requirements,
- bool isMatchContext, bool isExact);
+ bool isMatchContext, bool isExact, bool isMatchFlags);
};
class LeAudioOffloadOutputAudioProvider : public LeAudioOffloadAudioProvider {
diff --git a/bluetooth/audio/utils/Android.bp b/bluetooth/audio/utils/Android.bp
index d4968a8..6d1da63 100644
--- a/bluetooth/audio/utils/Android.bp
+++ b/bluetooth/audio/utils/Android.bp
@@ -90,15 +90,15 @@
cc_test {
name: "BluetoothLeAudioCodecsProviderTest",
- srcs: [
- "aidl_session/BluetoothLeAudioCodecsProvider.cpp",
- "aidl_session/BluetoothLeAudioCodecsProviderTest.cpp",
- ],
defaults: [
"latest_android_hardware_audio_common_ndk_static",
"latest_android_hardware_bluetooth_audio_ndk_static",
"latest_android_media_audio_common_types_ndk_static",
],
+ srcs: [
+ "aidl_session/BluetoothLeAudioCodecsProvider.cpp",
+ "aidl_session/BluetoothLeAudioCodecsProviderTest.cpp",
+ ],
header_libs: [
"libxsdc-utils",
],
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp
index 07e4997..5909c92 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp
@@ -47,6 +47,8 @@
#include <aidl/android/hardware/bluetooth/audio/Phy.h>
#include <android-base/logging.h>
+#include <optional>
+
#include "flatbuffers/idl.h"
#include "flatbuffers/util.h"
@@ -561,6 +563,17 @@
if (ase_cnt == 2) directionAseConfiguration.push_back(config);
}
+// Comparing if 2 AseDirectionConfiguration is equal.
+// Configuration are copied in, so we can remove some fields for comparison
+// without affecting the result.
+bool isAseConfigurationEqual(AseDirectionConfiguration cfg_a,
+ AseDirectionConfiguration cfg_b) {
+ // Remove unneeded fields when comparing.
+ cfg_a.aseConfiguration.metadata = std::nullopt;
+ cfg_b.aseConfiguration.metadata = std::nullopt;
+ return cfg_a == cfg_b;
+}
+
void AudioSetConfigurationProviderJson::PopulateAseConfigurationFromFlat(
const le_audio::AudioSetConfiguration* flat_cfg,
std::vector<const le_audio::CodecConfiguration*>* codec_cfgs,
@@ -569,7 +582,7 @@
std::vector<std::optional<AseDirectionConfiguration>>&
sourceAseConfiguration,
std::vector<std::optional<AseDirectionConfiguration>>& sinkAseConfiguration,
- ConfigurationFlags& /*configurationFlags*/) {
+ ConfigurationFlags& configurationFlags) {
if (flat_cfg == nullptr) {
LOG(ERROR) << "flat_cfg cannot be null";
return;
@@ -636,17 +649,41 @@
sourceAseConfiguration, location);
}
}
- } else {
- if (codec_cfg == nullptr) {
- LOG(ERROR) << "No codec config matching key " << codec_config_key.c_str()
- << " found";
+
+ // After putting all subconfig, check if it's an asymmetric configuration
+ // and populate information for ConfigurationFlags
+ if (!sinkAseConfiguration.empty() && !sourceAseConfiguration.empty()) {
+ if (sinkAseConfiguration.size() == sourceAseConfiguration.size()) {
+ for (int i = 0; i < sinkAseConfiguration.size(); ++i) {
+ if (sinkAseConfiguration[i].has_value() !=
+ sourceAseConfiguration[i].has_value()) {
+ // Different configuration: one is not empty and other is.
+ configurationFlags.bitmask |=
+ ConfigurationFlags::ALLOW_ASYMMETRIC_CONFIGURATIONS;
+ } else if (sinkAseConfiguration[i].has_value()) {
+ // Both is not empty, comparing inner fields:
+ if (!isAseConfigurationEqual(sinkAseConfiguration[i].value(),
+ sourceAseConfiguration[i].value())) {
+ configurationFlags.bitmask |=
+ ConfigurationFlags::ALLOW_ASYMMETRIC_CONFIGURATIONS;
+ }
+ }
+ }
+ } else {
+ // Different number of ASE, is a different configuration.
+ configurationFlags.bitmask |=
+ ConfigurationFlags::ALLOW_ASYMMETRIC_CONFIGURATIONS;
+ }
} else {
- LOG(ERROR) << "Configuration '" << flat_cfg->name()->c_str()
- << "' has no valid subconfigurations.";
+ if (codec_cfg == nullptr) {
+ LOG(ERROR) << "No codec config matching key "
+ << codec_config_key.c_str() << " found";
+ } else {
+ LOG(ERROR) << "Configuration '" << flat_cfg->name()->c_str()
+ << "' has no valid subconfigurations.";
+ }
}
}
-
- // TODO: Populate information for ConfigurationFlags
}
bool AudioSetConfigurationProviderJson::LoadConfigurationsFromFiles(
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp
index 59c43a4..a96df52 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp
@@ -14,10 +14,13 @@
* limitations under the License.
*/
+#include <optional>
#include <set>
#include "aidl/android/hardware/bluetooth/audio/ChannelMode.h"
#include "aidl/android/hardware/bluetooth/audio/CodecId.h"
+#include "aidl/android/hardware/bluetooth/audio/CodecInfo.h"
+#include "aidl/android/hardware/bluetooth/audio/ConfigurationFlags.h"
#include "aidl_android_hardware_bluetooth_audio_setting_enums.h"
#define LOG_TAG "BTAudioCodecsProviderAidl"
@@ -52,6 +55,26 @@
return le_audio_offload_setting;
}
+void add_flag(CodecInfo& codec_info, int32_t bitmask) {
+ auto& transport =
+ codec_info.transport.get<CodecInfo::Transport::Tag::leAudio>();
+ if (!transport.flags.has_value()) transport.flags = ConfigurationFlags();
+ transport.flags->bitmask |= bitmask;
+}
+
+// Compare 2 codec info to see if they are equal.
+// Currently only compare bitdepth, frameDurationUs and samplingFrequencyHz
+bool is_equal(CodecInfo& codec_info_a, CodecInfo& codec_info_b) {
+ auto& transport_a =
+ codec_info_a.transport.get<CodecInfo::Transport::Tag::leAudio>();
+ auto& transport_b =
+ codec_info_b.transport.get<CodecInfo::Transport::Tag::leAudio>();
+ return codec_info_a.name == codec_info_b.name &&
+ transport_a.bitdepth == transport_b.bitdepth &&
+ transport_a.frameDurationUs == transport_b.frameDurationUs &&
+ transport_a.samplingFrequencyHz == transport_b.samplingFrequencyHz;
+}
+
std::unordered_map<SessionType, std::vector<CodecInfo>>
BluetoothLeAudioCodecsProvider::GetLeAudioCodecInfo(
const std::optional<setting::LeAudioOffloadSetting>&
@@ -111,6 +134,9 @@
codec_info.transport =
CodecInfo::Transport::make<CodecInfo::Transport::Tag::leAudio>();
+ // Add low latency support by default
+ add_flag(codec_info, ConfigurationFlags::LOW_LATENCY);
+
// Mapping codec configuration information
auto& transport =
codec_info.transport.get<CodecInfo::Transport::Tag::leAudio>();
@@ -152,6 +178,25 @@
}
}
+ // Goes through a list of scenarios and detect asymmetrical config using
+ // codecConfiguration name.
+ for (auto& s : supported_scenarios_) {
+ if (s.hasEncode() && s.hasDecode() &&
+ config_codec_info_map_.count(s.getEncode()) &&
+ config_codec_info_map_.count(s.getDecode())) {
+ // Check if it's actually using the different codec
+ auto& encode_codec_info = config_codec_info_map_[s.getEncode()];
+ auto& decode_codec_info = config_codec_info_map_[s.getDecode()];
+ if (!is_equal(encode_codec_info, decode_codec_info)) {
+ // Change both x and y to become asymmetrical
+ add_flag(encode_codec_info,
+ ConfigurationFlags::ALLOW_ASYMMETRIC_CONFIGURATIONS);
+ add_flag(decode_codec_info,
+ ConfigurationFlags::ALLOW_ASYMMETRIC_CONFIGURATIONS);
+ }
+ }
+ }
+
// Goes through every scenario, deduplicate configuration, skip the invalid
// config references (e.g. the "invalid" entries in the xml file).
std::set<std::string> encoding_config, decoding_config, broadcast_config;
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProviderTest.cpp b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProviderTest.cpp
index c47f7d5..6338e11 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProviderTest.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProviderTest.cpp
@@ -20,10 +20,16 @@
#include <tuple>
#include "BluetoothLeAudioCodecsProvider.h"
+#include "aidl/android/hardware/bluetooth/audio/CodecInfo.h"
+#include "aidl/android/hardware/bluetooth/audio/ConfigurationFlags.h"
+#include "aidl/android/hardware/bluetooth/audio/SessionType.h"
using aidl::android::hardware::bluetooth::audio::BluetoothLeAudioCodecsProvider;
+using aidl::android::hardware::bluetooth::audio::CodecInfo;
+using aidl::android::hardware::bluetooth::audio::ConfigurationFlags;
using aidl::android::hardware::bluetooth::audio::
LeAudioCodecCapabilitiesSetting;
+using aidl::android::hardware::bluetooth::audio::SessionType;
using aidl::android::hardware::bluetooth::audio::setting::AudioLocation;
using aidl::android::hardware::bluetooth::audio::setting::CodecConfiguration;
using aidl::android::hardware::bluetooth::audio::setting::
@@ -51,15 +57,30 @@
static const Scenario kValidBroadcastScenario(
std::nullopt, std::nullopt, std::make_optional("BcastStereo_16_2"));
+static const Scenario kValidAsymmetricScenario(
+ std::make_optional("OneChanStereo_32_1"),
+ std::make_optional("OneChanStereo_16_1"), std::nullopt);
+
// Configuration
static const Configuration kValidConfigOneChanStereo_16_1(
std::make_optional("OneChanStereo_16_1"), std::make_optional("LC3_16k_1"),
std::make_optional("STEREO_ONE_CIS_PER_DEVICE"));
+
+static const Configuration kValidConfigOneChanStereo_32_1(
+ std::make_optional("OneChanStereo_32_1"), std::make_optional("LC3_32k_1"),
+ std::make_optional("STEREO_ONE_CIS_PER_DEVICE"));
+
// CodecConfiguration
static const CodecConfiguration kValidCodecLC3_16k_1(
std::make_optional("LC3_16k_1"), std::make_optional(CodecType::LC3),
std::nullopt, std::make_optional(16000), std::make_optional(7500),
std::make_optional(30), std::nullopt);
+
+static const CodecConfiguration kValidCodecLC3_32k_1(
+ std::make_optional("LC3_32k_1"), std::make_optional(CodecType::LC3),
+ std::nullopt, std::make_optional(32000), std::make_optional(7500),
+ std::make_optional(30), std::nullopt);
+
// StrategyConfiguration
static const StrategyConfiguration kValidStrategyStereoOneCis(
std::make_optional("STEREO_ONE_CIS_PER_DEVICE"),
@@ -181,6 +202,17 @@
kValidStrategyStereoOneCisBoth, kValidStrategyStereoTwoCisBoth,
kValidStrategyMonoOneCisBoth, kValidStrategyBroadcastStereoBoth})};
+// Define some valid asymmetric scenario list
+static const std::vector<ScenarioList> kValidAsymmetricScenarioList = {
+ ScenarioList(std::vector<Scenario>{kValidAsymmetricScenario})};
+static const std::vector<ConfigurationList> kValidAsymmetricConfigurationList =
+ {ConfigurationList(std::vector<Configuration>{
+ kValidConfigOneChanStereo_16_1, kValidConfigOneChanStereo_32_1})};
+static const std::vector<CodecConfigurationList>
+ kValidAsymmetricCodecConfigurationList = {
+ CodecConfigurationList(std::vector<CodecConfiguration>{
+ kValidCodecLC3_16k_1, kValidCodecLC3_32k_1})};
+
class BluetoothLeAudioCodecsProviderTest
: public ::testing::TestWithParam<OffloadSetting> {
public:
@@ -227,6 +259,19 @@
return le_audio_codec_capabilities;
}
+ std::unordered_map<SessionType, std::vector<CodecInfo>>
+ RunCodecInfoTestCase() {
+ auto& [scenario_lists, configuration_lists, codec_configuration_lists,
+ strategy_configuration_lists] = GetParam();
+ LeAudioOffloadSetting le_audio_offload_setting(
+ scenario_lists, configuration_lists, codec_configuration_lists,
+ strategy_configuration_lists);
+ auto le_audio_codec_capabilities =
+ BluetoothLeAudioCodecsProvider::GetLeAudioCodecInfo(
+ std::make_optional(le_audio_offload_setting));
+ return le_audio_codec_capabilities;
+ }
+
private:
static inline OffloadSetting CreateTestCase(
const ScenarioList& scenario_list,
@@ -392,6 +437,39 @@
ASSERT_TRUE(!le_audio_codec_capabilities.empty());
}
+class ComposeLeAudioAymmetricCodecInfoTest
+ : public BluetoothLeAudioCodecsProviderTest {
+ public:
+};
+
+TEST_P(ComposeLeAudioAymmetricCodecInfoTest, AsymmetricCodecInfoNotEmpty) {
+ Initialize();
+ auto le_audio_codec_info_map = RunCodecInfoTestCase();
+ ASSERT_TRUE(!le_audio_codec_info_map.empty());
+ // Check true asymmetric codec info
+ ASSERT_TRUE(!le_audio_codec_info_map
+ [SessionType::LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH]
+ .empty());
+ ASSERT_TRUE(!le_audio_codec_info_map
+ [SessionType::LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH]
+ .empty());
+ auto required_flag = ConfigurationFlags();
+ required_flag.bitmask |= ConfigurationFlags::ALLOW_ASYMMETRIC_CONFIGURATIONS;
+
+ auto codec_info = le_audio_codec_info_map
+ [SessionType::LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH][0];
+ ASSERT_EQ(codec_info.transport.getTag(), CodecInfo::Transport::Tag::leAudio);
+ auto& transport =
+ codec_info.transport.get<CodecInfo::Transport::Tag::leAudio>();
+ ASSERT_EQ(transport.flags, std::make_optional(required_flag));
+
+ codec_info = le_audio_codec_info_map
+ [SessionType::LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH][0];
+ ASSERT_EQ(codec_info.transport.getTag(), CodecInfo::Transport::Tag::leAudio);
+ transport = codec_info.transport.get<CodecInfo::Transport::Tag::leAudio>();
+ ASSERT_EQ(transport.flags, std::make_optional(required_flag));
+}
+
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GetScenariosTest);
INSTANTIATE_TEST_SUITE_P(
BluetoothLeAudioCodecsProviderTest, GetScenariosTest,
@@ -434,6 +512,15 @@
kValidScenarioList, kValidConfigurationList,
kValidCodecConfigurationList, kValidStrategyConfigurationList)));
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(
+ ComposeLeAudioAymmetricCodecInfoTest);
+INSTANTIATE_TEST_SUITE_P(
+ BluetoothLeAudioCodecsProviderTest, ComposeLeAudioAymmetricCodecInfoTest,
+ ::testing::ValuesIn(BluetoothLeAudioCodecsProviderTest::CreateTestCases(
+ kValidAsymmetricScenarioList, kValidAsymmetricConfigurationList,
+ kValidAsymmetricCodecConfigurationList,
+ kValidStrategyConfigurationList)));
+
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
diff --git a/boot/aidl/vts/functional/VtsHalBootAidlTargetTest.cpp b/boot/aidl/vts/functional/VtsHalBootAidlTargetTest.cpp
index 93c8376..228e2af 100644
--- a/boot/aidl/vts/functional/VtsHalBootAidlTargetTest.cpp
+++ b/boot/aidl/vts/functional/VtsHalBootAidlTargetTest.cpp
@@ -84,20 +84,20 @@
for (int s = 0; s < 2; s++) {
const auto result = boot->setActiveBootSlot(s);
- ASSERT_TRUE(result.isOk());
+ ASSERT_TRUE(result.isOk()) << result;
}
{
// Restore original flags to avoid problems on reboot
auto result = boot->setActiveBootSlot(curSlot);
- ASSERT_TRUE(result.isOk());
+ ASSERT_TRUE(result.isOk()) << result;
if (!otherBootable) {
const auto result = boot->setSlotAsUnbootable(otherSlot);
- ASSERT_TRUE(result.isOk());
+ ASSERT_TRUE(result.isOk()) << result;
}
result = boot->markBootSuccessful();
- ASSERT_TRUE(result.isOk());
+ ASSERT_TRUE(result.isOk()) << result;
}
{
int slots = 0;
@@ -116,19 +116,19 @@
boot->isSlotBootable(otherSlot, &otherBootable);
{
auto result = boot->setSlotAsUnbootable(otherSlot);
- ASSERT_TRUE(result.isOk());
+ ASSERT_TRUE(result.isOk()) << result;
boot->isSlotBootable(otherSlot, &otherBootable);
ASSERT_FALSE(otherBootable);
// Restore original flags to avoid problems on reboot
if (otherBootable) {
result = boot->setActiveBootSlot(otherSlot);
- ASSERT_TRUE(result.isOk());
+ ASSERT_TRUE(result.isOk()) << result;
}
result = boot->setActiveBootSlot(curSlot);
- ASSERT_TRUE(result.isOk());
+ ASSERT_TRUE(result.isOk()) << result;
result = boot->markBootSuccessful();
- ASSERT_TRUE(result.isOk());
+ ASSERT_TRUE(result.isOk()) << result;
}
{
int32_t slots = 0;
@@ -143,7 +143,7 @@
for (int s = 0; s < 2; s++) {
bool bootable = false;
const auto res = boot->isSlotBootable(s, &bootable);
- ASSERT_TRUE(res.isOk()) << res.getMessage();
+ ASSERT_TRUE(res.isOk()) << res;
}
int32_t slots = 0;
boot->getNumberSlots(&slots);
@@ -184,7 +184,7 @@
{
const string emptySuffix = "";
const auto result = boot->getSuffix(numSlots, &suffixStr);
- ASSERT_TRUE(result.isOk());
+ ASSERT_TRUE(result.isOk()) << result;
ASSERT_EQ(suffixStr, emptySuffix);
}
}
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/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NasProtocolMessage.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NasProtocolMessage.aidl
index 4fbc802..870cee1 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NasProtocolMessage.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NasProtocolMessage.aidl
@@ -47,4 +47,6 @@
CM_REESTABLISHMENT_REQUEST = 9,
CM_SERVICE_REQUEST = 10,
IMSI_DETACH_INDICATION = 11,
+ THREAT_IDENTIFIER_FALSE = 12,
+ THREAT_IDENTIFIER_TRUE = 13,
}
diff --git a/radio/aidl/android/hardware/radio/network/NasProtocolMessage.aidl b/radio/aidl/android/hardware/radio/network/NasProtocolMessage.aidl
index 5a23661..f96a884 100644
--- a/radio/aidl/android/hardware/radio/network/NasProtocolMessage.aidl
+++ b/radio/aidl/android/hardware/radio/network/NasProtocolMessage.aidl
@@ -21,6 +21,9 @@
* generation is noted for each message type. Sample spec references are provided, but generally
* only reference one network generation's spec.
*
+ * The exceptions to this rule are THREAT_IDENTIFIER_FALSE and THREAT_IDENTIIFER_TRUE, which are
+ * included to accommodate threat ranking of disclosures based on modem logic.
+ *
* @hide
*/
@VintfStability
@@ -64,5 +67,11 @@
CM_SERVICE_REQUEST = 10,
// Reference: 3GPP TS 24.008 9.2.14
// Applies to 2g and 3g networks. Used for circuit-switched detach.
- IMSI_DETACH_INDICATION = 11
+ IMSI_DETACH_INDICATION = 11,
+ // Vendor-specific enumeration to identify a disclosure as potentially benign.
+ // Enables vendors to semantically define disclosures based on their own classification logic.
+ THREAT_IDENTIFIER_FALSE = 12,
+ // Vendor-specific enumeration to identify a disclosure as potentially harmful.
+ // Enables vendors to semantically define disclosures based on their own classification logic.
+ THREAT_IDENTIFIER_TRUE = 13
}
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 7ff333b..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
@@ -43,5 +43,8 @@
MOVIE,
MUSIC,
NEWS,
+ STADIUM,
+ STANDARD,
+ USER,
}
}
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 27b587d..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
@@ -114,4 +114,5 @@
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 a15c0b1..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
@@ -51,4 +51,5 @@
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/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 8b8d336..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,
}
/**
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 a4d5592..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;
/**
@@ -440,4 +441,11 @@
* 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 6feb7c0..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.
@@ -97,4 +98,11 @@
* 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/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;
}