2019-06-01 03:43:36 +08:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*
|
|
|
|
* Copyright(c) 2018 Intel Corporation. All rights reserved.
|
|
|
|
*
|
|
|
|
* Author: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
|
|
|
|
* Artur Kloniecki <arturx.kloniecki@linux.intel.com>
|
|
|
|
*/
|
|
|
|
|
2018-10-02 15:36:44 +08:00
|
|
|
/*
|
2019-06-01 03:43:36 +08:00
|
|
|
* debug log converter interface.
|
|
|
|
*/
|
|
|
|
|
2018-10-02 15:36:44 +08:00
|
|
|
#include <stdio.h>
|
2019-05-31 21:04:48 +08:00
|
|
|
#include <ipc/info.h>
|
2020-04-02 19:57:38 +08:00
|
|
|
#include <smex/ldc.h>
|
2020-05-22 15:54:12 +08:00
|
|
|
#include <sof/lib/uuid.h>
|
2018-10-02 15:36:44 +08:00
|
|
|
|
2018-12-04 00:45:42 +08:00
|
|
|
#define KNRM "\x1B[0m"
|
|
|
|
#define KRED "\x1B[31m"
|
2020-02-24 18:42:32 +08:00
|
|
|
#define KGRN "\x1B[32m"
|
|
|
|
#define KYEL "\x1B[33m"
|
2020-02-25 21:49:08 +08:00
|
|
|
#define KBLU "\x1B[34m"
|
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;
|
|
|
|
const char *ldc_file;
|
|
|
|
FILE* ldc_fd;
|
2020-05-29 20:29:40 +08:00
|
|
|
char *filter_config;
|
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-12-04 00:45:42 +08:00
|
|
|
int use_colors;
|
2019-01-09 18:03:57 +08:00
|
|
|
int serial_fd;
|
2019-03-29 23:15:04 +08:00
|
|
|
int raw_output;
|
2020-03-24 21:54:25 +08:00
|
|
|
int dump_ldc;
|
2020-05-04 21:23:34 +08:00
|
|
|
int hide_location;
|
2021-03-21 09:46:56 +08:00
|
|
|
int relative_timestamps;
|
2020-06-23 19:34:59 +08:00
|
|
|
int time_precision;
|
2020-02-19 18:37:39 +08:00
|
|
|
struct snd_sof_uids_header *uids_dict;
|
2020-08-31 20:15:35 +08:00
|
|
|
struct snd_sof_logs_header *logs_header;
|
2018-10-02 15:36:44 +08:00
|
|
|
};
|
|
|
|
|
2020-08-31 20:15:35 +08:00
|
|
|
uint32_t get_uuid_key(const struct sof_uuid_entry *entry);
|
2020-02-19 18:37:39 +08:00
|
|
|
int convert(struct convert_config *config);
|