CRAS: fmt_conv - don't restrict in and out to s16le

Allow both the input and output to be non-s16le.  This will be useful
when playing to hardware that only support 24 or 32 bit samples such
as many USB DACS.

BUG=none
TEST=added unit test

Change-Id: Ia6858345958ec2febc716beea56b47868b5706e3
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: Allow 24 and 32 bit samples to alsa devices

Some USB DACs only support 24 or 32 bit samples.  Start to support
this by adding checks for S24_LE and S32_LE formats.

BUG=chromium:219948
TEST=updated unittests

Change-Id: Ibedd27182471947741e6f62007574fb49b455e56
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: mix - Short circuit some scaling.

Add checks if it is worth scaling before doing the scaling.
Re-order cras_mix add to be more readable and take advantage of the
new check in scale_add_clip.

Change-Id: I4a4f340e13f4167e57ff83429b2eea33519751aa
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: mix - reorder exported functions

This will make it clearer when the scale and mix_add functions expand
to support formats other than s16le.

Change-Id: I28c6403e2c35d93164b8c6ea6dc758994bac1e81
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: mix - Add 32 and 24 bit mixing

This will be used for devices that support S32_LE  and S24_LE formats.

BUG=chromium:219948
TEST=added unittests

Change-Id: I41f0f49ca8cc81e5321d3eed1767ded541355aea
Signed-off-by: Dylan Reid <dgreid@chromium.org>
CRAS: dev_stream - Mix proper format.

Mix the format that matches the device.  This adds a format parameter
to dev_stream_mix so the correct format can be used when mixing.

BUG=chromium:219948
TEST=play through USB DAC that supports 32 bit samples only.

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