1 /* SPDX-License-Identifier: BSD-3-Clause 2 * 3 * Copyright(c) 2017 Intel Corporation. All rights reserved. 4 * 5 * Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> 6 */ 7 8 #ifndef __SOF_AUDIO_SRC_SRC_CONFIG_H__ 9 #define __SOF_AUDIO_SRC_SRC_CONFIG_H__ 10 11 12 13 /* If next define is set to 1 the SRC is configured automatically. Setting 14 * to zero temporarily is useful is for testing needs. 15 */ 16 #define SRC_AUTOARCH 1 17 18 /* Force manually some code variant when SRC_AUTODSP is set to zero. These 19 * are useful in code debugging. 20 */ 21 #if SRC_AUTOARCH == 0 22 #define SRC_GENERIC 1 23 #define SRC_HIFIEP 0 24 #define SRC_HIFI3 0 25 #endif 26 27 /* Select optimized code variant when xt-xcc compiler is used */ 28 #if SRC_AUTOARCH == 1 29 #if defined __XCC__ 30 #include <xtensa/config/core-isa.h> 31 #define SRC_GENERIC 0 32 #if XCHAL_HAVE_HIFI2EP == 1 33 #define SRC_HIFIEP 1 34 #define SRC_HIFI3 0 35 #endif 36 #if XCHAL_HAVE_HIFI3 == 1 37 #define SRC_HIFI3 1 38 #define SRC_HIFIEP 0 39 #endif 40 #else 41 /* GCC */ 42 #define SRC_GENERIC 1 43 #define SRC_HIFIEP 0 44 #define SRC_HIFI3 0 45 #if CONFIG_LIBRARY 46 #else 47 #define SRC_SHORT 1 /* Need to use for generic code version speed */ 48 #endif 49 #endif 50 #endif 51 52 /* Kconfig option tiny needs 16 bits coefficients, other options use 32 bits */ 53 #if !defined(SRC_SHORT) 54 #if CONFIG_COMP_SRC_TINY 55 #define SRC_SHORT 1 /* 16 bit coefficients filter core */ 56 #else 57 #define SRC_SHORT 0 /* 32 bit coefficients filter core */ 58 #endif 59 #endif 60 61 #endif /* __SOF_AUDIO_SRC_SRC_CONFIG_H__ */ 62