Merge "Created OWNERS file for aidl_property and added tylertrephan@google.com"
diff --git a/audio/aidl/common/include/Utils.h b/audio/aidl/common/include/Utils.h
index 2aaa781..d87bbd4 100644
--- a/audio/aidl/common/include/Utils.h
+++ b/audio/aidl/common/include/Utils.h
@@ -104,6 +104,30 @@
device == ::aidl::android::media::audio::common::AudioDeviceType::OUT_TELEPHONY_TX;
}
+constexpr bool isUsbInputDeviceType(::aidl::android::media::audio::common::AudioDeviceType type) {
+ switch (type) {
+ case ::aidl::android::media::audio::common::AudioDeviceType::IN_DOCK:
+ case ::aidl::android::media::audio::common::AudioDeviceType::IN_ACCESSORY:
+ case ::aidl::android::media::audio::common::AudioDeviceType::IN_DEVICE:
+ case ::aidl::android::media::audio::common::AudioDeviceType::IN_HEADSET:
+ return true;
+ default:
+ return false;
+ }
+}
+
+constexpr bool isUsbOutputtDeviceType(::aidl::android::media::audio::common::AudioDeviceType type) {
+ switch (type) {
+ case ::aidl::android::media::audio::common::AudioDeviceType::OUT_DOCK:
+ case ::aidl::android::media::audio::common::AudioDeviceType::OUT_ACCESSORY:
+ case ::aidl::android::media::audio::common::AudioDeviceType::OUT_DEVICE:
+ case ::aidl::android::media::audio::common::AudioDeviceType::OUT_HEADSET:
+ return true;
+ default:
+ return false;
+ }
+}
+
constexpr bool isValidAudioMode(::aidl::android::media::audio::common::AudioMode mode) {
return std::find(kValidAudioModes.begin(), kValidAudioModes.end(), mode) !=
kValidAudioModes.end();
diff --git a/audio/aidl/default/Android.bp b/audio/aidl/default/Android.bp
index 856f83f..21616be 100644
--- a/audio/aidl/default/Android.bp
+++ b/audio/aidl/default/Android.bp
@@ -11,12 +11,14 @@
name: "aidlaudioservice_defaults",
vendor: true,
shared_libs: [
+ "libalsautilsv2",
"libaudioaidlcommon",
"libbase",
"libbinder_ndk",
"libcutils",
"libfmq",
"libstagefright_foundation",
+ "libtinyalsav2",
"libutils",
"libxml2",
"android.hardware.common-V2-ndk",
@@ -71,6 +73,9 @@
"Stream.cpp",
"StreamStub.cpp",
"Telephony.cpp",
+ "usb/ModuleUsb.cpp",
+ "usb/StreamUsb.cpp",
+ "usb/UsbAlsaUtils.cpp",
],
generated_sources: [
"audio_policy_configuration_aidl_default",
diff --git a/audio/aidl/default/Module.cpp b/audio/aidl/default/Module.cpp
index 905ff2c..2f6ab2f 100644
--- a/audio/aidl/default/Module.cpp
+++ b/audio/aidl/default/Module.cpp
@@ -27,8 +27,10 @@
#include "core-impl/Bluetooth.h"
#include "core-impl/Module.h"
+#include "core-impl/ModuleUsb.h"
#include "core-impl/SoundDose.h"
#include "core-impl/StreamStub.h"
+#include "core-impl/StreamUsb.h"
#include "core-impl/Telephony.h"
#include "core-impl/utils.h"
@@ -104,6 +106,42 @@
} // namespace
+// static
+std::shared_ptr<Module> Module::createInstance(Type type) {
+ switch (type) {
+ case Module::Type::USB:
+ return ndk::SharedRefBase::make<ModuleUsb>(type);
+ case Type::DEFAULT:
+ case Type::R_SUBMIX:
+ default:
+ return ndk::SharedRefBase::make<Module>(type);
+ }
+}
+
+// static
+StreamIn::CreateInstance Module::getStreamInCreator(Type type) {
+ switch (type) {
+ case Type::USB:
+ return StreamInUsb::createInstance;
+ case Type::DEFAULT:
+ case Type::R_SUBMIX:
+ default:
+ return StreamInStub::createInstance;
+ }
+}
+
+// static
+StreamOut::CreateInstance Module::getStreamOutCreator(Type type) {
+ switch (type) {
+ case Type::USB:
+ return StreamOutUsb::createInstance;
+ case Type::DEFAULT:
+ case Type::R_SUBMIX:
+ default:
+ return StreamOutStub::createInstance;
+ }
+}
+
void Module::cleanUpPatch(int32_t patchId) {
erase_all_values(mPatches, std::set<int32_t>{patchId});
}
@@ -153,6 +191,7 @@
std::make_unique<StreamContext::CommandMQ>(1, true /*configureEventFlagWord*/),
std::make_unique<StreamContext::ReplyMQ>(1, true /*configureEventFlagWord*/),
portConfigIt->format.value(), portConfigIt->channelMask.value(),
+ portConfigIt->sampleRate.value().value,
std::make_unique<StreamContext::DataMQ>(frameSize * in_bufferSizeFrames),
asyncCallback, outEventCallback, params);
if (temp.isValid()) {
@@ -261,6 +300,7 @@
break;
case Type::USB:
mConfig = std::move(internal::getUsbConfiguration());
+ break;
}
}
return *mConfig;
@@ -401,6 +441,8 @@
if (!mDebug.simulateDeviceConnections) {
// In a real HAL here we would attempt querying the profiles from the device.
LOG(ERROR) << __func__ << ": failed to query supported device profiles";
+ // TODO: Check the return value when it is ready for actual devices.
+ populateConnectedDevicePort(&connectedPort);
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
}
@@ -560,10 +602,9 @@
}
context.fillDescriptor(&_aidl_return->desc);
std::shared_ptr<StreamIn> stream;
- // TODO: Add a mapping from module instance names to a corresponding 'createInstance'.
- if (auto status = StreamInStub::createInstance(in_args.sinkMetadata, std::move(context),
- mConfig->microphones, &stream);
- !status.isOk()) {
+ ndk::ScopedAStatus status = getStreamInCreator(mType)(in_args.sinkMetadata, std::move(context),
+ mConfig->microphones, &stream);
+ if (!status.isOk()) {
return status;
}
StreamWrapper streamWrapper(stream);
@@ -615,10 +656,9 @@
}
context.fillDescriptor(&_aidl_return->desc);
std::shared_ptr<StreamOut> stream;
- // TODO: Add a mapping from module instance names to a corresponding 'createInstance'.
- if (auto status = StreamOutStub::createInstance(in_args.sourceMetadata, std::move(context),
- in_args.offloadInfo, &stream);
- !status.isOk()) {
+ ndk::ScopedAStatus status = getStreamOutCreator(mType)(
+ in_args.sourceMetadata, std::move(context), in_args.offloadInfo, &stream);
+ if (!status.isOk()) {
return status;
}
StreamWrapper streamWrapper(stream);
@@ -696,6 +736,10 @@
}
}
+ if (auto status = checkAudioPatchEndpointsMatch(sources, sinks); !status.isOk()) {
+ return status;
+ }
+
auto& patches = getConfig().patches;
auto existing = patches.end();
std::optional<decltype(mPatches)> patchesBackup;
@@ -1190,4 +1234,16 @@
return mIsMmapSupported.value();
}
+ndk::ScopedAStatus Module::populateConnectedDevicePort(AudioPort* audioPort __unused) {
+ LOG(DEBUG) << __func__ << ": do nothing and return ok";
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Module::checkAudioPatchEndpointsMatch(
+ const std::vector<AudioPortConfig*>& sources __unused,
+ const std::vector<AudioPortConfig*>& sinks __unused) {
+ LOG(DEBUG) << __func__ << ": do nothing and return ok";
+ return ndk::ScopedAStatus::ok();
+}
+
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/Stream.cpp b/audio/aidl/default/Stream.cpp
index 25814e4..d62ca1d 100644
--- a/audio/aidl/default/Stream.cpp
+++ b/audio/aidl/default/Stream.cpp
@@ -135,10 +135,16 @@
mState = StreamDescriptor::State::ERROR;
return Status::ABORT;
}
- LOG(DEBUG) << __func__ << ": received command " << command.toString() << " in " << kThreadName;
+ using Tag = StreamDescriptor::Command::Tag;
+ using LogSeverity = ::android::base::LogSeverity;
+ const LogSeverity severity =
+ command.getTag() == Tag::burst || command.getTag() == Tag::getStatus
+ ? LogSeverity::VERBOSE
+ : LogSeverity::DEBUG;
+ LOG(severity) << __func__ << ": received command " << command.toString() << " in "
+ << kThreadName;
StreamDescriptor::Reply reply{};
reply.status = STATUS_BAD_VALUE;
- using Tag = StreamDescriptor::Command::Tag;
switch (command.getTag()) {
case Tag::halReservedExit:
if (const int32_t cookie = command.get<Tag::halReservedExit>();
@@ -166,8 +172,8 @@
break;
case Tag::burst:
if (const int32_t fmqByteCount = command.get<Tag::burst>(); fmqByteCount >= 0) {
- LOG(DEBUG) << __func__ << ": '" << toString(command.getTag()) << "' command for "
- << fmqByteCount << " bytes";
+ LOG(VERBOSE) << __func__ << ": '" << toString(command.getTag()) << "' command for "
+ << fmqByteCount << " bytes";
if (mState == StreamDescriptor::State::IDLE ||
mState == StreamDescriptor::State::ACTIVE ||
mState == StreamDescriptor::State::PAUSED ||
@@ -253,7 +259,7 @@
break;
}
reply.state = mState;
- LOG(DEBUG) << __func__ << ": writing reply " << reply.toString();
+ LOG(severity) << __func__ << ": writing reply " << reply.toString();
if (!mReplyMQ->writeBlocking(&reply, 1)) {
LOG(ERROR) << __func__ << ": writing of reply " << reply.toString() << " to MQ failed";
mState = StreamDescriptor::State::ERROR;
@@ -284,8 +290,8 @@
if (bool success =
actualByteCount > 0 ? mDataMQ->write(&mDataBuffer[0], actualByteCount) : true;
success) {
- LOG(DEBUG) << __func__ << ": writing of " << actualByteCount << " bytes into data MQ"
- << " succeeded; connected? " << isConnected;
+ LOG(VERBOSE) << __func__ << ": writing of " << actualByteCount << " bytes into data MQ"
+ << " succeeded; connected? " << isConnected;
// Frames are provided and counted regardless of connection status.
reply->fmqByteCount += actualByteCount;
mFrameCount += actualFrameCount;
@@ -340,7 +346,14 @@
mState = StreamDescriptor::State::ERROR;
return Status::ABORT;
}
- LOG(DEBUG) << __func__ << ": received command " << command.toString() << " in " << kThreadName;
+ using Tag = StreamDescriptor::Command::Tag;
+ using LogSeverity = ::android::base::LogSeverity;
+ const LogSeverity severity =
+ command.getTag() == Tag::burst || command.getTag() == Tag::getStatus
+ ? LogSeverity::VERBOSE
+ : LogSeverity::DEBUG;
+ LOG(severity) << __func__ << ": received command " << command.toString() << " in "
+ << kThreadName;
StreamDescriptor::Reply reply{};
reply.status = STATUS_BAD_VALUE;
using Tag = StreamDescriptor::Command::Tag;
@@ -383,8 +396,8 @@
} break;
case Tag::burst:
if (const int32_t fmqByteCount = command.get<Tag::burst>(); fmqByteCount >= 0) {
- LOG(DEBUG) << __func__ << ": '" << toString(command.getTag()) << "' command for "
- << fmqByteCount << " bytes";
+ LOG(VERBOSE) << __func__ << ": '" << toString(command.getTag()) << "' command for "
+ << fmqByteCount << " bytes";
if (mState != StreamDescriptor::State::ERROR &&
mState != StreamDescriptor::State::TRANSFERRING &&
mState != StreamDescriptor::State::TRANSFER_PAUSED) {
@@ -499,7 +512,7 @@
break;
}
reply.state = mState;
- LOG(DEBUG) << __func__ << ": writing reply " << reply.toString();
+ LOG(severity) << __func__ << ": writing reply " << reply.toString();
if (!mReplyMQ->writeBlocking(&reply, 1)) {
LOG(ERROR) << __func__ << ": writing of reply " << reply.toString() << " to MQ failed";
mState = StreamDescriptor::State::ERROR;
@@ -514,8 +527,8 @@
int32_t latency = Module::kLatencyMs;
if (bool success = readByteCount > 0 ? mDataMQ->read(&mDataBuffer[0], readByteCount) : true) {
const bool isConnected = mIsConnected;
- LOG(DEBUG) << __func__ << ": reading of " << readByteCount << " bytes from data MQ"
- << " succeeded; connected? " << isConnected;
+ LOG(VERBOSE) << __func__ << ": reading of " << readByteCount << " bytes from data MQ"
+ << " succeeded; connected? " << isConnected;
// Amount of data that the HAL module is going to actually use.
size_t byteCount = std::min({clientSize, readByteCount, mDataBufferSize});
if (byteCount >= mFrameSize && mForceTransientBurst) {
diff --git a/audio/aidl/default/StreamStub.cpp b/audio/aidl/default/StreamStub.cpp
index 5442179..85d1e16 100644
--- a/audio/aidl/default/StreamStub.cpp
+++ b/audio/aidl/default/StreamStub.cpp
@@ -22,6 +22,7 @@
using aidl::android::hardware::audio::common::SinkMetadata;
using aidl::android::hardware::audio::common::SourceMetadata;
+using aidl::android::media::audio::common::AudioDevice;
using aidl::android::media::audio::common::AudioOffloadInfo;
namespace aidl::android::hardware::audio::core {
@@ -68,6 +69,11 @@
return ::android::OK;
}
+::android::status_t DriverStub::setConnectedDevices(
+ const std::vector<AudioDevice>& connectedDevices __unused) {
+ return ::android::OK;
+}
+
// static
ndk::ScopedAStatus StreamInStub::createInstance(const SinkMetadata& sinkMetadata,
StreamContext&& context,
diff --git a/audio/aidl/default/include/core-impl/Module.h b/audio/aidl/default/include/core-impl/Module.h
index 80a22dc..fab1c14 100644
--- a/audio/aidl/default/include/core-impl/Module.h
+++ b/audio/aidl/default/include/core-impl/Module.h
@@ -35,6 +35,10 @@
explicit Module(Type type) : mType(type) {}
+ static std::shared_ptr<Module> createInstance(Type type);
+ static StreamIn::CreateInstance getStreamInCreator(Type type);
+ static StreamOut::CreateInstance getStreamOutCreator(Type type);
+
private:
struct VendorDebug {
static const std::string kForceTransientBurstName;
@@ -163,6 +167,17 @@
std::shared_ptr<sounddose::ISoundDose> mSoundDose;
ndk::SpAIBinder mSoundDoseBinder;
std::optional<bool> mIsMmapSupported;
+
+ protected:
+ // If the module is unable to populate the connected device port correctly, the returned error
+ // code must correspond to the errors of `IModule.connectedExternalDevice` method.
+ virtual ndk::ScopedAStatus populateConnectedDevicePort(
+ ::aidl::android::media::audio::common::AudioPort* audioPort);
+ // If the module finds that the patch endpoints configurations are not matched, the returned
+ // error code must correspond to the errors of `IModule.setAudioPatch` method.
+ virtual ndk::ScopedAStatus checkAudioPatchEndpointsMatch(
+ const std::vector<::aidl::android::media::audio::common::AudioPortConfig*>& sources,
+ const std::vector<::aidl::android::media::audio::common::AudioPortConfig*>& sinks);
};
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/include/core-impl/ModuleUsb.h b/audio/aidl/default/include/core-impl/ModuleUsb.h
new file mode 100644
index 0000000..7b177e8
--- /dev/null
+++ b/audio/aidl/default/include/core-impl/ModuleUsb.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+
+#pragma once
+
+#include "core-impl/Module.h"
+
+namespace aidl::android::hardware::audio::core {
+
+class ModuleUsb : public Module {
+ public:
+ explicit ModuleUsb(Module::Type type) : Module(type) {}
+
+ private:
+ // IModule interfaces
+ ndk::ScopedAStatus getTelephony(std::shared_ptr<ITelephony>* _aidl_return) override;
+ ndk::ScopedAStatus getBluetooth(std::shared_ptr<IBluetooth>* _aidl_return) override;
+ ndk::ScopedAStatus getMasterMute(bool* _aidl_return) override;
+ ndk::ScopedAStatus setMasterMute(bool in_mute) override;
+ ndk::ScopedAStatus getMasterVolume(float* _aidl_return) override;
+ ndk::ScopedAStatus setMasterVolume(float in_volume) override;
+ ndk::ScopedAStatus getMicMute(bool* _aidl_return) override;
+ ndk::ScopedAStatus setMicMute(bool in_mute) override;
+
+ // Module interfaces
+ ndk::ScopedAStatus populateConnectedDevicePort(
+ ::aidl::android::media::audio::common::AudioPort* audioPort) override;
+ ndk::ScopedAStatus checkAudioPatchEndpointsMatch(
+ const std::vector<::aidl::android::media::audio::common::AudioPortConfig*>& sources,
+ const std::vector<::aidl::android::media::audio::common::AudioPortConfig*>& sinks)
+ override;
+};
+
+} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/include/core-impl/Stream.h b/audio/aidl/default/include/core-impl/Stream.h
index 7cd4259..f8c12e6 100644
--- a/audio/aidl/default/include/core-impl/Stream.h
+++ b/audio/aidl/default/include/core-impl/Stream.h
@@ -77,7 +77,8 @@
StreamContext(std::unique_ptr<CommandMQ> commandMQ, std::unique_ptr<ReplyMQ> replyMQ,
const ::aidl::android::media::audio::common::AudioFormatDescription& format,
const ::aidl::android::media::audio::common::AudioChannelLayout& channelLayout,
- std::unique_ptr<DataMQ> dataMQ, std::shared_ptr<IStreamCallback> asyncCallback,
+ int sampleRate, std::unique_ptr<DataMQ> dataMQ,
+ std::shared_ptr<IStreamCallback> asyncCallback,
std::shared_ptr<IStreamOutEventCallback> outEventCallback,
DebugParameters debugParameters)
: mCommandMQ(std::move(commandMQ)),
@@ -85,6 +86,7 @@
mReplyMQ(std::move(replyMQ)),
mFormat(format),
mChannelLayout(channelLayout),
+ mSampleRate(sampleRate),
mDataMQ(std::move(dataMQ)),
mAsyncCallback(asyncCallback),
mOutEventCallback(outEventCallback),
@@ -95,6 +97,7 @@
mReplyMQ(std::move(other.mReplyMQ)),
mFormat(other.mFormat),
mChannelLayout(other.mChannelLayout),
+ mSampleRate(other.mSampleRate),
mDataMQ(std::move(other.mDataMQ)),
mAsyncCallback(std::move(other.mAsyncCallback)),
mOutEventCallback(std::move(other.mOutEventCallback)),
@@ -105,6 +108,7 @@
mReplyMQ = std::move(other.mReplyMQ);
mFormat = std::move(other.mFormat);
mChannelLayout = std::move(other.mChannelLayout);
+ mSampleRate = other.mSampleRate;
mDataMQ = std::move(other.mDataMQ);
mAsyncCallback = std::move(other.mAsyncCallback);
mOutEventCallback = std::move(other.mOutEventCallback);
@@ -131,6 +135,7 @@
}
ReplyMQ* getReplyMQ() const { return mReplyMQ.get(); }
int getTransientStateDelayMs() const { return mDebugParameters.transientStateDelayMs; }
+ int getSampleRate() const { return mSampleRate; }
bool isValid() const;
void reset();
@@ -140,6 +145,7 @@
std::unique_ptr<ReplyMQ> mReplyMQ;
::aidl::android::media::audio::common::AudioFormatDescription mFormat;
::aidl::android::media::audio::common::AudioChannelLayout mChannelLayout;
+ int mSampleRate;
std::unique_ptr<DataMQ> mDataMQ;
std::shared_ptr<IStreamCallback> mAsyncCallback;
std::shared_ptr<IStreamOutEventCallback> mOutEventCallback; // Only used by output streams
@@ -151,6 +157,11 @@
virtual ~DriverInterface() = default;
// This function is called once, on the main thread, before starting the worker thread.
virtual ::android::status_t init() = 0;
+ // This function is called from Binder pool thread. It must be done in a thread-safe manner
+ // if this method and other methods in this interface share data.
+ virtual ::android::status_t setConnectedDevices(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>&
+ connectedDevices) = 0;
// All the functions below are called on the worker thread.
virtual ::android::status_t drain(StreamDescriptor::DrainMode mode) = 0;
virtual ::android::status_t flush() = 0;
@@ -370,6 +381,7 @@
const std::vector<::aidl::android::media::audio::common::AudioDevice>& devices) {
mWorker->setIsConnected(!devices.empty());
mConnectedDevices = devices;
+ mDriver->setConnectedDevices(devices);
}
ndk::ScopedAStatus updateMetadata(const Metadata& metadata);
diff --git a/audio/aidl/default/include/core-impl/StreamStub.h b/audio/aidl/default/include/core-impl/StreamStub.h
index 98a062a..aea9da5 100644
--- a/audio/aidl/default/include/core-impl/StreamStub.h
+++ b/audio/aidl/default/include/core-impl/StreamStub.h
@@ -24,6 +24,9 @@
public:
DriverStub(const StreamContext& context, bool isInput);
::android::status_t init() override;
+ ::android::status_t setConnectedDevices(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& connectedDevices)
+ override;
::android::status_t drain(StreamDescriptor::DrainMode) override;
::android::status_t flush() override;
::android::status_t pause() override;
diff --git a/audio/aidl/default/include/core-impl/StreamUsb.h b/audio/aidl/default/include/core-impl/StreamUsb.h
new file mode 100644
index 0000000..8ac1f34
--- /dev/null
+++ b/audio/aidl/default/include/core-impl/StreamUsb.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+
+#pragma once
+
+#include <mutex>
+
+#include <aidl/android/media/audio/common/AudioChannelLayout.h>
+
+#include "core-impl/Stream.h"
+
+extern "C" {
+#include <tinyalsa/pcm.h>
+#include "alsa_device_proxy.h"
+}
+
+namespace aidl::android::hardware::audio::core {
+
+class DriverUsb : public DriverInterface {
+ public:
+ DriverUsb(const StreamContext& context, bool isInput);
+ ::android::status_t init() override;
+ ::android::status_t setConnectedDevices(
+ const std::vector<::aidl::android::media::audio::common::AudioDevice>& connectedDevices)
+ override;
+ ::android::status_t drain(StreamDescriptor::DrainMode) override;
+ ::android::status_t flush() override;
+ ::android::status_t pause() override;
+ ::android::status_t transfer(void* buffer, size_t frameCount, size_t* actualFrameCount,
+ int32_t* latencyMs) override;
+ ::android::status_t standby() override;
+
+ private:
+ ::android::status_t exitStandby();
+
+ std::mutex mLock;
+
+ const size_t mFrameSizeBytes;
+ std::optional<struct pcm_config> mConfig;
+ const bool mIsInput;
+ // Cached device addresses for connected devices.
+ std::vector<::aidl::android::media::audio::common::AudioDeviceAddress> mConnectedDevices
+ GUARDED_BY(mLock);
+ std::vector<std::shared_ptr<alsa_device_proxy>> mAlsaDeviceProxies GUARDED_BY(mLock);
+ bool mIsStandby = false;
+};
+
+class StreamInUsb final : public StreamIn {
+ ndk::ScopedAStatus getActiveMicrophones(
+ std::vector<MicrophoneDynamicInfo>* _aidl_return) override;
+
+ public:
+ static ndk::ScopedAStatus createInstance(
+ const ::aidl::android::hardware::audio::common::SinkMetadata& sinkMetadata,
+ StreamContext&& context, const std::vector<MicrophoneInfo>& microphones,
+ std::shared_ptr<StreamIn>* result);
+
+ private:
+ friend class ndk::SharedRefBase;
+ StreamInUsb(const ::aidl::android::hardware::audio::common::SinkMetadata& sinkMetadata,
+ StreamContext&& context, const std::vector<MicrophoneInfo>& microphones);
+};
+
+class StreamOutUsb final : public StreamOut {
+ public:
+ static ndk::ScopedAStatus createInstance(
+ const ::aidl::android::hardware::audio::common::SourceMetadata& sourceMetadata,
+ StreamContext&& context,
+ const std::optional<::aidl::android::media::audio::common::AudioOffloadInfo>&
+ offloadInfo,
+ std::shared_ptr<StreamOut>* result);
+
+ private:
+ friend class ndk::SharedRefBase;
+ StreamOutUsb(const ::aidl::android::hardware::audio::common::SourceMetadata& sourceMetadata,
+ StreamContext&& context,
+ const std::optional<::aidl::android::media::audio::common::AudioOffloadInfo>&
+ offloadInfo);
+};
+
+} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/include/core-impl/utils.h b/audio/aidl/default/include/core-impl/utils.h
index 9d06f08..ae33227 100644
--- a/audio/aidl/default/include/core-impl/utils.h
+++ b/audio/aidl/default/include/core-impl/utils.h
@@ -17,6 +17,7 @@
#pragma once
#include <algorithm>
+#include <map>
#include <set>
#include <vector>
@@ -101,4 +102,21 @@
return result;
}
+// Assuming that M is a map whose keys' type is K and values' type is V,
+// return the corresponding value of the given key from the map or default
+// value if the key is not found.
+template <typename M, typename K, typename V>
+auto findValueOrDefault(const M& m, const K& key, V defaultValue) {
+ auto it = m.find(key);
+ return it == m.end() ? defaultValue : it->second;
+}
+
+// Assuming that M is a map whose keys' type is K, return the given key if it
+// is found from the map or default value.
+template <typename M, typename K>
+auto findKeyOrDefault(const M& m, const K& key, K defaultValue) {
+ auto it = m.find(key);
+ return it == m.end() ? defaultValue : key;
+}
+
} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/main.cpp b/audio/aidl/default/main.cpp
index 1933509..a861f9d 100644
--- a/audio/aidl/default/main.cpp
+++ b/audio/aidl/default/main.cpp
@@ -25,9 +25,11 @@
#include "core-impl/Config.h"
#include "core-impl/Module.h"
+#include "core-impl/ModuleUsb.h"
using aidl::android::hardware::audio::core::Config;
using aidl::android::hardware::audio::core::Module;
+using aidl::android::hardware::audio::core::ModuleUsb;
int main() {
// Random values are used in the implementation.
@@ -35,6 +37,8 @@
// This is a debug implementation, always enable debug logging.
android::base::SetMinimumLogSeverity(::android::base::DEBUG);
+ // For more logs, use VERBOSE, however this may hinder performance.
+ // android::base::SetMinimumLogSeverity(::android::base::VERBOSE);
ABinderProcess_setThreadPoolMaxThreadCount(16);
// Make the default config service
@@ -46,7 +50,7 @@
// Make modules
auto createModule = [](Module::Type type, const std::string& instance) {
- auto module = ndk::SharedRefBase::make<Module>(type);
+ auto module = Module::createInstance(type);
ndk::SpAIBinder moduleBinder = module->asBinder();
const std::string moduleName = std::string(Module::descriptor).append("/").append(instance);
AIBinder_setMinSchedulerPolicy(moduleBinder.get(), SCHED_NORMAL, ANDROID_PRIORITY_AUDIO);
diff --git a/audio/aidl/default/usb/ModuleUsb.cpp b/audio/aidl/default/usb/ModuleUsb.cpp
new file mode 100644
index 0000000..e803420
--- /dev/null
+++ b/audio/aidl/default/usb/ModuleUsb.cpp
@@ -0,0 +1,183 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "AHAL_ModuleUsb"
+
+#include <vector>
+
+#include <Utils.h>
+#include <android-base/logging.h>
+#include <tinyalsa/asoundlib.h>
+
+#include "UsbAlsaUtils.h"
+#include "core-impl/ModuleUsb.h"
+
+extern "C" {
+#include "alsa_device_profile.h"
+}
+
+using aidl::android::media::audio::common::AudioChannelLayout;
+using aidl::android::media::audio::common::AudioDeviceAddress;
+using aidl::android::media::audio::common::AudioDeviceDescription;
+using aidl::android::media::audio::common::AudioDeviceType;
+using aidl::android::media::audio::common::AudioFormatDescription;
+using aidl::android::media::audio::common::AudioFormatType;
+using aidl::android::media::audio::common::AudioPort;
+using aidl::android::media::audio::common::AudioPortConfig;
+using aidl::android::media::audio::common::AudioPortExt;
+using aidl::android::media::audio::common::AudioProfile;
+using android::hardware::audio::common::isUsbInputDeviceType;
+
+namespace aidl::android::hardware::audio::core {
+
+namespace {
+
+std::vector<AudioChannelLayout> populateChannelMasksFromProfile(const alsa_device_profile* profile,
+ bool isInput) {
+ std::vector<AudioChannelLayout> channels;
+ for (size_t i = 0; i < AUDIO_PORT_MAX_CHANNEL_MASKS && profile->channel_counts[i] != 0; ++i) {
+ auto layoutMask =
+ usb::getChannelLayoutMaskFromChannelCount(profile->channel_counts[i], isInput);
+ if (layoutMask.getTag() == AudioChannelLayout::Tag::layoutMask) {
+ channels.push_back(layoutMask);
+ }
+ auto indexMask = usb::getChannelIndexMaskFromChannelCount(profile->channel_counts[i]);
+ if (indexMask.getTag() == AudioChannelLayout::Tag::indexMask) {
+ channels.push_back(indexMask);
+ }
+ }
+ return channels;
+}
+
+std::vector<int> populateSampleRatesFromProfile(const alsa_device_profile* profile) {
+ std::vector<int> sampleRates;
+ for (int i = 0; i < std::min(MAX_PROFILE_SAMPLE_RATES, AUDIO_PORT_MAX_SAMPLING_RATES) &&
+ profile->sample_rates[i] != 0;
+ i++) {
+ sampleRates.push_back(profile->sample_rates[i]);
+ }
+ return sampleRates;
+}
+
+} // namespace
+
+ndk::ScopedAStatus ModuleUsb::getTelephony(std::shared_ptr<ITelephony>* _aidl_return) {
+ *_aidl_return = nullptr;
+ LOG(DEBUG) << __func__ << ": returning null";
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus ModuleUsb::getBluetooth(std::shared_ptr<IBluetooth>* _aidl_return) {
+ *_aidl_return = nullptr;
+ LOG(DEBUG) << __func__ << ": returning null";
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus ModuleUsb::getMasterMute(bool* _aidl_return __unused) {
+ LOG(DEBUG) << __func__ << ": is not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+ndk::ScopedAStatus ModuleUsb::setMasterMute(bool in_mute __unused) {
+ LOG(DEBUG) << __func__ << ": is not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+ndk::ScopedAStatus ModuleUsb::getMasterVolume(float* _aidl_return __unused) {
+ LOG(DEBUG) << __func__ << ": is not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+ndk::ScopedAStatus ModuleUsb::setMasterVolume(float in_volume __unused) {
+ LOG(DEBUG) << __func__ << ": is not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+ndk::ScopedAStatus ModuleUsb::getMicMute(bool* _aidl_return __unused) {
+ LOG(DEBUG) << __func__ << ": is not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+ndk::ScopedAStatus ModuleUsb::setMicMute(bool in_mute __unused) {
+ LOG(DEBUG) << __func__ << ": is not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+ndk::ScopedAStatus ModuleUsb::populateConnectedDevicePort(AudioPort* audioPort) {
+ if (audioPort->ext.getTag() != AudioPortExt::Tag::device) {
+ LOG(ERROR) << __func__ << ": port id " << audioPort->id << " is not a device port";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
+ auto& devicePort = audioPort->ext.get<AudioPortExt::Tag::device>();
+ if (devicePort.device.type.connection != AudioDeviceDescription::CONNECTION_USB) {
+ LOG(ERROR) << __func__ << ": port id " << audioPort->id << " is not a usb device port";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
+ if (devicePort.device.address.getTag() != AudioDeviceAddress::Tag::alsa) {
+ LOG(ERROR) << __func__ << ": port id " << audioPort->id << " is not using alsa address";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
+ auto& alsaAddress = devicePort.device.address.get<AudioDeviceAddress::Tag::alsa>();
+ if (alsaAddress.size() != 2 || alsaAddress[0] < 0 || alsaAddress[1] < 0) {
+ LOG(ERROR) << __func__ << ": port id " << audioPort->id << " invalid alsa address";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
+
+ const bool isInput = isUsbInputDeviceType(devicePort.device.type.type);
+ alsa_device_profile profile;
+ profile_init(&profile, isInput ? PCM_IN : PCM_OUT);
+ if (!profile_read_device_info(&profile)) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
+ }
+
+ std::vector<AudioChannelLayout> channels = populateChannelMasksFromProfile(&profile, isInput);
+ std::vector<int> sampleRates = populateSampleRatesFromProfile(&profile);
+
+ for (size_t i = 0; i < std::min(MAX_PROFILE_FORMATS, AUDIO_PORT_MAX_AUDIO_PROFILES) &&
+ profile.formats[i] != 0;
+ ++i) {
+ auto audioFormatDescription =
+ usb::legacy2aidl_pcm_format_AudioFormatDescription(profile.formats[i]);
+ if (audioFormatDescription.type == AudioFormatType::DEFAULT) {
+ LOG(WARNING) << __func__ << ": unknown pcm type=" << profile.formats[i];
+ continue;
+ }
+ AudioProfile audioProfile = {.format = audioFormatDescription,
+ .channelMasks = channels,
+ .sampleRates = sampleRates};
+ audioPort->profiles.push_back(std::move(audioProfile));
+ }
+
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus ModuleUsb::checkAudioPatchEndpointsMatch(
+ const std::vector<AudioPortConfig*>& sources, const std::vector<AudioPortConfig*>& sinks) {
+ for (const auto& source : sources) {
+ for (const auto& sink : sinks) {
+ if (source->sampleRate != sink->sampleRate ||
+ source->channelMask != sink->channelMask || source->format != sink->format) {
+ LOG(ERROR) << __func__
+ << ": mismatch port configuration, source=" << source->toString()
+ << ", sink=" << sink->toString();
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ }
+ }
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+} // namespace aidl::android::hardware::audio::core
diff --git a/audio/aidl/default/usb/StreamUsb.cpp b/audio/aidl/default/usb/StreamUsb.cpp
new file mode 100644
index 0000000..22e36ac
--- /dev/null
+++ b/audio/aidl/default/usb/StreamUsb.cpp
@@ -0,0 +1,242 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "AHAL_StreamUsb"
+#include <android-base/logging.h>
+
+#include "UsbAlsaUtils.h"
+#include "core-impl/Module.h"
+#include "core-impl/StreamUsb.h"
+
+extern "C" {
+#include "alsa_device_profile.h"
+}
+
+using aidl::android::hardware::audio::common::SinkMetadata;
+using aidl::android::hardware::audio::common::SourceMetadata;
+using aidl::android::media::audio::common::AudioDevice;
+using aidl::android::media::audio::common::AudioDeviceAddress;
+using aidl::android::media::audio::common::AudioOffloadInfo;
+
+namespace aidl::android::hardware::audio::core {
+
+DriverUsb::DriverUsb(const StreamContext& context, bool isInput)
+ : mFrameSizeBytes(context.getFrameSize()), mIsInput(isInput) {
+ struct pcm_config config;
+ config.channels = usb::getChannelCountFromChannelMask(context.getChannelLayout(), isInput);
+ if (config.channels == 0) {
+ LOG(ERROR) << __func__ << ": invalid channel=" << context.getChannelLayout().toString();
+ return;
+ }
+ config.format = usb::aidl2legacy_AudioFormatDescription_pcm_format(context.getFormat());
+ if (config.format == PCM_FORMAT_INVALID) {
+ LOG(ERROR) << __func__ << ": invalid format=" << context.getFormat().toString();
+ return;
+ }
+ config.rate = context.getSampleRate();
+ if (config.rate == 0) {
+ LOG(ERROR) << __func__ << ": invalid sample rate=" << config.rate;
+ return;
+ }
+ mConfig = config;
+}
+
+::android::status_t DriverUsb::init() {
+ return mConfig.has_value() ? ::android::OK : ::android::NO_INIT;
+}
+
+::android::status_t DriverUsb::setConnectedDevices(
+ const std::vector<AudioDevice>& connectedDevices) {
+ if (mIsInput && connectedDevices.size() > 1) {
+ LOG(ERROR) << __func__ << ": wrong device size(" << connectedDevices.size()
+ << ") for input stream";
+ return ::android::BAD_VALUE;
+ }
+ for (const auto& connectedDevice : connectedDevices) {
+ if (connectedDevice.address.getTag() != AudioDeviceAddress::alsa) {
+ LOG(ERROR) << __func__ << ": bad device address" << connectedDevice.address.toString();
+ return ::android::BAD_VALUE;
+ }
+ }
+ std::lock_guard guard(mLock);
+ mAlsaDeviceProxies.clear();
+ mConnectedDevices.clear();
+ for (const auto& connectedDevice : connectedDevices) {
+ mConnectedDevices.push_back(connectedDevice.address);
+ }
+ return ::android::OK;
+}
+
+::android::status_t DriverUsb::drain(StreamDescriptor::DrainMode) {
+ usleep(1000);
+ return ::android::OK;
+}
+
+::android::status_t DriverUsb::flush() {
+ usleep(1000);
+ return ::android::OK;
+}
+
+::android::status_t DriverUsb::pause() {
+ usleep(1000);
+ return ::android::OK;
+}
+
+::android::status_t DriverUsb::transfer(void* buffer, size_t frameCount, size_t* actualFrameCount,
+ int32_t* latencyMs) {
+ if (!mConfig.has_value() || mConnectedDevices.empty()) {
+ return ::android::NO_INIT;
+ }
+ if (mIsStandby) {
+ if (::android::status_t status = exitStandby(); status != ::android::OK) {
+ return status;
+ }
+ }
+ std::vector<std::shared_ptr<alsa_device_proxy>> alsaDeviceProxies;
+ {
+ std::lock_guard guard(mLock);
+ alsaDeviceProxies = mAlsaDeviceProxies;
+ }
+ const size_t bytesToTransfer = frameCount * mFrameSizeBytes;
+ if (mIsInput) {
+ // For input case, only support single device.
+ proxy_read(alsaDeviceProxies[0].get(), buffer, bytesToTransfer);
+ } else {
+ for (auto& proxy : alsaDeviceProxies) {
+ proxy_write(proxy.get(), buffer, bytesToTransfer);
+ }
+ }
+ *actualFrameCount = frameCount;
+ *latencyMs = Module::kLatencyMs;
+ return ::android::OK;
+}
+
+::android::status_t DriverUsb::standby() {
+ if (!mIsStandby) {
+ std::lock_guard guard(mLock);
+ mAlsaDeviceProxies.clear();
+ mIsStandby = true;
+ }
+ return ::android::OK;
+}
+
+::android::status_t DriverUsb::exitStandby() {
+ std::vector<AudioDeviceAddress> connectedDevices;
+ {
+ std::lock_guard guard(mLock);
+ connectedDevices = mConnectedDevices;
+ }
+ std::vector<std::shared_ptr<alsa_device_proxy>> alsaDeviceProxies;
+ for (const auto& device : connectedDevices) {
+ alsa_device_profile profile;
+ profile.card = device.get<AudioDeviceAddress::alsa>()[0];
+ profile.device = device.get<AudioDeviceAddress::alsa>()[1];
+ if (!profile_read_device_info(&profile)) {
+ LOG(ERROR) << __func__
+ << ": unable to read device info, device address=" << device.toString();
+ return ::android::UNKNOWN_ERROR;
+ }
+
+ auto proxy = std::shared_ptr<alsa_device_proxy>(new alsa_device_proxy(),
+ [](alsa_device_proxy* proxy) {
+ proxy_close(proxy);
+ free(proxy);
+ });
+ // Always ask for alsa configure as required since the configuration should be supported
+ // by the connected device. That is guaranteed by `setAudioPortConfig` and
+ // `setAudioPatch`.
+ if (int err =
+ proxy_prepare(proxy.get(), &profile, &mConfig.value(), true /*is_bit_perfect*/);
+ err != 0) {
+ LOG(ERROR) << __func__ << ": fail to prepare for device address=" << device.toString()
+ << " error=" << err;
+ return ::android::UNKNOWN_ERROR;
+ }
+ alsaDeviceProxies.push_back(std::move(proxy));
+ }
+ {
+ std::lock_guard guard(mLock);
+ mAlsaDeviceProxies = alsaDeviceProxies;
+ }
+ mIsStandby = false;
+ return ::android::OK;
+}
+
+// static
+ndk::ScopedAStatus StreamInUsb::createInstance(const SinkMetadata& sinkMetadata,
+ StreamContext&& context,
+ const std::vector<MicrophoneInfo>& microphones,
+ std::shared_ptr<StreamIn>* result) {
+ std::shared_ptr<StreamIn> stream =
+ ndk::SharedRefBase::make<StreamInUsb>(sinkMetadata, std::move(context), microphones);
+ if (auto status = initInstance(stream); !status.isOk()) {
+ return status;
+ }
+ *result = std::move(stream);
+ return ndk::ScopedAStatus::ok();
+}
+
+StreamInUsb::StreamInUsb(const SinkMetadata& sinkMetadata, StreamContext&& context,
+ const std::vector<MicrophoneInfo>& microphones)
+ : StreamIn(
+ sinkMetadata, std::move(context),
+ [](const StreamContext& ctx) -> DriverInterface* {
+ return new DriverUsb(ctx, true /*isInput*/);
+ },
+ [](const StreamContext& ctx, DriverInterface* driver) -> StreamWorkerInterface* {
+ // The default worker implementation is used.
+ return new StreamInWorker(ctx, driver);
+ },
+ microphones) {}
+
+ndk::ScopedAStatus StreamInUsb::getActiveMicrophones(
+ std::vector<MicrophoneDynamicInfo>* _aidl_return __unused) {
+ LOG(DEBUG) << __func__ << ": not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+}
+
+// static
+ndk::ScopedAStatus StreamOutUsb::createInstance(const SourceMetadata& sourceMetadata,
+ StreamContext&& context,
+ const std::optional<AudioOffloadInfo>& offloadInfo,
+ std::shared_ptr<StreamOut>* result) {
+ if (offloadInfo.has_value()) {
+ LOG(ERROR) << __func__ << ": offload is not supported";
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
+ std::shared_ptr<StreamOut> stream =
+ ndk::SharedRefBase::make<StreamOutUsb>(sourceMetadata, std::move(context), offloadInfo);
+ if (auto status = initInstance(stream); !status.isOk()) {
+ return status;
+ }
+ *result = std::move(stream);
+ return ndk::ScopedAStatus::ok();
+}
+
+StreamOutUsb::StreamOutUsb(const SourceMetadata& sourceMetadata, StreamContext&& context,
+ const std::optional<AudioOffloadInfo>& offloadInfo)
+ : StreamOut(
+ sourceMetadata, std::move(context),
+ [](const StreamContext& ctx) -> DriverInterface* {
+ return new DriverUsb(ctx, false /*isInput*/);
+ },
+ [](const StreamContext& ctx, DriverInterface* driver) -> StreamWorkerInterface* {
+ // The default worker implementation is used.
+ return new StreamOutWorker(ctx, driver);
+ },
+ offloadInfo) {}
+
+} // namespace aidl::android::hardware::audio::core
\ No newline at end of file
diff --git a/audio/aidl/default/usb/UsbAlsaUtils.cpp b/audio/aidl/default/usb/UsbAlsaUtils.cpp
new file mode 100644
index 0000000..3c79e1d
--- /dev/null
+++ b/audio/aidl/default/usb/UsbAlsaUtils.cpp
@@ -0,0 +1,181 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+
+#include <map>
+#include <set>
+
+#include <Utils.h>
+#include <aidl/android/media/audio/common/AudioFormatType.h>
+#include <aidl/android/media/audio/common/PcmType.h>
+
+#include "UsbAlsaUtils.h"
+#include "core-impl/utils.h"
+
+using aidl::android::media::audio::common::AudioChannelLayout;
+using aidl::android::media::audio::common::AudioFormatDescription;
+using aidl::android::media::audio::common::AudioFormatType;
+using aidl::android::media::audio::common::PcmType;
+using android::hardware::audio::common::getChannelCount;
+
+namespace aidl::android::hardware::audio::core::usb {
+
+namespace {
+
+using AudioChannelCountToMaskMap = std::map<unsigned int, AudioChannelLayout>;
+using AudioFormatDescToPcmFormatMap = std::map<AudioFormatDescription, enum pcm_format>;
+using PcmFormatToAudioFormatDescMap = std::map<enum pcm_format, AudioFormatDescription>;
+
+static const AudioChannelLayout INVALID_CHANNEL_LAYOUT =
+ AudioChannelLayout::make<AudioChannelLayout::Tag::invalid>(0);
+
+#define DEFINE_CHANNEL_LAYOUT_MASK(n) \
+ AudioChannelLayout::make<AudioChannelLayout::Tag::layoutMask>(AudioChannelLayout::LAYOUT_##n)
+
+static const std::set<AudioChannelLayout> SUPPORTED_OUT_CHANNEL_LAYOUTS = {
+ DEFINE_CHANNEL_LAYOUT_MASK(MONO), DEFINE_CHANNEL_LAYOUT_MASK(STEREO),
+ DEFINE_CHANNEL_LAYOUT_MASK(2POINT1), DEFINE_CHANNEL_LAYOUT_MASK(QUAD),
+ DEFINE_CHANNEL_LAYOUT_MASK(PENTA), DEFINE_CHANNEL_LAYOUT_MASK(5POINT1),
+ DEFINE_CHANNEL_LAYOUT_MASK(6POINT1), DEFINE_CHANNEL_LAYOUT_MASK(7POINT1),
+ DEFINE_CHANNEL_LAYOUT_MASK(7POINT1POINT4), DEFINE_CHANNEL_LAYOUT_MASK(22POINT2),
+};
+
+static const std::set<AudioChannelLayout> SUPPORTED_IN_CHANNEL_LAYOUTS = {
+ DEFINE_CHANNEL_LAYOUT_MASK(MONO),
+ DEFINE_CHANNEL_LAYOUT_MASK(STEREO),
+};
+
+#define DEFINE_CHANNEL_INDEX_MASK(n) \
+ AudioChannelLayout::make<AudioChannelLayout::Tag::indexMask>(AudioChannelLayout::INDEX_MASK_##n)
+
+static const std::set<AudioChannelLayout> SUPPORTED_INDEX_CHANNEL_LAYOUTS = {
+ DEFINE_CHANNEL_INDEX_MASK(1), DEFINE_CHANNEL_INDEX_MASK(2), DEFINE_CHANNEL_INDEX_MASK(3),
+ DEFINE_CHANNEL_INDEX_MASK(4), DEFINE_CHANNEL_INDEX_MASK(5), DEFINE_CHANNEL_INDEX_MASK(6),
+ DEFINE_CHANNEL_INDEX_MASK(7), DEFINE_CHANNEL_INDEX_MASK(8), DEFINE_CHANNEL_INDEX_MASK(9),
+ DEFINE_CHANNEL_INDEX_MASK(10), DEFINE_CHANNEL_INDEX_MASK(11), DEFINE_CHANNEL_INDEX_MASK(12),
+ DEFINE_CHANNEL_INDEX_MASK(13), DEFINE_CHANNEL_INDEX_MASK(14), DEFINE_CHANNEL_INDEX_MASK(15),
+ DEFINE_CHANNEL_INDEX_MASK(16), DEFINE_CHANNEL_INDEX_MASK(17), DEFINE_CHANNEL_INDEX_MASK(18),
+ DEFINE_CHANNEL_INDEX_MASK(19), DEFINE_CHANNEL_INDEX_MASK(20), DEFINE_CHANNEL_INDEX_MASK(21),
+ DEFINE_CHANNEL_INDEX_MASK(22), DEFINE_CHANNEL_INDEX_MASK(23), DEFINE_CHANNEL_INDEX_MASK(24),
+};
+
+static AudioChannelCountToMaskMap make_ChannelCountToMaskMap(
+ const std::set<AudioChannelLayout>& channelMasks) {
+ AudioChannelCountToMaskMap channelMaskToCountMap;
+ for (const auto& channelMask : channelMasks) {
+ channelMaskToCountMap.emplace(getChannelCount(channelMask), channelMask);
+ }
+ return channelMaskToCountMap;
+}
+
+const AudioChannelCountToMaskMap& getSupportedChannelOutLayoutMap() {
+ static const AudioChannelCountToMaskMap outLayouts =
+ make_ChannelCountToMaskMap(SUPPORTED_OUT_CHANNEL_LAYOUTS);
+ return outLayouts;
+}
+
+const AudioChannelCountToMaskMap& getSupportedChannelInLayoutMap() {
+ static const AudioChannelCountToMaskMap inLayouts =
+ make_ChannelCountToMaskMap(SUPPORTED_IN_CHANNEL_LAYOUTS);
+ return inLayouts;
+}
+
+const AudioChannelCountToMaskMap& getSupportedChannelIndexLayoutMap() {
+ static const AudioChannelCountToMaskMap indexLayouts =
+ make_ChannelCountToMaskMap(SUPPORTED_INDEX_CHANNEL_LAYOUTS);
+ return indexLayouts;
+}
+
+AudioFormatDescription make_AudioFormatDescription(AudioFormatType type) {
+ AudioFormatDescription result;
+ result.type = type;
+ return result;
+}
+
+AudioFormatDescription make_AudioFormatDescription(PcmType pcm) {
+ auto result = make_AudioFormatDescription(AudioFormatType::PCM);
+ result.pcm = pcm;
+ return result;
+}
+
+const AudioFormatDescToPcmFormatMap& getAudioFormatDescriptorToPcmFormatMap() {
+ static const AudioFormatDescToPcmFormatMap formatDescToPcmFormatMap = {
+ {make_AudioFormatDescription(PcmType::UINT_8_BIT), PCM_FORMAT_S8},
+ {make_AudioFormatDescription(PcmType::INT_16_BIT), PCM_FORMAT_S16_LE},
+ {make_AudioFormatDescription(PcmType::INT_24_BIT), PCM_FORMAT_S24_LE},
+ {make_AudioFormatDescription(PcmType::FIXED_Q_8_24), PCM_FORMAT_S24_3LE},
+ {make_AudioFormatDescription(PcmType::INT_32_BIT), PCM_FORMAT_S32_LE},
+ {make_AudioFormatDescription(PcmType::FLOAT_32_BIT), PCM_FORMAT_FLOAT_LE},
+ };
+ return formatDescToPcmFormatMap;
+}
+
+static PcmFormatToAudioFormatDescMap make_PcmFormatToAudioFormatDescMap(
+ const AudioFormatDescToPcmFormatMap& formatDescToPcmFormatMap) {
+ PcmFormatToAudioFormatDescMap result;
+ for (const auto& formatPair : formatDescToPcmFormatMap) {
+ result.emplace(formatPair.second, formatPair.first);
+ }
+ return result;
+}
+
+const PcmFormatToAudioFormatDescMap& getPcmFormatToAudioFormatDescMap() {
+ static const PcmFormatToAudioFormatDescMap pcmFormatToFormatDescMap =
+ make_PcmFormatToAudioFormatDescMap(getAudioFormatDescriptorToPcmFormatMap());
+ return pcmFormatToFormatDescMap;
+}
+
+} // namespace
+
+AudioChannelLayout getChannelLayoutMaskFromChannelCount(unsigned int channelCount, int isInput) {
+ return findValueOrDefault(
+ isInput ? getSupportedChannelInLayoutMap() : getSupportedChannelOutLayoutMap(),
+ channelCount, INVALID_CHANNEL_LAYOUT);
+}
+
+AudioChannelLayout getChannelIndexMaskFromChannelCount(unsigned int channelCount) {
+ return findValueOrDefault(getSupportedChannelIndexLayoutMap(), channelCount,
+ INVALID_CHANNEL_LAYOUT);
+}
+
+unsigned int getChannelCountFromChannelMask(const AudioChannelLayout& channelMask, bool isInput) {
+ switch (channelMask.getTag()) {
+ case AudioChannelLayout::Tag::layoutMask: {
+ return findKeyOrDefault(
+ isInput ? getSupportedChannelInLayoutMap() : getSupportedChannelOutLayoutMap(),
+ (unsigned int)getChannelCount(channelMask), 0u /*defaultValue*/);
+ }
+ case AudioChannelLayout::Tag::indexMask: {
+ return findKeyOrDefault(getSupportedChannelIndexLayoutMap(),
+ (unsigned int)getChannelCount(channelMask),
+ 0u /*defaultValue*/);
+ }
+ case AudioChannelLayout::Tag::none:
+ case AudioChannelLayout::Tag::invalid:
+ case AudioChannelLayout::Tag::voiceMask:
+ default:
+ return 0;
+ }
+}
+
+AudioFormatDescription legacy2aidl_pcm_format_AudioFormatDescription(enum pcm_format legacy) {
+ return findValueOrDefault(getPcmFormatToAudioFormatDescMap(), legacy, AudioFormatDescription());
+}
+
+pcm_format aidl2legacy_AudioFormatDescription_pcm_format(const AudioFormatDescription& aidl) {
+ return findValueOrDefault(getAudioFormatDescriptorToPcmFormatMap(), aidl, PCM_FORMAT_INVALID);
+}
+
+} // namespace aidl::android::hardware::audio::core::usb
\ No newline at end of file
diff --git a/audio/aidl/default/usb/UsbAlsaUtils.h b/audio/aidl/default/usb/UsbAlsaUtils.h
new file mode 100644
index 0000000..2d2f0f4
--- /dev/null
+++ b/audio/aidl/default/usb/UsbAlsaUtils.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+
+#pragma once
+
+#include <aidl/android/media/audio/common/AudioChannelLayout.h>
+#include <aidl/android/media/audio/common/AudioFormatDescription.h>
+
+extern "C" {
+#include <tinyalsa/pcm.h>
+}
+
+namespace aidl::android::hardware::audio::core::usb {
+
+::aidl::android::media::audio::common::AudioChannelLayout getChannelLayoutMaskFromChannelCount(
+ unsigned int channelCount, int isInput);
+::aidl::android::media::audio::common::AudioChannelLayout getChannelIndexMaskFromChannelCount(
+ unsigned int channelCount);
+unsigned int getChannelCountFromChannelMask(
+ const ::aidl::android::media::audio::common::AudioChannelLayout& channelMask, bool isInput);
+::aidl::android::media::audio::common::AudioFormatDescription
+legacy2aidl_pcm_format_AudioFormatDescription(enum pcm_format legacy);
+pcm_format aidl2legacy_AudioFormatDescription_pcm_format(
+ const ::aidl::android::media::audio::common::AudioFormatDescription& aidl);
+
+} // namespace aidl::android::hardware::audio::core::usb
\ No newline at end of file
diff --git a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/StatusCode.aidl b/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/StatusCode.aidl
index 9b72412..f7e8c5a 100644
--- a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/StatusCode.aidl
+++ b/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/StatusCode.aidl
@@ -40,4 +40,9 @@
NOT_AVAILABLE = 3,
ACCESS_DENIED = 4,
INTERNAL_ERROR = 5,
+ NOT_AVAILABLE_DISABLED = 6,
+ NOT_AVAILABLE_SPEED_LOW = 7,
+ NOT_AVAILABLE_SPEED_HIGH = 8,
+ NOT_AVAILABLE_POOR_VISIBILITY = 9,
+ NOT_AVAILABLE_SAFETY = 10,
}
diff --git a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/StatusCode.aidl b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/StatusCode.aidl
index 35080db..8ac6506 100644
--- a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/StatusCode.aidl
+++ b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/StatusCode.aidl
@@ -62,4 +62,35 @@
* Something unexpected has happened in Vehicle HAL
*/
INTERNAL_ERROR = 5,
+
+ /**
+ * The following error codes were added in version 2 of this interface.
+ */
+
+ /**
+ * For features that are not available because the underlying feature is
+ * disabled.
+ */
+ NOT_AVAILABLE_DISABLED = 6,
+ /**
+ * For features that are not available because the vehicle speed is too low.
+ */
+ NOT_AVAILABLE_SPEED_LOW = 7,
+ /**
+ * For features that are not available because the vehicle speed is too
+ * high.
+ */
+ NOT_AVAILABLE_SPEED_HIGH = 8,
+ /**
+ * For features that are not available because of bad camera or sensor
+ * visibility. Examples might be bird poop blocking the camera or a bumper
+ * cover blocking an ultrasonic sensor.
+ */
+ NOT_AVAILABLE_POOR_VISIBILITY = 9,
+ /**
+ * The feature cannot be accessed due to safety reasons. Eg. System could be
+ * in a faulty state, an object or person could be blocking the requested
+ * operation such as closing a trunk door, etc.
+ */
+ NOT_AVAILABLE_SAFETY = 10,
}
diff --git a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
index edd44a8..198681e 100644
--- a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h
@@ -239,6 +239,7 @@
{VehicleProperty::GENERAL_SAFETY_REGULATION_COMPLIANCE_REQUIREMENT, VehiclePropertyAccess::READ},
{VehicleProperty::SUPPORTED_PROPERTY_IDS, VehiclePropertyAccess::READ},
{VehicleProperty::SHUTDOWN_REQUEST, VehiclePropertyAccess::WRITE},
+ {VehicleProperty::VEHICLE_IN_USE, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess::READ_WRITE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyAccess::READ},
{VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess::READ_WRITE},
diff --git a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
index 726bfcc..4dbe7aa 100644
--- a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
+++ b/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h
@@ -239,6 +239,7 @@
{VehicleProperty::GENERAL_SAFETY_REGULATION_COMPLIANCE_REQUIREMENT, VehiclePropertyChangeMode::STATIC},
{VehicleProperty::SUPPORTED_PROPERTY_IDS, VehiclePropertyChangeMode::STATIC},
{VehicleProperty::SHUTDOWN_REQUEST, VehiclePropertyChangeMode::ON_CHANGE},
+ {VehicleProperty::VEHICLE_IN_USE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyChangeMode::ON_CHANGE},
{VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
diff --git a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
index 36449fe..88314e3 100644
--- a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java
@@ -231,6 +231,7 @@
Map.entry(VehicleProperty.GENERAL_SAFETY_REGULATION_COMPLIANCE_REQUIREMENT, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.SUPPORTED_PROPERTY_IDS, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.SHUTDOWN_REQUEST, VehiclePropertyAccess.WRITE),
+ Map.entry(VehicleProperty.VEHICLE_IN_USE, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess.READ_WRITE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyAccess.READ),
Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),
diff --git a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
index 12e4e8f..787bb2b 100644
--- a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
+++ b/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java
@@ -231,6 +231,7 @@
Map.entry(VehicleProperty.GENERAL_SAFETY_REGULATION_COMPLIANCE_REQUIREMENT, VehiclePropertyChangeMode.STATIC),
Map.entry(VehicleProperty.SUPPORTED_PROPERTY_IDS, VehiclePropertyChangeMode.STATIC),
Map.entry(VehicleProperty.SHUTDOWN_REQUEST, VehiclePropertyChangeMode.ON_CHANGE),
+ Map.entry(VehicleProperty.VEHICLE_IN_USE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyChangeMode.ON_CHANGE),
Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/ErrorState.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/ErrorState.aidl
index aaf3565..e3305c7 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/ErrorState.aidl
+++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/ErrorState.aidl
@@ -34,9 +34,9 @@
package android.hardware.automotive.vehicle;
@Backing(type="int") @VintfStability
enum ErrorState {
- OTHER_ERROR_STATE = (-1),
- NOT_AVAILABLE_DISABLED = (-2),
- NOT_AVAILABLE_SPEED_LOW = (-3),
- NOT_AVAILABLE_SPEED_HIGH = (-4),
- NOT_AVAILABLE_SAFETY = (-5),
+ OTHER_ERROR_STATE = (-1) /* -1 */,
+ NOT_AVAILABLE_DISABLED = (-2) /* -2 */,
+ NOT_AVAILABLE_SPEED_LOW = (-3) /* -3 */,
+ NOT_AVAILABLE_SPEED_HIGH = (-4) /* -4 */,
+ NOT_AVAILABLE_SAFETY = (-5) /* -5 */,
}
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/Obd2CommonIgnitionMonitors.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/Obd2CommonIgnitionMonitors.aidl
index 22eea1f..7d12224 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/Obd2CommonIgnitionMonitors.aidl
+++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/Obd2CommonIgnitionMonitors.aidl
@@ -34,10 +34,10 @@
package android.hardware.automotive.vehicle;
@Backing(type="int") @VintfStability
enum Obd2CommonIgnitionMonitors {
- COMPONENTS_AVAILABLE = (0x1 << 0),
- COMPONENTS_INCOMPLETE = (0x1 << 1),
- FUEL_SYSTEM_AVAILABLE = (0x1 << 2),
- FUEL_SYSTEM_INCOMPLETE = (0x1 << 3),
- MISFIRE_AVAILABLE = (0x1 << 4),
- MISFIRE_INCOMPLETE = (0x1 << 5),
+ COMPONENTS_AVAILABLE = (0x1 << 0) /* 1 */,
+ COMPONENTS_INCOMPLETE = (0x1 << 1) /* 2 */,
+ FUEL_SYSTEM_AVAILABLE = (0x1 << 2) /* 4 */,
+ FUEL_SYSTEM_INCOMPLETE = (0x1 << 3) /* 8 */,
+ MISFIRE_AVAILABLE = (0x1 << 4) /* 16 */,
+ MISFIRE_INCOMPLETE = (0x1 << 5) /* 32 */,
}
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/Obd2CompressionIgnitionMonitors.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/Obd2CompressionIgnitionMonitors.aidl
index 335f0ad..90240bf 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/Obd2CompressionIgnitionMonitors.aidl
+++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/Obd2CompressionIgnitionMonitors.aidl
@@ -34,22 +34,22 @@
package android.hardware.automotive.vehicle;
@Backing(type="int") @VintfStability
enum Obd2CompressionIgnitionMonitors {
- COMPONENTS_AVAILABLE = (0x1 << 0),
- COMPONENTS_INCOMPLETE = (0x1 << 1),
- FUEL_SYSTEM_AVAILABLE = (0x1 << 2),
- FUEL_SYSTEM_INCOMPLETE = (0x1 << 3),
- MISFIRE_AVAILABLE = (0x1 << 4),
- MISFIRE_INCOMPLETE = (0x1 << 5),
- EGR_OR_VVT_AVAILABLE = (0x1 << 6),
- EGR_OR_VVT_INCOMPLETE = (0x1 << 7),
- PM_FILTER_AVAILABLE = (0x1 << 8),
- PM_FILTER_INCOMPLETE = (0x1 << 9),
- EXHAUST_GAS_SENSOR_AVAILABLE = (0x1 << 10),
- EXHAUST_GAS_SENSOR_INCOMPLETE = (0x1 << 11),
- BOOST_PRESSURE_AVAILABLE = (0x1 << 12),
- BOOST_PRESSURE_INCOMPLETE = (0x1 << 13),
- NOx_SCR_AVAILABLE = (0x1 << 14),
- NOx_SCR_INCOMPLETE = (0x1 << 15),
- NMHC_CATALYST_AVAILABLE = (0x1 << 16),
- NMHC_CATALYST_INCOMPLETE = (0x1 << 17),
+ COMPONENTS_AVAILABLE = (0x1 << 0) /* 1 */,
+ COMPONENTS_INCOMPLETE = (0x1 << 1) /* 2 */,
+ FUEL_SYSTEM_AVAILABLE = (0x1 << 2) /* 4 */,
+ FUEL_SYSTEM_INCOMPLETE = (0x1 << 3) /* 8 */,
+ MISFIRE_AVAILABLE = (0x1 << 4) /* 16 */,
+ MISFIRE_INCOMPLETE = (0x1 << 5) /* 32 */,
+ EGR_OR_VVT_AVAILABLE = (0x1 << 6) /* 64 */,
+ EGR_OR_VVT_INCOMPLETE = (0x1 << 7) /* 128 */,
+ PM_FILTER_AVAILABLE = (0x1 << 8) /* 256 */,
+ PM_FILTER_INCOMPLETE = (0x1 << 9) /* 512 */,
+ EXHAUST_GAS_SENSOR_AVAILABLE = (0x1 << 10) /* 1024 */,
+ EXHAUST_GAS_SENSOR_INCOMPLETE = (0x1 << 11) /* 2048 */,
+ BOOST_PRESSURE_AVAILABLE = (0x1 << 12) /* 4096 */,
+ BOOST_PRESSURE_INCOMPLETE = (0x1 << 13) /* 8192 */,
+ NOx_SCR_AVAILABLE = (0x1 << 14) /* 16384 */,
+ NOx_SCR_INCOMPLETE = (0x1 << 15) /* 32768 */,
+ NMHC_CATALYST_AVAILABLE = (0x1 << 16) /* 65536 */,
+ NMHC_CATALYST_INCOMPLETE = (0x1 << 17) /* 131072 */,
}
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/Obd2SparkIgnitionMonitors.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/Obd2SparkIgnitionMonitors.aidl
index 4fc48ce..51e321b 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/Obd2SparkIgnitionMonitors.aidl
+++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/Obd2SparkIgnitionMonitors.aidl
@@ -34,26 +34,26 @@
package android.hardware.automotive.vehicle;
@Backing(type="int") @VintfStability
enum Obd2SparkIgnitionMonitors {
- COMPONENTS_AVAILABLE = (0x1 << 0),
- COMPONENTS_INCOMPLETE = (0x1 << 1),
- FUEL_SYSTEM_AVAILABLE = (0x1 << 2),
- FUEL_SYSTEM_INCOMPLETE = (0x1 << 3),
- MISFIRE_AVAILABLE = (0x1 << 4),
- MISFIRE_INCOMPLETE = (0x1 << 5),
- EGR_AVAILABLE = (0x1 << 6),
- EGR_INCOMPLETE = (0x1 << 7),
- OXYGEN_SENSOR_HEATER_AVAILABLE = (0x1 << 8),
- OXYGEN_SENSOR_HEATER_INCOMPLETE = (0x1 << 9),
- OXYGEN_SENSOR_AVAILABLE = (0x1 << 10),
- OXYGEN_SENSOR_INCOMPLETE = (0x1 << 11),
- AC_REFRIGERANT_AVAILABLE = (0x1 << 12),
- AC_REFRIGERANT_INCOMPLETE = (0x1 << 13),
- SECONDARY_AIR_SYSTEM_AVAILABLE = (0x1 << 14),
- SECONDARY_AIR_SYSTEM_INCOMPLETE = (0x1 << 15),
- EVAPORATIVE_SYSTEM_AVAILABLE = (0x1 << 16),
- EVAPORATIVE_SYSTEM_INCOMPLETE = (0x1 << 17),
- HEATED_CATALYST_AVAILABLE = (0x1 << 18),
- HEATED_CATALYST_INCOMPLETE = (0x1 << 19),
- CATALYST_AVAILABLE = (0x1 << 20),
- CATALYST_INCOMPLETE = (0x1 << 21),
+ COMPONENTS_AVAILABLE = (0x1 << 0) /* 1 */,
+ COMPONENTS_INCOMPLETE = (0x1 << 1) /* 2 */,
+ FUEL_SYSTEM_AVAILABLE = (0x1 << 2) /* 4 */,
+ FUEL_SYSTEM_INCOMPLETE = (0x1 << 3) /* 8 */,
+ MISFIRE_AVAILABLE = (0x1 << 4) /* 16 */,
+ MISFIRE_INCOMPLETE = (0x1 << 5) /* 32 */,
+ EGR_AVAILABLE = (0x1 << 6) /* 64 */,
+ EGR_INCOMPLETE = (0x1 << 7) /* 128 */,
+ OXYGEN_SENSOR_HEATER_AVAILABLE = (0x1 << 8) /* 256 */,
+ OXYGEN_SENSOR_HEATER_INCOMPLETE = (0x1 << 9) /* 512 */,
+ OXYGEN_SENSOR_AVAILABLE = (0x1 << 10) /* 1024 */,
+ OXYGEN_SENSOR_INCOMPLETE = (0x1 << 11) /* 2048 */,
+ AC_REFRIGERANT_AVAILABLE = (0x1 << 12) /* 4096 */,
+ AC_REFRIGERANT_INCOMPLETE = (0x1 << 13) /* 8192 */,
+ SECONDARY_AIR_SYSTEM_AVAILABLE = (0x1 << 14) /* 16384 */,
+ SECONDARY_AIR_SYSTEM_INCOMPLETE = (0x1 << 15) /* 32768 */,
+ EVAPORATIVE_SYSTEM_AVAILABLE = (0x1 << 16) /* 65536 */,
+ EVAPORATIVE_SYSTEM_INCOMPLETE = (0x1 << 17) /* 131072 */,
+ HEATED_CATALYST_AVAILABLE = (0x1 << 18) /* 262144 */,
+ HEATED_CATALYST_INCOMPLETE = (0x1 << 19) /* 524288 */,
+ CATALYST_AVAILABLE = (0x1 << 20) /* 1048576 */,
+ CATALYST_INCOMPLETE = (0x1 << 21) /* 2097152 */,
}
diff --git a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl
index 61e7add..4b8151c 100644
--- a/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/aidl_api/android.hardware.automotive.vehicle.property/current/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -35,219 +35,220 @@
@Backing(type="int") @VintfStability
enum VehicleProperty {
INVALID = 0x00000000,
- INFO_VIN = (((0x0100 + 0x10000000) + 0x01000000) + 0x00100000),
- INFO_MAKE = (((0x0101 + 0x10000000) + 0x01000000) + 0x00100000),
- INFO_MODEL = (((0x0102 + 0x10000000) + 0x01000000) + 0x00100000),
- INFO_MODEL_YEAR = (((0x0103 + 0x10000000) + 0x01000000) + 0x00400000),
- INFO_FUEL_CAPACITY = (((0x0104 + 0x10000000) + 0x01000000) + 0x00600000),
- INFO_FUEL_TYPE = (((0x0105 + 0x10000000) + 0x01000000) + 0x00410000),
- INFO_EV_BATTERY_CAPACITY = (((0x0106 + 0x10000000) + 0x01000000) + 0x00600000),
- INFO_EV_CONNECTOR_TYPE = (((0x0107 + 0x10000000) + 0x01000000) + 0x00410000),
- INFO_FUEL_DOOR_LOCATION = (((0x0108 + 0x10000000) + 0x01000000) + 0x00400000),
- INFO_EV_PORT_LOCATION = (((0x0109 + 0x10000000) + 0x01000000) + 0x00400000),
- INFO_DRIVER_SEAT = (((0x010A + 0x10000000) + 0x05000000) + 0x00400000),
- INFO_EXTERIOR_DIMENSIONS = (((0x010B + 0x10000000) + 0x01000000) + 0x00410000),
- INFO_MULTI_EV_PORT_LOCATIONS = (((0x010C + 0x10000000) + 0x01000000) + 0x00410000),
- PERF_ODOMETER = (((0x0204 + 0x10000000) + 0x01000000) + 0x00600000),
- PERF_VEHICLE_SPEED = (((0x0207 + 0x10000000) + 0x01000000) + 0x00600000),
- PERF_VEHICLE_SPEED_DISPLAY = (((0x0208 + 0x10000000) + 0x01000000) + 0x00600000),
- PERF_STEERING_ANGLE = (((0x0209 + 0x10000000) + 0x01000000) + 0x00600000),
- PERF_REAR_STEERING_ANGLE = (((0x0210 + 0x10000000) + 0x01000000) + 0x00600000),
- ENGINE_COOLANT_TEMP = (((0x0301 + 0x10000000) + 0x01000000) + 0x00600000),
- ENGINE_OIL_LEVEL = (((0x0303 + 0x10000000) + 0x01000000) + 0x00400000),
- ENGINE_OIL_TEMP = (((0x0304 + 0x10000000) + 0x01000000) + 0x00600000),
- ENGINE_RPM = (((0x0305 + 0x10000000) + 0x01000000) + 0x00600000),
- WHEEL_TICK = (((0x0306 + 0x10000000) + 0x01000000) + 0x00510000),
- FUEL_LEVEL = (((0x0307 + 0x10000000) + 0x01000000) + 0x00600000),
- FUEL_DOOR_OPEN = (((0x0308 + 0x10000000) + 0x01000000) + 0x00200000),
- EV_BATTERY_LEVEL = (((0x0309 + 0x10000000) + 0x01000000) + 0x00600000),
- EV_CURRENT_BATTERY_CAPACITY = (((0x030D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.FLOAT),
- EV_CHARGE_PORT_OPEN = (((0x030A + 0x10000000) + 0x01000000) + 0x00200000),
- EV_CHARGE_PORT_CONNECTED = (((0x030B + 0x10000000) + 0x01000000) + 0x00200000),
- EV_BATTERY_INSTANTANEOUS_CHARGE_RATE = (((0x030C + 0x10000000) + 0x01000000) + 0x00600000),
- RANGE_REMAINING = (((0x0308 + 0x10000000) + 0x01000000) + 0x00600000),
- TIRE_PRESSURE = (((0x0309 + 0x10000000) + 0x07000000) + 0x00600000),
- CRITICALLY_LOW_TIRE_PRESSURE = (((0x030A + 0x10000000) + 0x07000000) + 0x00600000),
- ENGINE_IDLE_AUTO_STOP_ENABLED = (((0x0320 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- GEAR_SELECTION = (((0x0400 + 0x10000000) + 0x01000000) + 0x00400000),
- CURRENT_GEAR = (((0x0401 + 0x10000000) + 0x01000000) + 0x00400000),
- PARKING_BRAKE_ON = (((0x0402 + 0x10000000) + 0x01000000) + 0x00200000),
- PARKING_BRAKE_AUTO_APPLY = (((0x0403 + 0x10000000) + 0x01000000) + 0x00200000),
- EV_BRAKE_REGENERATION_LEVEL = (((0x040C + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- FUEL_LEVEL_LOW = (((0x0405 + 0x10000000) + 0x01000000) + 0x00200000),
- NIGHT_MODE = (((0x0407 + 0x10000000) + 0x01000000) + 0x00200000),
- TURN_SIGNAL_STATE = (((0x0408 + 0x10000000) + 0x01000000) + 0x00400000),
- IGNITION_STATE = (((0x0409 + 0x10000000) + 0x01000000) + 0x00400000),
- ABS_ACTIVE = (((0x040A + 0x10000000) + 0x01000000) + 0x00200000),
- TRACTION_CONTROL_ACTIVE = (((0x040B + 0x10000000) + 0x01000000) + 0x00200000),
- EV_STOPPING_MODE = (((0x040D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- HVAC_FAN_SPEED = (((0x0500 + 0x10000000) + 0x05000000) + 0x00400000),
- HVAC_FAN_DIRECTION = (((0x0501 + 0x10000000) + 0x05000000) + 0x00400000),
- HVAC_TEMPERATURE_CURRENT = (((0x0502 + 0x10000000) + 0x05000000) + 0x00600000),
- HVAC_TEMPERATURE_SET = (((0x0503 + 0x10000000) + 0x05000000) + 0x00600000),
- HVAC_DEFROSTER = (((0x0504 + 0x10000000) + 0x03000000) + 0x00200000),
- HVAC_AC_ON = (((0x0505 + 0x10000000) + 0x05000000) + 0x00200000),
- HVAC_MAX_AC_ON = (((0x0506 + 0x10000000) + 0x05000000) + 0x00200000),
- HVAC_MAX_DEFROST_ON = (((0x0507 + 0x10000000) + 0x05000000) + 0x00200000),
- HVAC_RECIRC_ON = (((0x0508 + 0x10000000) + 0x05000000) + 0x00200000),
- HVAC_DUAL_ON = (((0x0509 + 0x10000000) + 0x05000000) + 0x00200000),
- HVAC_AUTO_ON = (((0x050A + 0x10000000) + 0x05000000) + 0x00200000),
- HVAC_SEAT_TEMPERATURE = (((0x050B + 0x10000000) + 0x05000000) + 0x00400000),
- HVAC_SIDE_MIRROR_HEAT = (((0x050C + 0x10000000) + 0x04000000) + 0x00400000),
- HVAC_STEERING_WHEEL_HEAT = (((0x050D + 0x10000000) + 0x01000000) + 0x00400000),
- HVAC_TEMPERATURE_DISPLAY_UNITS = (((0x050E + 0x10000000) + 0x01000000) + 0x00400000),
- HVAC_ACTUAL_FAN_SPEED_RPM = (((0x050F + 0x10000000) + 0x05000000) + 0x00400000),
- HVAC_POWER_ON = (((0x0510 + 0x10000000) + 0x05000000) + 0x00200000),
- HVAC_FAN_DIRECTION_AVAILABLE = (((0x0511 + 0x10000000) + 0x05000000) + 0x00410000),
- HVAC_AUTO_RECIRC_ON = (((0x0512 + 0x10000000) + 0x05000000) + 0x00200000),
- HVAC_SEAT_VENTILATION = (((0x0513 + 0x10000000) + 0x05000000) + 0x00400000),
- HVAC_ELECTRIC_DEFROSTER_ON = (((0x0514 + 0x10000000) + 0x03000000) + 0x00200000),
- HVAC_TEMPERATURE_VALUE_SUGGESTION = (((0x0515 + 0x10000000) + 0x01000000) + 0x00610000),
- DISTANCE_DISPLAY_UNITS = (((0x0600 + 0x10000000) + 0x01000000) + 0x00400000),
- FUEL_VOLUME_DISPLAY_UNITS = (((0x0601 + 0x10000000) + 0x01000000) + 0x00400000),
- TIRE_PRESSURE_DISPLAY_UNITS = (((0x0602 + 0x10000000) + 0x01000000) + 0x00400000),
- EV_BATTERY_DISPLAY_UNITS = (((0x0603 + 0x10000000) + 0x01000000) + 0x00400000),
- FUEL_CONSUMPTION_UNITS_DISTANCE_OVER_VOLUME = (((0x0604 + 0x10000000) + 0x01000000) + 0x00200000),
- VEHICLE_SPEED_DISPLAY_UNITS = (((0x0605 + 0x10000000) + 0x01000000) + 0x00400000),
- EXTERNAL_CAR_TIME = (((0x0608 + 0x10000000) + 0x01000000) + 0x00500000),
- ANDROID_EPOCH_TIME = (((0x0606 + 0x10000000) + 0x01000000) + 0x00500000),
- STORAGE_ENCRYPTION_BINDING_SEED = (((0x0607 + 0x10000000) + 0x01000000) + 0x00700000),
- ENV_OUTSIDE_TEMPERATURE = (((0x0703 + 0x10000000) + 0x01000000) + 0x00600000),
- AP_POWER_STATE_REQ = (((0x0A00 + 0x10000000) + 0x01000000) + 0x00410000),
- AP_POWER_STATE_REPORT = (((0x0A01 + 0x10000000) + 0x01000000) + 0x00410000),
- AP_POWER_BOOTUP_REASON = (((0x0A02 + 0x10000000) + 0x01000000) + 0x00400000),
- DISPLAY_BRIGHTNESS = (((0x0A03 + 0x10000000) + 0x01000000) + 0x00400000),
- HW_KEY_INPUT = (((0x0A10 + 0x10000000) + 0x01000000) + 0x00410000),
- HW_KEY_INPUT_V2 = (((0x0A11 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.MIXED),
- HW_MOTION_INPUT = (((0x0A12 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.MIXED),
- HW_ROTARY_INPUT = (((0x0A20 + 0x10000000) + 0x01000000) + 0x00410000),
- HW_CUSTOM_INPUT = (((0X0A30 + 0x10000000) + 0x01000000) + 0x00410000),
- DOOR_POS = (((0x0B00 + 0x10000000) + 0x06000000) + 0x00400000),
- DOOR_MOVE = (((0x0B01 + 0x10000000) + 0x06000000) + 0x00400000),
- DOOR_LOCK = (((0x0B02 + 0x10000000) + 0x06000000) + 0x00200000),
- DOOR_CHILD_LOCK_ENABLED = (((0x0B03 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.DOOR) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- MIRROR_Z_POS = (((0x0B40 + 0x10000000) + 0x04000000) + 0x00400000),
- MIRROR_Z_MOVE = (((0x0B41 + 0x10000000) + 0x04000000) + 0x00400000),
- MIRROR_Y_POS = (((0x0B42 + 0x10000000) + 0x04000000) + 0x00400000),
- MIRROR_Y_MOVE = (((0x0B43 + 0x10000000) + 0x04000000) + 0x00400000),
- MIRROR_LOCK = (((0x0B44 + 0x10000000) + 0x01000000) + 0x00200000),
- MIRROR_FOLD = (((0x0B45 + 0x10000000) + 0x01000000) + 0x00200000),
- MIRROR_AUTO_FOLD_ENABLED = (((0x0B46 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.MIRROR) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- MIRROR_AUTO_TILT_ENABLED = (((0x0B47 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.MIRROR) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- SEAT_MEMORY_SELECT = (((0x0B80 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_MEMORY_SET = (((0x0B81 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_BELT_BUCKLED = (((0x0B82 + 0x10000000) + 0x05000000) + 0x00200000),
- SEAT_BELT_HEIGHT_POS = (((0x0B83 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_BELT_HEIGHT_MOVE = (((0x0B84 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_FORE_AFT_POS = (((0x0B85 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_FORE_AFT_MOVE = (((0x0B86 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_BACKREST_ANGLE_1_POS = (((0x0B87 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_BACKREST_ANGLE_1_MOVE = (((0x0B88 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_BACKREST_ANGLE_2_POS = (((0x0B89 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_BACKREST_ANGLE_2_MOVE = (((0x0B8A + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_HEIGHT_POS = (((0x0B8B + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_HEIGHT_MOVE = (((0x0B8C + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_DEPTH_POS = (((0x0B8D + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_DEPTH_MOVE = (((0x0B8E + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_TILT_POS = (((0x0B8F + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_TILT_MOVE = (((0x0B90 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_LUMBAR_FORE_AFT_POS = (((0x0B91 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_LUMBAR_FORE_AFT_MOVE = (((0x0B92 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_LUMBAR_SIDE_SUPPORT_POS = (((0x0B93 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_LUMBAR_SIDE_SUPPORT_MOVE = (((0x0B94 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_HEADREST_HEIGHT_POS = (((0x0B95 + 0x10000000) + 0x01000000) + 0x00400000),
- SEAT_HEADREST_HEIGHT_POS_V2 = (((0x0BA4 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- SEAT_HEADREST_HEIGHT_MOVE = (((0x0B96 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_HEADREST_ANGLE_POS = (((0x0B97 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_HEADREST_ANGLE_MOVE = (((0x0B98 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_HEADREST_FORE_AFT_POS = (((0x0B99 + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_HEADREST_FORE_AFT_MOVE = (((0x0B9A + 0x10000000) + 0x05000000) + 0x00400000),
- SEAT_FOOTWELL_LIGHTS_STATE = (((0x0B9B + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- SEAT_FOOTWELL_LIGHTS_SWITCH = (((0x0B9C + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- SEAT_EASY_ACCESS_ENABLED = (((0x0B9D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- SEAT_AIRBAG_ENABLED = (((0x0B9E + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- SEAT_CUSHION_SIDE_SUPPORT_POS = (((0x0B9F + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- SEAT_CUSHION_SIDE_SUPPORT_MOVE = (((0x0BA0 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- SEAT_LUMBAR_VERTICAL_POS = (((0x0BA1 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- SEAT_LUMBAR_VERTICAL_MOVE = (((0x0BA2 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- SEAT_WALK_IN_POS = (((0x0BA3 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- SEAT_OCCUPANCY = (((0x0BB0 + 0x10000000) + 0x05000000) + 0x00400000),
- WINDOW_POS = (((0x0BC0 + 0x10000000) + 0x03000000) + 0x00400000),
- WINDOW_MOVE = (((0x0BC1 + 0x10000000) + 0x03000000) + 0x00400000),
- WINDOW_LOCK = (((0x0BC4 + 0x10000000) + 0x03000000) + 0x00200000),
- STEERING_WHEEL_DEPTH_POS = (((0x0BE0 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- STEERING_WHEEL_DEPTH_MOVE = (((0x0BE1 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- STEERING_WHEEL_HEIGHT_POS = (((0x0BE2 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- STEERING_WHEEL_HEIGHT_MOVE = (((0x0BE3 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- STEERING_WHEEL_THEFT_LOCK_ENABLED = (((0x0BE4 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- STEERING_WHEEL_LOCKED = (((0x0BE5 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- STEERING_WHEEL_EASY_ACCESS_ENABLED = (((0x0BE6 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- VEHICLE_MAP_SERVICE = (((0x0C00 + 0x10000000) + 0x01000000) + 0x00e00000),
- OBD2_LIVE_FRAME = (((0x0D00 + 0x10000000) + 0x01000000) + 0x00e00000),
- OBD2_FREEZE_FRAME = (((0x0D01 + 0x10000000) + 0x01000000) + 0x00e00000),
- OBD2_FREEZE_FRAME_INFO = (((0x0D02 + 0x10000000) + 0x01000000) + 0x00e00000),
- OBD2_FREEZE_FRAME_CLEAR = (((0x0D03 + 0x10000000) + 0x01000000) + 0x00e00000),
- HEADLIGHTS_STATE = (((0x0E00 + 0x10000000) + 0x01000000) + 0x00400000),
- HIGH_BEAM_LIGHTS_STATE = (((0x0E01 + 0x10000000) + 0x01000000) + 0x00400000),
- FOG_LIGHTS_STATE = (((0x0E02 + 0x10000000) + 0x01000000) + 0x00400000),
- HAZARD_LIGHTS_STATE = (((0x0E03 + 0x10000000) + 0x01000000) + 0x00400000),
- HEADLIGHTS_SWITCH = (((0x0E10 + 0x10000000) + 0x01000000) + 0x00400000),
- HIGH_BEAM_LIGHTS_SWITCH = (((0x0E11 + 0x10000000) + 0x01000000) + 0x00400000),
- FOG_LIGHTS_SWITCH = (((0x0E12 + 0x10000000) + 0x01000000) + 0x00400000),
- HAZARD_LIGHTS_SWITCH = (((0x0E13 + 0x10000000) + 0x01000000) + 0x00400000),
- CABIN_LIGHTS_STATE = (((0x0F01 + 0x10000000) + 0x01000000) + 0x00400000),
- CABIN_LIGHTS_SWITCH = (((0x0F02 + 0x10000000) + 0x01000000) + 0x00400000),
- READING_LIGHTS_STATE = (((0x0F03 + 0x10000000) + 0x05000000) + 0x00400000),
- READING_LIGHTS_SWITCH = (((0x0F04 + 0x10000000) + 0x05000000) + 0x00400000),
- STEERING_WHEEL_LIGHTS_STATE = (((0x0F0C + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- STEERING_WHEEL_LIGHTS_SWITCH = (((0x0F0D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- SUPPORT_CUSTOMIZE_VENDOR_PERMISSION = (((0x0F05 + 0x10000000) + 0x01000000) + 0x00200000),
- DISABLED_OPTIONAL_FEATURES = (((0x0F06 + 0x10000000) + 0x01000000) + 0x00100000),
- INITIAL_USER_INFO = (((0x0F07 + 0x10000000) + 0x01000000) + 0x00e00000),
- SWITCH_USER = (((0x0F08 + 0x10000000) + 0x01000000) + 0x00e00000),
- CREATE_USER = (((0x0F09 + 0x10000000) + 0x01000000) + 0x00e00000),
- REMOVE_USER = (((0x0F0A + 0x10000000) + 0x01000000) + 0x00e00000),
- USER_IDENTIFICATION_ASSOCIATION = (((0x0F0B + 0x10000000) + 0x01000000) + 0x00e00000),
- EVS_SERVICE_REQUEST = (((0x0F10 + 0x10000000) + 0x01000000) + 0x00410000),
- POWER_POLICY_REQ = (((0x0F21 + 0x10000000) + 0x01000000) + 0x00100000),
- POWER_POLICY_GROUP_REQ = (((0x0F22 + 0x10000000) + 0x01000000) + 0x00100000),
- CURRENT_POWER_POLICY = (((0x0F23 + 0x10000000) + 0x01000000) + 0x00100000),
- WATCHDOG_ALIVE = (((0xF31 + 0x10000000) + 0x01000000) + 0x00500000),
- WATCHDOG_TERMINATED_PROCESS = (((0x0F32 + 0x10000000) + 0x01000000) + 0x00e00000),
- VHAL_HEARTBEAT = (((0x0F33 + 0x10000000) + 0x01000000) + 0x00500000),
- CLUSTER_SWITCH_UI = (((0x0F34 + 0x10000000) + 0x01000000) + 0x00400000),
- CLUSTER_DISPLAY_STATE = (((0x0F35 + 0x10000000) + 0x01000000) + 0x00410000),
- CLUSTER_REPORT_STATE = (((0x0F36 + 0x10000000) + 0x01000000) + 0x00e00000),
- CLUSTER_REQUEST_DISPLAY = (((0x0F37 + 0x10000000) + 0x01000000) + 0x00400000),
- CLUSTER_NAVIGATION_STATE = (((0x0F38 + 0x10000000) + 0x01000000) + 0x00700000),
- ELECTRONIC_TOLL_COLLECTION_CARD_TYPE = (((0x0F39 + 0x10000000) + 0x01000000) + 0x00400000),
- ELECTRONIC_TOLL_COLLECTION_CARD_STATUS = (((0x0F3A + 0x10000000) + 0x01000000) + 0x00400000),
- FRONT_FOG_LIGHTS_STATE = (((0x0F3B + 0x10000000) + 0x01000000) + 0x00400000),
- FRONT_FOG_LIGHTS_SWITCH = (((0x0F3C + 0x10000000) + 0x01000000) + 0x00400000),
- REAR_FOG_LIGHTS_STATE = (((0x0F3D + 0x10000000) + 0x01000000) + 0x00400000),
- REAR_FOG_LIGHTS_SWITCH = (((0x0F3E + 0x10000000) + 0x01000000) + 0x00400000),
- EV_CHARGE_CURRENT_DRAW_LIMIT = (((0x0F3F + 0x10000000) + 0x01000000) + 0x00600000),
- EV_CHARGE_PERCENT_LIMIT = (((0x0F40 + 0x10000000) + 0x01000000) + 0x00600000),
- EV_CHARGE_STATE = (((0x0F41 + 0x10000000) + 0x01000000) + 0x00400000),
- EV_CHARGE_SWITCH = (((0x0F42 + 0x10000000) + 0x01000000) + 0x00200000),
- EV_CHARGE_TIME_REMAINING = (((0x0F43 + 0x10000000) + 0x01000000) + 0x00400000),
- EV_REGENERATIVE_BRAKING_STATE = (((0x0F44 + 0x10000000) + 0x01000000) + 0x00400000),
- TRAILER_PRESENT = (((0x0F45 + 0x10000000) + 0x01000000) + 0x00400000),
- VEHICLE_CURB_WEIGHT = (((0x0F46 + 0x10000000) + 0x01000000) + 0x00400000),
- GENERAL_SAFETY_REGULATION_COMPLIANCE_REQUIREMENT = (((0x0F47 + 0x10000000) + 0x01000000) + 0x00400000),
- SUPPORTED_PROPERTY_IDS = (((0x0F48 + 0x10000000) + 0x01000000) + 0x00410000),
- SHUTDOWN_REQUEST = (((0x0F49 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- AUTOMATIC_EMERGENCY_BRAKING_ENABLED = (((0x1000 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- AUTOMATIC_EMERGENCY_BRAKING_STATE = (((0x1001 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- FORWARD_COLLISION_WARNING_ENABLED = (((0x1002 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- FORWARD_COLLISION_WARNING_STATE = (((0x1003 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- BLIND_SPOT_WARNING_ENABLED = (((0x1004 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- BLIND_SPOT_WARNING_STATE = (((0x1005 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.MIRROR) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32),
- LANE_DEPARTURE_WARNING_ENABLED = (((0x1006 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- LANE_KEEP_ASSIST_ENABLED = (((0x1008 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- LANE_CENTERING_ASSIST_ENABLED = (((0x100A + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- EMERGENCY_LANE_KEEP_ASSIST_ENABLED = (((0x100D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- ADAPTIVE_CRUISE_CONTROL_ENABLED = (((0x100F + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- HANDS_ON_DETECTION_ENABLED = (((0x1016 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
- DRIVER_ATTENTION_MONITORING_ENABLED = (((0x1019 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN),
+ INFO_VIN = (((0x0100 + 0x10000000) + 0x01000000) + 0x00100000) /* 286261504 */,
+ INFO_MAKE = (((0x0101 + 0x10000000) + 0x01000000) + 0x00100000) /* 286261505 */,
+ INFO_MODEL = (((0x0102 + 0x10000000) + 0x01000000) + 0x00100000) /* 286261506 */,
+ INFO_MODEL_YEAR = (((0x0103 + 0x10000000) + 0x01000000) + 0x00400000) /* 289407235 */,
+ INFO_FUEL_CAPACITY = (((0x0104 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504388 */,
+ INFO_FUEL_TYPE = (((0x0105 + 0x10000000) + 0x01000000) + 0x00410000) /* 289472773 */,
+ INFO_EV_BATTERY_CAPACITY = (((0x0106 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504390 */,
+ INFO_EV_CONNECTOR_TYPE = (((0x0107 + 0x10000000) + 0x01000000) + 0x00410000) /* 289472775 */,
+ INFO_FUEL_DOOR_LOCATION = (((0x0108 + 0x10000000) + 0x01000000) + 0x00400000) /* 289407240 */,
+ INFO_EV_PORT_LOCATION = (((0x0109 + 0x10000000) + 0x01000000) + 0x00400000) /* 289407241 */,
+ INFO_DRIVER_SEAT = (((0x010A + 0x10000000) + 0x05000000) + 0x00400000) /* 356516106 */,
+ INFO_EXTERIOR_DIMENSIONS = (((0x010B + 0x10000000) + 0x01000000) + 0x00410000) /* 289472779 */,
+ INFO_MULTI_EV_PORT_LOCATIONS = (((0x010C + 0x10000000) + 0x01000000) + 0x00410000) /* 289472780 */,
+ PERF_ODOMETER = (((0x0204 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504644 */,
+ PERF_VEHICLE_SPEED = (((0x0207 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504647 */,
+ PERF_VEHICLE_SPEED_DISPLAY = (((0x0208 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504648 */,
+ PERF_STEERING_ANGLE = (((0x0209 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504649 */,
+ PERF_REAR_STEERING_ANGLE = (((0x0210 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504656 */,
+ ENGINE_COOLANT_TEMP = (((0x0301 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504897 */,
+ ENGINE_OIL_LEVEL = (((0x0303 + 0x10000000) + 0x01000000) + 0x00400000) /* 289407747 */,
+ ENGINE_OIL_TEMP = (((0x0304 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504900 */,
+ ENGINE_RPM = (((0x0305 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504901 */,
+ WHEEL_TICK = (((0x0306 + 0x10000000) + 0x01000000) + 0x00510000) /* 290521862 */,
+ FUEL_LEVEL = (((0x0307 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504903 */,
+ FUEL_DOOR_OPEN = (((0x0308 + 0x10000000) + 0x01000000) + 0x00200000) /* 287310600 */,
+ EV_BATTERY_LEVEL = (((0x0309 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504905 */,
+ EV_CURRENT_BATTERY_CAPACITY = (((0x030D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.FLOAT) /* 291504909 */,
+ EV_CHARGE_PORT_OPEN = (((0x030A + 0x10000000) + 0x01000000) + 0x00200000) /* 287310602 */,
+ EV_CHARGE_PORT_CONNECTED = (((0x030B + 0x10000000) + 0x01000000) + 0x00200000) /* 287310603 */,
+ EV_BATTERY_INSTANTANEOUS_CHARGE_RATE = (((0x030C + 0x10000000) + 0x01000000) + 0x00600000) /* 291504908 */,
+ RANGE_REMAINING = (((0x0308 + 0x10000000) + 0x01000000) + 0x00600000) /* 291504904 */,
+ TIRE_PRESSURE = (((0x0309 + 0x10000000) + 0x07000000) + 0x00600000) /* 392168201 */,
+ CRITICALLY_LOW_TIRE_PRESSURE = (((0x030A + 0x10000000) + 0x07000000) + 0x00600000) /* 392168202 */,
+ ENGINE_IDLE_AUTO_STOP_ENABLED = (((0x0320 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287310624 */,
+ GEAR_SELECTION = (((0x0400 + 0x10000000) + 0x01000000) + 0x00400000) /* 289408000 */,
+ CURRENT_GEAR = (((0x0401 + 0x10000000) + 0x01000000) + 0x00400000) /* 289408001 */,
+ PARKING_BRAKE_ON = (((0x0402 + 0x10000000) + 0x01000000) + 0x00200000) /* 287310850 */,
+ PARKING_BRAKE_AUTO_APPLY = (((0x0403 + 0x10000000) + 0x01000000) + 0x00200000) /* 287310851 */,
+ EV_BRAKE_REGENERATION_LEVEL = (((0x040C + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289408012 */,
+ FUEL_LEVEL_LOW = (((0x0405 + 0x10000000) + 0x01000000) + 0x00200000) /* 287310853 */,
+ NIGHT_MODE = (((0x0407 + 0x10000000) + 0x01000000) + 0x00200000) /* 287310855 */,
+ TURN_SIGNAL_STATE = (((0x0408 + 0x10000000) + 0x01000000) + 0x00400000) /* 289408008 */,
+ IGNITION_STATE = (((0x0409 + 0x10000000) + 0x01000000) + 0x00400000) /* 289408009 */,
+ ABS_ACTIVE = (((0x040A + 0x10000000) + 0x01000000) + 0x00200000) /* 287310858 */,
+ TRACTION_CONTROL_ACTIVE = (((0x040B + 0x10000000) + 0x01000000) + 0x00200000) /* 287310859 */,
+ EV_STOPPING_MODE = (((0x040D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289408013 */,
+ HVAC_FAN_SPEED = (((0x0500 + 0x10000000) + 0x05000000) + 0x00400000) /* 356517120 */,
+ HVAC_FAN_DIRECTION = (((0x0501 + 0x10000000) + 0x05000000) + 0x00400000) /* 356517121 */,
+ HVAC_TEMPERATURE_CURRENT = (((0x0502 + 0x10000000) + 0x05000000) + 0x00600000) /* 358614274 */,
+ HVAC_TEMPERATURE_SET = (((0x0503 + 0x10000000) + 0x05000000) + 0x00600000) /* 358614275 */,
+ HVAC_DEFROSTER = (((0x0504 + 0x10000000) + 0x03000000) + 0x00200000) /* 320865540 */,
+ HVAC_AC_ON = (((0x0505 + 0x10000000) + 0x05000000) + 0x00200000) /* 354419973 */,
+ HVAC_MAX_AC_ON = (((0x0506 + 0x10000000) + 0x05000000) + 0x00200000) /* 354419974 */,
+ HVAC_MAX_DEFROST_ON = (((0x0507 + 0x10000000) + 0x05000000) + 0x00200000) /* 354419975 */,
+ HVAC_RECIRC_ON = (((0x0508 + 0x10000000) + 0x05000000) + 0x00200000) /* 354419976 */,
+ HVAC_DUAL_ON = (((0x0509 + 0x10000000) + 0x05000000) + 0x00200000) /* 354419977 */,
+ HVAC_AUTO_ON = (((0x050A + 0x10000000) + 0x05000000) + 0x00200000) /* 354419978 */,
+ HVAC_SEAT_TEMPERATURE = (((0x050B + 0x10000000) + 0x05000000) + 0x00400000) /* 356517131 */,
+ HVAC_SIDE_MIRROR_HEAT = (((0x050C + 0x10000000) + 0x04000000) + 0x00400000) /* 339739916 */,
+ HVAC_STEERING_WHEEL_HEAT = (((0x050D + 0x10000000) + 0x01000000) + 0x00400000) /* 289408269 */,
+ HVAC_TEMPERATURE_DISPLAY_UNITS = (((0x050E + 0x10000000) + 0x01000000) + 0x00400000) /* 289408270 */,
+ HVAC_ACTUAL_FAN_SPEED_RPM = (((0x050F + 0x10000000) + 0x05000000) + 0x00400000) /* 356517135 */,
+ HVAC_POWER_ON = (((0x0510 + 0x10000000) + 0x05000000) + 0x00200000) /* 354419984 */,
+ HVAC_FAN_DIRECTION_AVAILABLE = (((0x0511 + 0x10000000) + 0x05000000) + 0x00410000) /* 356582673 */,
+ HVAC_AUTO_RECIRC_ON = (((0x0512 + 0x10000000) + 0x05000000) + 0x00200000) /* 354419986 */,
+ HVAC_SEAT_VENTILATION = (((0x0513 + 0x10000000) + 0x05000000) + 0x00400000) /* 356517139 */,
+ HVAC_ELECTRIC_DEFROSTER_ON = (((0x0514 + 0x10000000) + 0x03000000) + 0x00200000) /* 320865556 */,
+ HVAC_TEMPERATURE_VALUE_SUGGESTION = (((0x0515 + 0x10000000) + 0x01000000) + 0x00610000) /* 291570965 */,
+ DISTANCE_DISPLAY_UNITS = (((0x0600 + 0x10000000) + 0x01000000) + 0x00400000) /* 289408512 */,
+ FUEL_VOLUME_DISPLAY_UNITS = (((0x0601 + 0x10000000) + 0x01000000) + 0x00400000) /* 289408513 */,
+ TIRE_PRESSURE_DISPLAY_UNITS = (((0x0602 + 0x10000000) + 0x01000000) + 0x00400000) /* 289408514 */,
+ EV_BATTERY_DISPLAY_UNITS = (((0x0603 + 0x10000000) + 0x01000000) + 0x00400000) /* 289408515 */,
+ FUEL_CONSUMPTION_UNITS_DISTANCE_OVER_VOLUME = (((0x0604 + 0x10000000) + 0x01000000) + 0x00200000) /* 287311364 */,
+ VEHICLE_SPEED_DISPLAY_UNITS = (((0x0605 + 0x10000000) + 0x01000000) + 0x00400000) /* 289408517 */,
+ EXTERNAL_CAR_TIME = (((0x0608 + 0x10000000) + 0x01000000) + 0x00500000) /* 290457096 */,
+ ANDROID_EPOCH_TIME = (((0x0606 + 0x10000000) + 0x01000000) + 0x00500000) /* 290457094 */,
+ STORAGE_ENCRYPTION_BINDING_SEED = (((0x0607 + 0x10000000) + 0x01000000) + 0x00700000) /* 292554247 */,
+ ENV_OUTSIDE_TEMPERATURE = (((0x0703 + 0x10000000) + 0x01000000) + 0x00600000) /* 291505923 */,
+ AP_POWER_STATE_REQ = (((0x0A00 + 0x10000000) + 0x01000000) + 0x00410000) /* 289475072 */,
+ AP_POWER_STATE_REPORT = (((0x0A01 + 0x10000000) + 0x01000000) + 0x00410000) /* 289475073 */,
+ AP_POWER_BOOTUP_REASON = (((0x0A02 + 0x10000000) + 0x01000000) + 0x00400000) /* 289409538 */,
+ DISPLAY_BRIGHTNESS = (((0x0A03 + 0x10000000) + 0x01000000) + 0x00400000) /* 289409539 */,
+ HW_KEY_INPUT = (((0x0A10 + 0x10000000) + 0x01000000) + 0x00410000) /* 289475088 */,
+ HW_KEY_INPUT_V2 = (((0x0A11 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.MIXED) /* 367004177 */,
+ HW_MOTION_INPUT = (((0x0A12 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.MIXED) /* 367004178 */,
+ HW_ROTARY_INPUT = (((0x0A20 + 0x10000000) + 0x01000000) + 0x00410000) /* 289475104 */,
+ HW_CUSTOM_INPUT = (((0X0A30 + 0x10000000) + 0x01000000) + 0x00410000) /* 289475120 */,
+ DOOR_POS = (((0x0B00 + 0x10000000) + 0x06000000) + 0x00400000) /* 373295872 */,
+ DOOR_MOVE = (((0x0B01 + 0x10000000) + 0x06000000) + 0x00400000) /* 373295873 */,
+ DOOR_LOCK = (((0x0B02 + 0x10000000) + 0x06000000) + 0x00200000) /* 371198722 */,
+ DOOR_CHILD_LOCK_ENABLED = (((0x0B03 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.DOOR) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 371198723 */,
+ MIRROR_Z_POS = (((0x0B40 + 0x10000000) + 0x04000000) + 0x00400000) /* 339741504 */,
+ MIRROR_Z_MOVE = (((0x0B41 + 0x10000000) + 0x04000000) + 0x00400000) /* 339741505 */,
+ MIRROR_Y_POS = (((0x0B42 + 0x10000000) + 0x04000000) + 0x00400000) /* 339741506 */,
+ MIRROR_Y_MOVE = (((0x0B43 + 0x10000000) + 0x04000000) + 0x00400000) /* 339741507 */,
+ MIRROR_LOCK = (((0x0B44 + 0x10000000) + 0x01000000) + 0x00200000) /* 287312708 */,
+ MIRROR_FOLD = (((0x0B45 + 0x10000000) + 0x01000000) + 0x00200000) /* 287312709 */,
+ MIRROR_AUTO_FOLD_ENABLED = (((0x0B46 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.MIRROR) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 337644358 */,
+ MIRROR_AUTO_TILT_ENABLED = (((0x0B47 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.MIRROR) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 337644359 */,
+ SEAT_MEMORY_SELECT = (((0x0B80 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518784 */,
+ SEAT_MEMORY_SET = (((0x0B81 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518785 */,
+ SEAT_BELT_BUCKLED = (((0x0B82 + 0x10000000) + 0x05000000) + 0x00200000) /* 354421634 */,
+ SEAT_BELT_HEIGHT_POS = (((0x0B83 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518787 */,
+ SEAT_BELT_HEIGHT_MOVE = (((0x0B84 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518788 */,
+ SEAT_FORE_AFT_POS = (((0x0B85 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518789 */,
+ SEAT_FORE_AFT_MOVE = (((0x0B86 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518790 */,
+ SEAT_BACKREST_ANGLE_1_POS = (((0x0B87 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518791 */,
+ SEAT_BACKREST_ANGLE_1_MOVE = (((0x0B88 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518792 */,
+ SEAT_BACKREST_ANGLE_2_POS = (((0x0B89 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518793 */,
+ SEAT_BACKREST_ANGLE_2_MOVE = (((0x0B8A + 0x10000000) + 0x05000000) + 0x00400000) /* 356518794 */,
+ SEAT_HEIGHT_POS = (((0x0B8B + 0x10000000) + 0x05000000) + 0x00400000) /* 356518795 */,
+ SEAT_HEIGHT_MOVE = (((0x0B8C + 0x10000000) + 0x05000000) + 0x00400000) /* 356518796 */,
+ SEAT_DEPTH_POS = (((0x0B8D + 0x10000000) + 0x05000000) + 0x00400000) /* 356518797 */,
+ SEAT_DEPTH_MOVE = (((0x0B8E + 0x10000000) + 0x05000000) + 0x00400000) /* 356518798 */,
+ SEAT_TILT_POS = (((0x0B8F + 0x10000000) + 0x05000000) + 0x00400000) /* 356518799 */,
+ SEAT_TILT_MOVE = (((0x0B90 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518800 */,
+ SEAT_LUMBAR_FORE_AFT_POS = (((0x0B91 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518801 */,
+ SEAT_LUMBAR_FORE_AFT_MOVE = (((0x0B92 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518802 */,
+ SEAT_LUMBAR_SIDE_SUPPORT_POS = (((0x0B93 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518803 */,
+ SEAT_LUMBAR_SIDE_SUPPORT_MOVE = (((0x0B94 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518804 */,
+ SEAT_HEADREST_HEIGHT_POS = (((0x0B95 + 0x10000000) + 0x01000000) + 0x00400000) /* 289409941 */,
+ SEAT_HEADREST_HEIGHT_POS_V2 = (((0x0BA4 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 356518820 */,
+ SEAT_HEADREST_HEIGHT_MOVE = (((0x0B96 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518806 */,
+ SEAT_HEADREST_ANGLE_POS = (((0x0B97 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518807 */,
+ SEAT_HEADREST_ANGLE_MOVE = (((0x0B98 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518808 */,
+ SEAT_HEADREST_FORE_AFT_POS = (((0x0B99 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518809 */,
+ SEAT_HEADREST_FORE_AFT_MOVE = (((0x0B9A + 0x10000000) + 0x05000000) + 0x00400000) /* 356518810 */,
+ SEAT_FOOTWELL_LIGHTS_STATE = (((0x0B9B + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 356518811 */,
+ SEAT_FOOTWELL_LIGHTS_SWITCH = (((0x0B9C + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 356518812 */,
+ SEAT_EASY_ACCESS_ENABLED = (((0x0B9D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 354421661 */,
+ SEAT_AIRBAG_ENABLED = (((0x0B9E + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 354421662 */,
+ SEAT_CUSHION_SIDE_SUPPORT_POS = (((0x0B9F + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 356518815 */,
+ SEAT_CUSHION_SIDE_SUPPORT_MOVE = (((0x0BA0 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 356518816 */,
+ SEAT_LUMBAR_VERTICAL_POS = (((0x0BA1 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 356518817 */,
+ SEAT_LUMBAR_VERTICAL_MOVE = (((0x0BA2 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 356518818 */,
+ SEAT_WALK_IN_POS = (((0x0BA3 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.SEAT) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 356518819 */,
+ SEAT_OCCUPANCY = (((0x0BB0 + 0x10000000) + 0x05000000) + 0x00400000) /* 356518832 */,
+ WINDOW_POS = (((0x0BC0 + 0x10000000) + 0x03000000) + 0x00400000) /* 322964416 */,
+ WINDOW_MOVE = (((0x0BC1 + 0x10000000) + 0x03000000) + 0x00400000) /* 322964417 */,
+ WINDOW_LOCK = (((0x0BC4 + 0x10000000) + 0x03000000) + 0x00200000) /* 320867268 */,
+ STEERING_WHEEL_DEPTH_POS = (((0x0BE0 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410016 */,
+ STEERING_WHEEL_DEPTH_MOVE = (((0x0BE1 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410017 */,
+ STEERING_WHEEL_HEIGHT_POS = (((0x0BE2 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410018 */,
+ STEERING_WHEEL_HEIGHT_MOVE = (((0x0BE3 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410019 */,
+ STEERING_WHEEL_THEFT_LOCK_ENABLED = (((0x0BE4 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287312868 */,
+ STEERING_WHEEL_LOCKED = (((0x0BE5 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287312869 */,
+ STEERING_WHEEL_EASY_ACCESS_ENABLED = (((0x0BE6 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287312870 */,
+ VEHICLE_MAP_SERVICE = (((0x0C00 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299895808 */,
+ OBD2_LIVE_FRAME = (((0x0D00 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896064 */,
+ OBD2_FREEZE_FRAME = (((0x0D01 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896065 */,
+ OBD2_FREEZE_FRAME_INFO = (((0x0D02 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896066 */,
+ OBD2_FREEZE_FRAME_CLEAR = (((0x0D03 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896067 */,
+ HEADLIGHTS_STATE = (((0x0E00 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410560 */,
+ HIGH_BEAM_LIGHTS_STATE = (((0x0E01 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410561 */,
+ FOG_LIGHTS_STATE = (((0x0E02 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410562 */,
+ HAZARD_LIGHTS_STATE = (((0x0E03 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410563 */,
+ HEADLIGHTS_SWITCH = (((0x0E10 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410576 */,
+ HIGH_BEAM_LIGHTS_SWITCH = (((0x0E11 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410577 */,
+ FOG_LIGHTS_SWITCH = (((0x0E12 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410578 */,
+ HAZARD_LIGHTS_SWITCH = (((0x0E13 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410579 */,
+ CABIN_LIGHTS_STATE = (((0x0F01 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410817 */,
+ CABIN_LIGHTS_SWITCH = (((0x0F02 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410818 */,
+ READING_LIGHTS_STATE = (((0x0F03 + 0x10000000) + 0x05000000) + 0x00400000) /* 356519683 */,
+ READING_LIGHTS_SWITCH = (((0x0F04 + 0x10000000) + 0x05000000) + 0x00400000) /* 356519684 */,
+ STEERING_WHEEL_LIGHTS_STATE = (((0x0F0C + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410828 */,
+ STEERING_WHEEL_LIGHTS_SWITCH = (((0x0F0D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410829 */,
+ SUPPORT_CUSTOMIZE_VENDOR_PERMISSION = (((0x0F05 + 0x10000000) + 0x01000000) + 0x00200000) /* 287313669 */,
+ DISABLED_OPTIONAL_FEATURES = (((0x0F06 + 0x10000000) + 0x01000000) + 0x00100000) /* 286265094 */,
+ INITIAL_USER_INFO = (((0x0F07 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896583 */,
+ SWITCH_USER = (((0x0F08 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896584 */,
+ CREATE_USER = (((0x0F09 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896585 */,
+ REMOVE_USER = (((0x0F0A + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896586 */,
+ USER_IDENTIFICATION_ASSOCIATION = (((0x0F0B + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896587 */,
+ EVS_SERVICE_REQUEST = (((0x0F10 + 0x10000000) + 0x01000000) + 0x00410000) /* 289476368 */,
+ POWER_POLICY_REQ = (((0x0F21 + 0x10000000) + 0x01000000) + 0x00100000) /* 286265121 */,
+ POWER_POLICY_GROUP_REQ = (((0x0F22 + 0x10000000) + 0x01000000) + 0x00100000) /* 286265122 */,
+ CURRENT_POWER_POLICY = (((0x0F23 + 0x10000000) + 0x01000000) + 0x00100000) /* 286265123 */,
+ WATCHDOG_ALIVE = (((0xF31 + 0x10000000) + 0x01000000) + 0x00500000) /* 290459441 */,
+ WATCHDOG_TERMINATED_PROCESS = (((0x0F32 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896626 */,
+ VHAL_HEARTBEAT = (((0x0F33 + 0x10000000) + 0x01000000) + 0x00500000) /* 290459443 */,
+ CLUSTER_SWITCH_UI = (((0x0F34 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410868 */,
+ CLUSTER_DISPLAY_STATE = (((0x0F35 + 0x10000000) + 0x01000000) + 0x00410000) /* 289476405 */,
+ CLUSTER_REPORT_STATE = (((0x0F36 + 0x10000000) + 0x01000000) + 0x00e00000) /* 299896630 */,
+ CLUSTER_REQUEST_DISPLAY = (((0x0F37 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410871 */,
+ CLUSTER_NAVIGATION_STATE = (((0x0F38 + 0x10000000) + 0x01000000) + 0x00700000) /* 292556600 */,
+ ELECTRONIC_TOLL_COLLECTION_CARD_TYPE = (((0x0F39 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410873 */,
+ ELECTRONIC_TOLL_COLLECTION_CARD_STATUS = (((0x0F3A + 0x10000000) + 0x01000000) + 0x00400000) /* 289410874 */,
+ FRONT_FOG_LIGHTS_STATE = (((0x0F3B + 0x10000000) + 0x01000000) + 0x00400000) /* 289410875 */,
+ FRONT_FOG_LIGHTS_SWITCH = (((0x0F3C + 0x10000000) + 0x01000000) + 0x00400000) /* 289410876 */,
+ REAR_FOG_LIGHTS_STATE = (((0x0F3D + 0x10000000) + 0x01000000) + 0x00400000) /* 289410877 */,
+ REAR_FOG_LIGHTS_SWITCH = (((0x0F3E + 0x10000000) + 0x01000000) + 0x00400000) /* 289410878 */,
+ EV_CHARGE_CURRENT_DRAW_LIMIT = (((0x0F3F + 0x10000000) + 0x01000000) + 0x00600000) /* 291508031 */,
+ EV_CHARGE_PERCENT_LIMIT = (((0x0F40 + 0x10000000) + 0x01000000) + 0x00600000) /* 291508032 */,
+ EV_CHARGE_STATE = (((0x0F41 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410881 */,
+ EV_CHARGE_SWITCH = (((0x0F42 + 0x10000000) + 0x01000000) + 0x00200000) /* 287313730 */,
+ EV_CHARGE_TIME_REMAINING = (((0x0F43 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410883 */,
+ EV_REGENERATIVE_BRAKING_STATE = (((0x0F44 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410884 */,
+ TRAILER_PRESENT = (((0x0F45 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410885 */,
+ VEHICLE_CURB_WEIGHT = (((0x0F46 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410886 */,
+ GENERAL_SAFETY_REGULATION_COMPLIANCE_REQUIREMENT = (((0x0F47 + 0x10000000) + 0x01000000) + 0x00400000) /* 289410887 */,
+ SUPPORTED_PROPERTY_IDS = (((0x0F48 + 0x10000000) + 0x01000000) + 0x00410000) /* 289476424 */,
+ SHUTDOWN_REQUEST = (((0x0F49 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289410889 */,
+ VEHICLE_IN_USE = (((0x0F4A + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313738 */,
+ AUTOMATIC_EMERGENCY_BRAKING_ENABLED = (((0x1000 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313920 */,
+ AUTOMATIC_EMERGENCY_BRAKING_STATE = (((0x1001 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411073 */,
+ FORWARD_COLLISION_WARNING_ENABLED = (((0x1002 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313922 */,
+ FORWARD_COLLISION_WARNING_STATE = (((0x1003 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 289411075 */,
+ BLIND_SPOT_WARNING_ENABLED = (((0x1004 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313924 */,
+ BLIND_SPOT_WARNING_STATE = (((0x1005 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.MIRROR) + android.hardware.automotive.vehicle.VehiclePropertyType.INT32) /* 339742725 */,
+ LANE_DEPARTURE_WARNING_ENABLED = (((0x1006 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313926 */,
+ LANE_KEEP_ASSIST_ENABLED = (((0x1008 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313928 */,
+ LANE_CENTERING_ASSIST_ENABLED = (((0x100A + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313930 */,
+ EMERGENCY_LANE_KEEP_ASSIST_ENABLED = (((0x100D + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313933 */,
+ ADAPTIVE_CRUISE_CONTROL_ENABLED = (((0x100F + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313935 */,
+ HANDS_ON_DETECTION_ENABLED = (((0x1016 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313942 */,
+ DRIVER_ATTENTION_MONITORING_ENABLED = (((0x1019 + android.hardware.automotive.vehicle.VehiclePropertyGroup.SYSTEM) + android.hardware.automotive.vehicle.VehicleArea.GLOBAL) + android.hardware.automotive.vehicle.VehiclePropertyType.BOOLEAN) /* 287313945 */,
}
diff --git a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
index 39d8433..d336dae 100644
--- a/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
+++ b/automotive/vehicle/aidl_property/android/hardware/automotive/vehicle/VehicleProperty.aidl
@@ -3418,6 +3418,34 @@
SHUTDOWN_REQUEST =
0x0F49 + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.INT32,
+ /**
+ * Whether the vehicle is currently in use.
+ *
+ * <p>In-use means a human user is present and is intended to use the vehicle. This doesn't
+ * necessarily means the human user is in the vehicle. For example, if the human user unlocks
+ * the vehicle remotely, the vehicle is considered in use.
+ *
+ * <p>If this property is supported:
+ *
+ * <p>Each time user powers on the vehicle or the system detects the user is present,
+ * VEHICLE_IN_USE must be set to true. Each time user powers off the vehicle or the system
+ * detects the user is not present, VEHICLE_IN_USE must be set to false.
+ *
+ * <p>This property is different than AP_POWER_BOOTUP_REASON in the sense that
+ * AP_POWER_BOOTUP_REASON is only set once during the system bootup. However, this property
+ * might change multiple times during a system bootup cycle.
+ *
+ * <p>For example, a device is currently not in use. The system bootup to execute a remote task.
+ * VEHICLE_IN_USE is false. While the remote task is executing, the user enters the vehicle and
+ * powers on the vehicle. VEHICLE_IN_USE is set to true. After a driving session, user powers
+ * off the vehicle, VEHICLE_IN_USE is set to false.
+ *
+ * @change_mode VehiclePropertyChangeMode.ON_CHANGE
+ * @access VehiclePropertyAccess.READ_WRITE
+ */
+ VEHICLE_IN_USE =
+ 0x0F4A + VehiclePropertyGroup.SYSTEM + VehicleArea.GLOBAL + VehiclePropertyType.BOOLEAN,
+
/***************************************************************************
* Start of ADAS Properties
* Allocate IDs in range of 0x1000 (inclusive) to 0x1100 (exclusive) for ADAS properties
diff --git a/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/OperationContext.aidl b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/OperationContext.aidl
index 5e184bc..305e422 100644
--- a/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/OperationContext.aidl
+++ b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/OperationContext.aidl
@@ -39,4 +39,5 @@
android.hardware.biometrics.common.OperationReason reason = android.hardware.biometrics.common.OperationReason.UNKNOWN;
boolean isAod = false;
boolean isCrypto = false;
+ android.hardware.biometrics.common.WakeReason wakeReason = android.hardware.biometrics.common.WakeReason.UNKNOWN;
}
diff --git a/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/OperationReason.aidl b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/OperationReason.aidl
index a5b2990..188054a 100644
--- a/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/OperationReason.aidl
+++ b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/OperationReason.aidl
@@ -35,7 +35,7 @@
/* @hide */
@Backing(type="byte") @VintfStability
enum OperationReason {
- UNKNOWN = 0,
- BIOMETRIC_PROMPT = 1,
- KEYGUARD = 2,
+ UNKNOWN,
+ BIOMETRIC_PROMPT,
+ KEYGUARD,
}
diff --git a/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/SensorStrength.aidl b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/SensorStrength.aidl
index aa77322..c931781 100644
--- a/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/SensorStrength.aidl
+++ b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/SensorStrength.aidl
@@ -35,7 +35,7 @@
/* @hide */
@Backing(type="byte") @VintfStability
enum SensorStrength {
- CONVENIENCE = 0,
- WEAK = 1,
- STRONG = 2,
+ CONVENIENCE,
+ WEAK,
+ STRONG,
}
diff --git a/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/WakeReason.aidl b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/WakeReason.aidl
new file mode 100644
index 0000000..6a08776
--- /dev/null
+++ b/biometrics/common/aidl/aidl_api/android.hardware.biometrics.common/current/android/hardware/biometrics/common/WakeReason.aidl
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2023 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.biometrics.common;
+/* @hide */
+@Backing(type="int") @VintfStability
+enum WakeReason {
+ UNKNOWN,
+ POWER_BUTTON,
+ GESTURE,
+ WAKE_KEY,
+ WAKE_MOTION,
+ LID,
+ DISPLAY_GROUP_ADDED,
+ TAP,
+ LIFT,
+ BIOMETRIC,
+}
diff --git a/biometrics/common/aidl/android/hardware/biometrics/common/OperationContext.aidl b/biometrics/common/aidl/android/hardware/biometrics/common/OperationContext.aidl
index a1c7a1f..a8f768d 100644
--- a/biometrics/common/aidl/android/hardware/biometrics/common/OperationContext.aidl
+++ b/biometrics/common/aidl/android/hardware/biometrics/common/OperationContext.aidl
@@ -17,6 +17,7 @@
package android.hardware.biometrics.common;
import android.hardware.biometrics.common.OperationReason;
+import android.hardware.biometrics.common.WakeReason;
/**
* Additional context associated with an operation.
@@ -47,4 +48,14 @@
/** Flag indicating that crypto was requested. */
boolean isCrypto = false;
+
+ /**
+ * An associated wake reason for this operation or WakeReason.UNKNOWN if this
+ * operation was not associated with a device wake up event.
+ *
+ * This should be interpreted as a hint to enable optimizations or tracing. The
+ * framework may choose to use WakeReason.UNKNOWN at any time based on the device's
+ * policy.
+ */
+ WakeReason wakeReason = WakeReason.UNKNOWN;
}
diff --git a/biometrics/common/aidl/android/hardware/biometrics/common/OperationReason.aidl b/biometrics/common/aidl/android/hardware/biometrics/common/OperationReason.aidl
index a93cebc..1775c43 100644
--- a/biometrics/common/aidl/android/hardware/biometrics/common/OperationReason.aidl
+++ b/biometrics/common/aidl/android/hardware/biometrics/common/OperationReason.aidl
@@ -15,7 +15,9 @@
*/
package android.hardware.biometrics.common;
+
/**
+ * The reason for invoking an operation.
* @hide
*/
@VintfStability
diff --git a/biometrics/common/aidl/android/hardware/biometrics/common/WakeReason.aidl b/biometrics/common/aidl/android/hardware/biometrics/common/WakeReason.aidl
new file mode 100644
index 0000000..2f36b00
--- /dev/null
+++ b/biometrics/common/aidl/android/hardware/biometrics/common/WakeReason.aidl
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2023 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.biometrics.common;
+
+/**
+ * The wake event associated with an operation, if applicable.
+ *
+ * The events largely shadow constants defined in PowerManager but they may deviate over time.
+ * @hide
+ */
+@VintfStability
+@Backing(type="int")
+enum WakeReason {
+ /**
+ * A normal operation without an explicit reason.
+ */
+ UNKNOWN,
+
+ /**
+ * Waking up due to power button press.
+ */
+ POWER_BUTTON,
+
+ /**
+ * Waking up due to a user performed gesture. This includes user
+ * interactions with UI on the screen such as the notification shade. This does not include
+ * WakeReason.TAP or WakeReason.LIFT.
+ */
+ GESTURE,
+
+ /**
+ * Waking up because a wake key other than power was pressed.
+ */
+ WAKE_KEY,
+
+ /**
+ * Waking up because a wake motion was performed.
+ */
+ WAKE_MOTION,
+
+ /**
+ * Waking due to the lid being opened.
+ */
+ LID,
+
+ /**
+ * Waking due to display group being added.
+ */
+ DISPLAY_GROUP_ADDED,
+
+ /**
+ * Waking up due to the user single or double tapping on the screen. This
+ * wake reason is used when the user is not tapping on a specific UI element; rather, the device
+ * wakes up due to a generic tap on the screen.
+ */
+ TAP,
+
+ /**
+ * Waking up due to a user performed lift gesture.
+ */
+ LIFT,
+
+ /**
+ * Waking up due to a user interacting with a biometric.
+ */
+ BIOMETRIC,
+}
diff --git a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
index e9b74b7..128ef61 100644
--- a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
+++ b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
@@ -1566,6 +1566,7 @@
};
for (auto& lc3_config : lc3_codec_configs) {
+ le_audio_broadcast_config.streamMap.resize(1);
le_audio_broadcast_config.streamMap[0]
.leAudioCodecConfig.set<LeAudioCodecConfiguration::lc3Config>(
lc3_config);
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp
index 1dec900..0a804bb 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.cpp
@@ -200,13 +200,21 @@
GetUnicastCapability(scenario.getEncode());
UnicastCapability unicast_decode_capability =
GetUnicastCapability(scenario.getDecode());
- // encode and decode cannot be unknown at the same time
- if (unicast_encode_capability.codecType == CodecType::UNKNOWN &&
- unicast_decode_capability.codecType == CodecType::UNKNOWN) {
- continue;
- }
BroadcastCapability broadcast_capability = {.codecType =
CodecType::UNKNOWN};
+
+ if (scenario.hasBroadcast()) {
+ broadcast_capability = GetBroadcastCapability(scenario.getBroadcast());
+ }
+
+ // At least one capability should be valid
+ if (unicast_encode_capability.codecType == CodecType::UNKNOWN &&
+ unicast_decode_capability.codecType == CodecType::UNKNOWN &&
+ broadcast_capability.codecType == CodecType::UNKNOWN) {
+ LOG(ERROR) << __func__ << ": None of the capability is valid.";
+ continue;
+ }
+
le_audio_codec_capabilities.push_back(
{.unicastEncodeCapability = unicast_encode_capability,
.unicastDecodeCapability = unicast_decode_capability,
@@ -252,6 +260,54 @@
return {.codecType = CodecType::UNKNOWN};
}
+BroadcastCapability BluetoothLeAudioCodecsProvider::GetBroadcastCapability(
+ const std::string& coding_direction) {
+ if (coding_direction == "invalid") {
+ return {.codecType = CodecType::UNKNOWN};
+ }
+
+ auto configuration_iter = configuration_map_.find(coding_direction);
+ if (configuration_iter == configuration_map_.end()) {
+ return {.codecType = CodecType::UNKNOWN};
+ }
+
+ auto codec_configuration_iter = codec_configuration_map_.find(
+ configuration_iter->second.getCodecConfiguration());
+ if (codec_configuration_iter == codec_configuration_map_.end()) {
+ return {.codecType = CodecType::UNKNOWN};
+ }
+
+ auto strategy_configuration_iter = strategy_configuration_map_.find(
+ configuration_iter->second.getStrategyConfiguration());
+ if (strategy_configuration_iter == strategy_configuration_map_.end()) {
+ return {.codecType = CodecType::UNKNOWN};
+ }
+
+ CodecType codec_type =
+ GetCodecType(codec_configuration_iter->second.getCodec());
+ std::vector<std::optional<Lc3Capabilities>> bcastLc3Cap(
+ 1, std::optional(ComposeLc3Capability(codec_configuration_iter->second)));
+
+ if (codec_type == CodecType::LC3) {
+ return ComposeBroadcastCapability(
+ codec_type,
+ GetAudioLocation(
+ strategy_configuration_iter->second.getAudioLocation()),
+ strategy_configuration_iter->second.getChannelCount(), bcastLc3Cap);
+ }
+ return {.codecType = CodecType::UNKNOWN};
+}
+
+template <class T>
+BroadcastCapability BluetoothLeAudioCodecsProvider::ComposeBroadcastCapability(
+ const CodecType& codec_type, const AudioLocation& audio_location,
+ const uint8_t& channel_count, const std::vector<T>& capability) {
+ return {.codecType = codec_type,
+ .supportedChannel = audio_location,
+ .channelCountPerStream = channel_count,
+ .leAudioCodecCapabilities = std::optional(capability)};
+}
+
template <class T>
UnicastCapability BluetoothLeAudioCodecsProvider::ComposeUnicastCapability(
const CodecType& codec_type, const AudioLocation& audio_location,
@@ -322,6 +378,10 @@
// 1. two connected device, one for L one for R
// 2. one connected device for both L and R
return true;
+ } else if (strategy_configuration.getConnectedDevice() == 0 &&
+ strategy_configuration.getChannelCount() == 2) {
+ // Broadcast
+ return true;
}
} else if (strategy_configuration.getAudioLocation() ==
setting::AudioLocation::MONO) {
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.h b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.h
index e879984..06e4595 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.h
+++ b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProvider.h
@@ -20,6 +20,7 @@
#include <android-base/logging.h>
#include <unordered_map>
+#include <vector>
#include "aidl_android_hardware_bluetooth_audio_setting.h"
@@ -66,12 +67,20 @@
static UnicastCapability GetUnicastCapability(
const std::string& coding_direction);
+ static BroadcastCapability GetBroadcastCapability(
+ const std::string& coding_direction);
+
template <class T>
static inline UnicastCapability ComposeUnicastCapability(
const CodecType& codec_type, const AudioLocation& audio_location,
const uint8_t& device_cnt, const uint8_t& channel_count,
const T& capability);
+ template <class T>
+ static inline BroadcastCapability ComposeBroadcastCapability(
+ const CodecType& codec_type, const AudioLocation& audio_location,
+ const uint8_t& channel_count, const std::vector<T>& capability);
+
static inline Lc3Capabilities ComposeLc3Capability(
const setting::CodecConfiguration& codec_configuration);
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProviderTest.cpp b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProviderTest.cpp
index 5393cd7..dba2749 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProviderTest.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothLeAudioCodecsProviderTest.cpp
@@ -46,7 +46,11 @@
// Define valid components for each list
// Scenario
static const Scenario kValidScenario(std::make_optional("OneChanStereo_16_1"),
- std::make_optional("OneChanStereo_16_1"));
+ std::make_optional("OneChanStereo_16_1"),
+ std::nullopt);
+static const Scenario kValidBroadcastScenario(
+ std::nullopt, std::nullopt, std::make_optional("BcastStereo_16_2"));
+
// Configuration
static const Configuration kValidConfigOneChanStereo_16_1(
std::make_optional("OneChanStereo_16_1"), std::make_optional("LC3_16k_1"),
@@ -69,11 +73,15 @@
std::make_optional("MONO_ONE_CIS_PER_DEVICE"),
std::make_optional(AudioLocation::MONO), std::make_optional(1),
std::make_optional(1));
+static const StrategyConfiguration kValidStrategyBroadcastStereo(
+ std::make_optional("BROADCAST_STEREO"),
+ std::make_optional(AudioLocation::STEREO), std::make_optional(0),
+ std::make_optional(2));
// Define valid test list built from above valid components
// Scenario, Configuration, CodecConfiguration, StrategyConfiguration
-static const std::vector<ScenarioList> kValidScenarioList = {
- ScenarioList(std::vector<Scenario>{kValidScenario})};
+static const std::vector<ScenarioList> kValidScenarioList = {ScenarioList(
+ std::vector<Scenario>{kValidScenario, kValidBroadcastScenario})};
static const std::vector<ConfigurationList> kValidConfigurationList = {
ConfigurationList(
std::vector<Configuration>{kValidConfigOneChanStereo_16_1})};
@@ -84,7 +92,7 @@
kValidStrategyConfigurationList = {
StrategyConfigurationList(std::vector<StrategyConfiguration>{
kValidStrategyStereoOneCis, kValidStrategyStereoTwoCis,
- kValidStrategyMonoOneCis})};
+ kValidStrategyMonoOneCis, kValidStrategyBroadcastStereo})};
class BluetoothLeAudioCodecsProviderTest
: public ::testing::TestWithParam<OffloadSetting> {
@@ -151,13 +159,15 @@
static std::vector<ScenarioList> CreateInvalidScenarios() {
std::vector<ScenarioList> invalid_scenario_test_cases;
invalid_scenario_test_cases.push_back(ScenarioList(std::vector<Scenario>{
- Scenario(std::nullopt, std::make_optional("OneChanStereo_16_1"))}));
-
- invalid_scenario_test_cases.push_back(ScenarioList(std::vector<Scenario>{
- Scenario(std::make_optional("OneChanStereo_16_1"), std::nullopt)}));
+ Scenario(std::nullopt, std::make_optional("OneChanStereo_16_1"),
+ std::nullopt)}));
invalid_scenario_test_cases.push_back(ScenarioList(
- std::vector<Scenario>{Scenario(std::nullopt, std::nullopt)}));
+ std::vector<Scenario>{Scenario(std::make_optional("OneChanStereo_16_1"),
+ std::nullopt, std::nullopt)}));
+
+ invalid_scenario_test_cases.push_back(ScenarioList(std::vector<Scenario>{
+ Scenario(std::nullopt, std::nullopt, std::nullopt)}));
invalid_scenario_test_cases.push_back(
ScenarioList(std::vector<Scenario>{}));
diff --git a/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xml b/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xml
index c7904b3..c8d1af0 100644
--- a/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xml
+++ b/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xml
@@ -40,6 +40,8 @@
<scenario encode="OneChanStereo_16_2" decode="OneChanMono_16_2"/>
<scenario encode="TwoChanStereo_16_2" decode="OneChanMono_16_2"/>
<scenario encode="OneChanMono_16_2" decode="OneChanMono_16_2"/>
+ <!-- broadcast -->
+ <scenario encode="invalid" decode="invalid" broadcast="BcastStereo_16_2"/>
</scenarioList>
<configurationList>
<configuration name="OneChanMono_16_1" codecConfiguration="LC3_16k_1" strategyConfiguration="MONO_ONE_CIS_PER_DEVICE"/>
@@ -48,6 +50,7 @@
<configuration name="OneChanMono_16_2" codecConfiguration="LC3_16k_2" strategyConfiguration="MONO_ONE_CIS_PER_DEVICE"/>
<configuration name="TwoChanStereo_16_2" codecConfiguration="LC3_16k_2" strategyConfiguration="STEREO_TWO_CISES_PER_DEVICE"/>
<configuration name="OneChanStereo_16_2" codecConfiguration="LC3_16k_2" strategyConfiguration="STEREO_ONE_CIS_PER_DEVICE"/>
+ <configuration name="BcastStereo_16_2" codecConfiguration="LC3_16k_2" strategyConfiguration="BROADCAST_STEREO"/>
</configurationList>
<codecConfigurationList>
<codecConfiguration name="LC3_16k_1" codec="LC3" samplingFrequency="16000" frameDurationUs="7500" octetsPerCodecFrame="30"/>
@@ -57,5 +60,6 @@
<strategyConfiguration name="STEREO_ONE_CIS_PER_DEVICE" audioLocation="STEREO" connectedDevice="2" channelCount="1"/>
<strategyConfiguration name="STEREO_TWO_CISES_PER_DEVICE" audioLocation="STEREO" connectedDevice="1" channelCount="2"/>
<strategyConfiguration name="MONO_ONE_CIS_PER_DEVICE" audioLocation="MONO" connectedDevice="1" channelCount="1"/>
+ <strategyConfiguration name="BROADCAST_STEREO" audioLocation="STEREO" connectedDevice="0" channelCount="2"/>
</strategyConfigurationList>
</leAudioOffloadSetting>
diff --git a/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xsd b/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xsd
index 213e597..8c2d6a1 100644
--- a/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xsd
+++ b/bluetooth/audio/utils/le_audio_codec_capabilities/le_audio_codec_capabilities.xsd
@@ -32,6 +32,7 @@
<xs:complexType>
<xs:attribute name="encode" type="xs:string"/>
<xs:attribute name="decode" type="xs:string"/>
+ <xs:attribute name="broadcast" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="configuration">
diff --git a/bluetooth/audio/utils/le_audio_codec_capabilities/schema/current.txt b/bluetooth/audio/utils/le_audio_codec_capabilities/schema/current.txt
index 06aa21a..886350e 100644
--- a/bluetooth/audio/utils/le_audio_codec_capabilities/schema/current.txt
+++ b/bluetooth/audio/utils/le_audio_codec_capabilities/schema/current.txt
@@ -64,8 +64,10 @@
public class Scenario {
ctor public Scenario();
+ method public String getBroadcast();
method public String getDecode();
method public String getEncode();
+ method public void setBroadcast(String);
method public void setDecode(String);
method public void setEncode(String);
}
diff --git a/cas/aidl/default/OWNERS b/cas/aidl/OWNERS
similarity index 100%
rename from cas/aidl/default/OWNERS
rename to cas/aidl/OWNERS
diff --git a/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/ICas.aidl b/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/ICas.aidl
index 28c9eb0..903ab92 100644
--- a/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/ICas.aidl
+++ b/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/ICas.aidl
@@ -36,6 +36,7 @@
@VintfStability
interface ICas {
void closeSession(in byte[] sessionId);
+ byte[] openSessionDefault();
byte[] openSession(in android.hardware.cas.SessionIntent intent, in android.hardware.cas.ScramblingMode mode);
void processEcm(in byte[] sessionId, in byte[] ecm);
void processEmm(in byte[] emm);
diff --git a/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/ScramblingMode.aidl b/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/ScramblingMode.aidl
index a0b08c9..9d542cc 100644
--- a/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/ScramblingMode.aidl
+++ b/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/ScramblingMode.aidl
@@ -36,18 +36,18 @@
@Backing(type="int") @VintfStability
enum ScramblingMode {
RESERVED = 0,
- DVB_CSA1 = 1,
- DVB_CSA2 = 2,
- DVB_CSA3_STANDARD = 3,
- DVB_CSA3_MINIMAL = 4,
- DVB_CSA3_ENHANCE = 5,
- DVB_CISSA_V1 = 6,
- DVB_IDSA = 7,
- MULTI2 = 8,
- AES128 = 9,
- AES_ECB = 10,
- AES_SCTE52 = 11,
- TDES_ECB = 12,
- TDES_SCTE52 = 13,
- AES_CBC = 14,
+ DVB_CSA1,
+ DVB_CSA2,
+ DVB_CSA3_STANDARD,
+ DVB_CSA3_MINIMAL,
+ DVB_CSA3_ENHANCE,
+ DVB_CISSA_V1,
+ DVB_IDSA,
+ MULTI2,
+ AES128,
+ AES_ECB,
+ AES_SCTE52,
+ TDES_ECB,
+ TDES_SCTE52,
+ AES_CBC,
}
diff --git a/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/SessionIntent.aidl b/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/SessionIntent.aidl
index ade3001..00a2fd7 100644
--- a/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/SessionIntent.aidl
+++ b/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/SessionIntent.aidl
@@ -35,8 +35,8 @@
/* @hide */
@Backing(type="int") @VintfStability
enum SessionIntent {
- LIVE = 0,
- PLAYBACK = 1,
- RECORD = 2,
- TIMESHIFT = 3,
+ LIVE,
+ PLAYBACK,
+ RECORD,
+ TIMESHIFT,
}
diff --git a/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/Status.aidl b/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/Status.aidl
index 343c810..3691009 100644
--- a/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/Status.aidl
+++ b/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/Status.aidl
@@ -36,25 +36,25 @@
@VintfStability
parcelable Status {
const int OK = 0;
- const int ERROR_CAS_NO_LICENSE = -1;
- const int ERROR_CAS_LICENSE_EXPIRED = -2;
- const int ERROR_CAS_SESSION_NOT_OPENED = -3;
- const int ERROR_CAS_CANNOT_HANDLE = -4;
- const int ERROR_CAS_INVALID_STATE = -5;
- const int BAD_VALUE = -6;
- const int ERROR_CAS_NOT_PROVISIONED = -7;
- const int ERROR_CAS_RESOURCE_BUSY = -8;
- const int ERROR_CAS_INSUFFICIENT_OUTPUT_PROTECTION = -9;
- const int ERROR_CAS_TAMPER_DETECTED = -10;
- const int ERROR_CAS_DEVICE_REVOKED = -11;
- const int ERROR_CAS_DECRYPT_UNIT_NOT_INITIALIZED = -12;
- const int ERROR_CAS_DECRYPT = -13;
- const int ERROR_CAS_UNKNOWN = -14;
- const int ERROR_CAS_NEED_ACTIVATION = -15;
- const int ERROR_CAS_NEED_PAIRING = -16;
- const int ERROR_CAS_NO_CARD = -17;
- const int ERROR_CAS_CARD_MUTE = -18;
- const int ERROR_CAS_CARD_INVALID = -19;
- const int ERROR_CAS_BLACKOUT = -20;
- const int ERROR_CAS_REBOOTING = -21;
+ const int ERROR_CAS_NO_LICENSE = 1;
+ const int ERROR_CAS_LICENSE_EXPIRED = 2;
+ const int ERROR_CAS_SESSION_NOT_OPENED = 3;
+ const int ERROR_CAS_CANNOT_HANDLE = 4;
+ const int ERROR_CAS_INVALID_STATE = 5;
+ const int BAD_VALUE = 6;
+ const int ERROR_CAS_NOT_PROVISIONED = 7;
+ const int ERROR_CAS_RESOURCE_BUSY = 8;
+ const int ERROR_CAS_INSUFFICIENT_OUTPUT_PROTECTION = 9;
+ const int ERROR_CAS_TAMPER_DETECTED = 10;
+ const int ERROR_CAS_DEVICE_REVOKED = 11;
+ const int ERROR_CAS_DECRYPT_UNIT_NOT_INITIALIZED = 12;
+ const int ERROR_CAS_DECRYPT = 13;
+ const int ERROR_CAS_UNKNOWN = 14;
+ const int ERROR_CAS_NEED_ACTIVATION = 15;
+ const int ERROR_CAS_NEED_PAIRING = 16;
+ const int ERROR_CAS_NO_CARD = 17;
+ const int ERROR_CAS_CARD_MUTE = 18;
+ const int ERROR_CAS_CARD_INVALID = 19;
+ const int ERROR_CAS_BLACKOUT = 20;
+ const int ERROR_CAS_REBOOTING = 21;
}
diff --git a/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/StatusEvent.aidl b/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/StatusEvent.aidl
index 165c0d4..0cf37dd 100644
--- a/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/StatusEvent.aidl
+++ b/cas/aidl/aidl_api/android.hardware.cas/current/android/hardware/cas/StatusEvent.aidl
@@ -35,6 +35,6 @@
/* @hide */
@Backing(type="byte") @VintfStability
enum StatusEvent {
- PLUGIN_PHYSICAL_MODULE_CHANGED = 0,
- PLUGIN_SESSION_NUMBER_CHANGED = 1,
+ PLUGIN_PHYSICAL_MODULE_CHANGED,
+ PLUGIN_SESSION_NUMBER_CHANGED,
}
diff --git a/cas/aidl/android/hardware/cas/ICas.aidl b/cas/aidl/android/hardware/cas/ICas.aidl
index e6494ae..272cb10 100644
--- a/cas/aidl/android/hardware/cas/ICas.aidl
+++ b/cas/aidl/android/hardware/cas/ICas.aidl
@@ -35,6 +35,14 @@
void closeSession(in byte[] sessionId);
/**
+ * Open a session to descramble one or more streams without specifying intention
+ * and scrambling mode.
+ *
+ * @return sessionId The id of the newly opened session.
+ */
+ byte[] openSessionDefault();
+
+ /**
* Open a session to descramble one or more streams by specifying intention
* and scrambling mode.
*
diff --git a/cas/aidl/android/hardware/cas/Status.aidl b/cas/aidl/android/hardware/cas/Status.aidl
index e7ae8ff..ba0bd65 100644
--- a/cas/aidl/android/hardware/cas/Status.aidl
+++ b/cas/aidl/android/hardware/cas/Status.aidl
@@ -31,50 +31,50 @@
* The CAS plugin must return ERROR_CAS_NO_LICENSE, when descrambling is
* attempted and no license keys have been provided.
*/
- const int ERROR_CAS_NO_LICENSE = -1;
+ const int ERROR_CAS_NO_LICENSE = 1;
/**
* ERROR_CAS_LICENSE_EXPIRED must be returned when an attempt is made
* to use a license and the keys in that license have expired.
*/
- const int ERROR_CAS_LICENSE_EXPIRED = -2;
+ const int ERROR_CAS_LICENSE_EXPIRED = 2;
/**
* The CAS plugin must return ERROR_CAS_SESSION_NOT_OPENED when an
* attempt is made to use a session that has not been opened.
*/
- const int ERROR_CAS_SESSION_NOT_OPENED = -3;
+ const int ERROR_CAS_SESSION_NOT_OPENED = 3;
/**
* The CAS plugin must return ERROR_CAS_CANNOT_HANDLE when an unsupported
* data format or operation is attempted.
*/
- const int ERROR_CAS_CANNOT_HANDLE = -4;
+ const int ERROR_CAS_CANNOT_HANDLE = 4;
/**
* ERROR_CAS_INVALID_STATE must be returned when the device is in a state
* where it is not able to perform descrambling.
*/
- const int ERROR_CAS_INVALID_STATE = -5;
+ const int ERROR_CAS_INVALID_STATE = 5;
/**
* The CAS plugin must return BAD_VALUE whenever an illegal parameter is
* passed to one of the interface functions.
*/
- const int BAD_VALUE = -6;
+ const int BAD_VALUE = 6;
/**
* The CAS plugin must return ERROR_CAS_NOT_PROVISIONED when the device
* has not yet been provisioned.
*/
- const int ERROR_CAS_NOT_PROVISIONED = -7;
+ const int ERROR_CAS_NOT_PROVISIONED = 7;
/**
* ERROR_CAS_RESOURCE_BUSY must be returned when resources, such as CAS
* sessions or secure buffers are not available to perform a requested
* operation because they are already in use.
*/
- const int ERROR_CAS_RESOURCE_BUSY = -8;
+ const int ERROR_CAS_RESOURCE_BUSY = 8;
/**
* The CAS Plugin must return ERROR_CAS_INSUFFICIENT_OUTPUT_PROTECTION
@@ -82,72 +82,72 @@
* sufficient to meet the requirements in the license policy. HDCP is an
* example of a form of output protection.
*/
- const int ERROR_CAS_INSUFFICIENT_OUTPUT_PROTECTION = -9;
+ const int ERROR_CAS_INSUFFICIENT_OUTPUT_PROTECTION = 9;
/**
* The CAS Plugin must return ERROR_CAS_TAMPER_DETECTED if an attempt to
* tamper with the CAS system is detected.
*/
- const int ERROR_CAS_TAMPER_DETECTED = -10;
+ const int ERROR_CAS_TAMPER_DETECTED = 10;
/**
* The CAS Plugin must return ERROR_CAS_DEVICE_REVOKED if the response
* indicates that the device has been revoked. Device revocation means
* that the device is no longer permitted to play content.
*/
- const int ERROR_CAS_DEVICE_REVOKED = -11;
+ const int ERROR_CAS_DEVICE_REVOKED = 11;
/**
* The CAS plugin must return ERROR_CAS_DECRYPT_UNIT_NOT_INITIALIZED when
* descrambling is failing because the session is not initialized properly.
*/
- const int ERROR_CAS_DECRYPT_UNIT_NOT_INITIALIZED = -12;
+ const int ERROR_CAS_DECRYPT_UNIT_NOT_INITIALIZED = 12;
/**
* The CAS Plugin must return ERROR_CAS_DECRYPT if the DescramblerPlugin's
* descramble operation fails.
*/
- const int ERROR_CAS_DECRYPT = -13;
+ const int ERROR_CAS_DECRYPT = 13;
/**
* ERROR_CAS_UNKNOWN must be returned when a fatal failure occurs and no
* other defined error is appropriate.
*/
- const int ERROR_CAS_UNKNOWN = -14;
+ const int ERROR_CAS_UNKNOWN = 14;
/**
* ERROR_CAS_NEED_ACTIVATION is used to trigger device activation process.
*/
- const int ERROR_CAS_NEED_ACTIVATION = -15;
+ const int ERROR_CAS_NEED_ACTIVATION = 15;
/**
* ERROR_CAS_NEED_PAIRING is used to trigger pairing process.
*/
- const int ERROR_CAS_NEED_PAIRING = -16;
+ const int ERROR_CAS_NEED_PAIRING = 16;
/**
* ERROR_CAS_NO_CARD is used to report no smart card for descrambling.
*/
- const int ERROR_CAS_NO_CARD = -17;
+ const int ERROR_CAS_NO_CARD = 17;
/**
* ERROR_CAS_CARD_MUTE is used to report smart card is muted for
* descrambling.
*/
- const int ERROR_CAS_CARD_MUTE = -18;
+ const int ERROR_CAS_CARD_MUTE = 18;
/**
* ERROR_CAS_CARD_INVALID is used to report smart card isn't valid.
*/
- const int ERROR_CAS_CARD_INVALID = -19;
+ const int ERROR_CAS_CARD_INVALID = 19;
/**
* ERROR_CAS_BLACKOUT is used to report geographical blackout.
*/
- const int ERROR_CAS_BLACKOUT = -20;
+ const int ERROR_CAS_BLACKOUT = 20;
/**
* ERROR_CAS_REBOOTING is used to report CAS is during rebooting.
*/
- const int ERROR_CAS_REBOOTING = -21;
+ const int ERROR_CAS_REBOOTING = 21;
}
diff --git a/cas/aidl/default/CasImpl.cpp b/cas/aidl/default/CasImpl.cpp
index 2d31b35..f08fcc0 100755
--- a/cas/aidl/default/CasImpl.cpp
+++ b/cas/aidl/default/CasImpl.cpp
@@ -128,6 +128,19 @@
return toStatus(holder->setPrivateData(pvtData));
}
+ScopedAStatus CasImpl::openSessionDefault(vector<uint8_t>* sessionId) {
+ ALOGV("%s", __FUNCTION__);
+
+ shared_ptr<CasPlugin> holder = atomic_load(&mPluginHolder);
+ status_t err = INVALID_OPERATION;
+ if (holder.get() != nullptr) {
+ err = holder->openSession(sessionId);
+ holder.reset();
+ }
+
+ return toStatus(err);
+}
+
ScopedAStatus CasImpl::openSession(SessionIntent intent, ScramblingMode mode,
vector<uint8_t>* sessionId) {
ALOGV("%s", __FUNCTION__);
diff --git a/cas/aidl/default/CasImpl.h b/cas/aidl/default/CasImpl.h
index 84a8115..2488a7f 100755
--- a/cas/aidl/default/CasImpl.h
+++ b/cas/aidl/default/CasImpl.h
@@ -53,6 +53,8 @@
virtual ScopedAStatus setPrivateData(const vector<uint8_t>& pvtData) override;
+ virtual ScopedAStatus openSessionDefault(vector<uint8_t>* sessionId) override;
+
virtual ScopedAStatus openSession(SessionIntent intent, ScramblingMode mode,
vector<uint8_t>* sessionId) override;
diff --git a/cas/aidl/vts/functional/VtsHalCasAidlTargetTest.cpp b/cas/aidl/vts/functional/VtsHalCasAidlTargetTest.cpp
index 266b55d..4c904a8 100644
--- a/cas/aidl/vts/functional/VtsHalCasAidlTargetTest.cpp
+++ b/cas/aidl/vts/functional/VtsHalCasAidlTargetTest.cpp
@@ -286,6 +286,7 @@
} OobInputTestParams;
AssertionResult createCasPlugin(int32_t caSystemId);
+ AssertionResult openCasSessionDefault(vector<uint8_t>* sessionId);
AssertionResult openCasSession(vector<uint8_t>* sessionId, SessionIntent intent,
ScramblingMode mode);
AssertionResult descrambleTestInputBuffer(const shared_ptr<IDescrambler>& descrambler,
@@ -331,6 +332,10 @@
return AssertionResult(mDescrambler != nullptr);
}
+AssertionResult MediaCasAidlTest::openCasSessionDefault(vector<uint8_t>* sessionId) {
+ return AssertionResult(mMediaCas->openSessionDefault(sessionId).isOk());
+}
+
AssertionResult MediaCasAidlTest::openCasSession(vector<uint8_t>* sessionId, SessionIntent intent,
ScramblingMode mode) {
return AssertionResult(mMediaCas->openSession(intent, mode, sessionId).isOk());
@@ -485,6 +490,32 @@
ADD_FAILURE() << "ClearKey plugin not installed";
}
+TEST_P(MediaCasAidlTest, TestClearKeyDefaultSessionClosedAfterRelease) {
+ description("Test that all sessions are closed after a MediaCas object is released");
+
+ ASSERT_TRUE(createCasPlugin(CLEAR_KEY_SYSTEM_ID));
+
+ EXPECT_TRUE(mMediaCas->provision(PROVISION_STR).isOk());
+
+ vector<uint8_t> sessionId;
+ ASSERT_TRUE(openCasSessionDefault(&sessionId));
+
+ vector<uint8_t> streamSessionId;
+ ASSERT_TRUE(openCasSessionDefault(&streamSessionId));
+
+ EXPECT_TRUE(mMediaCas->release().isOk());
+
+ if (mDescrambler != nullptr) {
+ auto status = mDescrambler->setMediaCasSession(sessionId);
+ EXPECT_FALSE(status.isOk());
+ EXPECT_EQ(Status::ERROR_CAS_SESSION_NOT_OPENED, status.getServiceSpecificError());
+
+ status = mDescrambler->setMediaCasSession(streamSessionId);
+ EXPECT_FALSE(status.isOk());
+ EXPECT_EQ(Status::ERROR_CAS_SESSION_NOT_OPENED, status.getServiceSpecificError());
+ }
+}
+
TEST_P(MediaCasAidlTest, TestClearKeySessionClosedAfterRelease) {
description("Test that all sessions are closed after a MediaCas object is released");
diff --git a/compatibility_matrices/compatibility_matrix.8.xml b/compatibility_matrices/compatibility_matrix.8.xml
index 6977813..56ae51a 100644
--- a/compatibility_matrices/compatibility_matrix.8.xml
+++ b/compatibility_matrices/compatibility_matrix.8.xml
@@ -673,14 +673,6 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="true">
- <name>android.hardware.usb.gadget</name>
- <version>1.0-2</version>
- <interface>
- <name>IUsbGadget</name>
- <instance>default</instance>
- </interface>
- </hal>
<hal format="aidl" optional="true">
<name>android.hardware.usb.gadget</name>
<interface>
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
index b0b984c..8f357a0 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
@@ -232,7 +232,8 @@
EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
ALOGI("setPreferredNetworkTypeBitmap, rspInfo.error = %s\n",
toString(radioRsp_v1_4->rspInfo.error).c_str());
- EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error);
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+ {RadioError::NONE, RadioError::MODE_NOT_SUPPORTED}));
if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
// give some time for modem to set the value.
sleep(3);
diff --git a/secure_element/1.0/vts/OWNERS b/secure_element/1.0/vts/OWNERS
deleted file mode 100644
index c7963e7..0000000
--- a/secure_element/1.0/vts/OWNERS
+++ /dev/null
@@ -1,4 +0,0 @@
-alisher@google.com
-jackcwyu@google.com
-georgekgchang@google.com
-zachoverflow@google.com
diff --git a/secure_element/1.0/vts/functional/OWNERS b/secure_element/1.0/vts/functional/OWNERS
deleted file mode 100644
index a7ee7e9..0000000
--- a/secure_element/1.0/vts/functional/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-# Bug component: 456592
-jackcwyu@google.com
diff --git a/secure_element/1.1/vts/OWNERS b/secure_element/1.1/vts/OWNERS
deleted file mode 100644
index c7963e7..0000000
--- a/secure_element/1.1/vts/OWNERS
+++ /dev/null
@@ -1,4 +0,0 @@
-alisher@google.com
-jackcwyu@google.com
-georgekgchang@google.com
-zachoverflow@google.com
diff --git a/secure_element/1.1/vts/functional/OWNERS b/secure_element/1.1/vts/functional/OWNERS
deleted file mode 100644
index a7ee7e9..0000000
--- a/secure_element/1.1/vts/functional/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-# Bug component: 456592
-jackcwyu@google.com
diff --git a/secure_element/1.2/vts/OWNERS b/secure_element/1.2/vts/OWNERS
deleted file mode 100644
index c7963e7..0000000
--- a/secure_element/1.2/vts/OWNERS
+++ /dev/null
@@ -1,4 +0,0 @@
-alisher@google.com
-jackcwyu@google.com
-georgekgchang@google.com
-zachoverflow@google.com
diff --git a/secure_element/1.2/vts/functional/OWNERS b/secure_element/1.2/vts/functional/OWNERS
deleted file mode 100644
index a7ee7e9..0000000
--- a/secure_element/1.2/vts/functional/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-# Bug component: 456592
-jackcwyu@google.com
diff --git a/secure_element/OWNERS b/secure_element/OWNERS
new file mode 100644
index 0000000..492696b
--- /dev/null
+++ b/secure_element/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 456592
+alisher@google.com
+jackcwyu@google.com
+georgekgchang@google.com
+henrichataing@google.com
diff --git a/secure_element/aidl/default/main.cpp b/secure_element/aidl/default/main.cpp
index 6149eae..0822402 100644
--- a/secure_element/aidl/default/main.cpp
+++ b/secure_element/aidl/default/main.cpp
@@ -586,7 +586,7 @@
// The selected basic or logical channel is not opened.
if (channel_number >= channels_.size() || !channels_[channel_number].opened) {
- return ScopedAStatus::ok();
+ return ScopedAStatus::fromServiceSpecificError(FAILED);
}
// TODO(b/123254068) - this is not an implementation of the OMAPI protocol
diff --git a/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp b/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp
index c265579..37ff1b2 100644
--- a/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp
+++ b/secure_element/aidl/vts/VtsHalSecureElementTargetTest.cpp
@@ -109,6 +109,7 @@
}
void TearDown() override {
+ EXPECT_OK(secure_element_->reset());
secure_element_ = nullptr;
secure_element_callback_ = nullptr;
}
@@ -232,10 +233,10 @@
std::vector<uint8_t> basic_channel_response;
LogicalChannelResponse logical_channel_response;
- // closeChannel called on non-existing basic or logical channel is a no-op
- // and shall succeed.
- EXPECT_OK(secure_element_->closeChannel(0));
- EXPECT_OK(secure_element_->closeChannel(1));
+ // closeChannel called on non-existing basic or logical channel
+ // shall fail.
+ EXPECT_ERR(secure_element_->closeChannel(0));
+ EXPECT_ERR(secure_element_->closeChannel(1));
// closeChannel called on basic channel closes the basic channel.
EXPECT_OK(secure_element_->openBasicChannel(kSelectableAid, 0x00, &basic_channel_response));
diff --git a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
index 99d2510..e46aeee 100644
--- a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
+++ b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
@@ -86,7 +86,17 @@
} // namespace
class AttestKeyTest : public KeyMintAidlTestBase {
+ public:
+ void SetUp() override {
+ check_skip_test();
+ KeyMintAidlTestBase::SetUp();
+ }
+
protected:
+ const string FEATURE_KEYSTORE_APP_ATTEST_KEY = "android.hardware.keystore.app_attest_key";
+
+ const string FEATURE_STRONGBOX_KEYSTORE = "android.hardware.strongbox_keystore";
+
ErrorCode GenerateAttestKey(const AuthorizationSet& key_desc,
const optional<AttestationKey>& attest_key,
vector<uint8_t>* key_blob,
@@ -111,6 +121,59 @@
}
return GenerateKey(key_desc, attest_key, key_blob, key_characteristics, cert_chain);
}
+
+ // Check if ATTEST_KEY feature is disabled
+ bool is_attest_key_feature_disabled(void) const {
+ if (!check_feature(FEATURE_KEYSTORE_APP_ATTEST_KEY)) {
+ GTEST_LOG_(INFO) << "Feature " + FEATURE_KEYSTORE_APP_ATTEST_KEY + " is disabled";
+ return true;
+ }
+
+ return false;
+ }
+
+ // Check if StrongBox KeyStore is enabled
+ bool is_strongbox_enabled(void) const {
+ if (check_feature(FEATURE_STRONGBOX_KEYSTORE)) {
+ GTEST_LOG_(INFO) << "Feature " + FEATURE_STRONGBOX_KEYSTORE + " is enabled";
+ return true;
+ }
+
+ return false;
+ }
+
+ // Check if chipset has received a waiver allowing it to be launched with
+ // Android S (or later) with Keymaster 4.0 in StrongBox
+ bool is_chipset_allowed_km4_strongbox(void) const {
+ std::array<char, PROPERTY_VALUE_MAX> buffer;
+
+ auto res = property_get("ro.vendor.qti.soc_model", buffer.data(), nullptr);
+ if (res <= 0) return false;
+
+ const string allowed_soc_models[] = {"SM8450", "SM8475", "SM8550", "SXR2230P"};
+
+ for (const string model : allowed_soc_models) {
+ if (model.compare(buffer.data()) == 0) {
+ GTEST_LOG_(INFO) << "QTI SOC Model " + model + " is allowed SB KM 4.0";
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ // Skip the test if all the following conditions hold:
+ // 1. ATTEST_KEY feature is disabled
+ // 2. STRONGBOX is enabled
+ // 3. The device is running one of the chipsets that have received a waiver
+ // allowing it to be launched with Android S (or later) with Keymaster 4.0
+ // in StrongBox
+ void check_skip_test(void) const {
+ if (is_attest_key_feature_disabled() && is_strongbox_enabled() &&
+ is_chipset_allowed_km4_strongbox()) {
+ GTEST_SKIP() << "Test is not applicable";
+ }
+ }
};
/*
diff --git a/sensors/aidl/multihal/android.hardware.sensors-service-multihal.rc b/sensors/aidl/multihal/android.hardware.sensors-service-multihal.rc
index 1edfbec..5aecc54 100644
--- a/sensors/aidl/multihal/android.hardware.sensors-service-multihal.rc
+++ b/sensors/aidl/multihal/android.hardware.sensors-service-multihal.rc
@@ -1,7 +1,7 @@
service vendor.sensors-hal-multihal /vendor/bin/hw/android.hardware.sensors-service.multihal
class hal
user system
- group system wakelock context_hub input
+ group system wakelock context_hub input uhid
task_profiles ServiceCapacityLow
capabilities BLOCK_SUSPEND
- rlimit rtprio 10 10
\ No newline at end of file
+ rlimit rtprio 10 10
diff --git a/staging/threadnetwork/OWNERS b/staging/threadnetwork/OWNERS
new file mode 100644
index 0000000..037215d
--- /dev/null
+++ b/staging/threadnetwork/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 1203089
+
+wgtdkp@google.com
+xyk@google.com
+zhanglongxia@google.com
diff --git a/staging/threadnetwork/README.md b/staging/threadnetwork/README.md
new file mode 100644
index 0000000..12104e5
--- /dev/null
+++ b/staging/threadnetwork/README.md
@@ -0,0 +1,12 @@
+# Staging threadnetwork HAL interface
+
+The directory includes the unstable/unreleased version of `hardware/interfaces/threadnetwork`
+code which should **NOT** be used in production. But vendors may start verifying their hardware
+with the HAL interface.
+
+This directory will be cleaned up when the stable Thread HAL interface is added in
+`hardware/interfaces/threadnetwork` by version `V` or later.
+
+More information about _Thread_:
+- https://www.threadgroup.org
+- https://openthread.io
diff --git a/tetheroffload/aidl/android/hardware/tetheroffload/IOffload.aidl b/tetheroffload/aidl/android/hardware/tetheroffload/IOffload.aidl
index 30b2c8d..984f2a5 100644
--- a/tetheroffload/aidl/android/hardware/tetheroffload/IOffload.aidl
+++ b/tetheroffload/aidl/android/hardware/tetheroffload/IOffload.aidl
@@ -32,8 +32,7 @@
/**
* Indicates intent to start offload for tethering in immediate future.
*
- * This API must be called exactly once the first time that Tethering is requested by
- * the user.
+ * This API must be called exactly once when Tethering is requested by the user.
*
* If this API is called multiple times without first calling stopOffload, then the subsequent
* calls must fail without changing the state of the server.
@@ -168,7 +167,6 @@
* or negative number of bytes).
* - EX_ILLEGAL_STATE if this method is called before initOffload(), or if this method
* is called after stopOffload().
- * - EX_UNSUPPORTED_OPERATION if it is not supported.
* - EX_SERVICE_SPECIFIC with the error message set to a human-readable reason for the
* error.
*/
@@ -269,7 +267,7 @@
* This API may only be called after initOffload and before stopOffload.
*
* @param iface Downstream interface
- * @param prefix Downstream prefix depicting address that must no longer be offloaded
+ * @param prefix Downstream prefix depicting prefix that must no longer be offloaded
* For e.g. 192.168.1.0/24 or 2001:4860:684::/64)
*
* @throws:
diff --git a/tetheroffload/aidl/android/hardware/tetheroffload/OffloadCallbackEvent.aidl b/tetheroffload/aidl/android/hardware/tetheroffload/OffloadCallbackEvent.aidl
index a95f674..15a1f93 100644
--- a/tetheroffload/aidl/android/hardware/tetheroffload/OffloadCallbackEvent.aidl
+++ b/tetheroffload/aidl/android/hardware/tetheroffload/OffloadCallbackEvent.aidl
@@ -55,7 +55,7 @@
*/
OFFLOAD_STOPPED_LIMIT_REACHED = 5,
/**
- * This event is fired when the quota, applied in setDataWarning, has expired. It is
+ * This event is fired when the quota, applied in setDataWarningAndLimit, has expired. It is
* recommended that the client query for statistics immediately after receiving this event.
* Any offloaded traffic will continue to be offloaded until offload is stopped or
* OFFLOAD_STOPPED_LIMIT_REACHED is sent.
diff --git a/tetheroffload/aidl/vts/functional/VtsHalTetheroffloadTargetTest.cpp b/tetheroffload/aidl/vts/functional/VtsHalTetheroffloadTargetTest.cpp
index fc8abbd..f46c9ab 100644
--- a/tetheroffload/aidl/vts/functional/VtsHalTetheroffloadTargetTest.cpp
+++ b/tetheroffload/aidl/vts/functional/VtsHalTetheroffloadTargetTest.cpp
@@ -152,15 +152,13 @@
void initOffload(const bool expectedResult) {
unique_fd ufd1(netlinkSocket(kFd1Groups));
if (ufd1.get() < 0) {
- ALOGE("Unable to create conntrack sockets: %d/%s", errno, strerror(errno));
- FAIL();
+ FAIL() << "Unable to create conntrack sockets: " << strerror(errno);
}
ndk::ScopedFileDescriptor fd1 = ndk::ScopedFileDescriptor(ufd1.release());
unique_fd ufd2(netlinkSocket(kFd2Groups));
if (ufd2.get() < 0) {
- ALOGE("Unable to create conntrack sockets: %d/%s", errno, strerror(errno));
- FAIL();
+ FAIL() << "Unable to create conntrack sockets: " << strerror(errno);
}
ndk::ScopedFileDescriptor fd2 = ndk::ScopedFileDescriptor(ufd2.release());
@@ -214,8 +212,7 @@
ndk::ScopedFileDescriptor fd1 = ndk::ScopedFileDescriptor(-1);
unique_fd ufd2(netlinkSocket(kFd2Groups));
if (ufd2.get() < 0) {
- ALOGE("Unable to create conntrack sockets: %d/%s", errno, strerror(errno));
- FAIL();
+ FAIL() << "Unable to create conntrack sockets: " << strerror(errno);
}
ndk::ScopedFileDescriptor fd2 = ndk::ScopedFileDescriptor(ufd2.release());
mTetheringOffloadCallback = ndk::SharedRefBase::make<TetheringOffloadCallback>();
@@ -229,8 +226,7 @@
TEST_P(TetheroffloadAidlPreInitTest, TestInitOffloadInvalidFd2ReturnsError) {
unique_fd ufd1(netlinkSocket(kFd1Groups));
if (ufd1.get() < 0) {
- ALOGE("Unable to create conntrack sockets: %d/%s", errno, strerror(errno));
- FAIL();
+ FAIL() << "Unable to create conntrack sockets: " << strerror(errno);
}
ndk::ScopedFileDescriptor fd1 = ndk::ScopedFileDescriptor(ufd1.release());
ndk::ScopedFileDescriptor fd2 = ndk::ScopedFileDescriptor(-1);
@@ -264,7 +260,8 @@
const std::string v4Addr("192.0.0.2");
const std::string v4Gw("192.0.0.1");
const std::vector<std::string> v6Gws{std::string("fe80::db8:1"), std::string("fe80::db8:2")};
- EXPECT_TRUE(mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).isOk());
+ auto ret = mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws);
+ EXPECT_TRUE(ret.isOk()) << ret;
if (!interfaceIsUp(TEST_IFACE)) {
return;
}
@@ -279,7 +276,7 @@
// Check that calling setLocalPrefixes() without first having called initOffload() returns error.
TEST_P(TetheroffloadAidlPreInitTest, SetLocalPrefixesWithoutInitReturnsError) {
const std::vector<std::string> prefixes{std::string("2001:db8::/64")};
- EXPECT_EQ(mOffload->setLocalPrefixes(prefixes).getExceptionCode(), EX_ILLEGAL_STATE);
+ EXPECT_EQ(EX_ILLEGAL_STATE, mOffload->setLocalPrefixes(prefixes).getExceptionCode());
}
// Check that calling getForwardedStats() without first having called initOffload()
@@ -287,9 +284,10 @@
TEST_P(TetheroffloadAidlPreInitTest, GetForwardedStatsWithoutInitReturnsZeroValues) {
const std::string upstream(TEST_IFACE);
ForwardedStats stats;
- EXPECT_TRUE(mOffload->getForwardedStats(upstream, &stats).isOk());
- EXPECT_EQ(stats.rxBytes, 0ULL);
- EXPECT_EQ(stats.txBytes, 0ULL);
+ auto ret = mOffload->getForwardedStats(upstream, &stats);
+ EXPECT_TRUE(ret.isOk()) << ret;
+ EXPECT_EQ(0ULL, stats.rxBytes);
+ EXPECT_EQ(0ULL, stats.txBytes);
}
// Check that calling setDataWarningAndLimit() without first having called initOffload() returns
@@ -298,8 +296,8 @@
const std::string upstream(TEST_IFACE);
const int64_t warning = 5000LL;
const int64_t limit = 5000LL;
- EXPECT_EQ(mOffload->setDataWarningAndLimit(upstream, warning, limit).getExceptionCode(),
- EX_ILLEGAL_STATE);
+ EXPECT_EQ(EX_ILLEGAL_STATE,
+ mOffload->setDataWarningAndLimit(upstream, warning, limit).getExceptionCode());
}
// Check that calling setUpstreamParameters() without first having called initOffload()
@@ -309,8 +307,8 @@
const std::string v4Addr("192.0.2.0/24");
const std::string v4Gw("192.0.2.1");
const std::vector<std::string> v6Gws{std::string("fe80::db8:1")};
- EXPECT_EQ(mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).getExceptionCode(),
- EX_ILLEGAL_STATE);
+ EXPECT_EQ(EX_ILLEGAL_STATE,
+ mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).getExceptionCode());
}
// Check that calling addDownstream() with an IPv4 prefix without first having called
@@ -318,7 +316,7 @@
TEST_P(TetheroffloadAidlPreInitTest, AddIPv4DownstreamWithoutInitReturnsError) {
const std::string iface(TEST_IFACE);
const std::string prefix("192.0.2.0/24");
- EXPECT_EQ(mOffload->addDownstream(iface, prefix).getExceptionCode(), EX_ILLEGAL_STATE);
+ EXPECT_EQ(EX_ILLEGAL_STATE, mOffload->addDownstream(iface, prefix).getExceptionCode());
}
// Check that calling addDownstream() with an IPv6 prefix without first having called
@@ -326,7 +324,7 @@
TEST_P(TetheroffloadAidlPreInitTest, AddIPv6DownstreamWithoutInitReturnsError) {
const std::string iface(TEST_IFACE);
const std::string prefix("2001:db8::/64");
- EXPECT_EQ(mOffload->addDownstream(iface, prefix).getExceptionCode(), EX_ILLEGAL_STATE);
+ EXPECT_EQ(EX_ILLEGAL_STATE, mOffload->addDownstream(iface, prefix).getExceptionCode());
}
// Check that calling removeDownstream() with an IPv4 prefix without first having called
@@ -334,7 +332,7 @@
TEST_P(TetheroffloadAidlPreInitTest, RemoveIPv4DownstreamWithoutInitReturnsError) {
const std::string iface(TEST_IFACE);
const std::string prefix("192.0.2.0/24");
- EXPECT_EQ(mOffload->removeDownstream(iface, prefix).getExceptionCode(), EX_ILLEGAL_STATE);
+ EXPECT_EQ(EX_ILLEGAL_STATE, mOffload->removeDownstream(iface, prefix).getExceptionCode());
}
// Check that calling removeDownstream() with an IPv6 prefix without first having called
@@ -342,7 +340,7 @@
TEST_P(TetheroffloadAidlPreInitTest, RemoveIPv6DownstreamWithoutInitReturnsError) {
const std::string iface(TEST_IFACE);
const std::string prefix("2001:db8::/64");
- EXPECT_EQ(mOffload->removeDownstream(iface, prefix).getExceptionCode(), EX_ILLEGAL_STATE);
+ EXPECT_EQ(EX_ILLEGAL_STATE, mOffload->removeDownstream(iface, prefix).getExceptionCode());
}
/*
@@ -352,19 +350,20 @@
// Test setLocalPrefixes() rejects an IPv4 address.
TEST_P(TetheroffloadAidlGeneralTest, SetLocalPrefixesIPv4AddressFails) {
const std::vector<std::string> prefixes{std::string("192.0.2.1")};
- EXPECT_EQ(mOffload->setLocalPrefixes(prefixes).getExceptionCode(), EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT, mOffload->setLocalPrefixes(prefixes).getExceptionCode());
}
// Test setLocalPrefixes() rejects an IPv6 address.
TEST_P(TetheroffloadAidlGeneralTest, SetLocalPrefixesIPv6AddressFails) {
const std::vector<std::string> prefixes{std::string("fe80::1")};
- EXPECT_EQ(mOffload->setLocalPrefixes(prefixes).getExceptionCode(), EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT, mOffload->setLocalPrefixes(prefixes).getExceptionCode());
}
// Test setLocalPrefixes() accepts both IPv4 and IPv6 prefixes.
TEST_P(TetheroffloadAidlGeneralTest, SetLocalPrefixesIPv4v6PrefixesOk) {
const std::vector<std::string> prefixes{std::string("192.0.2.0/24"), std::string("fe80::/64")};
- EXPECT_TRUE(mOffload->setLocalPrefixes(prefixes).isOk());
+ auto ret = mOffload->setLocalPrefixes(prefixes);
+ EXPECT_TRUE(ret.isOk()) << ret;
}
// Test that setLocalPrefixes() fails given empty input. There is always
@@ -372,13 +371,13 @@
// we still apply {127.0.0.0/8, ::1/128, fe80::/64} here.
TEST_P(TetheroffloadAidlGeneralTest, SetLocalPrefixesEmptyFails) {
const std::vector<std::string> prefixes{};
- EXPECT_EQ(mOffload->setLocalPrefixes(prefixes).getExceptionCode(), EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT, mOffload->setLocalPrefixes(prefixes).getExceptionCode());
}
// Test setLocalPrefixes() fails on incorrectly formed input strings.
TEST_P(TetheroffloadAidlGeneralTest, SetLocalPrefixesInvalidFails) {
const std::vector<std::string> prefixes{std::string("192.0.2.0/24"), std::string("invalid")};
- EXPECT_EQ(mOffload->setLocalPrefixes(prefixes).getExceptionCode(), EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT, mOffload->setLocalPrefixes(prefixes).getExceptionCode());
}
/*
@@ -389,9 +388,10 @@
TEST_P(TetheroffloadAidlGeneralTest, GetForwardedStatsInvalidUpstreamIface) {
const std::string upstream("invalid");
ForwardedStats stats;
- EXPECT_TRUE(mOffload->getForwardedStats(upstream, &stats).isOk());
- EXPECT_EQ(stats.rxBytes, 0ULL);
- EXPECT_EQ(stats.txBytes, 0ULL);
+ auto ret = mOffload->getForwardedStats(upstream, &stats);
+ EXPECT_TRUE(ret.isOk()) << ret;
+ EXPECT_EQ(0ULL, stats.rxBytes);
+ EXPECT_EQ(0ULL, stats.txBytes);
}
// TEST_IFACE is presumed to exist on the device and be up. No packets
@@ -399,9 +399,10 @@
TEST_P(TetheroffloadAidlGeneralTest, GetForwardedStatsDummyIface) {
const std::string upstream(TEST_IFACE);
ForwardedStats stats;
- EXPECT_TRUE(mOffload->getForwardedStats(upstream, &stats).isOk());
- EXPECT_EQ(stats.rxBytes, 0ULL);
- EXPECT_EQ(stats.txBytes, 0ULL);
+ auto ret = mOffload->getForwardedStats(upstream, &stats);
+ EXPECT_TRUE(ret.isOk()) << ret;
+ EXPECT_EQ(0ULL, stats.rxBytes);
+ EXPECT_EQ(0ULL, stats.txBytes);
}
/*
@@ -413,8 +414,8 @@
const std::string upstream("");
const int64_t warning = 12345LL;
const int64_t limit = 67890LL;
- EXPECT_THAT(mOffload->setDataWarningAndLimit(upstream, warning, limit).getExceptionCode(),
- AnyOf(Eq(EX_ILLEGAL_ARGUMENT), Eq(EX_UNSUPPORTED_OPERATION)));
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT,
+ mOffload->setDataWarningAndLimit(upstream, warning, limit).getExceptionCode());
}
// TEST_IFACE is presumed to exist on the device and be up. No packets
@@ -423,8 +424,8 @@
const std::string upstream(TEST_IFACE);
const int64_t warning = 4000LL;
const int64_t limit = 5000LL;
- EXPECT_THAT(mOffload->setDataWarningAndLimit(upstream, warning, limit).getExceptionCode(),
- AnyOf(Eq(EX_NONE), Eq(EX_UNSUPPORTED_OPERATION)));
+ auto ret = mOffload->setDataWarningAndLimit(upstream, warning, limit);
+ EXPECT_TRUE(ret.isOk()) << ret;
}
// TEST_IFACE is presumed to exist on the device and be up. No packets
@@ -433,8 +434,8 @@
const std::string upstream(TEST_IFACE);
const int64_t warning = 0LL;
const int64_t limit = 0LL;
- EXPECT_THAT(mOffload->setDataWarningAndLimit(upstream, warning, limit).getExceptionCode(),
- AnyOf(Eq(EX_NONE), Eq(EX_UNSUPPORTED_OPERATION)));
+ auto ret = mOffload->setDataWarningAndLimit(upstream, warning, limit);
+ EXPECT_TRUE(ret.isOk()) << ret;
}
// TEST_IFACE is presumed to exist on the device and be up. No packets
@@ -443,7 +444,8 @@
const std::string upstream(TEST_IFACE);
const int64_t warning = LLONG_MAX;
const int64_t limit = 5000LL;
- EXPECT_TRUE(mOffload->setDataWarningAndLimit(upstream, warning, limit).isOk());
+ auto ret = mOffload->setDataWarningAndLimit(upstream, warning, limit);
+ EXPECT_TRUE(ret.isOk()) << ret;
}
// Test that setDataWarningAndLimit() with negative thresholds fails.
@@ -451,8 +453,8 @@
const std::string upstream(TEST_IFACE);
const int64_t warning = -1LL;
const int64_t limit = -1LL;
- EXPECT_THAT(mOffload->setDataWarningAndLimit(upstream, warning, limit).getExceptionCode(),
- AnyOf(Eq(EX_ILLEGAL_ARGUMENT), Eq(EX_UNSUPPORTED_OPERATION)));
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT,
+ mOffload->setDataWarningAndLimit(upstream, warning, limit).getExceptionCode());
}
/*
@@ -466,7 +468,8 @@
const std::string v4Addr("");
const std::string v4Gw("");
const std::vector<std::string> v6Gws{std::string("fe80::db8:1"), std::string("fe80::db8:2")};
- EXPECT_TRUE(mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).isOk());
+ auto ret = mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws);
+ EXPECT_TRUE(ret.isOk()) << ret;
}
// TEST_IFACE is presumed to exist on the device and be up. No packets
@@ -476,7 +479,8 @@
const std::string v4Addr("");
const std::string v4Gw("");
const std::vector<std::string> v6Gws{std::string("fe80::db8:1"), std::string("fe80::db8:3")};
- EXPECT_TRUE(mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).isOk());
+ auto ret = mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws);
+ EXPECT_TRUE(ret.isOk()) << ret;
}
// TEST_IFACE is presumed to exist on the device and be up. No packets
@@ -486,7 +490,8 @@
const std::string v4Addr("192.0.2.2");
const std::string v4Gw("192.0.2.1");
const std::vector<std::string> v6Gws{};
- EXPECT_TRUE(mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).isOk());
+ auto ret = mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws);
+ EXPECT_TRUE(ret.isOk()) << ret;
}
// TEST_IFACE is presumed to exist on the device and be up. No packets
@@ -496,7 +501,8 @@
const std::string v4Addr("192.0.2.2");
const std::string v4Gw("192.0.2.1");
const std::vector<std::string> v6Gws{std::string("fe80::db8:1"), std::string("fe80::db8:2")};
- EXPECT_TRUE(mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).isOk());
+ auto ret = mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws);
+ EXPECT_TRUE(ret.isOk()) << ret;
}
// Test that setUpstreamParameters() fails when all parameters are empty.
@@ -505,8 +511,8 @@
const std::string v4Addr("");
const std::string v4Gw("");
const std::vector<std::string> v6Gws{};
- EXPECT_EQ(mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).getExceptionCode(),
- EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT,
+ mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).getExceptionCode());
}
// Test that setUpstreamParameters() fails when given empty or non-existent interface names.
@@ -517,8 +523,8 @@
for (const auto& bogus : {"", "invalid"}) {
SCOPED_TRACE(testing::Message() << "upstream: " << bogus);
const std::string iface(bogus);
- EXPECT_EQ(mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).getExceptionCode(),
- EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT,
+ mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).getExceptionCode());
}
}
@@ -530,8 +536,8 @@
for (const auto& bogus : {"invalid", "192.0.2"}) {
SCOPED_TRACE(testing::Message() << "v4addr: " << bogus);
const std::string v4Addr(bogus);
- EXPECT_EQ(mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).getExceptionCode(),
- EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT,
+ mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).getExceptionCode());
}
}
@@ -543,8 +549,8 @@
for (const auto& bogus : {"invalid", "192.0.2"}) {
SCOPED_TRACE(testing::Message() << "v4gateway: " << bogus);
const std::string v4Gw(bogus);
- EXPECT_EQ(mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).getExceptionCode(),
- EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT,
+ mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).getExceptionCode());
}
}
@@ -556,8 +562,8 @@
for (const auto& bogus : {"", "invalid", "fe80::bogus", "192.0.2.66"}) {
SCOPED_TRACE(testing::Message() << "v6gateway: " << bogus);
const std::vector<std::string> v6Gws{std::string("fe80::1"), std::string(bogus)};
- EXPECT_EQ(mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).getExceptionCode(),
- EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT,
+ mOffload->setUpstreamParameters(iface, v4Addr, v4Gw, v6Gws).getExceptionCode());
}
}
@@ -569,21 +575,23 @@
TEST_P(TetheroffloadAidlGeneralTest, AddDownstreamIPv4) {
const std::string iface("dummy0");
const std::string prefix("192.0.2.0/24");
- EXPECT_TRUE(mOffload->addDownstream(iface, prefix).isOk());
+ auto ret = mOffload->addDownstream(iface, prefix);
+ EXPECT_TRUE(ret.isOk()) << ret;
}
// Test addDownstream() works given an IPv6 prefix.
TEST_P(TetheroffloadAidlGeneralTest, AddDownstreamIPv6) {
const std::string iface("dummy0");
const std::string prefix("2001:db8::/64");
- EXPECT_TRUE(mOffload->addDownstream(iface, prefix).isOk());
+ auto ret = mOffload->addDownstream(iface, prefix);
+ EXPECT_TRUE(ret.isOk()) << ret;
}
// Test addDownstream() fails given all empty parameters.
TEST_P(TetheroffloadAidlGeneralTest, AddDownstreamEmptyFails) {
const std::string iface("");
const std::string prefix("");
- EXPECT_EQ(mOffload->addDownstream(iface, prefix).getExceptionCode(), EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT, mOffload->addDownstream(iface, prefix).getExceptionCode());
}
// Test addDownstream() fails given empty or non-existent interface names.
@@ -592,7 +600,7 @@
for (const auto& bogus : {"", "invalid"}) {
SCOPED_TRACE(testing::Message() << "iface: " << bogus);
const std::string iface(bogus);
- EXPECT_EQ(mOffload->addDownstream(iface, prefix).getExceptionCode(), EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT, mOffload->addDownstream(iface, prefix).getExceptionCode());
}
}
@@ -602,7 +610,7 @@
for (const auto& bogus : {"", "192.0.2/24", "2001:db8/64"}) {
SCOPED_TRACE(testing::Message() << "prefix: " << bogus);
const std::string prefix(bogus);
- EXPECT_EQ(mOffload->addDownstream(iface, prefix).getExceptionCode(), EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT, mOffload->addDownstream(iface, prefix).getExceptionCode());
}
}
@@ -616,8 +624,10 @@
const std::string prefix("192.0.2.0/24");
// First add the downstream, otherwise removeDownstream logic can reasonably
// return error for downstreams not previously added.
- EXPECT_TRUE(mOffload->addDownstream(iface, prefix).isOk());
- EXPECT_TRUE(mOffload->removeDownstream(iface, prefix).isOk());
+ auto ret = mOffload->addDownstream(iface, prefix);
+ EXPECT_TRUE(ret.isOk()) << ret;
+ ret = mOffload->removeDownstream(iface, prefix);
+ EXPECT_TRUE(ret.isOk()) << ret;
}
// Test removeDownstream() works given an IPv6 prefix.
@@ -626,15 +636,17 @@
const std::string prefix("2001:db8::/64");
// First add the downstream, otherwise removeDownstream logic can reasonably
// return error for downstreams not previously added.
- EXPECT_TRUE(mOffload->addDownstream(iface, prefix).isOk());
- EXPECT_TRUE(mOffload->removeDownstream(iface, prefix).isOk());
+ auto ret = mOffload->addDownstream(iface, prefix);
+ EXPECT_TRUE(ret.isOk()) << ret;
+ ret = mOffload->removeDownstream(iface, prefix);
+ EXPECT_TRUE(ret.isOk()) << ret;
}
// Test removeDownstream() fails given all empty parameters.
TEST_P(TetheroffloadAidlGeneralTest, RemoveDownstreamEmptyFails) {
const std::string iface("");
const std::string prefix("");
- EXPECT_EQ(mOffload->removeDownstream(iface, prefix).getExceptionCode(), EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT, mOffload->removeDownstream(iface, prefix).getExceptionCode());
}
// Test removeDownstream() fails given empty or non-existent interface names.
@@ -643,8 +655,8 @@
for (const auto& bogus : {"", "invalid"}) {
SCOPED_TRACE(testing::Message() << "iface: " << bogus);
const std::string iface(bogus);
- EXPECT_EQ(mOffload->removeDownstream(iface, prefix).getExceptionCode(),
- EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT,
+ mOffload->removeDownstream(iface, prefix).getExceptionCode());
}
}
@@ -654,8 +666,8 @@
for (const auto& bogus : {"", "192.0.2/24", "2001:db8/64"}) {
SCOPED_TRACE(testing::Message() << "prefix: " << bogus);
const std::string prefix(bogus);
- EXPECT_EQ(mOffload->removeDownstream(iface, prefix).getExceptionCode(),
- EX_ILLEGAL_ARGUMENT);
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT,
+ mOffload->removeDownstream(iface, prefix).getExceptionCode());
}
}
diff --git a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendCapabilities.aidl b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendCapabilities.aidl
index c013cd1..c9443b1 100644
--- a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendCapabilities.aidl
+++ b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendCapabilities.aidl
@@ -45,4 +45,5 @@
android.hardware.tv.tuner.FrontendIsdbsCapabilities isdbsCaps;
android.hardware.tv.tuner.FrontendIsdbs3Capabilities isdbs3Caps;
android.hardware.tv.tuner.FrontendIsdbtCapabilities isdbtCaps;
+ @nullable android.hardware.tv.tuner.FrontendIptvCapabilities iptvCaps;
}
diff --git a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendIptvCapabilities.aidl b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendIptvCapabilities.aidl
new file mode 100644
index 0000000..543543d
--- /dev/null
+++ b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendIptvCapabilities.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2023 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.tuner;
+/* @hide */
+@VintfStability
+parcelable FrontendIptvCapabilities {
+ int protocolCap;
+}
diff --git a/tv/tuner/aidl/android/hardware/tv/tuner/FrontendCapabilities.aidl b/tv/tuner/aidl/android/hardware/tv/tuner/FrontendCapabilities.aidl
index a6f1490..cfa1763 100644
--- a/tv/tuner/aidl/android/hardware/tv/tuner/FrontendCapabilities.aidl
+++ b/tv/tuner/aidl/android/hardware/tv/tuner/FrontendCapabilities.aidl
@@ -23,6 +23,7 @@
import android.hardware.tv.tuner.FrontendDvbcCapabilities;
import android.hardware.tv.tuner.FrontendDvbsCapabilities;
import android.hardware.tv.tuner.FrontendDvbtCapabilities;
+import android.hardware.tv.tuner.FrontendIptvCapabilities;
import android.hardware.tv.tuner.FrontendIsdbs3Capabilities;
import android.hardware.tv.tuner.FrontendIsdbsCapabilities;
import android.hardware.tv.tuner.FrontendIsdbtCapabilities;
@@ -51,4 +52,6 @@
FrontendIsdbs3Capabilities isdbs3Caps;
FrontendIsdbtCapabilities isdbtCaps;
+
+ @nullable FrontendIptvCapabilities iptvCaps;
}
diff --git a/tv/tuner/aidl/android/hardware/tv/tuner/FrontendIptvCapabilities.aidl b/tv/tuner/aidl/android/hardware/tv/tuner/FrontendIptvCapabilities.aidl
new file mode 100644
index 0000000..438492b
--- /dev/null
+++ b/tv/tuner/aidl/android/hardware/tv/tuner/FrontendIptvCapabilities.aidl
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2023 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.tuner;
+
+/**
+ * Capabilities for IPTV Frontend.
+ * @hide
+ */
+@VintfStability
+parcelable FrontendIptvCapabilities {
+ /**
+ * Transmission protocols for IPTV (UDP / RTP) defined in FrontendIptvSettingsProtocol.
+ */
+ int protocolCap;
+}
diff --git a/tv/tuner/aidl/default/Frontend.cpp b/tv/tuner/aidl/default/Frontend.cpp
index d140b74..cd072bf 100644
--- a/tv/tuner/aidl/default/Frontend.cpp
+++ b/tv/tuner/aidl/default/Frontend.cpp
@@ -164,6 +164,17 @@
};
break;
}
+ case FrontendType::IPTV: {
+ mFrontendCaps.set<FrontendCapabilities::Tag::iptvCaps>(FrontendIptvCapabilities());
+ mFrontendStatusCaps = {
+ FrontendStatusType::IPTV_CONTENT_URL,
+ FrontendStatusType::IPTV_PACKETS_LOST,
+ FrontendStatusType::IPTV_PACKETS_RECEIVED,
+ FrontendStatusType::IPTV_AVERAGE_JITTER_MS,
+ FrontendStatusType::IPTV_WORST_JITTER_MS,
+ };
+ break;
+ }
default: {
break;
}
@@ -210,7 +221,10 @@
static_cast<int32_t>(Result::INVALID_STATE));
}
- mTuner->frontendStartTune(mId);
+ if (mType != FrontendType::IPTV) {
+ mTuner->frontendStartTune(mId);
+ }
+
mCallback->onEvent(FrontendEventType::LOCKED);
mIsLocked = true;
diff --git a/usb/gadget/aidl/aidl_api/android.hardware.usb.gadget/current/android/hardware/usb/gadget/GadgetFunction.aidl b/usb/gadget/aidl/aidl_api/android.hardware.usb.gadget/current/android/hardware/usb/gadget/GadgetFunction.aidl
index c3f26d5..78b79e4 100644
--- a/usb/gadget/aidl/aidl_api/android.hardware.usb.gadget/current/android/hardware/usb/gadget/GadgetFunction.aidl
+++ b/usb/gadget/aidl/aidl_api/android.hardware.usb.gadget/current/android/hardware/usb/gadget/GadgetFunction.aidl
@@ -36,11 +36,12 @@
parcelable GadgetFunction {
const long NONE = 0;
const long ADB = 1;
- const long ACCESSORY = 2;
- const long MTP = 4;
- const long MIDI = 8;
- const long PTP = 16;
- const long RNDIS = 32;
- const long AUDIO_SOURCE = 64;
- const long NCM = 1024;
+ const long ACCESSORY = (1 << 1);
+ const long MTP = (1 << 2);
+ const long MIDI = (1 << 3);
+ const long PTP = (1 << 4);
+ const long RNDIS = (1 << 5);
+ const long AUDIO_SOURCE = (1 << 6);
+ const long UVC = (1 << 7);
+ const long NCM = (1 << 10);
}
diff --git a/usb/gadget/aidl/android/hardware/usb/gadget/GadgetFunction.aidl b/usb/gadget/aidl/android/hardware/usb/gadget/GadgetFunction.aidl
index d82b427..dd7ee37 100644
--- a/usb/gadget/aidl/android/hardware/usb/gadget/GadgetFunction.aidl
+++ b/usb/gadget/aidl/android/hardware/usb/gadget/GadgetFunction.aidl
@@ -51,6 +51,10 @@
*/
const long AUDIO_SOURCE = 1 << 6;
/**
+ * UVC - Universal Video Class function.
+ */
+ const long UVC = 1 << 7;
+ /**
* NCM - NCM function.
*/
const long NCM = 1 << 10;
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiChipCapabilities.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiChipCapabilities.aidl
index 48dc8e0..f640861 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiChipCapabilities.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiChipCapabilities.aidl
@@ -34,6 +34,6 @@
package android.hardware.wifi;
@VintfStability
parcelable WifiChipCapabilities {
- int maxMloLinkCount;
+ int maxMloStrLinkCount;
int maxConcurrentTdlsSessionCount;
}
diff --git a/wifi/aidl/android/hardware/wifi/WifiChipCapabilities.aidl b/wifi/aidl/android/hardware/wifi/WifiChipCapabilities.aidl
index f65d49a..4e0578b 100644
--- a/wifi/aidl/android/hardware/wifi/WifiChipCapabilities.aidl
+++ b/wifi/aidl/android/hardware/wifi/WifiChipCapabilities.aidl
@@ -22,13 +22,13 @@
@VintfStability
parcelable WifiChipCapabilities {
/**
- * Maximum number of links used in Multi-Link Operation. The maximum
- * number of links used for MLO can be different from the number of
- * radios supported by the chip.
+ * Maximum number of Simultaneous Transmit and Receive (STR) links used
+ * in Multi-Link Operation. The maximum number of STR links used can be
+ * different from the maximum number of radios supported by the chip.
*
* This is a static configuration of the chip.
*/
- int maxMloLinkCount;
+ int maxMloStrLinkCount;
/**
* Maximum number of concurrent TDLS sessions that can be enabled
* by framework via ISupplicantStaIface#initiateTdlsSetup().
diff --git a/wifi/aidl/default/aidl_struct_util.cpp b/wifi/aidl/default/aidl_struct_util.cpp
index 68fe2e6..921b5dc 100644
--- a/wifi/aidl/default/aidl_struct_util.cpp
+++ b/wifi/aidl/default/aidl_struct_util.cpp
@@ -3316,7 +3316,7 @@
bool convertLegacyWifiChipCapabilitiesToAidl(
const legacy_hal::wifi_chip_capabilities& legacy_chip_capabilities,
WifiChipCapabilities& aidl_chip_capabilities) {
- aidl_chip_capabilities.maxMloLinkCount = legacy_chip_capabilities.max_mlo_link_count;
+ aidl_chip_capabilities.maxMloStrLinkCount = legacy_chip_capabilities.max_mlo_str_link_count;
aidl_chip_capabilities.maxConcurrentTdlsSessionCount =
legacy_chip_capabilities.max_concurrent_tdls_session_count;
return true;
diff --git a/wifi/aidl/default/tests/aidl_struct_util_unit_tests.cpp b/wifi/aidl/default/tests/aidl_struct_util_unit_tests.cpp
index 9b9d96d..f97c846 100644
--- a/wifi/aidl/default/tests/aidl_struct_util_unit_tests.cpp
+++ b/wifi/aidl/default/tests/aidl_struct_util_unit_tests.cpp
@@ -131,10 +131,13 @@
link.peers.push_back(legacy_hal::WifiPeerInfo{});
link.peers.push_back(legacy_hal::WifiPeerInfo{});
link.stat.beacon_rx = rand();
- link.stat.link_id = rand() % 15;
+ // MLO link id: 0 - 15
+ link.stat.link_id = rand() % 16;
+ // Maximum number of radios is limited to 3 for testing.
link.stat.radio = rand() % 4;
link.stat.frequency = rand();
- link.stat.rssi_mgmt = rand();
+ // RSSI: 0 to -127
+ link.stat.rssi_mgmt = (rand() % 128) * -1;
link.stat.ac[legacy_hal::WIFI_AC_BE].rx_mpdu = rand();
link.stat.ac[legacy_hal::WIFI_AC_BE].tx_mpdu = rand();
link.stat.ac[legacy_hal::WIFI_AC_BE].mpdu_lost = rand();
@@ -171,13 +174,14 @@
link.stat.ac[legacy_hal::WIFI_AC_VO].contention_time_avg = rand();
link.stat.ac[legacy_hal::WIFI_AC_VO].contention_num_samples = rand();
- link.stat.time_slicing_duty_cycle_percent = rand();
+ link.stat.time_slicing_duty_cycle_percent = rand() % 101;
link.stat.num_peers = 2;
// Set peer stats for each of the peers.
for (auto& peer : link.peers) {
- peer.peer_info.bssload.sta_count = rand();
- peer.peer_info.bssload.chan_util = rand();
+ // Max station count is limited to 32 for testing.
+ peer.peer_info.bssload.sta_count = rand() % 33;
+ peer.peer_info.bssload.chan_util = rand() % 101;
wifi_rate_stat rate_stat1 = {
.rate = {3, 1, 2, 5, 0, 0},
.tx_mpdu = 0,
@@ -202,7 +206,8 @@
}
// Set radio stats
for (auto& radio : legacy_ml_stats.radios) {
- radio.stats.radio = rand();
+ // Maximum number of radios is limited to 3 for testing.
+ radio.stats.radio = rand() % 4;
radio.stats.on_time = rand();
radio.stats.tx_time = rand();
radio.stats.rx_time = rand();
@@ -409,7 +414,8 @@
legacy_stats.peers.push_back(legacy_hal::WifiPeerInfo{});
legacy_stats.peers.push_back(legacy_hal::WifiPeerInfo{});
legacy_stats.iface.beacon_rx = rand();
- legacy_stats.iface.rssi_mgmt = rand();
+ // RSSI: 0 to -127
+ legacy_stats.iface.rssi_mgmt = rand() % 128;
legacy_stats.iface.ac[legacy_hal::WIFI_AC_BE].rx_mpdu = rand();
legacy_stats.iface.ac[legacy_hal::WIFI_AC_BE].tx_mpdu = rand();
legacy_stats.iface.ac[legacy_hal::WIFI_AC_BE].mpdu_lost = rand();
@@ -446,11 +452,12 @@
legacy_stats.iface.ac[legacy_hal::WIFI_AC_VO].contention_time_avg = rand();
legacy_stats.iface.ac[legacy_hal::WIFI_AC_VO].contention_num_samples = rand();
- legacy_stats.iface.info.time_slicing_duty_cycle_percent = rand();
+ legacy_stats.iface.info.time_slicing_duty_cycle_percent = rand() % 101;
legacy_stats.iface.num_peers = 1;
for (auto& radio : legacy_stats.radios) {
- radio.stats.radio = rand();
+ // Max number of radios limit to 3.
+ radio.stats.radio = rand() % 4;
radio.stats.on_time = rand();
radio.stats.tx_time = rand();
radio.stats.rx_time = rand();
@@ -479,8 +486,9 @@
}
for (auto& peer : legacy_stats.peers) {
- peer.peer_info.bssload.sta_count = rand();
- peer.peer_info.bssload.chan_util = rand();
+ // Max number of stations is limited to 32 for testing.
+ peer.peer_info.bssload.sta_count = rand() % 33;
+ peer.peer_info.bssload.chan_util = rand() % 101;
wifi_rate_stat rate_stat1 = {
.rate = {3, 1, 2, 5, 0, 0},
.tx_mpdu = 0,