device: gs201: add speaker health stats
Add the sysfs that required by the new ATOM of VendorSpeakerStatsReported. Copy the file sysfs from ag/15659556 Bug: 201250553 Test: Manually test with ATOM Signed-off-by: Roger Fang <rogerfang@google.com> Change-Id: Ic98d26ebb384e567f7016868777f951f00a0b27d
This commit is contained in:
parent
328c3f7c98
commit
0d2cf52ae0
1 changed files with 10 additions and 2 deletions
|
@ -17,6 +17,9 @@
|
|||
#define LOG_TAG "pixelstats"
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <pixelstats/SysfsCollector.h>
|
||||
#include <pixelstats/UeventListener.h>
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include <pixelstats/SysfsCollector.h>
|
||||
|
@ -38,6 +41,9 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = {
|
|||
.F2fsStatsPath = "/sys/fs/f2fs/",
|
||||
.ImpedancePath = "/sys/devices/platform/audiometrics/speaker_impedance",
|
||||
.CodecPath = "/sys/devices/platform/audiometrics/codec_state",
|
||||
.SpeakerTemperaturePath = "/sys/devices/platform/audiometrics/speaker_temp",
|
||||
.SpeakerExcursionPath = "/sys/devices/platform/audiometrics/speaker_excursion",
|
||||
.SpeakerHeartBeatPath = "/sys/devices/platform/audiometrics/speaker_heartbeat",
|
||||
.UFSErrStatsPath = {
|
||||
UFS_ERR_PATH(pa_err_count),
|
||||
UFS_ERR_PATH(dl_err_count),
|
||||
|
@ -49,12 +55,14 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = {
|
|||
},
|
||||
};
|
||||
|
||||
const char *const kAudioUevent = "/devices/virtual/amcs/amcs";
|
||||
const struct UeventListener::UeventPaths ueventPaths = {
|
||||
.AudioUevent = "/devices/virtual/amcs/amcs",
|
||||
};
|
||||
|
||||
int main() {
|
||||
LOG(INFO) << "starting PixelStats";
|
||||
|
||||
UeventListener ueventListener(kAudioUevent);
|
||||
UeventListener ueventListener(ueventPaths);
|
||||
std::thread listenThread(&UeventListener::ListenForever, &ueventListener);
|
||||
listenThread.detach();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue