ryu: ucm: Use DAC1 as a main volume control

Ryu does not have standard 'Master' volume control so we have to use
extra volume control that is called DAC1 on rt5677.

BUG=chrome-os-partner:34205
TEST=headphone playback on P1 board

Change-Id: Id7081dd49d1004b4d9314abac6ad2d8f3c234416
Reviewed-on: https://chromium-review.googlesource.com/232975
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Anatol Pomazau <anatol@google.com>
Tested-by: Anatol Pomazau <anatol@google.com>
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: client - copy flags to the stream

Any flags passed were being dropped before the stream is created.
This wasn't noticed because no flags were used until now.

Change-Id: I0921d7511e357c521054cebc68a23a60b8f42f96
Signed-off-by: Dylan Reid <dgreid@chromium.org>
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>
CRAS: byte_buffer - add reset funciton.

The test iodev will need this when it returns to the start of a file.

Change-Id: Ied6bf99cb6be1092ac0852b79422b02fb86e0217
Signed-off-by: Dylan Reid <dgreid@chromium.org>
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>
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>
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>
CRAS: add flag for hotword stream

Add two flags, one to allow more than a callback threshold of data to
be sent over shm.  The other is to allow a stream's timing to be
driven by an input device.  This will allow for a stream to be
notified when samples are ready even if the input isn't clocked
traditionally, such as hotword devices.

Change-Id: I5938d0e08eb480d80142422d91869e7c7b32c234
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: add test hotword commands

This creates the ability to send a command to a test iodev.  This will
be used to feed hotword data to the hotword test iodev.

Change-Id: I25822c661e6fdb9441352b4448c455873b53b573
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: Add handling of hotword flags

Allow for BULK audio to be sent for device timing to be respected.
If a stream is timed by the device and not the clock, allow for
samples to be sent before they would be if the perfect sample rate was
used.

Change-Id: I18dc83afaf748a65391aa0965ecc558a9d57d0ba
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: test_client - add ability to listen for a hotword

Add a new option to listen to hotword streams.  For now it is very
similar to capture except that it only prints when it recieves a
sample.

Change-Id: Ic85032391920ef867d7e8585d8ab7f2d71244212
Signed-off-by: Dylan Reid <dgreid@chromium.org>