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<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9<TITLE>MIC_AdjustAutoSamplingAsync</TITLE> 10</HEAD> 11 12<BODY> 13 14<H1 align="left">MIC_AdjustAutoSamplingAsync <img src="../../image/NTR.gif"></H1> 15 16<H2>Syntax</H2> 17<DL> 18 <DD> 19<CODE>#include <nitro/spi.h></CODE><BR> 20 <PRE><CODE><A href="MICResult.html">MICResult</A> MIC_AdjustAutoSamplingAsync( 21 u32 rate, 22 <A href="MICCallback.html">MICCallback</A> callback, 23 void* arg );</CODE></PRE> 24 25 </DD> 26</DL> 27 28<H2>Arguments</H2> 29<TABLE border="1" width="100%"> 30 <TBODY> 31 <TR> 32 <TD width="300"><EM><STRONG><FONT face="Courier New">rate</FONT></STRONG></EM></TD> 33 <TD width="700">The sampling rate. Directly specifies ARM7 CPU timer cycles.<br> 34 Can also be selected from the <CODE><A href="MICSamplingRate.html">MICSamplingRate</A></CODE> enumerated type.</TD> 35 </TR> 36 <TR> 37 <TD><EM><STRONG><FONT face="Courier New">callback</FONT></STRONG></EM></TD> 38 <TD>Specifies the pointer to the callback function. This callback is called from within the interrupt handler.</TD> 39 </TR> 40 <TR> 41 <TD><EM><STRONG><FONT face="Courier New">arg</FONT></STRONG></EM></TD> 42 <TD>Specifies the argument passed to the callback function.</TD> 43 </TR> 44 </TBODY> 45</TABLE> 46 47<H2>Return Values</H2> 48<P> 49Returns 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. 50</P> 51 52<H2>Description</H2> 53<P> 54Asynchronously adjusts the sampling rate of the microphone's auto-sampling.<br />This function issues a request to the ARM7 to adjust 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. This is only valid when auto-sampling has already begun. The CPU timer cycle is updated when the ARM7 receives the request, not earlier. 55</P> 56<P> 57This 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. 58</P> 59 60<H2>See Also</H2> 61<P> 62<code><a href="MIC_AdjustAutoSampling.html">MIC_AdjustAutoSampling</a></code>, <code><a href="MIC_StartAutoSamplingAsync.html">MIC_StartAutoSamplingAsync</a></code>, <code><a href="MIC_StopAutoSamplingAsync.html">MIC_StopAutoSamplingAsync</a></code> 63</P> 64 65<H2>Revision History</H2> 66<P> 672008/01/09 Revised a description of differences in behavior due to the CODEC mode. <BR>2007/11/17 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 Initial version.<BR> 68</P> 69<hr><p>CONFIDENTIAL</p></body> 70</HTML> 71