#include <cafe/mic.h> int MICSetState(mic_handle_t h_mic, mic_state_t state, unsigned int value);
|h_mic||Handle returned from
|state||An enumerated type specifying which value to program.|
|value||Value to be programmed, cast as
A value of
MIC_ERROR_NONE (zero) indicates success and any other value indicates the type of error that was encountered.
MIC_ERROR_INV_ARG is returned if an invalid handle is passed in.
MIC_ERROR_NOT_INIT is returned when the function is called before
MIC_ERROR_NOT_SUP is returned when setting the quantity specified in state is not supported.
This function is used to program microphone specific values. For example, this function is used to set the current gain.
MICOpenand when audio streaming is in progress. When that is not the case, an error is returned. An application can retry an operation any number of times if an error was returned and the error was due to the streaming state of the microphone data pipeline.
For the microphone gain programming sequence, see
MICSetState is a synchronous call and, depending on the quantity to get, will take from a few to over one
hundred milliseconds to execute, although much of the time
is spent waiting on synchronization objects. This function is not meant to be called from timing
|Background||Do not call this function from the background.|
|Interrupt handler||Do not call this function from any interrupt handler.|
|Exception handler||Do not call this function from any exception handler.|
2013/05/08 Automated cleanup pass.
2012/08/03 Cleanup Pass.
2012/06/08 Update to match SDK 2.06.
2011/12/22 Initial version.