cs40l26: Align Felix HAL dump logs with common HAL
- Add driver, firmware, and tuning versions. - Increase HAL buffer size to 2048 lines. - Add F0, active ID, redc Bug: 348316804 Flag: EXEMPT bugfix Test: Checked HAL dumpsys Test: atest PTS, VTS, CTS Change-Id: I277d270533868cf2075388bdc329d77c9065801e
This commit is contained in:
parent
e892403259
commit
a644ef2a33
3 changed files with 100 additions and 11 deletions
|
@ -20,6 +20,7 @@
|
|||
#include <sys/epoll.h>
|
||||
#include <utils/Trace.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
|
@ -47,17 +48,19 @@ class HwApiBase {
|
|||
class Record : public RecordInterface {
|
||||
public:
|
||||
Record(const char *func, const T &value, const std::ios *stream)
|
||||
: mFunc(func), mValue(value), mStream(stream) {}
|
||||
: mFunc(func), mValue(value), mStream(stream),
|
||||
mTp(std::chrono::system_clock::system_clock::now()) {}
|
||||
std::string toString(const NamesMap &names) override;
|
||||
|
||||
private:
|
||||
const char *mFunc;
|
||||
const T mValue;
|
||||
const std::ios *mStream;
|
||||
const std::chrono::system_clock::time_point mTp;
|
||||
};
|
||||
using Records = std::list<std::unique_ptr<RecordInterface>>;
|
||||
|
||||
static constexpr uint32_t RECORDS_SIZE = 32;
|
||||
static constexpr uint32_t RECORDS_SIZE = 2048;
|
||||
|
||||
public:
|
||||
HwApiBase();
|
||||
|
@ -169,9 +172,14 @@ template <typename T>
|
|||
std::string HwApiBase::Record<T>::toString(const NamesMap &names) {
|
||||
using utils::operator<<;
|
||||
std::stringstream ret;
|
||||
auto lTp = std::chrono::system_clock::to_time_t(mTp);
|
||||
struct tm buf;
|
||||
auto lTime = localtime_r(&lTp, &buf);
|
||||
|
||||
ret << mFunc << " '" << names.at(mStream) << "' = '" << mValue << "'";
|
||||
|
||||
ret << std::put_time(lTime, "%Y-%m-%d %H:%M:%S.") << std::setfill('0') << std::setw(3)
|
||||
<< (std::chrono::duration_cast<std::chrono::milliseconds>(mTp.time_since_epoch()) % 1000)
|
||||
.count()
|
||||
<< " " << mFunc << " '" << names.at(mStream) << "' = '" << mValue << "'";
|
||||
return ret.str();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue