CRAS: Reduce number of zeros to fill in no stream state
Currently, we fill zeros until it reachs the buffer limit. However, if
the buffer size is large, we will spend a lot of time writing zeros. It
may trigger underrun.
To fix it, I change it to fill 50ms zeros only. And set wake up time when
hw_level drops to 5ms samples.
BUG=chromium:849371
TEST=cras_test_client --playback_file sine.raw --num_channels 2 --rate 48000
This command doesn't trigger underrun on Bob.
Change-Id: I6c630584e179b4b8557f9cd7c529a022d5cb6089
Reviewed-on: https://chromium-review.googlesource.com/1506956
Commit-Ready: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
4 files changed