It is a tool to draw a time chart from audio thread log. It can make debug easier.
The easiest way to get audio thread log is typing cras_test_client --dump_a
in ChromeOS shell.
The format should be like
Audio Thread Event Log: start at 4434i 2019-07-02T15:30:46.539479158 cras atlog SET_DEV_WAKE dev:7 hw_level:216 sleep:168 2019-07-02T15:30:46.539482658 cras atlog DEV_SLEEP_TIME dev:7 wake: 15:30:46.542974324 2019-07-02T15:30:46.539492991 cras atlog DEV_SLEEP_TIME dev:8 wake: 15:30:46.539358095 2019-07-02T15:30:46.539501241 cras atlog SLEEP sleep:000000000.000000000 longest_wake:001553999 ...
usage: viewer_c3.py [-h] [-o OUTPUT] [-d] FILE Draw time chart from audio thread log positional arguments: FILE The audio thread log file optional arguments: -h, --help show this help message and exit -o OUTPUT The output HTML file (default: view.html) -d Show debug message (default: False)
Open the output from vierwe_c3.py by Chrome. There are several functions in this site: