CRAS: fmt_conv - pass input frmaes as a pointer.

Pass in a pointer to the number of input frames instead of the number.
This allows the number to be updated with the actual amount of frames
that were read.

BUG=none
TEST=make check

Change-Id: Ife3af9262c22e46ca740d40ea229d50c93948864
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: dev_stream - Add sample rate converter.

Add a sample rate converted to dev stream.  This adds an argument to
the constructor indicating the format of the device the stream will
play on.  If this format doesn't match the stream a sample rate
converter will be created.

A later change will modify audio_thread and rclient to use this
functionality.  For now rclient ensures that the formats match.

BUG=none
TEST=new unittest, the code doesn't run yet.

Change-Id: Id71e593cbed05abc1771e5232c0e181f862053f4
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: audio_thread - Handle dev_stream with a format converter.

If a dev_stream has a format converter, update the amount of frames
available and use the format converter when rendering samples.

BUG=none
TEST=none, not used yet.

Change-Id: Id1929b1cf8677a57852c4a873c19373bda3303a4
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: rclient - Accept the remote stream format.

Always accept the remote stream format when a stream is attached.  The
format conversion is now done in the audio thread, allow the client to
send whatever it wants.

This change will cause the client never to do format conversion, and
instead rely on the audio thread to convert to the format of the
device.

BUG=none
TEST=unittest, play record audio on blaze.

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