alsa_api_test: Add the option to test filling mmap buffer

Test the API to fill whole buffer with zeros. The sequence is:
1. Use snd_pcm_mmap_begin to get the mmap buffer.
2. Fill the mmap buffer with zeros using memset.
3. Do not call snd_pcm_mmap_commit.
4. Let device play for some periods.
5. Use snd_pcm_mmap_begin to get the mmap buffer.
6. Check mmap buffer contains all zeros.

BUG=chromium:601346
TEST=run `alsa_api_test --device hw:1,0 --fill` on samus.

Change-Id: Iea92341f0fe3d1094ea4311198b768bbaaf7cdbf
Reviewed-on: https://chromium-review.googlesource.com/341842
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
1 file changed