1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     mic_Api.h
4 
5   Copyright (C)2009-2012 Nintendo Co., Ltd.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Rev: 46347 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_MIC_CTR_MIC_API_H_
17 #define NN_MIC_CTR_MIC_API_H_
18 
19 /* Please see man pages for details
20 
21 */
22 
23 #include <nn/os.h>
24 #include <nn/mic/CTR/mic_Types.h>
25 
26 #define NN_MIC_AMP_GAIN_MAX              119   // 10.5.0dB
27 #define NN_MIC_AMP_GAIN_MIN                0   // 70.0.0dB
28 #define NN_MIC_BUFFER_ALIGNMENT_SIZE    4096
29 #define NN_MIC_BUFFER_ALIGNMENT_ADDRESS 4096
30 
31 namespace nn {
32 namespace mic {
33 namespace CTR {
34 
35     /* Please see man pages for details
36 
37     */
38     const u8 AMP_GAIN_MAX = NN_MIC_AMP_GAIN_MAX;
39 
40     /* Please see man pages for details
41 
42     */
43     const u8 AMP_GAIN_MIN = NN_MIC_AMP_GAIN_MIN;
44 
45     /* Please see man pages for details
46 
47     */
48     const s32 BUFFER_ALIGNMENT_ADDRESS = NN_MIC_BUFFER_ALIGNMENT_ADDRESS;
49 
50     /* Please see man pages for details
51 
52     */
53     const s32 BUFFER_ALIGNMENT_SIZE = NN_MIC_BUFFER_ALIGNMENT_SIZE;
54 
55     /* Please see man pages for details
56 
57 
58 
59 
60 
61 
62 
63     */
64     Result Initialize();
65 
66     /* Please see man pages for details
67 
68 
69 
70 
71 
72 
73 
74 
75     */
76     Result Finalize();
77 
78     /* Please see man pages for details
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
101     */
102     Result SetBuffer( void* address, size_t size );
103 
104     /* Please see man pages for details
105 
106 
107 
108 
109 
110 
111 
112 
113     */
114     Result ResetBuffer( );
115 
116     /* Please see man pages for details
117 
118 
119 
120 
121 
122 
123 
124 
125 
126     */
127     Result GetSamplingBufferSize(size_t* pSize);
128 
129     /* Please see man pages for details
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 
140 
141 
142 
143 
144 
145 
146 
147 
148 
149 
150     */
151     Result StartSampling( SamplingType type, SamplingRate rate, s32 offset, size_t size, bool loop );
152 
153     /* Please see man pages for details
154 
155 
156 
157 
158     */
159     Result StopSampling( void );
160 
161     /* Please see man pages for details
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 
172 
173 
174 
175     */
176     Result AdjustSampling( SamplingRate rate );
177 
178     /* Please see man pages for details
179 
180 
181 
182 
183 
184 
185     */
186     Result IsSampling( bool* pSampling );
187 
188     /* Please see man pages for details
189 
190 
191 
192 
193 
194 
195     */
196     Result GetLastSamplingAddress( uptr* pAddress );
197 
198     /* Please see man pages for details
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
212     */
213     Result GetBufferFullEvent( nn::os::Event* pEvent );
214 
215     /* Please see man pages for details
216 
217 
218 
219 
220 
221 
222 
223 
224 
225     */
226     Result SetAmpGain( u8 gain );
227 
228     /* Please see man pages for details
229 
230 
231 
232 
233 
234 
235     */
236     Result GetAmpGain( u8* pGain );
237 
238     /* Please see man pages for details
239 
240 
241 
242 
243 
244 
245 
246 
247 
248 
249 
250 
251 
252 
253     */
254     Result SetAmp( bool enable );
255 
256     /* Please see man pages for details
257 
258 
259 
260 
261 
262 
263     */
264     Result GetAmp( bool* pEnable );
265 
266     /* Please see man pages for details
267 
268 
269 
270 
271 
272 
273 
274 
275 
276 
277 
278     */
279     bool GetForbiddenArea( s32* upper, s32* lower, SamplingType type, u8 gain );
280 
281     /* Please see man pages for details
282 
283 
284 
285 
286 
287 
288 
289 
290 
291 
292     */
293     Result SetLowPassFilter( bool enable );
294 
295     /* Please see man pages for details
296 
297 
298 
299 
300 
301 
302 
303 
304 
305 
306 
307 
308 
309 
310 
311 
312 
313 
314 
315 
316 
317 
318 
319 
320 
321 
322 
323 
324 
325     */
326     Result SetClamp( bool enable );
327 
328     /* Please see man pages for details
329 
330 
331 
332 
333 
334 
335     */
336     Result GetClamp( bool* pEnable );
337 
338 }
339 }
340 }
341 
342 #endif  // ifndef NN_MIC_CTR_MIC_API_H_
343