sof/src
Seppo Ingalsuo c23c8ac5d3 Drivers: DMIC: Fix risk for overflow in unmute ramp calculation
This patch adds cast to int64_t for the multiplication and adds 32 bit
saturation to ensure overflow of the product is not possible.

This function is used to calculate ramp time in IPC4 NHLT blob mode
where the time is not passed from topology. Currently rates up to
48 kHz remain under product int32_t range, so normally there is no
issue. However 96 kHz rate would always result to incorrect
LOGRAMP_TIME_MIN_MS (10 ms).

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-09-06 13:52:47 +01:00
..
arch header: rtos: use rtos specific version of string.h 2022-08-31 12:01:07 +01:00
audio fix function name error 2022-09-06 13:51:22 +01:00
debug header: rtos: use rtos specific version of string.h 2022-08-31 12:01:07 +01:00
drivers header: rtos: use rtos specific version of string.h 2022-08-31 12:01:07 +01:00
idc header: rtos: decouple headers into rtos specific directories. 2022-08-31 12:01:07 +01:00
include Drivers: DMIC: Fix risk for overflow in unmute ramp calculation 2022-09-06 13:52:47 +01:00
init header: rtos: use rtos specific version of bit.h 2022-08-31 12:01:07 +01:00
ipc ipc4: add debug logs for RX/TX messages 2022-09-06 10:11:25 +01:00
lib header: rtos: use rtos specific version of string.h 2022-08-31 12:01:07 +01:00
library_manager library manager: fix outdated include path 2022-09-02 18:25:27 +01:00
logging zephyr: deprecate zephyr.h and use kernel.h header 2022-09-06 09:59:15 +01:00
math Math: Add library for matrix functions 2022-08-31 14:45:32 +01:00
platform header: rtos: use rtos specific version of string.h 2022-08-31 12:01:07 +01:00
probe probe: add backend for logging via probes 2022-08-16 15:36:42 +01:00
samples header: rtos: use rtos specific version of string.h 2022-08-31 12:01:07 +01:00
schedule header: rtos: use rtos specific version of bit.h 2022-08-31 12:01:07 +01:00
trace header: rtos: use rtos specific version of string.h 2022-08-31 12:01:07 +01:00
CMakeLists.txt library: add trace and shared memory region 2020-12-10 22:26:25 +00:00
Kconfig Math: Build library functions if enabled from Kconfig 2021-11-21 22:41:43 +00:00
spinlock.c header: rtos: decouple headers into rtos specific directories. 2022-08-31 12:01:07 +01:00