1.1.2.6.2 DRV_AK4954_MicGainSet Function

void DRV_AK4954_MicGainSet(DRV_HANDLE handle, uint8_t gain)

Summary

This function sets the microphone gain for the AK4954 CODEC.

Description

This functions sets the microphone gain value from 0-31 which can range from -1.5 to 28.3 dB

Preconditions

The DRV_AK4954_Initialize routine must have been called for the specified AK4954 driver instance.

DRV_AK4954_Open must have been called to obtain a valid opened device handle.

Parameters

ParametersDescription
handleA valid open-instance handle, returned from the driver's open routine
gainGain value, in range 0-31

Returns

None.

Remarks

None.

Example

_\/\/ myAppObj is an application specific object._

MY_APP_OBJ myAppObj;

_\/\/ myAK4954Handle is the handle returned \/\/ by the DRV_AK4954_Open function._

DRV_AK4954_MicGainSet(myAK4954Handle, 15); _\/\/AK4954 mic gain set to 15_

C

void DRV_AK4954_MicGainSet(DRV_HANDLE handle, uint8_t gain);