2018-10-02 15:36:44 +08:00
|
|
|
/*
|
|
|
|
* debug log converter interface.
|
|
|
|
*
|
|
|
|
* Copyright (c) 2018, Intel Corporation.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms and conditions of the GNU General Public License,
|
|
|
|
* version 2, as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <sof/uapi/logging.h>
|
|
|
|
|
|
|
|
#define KNRM "\x1B[0m"
|
|
|
|
#define KRED "\x1B[31m"
|
|
|
|
|
2018-11-10 00:38:59 +08:00
|
|
|
double to_usecs(uint64_t time, double clk);
|
2018-10-02 15:36:44 +08:00
|
|
|
|
|
|
|
struct convert_config {
|
|
|
|
const char *out_file;
|
|
|
|
const char *in_file;
|
|
|
|
FILE *out_fd;
|
|
|
|
FILE *in_fd;
|
|
|
|
double clock;
|
|
|
|
int trace;
|
|
|
|
#ifdef LOGGER_FORMAT
|
|
|
|
const char *ldc_file;
|
|
|
|
FILE* ldc_fd;
|
2018-10-08 20:18:08 +08:00
|
|
|
int input_std;
|
2018-10-24 21:17:33 +08:00
|
|
|
int version_fw;
|
|
|
|
char *version_file;
|
|
|
|
FILE *version_fd;
|
2018-10-02 15:36:44 +08:00
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
int convert(struct convert_config *config);
|