AnsweredAssumed Answered

K66F AKU242 MIC1 levels are really low

Question asked by Aaron Minner on Apr 22, 2020
Latest reply on May 25, 2020 by Felipe García

I'm writing an application that uses the AKU242 on-board microphone to process ambient sound.  However, the input is really low.  During testing, it really only records tapping directly on top of it.  Is it a gain issue?  I see defines for gain values - such as kDA7212_DACGain12DB - but it appears they're used only for playback, not input.  Here's the relevant code, mostly taken from the SDK provided example source:

 

format.bitWidth = kSAI_WordWidth16bits; // kSAI_WordWidth8bits; // kSAI_WordWidth32bits;
format.channel = 0U;
format.sampleRate_Hz = kSAI_SampleRate32KHz;
#if (defined FSL_FEATURE_SAI_HAS_MCLKDIV_REGISTER && FSL_FEATURE_SAI_HAS_MCLKDIV_REGISTER) || \
(defined FSL_FEATURE_PCC_HAS_SAI_DIVIDER && FSL_FEATURE_PCC_HAS_SAI_DIVIDER)
format.masterClockHz = OVER_SAMPLE_RATE * format.sampleRate_Hz;
#else
format.masterClockHz = SAI_CLK_FREQ;
#endif
format.protocol = config.protocol;
format.stereo = kSAI_Stereo;
format.isFrameSyncCompact = true;
#if defined(FSL_FEATURE_SAI_FIFO_COUNT) && (FSL_FEATURE_SAI_FIFO_COUNT > 1)
format.watermark = FSL_FEATURE_SAI_FIFO_COUNT / 2U;
#endif

CODEC_Init( &codecHandle, &boardCodecConfig );
CODEC_SetFormat( &codecHandle, format.masterClockHz, format.sampleRate_Hz, format.bitWidth );

DA7212_ChangeInput( &codecHandle, kDA7212_Input_MIC1_An );

The same code works fine if I use the AUX input channel with line level values.  So, by process of elimination, I lean toward some issue with the AKU242.

Outcomes