Snap for 9218031 from 5b4b274456 to udc-release

Change-Id: Ie1679e4974cae294b7c28408e7684d1395f86789
This commit is contained in:
Android Build Coastguard Worker 2022-10-26 01:07:58 +00:00
commit bc52d5d2ba
6 changed files with 126129 additions and 118083 deletions

View file

@ -293,7 +293,7 @@
<external_module>
<module libname="audio_waves_aoc.so" argu="Sink=SPK:1,USB_DOCK:4,USB_HP:4"/>
<module libname="audio_spk_35l41.so" argu="SpeakerNum=4,Rotation"/>
<module libname="audio_fortemedia_aoc.so" argu="RTN_SUP=y DOCK_CHARGER_MONITOR=y DL_CH=y VoIP_DLCHs=SPK:2,USB:2"/>
<module libname="audio_fortemedia_aoc.so" argu="RTN_SUP=y DOCK_CHARGER_MONITOR=y DL_CH=y VoIP_DLCHs=SPK:2,USB:2 VoIP_Rate=32000"/>
<module libname="liboffloadeffect.so"/>
<module libname="audio_amcs_ext.so"/>
<module libname="audio_bluenote_aoc.so"/>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -17,6 +17,7 @@
#define LOG_TAG "android.hardware.power.stats-service.pixel"
#include <dataproviders/DisplayStateResidencyDataProvider.h>
#include <dataproviders/GenericStateResidencyDataProvider.h>
#include <dataproviders/PowerStatsEnergyConsumer.h>
#include <DevfreqStateResidencyDataProvider.h>
#include <Gs201CommonDataProviders.h>
@ -31,6 +32,7 @@
using aidl::android::hardware::power::stats::DevfreqStateResidencyDataProvider;
using aidl::android::hardware::power::stats::DisplayStateResidencyDataProvider;
using aidl::android::hardware::power::stats::EnergyConsumerType;
using aidl::android::hardware::power::stats::GenericStateResidencyDataProvider;
using aidl::android::hardware::power::stats::PowerStatsEnergyConsumer;
void addDisplay(std::shared_ptr<PowerStats> p) {
@ -85,6 +87,39 @@ void addGPUGs202(std::shared_ptr<PowerStats> p) {
stateCoeffs));
}
void addUwb(std::shared_ptr<PowerStats> p) {
// A constant to represent the number of nanoseconds in one millisecond.
const int NS_TO_MS = 1000000;
// ACPM stats are reported in nanoseconds. The transform function
// converts nanoseconds to milliseconds.
std::function<uint64_t(uint64_t)> uwbNsToMs = [](uint64_t a) { return a / NS_TO_MS; };
const GenericStateResidencyDataProvider::StateResidencyConfig stateConfig = {
.entryCountSupported = true,
.entryCountPrefix = "count:",
.totalTimeSupported = true,
.totalTimePrefix = "dur ns:",
.totalTimeTransform = uwbNsToMs,
.lastEntrySupported = false,
};
const std::vector<std::pair<std::string, std::string>> stateHeaders = {
std::make_pair("Off", "Off state:"),
std::make_pair("Deep sleep", "Deep sleep state:"),
std::make_pair("Run", "Run state:"),
std::make_pair("Idle", "Idle state:"),
std::make_pair("Tx", "Tx state:"),
std::make_pair("Rx", "Rx state:"),
};
std::vector<GenericStateResidencyDataProvider::PowerEntityConfig> cfgs;
cfgs.emplace_back(generateGenericStateResidencyConfigs(stateConfig, stateHeaders),
"UWB", "");
p->addStateResidencyDataProvider(std::make_unique<GenericStateResidencyDataProvider>(
"/sys/devices/platform/10db0000.spi/spi_master/spi16/spi16.0/uwb/power_stats", cfgs));
}
int main() {
LOG(INFO) << "Pixel PowerStats HAL AIDL Service is starting.";
@ -102,6 +137,7 @@ int main() {
addWifi(p);
addTPU(p);
addUfs(p);
addUwb(p);
addPowerDomains(p);
addDevfreq(p);
addGPUGs202(p);