diff --git a/powerstats/Gs201CommonDataProviders.cpp b/powerstats/Gs201CommonDataProviders.cpp index a6f08722..e361fc56 100644 --- a/powerstats/Gs201CommonDataProviders.cpp +++ b/powerstats/Gs201CommonDataProviders.cpp @@ -104,6 +104,8 @@ void addPlaceholderEnergyConsumers(std::shared_ptr p) { void addAoC(std::shared_ptr p) { // When the given timeout is 0, the timeout will be replaced with "120ms * statesCount". static const uint64_t TIMEOUT_MILLIS = 0; + // AoC clock is synced from "libaoc.c" + static const uint64_t AOC_CLOCK = 24576; std::string prefix = "/sys/devices/platform/19000000.aoc/control/"; // Add AoC cores (a32, ff1, hf0, and hf1) @@ -116,7 +118,7 @@ void addAoC(std::shared_ptr p) { std::vector> coreStates = { {"DWN", "off"}, {"RET", "retention"}, {"WFI", "wfi"}}; p->addStateResidencyDataProvider(std::make_unique(coreIds, - coreStates, TIMEOUT_MILLIS)); + coreStates, TIMEOUT_MILLIS, AOC_CLOCK)); // Add AoC voltage stats std::vector> voltageIds = { @@ -128,7 +130,7 @@ void addAoC(std::shared_ptr p) { {"UD", "underdrive"}}; p->addStateResidencyDataProvider( std::make_unique(voltageIds, voltageStates, - TIMEOUT_MILLIS)); + TIMEOUT_MILLIS, AOC_CLOCK)); // Add AoC monitor mode std::vector> monitorIds = { @@ -139,7 +141,7 @@ void addAoC(std::shared_ptr p) { }; p->addStateResidencyDataProvider( std::make_unique(monitorIds, monitorStates, - TIMEOUT_MILLIS)); + TIMEOUT_MILLIS, AOC_CLOCK)); // Add AoC restart count const GenericStateResidencyDataProvider::StateResidencyConfig restartCountConfig = {