ref: d2fbdfd3272dccc27618ca36ddd52ea2631a7b19
parent: 8e7e4ca33d480a4d4441e67d2b99391b57cf7124
author: Alin Jerpelea <alin.jerpelea@sony.com>
date: Tue Nov 3 04:31:40 EST 2020
src_sinc: define configurable channels Embedded systems have limited resources and need to lower the default channel alocation Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
--- a/src/src_sinc.c
+++ b/src/src_sinc.c
@@ -25,7 +25,13 @@
#define SHIFT_BITS 12
#define FP_ONE ((double) (((increment_t) 1) << SHIFT_BITS))
#define INV_FP_ONE (1.0 / FP_ONE)
+
+/* Customixe max channls from Kconfig. */
+#ifndef CONFIG_CHAN_NR
#define MAX_CHANNELS 128
+#else
+#define MAX_CHANNELS CONFIG_CHAN_NR
+#endif
/*========================================================================================
*/