1 /* SPDX-License-Identifier: BSD-3-Clause
2  *
3  * Copyright(c) 2012 Intel Corporation. All rights reserved.
4  */
5 
6 #ifndef __SOF_AUDIO_ASRC_ASRC_CONFIG_H__
7 #define __SOF_AUDIO_ASRC_ASRC_CONFIG_H__
8 
9 /* If next define is set to 1 the ASRC is configured automatically. Setting
10  * to zero temporarily is useful is for testing needs.
11  */
12 #define ASRC_AUTOARCH    1
13 
14 /* Select optimized code variant when xt-xcc compiler is used on HiFi3 */
15 #if ASRC_AUTOARCH == 1
16 #if defined __XCC__
17 /* For xt-xcc */
18 #include <xtensa/config/core-isa.h>
19 #if XCHAL_HAVE_HIFI3 == 1
20 /* Version for HiFi3 */
21 #define ASRC_HIFI3	1
22 #define ASRC_GENERIC	0
23 #else
24 /* Version for e.g. HiFi2EP */
25 #define ASRC_HIFI3	0
26 #define ASRC_GENERIC	1
27 #endif
28 #else
29 /* For GCC */
30 #define ASRC_GENERIC	1
31 #define ASRC_HIFI3	0
32 #endif /* XCC */
33 #else
34 /* Applied when ASRC_AUTOARCH is set to zero */
35 #define ASRC_GENERIC	1 /* Enable generic */
36 #define ASRC_HIFI3	0 /* Disable HiFi3  */
37 #endif /* Autoarch */
38 
39 #endif /* __SOF_AUDIO_ASRC_ASRC_CONFIG_H__ */
40