sof/test
Seppo Ingalsuo 50bd96ded4 Volume: Allow use of extended volume scale up to 42 dB
This patch alters the volume IPC and ramp to use sQ8.16 gain
values instead of previous Q2.16 kind of unsigned gain value.
The driver has never set the min/max volume values in volume
new() IPC so the macro values VOL_MAX (+42 dB) and VOL_MIN (mute)
are used instead as limits.

The overflow in generic C code with s16 format is fixed. The
comments about volume Q format are updated.

The optimimized xt-xcc version of volume is changed to use 64
bits for multiply result to avoid loss of LSB bits in left shift
after multiply. With 64 bit result there is no need to scale the
volume multiplier as it was done with use of 32 bit multiply
result.

The cmocka volume type is changed to signed integer to match
component type used in this patch. The xtensa AE integer types
are signed so better to avoid unsigned gain values. The volume
scale in reference volume does a small error and cannot handle
above 0 dB max so it is changed as well. The test levels are
changed to exercise gains above and below 0 dB.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-04-18 22:06:13 +02:00
..
cmocka Volume: Allow use of extended volume scale up to 42 dB 2019-04-18 22:06:13 +02:00
CMakeLists.txt cmake: add CMakeLists for unit tests 2019-01-22 15:35:35 +00:00