Merge "hwcrypto: Addressing ANAPIC review comments" 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 e57c108..3814fe6 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 108a6a3..cfe0a6e 100644
--- a/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
+++ b/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
@@ -463,7 +463,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/bluetooth/OWNERS b/bluetooth/OWNERS
index f401b8c..df250c8 100644
--- a/bluetooth/OWNERS
+++ b/bluetooth/OWNERS
@@ -1,5 +1,5 @@
# Bug component: 27441
+asoulier@google.com
henrichataing@google.com
-mylesgw@google.com
siyuanh@google.com
diff --git a/bluetooth/aidl/Android.bp b/bluetooth/aidl/Android.bp
index c6a592f..721be73 100644
--- a/bluetooth/aidl/Android.bp
+++ b/bluetooth/aidl/Android.bp
@@ -23,6 +23,9 @@
// translate code.
enabled: true,
},
+ rust: {
+ enabled: true,
+ },
java: {
sdk_version: "module_current",
},
diff --git a/bluetooth/audio/aidl/Android.bp b/bluetooth/audio/aidl/Android.bp
index ae55fa9..dbff368 100644
--- a/bluetooth/audio/aidl/Android.bp
+++ b/bluetooth/audio/aidl/Android.bp
@@ -38,6 +38,9 @@
cpp: {
enabled: false,
},
+ rust: {
+ enabled: true,
+ },
java: {
sdk_version: "module_current",
enabled: false,
@@ -86,7 +89,6 @@
],
frozen: false,
-
}
// Note: This should always be one version ahead of the last frozen version
diff --git a/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/default/Android.bp b/boot/aidl/default/Android.bp
index c1d3c57..2fd2dad 100644
--- a/boot/aidl/default/Android.bp
+++ b/boot/aidl/default/Android.bp
@@ -57,7 +57,7 @@
name: "android.hardware.boot-service.default_recovery",
defaults: ["android.hardware.boot-service_common"],
init_rc: ["android.hardware.boot-service.default_recovery.rc"],
- vintf_fragments: ["android.hardware.boot-service.default.xml"],
+ vintf_fragment_modules: ["android.hardware.boot-service.default.xml.recovery"],
recovery: true,
shared_libs: [
@@ -77,11 +77,16 @@
installable: false,
}
-prebuilt_etc {
+vintf_fragment {
+ name: "android.hardware.boot-service.default.xml.recovery",
+ src: "android.hardware.boot-service.default.xml",
+ recovery: true,
+}
+
+vintf_fragment {
name: "android.hardware.boot-service.default.xml",
src: "android.hardware.boot-service.default.xml",
- sub_dir: "vintf",
- installable: false,
+ vendor: true,
}
apex {
@@ -98,6 +103,8 @@
],
prebuilts: [
"android.hardware.boot-service.default.rc",
+ ],
+ vintf_fragment_modules: [
"android.hardware.boot-service.default.xml",
],
}
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/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp b/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp
index 5de5f1c..cfd3173 100644
--- a/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp
+++ b/graphics/mapper/stable-c/vts/VtsHalGraphicsMapperStableC_TargetTest.cpp
@@ -753,7 +753,7 @@
* Test IMapper::lock and IMapper::unlock with no CPU usage requested.
*/
TEST_P(GraphicsMapperStableCTests, LockUnlockNoCPUUsage) {
- constexpr auto usage = BufferUsage::CPU_READ_NEVER | BufferUsage::CPU_WRITE_NEVER;
+ constexpr auto usage = BufferUsage::CPU_READ_RARELY | BufferUsage::CPU_WRITE_NEVER;
auto buffer = allocate({
.name = {"VTS_TEMP"},
.width = 64,
@@ -771,15 +771,12 @@
auto handle = buffer->import();
uint8_t* data = nullptr;
- EXPECT_EQ(AIMAPPER_ERROR_BAD_VALUE,
- mapper()->v5.lock(*handle, static_cast<int64_t>(info.usage),
- region, -1,(void**)&data))
- << "Locking with 0 access succeeded";
+ EXPECT_EQ(AIMAPPER_ERROR_BAD_VALUE, mapper()->v5.lock(*handle, 0, region, -1, (void**)&data))
+ << "Locking with 0 access succeeded";
int releaseFence = -1;
- EXPECT_EQ(AIMAPPER_ERROR_BAD_BUFFER,
- mapper()->v5.unlock(*handle, &releaseFence))
- << "Unlocking not locked buffer succeeded";
+ EXPECT_EQ(AIMAPPER_ERROR_BAD_BUFFER, mapper()->v5.unlock(*handle, &releaseFence))
+ << "Unlocking not locked buffer succeeded";
if (releaseFence != -1) {
close(releaseFence);
}
diff --git a/nfc/aidl/vts/functional/Android.bp b/nfc/aidl/vts/functional/Android.bp
index f97405e..8852f6c 100644
--- a/nfc/aidl/vts/functional/Android.bp
+++ b/nfc/aidl/vts/functional/Android.bp
@@ -58,12 +58,12 @@
"CondVar.cpp",
],
include_dirs: [
- "system/nfc/src/gki/common",
- "system/nfc/src/gki/ulinux",
- "system/nfc/src/include",
- "system/nfc/src/nfa/include",
- "system/nfc/src/nfc/include",
- "system/nfc/utils/include",
+ "packages/modules/Nfc/libnfc-nci/src/gki/common",
+ "packages/modules/Nfc/libnfc-nci/src/gki/ulinux",
+ "packages/modules/Nfc/libnfc-nci/src/include",
+ "packages/modules/Nfc/libnfc-nci/src/nfa/include",
+ "packages/modules/Nfc/libnfc-nci/src/nfc/include",
+ "packages/modules/Nfc/libnfc-nci/utils/include",
],
shared_libs: [
"liblog",
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
index 9f530b3..f909676 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
@@ -239,18 +239,13 @@
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
- if (getRadioHalCapabilities()) {
- ASSERT_TRUE(CheckAnyOfErrors(
- radioRsp_v1_6->rspInfo.error,
- {::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED}));
- } else {
- ASSERT_TRUE(
- CheckAnyOfErrors(radioRsp_v1_6->rspInfo.error,
- {::android::hardware::radio::V1_6::RadioError::NONE,
- ::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE,
- ::android::hardware::radio::V1_6::RadioError::INTERNAL_ERR,
- ::android::hardware::radio::V1_6::RadioError::MODEM_ERR}));
- }
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioRsp_v1_6->rspInfo.error,
+ {::android::hardware::radio::V1_6::RadioError::NONE,
+ ::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED,
+ ::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE,
+ ::android::hardware::radio::V1_6::RadioError::INTERNAL_ERR,
+ ::android::hardware::radio::V1_6::RadioError::MODEM_ERR}));
}
/*
diff --git a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/IKeyMintDevice.aidl b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/IKeyMintDevice.aidl
index 2945dab..e6d2fdf 100644
--- a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/IKeyMintDevice.aidl
+++ b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/IKeyMintDevice.aidl
@@ -45,6 +45,9 @@
void deleteAllKeys();
void destroyAttestationIds();
android.hardware.security.keymint.BeginResult begin(in android.hardware.security.keymint.KeyPurpose purpose, in byte[] keyBlob, in android.hardware.security.keymint.KeyParameter[] params, in @nullable android.hardware.security.keymint.HardwareAuthToken authToken);
+ /**
+ * @deprecated Method has never been used due to design limitations
+ */
void deviceLocked(in boolean passwordOnly, in @nullable android.hardware.security.secureclock.TimeStampToken timestampToken);
void earlyBootEnded();
byte[] convertStorageKeyToEphemeral(in byte[] storageKeyBlob);
diff --git a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
index b57dd8a..cafec70 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
@@ -826,6 +826,7 @@
*
* @param passwordOnly N/A due to the deprecation
* @param timestampToken N/A due to the deprecation
+ * @deprecated Method has never been used due to design limitations
*/
void deviceLocked(in boolean passwordOnly, in @nullable TimeStampToken timestampToken);
@@ -964,10 +965,11 @@
* IKeyMintDevice must ignore KeyParameters with tags not included in the following list:
*
* o Tag::MODULE_HASH: holds a hash that must be included in attestations in the moduleHash
- * field of the software enforced authorization list. If Tag::MODULE_HASH is included in more
- * than one setAdditionalAttestationInfo call, the implementation should compare the initial
- * KeyParamValue with the more recent one. If they differ, the implementation should fail with
- * ErrorCode::MODULE_HASH_ALREADY_SET. If they are the same, no action needs to be taken.
+ * field of the software enforced authorization list.
+ *
+ * @return error ErrorCode::MODULE_HASH_ALREADY_SET if this is not the first time
+ * setAdditionalAttestationInfo is called with Tag::MODULE_HASH, and the associated
+ * KeyParamValue of the current call doesn't match the KeyParamValue of the first call.
*/
void setAdditionalAttestationInfo(in KeyParameter[] info);
}
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> {