summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2017-04-06audio_thread_log_viewer: Fix ODEV_NO_STREAMS keywordMoja Hsu
The log doesn't have hw_level anymore. So just remove it. BUG=None TEST=Parse log from latest cras and check the html file. Change-Id: I2a01bce1043ac5c7545035a32f35e2c561c56039 Reviewed-on: https://chromium-review.googlesource.com/469666 Commit-Ready: Hsu Wei-Cheng <mojahsu@chromium.org> Tested-by: Hsu Wei-Cheng <mojahsu@chromium.org> Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
2016-08-11scripts: Fix audio-tuning frontend with new WebAudio biquad filter ↵Ben Zhang
implementation The spec of WebAudio biquad filter "lowpass" and "highpass" has been changed. Chrome's implementation was changed in 53.0.2768.0. The new implementation uses the Audio EQ Cookbook formula, different from the original one, but still expects Q in dB. See https://github.com/WebAudio/web-audio-api/issues/771 This patch adds detection of the filter implementation. If the browser uses the new formula, conversion of Q is made to simulate the original filter frequency response with the new formula. This ensures the audio-tuning playback is always consistent with the current CRAS DSP implementation, on any browser verion. BUG=chrome-os-partner:55365 TEST=DRC/EQ testing on Chrome before/after the filter change Change-Id: I3e67a9b87f94b228d173fa08dcaa0fe4df5ac64e Signed-off-by: Ben Zhang <benzh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/367551 Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
2016-08-01scripts: audio_diagnosticsHsin-Yu Chao
Need to dump input sound cards as well. BUG=b/30427322 TEST=Plug web cam, run 'audio_diagnostics' to see the input mic settings. Change-Id: I1254e6c020514aef507c48ba406d25f0a0975282 Reviewed-on: https://chromium-review.googlesource.com/364400 Commit-Ready: Hsinyu Chao <hychao@chromium.org> Tested-by: Hsinyu Chao <hychao@chromium.org> Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
2016-01-11audio_thread_log_viewer: Change the grid color and log div sizeCheng-Yi Chiang
Makes it easier to see the grid text. Also, enlarge the log div so user does not need to scroll too much. BUG=chromium:572816 TEST=check the html file. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Change-Id: I02f29ab738acc72e22cd373c5654ebae39cc1aba Reviewed-on: https://chromium-review.googlesource.com/320881 Reviewed-by: Hsinyu Chao <hychao@chromium.org> Reviewed-by: Chinyue Chen <chinyue@chromium.org>
2016-01-11audio_thread_log_viewer: Disable some grids by checkboxCheng-Yi Chiang
Add checkboxes for device, stream, fetch, and wake. User can click these checkboxes to disable/enable the grid shown for these events. BUG=chromium:572816 TEST=click checkbox to disable/enable event grids. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Change-Id: I0cf4f4c6da0f3d28a9fee3dbaa51882c48734274 Reviewed-on: https://chromium-review.googlesource.com/320880 Reviewed-by: Chinyue Chen <chinyue@chromium.org>
2016-01-08script: audio_thread_log_viewer: Support audio_diagnostics resultCheng-Yi Chiang
Use === aplay -l === line in audio_diagnostics log to extract the event logs. BUG=None TEST=run viewer_c3.py on a log file generated from audio_diagnostics. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Change-Id: I64d724befee47c8be73bc1c5aca6154a85ca30a0 Reviewed-on: https://chromium-review.googlesource.com/320670 Reviewed-by: Chinyue Chen <chinyue@chromium.org>
2016-01-05audio_thread_log_viewer: Add viewer for audio thread logCheng-Yi Chiang
Use c3.js chart library to draw buffer level with respect to time using data in audio thread log. Buffer levels are logged in SET_DEV_WAKE, FILL_AUDIO, and ODEV_NO_STREAM. The demo page is at go/cras-level-viewer-demo. Also mark the point for these events: 1. a device is added/removed. 2. a stream is added/removed. 3. audio thread fetches a stream 4. audio thread is waken up by num_fds 1. BUG=chromium:519942 TEST=./viewer_c3.py log.test, then open view.html in browser. Change-Id: I3c83dd7bee46b60b29f3f887d6a1c354d3bb1aee Reviewed-on: https://chromium-review.googlesource.com/320182 Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Chinyue Chen <chinyue@chromium.org>
2015-05-03audio_tuning: Add Google Drive supportCheng-Yi Chiang
Use Google Drive API and Picker API to let user select file from Google Drive. The Picker API must be enabled in the appengine API console. BUG=chromium:480768 TEST=Go to http://4.audio-tuning.appspot.com and play audio from Google Drive Change-Id: Iaa0ea2b08bfbe62b6f8241d3a736c83b70402494 Reviewed-on: https://chromium-review.googlesource.com/267778 Reviewed-by: Chih-Chung Chang <chihchung@chromium.org> Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
2015-05-03audio_tuning: Add cross origin supportCheng-Yi Chiang
In Chrome M42 and above, audio tag needs to have crossOrigin attribute set to access audio source served from different origin. Note that the header in the response from server should include Access-Control-Allow-Origin: *. Check crbug.com/477692 and crbug.com/477364 for detail. BUG=chromium:480768 TEST=run audio_tuning webpage and check an url with CORS support can play. Change-Id: I3c1cbf0ab8bb252ed4a848278dd389e6e52c8b2d Reviewed-on: https://chromium-review.googlesource.com/267724 Reviewed-by: Dylan Reid <dgreid@chromium.org> Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
2015-03-19scripts: Add dump_audio_threadHsin-Yu Chao
dump_audio_thread provides a lot more information for debugging. BUG=None TEST=Run audio_diagnostics Change-Id: I27704b763a3f4f68983d15178cc92cca18118aab Reviewed-on: https://chromium-review.googlesource.com/261139 Reviewed-by: Dylan Reid <dgreid@chromium.org> Commit-Queue: Hsinyu Chao <hychao@chromium.org> Tested-by: Hsinyu Chao <hychao@chromium.org>
2014-09-04scripts: Modify default volume step for headphoneCheng-Yi Chiang
The default volume step of headphone is too low such that sound is too loud at minimum level. Modify default volume step for headphone from 50 to 70. BUG=chromium:401328 TEST=run volume tuning app and generate a config file. Check default volume step for headphone is changed to 70. Apply this config and check headphone volume at minimum level is very small. Change-Id: Ia6e1e0727097c9a2db500bb45a20decfce4a3068 Reviewed-on: https://chromium-review.googlesource.com/215907 Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org> Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
2014-09-04scripts: initial patch for volume_tuningCheng-Yi Chiang
This patch includes source code of volume-tuning.appspot.com BUG=chromium:401328 TEST=open volume.html and generate a config file. Change-Id: I8b09a27d753ff071b1475292c8e4e4111bdda922 Reviewed-on: https://chromium-review.googlesource.com/215906 Reviewed-by: Hsinyu Chao <hychao@chromium.org> Reviewed-by: Chih-Chung Chang <chihchung@chromium.org> Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
2014-07-04Support logarithmic sweep for mic testinghenryhsu
BUG=chrome-os-partner:29863 TEST=manually test Change-Id: If2f08d8b214ab5c560eab163d97e348b3156d246 Reviewed-on: https://chromium-review.googlesource.com/206083 Reviewed-by: Hsinyu Chao <hychao@chromium.org> Tested-by: Heng-ruey Hsu <henryhsu@google.com> Commit-Queue: Heng-ruey Hsu <henryhsu@google.com>
2014-06-24Add partner microphone test websitehenryhsu
BUG=chrome-os-partner:29863 TEST=manually test Change-Id: I95f6d724d20c11c97735d424759101b8fdf09097 Reviewed-on: https://chromium-review.googlesource.com/205210 Reviewed-by: Hsinyu Chao <hychao@chromium.org> Commit-Queue: Heng-ruey Hsu <henryhsu@google.com> Tested-by: Heng-ruey Hsu <henryhsu@google.com>
2014-04-23script: Fix audio-tuning frontend for web audio element nameCheng-Yi Chiang
webkitAudioContext is renamed to AudioContext. webkitOfflineAudioContext is renamed to OfflineAudioContext. createGainNode in AudioConext is renamed to createGain. This CL fixes those element names so the site can work with both old and new version. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> BUG=chromium:365989 TEST=run audio-tuning site on ubuntu desktop and chromeos Change-Id: Icd18cac04e7db9549c5d307e21bfde8ab764bcfe Reviewed-on: https://chromium-review.googlesource.com/196469 Reviewed-by: Chih-Chung Chang <chihchung@chromium.org> Reviewed-by: Hsinyu Chao <hychao@chromium.org> Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
2014-03-17scripts: Fix audio-tuning frontend createMediaElementSource errorCheng-Yi Chiang
When audio file is played in a loop, we don't need to reset source node in every loop. Now we just set the source node when there is a new file url being set. BUG=chrome-os-partner:26686 TEST=run audio-tuning frontend, check there is no error message complaining audioContext.createMediaElementSource gets an invalid argument. Also check that processing effect remains the same when playing a file in a loop. Change-Id: Ia75b732690a0d467be0c5096e78bef327780fd18 Reviewed-on: https://chromium-review.googlesource.com/189567 Reviewed-by: Chih-Chung Chang <chihchung@chromium.org> Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
2014-03-17scripts: Fix audio-tuning frontend emphasis_disabled config settingCheng-Yi Chiang
When setting config from UI or applying config from config file, drc.emphasis_disabled should be skipped since it is a tag and is different from other configs that can actually be set to the audio processing graph. BUG=chrome-os-partner:26686 TEST=run audio-tuning frontend and check console there is no error message complaining 'config' is not defined. Change-Id: Ia7cbfc09fb7a904bb81abd0ae9b44a9f4524e3f0 Reviewed-on: https://chromium-review.googlesource.com/189566 Reviewed-by: Chih-Chung Chang <chihchung@chromium.org> Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
2014-03-17scripts: Fix audio-tuning frontend disable_emphasis detection errorCheng-Yi Chiang
Currently drc.disable_emphasis is detected when user plays audio file. It should be detected in the webpage load time. Also, before disable_emphasis detection is done, save_config button should be disabled. When saving config, drc.disable_emphasis value should come from the variable which set by get_disable_emphasis function so that value will be not be changed when user loads a config file. BUG=chrome-os-partner:26686 TEST=run audio-tuning ui, save config and check drc.emphasis_disabled is in the config. Load a config with different drc.emphasis_disabled, then save config. Check drc.emphasis_disabled is not affected. Change-Id: I692534260f75df9e1632bb9d5a493ac048ba725a Reviewed-on: https://chromium-review.googlesource.com/189565 Reviewed-by: Chih-Chung Chang <chihchung@chromium.org> Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
2014-03-03script: Add init_editor to edit ini files.Cheng-Yi Chiang
This patch adds a script ini_editor.py to ease the editing of dsp.ini files. Now user can use this tool to inspect and edit dsp.ini file content. Specifically, this tool can add a port into a section at certain port index. E.g. The command "ini_editor.py -b all -n 'input_4=0 ; emphasis_disabled' -s drc -o None" can insert "input_4=0 ; emphasis_disabled" to every dsp.ini file under cras-config directory that has drc section, also the ports after index 4 are shifted by one index. BUG=None TEST=run ini_editor_unittest.py. run ini_editor command to show/edit config files. ini_editor.py -i <dsp.ini file> (show content of one file) ini_editor.py -b daisy_spring (show content of one file) ini_editor.py -b daisy_spring -s drc (show one section) ini_editor.py -b all -s drc -n 'input_4=0 ; emphasis_disabled' (modify dsp.ini files for all boards) Change-Id: I475b4e41adbd86ae018c320db8fec61549239120 Reviewed-on: https://chromium-review.googlesource.com/186074 Reviewed-by: Hsinyu Chao <hychao@chromium.org> Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
2014-03-03scripts: Modify conf2ini2.py script for emphasis_disabled in drcCheng-Yi Chiang
There is a new parameter emphasis_disabled in drc. This patch modifies conf2ini2.py script so it honors the "drc.emphasis_disabled" in config file generated by new http://audio-tuning.appspot.com/ and generate dsp.ini file containing emphasis_disabled in input_4 of [drc]. BUG=chrome-os-partner:25940 TEST=run conf2ini2 file on config file with "drc.emphasis_disabled": 0, check output contains "intput_4=0 ; emphasis_disabled" in [drc] section. Change-Id: I12347f9a7215c2fbcdb65588a32f327cd29737e5 Reviewed-on: https://chromium-review.googlesource.com/186858 Reviewed-by: Hsinyu Chao <hychao@chromium.org> Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
2014-03-03scripts: Modify audio.js for emphasis_disabled in drcCheng-Yi Chiang
There is a new parameter "emphasis_disabled" in drc. This patch modifies audio.js file in audio_tuning webpage such that it will check if emphasis/disemphasis is disabled in chrome, then determine drc.emphasis_disabled config value. BUG=chrome-os-partner:25940 TEST=run audio_tuning webpage with modified audio.js. Checks that the output config contains "drc.emphasis_disabled": 0 for chrome without https://codereview.chromium.org/152333003/, and contains "drc.emphasis_disabled": 1 for chrome with https://codereview.chromium.org/152333003/. Change-Id: I6ef355a1d7cd6a4ac340f711d4270a6a88d42b27 Reviewed-on: https://chromium-review.googlesource.com/186857 Reviewed-by: Hsinyu Chao <hychao@chromium.org> Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
2014-03-03scripts: Add webpage source code for audio tuningCheng-Yi Chiang
Initial commit for source code at http://audio-tuning.appspot.com/ BUG=chrome-os-partner:25940 TEST=serve audio.html webpage and connect to it to generate a config file. Change-Id: Id05f08c300aec70dc502281a0f26b3135d68f60b Reviewed-on: https://chromium-review.googlesource.com/186865 Reviewed-by: Hsinyu Chao <hychao@chromium.org> Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
2014-02-21scripts: Initial commit for audio_tuning scriptsCheng-Yi Chiang
Add conf2ini2.py script to handle config file to ini file conversion. The config file obtained from calibration webpage http://audio-tuning.appspot.com should be converted to dsp.ini file using this script. BUG=chrome-os-partner:25940 TEST=run conf2ini2.py on config file generated by http://audio-tuning.appspot.com Change-Id: I747952643def774090855f4fe63f9b7b3997bdc7 Reviewed-on: https://chromium-review.googlesource.com/186864 Reviewed-by: Chih-Chung Chang <chihchung@chromium.org> Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org> Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
2013-05-13Add audio diagnostic script.Chih-Chung Chang
We will use this in generate_logs script to identify the cause of audio issues. BUG=chrome-os-partner:19180 TEST=run the script on spring and link. Change-Id: I6ad89ff6bb97e32c0506c801aeb5d4c1e190f0c1 Reviewed-on: https://gerrit.chromium.org/gerrit/50978 Reviewed-by: Dylan Reid <dgreid@chromium.org> Commit-Queue: Chih-Chung Chang <chihchung@chromium.org> Tested-by: Chih-Chung Chang <chihchung@chromium.org>