• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

README.mdD23-Nov-20231.6 KiB4637

example.htmlD23-Nov-202396.7 KiB784769

log.testD23-Nov-2023499.1 KiB6,1526,151

viewer_c3.pyD23-Nov-202318 KiB605468

README.md

1# Audio thread log viewer
2It is a tool to draw a time chart from audio thread log. It can make debug
3easier.
4
5[TOC]
6
7## Prepare an audio thread log
8The easiest way to get audio thread log is typing `cras_test_client --dump_a`
9in ChromeOS shell.
10
11The format should be like
12```
13Audio Thread Event Log:
14start at 4434i
152019-07-02T15:30:46.539479158 cras atlog  SET_DEV_WAKE                   dev:7 hw_level:216 sleep:168
162019-07-02T15:30:46.539482658 cras atlog  DEV_SLEEP_TIME                 dev:7 wake: 15:30:46.542974324
172019-07-02T15:30:46.539492991 cras atlog  DEV_SLEEP_TIME                 dev:8 wake: 15:30:46.539358095
182019-07-02T15:30:46.539501241 cras atlog  SLEEP                          sleep:000000000.000000000 longest_wake:001553999
19...
20```
21
22## Generate an HTML file
23```
24usage: viewer_c3.py [-h] [-o OUTPUT] [-d] FILE
25
26Draw time chart from audio thread log
27
28positional arguments:
29  FILE        The audio thread log file
30
31optional arguments:
32  -h, --help  show this help message and exit
33  -o OUTPUT   The output HTML file (default: view.html)
34  -d          Show debug message (default: False)
35```
36
37## View the result
38Open the output from vierwe_c3.py by Chrome. There are several functions in
39this site:
40+ The blue points show the hardware level change of the audio thread logs.
41  Click a point can jump to a corresponding line in the log area.
42+ There are some options can be selected. It can show the event in the chart
43  so that users can easily see when a stream is added, when a stream is fetched
44  , and so on.
45+ The textarea in the lower right corner can be used to note.
46