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_StartLimitedSamplingAsync</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">MIC_StartLimitedSamplingAsync <img src="../../image/TWL.gif"></h1>
15
16<h2>Syntax</h2>
17<dl>
18  <dd>
19<CODE>#include &lt;twl/spi.h&gt;</CODE><BR>
20  <PRE><CODE><A href="MICResult.html">MICResult</A> MIC_StartLimitedSamplingAsync(
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"><SPAN class="argument">param</SPAN></TD>
32<TD width="700">Pointer to a <A href="MICAutoParam.html"><CODE>MICAutoParam</CODE></A>-type auto-sampling settings structure.</TD>
33    </TR>
34    <TR>
35<TD><SPAN class="argument">callback</SPAN></TD>
36<TD>Pointer to the callback function. This callback is called from inside the interrupt handler.</TD>
37    </TR>
38    <TR>
39<TD><SPAN class="argument">arg</SPAN></TD>
40<TD>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 <A href="MICResult.html"><CODE>MICResult</CODE></A> enumerated type. Returns <CODE>MIC_RESULT_SUCCESS</CODE> if the asynchronous process started normally; returns some other value if the process failed.
48</P>
49
50<H2>Description</H2>
51<P>
52Asynchronously starts frequency-limited microphone auto-sampling. Use the <A href="../pm/PM_SetAmp.html"><CODE>PM_SetAmp*</CODE></A> function to turn on the programmable gain amp before sampling.<BR>This function issues a request to the ARM7 to start frequency-limited auto-sampling and then returns control to the caller without waiting for a response. You must use the <SPAN class="argument">result</SPAN> 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.<BR>Where the input volume exceeds the minimum or maximum value, the output data is clamped.
53</P>
54<P>
55Frequency-limited auto-sampling differs from normal auto-sampling in that the hardware does the actual sampling. As a result, stable sampling can be performed at precise cycles; also, with the CPU burden on the ARM7 relaxed, effects of sampling on wireless communications and other I/O are reduced. On the other hand, sampling cannot be performed at frequencies that are unsupported by the hardware.  The following sampling frequencies can be specified for <SPAN class="argument">param</SPAN><CODE>-&gt;rate</CODE>, but the frequencies that can be specified at a given time depend on the sound master frequency settings and thus are further limited to four of the following. A value of <CODE>MIC_RESULT_ILLEGAL_PARAMETER</CODE> is returned if one of the limited frequencies is not specified.
56</P>
57<TABLE border="1" width="100%">
58  <TBODY>
59    <TR>
60<TH width="20%"><center>Sound Master Frequency</center></TD>
61<TH width="40%"><center>Settable Frequency</center></TD>
62<TH width="40%"><center>Description</center></TD>
63    </TR>
64    <TR>
65<TD rowspan="4">32.73 kHz</TD>
66<TD><CODE>MIC_SAMPLING_RATE_32730</CODE></TD>
67<TD>32.73 kHz (1/1 of the master frequency)</TD>
68    </TR>
69    <TR>
70<TD><CODE>MIC_SAMPLING_RATE_16360</CODE></TD>
71<TD>16.36 kHz (1/2 of the master frequency)</TD>
72    </TR>
73    <TR>
74<TD><CODE>MIC_SAMPLING_RATE_10910</CODE></TD>
75<TD>10.91 kHz (1/3 of the master frequency)</TD>
76    </TR>
77    <TR>
78<TD><CODE>MIC_SAMPLING_RATE_8180</CODE></TD>
79<TD>8.18 kHz (1/4 of the master frequency)</TD>
80    </TR>
81    <TR>
82<TD rowspan="4">47.61kHz</TD>
83<TD><CODE>MIC_SAMPLING_RATE_47610</CODE></TD>
84<TD>47.61 kHz (1/1 of the master frequency)</TD>
85    </TR>
86    <TR>
87<TD><CODE>MIC_SAMPLING_RATE_23810</CODE></TD>
88<TD>23.81 kHz (1/2 of the master frequency)</TD>
89    </TR>
90    <TR>
91<TD><CODE>MIC_SAMPLING_RATE_15870</CODE></TD>
92<TD>15.87 kHz (1/3 of the master frequency)</TD>
93    </TR>
94    <TR>
95<TD><CODE>MIC_SAMPLING_RATE_11900</CODE></TD>
96<TD>11.90 kHz (1/4 of the master frequency)</TD>
97    </TR>
98  </TBODY>
99</TABLE>
100
101<H2>Note</H2>
102<P>
103<FONT color=red>Because frequency-limited auto-sampling cannot be performed on the NITRO platform or when the CODEC is running in CODEC-DS mode, this function will instead internally call the <A href="MIC_StartAutoSamplingAsync.html"><CODE>MIC_StartAutoSamplingAsync</CODE></A> auto-sampling control function.</FONT>
104</P>
105<P><FONT color=red>It has been confirmed that slight hardware noise is mixed with the microphone input on the TWL system. See <A href="./about_HardwareNoise.html">here</A> for a workaround.</FONT></P>
106<H2>See Also</H2>
107<P>
108<A href="MIC_StartLimitedSampling.html"><CODE>MIC_StartLimitedSampling</CODE></A><BR> <A href="MIC_StopLimitedSamplingAsync.html"><CODE>MIC_StopLimitedSamplingAsync</CODE></A><BR> <A href="MIC_AdjustLimitedSamplingAsync.html"><CODE>MIC_AdjustLimitedSamplingAsync</CODE></A>
109</P>
110
111<H2>Revision History</H2>
112<P>
1132009/06/25 Added description of using the <CODE>PM_SetAmp*</CODE> function.<BR> 2008/01/09 Added a note about the difference in behavior with CODEC mode.<BR> 2007/11/17 Initial version.
114</P>
115<hr><p>CONFIDENTIAL</p></body>
116</html>
117