From 6be4ee206b450b542739e978ae96a85a4e8bcb1f Mon Sep 17 00:00:00 2001 From: Robert Lee Date: Fri, 23 Sep 2022 03:37:36 +0000 Subject: [PATCH 1/3] audio: add 4 amps rotation paths 1. reassign "DSP RX2 Source" to ASPRX2 for all amps 2. add support Rotation Bug: 210569259 Test: builds Change-Id: I6ba7031a5cc37bae1cbaf79a38bd61acf8117036 Signed-off-by: Robert Lee --- .../config/audio_platform_configuration.xml | 2 +- audio/tangorpro/config/mixer_paths.xml | 22 +++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/audio/tangorpro/config/audio_platform_configuration.xml b/audio/tangorpro/config/audio_platform_configuration.xml index 0280030..3ac3392 100644 --- a/audio/tangorpro/config/audio_platform_configuration.xml +++ b/audio/tangorpro/config/audio_platform_configuration.xml @@ -292,7 +292,7 @@ - + diff --git a/audio/tangorpro/config/mixer_paths.xml b/audio/tangorpro/config/mixer_paths.xml index 504eecc..70d6eaf 100644 --- a/audio/tangorpro/config/mixer_paths.xml +++ b/audio/tangorpro/config/mixer_paths.xml @@ -109,13 +109,13 @@ - + - + - + - + @@ -923,6 +923,20 @@ + + + + + + + + + + + + + + From 96e19e9e8031be4deebb659fb411909b37a30e4b Mon Sep 17 00:00:00 2001 From: Haoming Wu Date: Thu, 13 Oct 2022 21:27:06 +0000 Subject: [PATCH 2/3] CastAuthApk: Add logs on mediaDRM plugin Bug: 253463372 Test: Access Cast creds with MediaDrm plugin Change-Id: I7ac3409b775d5387f7386ff2b1d9c90c21c43a6a --- cast_auth/mediadrm/DrmPlugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cast_auth/mediadrm/DrmPlugin.cpp b/cast_auth/mediadrm/DrmPlugin.cpp index 6176c09..b6b896e 100644 --- a/cast_auth/mediadrm/DrmPlugin.cpp +++ b/cast_auth/mediadrm/DrmPlugin.cpp @@ -116,6 +116,7 @@ std::vector readBinaryFile(const std::string& file_path) { *_aidl_return = std::vector(); void* cast_auth_handle = ::dlopen("libcast_auth.so", RTLD_LAZY); if (!cast_auth_handle) { + ALOGE("Fail to get TA for signing"); return toNdkScopedAStatus(status); } typedef bool (*func_type)(const std::vector&, @@ -123,6 +124,7 @@ std::vector readBinaryFile(const std::string& file_path) { func_type sign_hash_func = reinterpret_cast(::dlsym(cast_auth_handle, "SignHash")); if (!sign_hash_func) { + ALOGE("Fail to apply signing method"); dlclose(cast_auth_handle); return toNdkScopedAStatus(status); } @@ -133,6 +135,7 @@ std::vector readBinaryFile(const std::string& file_path) { *_aidl_return = signature; status = Status::OK; } + ALOGE("Get empty result from TA"); return toNdkScopedAStatus(status); } From d973860325ec17c50a08e875d678865a73f3dd7a Mon Sep 17 00:00:00 2001 From: Darren Hsu Date: Mon, 17 Oct 2022 12:10:52 +0800 Subject: [PATCH 3/3] powerstats: update specific data provider configurations Bug: 253951732 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: I32d49fbaacd5661d5a576985ad5db93298126e9f Merged-In: I32d49fbaacd5661d5a576985ad5db93298126e9f Signed-off-by: Darren Hsu --- powerstats/Android.bp | 2 ++ powerstats/service.cpp | 48 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/powerstats/Android.bp b/powerstats/Android.bp index 280d672..551cf01 100644 --- a/powerstats/Android.bp +++ b/powerstats/Android.bp @@ -16,6 +16,7 @@ soong_namespace { imports: [ "hardware/google/pixel", "device/google/gs201/powerstats", + "device/google/gs-common/powerstats", ] } @@ -38,5 +39,6 @@ cc_binary { shared_libs: [ "android.hardware.power.stats-impl.gs201", + "android.hardware.power.stats-impl.gs-common", ], } diff --git a/powerstats/service.cpp b/powerstats/service.cpp index 618a745..badc40c 100644 --- a/powerstats/service.cpp +++ b/powerstats/service.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include @@ -27,6 +28,7 @@ #include #include +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::PowerStatsEnergyConsumer; @@ -50,6 +52,39 @@ void addDisplay(std::shared_ptr p) { {"VSYS_PWR_DISPLAY"})); } +void addGPUGs202(std::shared_ptr p) { + std::map stateCoeffs; + + // Add GPU state residency + p->addStateResidencyDataProvider(std::make_unique( + "GPU", + "/sys/devices/platform/28000000.mali")); + + // Add GPU energy consumer + stateCoeffs = { + {"202000", 890}, + {"251000", 1102}, + {"302000", 1308}, + {"351000", 1522}, + {"400000", 1772}, + {"434000", 1931}, + {"471000", 2105}, + {"510000", 2292}, + {"572000", 2528}, + {"633000", 2811}, + {"701000", 3127}, + {"762000", 3452}, + {"848000", 4044}}; + + p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndAttrConsumer( + p, + EnergyConsumerType::OTHER, + "GPU", + {"S2S_VDD_G3D", "S8S_VDD_G3D_L2"}, + {{UID_TIME_IN_STATE, "/sys/devices/platform/28000000.mali/uid_time_in_state"}}, + stateCoeffs)); +} + int main() { LOG(INFO) << "Pixel PowerStats HAL AIDL Service is starting."; @@ -58,8 +93,19 @@ int main() { std::shared_ptr p = ndk::SharedRefBase::make(); - addGs201CommonDataProvidersBig(p); + setEnergyMeter(p); + addAoC(p); + addPixelStateResidencyDataProvider(p); + addCPUclusters(p); addDisplay(p); + addSoC(p); + addWifi(p); + addTPU(p); + addUfs(p); + addPowerDomains(p); + addDevfreq(p); + addGPUGs202(p); + addDvfsStats(p); const std::string instance = std::string() + PowerStats::descriptor + "/default"; binder_status_t status = AServiceManager_addService(p->asBinder().get(), instance.c_str());