Update project.
[bertos.git] / boards / stm32-p103 / templates / stm32-p103_kernel / cfg / cfg_wm8731.h
1 /**
2  * \file
3  * <!--
4  * This file is part of BeRTOS.
5  *
6  * Bertos is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  * As a special exception, you may use this file as part of a free software
21  * library without restriction.  Specifically, if other files instantiate
22  * templates or use macros or inline functions from this file, or you compile
23  * this file and link it with other files to produce an executable, this
24  * file does not by itself cause the resulting executable to be covered by
25  * the GNU General Public License.  This exception does not however
26  * invalidate any other reasons why the executable file might be covered by
27  * the GNU General Public License.
28  *
29  * Copyright 2011 Develer S.r.l. (http://www.develer.com/)
30  *
31  * -->
32  *
33  * \brief Configuration file for the WM8731 module.
34  *
35  * \author Daniele Basile <asterix@develer.com>
36  */
37
38 #ifndef CFG_WM8731_H
39 #define CFG_WM8731_H
40
41 /**
42  * Module logging level.
43  * $WIZ$ type = "enum"
44  * $WIZ$ value_list = "log_level"
45  */
46 #define WM8731_LOG_LEVEL      LOG_LVL_INFO
47
48 /**
49  * Module logging format.
50  * $WIZ$ type = "enum"
51  * $WIZ$ value_list = "log_format"
52  */
53 #define WM8731_LOG_FORMAT     LOG_FMT_TERSE
54
55
56 /**
57  * Digital control: ADC High pass filter
58  * $WIZ$ type = "boolean"
59  */
60 #define CONFIG_WM8731_DAPC     0
61
62
63 /**
64  * Digital control: De-emphasis control
65  * $WIZ$ type = "enum"
66  * $WIZ$ value_list = "wm8731_deemp"
67  */
68 #define CONFIG_WM8731_DEEMP     WM8731_DEEMP_DISABLE
69
70 /**
71  * Digital control: DAC soft mute control
72  * $WIZ$ type = "boolean"
73  */
74 #define CONFIG_WM8731_DACMU     0
75
76
77 /**
78  * Analog control: Microphone boost
79  * $WIZ$ type = "boolean"
80  */
81 #define CONFIG_WM8731_MICBOOST     0
82
83 /**
84  * Analog control: Microphone/Line Input select to ADC
85  * $WIZ$ type = "enum"
86  * $WIZ$ value_list = "wm8731_insel"
87  */
88 #define CONFIG_WM8731_INSEL     WM8731_INSEL_MIC
89
90
91 /**
92  * Analog control: out selector
93  * $WIZ$ type = "enum"
94  * $WIZ$ value_list = "wm8731_bypass"
95  */
96 #define CONFIG_WM8731_BYPASS     WM8731_DACSEL
97
98 /**
99  * Analog control: Side tone attenuation
100  * $WIZ$ type = "enum"
101  * $WIZ$ value_list = "wm8731_sideatt"
102  */
103 #define CONFIG_WM8731_SIDEATT     WM8731_SIDEATT_6dB
104
105
106 /**
107  * Digital Audio interface format.
108  * $WIZ$ type = "enum"
109  * $WIZ$ value_list = "wm8731_fmt"
110  */
111 #define CONFIG_WM8731_INTERFACE_FORMAT    WM8731_FORMAT_I2S
112
113 /**
114  * Digital Audio data bit length.
115  * $WIZ$ type = "enum"
116  * $WIZ$ value_list = "wm8731_databit"
117  */
118 #define CONFIG_WM8731_IWL_BITS            WM8731_IWL_16_BIT
119
120 /**
121  * Enable Master mode.
122  * $WIZ$ type = "boolean"
123  */
124 #define CONFIG_WM8731_MS     0
125
126
127 /**
128  * Data sampling rate, refer to datasheet for this value.
129  * $WIZ$ type = "hex"
130  */
131 #define CONFIG_WM8731_SAMPLING_RATES     0x6
132
133 #endif /* CFG_WM8731_H */