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_StartLimitedSampling</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MIC_StartLimitedSampling <img src="../../image/TWL.gif"></h1> 15 16<h2>Syntax</h2> 17<dl> 18 <dd> 19<CODE>#include <twl/spi.h></CODE><BR> 20 <PRE><CODE><A href="MICResult.html">MICResult</A> MIC_StartLimitedSampling( 21 const <CODE><A href="MICAutoParam.html">MICAutoParam</A></CODE>* param );</CODE></PRE> 22 </dd> 23</dl> 24 25<h2>Arguments</h2> 26<TABLE border="1" width="100%"> 27 <TBODY> 28 <TR> 29<TD width="300"><SPAN class="argument">param</SPAN></TD> 30<TD width="700">Pointer to a <A href="MICAutoParam.html"><CODE>MICAutoParam</CODE></A>-type auto-sampling settings structure.</TD> 31 </TR> 32 </TBODY> 33</TABLE> 34 35<h2>Return Values</h2> 36<P> 37Returns the processing result as a <A href="MICResult.html"><CODE>MICResult</CODE></A> enumerated type. Returns <CODE>MIC_RESULT_SUCCESS</CODE> if processing completed successfully; returns some other value if the process failed. 38</P> 39 40<H2>Description</H2> 41<P>Starts frequency-limited microphone auto-sampling.<BR>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, waits for the ARM7 to respond, and returns the processing result. This is a synchronous version of the <A href="MIC_StartLimitedSamplingAsync.html"><CODE>MIC_StartLimitedSamplingAsync</CODE></A> function. Where the input volume falls outside the minimum or maximum value, the sampling data is clamped. 42</P> 43<P> 44Frequency-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>->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. 45</P> 46<TABLE border="1" width="100%"> 47 <TBODY> 48 <TR> 49<TH width="20%"><center>Sound Master Frequency</center></TD> 50<TH width="40%"><center>Settable Frequency</center></TD> 51<TH width="40%"><center>Description</center></TD> 52 </TR> 53 <TR> 54<TD rowspan="4">32.73 kHz</TD> 55<TD><CODE>MIC_SAMPLING_RATE_32730</CODE></TD> 56<TD>32.73 kHz (1/1 of the master frequency)</TD> 57 </TR> 58 <TR> 59<TD><CODE>MIC_SAMPLING_RATE_16360</CODE></TD> 60<TD>16.36 kHz (1/2 of the master frequency)</TD> 61 </TR> 62 <TR> 63<TD><CODE>MIC_SAMPLING_RATE_10910</CODE></TD> 64<TD>10.91 kHz (1/3 of the master frequency)</TD> 65 </TR> 66 <TR> 67<TD><CODE>MIC_SAMPLING_RATE_8180</CODE></TD> 68<TD>8.18 kHz (1/4 of the master frequency)</TD> 69 </TR> 70 <TR> 71<TD rowspan="4">47.61kHz</TD> 72<TD><CODE>MIC_SAMPLING_RATE_47610</CODE></TD> 73<TD>47.61 kHz (1/1 of the master frequency)</TD> 74 </TR> 75 <TR> 76<TD><CODE>MIC_SAMPLING_RATE_23810</CODE></TD> 77<TD>23.81 kHz (1/2 of the master frequency)</TD> 78 </TR> 79 <TR> 80<TD><CODE>MIC_SAMPLING_RATE_15870</CODE></TD> 81<TD>15.87 kHz (1/3 of the master frequency)</TD> 82 </TR> 83 <TR> 84<TD><CODE>MIC_SAMPLING_RATE_11900</CODE></TD> 85<TD>11.90 kHz (1/4 of the master frequency)</TD> 86 </TR> 87 </TBODY> 88</TABLE> 89 90<H2>Note</H2> 91<P> 92<FONT color=red>This function waits for a PXI interrupt for synchronization purposes. Do not call it when PXI interrupts are prohibited.<BR> <BR>Because frequency-limited auto-sampling cannot be performed on the NITRO platform or when the CODEC is running in CODEC-DS mode, this function instead calls the <A href="MIC_StartAutoSampling.html"><CODE>MIC_StartAutoSampling</CODE></A> auto-sampling control function.</FONT> 93</P> 94<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> 95<H2>See Also</H2> 96<P> 97<A href="MIC_StartLimitedSamplingAsync.html"><CODE>MIC_StartLimitedSamplingAsync</CODE></A><BR> <A href="MIC_StopLimitedSampling.html"><CODE>MIC_StopLimitedSampling</CODE></A><BR> <A href="MIC_AdjustLimitedSampling.html"><CODE>MIC_AdjustLimitedSampling</CODE></A> 98</P> 99 100<H2>Revision History</H2> 101<P> 1022009/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. 103</P> 104<hr><p>CONFIDENTIAL</p></body> 105</html> 106