arduino-audio-driver
Loading...
Searching...
No Matches
DA7212 Class Reference

Header only C++ driver for the DA7212 audio codec. More...

#include <DA7212.h>

Inheritance diagram for DA7212:
ZephyrDriverCommon

Public Types

enum  Reg : uint8_t {
  REG_DIG_ROUTING_DAI = 0x21 , REG_SR = 0x22 , REG_REFERENCES = 0x23 , REG_PLL_FRAC_TOP = 0x24 ,
  REG_PLL_FRAC_BOT = 0x25 , REG_PLL_INTEGER = 0x26 , REG_PLL_CTRL = 0x27 , REG_DAI_CLK_MODE = 0x28 ,
  REG_DAI_CTRL = 0x29 , REG_DIG_ROUTING_DAC = 0x2A , REG_CIF_CTRL = 0x1D , REG_MIXIN_L_SELECT = 0x32 ,
  REG_MIXIN_R_SELECT = 0x33 , REG_MIXIN_L_GAIN = 0x34 , REG_ADC_L_GAIN = 0x36 , REG_ADC_R_GAIN = 0x37 ,
  REG_DAC_L_GAIN = 0x45 , REG_DAC_R_GAIN = 0x46 , REG_CP_CTRL = 0x47 , REG_HP_L_GAIN = 0x48 ,
  REG_HP_R_GAIN = 0x49 , REG_LINE_GAIN = 0x4A , REG_MIXOUT_L_SELECT = 0x4B , REG_MIXOUT_R_SELECT = 0x4C ,
  REG_AUX_L_CTRL = 0x60 , REG_AUX_R_CTRL = 0x61 , REG_MICBIAS_CTRL = 0x62 , REG_MIC_1_CTRL = 0x63 ,
  REG_MIC_2_CTRL = 0x64 , REG_MIXIN_L_CTRL = 0x65 , REG_MIXIN_R_CTRL = 0x66 , REG_ADC_L_CTRL = 0x67 ,
  REG_ADC_R_CTRL = 0x68 , REG_DAC_L_CTRL = 0x69 , REG_DAC_R_CTRL = 0x6A , REG_HP_L_CTRL = 0x6B ,
  REG_HP_R_CTRL = 0x6C , REG_LINE_CTRL = 0x6D , REG_MIXOUT_L_CTRL = 0x6E , REG_MIXOUT_R_CTRL = 0x6F ,
  REG_GAIN_RAMP_CTRL = 0x92 , REG_MIC_CONFIG = 0x93 , REG_PC_COUNT = 0x94 , REG_CP_VOL_THRESHOLD1 = 0x95 ,
  REG_CP_DELAY = 0x96 , REG_CP_DETECTOR = 0x97
}

Public Member Functions

 DA7212 ()
uint8_t address ()
 Provides the actual I2C address of the codec.
bool begin (DA7212Protocol protocol=DA7212Protocol::I2S, uint32_t sample_rate=44100, uint8_t word_size=16, bool master=false, bool playback=true, bool capture=true)
bool begin (uint32_t sample_rate, uint8_t bits)
 Initialize the codec: soft reset, default routing, PLL disabled (MCLK is used directly as the system clock), DAI / protocol / sample rate / word length configuration and optional playback/capture path setup.
bool begin (uint32_t sample_rate, uint8_t bits, codec_mode_t mode, i2s_format_t fmt, bool is_master, uint8_t channels) override
bool configureInput ()
 Configure the input (capture) path: AUX -> MixIn routing, charge pump, AUX/MIC/MixIn amps, ADCs, gain ramp & charge pump delay, default ADC volume and unmute.
bool configureOutput ()
 Configure the output (playback) path: charge pump, DAC -> MixOut routing, DACs, headphone amps, MixOut amps, default DAC/HP gain and unmute.
virtual int getInputVolume ()
virtual int getVolume ()
 Provides the output volume in % (0...100) that was set with setVolume().
i2c_bus_handle_t getWire ()
 Provides the actual I2C communication object.
bool isInputVolumeSupported () override
 Returns true: the input volume is supported.
bool routeDacInput (bool playback)
 Route the DAI input to the DACs (playback) or bypass ADC->DAC.
bool routeInput (DA7212Channel channel=DA7212Channel::All)
 Route the AUX input(s) to the input mixer(s) for the given channel(s).
bool routeOutput ()
 Route the DACs to the output mixers (MixOut).
bool setActive (codec_mode_t mode) override
void setAddress (uint8_t addr)
 Defines the I2C address of the codec.
bool setAudioFormat (uint32_t sample_rate, uint8_t word_size=16)
 Configure sample rate (SR register) and word length (DAI_CTRL).
bool setClockMode (bool master, uint8_t word_size)
 Configure master/slave clock mode.
bool setDevices (input_device_t input_device, output_device_t output_device) override
 Stores the output device selection for use by configureOutput().
bool setInputMute (bool mute, DA7212Channel channel=DA7212Channel::All)
 Mute / unmute the ADC input for the given channel(s).
bool setInputVolume (int volume) override
 Sets the input volume in % (0...100) for all channels.
bool setInputVolume (uint8_t volume, DA7212Channel channel=DA7212Channel::All)
 Set the ADC input volume (0..127, ADC_x_GAIN) for the given channel(s).
bool setMute (bool mute) override
 Mutes/unmutes all outputs.
bool setOutputMute (bool mute, DA7212Channel channel=DA7212Channel::All)
 Mute / unmute the headphone (and line) output for the given channel(s).
bool setOutputVolume (uint8_t volume, DA7212Channel channel=DA7212Channel::All)
 Set the headphone output volume (0..63, HP_x_GAIN) for the given channel(s).
bool setProtocol (DA7212Protocol protocol)
 Configure the digital audio interface protocol (I2S, LJ, RJ, DSP).
bool setVolume (int volume) override
 Sets the output volume in % (0...100) for all channels.
void setWire (i2c_bus_handle_t w)
 Defines the I2C communication object.
bool softReset ()
 Soft reset of the codec (CIF_CTRL soft reset bit).

Static Public Attributes

static constexpr uint8_t ADC_GAIN_MASK = 0x7F
static constexpr uint8_t AMP_EN_MASK = (1U << 7)
static constexpr uint8_t AMP_OE_MASK = (1U << 3)
static constexpr uint8_t AMP_RAMP_EN_MASK = (1U << 5)
static constexpr uint8_t AMP_ZC_EN_MASK = (1U << 4)
static constexpr uint8_t AUX_AMP_EN_MASK = (1U << 7)
static constexpr uint8_t AUX_AMP_RAMP_EN_MASK = (1U << 5)
static constexpr uint8_t AUX_AMP_ZC_EN_MASK = (1U << 4)
static constexpr uint8_t AUX_L_CTRL_AMP_ZC_SEL_INPUT_AUX_L_IF = (1U << 2)
static constexpr uint8_t CIF_CTRL_SOFT_RESET = (1U << 7)
static constexpr uint8_t CP_CTRL_ANALOG_VLL_LV_BOOSTS_CP = (1U << 0)
static constexpr uint8_t CP_CTRL_EN_MASK = (1U << 7)
static constexpr uint8_t CP_CTRL_MCHANGE_OUTPUT = (3U << 4)
static constexpr uint8_t CP_CTRL_MOD_CPVDD_1 = (3U << 2)
static constexpr uint8_t CP_CTRL_SMALL_SWITCH_FREQ_EN_MASK = (1U << 6)
static constexpr uint8_t CP_DELAY_FCONTROL_0HZ_OR_1MHZ = (5U << 0)
static constexpr uint8_t CP_DELAY_ON_OFF_LIMITER_AUT = (2U << 6)
static constexpr uint8_t CP_DELAY_TAU_DELAY_4MS = (2U << 3)
static constexpr uint8_t DAC_DEFAULT_GAIN = 0x67
static constexpr uint8_t DAI_BCLKS_PER_WCLK_BCLK128 = 2
static constexpr uint8_t DAI_BCLKS_PER_WCLK_BCLK256 = 3
static constexpr uint8_t DAI_BCLKS_PER_WCLK_BCLK32 = 0
static constexpr uint8_t DAI_BCLKS_PER_WCLK_BCLK64 = 1
static constexpr uint8_t DAI_BCLKS_PER_WCLK_MASK = 0x03
static constexpr uint8_t DAI_CLK_EN_MASK = (1U << 7)
static constexpr uint8_t DAI_EN_MASK = (1U << 7)
static constexpr uint8_t DAI_FORMAT_MASK = 0x03
static constexpr uint8_t DAI_OE_MASK = (1U << 6)
static constexpr uint8_t DAI_WORD_LENGTH_16B = (0U << 2)
static constexpr uint8_t DAI_WORD_LENGTH_20B = (1U << 2)
static constexpr uint8_t DAI_WORD_LENGTH_24B = (2U << 2)
static constexpr uint8_t DAI_WORD_LENGTH_32B = (3U << 2)
static constexpr uint8_t DAI_WORD_LENGTH_MASK = 0x0C
static constexpr uint8_t DIG_ROUTING_DAC_L_RSC_ADC_L_OUTPUT = (0U << 0)
static constexpr uint8_t DIG_ROUTING_DAC_L_RSC_DAC_L = (2U << 0)
static constexpr uint8_t DIG_ROUTING_DAC_R_RSC_ADC_R_OUTPUT = (1U << 4)
static constexpr uint8_t DIG_ROUTING_DAC_R_RSC_DAC_R = (3U << 4)
static constexpr uint8_t DIG_ROUTING_DAI_L_SRC_ADC_LEFT = (0U << 0)
static constexpr uint8_t DIG_ROUTING_DAI_R_SRC_ADC_RIGHT = (1U << 4)
static constexpr uint8_t EN_MASK = (1U << 7)
static constexpr uint8_t GAIN_RAMP_CTRL_RATE_NR_MUL_16 = (2U << 0)
static constexpr uint8_t HP_DEFAULT_GAIN = 0x2F
static constexpr uint8_t HP_GAIN_MASK = 0x3F
static constexpr uint8_t MIC_CTRL_AMP_IN_SEL_MIC_P = (1U << 2)
static constexpr uint8_t MIXIN_AMP_EN_MASK = (1U << 7)
static constexpr uint8_t MIXIN_AMP_MIX_EN_MASK = (1U << 3)
static constexpr uint8_t MIXIN_L_SELECT_AUX_L_SEL_MASK = (1U << 0)
static constexpr uint8_t MIXIN_R_SELECT_AUX_R_SEL_MASK = (1U << 0)
static constexpr uint8_t MIXOUT_AMP_EN_MASK = (1U << 7)
static constexpr uint8_t MIXOUT_AMP_MIX_EN_MASK = (1U << 3)
static constexpr uint8_t MIXOUT_AMP_SOFT_MIX_EN_MASK = (1U << 4)
static constexpr uint8_t MIXOUT_L_SELECT_DAC_L_MASK = (1U << 3)
static constexpr uint8_t MIXOUT_R_SELECT_DAC_R_MASK = (1U << 3)
static constexpr uint8_t MUTE_MASK = (3U << 6)
static constexpr uint8_t PC_COUNT_RESYNC_MASK = (1U << 1)
static constexpr uint8_t PLL_FBDIV_INTEGER_RESET_VALUE = 0x20
static constexpr uint8_t RAMP_EN_MASK = (1U << 5)
static constexpr uint8_t REFERENCES_BIAS_EN_MASK = (1U << 3)
static constexpr uint8_t UNMUTE_MASK = (1U << 7)
 *_EN bit kept set

Protected Member Functions

bool readReg (uint8_t reg, uint8_t &value, bool stopBit=true)
 Reads a single byte from an 8 bit register address.
bool readReg16 (uint8_t reg, uint16_t &value)
 Reads a 16 bit (big endian) value from an 8 bit register address.
bool updateOutGain (DA7212Channel channel, uint8_t volume)
bool updateReg (uint8_t reg, uint8_t mask, uint8_t value)
 Read-Modify-Write of a single byte register.
bool updateReg16 (uint8_t reg, uint16_t mask, uint16_t value)
 Read-Modify-Write of a 16 bit (big endian) register.
bool writeReg (uint8_t reg, uint8_t value)
 Writes a single byte to an 8 bit register address.
bool writeReg16 (uint8_t reg, uint16_t value)
 Writes a 16 bit (big endian) value to an 8 bit register address.

Protected Attributes

uint8_t i2c_addr = 0
int input_volume_percent = 100
 Last input volume (in %) provided to setInputVolume().
output_device_t output_device = DAC_OUTPUT_ALL
 Output device selection set via setDevices(), used by configureOutput().
int volume_percent = 100
 Last volume (in %) provided to setVolume().
i2c_bus_handle_t wire = nullptr

Detailed Description

Header only C++ driver for the DA7212 audio codec.

Provides soft reset, basic playback/capture configuration (I2S protocol, sample rate, word length), input routing and output/input volume & mute control, ported from the corresponding Zephyr RTOS driver.

Member Enumeration Documentation

◆ Reg

enum Reg : uint8_t
Enumerator
REG_DIG_ROUTING_DAI 
REG_SR 
REG_REFERENCES 
REG_PLL_FRAC_TOP 
REG_PLL_FRAC_BOT 
REG_PLL_INTEGER 
REG_PLL_CTRL 
REG_DAI_CLK_MODE 
REG_DAI_CTRL 
REG_DIG_ROUTING_DAC 
REG_CIF_CTRL 
REG_MIXIN_L_SELECT 
REG_MIXIN_R_SELECT 
REG_MIXIN_L_GAIN 
REG_ADC_L_GAIN 
REG_ADC_R_GAIN 
REG_DAC_L_GAIN 
REG_DAC_R_GAIN 
REG_CP_CTRL 
REG_HP_L_GAIN 
REG_HP_R_GAIN 
REG_LINE_GAIN 
REG_MIXOUT_L_SELECT 
REG_MIXOUT_R_SELECT 
REG_AUX_L_CTRL 
REG_AUX_R_CTRL 
REG_MICBIAS_CTRL 
REG_MIC_1_CTRL 
REG_MIC_2_CTRL 
REG_MIXIN_L_CTRL 
REG_MIXIN_R_CTRL 
REG_ADC_L_CTRL 
REG_ADC_R_CTRL 
REG_DAC_L_CTRL 
REG_DAC_R_CTRL 
REG_HP_L_CTRL 
REG_HP_R_CTRL 
REG_LINE_CTRL 
REG_MIXOUT_L_CTRL 
REG_MIXOUT_R_CTRL 
REG_GAIN_RAMP_CTRL 
REG_MIC_CONFIG 
REG_PC_COUNT 
REG_CP_VOL_THRESHOLD1 
REG_CP_DELAY 
REG_CP_DETECTOR 

Constructor & Destructor Documentation

◆ DA7212()

DA7212 ( )
inline

Member Function Documentation

◆ address()

uint8_t address ( )
inlineinherited

Provides the actual I2C address of the codec.

◆ begin() [1/3]

bool begin ( DA7212Protocol protocol = DA7212Protocol::I2S,
uint32_t sample_rate = 44100,
uint8_t word_size = 16,
bool master = false,
bool playback = true,
bool capture = true )
inline

◆ begin() [2/3]

bool begin ( uint32_t sample_rate,
uint8_t bits )
inline

Initialize the codec: soft reset, default routing, PLL disabled (MCLK is used directly as the system clock), DAI / protocol / sample rate / word length configuration and optional playback/capture path setup.

Parameters
protocolDigital audio interface protocol
sample_rateI2S sample rate in Hz
word_sizeI2S word size in bits (16, 20, 24, 32)
mastertrue if the codec should drive BCLK/WCLK (master mode)
playbackEnable & configure the output (headphone) path
captureEnable & configure the input path Initializes the codec for I2S with the given sample rate and bits per sample

◆ begin() [3/3]

bool begin ( uint32_t sample_rate,
uint8_t bits,
codec_mode_t mode,
i2s_format_t fmt,
bool is_master,
uint8_t channels )
inlineoverridevirtual

Initializes the codec for I2S with the given sample rate, bits per sample, enabling the playback and/or capture path depending on mode, using the given I2S data format and master/slave mode. The channels parameter is not configurable on this chip and is ignored.

Implements ZephyrDriverCommon.

◆ configureInput()

bool configureInput ( )
inline

Configure the input (capture) path: AUX -> MixIn routing, charge pump, AUX/MIC/MixIn amps, ADCs, gain ramp & charge pump delay, default ADC volume and unmute.

◆ configureOutput()

bool configureOutput ( )
inline

Configure the output (playback) path: charge pump, DAC -> MixOut routing, DACs, headphone amps, MixOut amps, default DAC/HP gain and unmute.

◆ getInputVolume()

virtual int getInputVolume ( )
inlinevirtualinherited

Provides the input volume in % (0...100) that was set with setInputVolume()

◆ getVolume()

virtual int getVolume ( )
inlinevirtualinherited

Provides the output volume in % (0...100) that was set with setVolume().

◆ getWire()

i2c_bus_handle_t getWire ( )
inlineinherited

Provides the actual I2C communication object.

◆ isInputVolumeSupported()

bool isInputVolumeSupported ( )
inlineoverridevirtual

Returns true: the input volume is supported.

Reimplemented from ZephyrDriverCommon.

◆ readReg()

bool readReg ( uint8_t reg,
uint8_t & value,
bool stopBit = true )
inlineprotectedinherited

Reads a single byte from an 8 bit register address.

◆ readReg16()

bool readReg16 ( uint8_t reg,
uint16_t & value )
inlineprotectedinherited

Reads a 16 bit (big endian) value from an 8 bit register address.

◆ routeDacInput()

bool routeDacInput ( bool playback)
inline

Route the DAI input to the DACs (playback) or bypass ADC->DAC.

◆ routeInput()

bool routeInput ( DA7212Channel channel = DA7212Channel::All)
inline

Route the AUX input(s) to the input mixer(s) for the given channel(s).

◆ routeOutput()

bool routeOutput ( )
inline

Route the DACs to the output mixers (MixOut).

◆ setActive()

bool setActive ( codec_mode_t mode)
inlineoverridevirtual

Activates/deactivates the playback and/or capture path depending on codec_mode_t by muting/unmuting the output and input independently

Reimplemented from ZephyrDriverCommon.

◆ setAddress()

void setAddress ( uint8_t addr)
inlineinherited

Defines the I2C address of the codec.

◆ setAudioFormat()

bool setAudioFormat ( uint32_t sample_rate,
uint8_t word_size = 16 )
inline

Configure sample rate (SR register) and word length (DAI_CTRL).

◆ setClockMode()

bool setClockMode ( bool master,
uint8_t word_size )
inline

Configure master/slave clock mode.

Parameters
mastertrue => codec drives BCLK/WCLK (DAI_CLK_EN=1)
word_sizeBCLK count per WCLK period is derived from this

◆ setDevices()

bool setDevices ( input_device_t input_device,
output_device_t output_device )
inlineoverridevirtual

Stores the output device selection for use by configureOutput().

Reimplemented from ZephyrDriverCommon.

◆ setInputMute()

bool setInputMute ( bool mute,
DA7212Channel channel = DA7212Channel::All )
inline

Mute / unmute the ADC input for the given channel(s).

◆ setInputVolume() [1/2]

bool setInputVolume ( int volume)
inlineoverridevirtual

Sets the input volume in % (0...100) for all channels.

Reimplemented from ZephyrDriverCommon.

◆ setInputVolume() [2/2]

bool setInputVolume ( uint8_t volume,
DA7212Channel channel = DA7212Channel::All )
inline

Set the ADC input volume (0..127, ADC_x_GAIN) for the given channel(s).

◆ setMute()

bool setMute ( bool mute)
inlineoverridevirtual

Mutes/unmutes all outputs.

Reimplemented from ZephyrDriverCommon.

◆ setOutputMute()

bool setOutputMute ( bool mute,
DA7212Channel channel = DA7212Channel::All )
inline

Mute / unmute the headphone (and line) output for the given channel(s).

◆ setOutputVolume()

bool setOutputVolume ( uint8_t volume,
DA7212Channel channel = DA7212Channel::All )
inline

Set the headphone output volume (0..63, HP_x_GAIN) for the given channel(s).

◆ setProtocol()

bool setProtocol ( DA7212Protocol protocol)
inline

Configure the digital audio interface protocol (I2S, LJ, RJ, DSP).

◆ setVolume()

bool setVolume ( int volume)
inlineoverridevirtual

Sets the output volume in % (0...100) for all channels.

Reimplemented from ZephyrDriverCommon.

◆ setWire()

void setWire ( i2c_bus_handle_t w)
inlineinherited

Defines the I2C communication object.

◆ softReset()

bool softReset ( )
inline

Soft reset of the codec (CIF_CTRL soft reset bit).

◆ updateOutGain()

bool updateOutGain ( DA7212Channel channel,
uint8_t volume )
inlineprotected

◆ updateReg()

bool updateReg ( uint8_t reg,
uint8_t mask,
uint8_t value )
inlineprotectedinherited

Read-Modify-Write of a single byte register.

◆ updateReg16()

bool updateReg16 ( uint8_t reg,
uint16_t mask,
uint16_t value )
inlineprotectedinherited

Read-Modify-Write of a 16 bit (big endian) register.

◆ writeReg()

bool writeReg ( uint8_t reg,
uint8_t value )
inlineprotectedinherited

Writes a single byte to an 8 bit register address.

◆ writeReg16()

bool writeReg16 ( uint8_t reg,
uint16_t value )
inlineprotectedinherited

Writes a 16 bit (big endian) value to an 8 bit register address.

Member Data Documentation

◆ ADC_GAIN_MASK

uint8_t ADC_GAIN_MASK = 0x7F
staticconstexpr

◆ AMP_EN_MASK

uint8_t AMP_EN_MASK = (1U << 7)
staticconstexpr

◆ AMP_OE_MASK

uint8_t AMP_OE_MASK = (1U << 3)
staticconstexpr

◆ AMP_RAMP_EN_MASK

uint8_t AMP_RAMP_EN_MASK = (1U << 5)
staticconstexpr

◆ AMP_ZC_EN_MASK

uint8_t AMP_ZC_EN_MASK = (1U << 4)
staticconstexpr

◆ AUX_AMP_EN_MASK

uint8_t AUX_AMP_EN_MASK = (1U << 7)
staticconstexpr

◆ AUX_AMP_RAMP_EN_MASK

uint8_t AUX_AMP_RAMP_EN_MASK = (1U << 5)
staticconstexpr

◆ AUX_AMP_ZC_EN_MASK

uint8_t AUX_AMP_ZC_EN_MASK = (1U << 4)
staticconstexpr

◆ AUX_L_CTRL_AMP_ZC_SEL_INPUT_AUX_L_IF

uint8_t AUX_L_CTRL_AMP_ZC_SEL_INPUT_AUX_L_IF = (1U << 2)
staticconstexpr

◆ CIF_CTRL_SOFT_RESET

uint8_t CIF_CTRL_SOFT_RESET = (1U << 7)
staticconstexpr

◆ CP_CTRL_ANALOG_VLL_LV_BOOSTS_CP

uint8_t CP_CTRL_ANALOG_VLL_LV_BOOSTS_CP = (1U << 0)
staticconstexpr

◆ CP_CTRL_EN_MASK

uint8_t CP_CTRL_EN_MASK = (1U << 7)
staticconstexpr

◆ CP_CTRL_MCHANGE_OUTPUT

uint8_t CP_CTRL_MCHANGE_OUTPUT = (3U << 4)
staticconstexpr

◆ CP_CTRL_MOD_CPVDD_1

uint8_t CP_CTRL_MOD_CPVDD_1 = (3U << 2)
staticconstexpr

◆ CP_CTRL_SMALL_SWITCH_FREQ_EN_MASK

uint8_t CP_CTRL_SMALL_SWITCH_FREQ_EN_MASK = (1U << 6)
staticconstexpr

◆ CP_DELAY_FCONTROL_0HZ_OR_1MHZ

uint8_t CP_DELAY_FCONTROL_0HZ_OR_1MHZ = (5U << 0)
staticconstexpr

◆ CP_DELAY_ON_OFF_LIMITER_AUT

uint8_t CP_DELAY_ON_OFF_LIMITER_AUT = (2U << 6)
staticconstexpr

◆ CP_DELAY_TAU_DELAY_4MS

uint8_t CP_DELAY_TAU_DELAY_4MS = (2U << 3)
staticconstexpr

◆ DAC_DEFAULT_GAIN

uint8_t DAC_DEFAULT_GAIN = 0x67
staticconstexpr

◆ DAI_BCLKS_PER_WCLK_BCLK128

uint8_t DAI_BCLKS_PER_WCLK_BCLK128 = 2
staticconstexpr

◆ DAI_BCLKS_PER_WCLK_BCLK256

uint8_t DAI_BCLKS_PER_WCLK_BCLK256 = 3
staticconstexpr

◆ DAI_BCLKS_PER_WCLK_BCLK32

uint8_t DAI_BCLKS_PER_WCLK_BCLK32 = 0
staticconstexpr

◆ DAI_BCLKS_PER_WCLK_BCLK64

uint8_t DAI_BCLKS_PER_WCLK_BCLK64 = 1
staticconstexpr

◆ DAI_BCLKS_PER_WCLK_MASK

uint8_t DAI_BCLKS_PER_WCLK_MASK = 0x03
staticconstexpr

◆ DAI_CLK_EN_MASK

uint8_t DAI_CLK_EN_MASK = (1U << 7)
staticconstexpr

◆ DAI_EN_MASK

uint8_t DAI_EN_MASK = (1U << 7)
staticconstexpr

◆ DAI_FORMAT_MASK

uint8_t DAI_FORMAT_MASK = 0x03
staticconstexpr

◆ DAI_OE_MASK

uint8_t DAI_OE_MASK = (1U << 6)
staticconstexpr

◆ DAI_WORD_LENGTH_16B

uint8_t DAI_WORD_LENGTH_16B = (0U << 2)
staticconstexpr

◆ DAI_WORD_LENGTH_20B

uint8_t DAI_WORD_LENGTH_20B = (1U << 2)
staticconstexpr

◆ DAI_WORD_LENGTH_24B

uint8_t DAI_WORD_LENGTH_24B = (2U << 2)
staticconstexpr

◆ DAI_WORD_LENGTH_32B

uint8_t DAI_WORD_LENGTH_32B = (3U << 2)
staticconstexpr

◆ DAI_WORD_LENGTH_MASK

uint8_t DAI_WORD_LENGTH_MASK = 0x0C
staticconstexpr

◆ DIG_ROUTING_DAC_L_RSC_ADC_L_OUTPUT

uint8_t DIG_ROUTING_DAC_L_RSC_ADC_L_OUTPUT = (0U << 0)
staticconstexpr

◆ DIG_ROUTING_DAC_L_RSC_DAC_L

uint8_t DIG_ROUTING_DAC_L_RSC_DAC_L = (2U << 0)
staticconstexpr

◆ DIG_ROUTING_DAC_R_RSC_ADC_R_OUTPUT

uint8_t DIG_ROUTING_DAC_R_RSC_ADC_R_OUTPUT = (1U << 4)
staticconstexpr

◆ DIG_ROUTING_DAC_R_RSC_DAC_R

uint8_t DIG_ROUTING_DAC_R_RSC_DAC_R = (3U << 4)
staticconstexpr

◆ DIG_ROUTING_DAI_L_SRC_ADC_LEFT

uint8_t DIG_ROUTING_DAI_L_SRC_ADC_LEFT = (0U << 0)
staticconstexpr

◆ DIG_ROUTING_DAI_R_SRC_ADC_RIGHT

uint8_t DIG_ROUTING_DAI_R_SRC_ADC_RIGHT = (1U << 4)
staticconstexpr

◆ EN_MASK

uint8_t EN_MASK = (1U << 7)
staticconstexpr

◆ GAIN_RAMP_CTRL_RATE_NR_MUL_16

uint8_t GAIN_RAMP_CTRL_RATE_NR_MUL_16 = (2U << 0)
staticconstexpr

◆ HP_DEFAULT_GAIN

uint8_t HP_DEFAULT_GAIN = 0x2F
staticconstexpr

◆ HP_GAIN_MASK

uint8_t HP_GAIN_MASK = 0x3F
staticconstexpr

◆ i2c_addr

uint8_t i2c_addr = 0
protectedinherited

◆ input_volume_percent

int input_volume_percent = 100
protectedinherited

Last input volume (in %) provided to setInputVolume().

◆ MIC_CTRL_AMP_IN_SEL_MIC_P

uint8_t MIC_CTRL_AMP_IN_SEL_MIC_P = (1U << 2)
staticconstexpr

◆ MIXIN_AMP_EN_MASK

uint8_t MIXIN_AMP_EN_MASK = (1U << 7)
staticconstexpr

◆ MIXIN_AMP_MIX_EN_MASK

uint8_t MIXIN_AMP_MIX_EN_MASK = (1U << 3)
staticconstexpr

◆ MIXIN_L_SELECT_AUX_L_SEL_MASK

uint8_t MIXIN_L_SELECT_AUX_L_SEL_MASK = (1U << 0)
staticconstexpr

◆ MIXIN_R_SELECT_AUX_R_SEL_MASK

uint8_t MIXIN_R_SELECT_AUX_R_SEL_MASK = (1U << 0)
staticconstexpr

◆ MIXOUT_AMP_EN_MASK

uint8_t MIXOUT_AMP_EN_MASK = (1U << 7)
staticconstexpr

◆ MIXOUT_AMP_MIX_EN_MASK

uint8_t MIXOUT_AMP_MIX_EN_MASK = (1U << 3)
staticconstexpr

◆ MIXOUT_AMP_SOFT_MIX_EN_MASK

uint8_t MIXOUT_AMP_SOFT_MIX_EN_MASK = (1U << 4)
staticconstexpr

◆ MIXOUT_L_SELECT_DAC_L_MASK

uint8_t MIXOUT_L_SELECT_DAC_L_MASK = (1U << 3)
staticconstexpr

◆ MIXOUT_R_SELECT_DAC_R_MASK

uint8_t MIXOUT_R_SELECT_DAC_R_MASK = (1U << 3)
staticconstexpr

◆ MUTE_MASK

uint8_t MUTE_MASK = (3U << 6)
staticconstexpr

◆ output_device

output_device_t output_device = DAC_OUTPUT_ALL
protected

Output device selection set via setDevices(), used by configureOutput().

◆ PC_COUNT_RESYNC_MASK

uint8_t PC_COUNT_RESYNC_MASK = (1U << 1)
staticconstexpr

◆ PLL_FBDIV_INTEGER_RESET_VALUE

uint8_t PLL_FBDIV_INTEGER_RESET_VALUE = 0x20
staticconstexpr

◆ RAMP_EN_MASK

uint8_t RAMP_EN_MASK = (1U << 5)
staticconstexpr

◆ REFERENCES_BIAS_EN_MASK

uint8_t REFERENCES_BIAS_EN_MASK = (1U << 3)
staticconstexpr

◆ UNMUTE_MASK

uint8_t UNMUTE_MASK = (1U << 7)
staticconstexpr

*_EN bit kept set

◆ volume_percent

int volume_percent = 100
protectedinherited

Last volume (in %) provided to setVolume().

◆ wire

i2c_bus_handle_t wire = nullptr
protectedinherited

The documentation for this class was generated from the following file: