mirror of https://github.com/thesofproject/sof.git
50bd96ded4
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> |
||
---|---|---|
.. | ||
include | ||
src | ||
CMakeLists.txt | ||
cmocka-xtensa-xt-toolchain.cmake | ||
memory_mock.x.in |