import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / misc / mediatek / sound / mt8127 / AudDrv_Def.h
1 /******************************************************************************
2 *
3 *
4 * Filename:
5 * ---------
6 * AudDrv_Common.h
7 *
8 * Project:
9 * --------
10 * MT6583 FPGA LDVT Audio Driver
11 *
12 * Description:
13 * ------------
14 * Audio register
15 *
16 * Author:
17 * -------
18 * Chipeng Chang (MTK02308)
19 *
20 *---------------------------------------------------------------------------
21 ---
22 * $Revision: #1 $
23 * $Modtime:$
24 * $Log:$
25 *
26 *
27
28 *******************************************************************************/
29
30 #ifndef AUDIO_DEF_H
31 #define AUDIO_DEF_H
32
33 // Type re-definition
34 #ifndef int8
35 typedef signed char int8;
36 #endif
37
38 #ifndef uint8
39 typedef unsigned char uint8;
40 #endif
41
42 #ifndef int16
43 typedef short int16;
44 #endif
45
46 #ifndef uint16
47 typedef unsigned short uint16;
48 #endif
49
50 #ifndef int32
51 typedef int int32;
52 #endif
53
54 #ifndef uint32
55 typedef unsigned int uint32;
56 #endif
57
58 #ifndef int64
59 typedef long long int64;
60 #endif
61
62 #ifndef uint64
63 typedef unsigned long long uint64;
64 #endif
65
66 #define PM_MANAGER_API
67 #define AUDIO_MEMORY_SRAM
68 #define AUDIO_MEM_IOREMAP
69
70
71 // below for audio debugging
72 #define DEBUG_AUDDRV
73 #define DEBUG_AFE_REG
74 #define DEBUG_ANA_REG
75 #define DEBUG_AUD_CLK
76
77 /*
78 #ifdef DEBUG_AUDDRV
79 #define PRINTK_AUDDRV(format, args...) xlog_printk( ANDROID_LOG_VERBOSE,"Sound",format, ##args )
80 #else
81 #define PRINTK_AUDDRV(format, args...)
82 #endif
83
84 #ifdef DEBUG_AFE_REG
85 #define PRINTK_AFE_REG(format, args...) xlog_printk( ANDROID_LOG_VERBOSE,"Sound",format, ##args )
86 #else
87 #define PRINTK_AFE_REG(format, args...)
88 #endif
89
90 #ifdef DEBUG_ANA_REG
91 #define PRINTK_ANA_REG(format, args...) xlog_printk( ANDROID_LOG_VERBOSE,"Sound",format, ##args )
92 #else
93 #define PRINTK_ANA_REG(format, args...)
94 #endif
95
96 #ifdef DEBUG_AUD_CLK
97 #define PRINTK_AUD_CLK(format, args...) xlog_printk( ANDROID_LOG_VERBOSE,"Sound",format, ##args )
98 #else
99 #define PRINTK_AUD_CLK(format, args...)
100 #endif
101
102 #define PRINTK_AUD_ERROR(format, args...) xlog_printk( ANDROID_LOG_VERBOSE,"Sound",format, ##args )
103 */
104
105 #ifdef DEBUG_AUDDRV
106 #define PRINTK_AUDDRV(format, args...) printk(format, ##args )
107 #else
108 #define PRINTK_AUDDRV(format, args...)
109 #endif
110
111 #ifdef DEBUG_AFE_REG
112 #define PRINTK_AFE_REG(format, args...) printk(format, ##args )
113 #else
114 #define PRINTK_AFE_REG(format, args...)
115 #endif
116
117 #ifdef DEBUG_ANA_REG
118 #define PRINTK_ANA_REG(format, args...) printk(format, ##args )
119 #else
120 #define PRINTK_ANA_REG(format, args...)
121 #endif
122
123 #ifdef DEBUG_AUD_CLK
124 #define PRINTK_AUD_CLK(format, args...) printk(format, ##args )
125 #else
126 #define PRINTK_AUD_CLK(format, args...)
127 #endif
128
129 #define PRINTK_AUD_ERROR(format, args...) printk(format, ##args )
130
131 // if need assert , use AUDIO_ASSERT(true)
132 #define AUDIO_ASSERT(value) BUG_ON(false)
133
134
135 /**********************************
136 * Other Definitions *
137 **********************************/
138 #define BIT_00 0x00000001 /* ---- ---- ---- ---- ---- ---- ---- ---1 */
139 #define BIT_01 0x00000002 /* ---- ---- ---- ---- ---- ---- ---- --1- */
140 #define BIT_02 0x00000004 /* ---- ---- ---- ---- ---- ---- ---- -1-- */
141 #define BIT_03 0x00000008 /* ---- ---- ---- ---- ---- ---- ---- 1--- */
142 #define BIT_04 0x00000010 /* ---- ---- ---- ---- ---- ---- ---1 ---- */
143 #define BIT_05 0x00000020 /* ---- ---- ---- ---- ---- ---- --1- ---- */
144 #define BIT_06 0x00000040 /* ---- ---- ---- ---- ---- ---- -1-- ---- */
145 #define BIT_07 0x00000080 /* ---- ---- ---- ---- ---- ---- 1--- ---- */
146 #define BIT_08 0x00000100 /* ---- ---- ---- ---- ---- ---1 ---- ---- */
147 #define BIT_09 0x00000200 /* ---- ---- ---- ---- ---- --1- ---- ---- */
148 #define BIT_10 0x00000400 /* ---- ---- ---- ---- ---- -1-- ---- ---- */
149 #define BIT_11 0x00000800 /* ---- ---- ---- ---- ---- 1--- ---- ---- */
150 #define BIT_12 0x00001000 /* ---- ---- ---- ---- ---1 ---- ---- ---- */
151 #define BIT_13 0x00002000 /* ---- ---- ---- ---- --1- ---- ---- ---- */
152 #define BIT_14 0x00004000 /* ---- ---- ---- ---- -1-- ---- ---- ---- */
153 #define BIT_15 0x00008000 /* ---- ---- ---- ---- 1--- ---- ---- ---- */
154 #define BIT_16 0x00010000 /* ---- ---- ---- ---1 ---- ---- ---- ---- */
155 #define BIT_17 0x00020000 /* ---- ---- ---- --1- ---- ---- ---- ---- */
156 #define BIT_18 0x00040000 /* ---- ---- ---- -1-- ---- ---- ---- ---- */
157 #define BIT_19 0x00080000 /* ---- ---- ---- 1--- ---- ---- ---- ---- */
158 #define BIT_20 0x00100000 /* ---- ---- ---1 ---- ---- ---- ---- ---- */
159 #define BIT_21 0x00200000 /* ---- ---- --1- ---- ---- ---- ---- ---- */
160 #define BIT_22 0x00400000 /* ---- ---- -1-- ---- ---- ---- ---- ---- */
161 #define BIT_23 0x00800000 /* ---- ---- 1--- ---- ---- ---- ---- ---- */
162 #define BIT_24 0x01000000 /* ---- ---1 ---- ---- ---- ---- ---- ---- */
163 #define BIT_25 0x02000000 /* ---- --1- ---- ---- ---- ---- ---- ---- */
164 #define BIT_26 0x04000000 /* ---- -1-- ---- ---- ---- ---- ---- ---- */
165 #define BIT_27 0x08000000 /* ---- 1--- ---- ---- ---- ---- ---- ---- */
166 #define BIT_28 0x10000000 /* ---1 ---- ---- ---- ---- ---- ---- ---- */
167 #define BIT_29 0x20000000 /* --1- ---- ---- ---- ---- ---- ---- ---- */
168 #define BIT_30 0x40000000 /* -1-- ---- ---- ---- ---- ---- ---- ---- */
169 #define BIT_31 0x80000000 /* 1--- ---- ---- ---- ---- ---- ---- ---- */
170
171 #endif
172
173