[Sound-open-firmware] [PATCH] rmbox: show error/xrun logs in red for easy identification
This patch adds changes to rmbox to make it easier to spot errors/xruns in a long trace
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com --- rmbox/rmbox.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/rmbox/rmbox.c b/rmbox/rmbox.c index b872694..9403cc7 100644 --- a/rmbox/rmbox.c +++ b/rmbox/rmbox.c @@ -21,6 +21,9 @@ #include <string.h> #include <ctype.h>
+#define KNRM "\x1B[0m" +#define KRED "\x1B[31m" + // TODO: include all this stuff
#define TRACE_CLASS_IRQ (1 << 24) @@ -200,8 +203,19 @@ static void show_trace(uint64_t val, uint64_t addr, uint64_t *timestamp, double return; }
- printf("%s %c%c%c\n", trace, + switch ((char)(val >> 16)) { + case 'e': + case 'E': + case 'x': + case 'X': + printf("%s%s %c%c%c%s\n", KRED, trace, + (char)(val >> 16), (char)(val >> 8), (char)val, KNRM); + break; + default: + printf("%s %c%c%c\n", trace, (char)(val >> 16), (char)(val >> 8), (char)val); + break; + } }
static int trace_read(const char *in_file, const char *out_file, double clk,
On Thu, 2018-03-01 at 10:17 -0800, Ranjani Sridharan wrote:
This patch adds changes to rmbox to make it easier to spot errors/xruns in a long trace
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com
rmbox/rmbox.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
Applied.
Thanks
Liam --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
participants (2)
-
Liam Girdwood
-
Ranjani Sridharan