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