CRAS: alsa - Check for 4 or 10 channel support

Checks if four or ten channels are supported by ALSA devices.  Some
USB capture devices we've seen only support these channel counts.

Change-Id: I6d329c7ad79170bb6401d75a8d6afe753ee2c467
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/232420
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
CRAS: audio_thread - Keep active streams on fallback device.

Have fallback device also keep active streams. This simplifies logic
when adding/removing devices and looking-up streams.

BUG=None
TEST=Remove/Add active device while playing Youtube videos on peppy.

Change-Id: I573057c646e96f9983c7ee1805ca0ae38eea3f57
Reviewed-on: https://chromium-review.googlesource.com/231644
Commit-Queue: Chinyue Chen <chinyue@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
CRAS: client - remove hotword stubs

These were never used. It will now go in a different direction.

Change-Id: Ic371185c75a1306730ecb541c912eb19e009c867
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: Add test iodev.

To start the test iodev will be used to test hotwording while we wait
for hardware.

Change-Id: I965ff7512ed2e8df8d81f3c7f02ec7f21a08abb7
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: Add interface to add a test_iodev

Plumb a message and argument from the test client to add a test iodev
to the server.  This will be used to add a hotword test device and
fake wake up buffers.

Change-Id: I9fb244297a52faf55e4f1dda853e378e3c401860
Signed-off-by: Dylan Reid <dgreid@chromium.org>
wip: add flag for hotword stream

Change-Id: I5938d0e08eb480d80142422d91869e7c7b32c234
sqme with add test_iodev command

Change-Id: I2996b10846bcfbf9000dbdbd42d72344714275ed
add play test hotword file command
CRAS: dev_stream - Filter callback time if draining

This removes another rstream dependency from audio_thread and will
allow for other conditions to be used in the future to filter out the
next_cb_ts.

Change-Id: Ie1d19c0398514596c22b79e52ab9ae3d46cd2bce
Signed-off-by: Dylan Reid <dgreid@chromium.org>
sqme better flags

Change-Id: I440eca18f41999a903de99bb29742a5349d2a7e9
CRAS: rstream - rename get_buffer_size to get_buffer_frames

Make the name say what it means.  Do this before adding a user for
this function.

Change-Id: Iaba6fb61373f388d42a01815d1822e9d295b6b87
Signed-off-by: Dylan Reid <dgreid@chromium.org>
squash with addint iodev_list funcs.

Change-Id: Ic806024e4427f802fab60de23d5b90a2da6438d9
squash with iodev_list funcs

Change-Id: I931f97f1f3202bf11444c4127c5d2662e10762a0
squash with add flags

Change-Id: I30a96c0dd6dbcd3f18cb6c5d0eac3f69b525e54d
CRAS: rstream - save flags.

The flags will be used now, save them when creating an rstream.

Change-Id: I2d0b2dc59c1800340c49bd990f9f4d6e7a238de0
Signed-off-by: Dylan Reid <dgreid@chromium.org>
hotword flag handling

Change-Id: Icc532fcbc7e7e0d2c6114588cb1d44be2d5c45f9