Audio Codec API Reference

group group_board_libs

Basic set of APIs for interacting with the AK4954A audio codec display.

This provides basic initialization and access to to the audio codec.

AK4954A_REG_PWR_MGMT1

Bit definitions for the AK4954A_REG_PWR_MGMT1 register

AK4954A_PWR_MGMT1_PMADL

Microphone Amplifier Lch and ADC Lch Power Management.

AK4954A_PWR_MGMT1_PMADR

Microphone Amplifier Rch and ADC Rch Power Management.

AK4954A_PWR_MGMT1_PMDAC

DAC Power Management.

AK4954A_PWR_MGMT1_LSV

Low Voltage Operation Mode of the Speaker Amplifier.

AK4954A_PWR_MGMT1_PMBP

BEEP Generating Circuit Power Management.

AK4954A_PWR_MGMT1_PMVCM

VCOM Power Management.

AK4954A_PWR_MGMT1_PMPFIL

Programmable Filter Block Power Management.

AK4954A_REG_PWR_MGMT2

Bit definitions for the AK4954A_REG_PWR_MGMT2 register

AK4954A_PWR_MGMT2_LOSEL

Stereo Line Output Select.

AK4954A_PWR_MGMT2_PMSL

Speaker Amp or Stereo Line Output Power Management.

AK4954A_PWR_MGMT2_PMPLL

PLL Power Management.

AK4954A_PWR_MGMT2_MS

Master/Slave Mode Select.

AK4954A_PWR_MGMT2_PMHPL

Lch Headphone Amplifier & Charge Pump Power Management.

AK4954A_PWR_MGMT2_PMHPR

Rch Headphone Amplifier & Charge Pump Power Management.

AK4954A_REG_SIG_SEL1

Bit definitions for the AK4954A_REG_SIG_SEL1 register

AK4954A_SIG_SEL1_PMMP

MPWR pin Power Management.

AK4954A_SIG_SEL1_MPSEL

MPWR Output Select.

AK4954A_SIG_SEL1_DACSL

Signal Switch Control from DAC to Speaker or Stereo Line Amplifier.

AK4954A_SIG_SEL1_SLPSN

Speaker or Stereo Line Amplifier Power-Save Mode.

AK4954A_REG_SIG_SEL1 (MGAIN)

Bit field in the AK4954A_REG_SIG_SEL1 register

Microphone Amplifier Gain Control

AK4954A_SIG_SEL1_MGAIN_0dB
AK4954A_SIG_SEL1_MGAIN_6dB
AK4954A_SIG_SEL1_MGAIN_13dB
AK4954A_SIG_SEL1_MGAIN_20dB
AK4954A_SIG_SEL1_MGAIN_26dB

AK4954A_REG_SIG_SEL2 (RIN)

Bit field in the AK4954A_REG_SIG_SEL2 register

ADC Rch Input Source Select

AK4954A_SIG_SEL2_RIN1
AK4954A_SIG_SEL2_RIN2
AK4954A_SIG_SEL2_RIN3

AK4954A_REG_SIG_SEL2 (LIN)

Bit field in the AK4954A_REG_SIG_SEL2 register

ADC Lch Input Source Select

AK4954A_SIG_SEL2_LIN1
AK4954A_SIG_SEL2_LIN2
AK4954A_SIG_SEL2_LIN3

AK4954A_REG_SIG_SEL2 (SLG)

Bit field in the AK4954A_REG_SIG_SEL2 register

Stereo Line Amplifier Output Gain

AK4954A_SIG_SEL2_SLG_0db
AK4954A_SIG_SEL2_SLG_2db
AK4954A_SIG_SEL2_SLG_4db
AK4954A_SIG_SEL2_SLG_6db

AK4954A_REG_SIG_SEL3

Bit definitions for the AK4954A_REG_SIG_SEL3 register

AK4954A_SIG_SEL3_MONO

Monaural mixing setting of the DAC output.

AK4954A_SIG_SEL3_MOFF

Soft Transition Control of “BEEP->Headphone” Connection ON/OFF.

AK4954A_REG_SIG_SEL3 (PTS)

Bit field in the AK4954A_REG_SIG_SEL3 register

Soft Transition Time of “BEEP->Headphone” Connection ON/OFF

AK4954A_SIG_SEL3_PTS_1X
AK4954A_SIG_SEL3_PTS_2X
AK4954A_SIG_SEL3_PTS_4X
AK4954A_SIG_SEL3_PTS_8X

AK4954A_REG_MODE_CTRL1 (DIF)

Bit field in the AK4954A_REG_MODE_CTRL1 register

Audio Interface Format

AK4954A_MODE_CTRL1_DIF_24M_24L
AK4954A_MODE_CTRL1_DIF_24M_16L
AK4954A_MODE_CTRL1_DIF_24M_24M
AK4954A_MODE_CTRL1_DIF_24_16_I2S
AK4954A_MODE_CTRL1_DIF_32M_32M
AK4954A_MODE_CTRL1_DIF_32_I2S

AK4954A_REG_MODE_CTRL1 (BCKO)

Bit field in the AK4954A_REG_MODE_CTRL1 register

BICK Output Frequency

AK4954A_MODE_CTRL1_BCK0_32fs
AK4954A_MODE_CTRL1_BCK0_64fs

AK4954A_REG_MODE_CTRL1 (PLL)

Bit field in the AK4954A_REG_MODE_CTRL1 register

PLL Reference Clock Select

AK4954A_MODE_CTRL1_PLL_32fs
AK4954A_MODE_CTRL1_PLL_64fs
AK4954A_MODE_CTRL1_PLL_11p2986MHz
AK4954A_MODE_CTRL1_PLL_12p288MHz
AK4954A_MODE_CTRL1_PLL_12MHz
AK4954A_MODE_CTRL1_PLL_24MHz
AK4954A_MODE_CTRL1_PLL_13p5MHz
AK4954A_MODE_CTRL1_PLL_27MHz

AK4954A_REG_MODE_CTRL2 (FS)

Bit field in the AK4954A_REG_MODE_CTRL2 register

Sampling frequency

AK4954A_MODE_CTRL2_FS_8kHz
AK4954A_MODE_CTRL2_FS_11p025kHz
AK4954A_MODE_CTRL2_FS_12kHz
AK4954A_MODE_CTRL2_FS_16kHz
AK4954A_MODE_CTRL2_FS_22p05kHz
AK4954A_MODE_CTRL2_FS_24kHz
AK4954A_MODE_CTRL2_FS_32kHz
AK4954A_MODE_CTRL2_FS_44p1kHz
AK4954A_MODE_CTRL2_FS_48kHz
AK4954A_MODE_CTRL2_FS_64kHz
AK4954A_MODE_CTRL2_FS_88p2kHz
AK4954A_MODE_CTRL2_FS_96kHz

AK4954A_REG_MODE_CTRL2 (CM)

Bit field in the AK4954A_REG_MODE_CTRL2 register

MCKI Input Frequency Setting in EXT mode

AK4954A_MODE_CTRL2_CM_256fs
AK4954A_MODE_CTRL2_CM_384fs
AK4954A_MODE_CTRL2_CM_512fs
AK4954A_MODE_CTRL2_CM_1024fs

AK4954A_REG_MODE_CTRL3

Bit definitions for the AK4954A_REG_MODE_CTRL3 register

AK4954A_MODE_CTRL3_LPDA

Low-Power Consumption Mode of DAC + HP.

AK4954A_MODE_CTRL3_LPMIC

Low-Power Consumption Mode of Microphone Amplifier.

AK4954A_MODE_CTRL3_IVOLC

Input Digital Volume Control Mode Select.

AK4954A_MODE_CTRL3_DVOLC

Output Digital Volume 2 Control Mode Select.

AK4954A_MODE_CTRL3_SMUTE

Soft Mute Control.

AK4954A_MODE_CTRL3_THDET

Thermal Shutdown Detection Result.

AK4954A_MODE_CTRL3_OVFL

ADC Overflow Output Enable (OVF Pin)

AK4954A_REG_DIG_MIC

Bit definitions for the AK4954A_REG_DIG_MIC register

AK4954A_DIG_MIC_DMIC

Digital Microphone Connection Select.

AK4954A_DIG_MIC_DCLKP

Data Latching Edge Select.

AK4954A_DIG_MIC_DCLKE

DMCLK pin Output Clock Control.

AK4954A_DIG_MIC_TEST

Device TEST mode Enable.

AK4954A_REG_DIG_MIC (PMDM)

Bit field in the AK4954A_REG_DIG_MIC register

Digital Microphone Input Signal Select

AK4954A_DIG_MIC_PMDM_OFF
AK4954A_DIG_MIC_PMDM_RIGHT
AK4954A_DIG_MIC_PMDM_LEFT
AK4954A_DIG_MIC_PMDM_STEREO

AK4954A_REG_TMR_SEL (DVTM)

Bit field in the AK4954A_REG_TMR_SEL register

Output Digital Volume Soft Transition Time

AK4954A_TMR_SEL_DVTM_144fs
AK4954A_TMR_SEL_DVTM_288fs
AK4954A_TMR_SEL_DVTM_576fs

AK4954A_REG_TMR_SEL (OVTM)

Bit field in the AK4954A_REG_TMR_SEL register

ADC Overflow Output Hold Time

AK4954A_TMR_SEL_OVTM_16fs
AK4954A_TMR_SEL_OVTM_64fs
AK4954A_TMR_SEL_OVTM_128fs
AK4954A_TMR_SEL_OVTM_256fs

AK4954A_REG_TMR_SEL (ADRST)

Bit field in the AK4954A_REG_TMR_SEL register

ADC Initialization Cycle Setting

AK4954A_TMR_SEL_ADRST_2115fs
AK4954A_TMR_SEL_ADRST_4227fs
AK4954A_TMR_SEL_ADRST_267fs
AK4954A_TMR_SEL_ADRST_1059fs

AK4954A_REG_ALC_TMR_SEL (RFST)

Bit field in the AK4954A_REG_ALC_TMR_SEL register

ALC First recovery Speed

AK4954A_ALC_TMR_SEL_RFST_0p0032db
AK4954A_ALC_TMR_SEL_RFST_0p0042db
AK4954A_ALC_TMR_SEL_RFST_0p0064db
AK4954A_ALC_TMR_SEL_RFST_0p0127db

AK4954A_REG_ALC_TMR_SEL (WTM)

Bit field in the AK4954A_REG_ALC_TMR_SEL register

ALC Recovery Waiting Period

AK4954A_ALC_TMR_SEL_WTM_128fs
AK4954A_ALC_TMR_SEL_WTM_256fs
AK4954A_ALC_TMR_SEL_WTM_512fs
AK4954A_ALC_TMR_SEL_WTM_1024fs

AK4954A_REG_ALC_TMR_SEL (IVTM)

Bit field in the AK4954A_REG_ALC_TMR_SEL register

Input Digital Volume Soft Transition Time

AK4954A_ALC_TMR_SEL_IVTM_236fs
AK4954A_ALC_TMR_SEL_IVTM_944fs
AK4954A_ALC_TMR_SEL_IVTM_1888fs
AK4954A_ALC_TMR_SEL_IVTM_3776fs

AK4954A_REG_ALC_MODE_CTRL1

Bit definitions for the AK4954A_REG_ALC_MODE_CTRL1 register

AK4954A_ALC_MODE_CTRL1_ALC

ALC Enable.

AK4954A_ALC_MODE_CTRL1_ALCEQN

ALC EQ Enable, NOT.

AK4954A_REG_ALC_MODE_CTRL1 (LMTH)

Bit field in the AK4954A_REG_ALC_MODE_CTRL1 register

ALC Limiter Detection Level (LDL) / Recovery Counter Reset Level (RCR)

AK4954A_ALC_MODE_CTRL1_LMTH_LDL_m2p5dBFS
AK4954A_ALC_MODE_CTRL1_LMTH_LDL_m4p1dBFS
AK4954A_ALC_MODE_CTRL1_LMTH_LDL_m6p0dBFS
AK4954A_ALC_MODE_CTRL1_LMTH_LDL_m8p5dBFS
AK4954A_ALC_MODE_CTRL1_LMTH_RCR_m4p1dBFS
AK4954A_ALC_MODE_CTRL1_LMTH_RCR_m6p0dBFS
AK4954A_ALC_MODE_CTRL1_LMTH_RCR_m8p5dBFS
AK4954A_ALC_MODE_CTRL1_LMTH_RCR_m12dBFS

AK4954A_REG_ALC_MODE_CTRL1 (RGAIN)

Bit field in the AK4954A_REG_ALC_MODE_CTRL1 register

ALC Recovery Gain Step

AK4954A_ALC_MODE_CTRL1_RGAIN_0p00424db_1fs
AK4954A_ALC_MODE_CTRL1_RGAIN_0p00212db_1fs
AK4954A_ALC_MODE_CTRL1_RGAIN_0p00106db_1fs
AK4954A_ALC_MODE_CTRL1_RGAIN_0p00106db_2fs
AK4954A_ALC_MODE_CTRL1_RGAIN_0p00106db_4fs
AK4954A_ALC_MODE_CTRL1_RGAIN_0p00106db_8fs
AK4954A_ALC_MODE_CTRL1_RGAIN_0p00106db_16fs
AK4954A_ALC_MODE_CTRL1_RGAIN_0p00106db_32fs

AK4954A_REG_HP_OUTPUT_CTRL

Bit definitions for the AK4954A_REG_HP_OUTPUT_CTRL register

AK4954A_HP_OUTPUT_CTRL_HPZ

Pull-down Setting of HP Amplifier.

AK4954A_REG_BEEP_FREQ

Bit definitions for the AK4954A_REG_BEEP_FREQ register

AK4954A_BEEP_FREQ_BPCNT

BEEP Signal Output Mode Setting.

AK4954A_REG_BEEP_FREQ (BPFR)

Bit field in the AK4954A_REG_BEEP_FREQ register

BEEP Signal Output Frequency

AK4954A_BEEP_FREQ_BPFR_4000Hz
AK4954A_BEEP_FREQ_BPFR_2000Hz
AK4954A_BEEP_FREQ_BPFR_1300Hz
AK4954A_BEEP_FREQ_BPFR_800Hz

AK4954A_REG_BEEP_VOL_CTRL

Bit definitions for the AK4954A_REG_BEEP_VOL_CTRL register

AK4954A_BEEP_VOL_CTRL_BPOUT

BEEP Signal Control.

AK4954A_REG_BEEP_VOL_CTRL (BPLVL)

Bit field in the AK4954A_REG_BEEP_VOL_CTRL register

AK4954A_BEEP_VOL_CTRL_BPLVL_0db
AK4954A_BEEP_VOL_CTRL_BPLVL_m3db
AK4954A_BEEP_VOL_CTRL_BPLVL_m6db
AK4954A_BEEP_VOL_CTRL_BPLVL_m9db
AK4954A_BEEP_VOL_CTRL_BPLVL_m12db
AK4954A_BEEP_VOL_CTRL_BPLVL_m15db
AK4954A_BEEP_VOL_CTRL_BPLVL_m18db
AK4954A_BEEP_VOL_CTRL_BPLVL_m21db
AK4954A_BEEP_VOL_CTRL_BPLVL_m24db
AK4954A_BEEP_VOL_CTRL_BPLVL_m27db
AK4954A_BEEP_VOL_CTRL_BPLVL_m30db
AK4954A_BEEP_VOL_CTRL_BPLVL_m33db
AK4954A_BEEP_VOL_CTRL_BPLVL_m36db
AK4954A_BEEP_VOL_CTRL_BPLVL_m39db
AK4954A_BEEP_VOL_CTRL_BPLVL_m42db
AK4954A_BEEP_VOL_CTRL_BPLVL_m45db
AK4954A_BEEP_VOL_CTRL_BPLVL_m48db
AK4954A_BEEP_VOL_CTRL_BPLVL_m51db
AK4954A_BEEP_VOL_CTRL_BPLVL_m54db
AK4954A_BEEP_VOL_CTRL_BPLVL_m57db
AK4954A_BEEP_VOL_CTRL_BPLVL_m60db

AK4954A_REG_DIG_FLTR_SEL1

Bit definitions for the AK4954A_REG_DIG_FLTR_SEL1 register

AK4954A_DIG_FLTR_SEL1_HPFAD

HPF1 Control after ADC.

AK4954A_DIG_FLTR_SEL1_SDAD

ADC Digital Filter Select.

AK4954A_REG_DIG_FLTR_SEL1 (HPFC)

Bit field in the AK4954A_REG_DIG_FLTR_SEL1 register

Cut-off Frequency Setting of HPF1

AK4954A_DIG_FLTR_SEL1_HPFC_96kHz_0p62Hz
AK4954A_DIG_FLTR_SEL1_HPFC_96kHz_2p49Hz
AK4954A_DIG_FLTR_SEL1_HPFC_96kHz_19p9Hz
AK4954A_DIG_FLTR_SEL1_HPFC_96kHz_39p8Hz
AK4954A_DIG_FLTR_SEL1_HPFC_44p1kHz_1p7Hz
AK4954A_DIG_FLTR_SEL1_HPFC_44p1kHz_6p9Hz
AK4954A_DIG_FLTR_SEL1_HPFC_44p1kHz_54p8Hz
AK4954A_DIG_FLTR_SEL1_HPFC_44p1kHz_109p7Hz
AK4954A_DIG_FLTR_SEL1_HPFC_22p05kHz_3p4Hz
AK4954A_DIG_FLTR_SEL1_HPFC_22p05kHz_13p7Hz
AK4954A_DIG_FLTR_SEL1_HPFC_22p05kHz_109p7Hz
AK4954A_DIG_FLTR_SEL1_HPFC_22p05kHz_219p3Hz
AK4954A_DIG_FLTR_SEL1_HPFC_8kHz_7p5Hz
AK4954A_DIG_FLTR_SEL1_HPFC_8kHz_29p8Hz
AK4954A_DIG_FLTR_SEL1_HPFC_8kHz_238p7Hz
AK4954A_DIG_FLTR_SEL1_HPFC_8kHz_477p5Hz

AK4954A_REG_DIG_FLTR_SEL2

Bit definitions for the AK4954A_REG_DIG_FLTR_SEL2 register

AK4954A_DIG_FLTR_SEL2_HPF

HPF2 Coefficient Setting Enable.

AK4954A_DIG_FLTR_SEL2_LPF

LPF Coefficient Setting Enable.

AK4954A_DIG_FLTR_SEL2_FIL3

FIL3 (Stereo Emphasis Filter) Coefficient Setting Enable.

AK4954A_DIG_FLTR_SEL2_EQ0

EQ0 (Gain Compensation Filter) Coefficient Setting Enable.

AK4954A_REG_DIG_FLTR_SEL2 (GN)

Bit field in the AK4954A_REG_DIG_FLTR_SEL2 register

Gain Setting of the Gain Block

AK4954A_DIG_FLTR_SEL2_GN_0db
AK4954A_DIG_FLTR_SEL2_GN_12db
AK4954A_DIG_FLTR_SEL2_GN_24db

AK4954A_REG_DIG_FLTR_MODE

Bit definitions for the AK4954A_REG_DIG_FLTR_MODE register

AK4954A_DIG_FLTR_MODE_PFSDO

SDTO Output Signal Select.

AK4954A_DIG_FLTR_MODE_ADCPF

Programmable Filter / ALC Input Signal Select.

AK4954A_DIG_FLTR_MODE_PFDAC

DAC Input Signal Select.

AK4954A_DIG_FLTR_MODE_PMDRC

Dynamic Range Control Circuit Power Management.

AK4954A_REG_DIG_FLTR_SEL3

Bit definitions for the AK4954A_REG_DIG_FLTR_SEL3 register

AK4954A_DIG_FLTR_SEL3_EQ1

Equalizer 1 Coefficient Setting Enable.

AK4954A_DIG_FLTR_SEL3_EQ2

Equalizer 2 Coefficient Setting Enable.

AK4954A_DIG_FLTR_SEL3_EQ3

Equalizer 3 Coefficient Setting Enable.

AK4954A_DIG_FLTR_SEL3_EQ4

Equalizer 4 Coefficient Setting Enable.

AK4954A_DIG_FLTR_SEL3_EQ5

Equalizer 5 Coefficient Setting Enable.

AK4954A_REG_DRC_MODE_CTRL (DRCC)

Bit field in the AK4954A_REG_DRC_MODE_CTRL register

DRC Setting Enable

AK4954A_DRC_MODE_CTRL_DRCC_DISABLE
AK4954A_DRC_MODE_CTRL_DRCC_LOW
AK4954A_DRC_MODE_CTRL_DRCC_MIDDLE
AK4954A_DRC_MODE_CTRL_DRCC_HIGH

AK4954A_REG_DRC_MODE_CTRL (DRGAIN)

Bit field in the AK4954A_REG_DRC_MODE_CTRL register

DRC Recovery Speed Setting

AK4954A_DRC_MODE_CTRL_DRGAIN_8kHz_1p1dBps
AK4954A_DRC_MODE_CTRL_DRGAIN_8kHz_2p1dBps
AK4954A_DRC_MODE_CTRL_DRGAIN_8kHz_4p2dBps
AK4954A_DRC_MODE_CTRL_DRGAIN_8kHz_8p5dBps
AK4954A_DRC_MODE_CTRL_DRGAIN_16kHz_2p1dBps
AK4954A_DRC_MODE_CTRL_DRGAIN_16kHz_4p2dBps
AK4954A_DRC_MODE_CTRL_DRGAIN_16kHz_8p5dBps
AK4954A_DRC_MODE_CTRL_DRGAIN_16kHz_17p0dBps
AK4954A_DRC_MODE_CTRL_DRGAIN_44p1kHz_5p9dBps
AK4954A_DRC_MODE_CTRL_DRGAIN_44p1kHz_11p7dBps
AK4954A_DRC_MODE_CTRL_DRGAIN_44p1kHz_23p4dBps
AK4954A_DRC_MODE_CTRL_DRGAIN_44p1kHz_46p7dBps

AK4954A_REG_DRC_MODE_CTRL (DLMAT)

Bit field in the AK4954A_REG_DRC_MODE_CTRL register

DRC Attenuation Speed Setting

AK4954A_DRC_MODE_CTRL_DLMAT_8kHz_0p1dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_8kHz_0p3dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_8kHz_0p5dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_8kHz_1p1dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_8kHz_2p2dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_8kHz_4p5dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_16kHz_0p3dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_16kHz_0p5dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_16kHz_1p1dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_16kHz_2p2dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_16kHz_4p4dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_16kHz_9p0dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_44p1kHz_0p7dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_44p1kHz_1p5dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_44p1kHz_3p0dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_44p1kHz_6p0dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_44p1kHz_12p2dBpms
AK4954A_DRC_MODE_CTRL_DLMAT_44p1kHz_24p7dBpms

AK4954A_REG_NS_CTRL

Bit definitions for the AK4954A_REG_NS_CTRL register

AK4954A_NS_CTRL_NSCE

Noise Suppression Setting Enable.

AK4954A_NS_CTRL_NSHPF

HPF for Noise Suppression Coefficient Setting Enable.

AK4954A_NS_CTRL_NSLPF

Noise Suppression LPF Coefficient Setting Enable.

AK4954A_REG_NS_CTRL (DRCM)

Bit field in the AK4954A_REG_NS_CTRL register

DRC Input Signal Setting

AK4954A_NS_CTRL_DRCM_STEREO
AK4954A_NS_CTRL_DRCM_LEFT
AK4954A_NS_CTRL_DRCM_RIGHT

AK4954A_REG_NS_GAIN_AND_ATT_CTRL (NSATT)

Bit field in the AK4954A_REG_NS_GAIN_AND_ATT_CTRL register

Noise Suppression Attenuation Speed

AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_8kHz_1p1dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_8kHz_2p1dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_8kHz_4p2dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_8kHz_8p5dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_8kHz_17p0dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_8kHz_33p9dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_16kHz_2p1dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_16kHz_4p2dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_16kHz_8p5dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_16kHz_17p0dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_16kHz_33p9dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_16kHz_67p9dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_44p1kHz_5p8dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_44p1kHz_11p7dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_44p1kHz_23p4dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_44p1kHz_46p8dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_44p1kHz_93p5dBps
AK4954A_NS_GAIN_AND_ATT_CTRL_NSATT_44p1kHz_187p1dBps

AK4954A_REG_NS_GAIN_AND_ATT_CTRL (NSGAIN)

Bit field in the AK4954A_REG_NS_GAIN_AND_ATT_CTRL register

Noise Suppression Recovery Speed

AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_8kHz_0p3dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_8kHz_0p5dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_8kHz_1p1dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_8kHz_2p2dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_8kHz_4p5dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_16kHz_0p5dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_16kHz_1p1dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_16kHz_2p2dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_16kHz_4p4dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_16kHz_9p0dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_44p1kHz_1p5dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_44p1kHz_3p0dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_44p1kHz_6p0dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_44p1kHz_12p2dBpms
AK4954A_NS_GAIN_AND_ATT_CTRL_NSGAIN_44p1kHz_24p7dBpms

AK4954A_REG_NS_ON_LEVEL

Bit field in the AK4954A_REG_NS_ON_LEVEL register

Noise Suppression Threshold Low Level Setting

AK4954A_NS_ON_LEVEL_NSTHL_m36p0db
AK4954A_NS_ON_LEVEL_NSTHL_m37p5db
AK4954A_NS_ON_LEVEL_NSTHL_m39p0db
AK4954A_NS_ON_LEVEL_NSTHL_m40p5db
AK4954A_NS_ON_LEVEL_NSTHL_m42p0db
AK4954A_NS_ON_LEVEL_NSTHL_m43p5db
AK4954A_NS_ON_LEVEL_NSTHL_m45p0db
AK4954A_NS_ON_LEVEL_NSTHL_m46p5db
AK4954A_NS_ON_LEVEL_NSTHL_m48p0db
AK4954A_NS_ON_LEVEL_NSTHL_m49p5db
AK4954A_NS_ON_LEVEL_NSTHL_m51p0db
AK4954A_NS_ON_LEVEL_NSTHL_m52p5db
AK4954A_NS_ON_LEVEL_NSTHL_m54p0db
AK4954A_NS_ON_LEVEL_NSTHL_m55p5db
AK4954A_NS_ON_LEVEL_NSTHL_m57p0db
AK4954A_NS_ON_LEVEL_NSTHL_m58p5db
AK4954A_NS_ON_LEVEL_NSTHL_m60p0db
AK4954A_NS_ON_LEVEL_NSTHL_m61p5db
AK4954A_NS_ON_LEVEL_NSTHL_m63p0db
AK4954A_NS_ON_LEVEL_NSTHL_m64p5db
AK4954A_NS_ON_LEVEL_NSTHL_m66p0db
AK4954A_NS_ON_LEVEL_NSTHL_m67p5db
AK4954A_NS_ON_LEVEL_NSTHL_m69p0db
AK4954A_NS_ON_LEVEL_NSTHL_m70p5db
AK4954A_NS_ON_LEVEL_NSTHL_m72p0db
AK4954A_NS_ON_LEVEL_NSTHL_m73p5db
AK4954A_NS_ON_LEVEL_NSTHL_m75p0db
AK4954A_NS_ON_LEVEL_NSTHL_m76p5db
AK4954A_NS_ON_LEVEL_NSTHL_m78p0db
AK4954A_NS_ON_LEVEL_NSTHL_m79p5db
AK4954A_NS_ON_LEVEL_NSTHL_m81p0db
AK4954A_NS_ON_LEVEL_NSTHL_m82p5db

AK4954A_REG_NS_ON_LEVEL (NSIAF)

Bit field in the AK4954A_REG_NS_ON_LEVEL register

Moving Avarage Parameter Setting at Noise Suppression Off

AK4954A_NS_ON_LEVEL_NSIAF_256fs
AK4954A_NS_ON_LEVEL_NSIAF_512fs
AK4954A_NS_ON_LEVEL_NSIAF_1024fs
AK4954A_NS_ON_LEVEL_NSIAF_2048fs

AK4954A_REG_NS_OFF_LEVEL

Bit field in the AK4954A_REG_NS_OFF_LEVEL register

Noise Suppression Threshold High Level Setting

AK4954A_NS_ON_LEVEL_NSTHH_m36p0db
AK4954A_NS_ON_LEVEL_NSTHH_m37p5db
AK4954A_NS_ON_LEVEL_NSTHH_m39p0db
AK4954A_NS_ON_LEVEL_NSTHH_m40p5db
AK4954A_NS_ON_LEVEL_NSTHH_m42p0db
AK4954A_NS_ON_LEVEL_NSTHH_m43p5db
AK4954A_NS_ON_LEVEL_NSTHH_m45p0db
AK4954A_NS_ON_LEVEL_NSTHH_m46p5db
AK4954A_NS_ON_LEVEL_NSTHH_m48p0db
AK4954A_NS_ON_LEVEL_NSTHH_m49p5db
AK4954A_NS_ON_LEVEL_NSTHH_m51p0db
AK4954A_NS_ON_LEVEL_NSTHH_m52p5db
AK4954A_NS_ON_LEVEL_NSTHH_m54p0db
AK4954A_NS_ON_LEVEL_NSTHH_m55p5db
AK4954A_NS_ON_LEVEL_NSTHH_m57p0db
AK4954A_NS_ON_LEVEL_NSTHH_m58p5db
AK4954A_NS_ON_LEVEL_NSTHH_m60p0db
AK4954A_NS_ON_LEVEL_NSTHH_m61p5db
AK4954A_NS_ON_LEVEL_NSTHH_m63p0db
AK4954A_NS_ON_LEVEL_NSTHH_m64p5db
AK4954A_NS_ON_LEVEL_NSTHH_m66p0db
AK4954A_NS_ON_LEVEL_NSTHH_m67p5db
AK4954A_NS_ON_LEVEL_NSTHH_m69p0db
AK4954A_NS_ON_LEVEL_NSTHH_m70p5db
AK4954A_NS_ON_LEVEL_NSTHH_m72p0db
AK4954A_NS_ON_LEVEL_NSTHH_m73p5db
AK4954A_NS_ON_LEVEL_NSTHH_m75p0db
AK4954A_NS_ON_LEVEL_NSTHH_m76p5db
AK4954A_NS_ON_LEVEL_NSTHH_m78p0db
AK4954A_NS_ON_LEVEL_NSTHH_m79p5db
AK4954A_NS_ON_LEVEL_NSTHH_m81p0db
AK4954A_NS_ON_LEVEL_NSTHH_m82p5db

AK4954A_REG_NS_OFF_LEVEL (NSOAF)

Bit field in the AK4954A_REG_NS_OFF_LEVEL register

Moving Avarage Parameter Setting at Noise Suppression On

AK4954A_NS_OFF_LEVEL_NSOAF_4fs
AK4954A_NS_OFF_LEVEL_NSOAF_8fs
AK4954A_NS_OFF_LEVEL_NSOAF_16fs
AK4954A_NS_OFF_LEVEL_NSOAF_32fs

AK4954A_REG_NSREF

Bit field in the AK4954A_REG_NSREF register

Reference Value at Noise Suppression

AK4954A_NSREF_m9db
AK4954A_NSREF_m12db
AK4954A_NSREF_m15db
AK4954A_NSREF_m18db
AK4954A_NSREF_m21db
AK4954A_NSREF_m24db
AK4954A_NSREF_m27db
AK4954A_NSREF_m30db
AK4954A_NSREF_m33db
AK4954A_NSREF_m36db
AK4954A_NSREF_m39db
AK4954A_NSREF_m42db
AK4954A_NSREF_m45db
AK4954A_NSREF_m48db
AK4954A_NSREF_m51db
AK4954A_NSREF_m54db

AK4954A_REG_DVLC_FLTR_SEL (DHHPF)

Bit field in the AK4954A_REG_DVLC_FLTR_SEL register

DVLC High Frequency Range HPF Setting

AK4954A_DVLC_FLTR_SEL_DHHPF_DISABLE
AK4954A_DVLC_FLTR_SEL_DHHPF_1ST
AK4954A_DVLC_FLTR_SEL_DHHPF_2ND

AK4954A_REG_DVLC_FLTR_SEL (DMLPF)

Bit field in the AK4954A_REG_DVLC_FLTR_SEL register

DVLC Middle Frequency Range LPF Coefficient Setting Enable

AK4954A_DVLC_FLTR_SEL_DMLPF_DISABLE
AK4954A_DVLC_FLTR_SEL_DMLPF_1ST
AK4954A_DVLC_FLTR_SEL_DMLPF_2ND

AK4954A_REG_DVLC_FLTR_SEL (DMHPF)

Bit field in the AK4954A_REG_DVLC_FLTR_SEL register

DVLC Middle Frequency Range HPF Coefficient Setting Enable

AK4954A_DVLC_FLTR_SEL_DMHPF_DISABLE
AK4954A_DVLC_FLTR_SEL_DMHPF_1ST
AK4954A_DVLC_FLTR_SEL_DMHPF_2ND

AK4954A_REG_DVLC_FLTR_SEL (DLLPF)

Bit field in the AK4954A_REG_DVLC_FLTR_SEL register

DVLC Low Frequency Range LPF Coefficient * Setting Enable

AK4954A_DVLC_FLTR_SEL_DLLPF_DISABLE
AK4954A_DVLC_FLTR_SEL_DLLPF_1ST
AK4954A_DVLC_FLTR_SEL_DLLPF_2ND

AK4954A_REG_DVLC_MODE_CTRL (DAF)

Bit field in the AK4954A_REG_DVLC_MODE_CTRL register

Moving Avarage Parameter Setting for DVLC

AK4954A_DVLC_MODE_CTRL_DAF_256fs
AK4954A_DVLC_MODE_CTRL_DAF_384fs
AK4954A_DVLC_MODE_CTRL_DAF_512fs
AK4954A_DVLC_MODE_CTRL_DAF_1024fs

AK4954A_REG_DVLC_MODE_CTRL (DVLMAT)

Bit field in the AK4954A_REG_DVLC_MODE_CTRL register

DVLC Attenuation Speed Setting

AK4954A_DVLC_MODE_CTRL_DVLMAT_8kHz_1p1dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_8kHz_2p1dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_8kHz_4p2dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_8kHz_8p5dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_8kHz_17p0dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_8kHz_33p9dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_8kHz_67p9dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_16kHz_2p1dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_16kHz_4p2dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_16kHz_8p5dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_16kHz_17p0dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_16kHz_33p9dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_16kHz_67p9dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_16kHz_135p8dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_44p1kHz_5p8dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_44p1kHz_11p7dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_44p1kHz_23p4dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_44p1kHz_46p8dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_44p1kHz_93p5dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_44p1kHz_187p1dBps
AK4954A_DVLC_MODE_CTRL_DVLMAT_44p1kHz_374p3dBps

AK4954A_REG_DVLC_MODE_CTRL (DVRGAIN)

Bit field in the AK4954A_REG_DVLC_MODE_CTRL register

DVLC Recovery Speed Setting

AK4954A_DVLC_MODE_CTRL_DVRGAIN_8kHz_0p07dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_8kHz_0p13dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_8kHz_0p27dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_8kHz_0p53dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_8kHz_1p06dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_8kHz_2p12dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_8kHz_4p24dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_16kHz_0p13dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_16kHz_0p27dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_16kHz_0p53dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_16kHz_1p06dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_16kHz_2p12dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_16kHz_4p24dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_16kHz_8p48dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_44p1kHz_0p37dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_44p1kHz_0p73dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_44p1kHz_1p46dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_44p1kHz_2p92dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_44p1kHz_5p84dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_44p1kHz_11p7dBps
AK4954A_DVLC_MODE_CTRL_DVRGAIN_44p1kHz_23p4dBps

Volume

Volume Control Constants

AK4954A_HP_VOLUME_DEFAULT

Default Value (0.0dB)

AK4954A_HP_VOLUME_MAX

Maximum Value (+6.0dB)

AK4954A_HP_VOLUME_MIN

Minimum Value (-65.5dB)

AK4954A_HP_VOLUME_MUTE

Writing >= 0x90 mutes the headphone output.

Default Configuration

Default Configuration Values

AK4954A_DEF_SAMPLING_RATE
AK4954A_DEF_DATA_ALIGNMENT

Defines

AK4954A_RESET_WAIT_DELAY

Wait Delay, in milli seconds.

CY_RSLT_AK4954A_INIT_FAIL

Initialization failure error.

Enums

enum mtb_ak4954a_reg_t

mtb_ak4954a_reg_t: Enumeration for the AK4954A I2C Interface Register Addresses.

The entries below marked as a “two-byte value” are intended for use with these functions:

Values:

enumerator AK4954A_REG_PWR_MGMT1

0x00: Power Management 1

enumerator AK4954A_REG_PWR_MGMT2

0x01: Power Management 2

enumerator AK4954A_REG_SIG_SEL1

0x02: Signal Select 1

enumerator AK4954A_REG_SIG_SEL2

0x03: Signal Select 2

enumerator AK4954A_REG_SIG_SEL3

0x04: Signal Select 3

enumerator AK4954A_REG_MODE_CTRL1

0x05: Mode Control 1

enumerator AK4954A_REG_MODE_CTRL2

0x06: Mode Control 2

enumerator AK4954A_REG_MODE_CTRL3

0x07: Mode Control 3

enumerator AK4954A_REG_DIG_MIC

0x08: Digital MIC 0

enumerator AK4954A_REG_TMR_SEL

0x09: Timer Select

enumerator AK4954A_REG_ALC_TMR_SEL

0x0A: ALC Timer Select

enumerator AK4954A_REG_ALC_MODE_CTRL1

0x0B: ALC Mode Control 1

enumerator AK4954A_REG_ALC_MODE_CTRL2

0x0C: ALC Mode Control 2

enumerator AK4954A_REG_LCH_INPUT_VOL_CTRL

0x0D: Lch Input Volume Control

enumerator AK4954A_REG_RCH_INPUT_VOL_CTRL

0x0E: Rch Input Volume Control

enumerator AK4954A_REG_RESERVED_0x0F
enumerator AK4954A_REG_RESERVED_0x10
enumerator AK4954A_REG_RESERVED_0x11
enumerator AK4954A_REG_HP_OUTPUT_CTRL

0x12: HP Output Control

enumerator AK4954A_REG_LCH_DIG_VOL_CTRL

0x13: Lch Digital Volume Control

enumerator AK4954A_REG_RCH_DIG_VOL_CTRL

0x14: Rch Digital Volume Control

enumerator AK4954A_REG_BEEP_FREQ

0x15: BEEP Frequency

enumerator AK4954A_REG_BEEP_ON_TIME

0x16: BEEP ON Time

enumerator AK4954A_REG_BEEP_OFF_TIME

0x17: BEEP OFF Time

enumerator AK4954A_REG_BEEP_REPEAT_CNT

0x18: BEEP Repeat Count

enumerator AK4954A_REG_BEEP_VOL_CTRL

0x19: BEEP Volume Control

enumerator AK4954A_REG_RESERVED_0x1A
enumerator AK4954A_REG_DIG_FLTR_SEL1

0x1B: Digital Filter Select 1

enumerator AK4954A_REG_DIG_FLTR_SEL2

0x1C: Digital Filter Select 2

enumerator AK4954A_REG_DIG_FLTR_MODE

0x1D: Digital Filter Mode

enumerator AK4954A_REG_HPF2_COEF0

0x1E: HPF2 Co-efficient 0

enumerator AK4954A_REG_F1A

0x1E: F1A, two-byte value

enumerator AK4954A_REG_HPF2_COEF1

0x1F: HPF2 Co-efficient 1

enumerator AK4954A_REG_HPF2_COEF2

0x20: HPF2 Co-efficient 2

enumerator AK4954A_REG_F1B

0x20: F1B, two-byte value

enumerator AK4954A_REG_HPF2_COEF3

0x21: HPF2 Co-efficient 3

enumerator AK4954A_REG_LPF_COEF0

0x22: LPF Co-efficient 0

enumerator AK4954A_REG_F2A

0x22: F2A, two-byte value

enumerator AK4954A_REG_LPF_COEF1

0x23: LPF Co-efficient 1

enumerator AK4954A_REG_LPF_COEF2

0x24: LPF Co-efficient 2

enumerator AK4954A_REG_F2B

0x24: F2B, two-byte value

enumerator AK4954A_REG_LPF_COEF3

0x25: LPF Co-efficient 3

enumerator AK4954A_REG_FIL3_COEF0

0x26: FIL3 Co-efficient 0

enumerator AK4954A_REG_F3A

0x26: F3A, two-byte value

enumerator AK4954A_REG_FIL3_COEF1

0x27: FIL3 Co-efficient 1

enumerator AK4954A_REG_FIL3_COEF2

0x28: FIL3 Co-efficient 2

enumerator AK4954A_REG_F3B

0x28: F3B, two-byte value

enumerator AK4954A_REG_FIL3_COEF3

0x29: FIL3 Co-efficient 3

enumerator AK4954A_REG_EQ_COEF0

0x2A: EQ Co-efficient 0

enumerator AK4954A_REG_E0A

0x2A: E0A, two-byte value

enumerator AK4954A_REG_EQ_COEF1

0x2B: EQ Co-efficient 1

enumerator AK4954A_REG_EQ_COEF2

0x2C: EQ Co-efficient 2

enumerator AK4954A_REG_E0B

0x2C: E0B, two-byte value

enumerator AK4954A_REG_EQ_COEF3

0x2D: EQ Co-efficient 3

enumerator AK4954A_REG_EQ_COEF4

0x2E: EQ Co-efficient 4

enumerator AK4954A_REG_E0C

0x2E: E0C, two-byte value

enumerator AK4954A_REG_EQ_COEF5

0x2F: EQ Co-efficient 5

enumerator AK4954A_REG_DIG_FLTR_SEL3

0x30: Digital Filter Select 3

enumerator AK4954A_REG_RESERVED_0x31
enumerator AK4954A_REG_E1_COEF0

0x32: E1 Co-efficient 0

enumerator AK4954A_REG_E1A

0x32: E1A, two-byte value

enumerator AK4954A_REG_E1_COEF1

0x33: E1 Co-efficient 1

enumerator AK4954A_REG_E1_COEF2

0x34: E1 Co-efficient 2

enumerator AK4954A_REG_E1B

0x34: E1B, two-byte value

enumerator AK4954A_REG_E1_COEF3

0x35: E1 Co-efficient 3

enumerator AK4954A_REG_E1_COEF4

0x36: E1 Co-efficient 4

enumerator AK4954A_REG_E1C

0x36: E1C, two-byte value

enumerator AK4954A_REG_E1_COEF5

0x37: E1 Co-efficient 5

enumerator AK4954A_REG_E2_COEF0

0x38: E2 Co-efficient 0

enumerator AK4954A_REG_E2A

0x38: E2A, two-byte value

enumerator AK4954A_REG_E2_COEF1

0x39: E2 Co-efficient 1

enumerator AK4954A_REG_E2_COEF2

0x3A: E2 Co-efficient 2

enumerator AK4954A_REG_E2B

0x3A: E2B, two-byte value

enumerator AK4954A_REG_E2_COEF3

0x3B: E2 Co-efficient 3

enumerator AK4954A_REG_E2_COEF4

0x3C: E2 Co-efficient 4

enumerator AK4954A_REG_E2C

0x3C: E2C, two-byte value

enumerator AK4954A_REG_E2_COEF5

0x3D: E2 Co-efficient 5

enumerator AK4954A_REG_E3_COEF0

0x3E: E3 Co-efficient 0

enumerator AK4954A_REG_E3A

0x3E: E3A, two-byte value

enumerator AK4954A_REG_E3_COEF1

0x3F: E3 Co-efficient 1

enumerator AK4954A_REG_E3_COEF2

0x40: E3 Co-efficient 2

enumerator AK4954A_REG_E3B

0x40: E3B, two-byte value

enumerator AK4954A_REG_E3_COEF3

0x41: E3 Co-efficient 3

enumerator AK4954A_REG_E3_COEF4

0x42: E3 Co-efficient 4

enumerator AK4954A_REG_E3C

0x42: E3C, two-byte value

enumerator AK4954A_REG_E3_COEF5

0x43: E3 Co-efficient 5

enumerator AK4954A_REG_E4_COEF0

0x44: E4 Co-efficient 0

enumerator AK4954A_REG_E4A

0x44: E4A, two-byte value

enumerator AK4954A_REG_E4_COEF1

0x45: E4 Co-efficient 1

enumerator AK4954A_REG_E4_COEF2

0x46: E4 Co-efficient 2

enumerator AK4954A_REG_E4B

0x46: E4B, two-byte value

enumerator AK4954A_REG_E4_COEF3

0x47: E4 Co-efficient 3

enumerator AK4954A_REG_E4_COEF4

0x48: E4 Co-efficient 4

enumerator AK4954A_REG_E4C

0x48: E4C, two-byte value

enumerator AK4954A_REG_E4_COEF5

0x49: E4 Co-efficient 5

enumerator AK4954A_REG_E5_COEF0

0x4A: E5 Co-efficient 0

enumerator AK4954A_REG_E5A

0x4A: E5A, two-byte value

enumerator AK4954A_REG_E5_COEF1

0x4B: E5 Co-efficient 1

enumerator AK4954A_REG_E5_COEF2

0x4C: E5 Co-efficient 2

enumerator AK4954A_REG_E5B

0x4C: E5B, two-byte value

enumerator AK4954A_REG_E5_COEF3

0x4D: E5 Co-efficient 3

enumerator AK4954A_REG_E5_COEF4

0x4E: E5 Co-efficient 4

enumerator AK4954A_REG_E5C

0x4E: E5C, two-byte value

enumerator AK4954A_REG_E5_COEF5

0x4F: E5 Co-efficient 5

enumerator AK4954A_REG_DRC_MODE_CTRL

0x50: DRC Mode Control

enumerator AK4954A_REG_NS_CTRL

0x51: NS Control

enumerator AK4954A_REG_NS_GAIN_AND_ATT_CTRL

0x52: NS Gain & ATT Control

enumerator AK4954A_REG_NS_ON_LEVEL

0x53: NS On Level

enumerator AK4954A_REG_NS_OFF_LEVEL

0x54: NS Off Level

enumerator AK4954A_REG_NS_REFERENCE_SEL

0x55: NS Reference Select

enumerator AK4954A_REG_NSREF

0x55: NSREF

enumerator AK4954A_REG_NS_LPF_COEF0

0x56: NS LPF Co-efficient 0

enumerator AK4954A_REG_NSLA

0x56: NSLA, two-byte value

enumerator AK4954A_REG_NS_LPF_COEF1

0x57: NS LPF Co-efficient 1

enumerator AK4954A_REG_NS_LPF_COEF2

0x58: NS LPF Co-efficient 2

enumerator AK4954A_REG_NSLB

0x58: NSLB, two-byte value

enumerator AK4954A_REG_NS_LPF_COEF3

0x59: NS LPF Co-efficient 3

enumerator AK4954A_REG_NS_HPF_COEF0

0x5A: NS HPF Co-efficient 0

enumerator AK4954A_REG_NSHA

0x5A: NSHA, two-byte value

enumerator AK4954A_REG_NS_HPF_COEF1

0x5B: NS HPF Co-efficient 1

enumerator AK4954A_REG_NS_HPF_COEF2

0x5C: NS HPF Co-efficient 2

enumerator AK4954A_REG_NSHB

0x5C: NSHB, two-byte value

enumerator AK4954A_REG_NS_HPF_COEF3

0x5D: NS HPF Co-efficient 3

enumerator AK4954A_REG_RESERVED_0x5E
enumerator AK4954A_REG_RESERVED_0x5F
enumerator AK4954A_REG_DVLC_FLTR_SEL

0x60: DVLC Filter Select

enumerator AK4954A_REG_DVLC_MODE_CTRL

0x61: DVLC Mode Control

enumerator AK4954A_REG_DVLCL_CURVE_X1

0x62: DVLCL Curve X1

enumerator AK4954A_REG_VL1X

0x62: VL1X

enumerator AK4954A_REG_DVLCL_CURVE_Y1

0x63: DVLCL Curve Y1

enumerator AK4954A_REG_VL1Y

0x63: VL1Y

enumerator AK4954A_REG_DVLCL_CURVE_X2

0x64: DVLCL Curve X2

enumerator AK4954A_REG_VL2X

0x64: VL2X

enumerator AK4954A_REG_DVLCL_CURVE_Y2

0x65: DVLCL Curve Y2

enumerator AK4954A_REG_VL2Y

0x65: VL2Y

enumerator AK4954A_REG_DVLCL_CURVE_X3

0x66: DVLCL Curve X3

enumerator AK4954A_REG_VL3X

0x66: VL3X

enumerator AK4954A_REG_DVLCL_CURVE_Y3

0x67: DVLCL Curve Y3

enumerator AK4954A_REG_VL3Y

0x67: VL3Y

enumerator AK4954A_REG_DVLCL_SLOPE1

0x68: DVLCL Slope 1

enumerator AK4954A_REG_L1G

0x68: L1G

enumerator AK4954A_REG_DVLCL_SLOPE2

0x69: DVLCL Slope 2

enumerator AK4954A_REG_L2G

0x69: L2G

enumerator AK4954A_REG_DVLCL_SLOPE3

0x6A: DVLCL Slope 3

enumerator AK4954A_REG_L3G

0x6A: L3G

enumerator AK4954A_REG_DVLCL_SLOPE4

0x6B: DVLCL Slope 4

enumerator AK4954A_REG_L4G

0x6B: L4G

enumerator AK4954A_REG_DVLCM_CURVE_X1

0x6C: DVLCM Curve X1

enumerator AK4954A_REG_VM1X

0x6C: VM1X

enumerator AK4954A_REG_DVLCM_CURVE_Y1

0x6D: DVLCM Curve Y1

enumerator AK4954A_REG_VM1Y

0x6D: VM1Y

enumerator AK4954A_REG_DVLCM_CURVE_X2

0x6E: DVLCM Curve X2

enumerator AK4954A_REG_VM2X

0x6E: VM2X

enumerator AK4954A_REG_DVLCM_CURVE_Y2

0x6F: DVLCM Curve Y2

enumerator AK4954A_REG_VM2Y

0x6F: VM2Y

enumerator AK4954A_REG_DVLCM_CURVE_X3

0x70: DVLCM Curve X3

enumerator AK4954A_REG_VM3X

0x70: VM3X

enumerator AK4954A_REG_DVLCM_CURVE_Y3

0x71: DVLCM Curve Y3

enumerator AK4954A_REG_VM3Y

0x71: VM3Y

enumerator AK4954A_REG_DVLCM_SLOPE1

0x72: DVLCM Slope 1

enumerator AK4954A_REG_M1G

0x72: M1G

enumerator AK4954A_REG_DVLCM_SLOPE2

0x73: DVLCM Slope 2

enumerator AK4954A_REG_M2G

0x73: M2G

enumerator AK4954A_REG_DVLCM_SLOPE3

0x74: DVLCM Slope 3

enumerator AK4954A_REG_M3G

0x74: M3G

enumerator AK4954A_REG_DVLCM_SLOPE4

0x75: DVLCM Slope 4

enumerator AK4954A_REG_M4G

0x75: M4G

enumerator AK4954A_REG_DVLCH_CURVE_X1

0x76: DVLCH Curve X1

enumerator AK4954A_REG_VH1X

0x76: VH1X

enumerator AK4954A_REG_DVLCH_CURVE_Y1

0x77: DVLCH Curve Y1

enumerator AK4954A_REG_VH1Y

0x77: VH1Y

enumerator AK4954A_REG_DVLCH_CURVE_X2

0x78: DVLCH Curve X2

enumerator AK4954A_REG_VH2X

0x78: VH2X

enumerator AK4954A_REG_DVLCH_CURVE_Y2

0x79: DVLCH Curve Y2

enumerator AK4954A_REG_VH2Y

0x79: VH2Y

enumerator AK4954A_REG_DVLCH_CURVE_X3

0x7A: DVLCH Curve X3

enumerator AK4954A_REG_VH3X

0x7A: VH3X

enumerator AK4954A_REG_DVLCH_CURVE_Y3

0x7B: DVLCH Curve Y3

enumerator AK4954A_REG_VH3Y

0x7B: VH3Y

enumerator AK4954A_REG_DVLCH_SLOPE1

0x7C: DVLCH Slope 1

enumerator AK4954A_REG_H1G

0x7C: H1G

enumerator AK4954A_REG_DVLCH_SLOPE2

0x7D: DVLCH Slope 2

enumerator AK4954A_REG_H2G

0x7D: H2G

enumerator AK4954A_REG_DVLCH_SLOPE3

0x7E: DVLCH Slope 3

enumerator AK4954A_REG_H3G

0x7E: H3G

enumerator AK4954A_REG_DVLCH_SLOPE4

0x7F: DVLCH Slope 4

enumerator AK4954A_REG_H4G

0x7F: H4G

enumerator AK4954A_REG_DVLCL_LPF_COEF0

0x80: DVLCL LPF Co-efficient 0

enumerator AK4954A_REG_DLLA

0x80: DLLA, two-byte value

enumerator AK4954A_REG_DVLCL_LPF_COEF1

0x81: DVLCL LPF Co-efficient 1

enumerator AK4954A_REG_DVLCL_LPF_COEF2

0x82: DVLCL LPF Co-efficient 2

enumerator AK4954A_REG_DLLB

0x82: DLLB, two-byte value

enumerator AK4954A_REG_DVLCL_LPF_COEF3

0x83: DVLCL LPF Co-efficient 3

enumerator AK4954A_REG_DVLCM_HPF_COEF0

0x84: DVLCM HPF Co-efficient 0

enumerator AK4954A_REG_DMHA

0x84: DMHA, two-byte value

enumerator AK4954A_REG_DVLCM_HPF_COEF1

0x85: DVLCM HPF Co-efficient 1

enumerator AK4954A_REG_DVLCM_HPF_COEF2

0x86: DVLCM HPF Co-efficient 2

enumerator AK4954A_REG_DMHB

0x86: DMHB, two-byte value

enumerator AK4954A_REG_DVLCM_HPF_COEF3

0x87: DVLCM HPF Co-efficient 3

enumerator AK4954A_REG_DVLCM_LPF_COEF0

0x88: DVLCM LPF Co-efficient 0

enumerator AK4954A_REG_DMLA

0x88: DMLA, two-byte value

enumerator AK4954A_REG_DVLCM_LPF_COEF1

0x89: DVLCM LPF Co-efficient 1

enumerator AK4954A_REG_DVLCM_LPF_COEF2

0x8A: DVLCM LPF Co-efficient 2

enumerator AK4954A_REG_DMLB

0x8A: DMLB, two-byte value

enumerator AK4954A_REG_DVLCM_LPF_COEF3

0x8B: DVLCM LPF Co-efficient 3

enumerator AK4954A_REG_DVLCH_HPF_COEF0

0x8C: DVLCH HPF Co-efficient 0

enumerator AK4954A_REG_DHHA

0x8C: DHHA, two-byte value

enumerator AK4954A_REG_DVLCH_HPF_COEF1

0x8D: DVLCH HPF Co-efficient 1

enumerator AK4954A_REG_DVLCH_HPF_COEF2

0x8E: DVLCH HPF Co-efficient 2

enumerator AK4954A_REG_DHHB

0x8E: DHHB, two-byte value

enumerator AK4954A_REG_DVLCH_HPF_COEF3

0x8F: DVLCH HPF Co-efficient 3

enumerator AK4954A_REG_MAX_ADDRESS

Functions

cy_rslt_t mtb_ak4954a_init(cyhal_i2c_t *i2c_inst)

Initialize the I2C communication with the audio codec and do basic configuration of the codec.

Return

CY_RSLT_SUCCESS if properly initialized, else an error indicating what went wrong.

Parameters
  • [in] i2c_inst: I2C instance to use for communicating with the AK4954A audio codec.

void mtb_ak4954a_free()

Frees up any resources allocated by the display as part of mtb_ak4954a_init().

void mtb_ak4954a_adjust_volume(uint8_t volume)

This function updates the volume of both the left and right channels of the headphone output.

Parameters
  • [in] volume: - Steps of 0.5dB, where: Minimum volume: -65.5dB (0x8F) Maximum volume: +6.0dB (0x00) Mute: (0x90~0xFF)

void mtb_ak4954a_activate(void)

Activates the codec - This function is called in conjunction with ak4954A_deactivate API after successful configuration update of the codec.

void mtb_ak4954a_deactivate(void)

Deactivates the codec - the configuration is retained, just the codec input/outputs are disabled.

The function should be called before changing any setting in the codec over I2C

void mtb_ak4954a_write_byte(mtb_ak4954a_reg_t reg, uint8_t data)

This function writes a data byte to an audio codec register.

Parameters
  • [in] reg: The audio codec register to update

  • [in] data: The byte to be written to the audio codec register

void mtb_ak4954a_set(mtb_ak4954a_reg_t reg, uint8_t mask)

This function sets bits in a register.

This function can be used instead of mtb_ak4954a_write_byte() if you want to change a single bit or select bits in the register and preserve the value of other bits in the register. Only the bits set to 1 in the mask are effected.

Parameters
  • [in] reg: The audio codec register to update

  • [in] mask: The mask used to set bits in the register

void mtb_ak4954a_clear(mtb_ak4954a_reg_t reg, uint8_t mask)

This function clears bits in a register.

This function can be used instead of mtb_ak4954a_write_byte() if you want to change a single bit or select bits in the register and preserve the value of other bits in the register. Only the bits set to 1 in the mask are effected.

Parameters
  • [in] reg: The audio codec register to update

  • [in] mask: The mask used to clear bits in the register

void mtb_ak4954a_write_word(mtb_ak4954a_reg_t reg, uint16_t data)

This function writes a data value that spans two register addresses.

Parameters
  • [in] reg: The first of two audio codec registers to update

  • [in] data: The word (two-byte value) to be written to the audio codec register

void mtb_ak4954a_write_data_stream(mtb_ak4954a_reg_t reg, uint8_t *pData, uint8_t numBytes)

This function writes multiple data bytes to the audio codec registers.

Parameters
  • [in] reg: The first audio codec register to update

  • [in] pData: Pointer to the buffer that has data

  • [in] numBytes: Number of bytes to be written to the display controller

uint8_t mtb_ak4954a_read_byte(mtb_ak4954a_reg_t reg)

This function reads a data byte from an audio codec register.

Return

data The byte read from the audio codec register

Parameters
  • [in] reg: The audio codec register read

uint16_t mtb_ak4954a_read_word(mtb_ak4954a_reg_t reg)

This function reads a data value that spans two register addresses.

Return

data The word (two-byte value) read from the audio codec register

Parameters
  • [in] reg: The first of two audio codec registers to read

void mtb_ak4954a_read_data_stream(mtb_ak4954a_reg_t reg, uint8_t *pData, uint8_t numBytes)

This function reads multiple data bytes from the audio codec registers.

Parameters
  • [in] reg: The first audio codec register to read

  • [in] pData: Pointer to the location to store the data read

  • [in] numBytes: Number of bytes to read from the display controller