1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>MIC_StartAutoSamplingAsync</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">MIC_StartAutoSamplingAsync <img src="../../image/NTR.gif"></h1>
15
16<h2>Syntax</h2>
17<dl>
18  <dd>
19<CODE>#include &lt;nitro/spi.h&gt;</CODE><BR>
20  <PRE><CODE><A href="MICResult.html">MICResult</A> MIC_StartAutoSamplingAsync(
21            const <CODE><A href="MICAutoParam.html">MICAutoParam</A></CODE>*    param,
22            <A href="MICCallback.html">MICCallback</A>            callback,
23            void*                  arg );</CODE></PRE>
24  </dd>
25</dl>
26
27<h2>Arguments</h2>
28<TABLE border="1" width="100%">
29  <TBODY>
30    <TR>
31      <TD width="300"><em><strong><font face="Courier New">param</font></strong></em></TD>
32      <TD width="700">Specifies a pointer to a <CODE><A href="MICAutoParam.html">MICAutoParam</A></CODE>-type auto-sampling settings structure.</TD>
33    </TR>
34    <TR>
35      <TD><em><strong><font face="Courier New">callback</font></strong></em></TD>
36      <TD>Specifies the pointer to the callback function. This callback is called from within the interrupt handler.</TD>
37    </TR>
38    <TR>
39      <TD><em><strong><font face="Courier New">arg</font></strong></em></TD>
40      <TD>Specifies the argument passed to the callback function.</TD>
41    </TR>
42  </TBODY>
43</TABLE>
44
45<h2>Return Values</h2>
46<P>
47Returns the processing result as a <CODE><A href="MICResult.html">MICResult</A></CODE> enumerated type. Returns <CODE>MIC_RESULT_SUCCESS</CODE> if the asynchronous process starts normally, and some other value if the process fails for some reason.
48</P>
49
50<H2>Description</H2>
51<P>
52Asynchronously starts microphone auto-sampling. This function issues a request to the ARM7 to start auto-sampling and returns control to the caller without waiting for a response. You must use the <CODE>result</CODE> argument passed by the user callback function to get the ARM7 processing result. If this function fails, the asynchronous operation is not performed and the user callback function is not called. Where the input volume exceeds the minimum or maximum value, the output data will be clamped. It is possible to use the <CODE><A href="../pm/PM_SetAmpGain.html">PM_SetAmpGain*</A></CODE> functions to adjust the input volume that can be sampled.
53</P>
54<P>
55This function will return <CODE>MIC_RESULT_INVALID_COMMAND</CODE> when the CODEC is running in CODEC-TWL mode, because auto-sampling cannot be run at an arbitrary frequency in CODEC-TWL mode.
56</P>
57
58<H2>Note</H2>
59<P>
60<FONT color=red>It is possible to operate other ARM7 processor peripherals (SPI device) during microphone auto-sampling. However, note that if another SPI device had taken over the access for a long time, the microphone would keep returning a certain value during that time.<BR></FONT>
61</P>
62
63<H2>See Also</H2>
64<P>
65<a href="MIC_StartAutoSampling.html"><code>MIC_StartAutoSampling</code></a>, <a href="MIC_StopAutoSampling.html"><code>MIC_StopAutoSampling</code></a>, <a href="MIC_StopAutoSamplingAsync.html"><code>MIC_StopAutoSamplingAsync</code></a>, <a href="../pm/PM_SetAmpGain.html"><code>PM_SetAmpGain</code></a>
66</P>
67
68<H2>Revision History</H2>
69<P>
702008/01/09 Revised a description of differences in behavior due to the CODEC mode. <BR>2007/11/07 Added a description of operations on the TWL platform. <BR>2005/06/27 Added supplementary information stating that the callback is invoked from the interrupt handler. <br>2005/01/11 Revised <B>Return Values</B> and <B>Description</B>, and added functions to <B>See Also</B>. <BR>2004/09/17 Changed the type of the <CODE>param</CODE> argument. <BR>2004/08/10 Added explanations related to input volume and touch panel sampling during microphone auto-sampling. <BR>2004/06/01 Initial version.<BR>
71</P>
72<hr><p>CONFIDENTIAL</p></body>
73</html>
74